Posted by Mac
2014-03-17

Hi Tom
Thanks for This greet work
I want to remove (add new ) and (Delete) buttons from the non admin staff.
Posted by Tom
2014-03-17

Hi Mac
If you just want to remove the buttons, you can do so in the template, web/staff/tpl.(table-name).search.inc.php. But removing buttons does not mean disabling it. Before editing the template, make sure you disable it first. Now, I'll explain how to disable it.

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':