示例#1
0
    if ($resultss) {
        //header("Location: role.php");
    }
    echo json_encode($a);
}
//uodating type of user for the registered user
if ($_POST['add'] == "add" && ($type = $_POST['type'])) {
    $_SESSION['action'] = "add";
    require 'acl.php';
    $result = $objName->addRole($type);
    header('Location: adminmanage.php');
}
if ($_POST['delete'] == "delete" && ($type = $_POST['role'])) {
    $_SESSION['action'] = "delete";
    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');
}