function popup()
{
    $tpl = new templates();
    if (is_file("ressources/logs/global.status.ini")) {
        $ini = new Bs_IniHandler("ressources/logs/global.status.ini");
    } else {
        writelogs("ressources/logs/global.status.ini no such file");
        $sock = new sockets();
        $datas = base64_decode($sock->getFrameWork('cmd.php?Global-Applications-Status=yes'));
        $ini = new Bs_IniHandler($datas);
    }
    $sock = new sockets();
    $datas = $sock->getFrameWork('cmd.php?refresh-status=yes');
    $array = array_postfix_status();
    while (list($num, $ligne) = each($array)) {
        $st = DAEMON_STATUS_LINE($ligne, $ini, null, 1);
        if ($st == null) {
            continue;
        }
        $status = $status . $st . "\n";
    }
    echo $tpl->_ENGINE_parse_body($status);
}
Example #2
0
function page_index_status()
{
    $tabs = main_tabs();
    $squid = new squid($_GET["hostname"]);
    $ini = new Bs_IniHandler();
    $sock = new sockets();
    $ini->loadString(base64_decode($sock->getFrameWork('cmd.php?squid-ini-status=yes')));
    $tpl = new templates();
    //echo "<H1>ouou</H1>";
    $squid_status = DAEMON_STATUS_ROUND("SQUID", $ini, null, 1);
    $dansguardian_status = DAEMON_STATUS_LINE("DANSGUARDIAN", $ini, null, 1);
    $kav = DAEMON_STATUS_LINE("KAV4PROXY", $ini, null, 1);
    $cicap = DAEMON_STATUS_LINE("C-ICAP", $ini, null, 1);
    $proxy_pac = DAEMON_STATUS_LINE("APP_PROXY_PAC", $ini, null, 1);
    $md = md5(date('Ymhis'));
    $squid = new squidbee();
    if (count($squid->network_array) == 0) {
        $net = Paragraphe("warning64.png", "{no_squid_network}", "{no_squid_network_text}", "javascript:Loadjs('squid.popups.php?script=network')", null, 350);
        echo $tpl->_ENGINE_parse_body($net);
        return;
    }
    if ($dansguardian_status != null) {
        $dansguardian_status = "<tr><td valign='top'>{$dansguardian_status}</td></tr>";
    }
    if ($kav != null) {
        $kav = "<tr><td valign='top'>{$kav}</td></tr>";
    }
    if ($cicap != null) {
        $cicap = "<tr><td valign='top'>{$cicap}</td></tr>";
    }
    if ($proxy_pac != null) {
        $proxy_pac = "<tr><td valign='top'>{$proxy_pac}</td></tr>";
    }
    $html = "\n\t<table style='width=99%'>'\n\t<tr>\n\t<td valign='top'><img src='img/crion-128.png'></td>\n\t<td valign='top'>\n\t<table style='width:99%'>\n\t\t<tr><td valign='top'>{$squid_status}</td></tr>\n\t\t{$kav}\n\t\t{$cicap}\n\t\t{$dansguardian_status}\n\t\t{$proxy_pac}\n\t</table>\n\t</td>\n\t</tr>\n\t</table>\t\n\t";
    echo $tpl->_parse_body($html);
}
Example #3
0
function bar_status()
{
    $refresh = "<div style='width:100%;text-align:right'>" . imgtootltip("refresh-24.png", "{refresh}", "RefreshIndexPostfixAjax()") . "</div>";
    /*if(isset($_GET["mode"])){
    		if($_GET["mode"]==1){
    			echo 
    			"<input type='hidden' id='monitor_page_switch' value='0' name='monitor_page_switch'>
    			<img src='img/postfix2.jpg'>$refresh";
    			return false;
    		}
    		
    		
    	}*/
    $tpl = new templates();
    if (is_file("ressources/logs/global.status.ini")) {
        $ini = new Bs_IniHandler("ressources/logs/global.status.ini");
    } else {
        $sock = new sockets();
        $datas = base64_decode($sock->getFrameWork('cmd.php?Global-Applications-Status=yes'));
        $ini = new Bs_IniHandler($datas);
    }
    $sock = new sockets();
    $datas = $sock->getFrameWork('cmd.php?refresh-status=yes');
    $array[] = "POSTFIX";
    $array[] = "ASSP";
    $array[] = "AMAVISD";
    $array[] = "AMAVISD_MILTER";
    $array[] = "SPAMASSASSIN";
    $array[] = "SPAMASS_MILTER";
    $array[] = "MIMEDEFANG";
    $array[] = "MIMEDEFANGX";
    $array[] = "DKIM_FILTER";
    $array[] = "SPFMILTER";
    $array[] = "CLAMAV";
    $array[] = "FRESHCLAM";
    $array[] = "MAILSPY";
    $array[] = "KAVMILTER";
    $array[] = "KAS_MILTER";
    $array[] = "KAS3";
    $array[] = "MAILARCHIVER";
    $array[] = "BOGOM";
    $array[] = "MILTER_GREYLIST";
    $array[] = "POLICYD_WEIGHT";
    $array[] = "MAILMAN";
    $array[] = "APP_CYRUS_IMAP";
    $array[] = "MAILARCHIVER";
    $array[] = "APP_ZARAFA";
    $array[] = "APP_ZARAFA_SPOOLER";
    $array[] = "APP_ZARAFA_GATEWAY";
    $array[] = "APP_ZARAFA_MONITOR";
    $array[] = "APP_ZARAFA_DAGENT";
    $array[] = "APP_ZARAFA_ICAL";
    $status = "<input type='hidden' id='monitor_page_switch' value='1' name='monitor_page_switch'>";
    while (list($num, $ligne) = each($array)) {
        $st = DAEMON_STATUS_LINE($ligne, $ini, null, 1);
        if ($st == null) {
            continue;
        }
        $status = $status . $st . "\n";
    }
    return $tpl->_ENGINE_parse_body($status . $refresh);
}
Example #4
0
function bar_status(){
	
	$refresh="<div style='width:100%;text-align:right'>". imgtootltip("refresh-24.png","{refresh}","RefreshIndexPostfixAjax()")."</div>";
	$tpl=new templates();
	if(is_file("ressources/logs/global.status.ini")){
		
		$ini=new Bs_IniHandler("ressources/logs/global.status.ini");
	}else{
		writelogs("ressources/logs/global.status.ini no such file");
		$sock=new sockets();
		$datas=base64_decode($sock->getFrameWork('cmd.php?Global-Applications-Status=yes'));
		$ini=new Bs_IniHandler($datas);
	}
	
	$sock=new sockets();
	$datas=$sock->getFrameWork('cmd.php?refresh-status=yes');
	
	$array[]="POSTFIX";
	$array[]="APP_POSTFWD2:master";
	$array[]="FETCHMAIL";
	$array[]="ASSP";
	$array[]="AMAVISD";
	$array[]="AMAVISD_MILTER";
	$array[]="SPAMASSASSIN";
	$array[]="SPAMASS_MILTER";
	$array[]="DNSMASQ";
	$array[]="APP_CLUEBRINGER";
	$array[]="MIMEDEFANG";
	$array[]="MIMEDEFANGX";
	$array[]="DKIM_FILTER";
	$array[]="SPFMILTER";
	$array[]="CLAMAV";
	$array[]="FRESHCLAM";
	$array[]="MAILSPY";	
	$array[]="KAVMILTER";
	$array[]="KAS_MILTER";
	$array[]="KAS3";
	$array[]="MAILARCHIVER";
	$array[]="BOGOM";
	$array[]="MILTER_GREYLIST";
	$array[]="POLICYD_WEIGHT";
	$array[]="MAILMAN";
	$array[]="APP_CYRUS_IMAP";	
	$array[]="MAILARCHIVER";
	$array[]="APP_OPENDKIM";
	$array[]="APP_MILTER_DKIM";
	$array[]="APP_ARTICA_POLICY";
	
	
	$array[]="APP_ZARAFA";
	$array[]="APP_ZARAFA_SPOOLER";
	$array[]="APP_ZARAFA_GATEWAY";
	$array[]="APP_ZARAFA_MONITOR";
	$array[]="APP_ZARAFA_DAGENT";
	$array[]="APP_ZARAFA_ICAL";
	$array[]="APP_ZARAFA_LICENSED";
	

	
	$status="<input type='hidden' id='monitor_page_switch' value='1' name='monitor_page_switch'>";
	while (list ($num, $ligne) = each ($array) ){
		$st=DAEMON_STATUS_LINE($ligne,$ini,null,1);
		if($st==null){continue;}
		$status=$status .$st."\n";
	}
	
	
	$main=new maincf_multi("master","master");
	$freeze_delivery_queue=$main->GET('freeze_delivery_queue');
	if($freeze_delivery_queue==1){
		$warn1="<center>
		<table style='width:80%' class=form>
		<tr>
		<td width=1%><img src='img/warn-red-48.png'></td>
		<td><strong style='font-size:14px;color:#C52626'>{WARN_QUEUE_FREEZE}</strong></td>
		</tr>
		</table></center>";
	}
	
	
	
	return  $tpl->_ENGINE_parse_body($status.$refresh.$warn1);
	
}