include_once('ressources/class.templates.inc');
	include_once('ressources/class.ldap.inc');
	include_once('ressources/class.users.menus.inc');
	include_once('ressources/class.squid.inc');
	include_once('ressources/class.artica.graphs.inc');
	if(posix_getuid()==0){die();}
	
	$user=new usersMenus();
	if($user->AsSquidAdministrator==false){
		$tpl=new templates();
		echo "alert('". $tpl->javascript_parse_text("{ERROR_NO_PRIVS}")."');";
		die();exit();
	}
	
	if($_GET["tabs"]){tabs();exit;}
	if(isset($_GET["title-caches-perf"])){title_caches_perf();exit;}
	if($_GET["period"]=="howto"){howto();exit;}
	if($_GET["period"]=="today"){today();exit;}
	if($_GET["period"]=="week"){week();exit;}
	if($_GET["period"]=="month"){month();exit;}
	
	js();
	
function js(){
	$page=CurrentPageName();
	$tpl=new templates();
	if(isset($_GET["inline"])){echo "$('#BodyContent').load('$page?tabs=yes');";return;}
	$title=$tpl->_ENGINE_parse_body("{cache_performance}::{statistics}");	
	$html="YahooWin4('750','$page?tabs=yes','$title')";
	echo $html;
}
Esempio n. 2
0
if (posix_getuid() == 0) {
    die;
}
$user = new usersMenus();
if ($user->AsSquidAdministrator == false) {
    $tpl = new templates();
    echo "alert('" . $tpl->javascript_parse_text("{ERROR_NO_PRIVS}") . "');";
    die;
    exit;
}
if ($_GET["tabs"]) {
    tabs();
    exit;
}
if (isset($_GET["title-caches-perf"])) {
    title_caches_perf();
    exit;
}
if ($_GET["period"] == "howto") {
    howto();
    exit;
}
if ($_GET["period"] == "today") {
    today();
    exit;
}
if ($_GET["period"] == "week") {
    week();
    exit;
}
if ($_GET["period"] == "month") {