blob: 11028bfb8e0477ba99fba45f822d1ae846d564cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
<?php
include('Smarty.class.php');
include('../DBInterface.php');
include('admin_checklogin.php');
# PHPGACL CODE
$status = "";
include('phpgacl_code.php'); #load the GACL_API
####################################################
#Load Smarty Template
include('admin_smarty.php');
if($_POST['permname'] and $_POST['permdesc']) {
#Add the user now.
$status .= scire_add_permission($_POST['permname'], $_POST['permdesc'],$_SESSION['userid']);
if(!$status) {$status = "User added to DB successfully.";}
$obj_id = $gacl_api->add_object("perms", $_POST['permname'], $_POST['permname'], 1, 0, 'ACO');
print "Object id: $obj_id <BR>";
}
###################################################
$smarty->display('admin/add_permission.tpl');
$smarty->display('leftbar.tpl');
?>
|