Esempio n. 1
0
echo $lang['common_rights'];
?>
</h1>

<?php 
$accessInst = new access();
#######################################################################
## perform action
if (tool::securePost('id')) {
    $accessInst->activate(tool::securePost('id'));
    if (!DEMO_MODE) {
        if (is_array(tool::securePost('remove'))) {
            $accessInst->removeRights(tool::securePost('remove'));
        }
        if (is_array(tool::securePost('add'))) {
            $accessInst->addRights(tool::securePost('add'));
        }
    } else {
        $toolInst->errorStatus("not allowed in this demo. Sorry ;)");
    }
}
#######################################################################
## make edit / new form
if (tool::securePost('action') == "edit") {
    ?>
  <h2><?php 
    echo $lang['common_editRecord'];
    ?>
</h2>
  <form method="post">
  <input type="hidden" name="action" value="edit">