function apache_src_status() { $q = new mysql(); $sock = new sockets(); $tpl = new templates(); $ini = new Bs_IniHandler(); $page = CurrentPageName(); $datas = $sock->getFrameWork("cmd.php?apachesrc-ini-status=yes"); writelogs(strlen($datas) . " bytes for apache status", __CLASS__, __FUNCTION__, __FILE__, __LINE__); $confirm_scansize = $tpl->javascript_parse_text("{confirm_scan_size}"); $sql = "SELECT SUM(DirectorySize) as tsum FROM freeweb"; $ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup")); $size = FormatBytes($ligne["tsum"] / 1024); $ini->loadString(base64_decode($datas)); $serv[] = "<center style='font-size:16px'>\n\t\t<a href=\"javascript:blur();\" OnClick=\"javascript:FreeWebsScanSize();\" style='font-size:16px;text-decoration:underline'>{disk_usage}: {$size}</a></center>"; $serv[] = DAEMON_STATUS_ROUND("APP_APACHE_SRC", $ini, null, 0) . $table; if (!isset($_GET["withoutftp"])) { $serv[] = DAEMON_STATUS_ROUND("APP_PHPFPM", $ini, null, 0); $serv[] = DAEMON_STATUS_ROUND("PUREFTPD", $ini, null, 0); $serv[] = DAEMON_STATUS_ROUND("APP_TOMCAT", $ini, null, 0); $serv[] = DAEMON_STATUS_ROUND("APP_NGINX", $ini, null, 0); } $refresh = "<div style='text-align:right;margin-top:8px'>" . imgtootltip("refresh-24.png", "{refresh}", "RefreshTab('main_config_freeweb')") . "</div>"; if (!isset($_GET["withoutftp"])) { $users = new usersMenus(); if (!$users->PUREFTP_INSTALLED) { $tips = "<center style='margin-top:20px'>" . Paragraphe_tips("64-infos.png", "{TIPS_PUREFTPD_TITLE}", "{TIPS_PUREFTPD_TITLE_TEXT}", "javascript:Loadjs('setup.index.progress.php?product=APP_PUREFTPD&start-install=yes');", 265) . "</center>"; } } while (list($a, $b) = each($serv)) { if (trim($b) == null) { continue; } $statusT[] = $b; } $status = @implode("<br>", $statusT); $script = "\n\t<script>\n\t\tvar x_FreeWebsScanSize=function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>3){alert(results);}\t\t\t\n\t\t\n\t\t}\t\n\t\n\t\n\t\tfunction FreeWebsScanSize(){\n\t\t\tif(confirm('{$confirm_scansize} ?')){\n\t\t\t\tvar XHR = new XHRConnection();\n\t\t\t\tXHR.appendData('FreeWebsScanSize','yes');\n\t\t \tXHR.sendAndLoad('{$page}', 'POST',x_FreeWebsScanSize);\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\n\t</script>\n\t"; echo $tpl->_ENGINE_parse_body($status . $tips . $refresh . $script); }
function apache_src_status() { $refresh = "<div style='text-align:right;margin-top:8px'>" . imgtootltip("refresh-24.png", "{refresh}", "RefreshTab('main_config_freeweb')") . "</div>"; $sock = new sockets(); $tpl = new templates(); $ini = new Bs_IniHandler(); $page = CurrentPageName(); $datas = $sock->getFrameWork("cmd.php?apachesrc-ini-status=yes"); writelogs(strlen($datas) . " bytes for apache status", __CLASS__, __FUNCTION__, __FILE__, __LINE__); $ini->loadString(base64_decode($datas)); $status = DAEMON_STATUS_ROUND("APP_APACHE_SRC", $ini, null, 0) . "<br>" . DAEMON_STATUS_ROUND("PUREFTPD", $ini, null, 0) . "<br>" . DAEMON_STATUS_ROUND("APP_TOMCAT", $ini, null, 0); $users = new usersMenus(); if (!$users->PUREFTP_INSTALLED) { $tips = Paragraphe_tips("64-infos.png", "{TIPS_PUREFTPD_TITLE}", "{TIPS_PUREFTPD_TITLE_TEXT}", "javascript:Loadjs('setup.index.progress.php?product=APP_PUREFTPD&start-install=yes');", 265); } echo $tpl->_ENGINE_parse_body($status . $tips . $refresh); }