Example #1
0
function POSTFIX_STATUS()
{
    $users = new usersMenus();
    $tpl = new templates();
    if ($users->POSTFIX_INSTALLED) {
        $status = new status();
        echo $tpl->_ENGINE_parse_body($status->Postfix_satus());
        exit;
    }
}
function status_postfix()
{
    $users = new usersMenus();
    $page = CurrentPageName();
    $tpl = new templates();
    $status = new status();
    $users = new usersMenus();
    $postfix = $status->Postfix_satus($users->ZARAFA_INSTALLED);
    return $tpl->_ENGINE_parse_body($postfix);
}
Example #3
0
function status_postfix()
{
    $tpl = new templates();
    if ($_GET["counter"] == null) {
        $_GET["counter"] = 1;
    }
    if ($_GET["counter"] == 1) {
        $newcounter = 0;
    } else {
        $newcounter = 1;
    }
    $counter = Field_hidden('counter', $newcounter);
    $memory = "<div id='mem_status_computer'>" . @file_get_contents("ressources/logs/status.memory.html") . "</div>";
    $postfix = @file_get_contents("ressources/logs/status.right.postfix.html");
    $status = new status();
    $postfix = $status->Postfix_satus();
    if ($_GET["counter"] == 1) {
        return $counter . $tpl->_ENGINE_parse_body($memory . $postfix . $switch);
    }
    if ($_GET["counter"] == 0) {
        return $counter . $tpl->_ENGINE_parse_body($memory . $postfix . $switch);
    }
}
Example #4
0
function POSTFIX_STATUS()
{
    $users = new usersMenus();
    $tpl = new templates();
    $script = "\n\t\t\n\t\t\t<script>\n\t\t\t\tPostfixStatusBar();\n\t\t\t\t\n\t\t\t\tfunction ApplyPostfixConfig(){\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\tvar X_ApplyPostfixConfig= function (obj) {\n\t\tvar results=trim(obj.responseText);\n\t\tif(results.length>0){alert(results);}\n\t\t \n\t\t}\n\t\t\n\n\n\t\tfunction ApplyPostfixConfig(){\n\t\t\t\tvar XHR = new XHRConnection();\n\t\t\t\tXHR.appendData('reconfigure-postfix','yes');\n\t\t\t\tXHR.sendAndLoad('{$page}', 'POST',X_ApplyPostfixConfig);\t\t\n\t\t\t\n\t\t}\t\t\t\t\n\t\t\t\t\n\t\t\t</script>";
    if ($users->POSTFIX_INSTALLED) {
        if (!is_file("ressources/logs/postfix.status.html")) {
            $status = new status();
            echo $tpl->_ENGINE_parse_body($status->Postfix_satus()) . "{$script}";
            exit;
        } else {
            echo $tpl->_ENGINE_parse_body(@file_get_contents("ressources/logs/postfix.status.html")) . $script;
            exit;
        }
    }
}
function BuildStatusRight()
{
    $pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
    $minutes = file_time_min($pidfile);
    if ($minutes < 10) {
        events("Stopping status, currently {$minutes}Mn need to wait 10Mn", __FUNCTION__, __FILE__, __LINE__);
        return;
    }
    if (!isset($GLOBALS["CLASS_USERS_MENUS"])) {
        $users = new usersMenus();
        $GLOBALS["CLASS_USERS_MENUS"] = $users;
    } else {
        $users = $GLOBALS["CLASS_USERS_MENUS"];
    }
    $sock = new sockets();
    $tpl = new templates();
    $status = new status();
    $DisableMessaging = intval($sock->GET_INFO("DisableMessaging"));
    if ($DisableMessaging == 1) {
        $users->POSTFIX_INSTALLED = false;
    }
    $AsCategoriesAppliance = intval($sock->GET_INFO("AsCategoriesAppliance"));
    if ($AsCategoriesAppliance == 1) {
        return $status->CATEGORIES_APPLIANCE();
    }
    $SAMBA_INSTALLED = 0;
    $SQUID_INSTALLED = 0;
    $POSTFIX_INSTALLED = 0;
    if ($users->POSTFIX_INSTALLED) {
        $POSTFIX_INSTALLED = 1;
    }
    if ($users->SQUID_INSTALLED) {
        $SQUID_INSTALLED = 1;
        $SQUID_INSTALLED = $sock->GET_INFO("SQUIDEnable");
        if ($SQUID_INSTALLED == null) {
            $SQUID_INSTALLED = 1;
        }
    }
    if ($users->SAMBA_INSTALLED) {
        $SAMBA_INSTALLED = 1;
        $SAMBA_INSTALLED = $sock->GET_INFO("SambaEnabled");
        if (!is_numeric($SAMBA_INSTALLED)) {
            $SAMBA_INSTALLED = 1;
        }
    }
    events("POSTFIX_INSTALLED={$POSTFIX_INSTALLED},SQUID_INSTALLED={$SQUID_INSTALLED},SAMBA_INSTALLED={$SAMBA_INSTALLED}");
    writelogs("POSTFIX_INSTALLED={$POSTFIX_INSTALLED},SQUID_INSTALLED={$SQUID_INSTALLED},SAMBA_INSTALLED={$SAMBA_INSTALLED}", __FUNCTION__, __FILE__, __LINE__);
    if ($SQUID_INSTALLED == 1) {
        $Squid_status = $status->Squid_status();
    }
    if ($POSTFIX_INSTALLED == 0) {
        if ($SQUID_INSTALLED == 1) {
            return $Squid_status;
        }
        if ($SAMBA_INSTALLED == 1) {
            return StatusSamba();
        }
    } else {
        return $status->Postfix_satus();
    }
}
Example #6
0
function POSTFIX_STATUS(){
	$users=new usersMenus();
	$tpl=new templates();
	$href="<a href=\"javascript:blur();\" OnClick=\"javascript:ApplyPostfixConfig();\" style='font-size:14px;font-weight:bold;text-decoration:underline'>";
	$apply=
	"<table style='width:100%;margin-top:-35px'>
	<tr>
	<td valign='top' width=1%>".imgtootltip("apply-config-44.gif","{apply_config}","ApplyPostfixConfig()")."</td>
	<td width=99%><div style='font-size:14px'>$href{apply_config}</a></div><i style='font-size:12px'>{apply_config_postfix}</i></td>
	</tr>
	</table>";
	
	$apply=$tpl->_ENGINE_parse_body($apply);
	
	$script="
		<div style='margin:8px'>$apply</div>
			<script>
				PostfixStatusBar();
				
				function ApplyPostfixConfig(){
				
				}
				
	var X_ApplyPostfixConfig= function (obj) {
		var results=trim(obj.responseText);
		if(results.length>0){alert(results);}
		 
		}
		


		function ApplyPostfixConfig(){
				var XHR = new XHRConnection();
				XHR.appendData('reconfigure-postfix','yes');
				XHR.sendAndLoad('$page', 'POST',X_ApplyPostfixConfig);		
			
		}				
				
			</script>";
	
	if($users->POSTFIX_INSTALLED){
			if(!is_file("ressources/logs/postfix.status.html")){
				$status=new status();
				echo $tpl->_ENGINE_parse_body($status->Postfix_satus())."$script";exit;
			}else{
				echo $tpl->_ENGINE_parse_body(@file_get_contents("ressources/logs/postfix.status.html")).$script;exit;
			}
	}	
}