示例#1
0
function index()
{
    $lang = array("en" => "English (en)", "en-uk" => "british english (en-uk)", "bg" => "????????? (bg)", "da" => "dansk (da)", "de" => "deutsch (de)", "es" => "espanol (es)", "fr" => "francais (fr)", "it" => "italiano (it)", "nl" => "nederlands (nl)", "pl" => "polski (pl)", "pt" => "portugues (pt)", "pt-br" => "brasil portugues (pt-br)", "ro" => "romana (ro)", "ru" => "??????? ???? (ru)");
    $sock = new sockets();
    $sock->DeleteCache();
    $ll = Field_array_Hash($lang, 'PommoFieldlang', $sock->GET_INFO('PommoFieldlang'));
    $html = "\n<img src='img/bg_pommo.png' style='float:right;margin-top:-8px'><H1>{APP_POMMO}</h1>\n<p class=caption>{pommo_explain}</p>\n<div id='pommodiv'>\n<table style='width:100%' class=table_form>\n<tr>\n<td valign='top' nowrap class=legend>{default_language}:</td>\n<td>{$ll}</td>\n</tr>\n<tr>\n<td valign='top' nowrap class=legend>{hostname}:</td>\n<td>" . Field_text("PommoFieldhostname", $sock->GET_INFO("PommoFieldhostname"), 'width:150px') . "</td>\n</tr>\n<tr>\n\t<td colspan=2 align='right'><input type='button' OnClick=\"javascript:PommoSave();\" value='{edit}&nbsp;&raquo;'>\n</tr>\n<tr>\n\t<td colspan=2 align='right'><input type='button' OnClick=\"javascript:PommoReset();\" value='{restore_admin}&nbsp;&raquo;'>\n</tr>\n\n</table>\n</div>\n";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
示例#2
0
function emptycache()
{
    $sock = new sockets();
    $sock->DeleteCache();
}
function logsof()
{
    $appname = $_GET["logsof"];
    $sock = new sockets();
    $logs_datas = $sock->getfile("AppliCenterTailDebugInfos:{$appname}");
    $sock->DeleteCache();
    $tb = explode("\n", $logs_datas);
    $count_s = count($tb);
    for ($i = 0; $i < count($tb) + 1; $i++) {
        if ($tb[$i] == null) {
            continue;
        }
        echo "<div style='background-color:white;border:1px solid #CCCCCC;padding:3px;padding-left:10px'><code style='font-size:12px;'>" . htmlspecialchars($tb[$i]) . "</code></div>";
    }
}
示例#4
0
 function save()
 {
     if (is_array($this->networklist)) {
         reset($this->networklist);
         while (list($num, $maks) = each($this->networklist)) {
             if (trim($maks) == null) {
                 continue;
             }
             $arr[trim($maks)] = trim($maks);
         }
     }
     if (is_array($arr)) {
         while (list($num, $net) = each($arr)) {
             $conf = $conf . "{$net}\n";
         }
     }
     echo $conf;
     $sock = new sockets();
     $sock->SaveConfigFile($conf, "NetworkScannerMasks");
     $sock->DeleteCache();
 }
function logsof()
{
    $appname = $_GET["logsof"];
    $sock = new sockets();
    $logs_datas = $sock->getfile("AppliCenterTailDebugInfos:{$appname}");
    $sock->DeleteCache();
    $tb = explode("\n", $logs_datas);
    $count_s = count($tb);
    for ($i = 0; $i < count($tb) + 1; $i++) {
        if ($tb[$i] == null) {
            continue;
        }
        if (preg_match("#[0-9]+\\.[0-9]+%#", $tb[$i])) {
            continue;
        }
        if (preg_match("#[0-9]+,[0-9]+%#", $tb[$i])) {
            continue;
        }
        echo "<div><code style='font-size:12px;'>" . htmlspecialchars($tb[$i]) . "</code></div>";
    }
}
示例#6
0
function APP_APACHE()
{
    $sock = new sockets();
    if (!is_numeric($_GET["APP_APACHE"])) {
        $_GET["APP_APACHE"] = 80;
    }
    if (!is_numeric($_GET["APP_APACHE_SSL"])) {
        $_GET["APP_APACHE_SSL"] = 443;
    }
    $sock->SET_INFO("FreeWebListenPort", $_GET["APP_APACHE"]);
    $sock->SET_INFO("FreeWebListenSSLPort", $_GET["APP_APACHE_SSL"]);
    $sock->getFrameWork("cmd.php?restart-apache-src=yes");
    $sock->DeleteCache();
}
示例#7
0
    $_SESSION["detected_lang"] = $_COOKIE["artica-language"];
}
$sock = new sockets();
$sock->getFrameWork("squid.php?clean-catz-cache=yes");
echo "\n";
$cc = 0;
while (list($num, $val) = each($_SESSION)) {
    if (preg_match("#\\/.+?\\.php\$#", $num)) {
        $cc++;
        unset($_SESSION[$num]);
    }
}
foreach (glob("/usr/share/artica-postfix/ressources/logs/web/*.cache") as $filename) {
    @unlink($filename);
}
$sock->DeleteCache();
$sock->getFrameWork("system.php?process1=yes");
while (list($num, $val) = each($GLOBALS["langs"])) {
    $datas = $sock->LANGUAGE_DUMP($val);
    $bb = strlen(serialize($datas));
    $a = $a + $bb;
    $bb = str_replace("&nbsp;", " ", FormatBytes($bb / 1024));
    $tt[] = "\tDumping language {$val} {$bb}";
}
$dataSess = strlen(serialize($_SESSION));
$text = $text . "Session Cache.....................: " . str_replace("&nbsp;", " ", FormatBytes($dataSess / 1024)) . "\n";
$text = $text . "Session Page Cache................: {$cc} page(s)\n";
$bytes = $a;
$text = $text . "Language Cache....................: " . str_replace("&nbsp;", " ", FormatBytes($bytes / 1024)) . "/" . str_replace("&nbsp;", " ", FormatBytes($sock->semaphore_memory / 1024)) . "\n";
$text = $text . implode("\n", $tt) . "\n";
$text = $text . "Console Cache.....................: " . str_replace("&nbsp;", " ", FormatBytes(REMOVE_CACHED())) . "\n";
示例#8
0
function APP_APACHE()
{
    $sock = new sockets();
    $sock->getfile("ApacheChangePortStandard:" . $_GET["APP_APACHE"]);
    $sock->DeleteCache();
}