function status_right_image2() { include_once dirname(__FILE__) . "/ressources/logs.inc"; include_once dirname(__FILE__) . "/ressources/class.templates.inc"; include_once dirname(__FILE__) . "/ressources/class.html.pages.inc"; include_once dirname(__FILE__) . "/ressources/class.cyrus.inc"; include_once dirname(__FILE__) . "/ressources/class.main_cf.inc"; include_once dirname(__FILE__) . "/ressources/charts.php"; include_once dirname(__FILE__) . "/ressources/class.syslogs.inc"; include_once dirname(__FILE__) . "/ressources/class.system.network.inc"; include_once dirname(__FILE__) . "/ressources/class.os.system.inc"; $page = CurrentPageName(); $users = new usersMenus(); $tpl = new templates(); $users = new usersMenus(); $NOCACHE = true; $newfrontend = false; $sock = new sockets(); $SambaEnabled = $sock->GET_INFO("SambaEnabled"); if (!is_numeric($SambaEnabled)) { $SambaEnabled = 1; } if ($SambaEnabled == 0) { $users->SAMBA_INSTALLED = false; } $DisableMessaging = intval($sock->GET_INFO("DisableMessaging")); $EnableNginx = intval($sock->GET_INFO("EnableNginx")); $AsCategoriesAppliance = intval($sock->GET_INFO("AsCategoriesAppliance")); $status = new status(); if ($GLOBALS["VERBOSE"]) { echo " DisableMessaging = {$DisableMessaging}\n"; } if ($DisableMessaging == 1) { $users->POSTFIX_INSTALLED = false; $users->ZARAFA_INSTALLED = false; } if ($AsCategoriesAppliance == 1) { return $tpl->_ENGINE_parse_body($status->CATEGORIES_APPLIANCE()); } $SQUIDEnable = trim($sock->GET_INFO("SQUIDEnable")); if (!is_numeric($SQUIDEnable)) { $SQUIDEnable = 1; } if ($SQUIDEnable == 0) { $users->SQUID_INSTALLED = false; } $NOCACHE = false; if ($GLOBALS["VERBOSE"]) { echo " -> Loading status()\n"; } if ($GLOBALS["VERBOSE"]) { echo " -> Checking\n"; } if ($users->WEBSTATS_APPLIANCE) { if ($GLOBALS["VERBOSE"]) { echo " -> WEBSTATS()\n"; } return $tpl->_ENGINE_parse_body($status->WEBSTATS()); } if ($users->ZARAFA_APPLIANCE) { if ($GLOBALS["VERBOSE"]) { echo " -> ZARAFA()\n"; } return $tpl->_ENGINE_parse_body($status->ZARAFA()); } if ($users->HAPRROXY_APPLIANCE) { if ($GLOBALS["VERBOSE"]) { echo " -> haproxy_status()\n"; } return $tpl->_ENGINE_parse_body($status->haproxy_status()); } if ($users->LOAD_BALANCE_APPLIANCE) { if ($GLOBALS["VERBOSE"]) { echo " -> xr_status()\n"; } return $tpl->_ENGINE_parse_body($status->xr_status()); } if ($users->POSTFIX_INSTALLED) { if ($GLOBALS["VERBOSE"]) { echo " -> status_postfix()\n"; } return status_postfix(); } if ($users->SQUID_INSTALLED) { if ($users->KASPERSKY_WEB_APPLIANCE) { if ($GLOBALS["VERBOSE"]) { echo " -> KASPERSKY_WEB_APPLIANCE()\n"; } return status_kav4proxy($NOCACHE); } if ($users->KASPERSKY_WEB_APPLIANCE) { return status_squid_kav($NOCACHE); } if ($GLOBALS["VERBOSE"]) { echo " -> status_squid()\n"; } return status_squid($NOCACHE); } else { if ($users->KASPERSKY_WEB_APPLIANCE) { if ($GLOBALS["VERBOSE"]) { echo " -> status_kav4proxy()\n"; } return status_kav4proxy($NOCACHE); } if ($users->KASPERSKY_WEB_APPLIANCE) { return status_squid_kav($NOCACHE); } } if ($users->NGINX_INSTALLED) { if ($GLOBALS["VERBOSE"]) { echo " -> StatusNginx()\n"; } if ($EnableNginx == 1) { return StatusNginx(); } } if ($users->SAMBA_INSTALLED) { if ($GLOBALS["VERBOSE"]) { echo " -> StatusSamba()\n"; } return StatusSamba(); } if ($users->APACHE_INSTALLED) { if ($GLOBALS["VERBOSE"]) { echo " -> StatusApache()\n"; } return StatusApache(); } }
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(); } }