Esempio n. 1
0
    exit;
}
if (isset($_GET["status_right_image"])) {
    status_right_image();
    exit;
}
if (isset($_GET["warnings"])) {
    warnings_js();
    exit;
}
if (isset($_GET["warnings-popup"])) {
    warnings_popup();
    exit;
}
if (isset($_GET["main_admin_tabs"])) {
    echo main_admin_tabs();
    exit;
}
if (isset($_GET["json-error-js"])) {
    json_error_js();
    exit;
}
if (isset($_GET["json-error-popup"])) {
    json_error_popup();
    exit;
}
if (isset($_GET["StartStopService-js"])) {
    StartStopService_js();
    exit;
}
if (isset($_GET["StartStopService-popup"])) {
Esempio n. 2
0
function page($usersmenus)
{
    if (GET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__)) {
        return null;
    }
    $page = CurrentPageName();
    $ldap = new clladp();
    error_log(basename(__FILE__) . " " . __FUNCTION__ . '() line ' . __LINE__);
    $hash = $ldap->UserDatas($_SESSION["uid"]);
    error_log(basename(__FILE__) . " " . __FUNCTION__ . '() line ' . __LINE__);
    if ($hash["displayName"] == null) {
        $hash["displayName"] = "{Administrator}";
    }
    $sock = new sockets();
    $ou = $hash["ou"];
    $users = new usersMenus();
    error_log(basename(__FILE__) . " " . __FUNCTION__ . '() line ' . __LINE__);
    if ($users->KASPERSKY_SMTP_APPLIANCE) {
        if ($sock->GET_INFO("KasperskyMailApplianceWizardFinish") != 1) {
            $wizard_kaspersky_mail_appliance = "Loadjs('wizard.kaspersky.appliance.php');";
        }
    }
    $html = "\t\n<script language=\"JavaScript\">       \nvar timerID  = null;\nvar timerID1  = null;\nvar tant=0;\nvar fire=0;\nvar loop=0;\nvar loop2=0;\nvar reste=0;\nvar mem_ossys=0;\n\nfunction Loop(){\n\tloop = loop+1;\n\tloop2 = loop2+1;\n\t\n\tif(loop2>10){\n\t\t\n\t\tif(!IfWindowsOpen()){\n\t\t\tif(RunJgrowlCheck()){\n\t\t\t\tLoadjs('jGrowl.php');\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tloop2=0;\n\t}\n\t\n\t\n    fire=10-fire;\n    if(loop<25){\n    \tsetTimeout(\"Loop()\",5000);\n    }else{\n      loop=0;\n      if(!IfWindowsOpen()){Demarre();}\n      Loop();\n    }\n}\n\n\tfunction RunJgrowlCheck(){\n\t\tif(\$('#jGrowl').size()==0){return true;}\n\t\tif(\$('#jGrowl').size()==1){return true;}\n\t\talert('jgrow=false');\n\t\treturn false;\n\t\n\t}\n\n\t\n\n\t\n\tfunction Demarre(){\n\t\tsetTimeout(\"ResfreshGraphs()\",800);\n\t\t\t\n\t\t}\n\t\t\n\tfunction ResfreshGraphs(){\n\t\tRefreshTab('admin_perso_tabs');\t\n\t}\n\tfunction RefreshStatusRight(){\n\t\tloop=0;\n\t\tLoadjs('{$page}?js-right=yes');\n\t}\n\n\n\tfunction RefreshStatusLeft(){\n\t\t\tLoadjs('{$page}?js-left=yes');\n\t\t}\n\t\t\n\tfunction sysevents_query(){\n\t\tif(document.getElementById('q_daemons')){\n\t\t\tvar q_daemons=document.getElementById('q_daemons').value;\n\t\t\tvar q_lines=document.getElementById('q_lines').value;\n\t\t\tvar q_search=document.getElementById('q_search').value;\n\t\t\tLoadAjax('events','{$page}?main=logs&q_daemons='+ q_daemons +'&q_lines=' + q_lines + '&q_search='+q_search+'&hostname={$_GET["hostname"]}');\n\t\t\t}\n\t\n\t}\n\t\n\tfunction LoadCadencee(){\n\t\t\n\t\tLoadjs('jGrowl.php');\t\n\t\tsetTimeout(\"Demarre()\",1500);\n\t\tsetTimeout(\"Loop()\",2000);\n\t\t\n\t\t\n\t}\n\n\n\tvar x_{$idmd}ChargeLogs= function (obj) {\n\t\tvar tempvalue=obj.responseText;\n\t\tdocument.getElementById('progression_js_left').innerHTML=tempvalue;\n\t\t}\t\t\n\t\nfunction LoadMemDump(){\n\t\tYahooWin(500,'{$page}?mem-dump=yes');\n\t}\n\n\n\nfunction CheckDaemon(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('CheckDaemon','yes');\n\tXHR.sendAndLoad('{$page}', 'GET');\n\t}\t\n\n\n</script>\t\n\t" . main_admin_tabs() . "\n\t\n\t<script>\n\t\n\t\tLoadCadencee();\n\t\tRTMMailHide();\n\t\t{$wizard_kaspersky_mail_appliance}\n\t\t\n\t</script>\n\t{$arr[0]}\n\t";
    $cfg["JS"][] = $arr[1];
    $cfg["JS"][] = "js/admin.js";
    if (isset($_GET["admin-ajax"])) {
        $tpl = new templates();
        echo $tpl->_ENGINE_parse_body($html);
        exit;
    }
    error_log(basename(__FILE__) . " " . __FUNCTION__ . '() line ' . __LINE__);
    $tpl = new templates();
    error_log(basename(__FILE__) . " " . __FUNCTION__ . '() line ' . __LINE__);
    $title = $tpl->_ENGINE_parse_body("<span style='text-transform:lowercase;font-size:12px'>[{$usersmenus->hostname}]</span>&nbsp;{WELCOME} <span style='font-size:12px'>{$hash["displayName"]} </span>");
    if ($users->KASPERSKY_SMTP_APPLIANCE) {
        $title = $tpl->_ENGINE_parse_body("<span style='color:#005447'>{WELCOME}</span> <span style='font-size:13px;color:#005447'>For Kaspersky SMTP Appliance</span>&nbsp;|&nbsp;<span style='font-size:12px'>{$hash["displayName"]} - <span style='text-transform:lowercase'>{$usersmenus->hostname}</span></span>");
    }
    if ($users->KASPERSKY_WEB_APPLIANCE) {
        $title = $tpl->_ENGINE_parse_body("<span style='color:#005447'>{WELCOME}</span> <span style='font-size:13px;color:#005447'>For Kaspersky Web Appliance</span>&nbsp;|&nbsp;<span style='font-size:12px'>{$hash["displayName"]} - <span style='text-transform:lowercase'>{$usersmenus->hostname}</span></span>");
    }
    if ($users->ZARAFA_APPLIANCE) {
        $title = $tpl->_ENGINE_parse_body("<span style='color:#005447'>{WELCOME}</span> <span style='font-size:13px;color:#005447'>For Zarafa Mail Appliance</span>&nbsp;|&nbsp;<span style='font-size:12px'>{$hash["displayName"]} - <span style='text-transform:lowercase'>{$usersmenus->hostname}</span></span>");
    }
    $tpl = new template_users($title, $html, $_SESSION, 0, 0, 0, $cfg);
    error_log(basename(__FILE__) . " " . __FUNCTION__ . '() line ' . __LINE__);
    $html = $tpl->web_page;
    SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $html);
    echo $html;
    error_log(basename(__FILE__) . " " . __FUNCTION__ . '() line ' . __LINE__);
}
Esempio n. 3
0
function page($usersmenus)
{
    $left_menus = null;
    if (isset($_GET["admin-ajax"])) {
        echo "<script>LoadAjax('middle','quicklinks.php');</script>";
        return;
    } else {
        if (GET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__)) {
            return null;
        }
    }
    $ldap = new clladp();
    $page = CurrentPageName();
    error_log(basename(__FILE__) . " " . __FUNCTION__ . '() line ' . __LINE__);
    $hash = $ldap->UserDatas($_SESSION["uid"]);
    error_log(basename(__FILE__) . " " . __FUNCTION__ . '() line ' . __LINE__);
    if ($hash["displayName"] == null) {
        $hash["displayName"] = "{Administrator}";
    }
    $sock = new sockets();
    $ou = $hash["ou"];
    $users = new usersMenus();
    error_log(basename(__FILE__) . " " . __FUNCTION__ . '() line ' . __LINE__);
    if (isset($_COOKIE["artica-template"])) {
        if (is_file("ressources/templates/{$_COOKIE["artica-template"]}/JQUERY_UI")) {
            $GLOBALS["JQUERY_UI"] = trim(@file_get_contents("ressources/templates/{$_COOKIE["artica-template"]}/JQUERY_UI"));
        }
    }
    if ($users->KASPERSKY_SMTP_APPLIANCE) {
        if ($sock->GET_INFO("KasperskyMailApplianceWizardFinish") != 1) {
            $wizard_kaspersky_mail_appliance = "Loadjs('wizard.kaspersky.appliance.php');";
        }
    }
    if ($users->KASPERSKY_WEB_APPLIANCE) {
        //$GLOBALS["CHANGE_TEMPLATE"]="squid.kav.html";
        //$GLOBALS["JQUERY_UI"]="kavweb";
    }
    if (isset($_GET["admin-ajax"])) {
        $left_menus = "LoadAjax('TEMPLATE_LEFT_MENUS','/admin.tabs.php?left-menus=yes');";
    }
    $html = "\n<script>\n\tLoadAjax('middle','quicklinks.php');\n\tChangeHTMLTitle();\n</script>\n\n\n";
    $tpl = new template_users($title, $html, $_SESSION, 0, 0, 0, $cfg);
    error_log(basename(__FILE__) . " " . __FUNCTION__ . '() line ' . __LINE__);
    $html = $tpl->web_page;
    SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $html);
    echo $html;
    return;
    $html = "\t\n<script language=\"JavaScript\">       \nvar timerID  = null;\nvar timerID1  = null;\nvar tant=0;\nvar fire=0;\nvar loop=0;\nvar loop2=0;\nvar reste=0;\nvar mem_ossys=0;\n\nfunction Loop(){\n\tloop = loop+1;\n\tloop2 = loop2+1;\n\t\n\tif(loop2>10){\n\t\tif(!IfWindowsOpen()){if(RunJgrowlCheck()){Loadjs('jGrowl.php');}}\n\t\tloop2=0;\n\t}\n\t\n\t\n    fire=10-fire;\n    if(loop<25){\n    \tsetTimeout(\"Loop()\",5000);\n    }else{\n      loop=0;\n      Loop();\n    }\n}\n\n\tfunction RunJgrowlCheck(){\n\t\tif(!document.getElementById('navigation')){return false;}\n\t\tif(\$('#jGrowl').size()==0){return true;}\n\t\tif(\$('#jGrowl').size()==1){return true;}\n\t\treturn false;\n\t\n\t}\n\n\tfunction sysevents_query(){\n\t\tif(document.getElementById('q_daemons')){\n\t\t\tvar q_daemons=document.getElementById('q_daemons').value;\n\t\t\tvar q_lines=document.getElementById('q_lines').value;\n\t\t\tvar q_search=document.getElementById('q_search').value;\n\t\t\tLoadAjax('events','{$page}?main=logs&q_daemons='+ q_daemons +'&q_lines=' + q_lines + '&q_search='+q_search+'&hostname={$_GET["hostname"]}');\n\t\t\t}\n\t\n\t}\n\t\n\tfunction LoadCadencee(){\t\t\n\t\tLoadjs('jGrowl.php');\t\n\t\tsetTimeout(\"Loop()\",2000);\n\t}\n\n\n\tvar x_{$idmd}ChargeLogs= function (obj) {\n\t\tvar tempvalue=obj.responseText;\n\t\tdocument.getElementById('progression_js_left').innerHTML=tempvalue;\n\t\t}\t\t\n\t\nfunction LoadMemDump(){\n\t\tYahooWin(500,'{$page}?mem-dump=yes');\n\t}\n\n\n\nfunction CheckDaemon(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('CheckDaemon','yes');\n\tXHR.sendAndLoad('{$page}', 'GET');\n\t}\t\n\n\n</script>\t\n\t" . main_admin_tabs() . "\n\t\n\t<script>\n\t\n\t\tLoadCadencee();\n\t\tRTMMailHide();\n\t\t{$wizard_kaspersky_mail_appliance}\n\t\t{$left_menus}\n\t</script>\n\t{$arr[0]}\n\t";
    $cfg["JS"][] = $arr[1];
    $cfg["JS"][] = "js/admin.js";
    if (isset($_GET["admin-ajax"])) {
        $tpl = new templates();
        $html = $tpl->_ENGINE_parse_body($html);
        SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__ . "-admin-ajax", $html);
        echo $html;
        exit;
    }
    error_log(basename(__FILE__) . " " . __FUNCTION__ . '() line ' . __LINE__);
    $tpl = new templates();
    error_log(basename(__FILE__) . " " . __FUNCTION__ . '() line ' . __LINE__);
    $title = $tpl->_ENGINE_parse_body("<a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('admin.chHostname.php');\" style='text-transform:lowercase;font-size:12px' >[<span id='hostnameInFront'>{$usersmenus->hostname}</span>]</a>&nbsp;{WELCOME} <span style='font-size:12px'>{$hash["displayName"]} </span>");
    error_log(basename(__FILE__) . " " . __FUNCTION__ . '() line ' . __LINE__);
    if ($users->KASPERSKY_SMTP_APPLIANCE) {
        $title = $tpl->_ENGINE_parse_body("<span style='color:#005447'>{WELCOME}</span> <span style='font-size:13px;color:#005447'>For Kaspersky SMTP Appliance</span>&nbsp;|&nbsp;<span style='font-size:12px'>{$hash["displayName"]} - <span style='text-transform:lowercase'>{$usersmenus->hostname}</span></span>");
    }
    if ($users->KASPERSKY_WEB_APPLIANCE) {
        $title = $tpl->_ENGINE_parse_body("<span style='color:black'>{WELCOME}</span> <span style='font-size:13px;color:black'>For Kaspersky Web Appliance</span>&nbsp;|&nbsp;<span style='font-size:12px'>{$hash["displayName"]} - <span style='text-transform:lowercase'>{$usersmenus->hostname}</span></span>");
    }
    error_log(basename(__FILE__) . " " . __FUNCTION__ . '() line ' . __LINE__);
    if ($users->ZARAFA_APPLIANCE) {
        $title = $tpl->_ENGINE_parse_body("<span style='color:#005447'>{WELCOME}</span> <span style='font-size:13px;color:#005447'>For Zarafa Mail Appliance</span>&nbsp;|&nbsp;<span style='font-size:12px'>{$hash["displayName"]} - <span style='text-transform:lowercase'>{$usersmenus->hostname}</span></span>");
    }
    error_log(basename(__FILE__) . " " . __FUNCTION__ . '() line ' . __LINE__);
    $tpl = new template_users($title, $html, $_SESSION, 0, 0, 0, $cfg);
    error_log(basename(__FILE__) . " " . __FUNCTION__ . '() line ' . __LINE__);
    $html = $tpl->web_page;
    SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $html);
    echo $html;
    if ($GLOBALS["VERBOSE"]) {
        echo "<H1>Finish</H1>";
    }
    error_log(basename(__FILE__) . " " . __FUNCTION__ . '() line ' . __LINE__);
}
Esempio n. 4
0
function page($usersmenus){
if(GET_CACHED(__FILE__,__FUNCTION__,__FUNCTION__)){return null;}
$ldap=new clladp();
$page=CurrentPageName();
error_log(basename(__FILE__)." ".__FUNCTION__.'() line '. __LINE__);
$hash=$ldap->UserDatas($_SESSION["uid"]);
error_log(basename(__FILE__)." ".__FUNCTION__.'() line '. __LINE__);
if($hash["displayName"]==null){$hash["displayName"]="{Administrator}";}
$sock=new sockets();
$ou=$hash["ou"];
$users=new usersMenus();
error_log(basename(__FILE__)." ".__FUNCTION__.'() line '. __LINE__);
if($users->KASPERSKY_SMTP_APPLIANCE){
	if($sock->GET_INFO("KasperskyMailApplianceWizardFinish")<>1){
		$wizard_kaspersky_mail_appliance="Loadjs('wizard.kaspersky.appliance.php');";
	}
}

	if($users->KASPERSKY_WEB_APPLIANCE){
		$GLOBALS["CHANGE_TEMPLATE"]="squid.kav.html";
		$GLOBALS["JQUERY_UI"]="kavweb";
	}





$html="	
<script language=\"JavaScript\">       
var timerID  = null;
var timerID1  = null;
var tant=0;
var fire=0;
var loop=0;
var loop2=0;
var reste=0;
var mem_ossys=0;

function Loop(){
	loop = loop+1;
	loop2 = loop2+1;
	
	if(loop2>10){
		if(!IfWindowsOpen()){if(RunJgrowlCheck()){Loadjs('jGrowl.php');}}
		loop2=0;
	}
	
	
    fire=10-fire;
    if(loop<25){
    	setTimeout(\"Loop()\",5000);
    }else{
      loop=0;
      Loop();
    }
}

	function RunJgrowlCheck(){
		if(!document.getElementById('navigation')){return false;}
		if($('#jGrowl').size()==0){return true;}
		if($('#jGrowl').size()==1){return true;}
		return false;
	
	}

	function sysevents_query(){
		if(document.getElementById('q_daemons')){
			var q_daemons=document.getElementById('q_daemons').value;
			var q_lines=document.getElementById('q_lines').value;
			var q_search=document.getElementById('q_search').value;
			LoadAjax('events','$page?main=logs&q_daemons='+ q_daemons +'&q_lines=' + q_lines + '&q_search='+q_search+'&hostname={$_GET["hostname"]}');
			}
	
	}
	
	function LoadCadencee(){		
		Loadjs('jGrowl.php');	
		setTimeout(\"Loop()\",2000);
	}


	var x_{$idmd}ChargeLogs= function (obj) {
		var tempvalue=obj.responseText;
		document.getElementById('progression_js_left').innerHTML=tempvalue;
		}		
	
function LoadMemDump(){
		YahooWin(500,'$page?mem-dump=yes');
	}



function CheckDaemon(){
	var XHR = new XHRConnection();
	XHR.appendData('CheckDaemon','yes');
	XHR.sendAndLoad('$page', 'GET');
	}	


</script>	
	".main_admin_tabs()."
	
	<script>
	
		LoadCadencee();
		RTMMailHide();
		$wizard_kaspersky_mail_appliance
		
	</script>
	{$arr[0]}
	";

$cfg["JS"][]=$arr[1];
$cfg["JS"][]="js/admin.js";

if(isset($_GET["admin-ajax"])){
	$tpl=new templates();
	echo $tpl->_ENGINE_parse_body($html);
	exit;
}
error_log(basename(__FILE__)." ".__FUNCTION__.'() line '. __LINE__);
$tpl=new templates();
error_log(basename(__FILE__)." ".__FUNCTION__.'() line '. __LINE__);
$title=$tpl->_ENGINE_parse_body("<a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('admin.chHostname.php');\" style='text-transform:lowercase;font-size:12px' >[<span id='hostnameInFront'>$usersmenus->hostname</span>]</a>&nbsp;{WELCOME} <span style='font-size:12px'>{$hash["displayName"]} </span>");

error_log(basename(__FILE__)." ".__FUNCTION__.'() line '. __LINE__);
if($users->KASPERSKY_SMTP_APPLIANCE){
	$title=$tpl->_ENGINE_parse_body("<span style='color:#005447'>{WELCOME}</span> <span style='font-size:13px;color:#005447'>For Kaspersky SMTP Appliance</span>&nbsp;|&nbsp;<span style='font-size:12px'>{$hash["displayName"]} - <span style='text-transform:lowercase'>$usersmenus->hostname</span></span>");
}
if($users->KASPERSKY_WEB_APPLIANCE){
	$title=$tpl->_ENGINE_parse_body("<span style='color:black'>{WELCOME}</span> <span style='font-size:13px;color:black'>For Kaspersky Web Appliance</span>&nbsp;|&nbsp;<span style='font-size:12px'>{$hash["displayName"]} - <span style='text-transform:lowercase'>$usersmenus->hostname</span></span>");
}
error_log(basename(__FILE__)." ".__FUNCTION__.'() line '. __LINE__);
if($users->ZARAFA_APPLIANCE){
	$title=$tpl->_ENGINE_parse_body("<span style='color:#005447'>{WELCOME}</span> <span style='font-size:13px;color:#005447'>For Zarafa Mail Appliance</span>&nbsp;|&nbsp;<span style='font-size:12px'>{$hash["displayName"]} - <span style='text-transform:lowercase'>$usersmenus->hostname</span></span>");
	
}

error_log(basename(__FILE__)." ".__FUNCTION__.'() line '. __LINE__);
$tpl=new template_users($title,$html,$_SESSION,0,0,0,$cfg);
error_log(basename(__FILE__)." ".__FUNCTION__.'() line '. __LINE__);
$html=$tpl->web_page;
SET_CACHED(__FILE__,__FUNCTION__,__FUNCTION__,$html);
echo $html;			
error_log(basename(__FILE__)." ".__FUNCTION__.'() line '. __LINE__);	
	
}