Example #1
0
include_once 'ressources/class.mysql.inc';
include_once 'ressources/class.openssh.inc';
include_once 'ressources/class.user.inc';
$user = new usersMenus();
if ($user->AsSystemAdministrator == false) {
    $tpl = new templates();
    echo "alert('" . $tpl->javascript_parse_text("{ERROR_NO_PRIVS}") . "');";
    die;
    exit;
}
if (isset($_GET["list"])) {
    list_items();
    exit;
}
if (isset($_GET["new-js"])) {
    new_js();
    exit;
}
if (isset($_GET["new-member"])) {
    new_member();
    exit;
}
if (isset($_POST["username"])) {
    new_members_save();
    exit;
}
if (isset($_GET["delete-js"])) {
    delete_js();
    exit;
}
if (isset($_POST["delete"])) {
Example #2
0
include_once('ressources/class.templates.inc');
include_once('ressources/class.ldap.inc');
include_once('ressources/class.system.network.inc');
include_once('ressources/class.mysql.inc');
include_once('ressources/class.openssh.inc');
include_once('ressources/class.user.inc');

$user=new usersMenus();
if($user->AsSystemAdministrator==false){
	$tpl=new templates();
	echo "alert('". $tpl->javascript_parse_text("{ERROR_NO_PRIVS}")."');";
	die();exit();
}

if(isset($_GET["list"])){list_items();exit;}
if(isset($_GET["new-js"])){new_js();exit;}
if(isset($_GET["new-member"])){new_member();exit;}
if(isset($_POST["username"])){new_members_save();exit;}
if(isset($_GET["delete-js"])){delete_js();exit;}
if(isset($_POST["delete"])){delete_member();exit;}

table();


function new_js(){
	header("content-type: application/x-javascript");
	$tpl=new templates();
	$page=CurrentPageName();
	$title=$tpl->javascript_parse_text("{new_member}");
	echo "YahooWin(800,'$page?new-member=yes','$title')";