adding updated code
This commit is contained in:
50
sys0-code/app/permission_functions.php
Normal file
50
sys0-code/app/permission_functions.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
function get_perm_string(){
|
||||
$perm_str="";
|
||||
if(isset($_POST["print"]))
|
||||
$perm_str.="1";
|
||||
else
|
||||
$perm_str.="0";
|
||||
if(isset($_POST["private_cloud"]))
|
||||
$perm_str.="1";
|
||||
else
|
||||
$perm_str.="0";
|
||||
if(isset($_POST["public_cloud"]))
|
||||
$perm_str.="1";
|
||||
else
|
||||
$perm_str.="0";
|
||||
if(isset($_POST["printer_ctrl_all"]))
|
||||
$perm_str.="1";
|
||||
else
|
||||
$perm_str.="0";
|
||||
if(isset($_POST["change_user_perm"]))
|
||||
$perm_str.="1";
|
||||
else
|
||||
$perm_str.="0";
|
||||
if(isset($_POST["create_admin"]))
|
||||
$perm_str.="1";
|
||||
else
|
||||
$perm_str.="0";
|
||||
if(isset($_POST["view_log"]))
|
||||
$perm_str.="1";
|
||||
else
|
||||
$perm_str.="0";
|
||||
if(isset($_POST["view_apikey"]))
|
||||
$perm_str.="1";
|
||||
else
|
||||
$perm_str.="0";
|
||||
if(isset($_POST["create_key"]))
|
||||
$perm_str.="1";
|
||||
else
|
||||
$perm_str.="0";
|
||||
if(isset($_POST["debug"]))
|
||||
$perm_str.="1";
|
||||
else
|
||||
$perm_str.="0";
|
||||
if(isset($_POST["delete_from_public_cloud"]))
|
||||
$perm_str.="1";
|
||||
else
|
||||
$perm_str.="0";
|
||||
return $perm_str;
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user