Posted by Tom
2014-07-11
You can print some message before exiting like this:
case 'edit_inp': if ( !$this->sys->IsAdmin() ) { echo "Access Denied"; exit; };Please change "Access Denied" to anything you want to display.
To prevent non-administrators from adding/editing/deleting records, open web/staff/app/cls_ps_(--table-name--).inc.php and add
if ( !$this->sys->IsAdmin() ) exit;
after
case 'edit_inp':
The result should look like:
case 'edit_inp': if ( !$this->sys->IsAdmin() ) exit;
Do the same for the following lines, too.
case 'edit_done':
case 'reg_inp':
case 'reg_done':
case 'del_multi':
How can you print a message saying they don't have access ?