function lighttpd_status() { $ini = new Bs_IniHandler(); $sock = new sockets(); $tpl = new templates(); $page = CurrentPageName(); $ini->loadString(base64_decode($sock->getFrameWork('services.php?lighttpd-status=yes'))); $LIGHTTPD = DAEMON_STATUS_ROUND("LIGHTTPD", $ini, null, 1); $LIGHTTPD_PID = $ini->_params["LIGHTTPD"]["master_pid"]; $FRAMEWORK = DAEMON_STATUS_ROUND("FRAMEWORK", $ini, null, 1); $FRAMEWORK_PID = $ini->_params["FRAMEWORK"]["master_pid"]; $php_cgi_array = unserialize(base64_decode($sock->getFrameWork('services.php?php-cgi-array=yes'))); $LIGHTTPD_AR[] = "<table style='width:99%' class=form>"; while (list($pid, $array) = each($php_cgi_array[$LIGHTTPD_PID])) { $RSS = FormatBytes($array["RSS"]); $VM = FormatBytes($array["VM"]); $TTL = $array["TTL"]; $LIGHTTPD_AR[] = "<tr>\n\t\t<td><strong style='font-size:12px'>PID:{$pid}</strong></td>\n\t\t<td><strong style='font-size:12px'>RSS:{$RSS}</strong></td>\n\t\t<td><strong style='font-size:12px'>VM:{$VM}</strong></td>\n\t\t<td><strong style='font-size:12px'>TTL:{$TTL}</strong></td>\n\t\t</tr>\n\t\t"; } $LIGHTTPD_AR[] = "</table>"; $LIGHTTPDF_AR[] = "<table style='width:99%' class=form>"; while (list($pid, $array) = each($php_cgi_array[$FRAMEWORK_PID])) { $RSS = FormatBytes($array["RSS"]); $VM = FormatBytes($array["VM"]); $TTL = $array["TTL"]; $LIGHTTPDF_AR[] = "<tr>\n\t\t<td><strong style='font-size:12px'>PID:{$pid}</strong></td>\n\t\t<td><strong style='font-size:12px'>RSS:{$RSS}</strong></td>\n\t\t<td><strong style='font-size:12px'>VM:{$VM}</strong></td>\n\t\t<td><strong style='font-size:12px'>TTL:{$TTL}</strong></td>\n\t\t</tr>\n\t\t"; } $LIGHTTPDF_AR[] = "</table>"; $html = "<table style='width:99%' class=form>\n\t<tr>\n\t\t<td>{$LIGHTTPD} " . @implode("\n", $LIGHTTPD_AR) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td><hr></td>\n\t</tr>\n\t<tr>\n\t\t<td>{$FRAMEWORK}" . @implode("\n", $LIGHTTPDF_AR) . "</td>\n\t</tr>\n\t</table>\t\n\t"; echo $tpl->_ENGINE_parse_body($html); }
function status() { $tpl = new templates(); $page = CurrentPageName(); $script = null; 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'); $status = DAEMON_STATUS_ROUND("CLAMAV", $ini, null, 1); $q = new mysql(); if ($q->TABLE_EXISTS("clamd_mem", "artica_events")) { if ($q->COUNT_ROWS("clamd_mem", "artica_events") > 1) { $script = "LoadAjax('clamd-graphs','{$page}?clamd-graphs=yes');"; } } $html = "\n\t<div style='width:100%'>{$status}</div>\n\t<center style='margin-top:10px' id='clamd-graphs'></center>\n\t\n\t<script>\n\t\t{$script}\n\t</script>\n\t\n\t"; echo $tpl->_ENGINE_parse_body($html); }
function popup_status(){ $ini=new Bs_IniHandler(); $sock=new sockets(); $ini->loadString(base64_decode($sock->getFrameWork('cmd.php?backuppc-ini-status=yes'))); $status=DAEMON_STATUS_ROUND("APP_BACKUPPC",$ini); $page=CurrentPageName(); $html=" <table style='width:100%'> <tr> <td valign='top'> <img src='img/backuppc-128.png'> <hr> </td> <td valign='top'> $status </td> </tr> </table> <div style='font-size:14px'> {APP_BACKUPPC_TEXT} </div> <div id='users-backuppc-table'></div> <script> //LoadAjax('users-backuppc-table','$page?popup-users=yes'); </script> "; $tpl=new templates(); echo $tpl->_ENGINE_parse_body($html); }
function refresh_service_status() { if (!$GLOBALS["VERBOSE"]) { if (GET_CACHED(__FILE__, __FUNCTION__, md5($_GET["refresh-service-status"]), false, 1)) { return; } } $refresh["C-ICAP"] = "APP_C_ICAP"; if (preg_match("#SERVICE-STATUS-ROUND-(.+)#", $_GET["refresh-service-status"], $re)) { $tpl = new templates(); $key = $re[1]; if ($GLOBALS["VERBOSE"]) { echo "Prod: {$key}\n<br>"; } $content = GetIniContent($key); if ($content == null) { if (!is_file("ressources/logs/global.status.ini")) { return; } $bsini = new Bs_IniHandler("ressources/logs/global.status.ini"); } else { $bsini = new Bs_IniHandler(); $bsini->loadString($content); } if ($bsini->_params[$key]["service_name"] == null) { return null; } $prod = $bsini->_params[$key]["service_name"]; $status = DAEMON_STATUS_ROUND($key, $bsini); $html = $tpl->_ENGINE_parse_body($status); SET_CACHED(__FILE__, __FUNCTION__, md5($_GET["refresh-service-status"]), $html); echo $html; } }
function iscsi_status(){ $sock=new sockets(); $tpl=new templates(); $ini=new Bs_IniHandler(); $ini->loadString(base64_decode($sock->getFrameWork("cmd.php?iscsi-status=yes"))); $status=DAEMON_STATUS_ROUND("APP_IETD",$ini,null,0); echo $tpl->_ENGINE_parse_body($status); }
function mysql_syslogs_service_status() { $tpl = new templates(); $sock = new sockets(); $ini = new Bs_IniHandler(); $ini->loadString(base64_decode($sock->getFrameWork('system.php?syslogdb-status=yes'))); $APP_SQUID_DB = DAEMON_STATUS_ROUND("APP_SYSLOG_DB", $ini, null, 1); echo $tpl->_ENGINE_parse_body($APP_SQUID_DB); }
function fetchmail_status() { $tpl = new templates(); $ini = new Bs_IniHandler(); $sock = new sockets(); $ini->loadString($sock->getfile('fetchmailstatus')); $status = DAEMON_STATUS_ROUND("FETCHMAIL", $ini, null); return $tpl->_ENGINE_parse_body($status); }
function MailGraphStatus() { $tpl = new templates(); $ini = new Bs_IniHandler(); $sock = new sockets(); $ini->loadFile("ressources/logs/global.status.ini"); $status = DAEMON_STATUS_ROUND("MAILGRAPH", $ini, null); return $tpl->_ENGINE_parse_body($status); }
function FetchMailStatus(){ $tpl=new templates(); $ini=new Bs_IniHandler(); $sock=new sockets(); $datas=implode("\n",unserialize(base64_decode($sock->getFrameWork('cmd.php?fetchmail-status=yes')))); $ini->loadString($datas); $status=DAEMON_STATUS_ROUND("FETCHMAIL",$ini,null)."<br>".DAEMON_STATUS_ROUND("FETCHMAIL_LOGGER",$ini,null); echo $tpl->_ENGINE_parse_body($status); }
function cntlm_status() { $sock = new sockets(); $tpl = new templates(); $ini = new Bs_IniHandler(); $ini->loadString(base64_decode($sock->getFrameWork('cmd.php?cntlm-ini-status=yes'))); $APP_CNTLM = DAEMON_STATUS_ROUND("APP_CNTLM_PARENT", $ini, null, 0); echo $tpl->_ENGINE_parse_body($APP_CNTLM); }
function status() { $sock = new sockets(); $datas = base64_decode($sock->getFrameWork("cmd.php?squidguard-status=yes")); $ini = new Bs_IniHandler(); $ini->loadString($datas); $tpl = new templates(); $status = DAEMON_STATUS_ROUND("APP_SQUIDGUARD", $ini); echo $tpl->_ENGINE_parse_body($status); }
function vsftpd_status() { $tpl = new templates(); $sock = new sockets(); $ini = new Bs_IniHandler(); $page = CurrentPageName(); $ini->loadString(base64_decode($sock->getFrameWork('vsftpd.php?status=yes'))); $html = DAEMON_STATUS_ROUND("APP_VSFTPD", $ini, null, 0) . "\n\t<div style='margin-top:15px;text-align:right'>" . imgtootltip("refresh-32.png", "{refresh}", "LoadAjax('vsftpd-status','{$page}?vsftpd-status=yes');") . "</div>"; echo $tpl->_ENGINE_parse_body($html); }
function service_status() { $sock = new sockets(); $ini = new Bs_IniHandler(); $ini->loadString(base64_decode($sock->getFrameWork('cmd.php?kav4fs-ini-status=yes'))); $APP_KAV4FS = DAEMON_STATUS_ROUND("APP_KAV4FS", $ini); $APP_KAV4FS_AVS = DAEMON_STATUS_ROUND("APP_KAV4FS_AVS", $ini); $tpl = new templates(); echo $tpl->_ENGINE_parse_body("{$APP_KAV4FS}<br>{$APP_KAV4FS_AVS}"); }
function status_service() { $sock = new sockets(); $tpl = new templates(); $ini = new Bs_IniHandler(); $page = CurrentPageName(); $ini->loadString(base64_decode($sock->getFrameWork("cmd.php?sabnzbdplus-ini-status=yes"))); $status = DAEMON_STATUS_ROUND("APP_SABNZBDPLUS", $ini, null, 0); echo $tpl->_ENGINE_parse_body($status); }
function status() { $page = CurrentPageName(); $ini = new Bs_IniHandler(); $sock = new sockets(); $ini->loadString(base64_decode($sock->getFrameWork('cmd.php?ocsagntlnx-status=yes'))); $status = DAEMON_STATUS_ROUND("APP_OCSI_LINUX_CLIENT", $ini); $tpl = new templates(); echo $tpl->_ENGINE_parse_body($status); }
function FetchMailStatus() { $tpl = new templates(); $ini = new Bs_IniHandler(); $sock = new sockets(); $datas = implode("\n", unserialize(base64_decode($sock->getFrameWork('cmd.php?fetchmail-status=yes')))); $ini->loadString($datas); $status = "\n\t<div style='width:98%' class=form>\n\t<table style='width:90%'>\n\t<tr>\n\t<td>" . DAEMON_STATUS_ROUND("FETCHMAIL", $ini, null) . "</td>\n\t</tr>\n\t<tr>\n\t<td>" . DAEMON_STATUS_ROUND("FETCHMAIL_LOGGER", $ini, null) . "</td>\n\t</tr>\t\n\t</table></div>"; echo $tpl->_ENGINE_parse_body($status); }
function services_status() { $sock = new sockets(); $ini = new Bs_IniHandler(); $ini->loadString(base64_decode($sock->getFrameWork('cmd.php?syncthing-ini-status=yes'))); $APP_SYNCTHING = DAEMON_STATUS_ROUND("APP_SYNCTHING", $ini, null, 0); $tr[] = $APP_SYNCTHING; $tpl = new templates(); echo $tpl->_ENGINE_parse_body(@implode("<p> </p>", $tr)); }
function status_service() { $page = CurrentPageName(); $tpl = new templates(); $ini = new Bs_IniHandler(); $sock = new sockets(); $ini->loadString(base64_decode($sock->getFrameWork('cmd.php?virtualbox-ini-all-status=yes'))); $tpl = new templates(); $status = DAEMON_STATUS_ROUND("APP_VIRTUALBOX_WEBSERVICE", $ini, null, 1) . "<br>" . DAEMON_STATUS_ROUND("APP_TFTPD", $ini, null, 1) . "<br>" . DAEMON_STATUS_ROUND("DHCPD", $ini, null, 1); return $tpl->_ENGINE_parse_body($status); }
function page() { //APP_SQUIDGUARD_HTTP --squidguard-http $sock = new sockets(); $page = CurrentPageName(); $tpl = new templates(); $ini = new Bs_IniHandler(); $ini->loadString(base64_decode($sock->getFrameWork('squidguardweb.php?status=yes'))); $APP_SQUIDGUARD_HTTP = DAEMON_STATUS_ROUND("APP_SQUIDGUARD_HTTP", $ini, null); echo $tpl->_ENGINE_parse_body($APP_SQUIDGUARD_HTTP); }
function stunnel4_status() { $users = new usersMenus(); $tpl = new templates(); $ini = new Bs_IniHandler(); $sock = new sockets(); $datas = base64_decode($sock->getFrameWork("cmd.php?stunnel-ini-status=yes")); $ini->loadString($datas); $status = DAEMON_STATUS_ROUND("STUNNEL", $ini); echo $tpl->_ENGINE_parse_body($status); }
function service_status() { $page = CurrentPageName(); $sock = new sockets(); $tpl = new templates(); $sock->getFrameWork("sealion.php?service-status=yes"); $ini = new Bs_IniHandler(); $ini->loadFile("/usr/share/artica-postfix/ressources/logs/APP_SEALION_AGENT.status"); $status = DAEMON_STATUS_ROUND("APP_SEALION_AGENT", $ini); $html = "{$status}<div style='text-align:right;height:40px;'>" . imgtootltip("refresh-32.png", "{refresh}", "LoadAjax('sealion-agent-status','{$page}?sealion-agent-status=yes');", "right") . "</div>"; echo $tpl->_ENGINE_parse_body($html); }
function vmware_status() { $page = CurrentPageName(); $tpl = new templates(); $users = new usersMenus(); $ini = new Bs_IniHandler(); $sock = new sockets(); $datas = $sock->getFrameWork("services.php?vmtools-status=yes"); $ini->loadString(base64_decode($datas)); $status = DAEMON_STATUS_ROUND("APP_VMTOOLS", $ini, null, 0); echo $tpl->_ENGINE_parse_body($status); }
function status() { $sock = new sockets(); $ini = new Bs_IniHandler(); $ini->loadString(base64_decode($sock->getFrameWork('cmd.php?wifi-ini-status=yes'))); $page = CurrentPageName(); $APP_WPA_SUPPLIANT = DAEMON_STATUS_ROUND("APP_WPA_SUPPLIANT", $ini); //$dansguardian_status=DAEMON_STATUS_ROUND("DANSGUARDIAN",$ini); $html = "\n\t\t\n\t<table style='width:99%'>\n\t<tr>\n\t\t<td valing='top' width=1% valign='top'><img src='img/wifi-ok-256.png'><div style='padding:5px;font-size:13px;'>{WIFI_ARTICA_EXPLAIN}</div></td>\n\t\t<td valign='top'>\n\t\t\t<div id='wifi-eth-status' style='margin-bottom:5px'></div>\n\t\t\t{$APP_WPA_SUPPLIANT}\n\t\t</td>\n\t</tr>\n\t</table>\n\t\n\t<script>\n\t\tLoadAjax('wifi-eth-status','{$page}?wifi-eth-status=yes');\n\t</script>\n\t\n\t"; $tpl = new templates(); echo $tpl->_ENGINE_parse_body($html); }
function status() { $page = CurrentPageName(); $sock = new sockets(); $tpl = new templates(); $sock->getFrameWork("ss5.php?service-status=yes"); $ini = new Bs_IniHandler(); $ini->loadFile("/usr/share/artica-postfix/ressources/logs/APP_SS5.status"); $status = DAEMON_STATUS_ROUND("APP_SS5", $ini); $redsocks = DAEMON_STATUS_ROUND("APP_REDSOCKS", $ini); $html = "{$status}{$redsocks}<div style='text-align:right;height:40px;'>" . imgtootltip("refresh-32.png", "{refresh}", "RefreshTab('influxdb_main_table');", "right") . "</div>"; echo $tpl->_ENGINE_parse_body($html); }
function Arkeia_Status() { $sock = new sockets(); $tpl = new templates(); $ini = new Bs_IniHandler(); $page = CurrentPageName(); $datas = $sock->getFrameWork("services.php?arkeia-ini-status=yes"); writelogs(strlen($datas) . " bytes for apache status", __CLASS__, __FUNCTION__, __FILE__, __LINE__); $ini->loadString(base64_decode($datas)); $serv[] = DAEMON_STATUS_ROUND("APP_ARKEIAD", $ini, null, 0); $serv[] = DAEMON_STATUS_ROUND("APP_ARKWSD", $ini, null, 0); echo $tpl->_ENGINE_parse_body(@implode($serv, "<br>")); }
function status() { $tpl = new templates(); $page = CurrentPageName(); $script = null; $sock = new sockets(); $sock->getFrameWork('cmd.php?clamav-status=yes'); $ini = new Bs_IniHandler("ressources/logs/web/clamav.status"); $status = DAEMON_STATUS_ROUND("CLAMAV", $ini, null, 0); $status_clamd = DAEMON_STATUS_ROUND("CLAMAV_MILTER", $ini, null, 0); $html = "<div style='width:100%'>{$status_clamd}<br>{$status}</div>"; echo $tpl->_ENGINE_parse_body($html); }
function main_status() { $ini = new Bs_IniHandler(); $sock = new sockets(); $ini->loadString($sock->getfile('dotclear_status')); $status = DAEMON_STATUS_ROUND("DOTCLEAR", $ini, null); $tpl = new templates(); $dotclear = new dotclear(); if (!$dotclear->TestsDatabase()) { $badtables = "<br><div style='width:97%' class='paragraphe' id='{$id}' {$h3style}>\n\t<table style='width:100%'>\n\t<tr>\n\t<td width=1% valign='top'><img src='img/42-red.png'></td>\n\t<td valign='top' >\n\t\t<H3 style='color:red'>{tables_error}</H3>\n\t\t<p class=caption>{tables_error_text}</p>\n\t\t<center>\n\t\t<input type='button' OnClick=\"javascript:RebuildTablesDotClear();\" value='{rebuild_tables} »'>\n\t\t</center>\n\t\n\t</td>\n\t</tr>\n\t</table>\n\t</div>"; } //DotClearRebuildTables echo $tpl->_ENGINE_parse_body("{$status}{$badtables}"); }
function status() { $tpl = new templates(); $page = CurrentPageName(); 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); } $status = DAEMON_STATUS_ROUND("DNSMASQ", $ini, null) . "\n\t\n\t<script>RefreshMainForm()</script>\n\t\n\t"; echo $tpl->_ENGINE_parse_body($status); }
function section_Fetchmail_Daemon() { $yum = new usersMenus(); $tpl = new templates(); $ini = new Bs_IniHandler(); $sock = new sockets(); $title = "{fetchmail_rules}"; $add_fetchmail = Paragraphe('add-fetchmail-64.png', '{add_new_fetchmail_rule}', '{fetchmail_explain}', "javascript:add_fetchmail_rules()", null, 340); $ini->loadString($sock->getfile('fetchmailstatus')); $status = DAEMON_STATUS_ROUND("FETCHMAIL", $ini, null); $status = $tpl->_ENGINE_parse_body($status); $html = "<table style='width:600px'>\n\t\t<tr>\n\t\t<td valign='top' width=1%><img src='img/bg_fetchmail2.jpg'>\n\t\t<td valign='top' align='right'><div style='width:350px'>{$status} <br> {$add_fetchmail}</div></td>\n\t\t</tr>\n\t\t<td colspan=2>\n\t\t<div id='fetchmail_daemon_rules'></div>\n\t\t\t</td>\n\t\t\t</tr>\t\t\t\n\t\t\t\t\t</table>\n\t\t\t\t\t\n\t<script>LoadAjax('fetchmail_daemon_rules','fetchmail.daemon.rules.php?Showlist=yes');</script>"; $tpl = new template_users($title, $html, 0, 0, 0, 0); echo $tpl->web_page; }
function MAIN_STATUS_NGINX() { $q = new mysql(); $sock = new sockets(); $tpl = new templates(); $ini = new Bs_IniHandler(); $page = CurrentPageName(); $datas = $sock->getFrameWork("cmd.php?apachesrc-ini-status=yes"); $ini->loadString(base64_decode($datas)); $serv[] = DAEMON_STATUS_ROUND("APP_APACHE_SRC", $ini, null, 0); $serv[] = DAEMON_STATUS_ROUND("APP_NGINX", $ini, null, 0); $refresh = "<div style='text-align:right;margin-top:8px'>\n\t\t\t" . imgtootltip("refresh-24.png", "{refresh}", "LoadAjax('MAIN_STATUS_NGINX','{$page}?MAIN_STATUS_NGINX=yes');") . "</div>"; $status = @implode("<br>", $serv) . $refresh; echo $tpl->_ENGINE_parse_body($status); }