Exemple #1
0
include_once 'ressources/class.system.network.inc';
include_once 'ressources/class.squid.reverse.inc';
include_once 'ressources/class.nginx.interface-tools.php';
$user = new usersMenus();
if ($user->AsSquidAdministrator == false) {
    $tpl = new templates();
    echo "<p class=text-error>" . $tpl->_ENGINE_parse_body("{ERROR_NO_PRIVS}") . "</p>";
    die;
    exit;
}
if (isset($_GET["unlink-websites-js"])) {
    unlink_js();
    exit;
}
if (isset($_POST["unlink-websites"])) {
    unlink_perform();
    exit;
}
if (isset($_GET["list"])) {
    list_items();
    exit;
}
table();
function unlink_js()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $servername = $_GET["servername"];
    header("content-type: application/x-javascript");
    $explain = $tpl->javascript_parse_text("{warnin_nginx_unlink_site}");
    $explain = str_replace("%s", $_GET["servername"], $explain);
include_once('ressources/class.system.network.inc');
include_once('ressources/class.system.nics.inc');


$users=new usersMenus();
if(!$users->AsWebStatisticsAdministrator){
	$tpl=new templates();
	echo FATAL_WARNING_SHOW_128("{ERROR_NO_PRIVS}");die();

}


if(isset($_GET["popup"])){page();exit;}
if(isset($_POST["link-policy"])){link_policy();exit;}
if(isset($_GET["unlink-js"])){unlink_path();exit;}
if(isset($_POST["unlink"])){unlink_perform();exit;}
if(isset($_POST["synchronize-group"])){synchronize_group();exit;}
if(isset($_GET["search"])){search();exit;}
if(isset($_GET["download"])){download();exit;}
tabs();

function tabs(){
	$sock=new sockets();
	$fontsize=16;
	$tpl=new templates();
	$page=CurrentPageName();
	$array["popup"]='{sources_files}';
	$array["parameters"]='{log_retention}';
	$array["schedule"]='{schedules}';