示例#1
0
    require 'acl.php';
    $result = $objName->deleteRole($type);
    header('Location: adminmanage.php');
}
//for roles addition and deletion
if ($_POST['add'] == "add" && ($operation = $_POST['operation'])) {
    $_SESSION['action'] = "add";
    require 'acl.php';
    $result = $objName->addOperation($operation);
    header('Location: adminmanage.php');
}
if ($_POST['delete'] == "delete" && ($action = $_POST['action'])) {
    $_SESSION['action'] = "delete";
    require 'acl.php';
    $result = $objName->deleteOperation($action);
    header('Location: adminmanage.php');
}
//for operations addition and deletion
if ($_POST['add'] == "add" && ($resource = $_POST['recource'])) {
    $_SESSION['action'] = "add";
    require 'acl.php';
    $result = $objName->addResource($resource);
    header('Location: adminmanage.php');
}
if ($_POST['delete'] == "delete" && ($name = $_POST['name'])) {
    $_SESSION['action'] = "delete";
    require 'acl.php';
    $result = $objName->deleteResource($name);
    header('Location: adminmanage.php');
}
//for resources add and delete