예제 #1
0
<?php
	session_start();
	if(!isset($_SESSION["uid"])){echo "document.location.href='logoff.php'";die();}
	include_once('ressources/class.users.menus.inc');
	include_once('ressources/class.mysql.inc');
	if(isset($_GET["debug-page"])){ini_set('display_errors', 1);ini_set('error_reporting', E_ALL);$GLOBALS["VERBOSE"]=true;}
	$users=new usersMenus();
	if(!$users->AsSambaAdministrator){die("<H1>EXIT</H1>");}
	
	if(isset($_GET["js-inline"])){js_inline();exit;}
	if(isset($_GET["popup"])){popup();exit;}
	if(isset($_GET["browse-samba-list"])){virtual_servers_list();exit;}
	if(isset($_POST["delete-hostname"])){virtual_servers_delete();exit;}
	if(isset($_POST["EnableSambaVirtualsServers"])){EnableSambaVirtualsServersSave();exit;}
	if(isset($_GET["params"])){enable_feature();exit;}
	
	
function js_inline(){
	$page=CurrentPageName();
	echo "$('#BodyContent').load('$page?popup=yes');";	
}
function EnableSambaVirtualsServersSave(){
	$sock=new sockets();
	$sock->SET_INFO("EnableSambaVirtualsServers", $_POST["EnableSambaVirtualsServers"]);
	$sock->getFrameWork('cmd.php?samba-save-config=yes');
	
}

function enable_feature(){
	$page=CurrentPageName();
	$tpl=new templates();
예제 #2
0
    exit;
}
if (isset($_GET["browse-samba-list"])) {
    virtual_servers_list();
    exit;
}
if (isset($_POST["delete-hostname"])) {
    virtual_servers_delete();
    exit;
}
if (isset($_POST["EnableSambaVirtualsServers"])) {
    EnableSambaVirtualsServersSave();
    exit;
}
if (isset($_GET["params"])) {
    enable_feature();
    exit;
}
function js_inline()
{
    $page = CurrentPageName();
    echo "\$('#BodyContent').load('{$page}?popup=yes');";
}
function EnableSambaVirtualsServersSave()
{
    $sock = new sockets();
    $sock->SET_INFO("EnableSambaVirtualsServers", $_POST["EnableSambaVirtualsServers"]);
    $sock->getFrameWork('cmd.php?samba-save-config=yes');
}
function enable_feature()
{