Example #1
0
function groups_admin_main($var)
{
    $op = pnVarCleanFromInput('op');
    extract($var);
    if (!pnSecAuthAction(0, 'Groups::', '::', ACCESS_EDIT)) {
        include 'header.php';
        echo _GROUPSNOAUTH;
        include 'footer.php';
    } else {
        switch ($op) {
            case "secviewgroups":
                viewGroups();
                break;
            case "secviewgroup":
                viewGroup();
                break;
            case "secnewgroup":
                newGroup();
                break;
            case "secaddgroup":
                addGroup();
                break;
            case "secdeletegroup":
                deleteGroup();
                break;
            case "secselectuserforgroup":
                selectUserForGroup();
                break;
            case "secaddusertogroup":
                addUserToGroup();
                break;
            case "secdeleteuserfromgroup":
                deleteUserFromGroup();
                break;
            case "secmodifygroup":
                modifyGroup();
                break;
            case "secrenamegroup":
                renameGroup();
                break;
            default:
                viewGroups();
                break;
        }
    }
}
Example #2
0
 protected function delete_id_name_handler()
 {
     deleteUserFromGroup($this->id, $this->name);
     header('Location: ' . filter_input(INPUT_SERVER, 'PHP_SELF'));
     return false;
 }