示例#1
0
function popup()
{
    $sock = new sockets();
    $page = CurrentPageName();
    $CyrusEnableLMTPUnix = $sock->GET_INFO("CyrusEnableLMTPUnix");
    if ($CyrusEnableLMTPUnix == null) {
        $CyrusEnableLMTPUnix = 1;
    }
    $nets["127.0.0.1"] = "127.0.0.1";
    $net = new networking();
    while (list($num, $ipaddr) = each($net->array_TCP)) {
        if ($ipaddr == null) {
            continue;
        }
        $nets[$ipaddr] = $ipaddr;
    }
    $CyrusLMTPListen = trim($sock->GET_INFO("CyrusLMTPListen"));
    if ($CyrusLMTPListen == null) {
        $CyrusLMTPListen = "127.0.0.1:2005";
    }
    if (preg_match("#(.+?):(.+)#", $CyrusLMTPListen, $re)) {
        $ipaddr_listen = $re[1];
        $port = $re[2];
    }
    $lmtp_unix = "/var/spool/postfix/var/run/cyrus/socket/lmtp";
    $html = "\n\t<div id='cyrus_lmtp_div'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td width=1% valign='top'><img src='img/database-connect-settings-90.png'></td>\n\t\t<td valign='top'>\n\t<div style='font-size:13px;padding:5px'>{cyrus_lmtp_howto}</div>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend style='font-size:13px'>{enable_lmtp_unix}:</td>\n\t\t<td>" . Field_checkbox("CyrusEnableLMTPUnix", 1, $CyrusEnableLMTPUnix, "CyrusEnableLMTPUnixSwitch()") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:13px'>{listen_ip}:</td>\n\t\t<td>\n\t\t\t<table style='width:1%'>\n\t\t\t<tr>\n\t\t\t\t<td width=1%>" . Field_array_Hash($nets, "lmtp_ipaddr", $ipaddr_listen, null, null, 0, "font-size:13px;padding:3px") . "</td>\n\t\t\t\t<td width=1%>:</td>\n\t\t\t\t<td width=1%>" . Field_text("lmtp_port", $port, "font-size:13px;padding:3px;width:40px") . "</td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>\n\t\t\t" . button("{apply}", "CyrusEnableLMTPUnixSave()") . "</td>\n\t</tr>\n\t</table>\n\t</td>\n\t</tr>\n\t</table>\n\t</div>\n\t<script>\n\t\n\tvar x_CyrusEnableLMTPUnixSave= function (obj) {\n\t\tYahooWinHide();\n\t}\t\n\t\n\tfunction CyrusEnableLMTPUnixSave(){\n\t\tvar XHR = new XHRConnection();\n\t\tif(document.getElementById('CyrusEnableLMTPUnix').checked){XHR.appendData('CyrusEnableLMTPUnix',1);}else{XHR.appendData('CyrusEnableLMTPUnix',0);}\n\t\tXHR.appendData('CyrusLMTPListen',document.getElementById('lmtp_ipaddr').value+':'+document.getElementById('lmtp_port').value);\n\t\tdocument.getElementById('cyrus_lmtp_div').innerHTML='<div style=\"width:100%\"><center style=\"margin:20px;padding:20px\"><img src=\"img/wait_verybig.gif\"></center></div>';\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_CyrusEnableLMTPUnixSave);\n\t}\n\t\t\n\t\tCyrusEnableLMTPUnixSwitch();\n\t</script>\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
示例#2
0
function PageFetchmail_status()
{
    include_once 'ressources/class.fetchmail.inc';
    $tpl = new templates();
    $yum = new usersMenus();
    if ($yum->AsMailBoxAdministrator == false) {
        $html = $tpl->_ENGINE_parse_body("<h3>{not allowed}</H3>");
        return $html;
    }
    $status = new status(1);
    $stat = $status->fetchmail_satus();
    $html = $stat;
    if ($usersmenus->AutomaticConfig == false) {
        $html = $html . "<br><fieldset><legend>{apply config}</legend>\n\t\t\t\t\t<center><input type='button' value='{apply config}' OnClick=\"javascript:TreeFetchMailApplyConfig()\"></center>\n\t\t\t\t</fieldset>";
    }
    $fetch = new fetchmail();
    if (is_array($fetch->array_servers)) {
        $html = $html . "<fieldset>\n\t\t\t\t<legend>{servers_list}</legend>\n\t\t\t\t<center>\n\t\t\t\t<table style='width:90%;border:1px solid #CCCCCC'>\n\t\t\t\t<tr style='border-bottom:1px solid #CCCCCC'>\n\t\t\t\t\t<td colspan=2><strong>{servers_list}</td>\n\t\t\t\t\t<td align='center'><strong>{number_users}</strong></td>\n\t\t\t\t</tr>";
        while (list($num, $val) = each($fetch->array_servers)) {
            $html = $html . "<tr>\n\t\t\t\t\t<td width=1%><img src='img/webmin_on-22.gif'></td>\n\t\t\t\t\t<td><a href=\"javascript:TreeFetchmailShowServer('{$num}');\">{$num}</a></td>\n\t\t\t\t\t<td align='center'>" . count($val) . "</td>\n\t\t\t\t\t</tr>";
        }
        $html = $html . "</table></center></fieldset>";
    }
    return $tpl->_ENGINE_parse_body("<div id=status>{$html}</div>");
}
function buildjs()
{
    $t = $_GET["t"];
    $time = time();
    $MEPOST = 0;
    header("content-type: application/x-javascript");
    $tpl = new templates();
    $page = CurrentPageName();
    $array = unserialize(@file_get_contents($GLOBALS["CACHEFILE"]));
    $prc = intval($array["POURC"]);
    $title = $tpl->javascript_parse_text($array["TEXT"]);
    $md5file = trim(md5_file($GLOBALS["LOGSFILES"]));
    echo "// CACHE FILE: {$GLOBALS["CACHEFILE"]} {$prc}%\n";
    echo "// LOGS FILE: {$GLOBALS["LOGSFILES"]} - {$md5file} " . strlen($md5file) . "\n";
    if ($prc == 0) {
        if (strlen($md5file) < 32) {
            echo "\n\t// PRC = {$prc} ; md5file={$md5file}\n\tfunction Start{$time}(){\n\t\t\tif(!RTMMailOpen()){return;}\n\t\t\tLoadjs('{$page}?build-js=yes&t={$t}&md5file={$_GET["md5file"]}');\n\t}\n\tsetTimeout(\"Start{$time}()\",1000);";
            return;
        }
    }
    if ($md5file != $_GET["md5file"]) {
        echo "\n\tvar xStart{$time}= function (obj) {\n\t\tif(!document.getElementById('text-{$t}')){return;}\n\t\tvar res=obj.responseText;\n\t\tif (res.length>3){\n\t\t\tdocument.getElementById('text-{$t}').value=res;\n\t\t}\t\t\n\t\tLoadjs('{$page}?build-js=yes&t={$t}&md5file={$md5file}');\n\t}\t\t\n\t\n\tfunction Start{$time}(){\n\t\tif(!RTMMailOpen()){return;}\n\t\tdocument.getElementById('title-{$t}').innerHTML='{$title}';\n\t\t\$('#progress-{$t}').progressbar({ value: {$prc} });\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('Filllogs', 'yes');\n\t\tXHR.appendData('t', '{$t}');\n\t\tXHR.setLockOff();\n\t\tXHR.sendAndLoad('{$page}', 'POST',xStart{$time},false); \n\t}\n\tsetTimeout(\"Start{$time}()\",1000);";
        return;
    }
    if ($prc > 100) {
        echo "\n\tfunction Start{$time}(){\n\t\tif(!RTMMailOpen()){return;}\n\t\tdocument.getElementById('title-{$t}').innerHTML='{$title}';\n\t\tdocument.getElementById('title-{$t}').style.border='1px solid #C60000';\n\t\tdocument.getElementById('title-{$t}').style.color='#C60000';\n\t\t\$('#progress-{$t}').progressbar({ value: 100 });\n\t}\n\tsetTimeout(\"Start{$time}()\",1000);\n\t";
        return;
    }
    if ($prc == 100) {
        echo "\n\tfunction Start{$time}(){\n\t\tif(!RTMMailOpen()){return;}\n\t\tdocument.getElementById('title-{$t}').innerHTML='{$title}';\n\t\t\$('#progress-{$t}').progressbar({ value: {$prc} });\n\t\tLayersTabsAllAfter();\n\t\tRTMMailHide();\n\t\tCacheOff();\n\t\t{$at_the_end};\n\t\t}\n\tsetTimeout(\"Start{$time}()\",1000);\n\t";
        return;
    }
    echo "\t\nfunction Start{$time}(){\n\t\tif(!RTMMailOpen()){return;}\n\t\tdocument.getElementById('title-{$t}').innerHTML='{$title}';\n\t\t\$('#progress-{$t}').progressbar({ value: {$prc} });\n\t\tLoadjs('{$page}?build-js=yes&t={$t}&md5file={$_GET["md5file"]}');\n\t}\n\tsetTimeout(\"Start{$time}()\",1500);\n";
}
示例#4
0
function popup()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $group = $tpl->_ENGINE_parse_body("{group}");
    $members = $tpl->_ENGINE_parse_body("{members}");
    $description = $tpl->_ENGINE_parse_body("{description}");
    $new_group = $tpl->_ENGINE_parse_body("{new_group}");
    $tt = $_GET["t"];
    if (!is_numeric($tt)) {
        $tt = time();
    }
    $t = time();
    $ldap = new clladp();
    $ou = $_GET["ou"];
    if (is_base64_encoded($ou)) {
        $ou = base64_decode($ou);
    }
    $dn = urlencode($_GET["dn"]);
    $buttons = "\nbuttons : [\n{name: '<b>{$new_group}</b>', bclass: 'add', onpress : CreateGroup{$t}},\n],";
    if ($ldap->IsOUUnderActiveDirectory($ou)) {
        $buttons = null;
    }
    $html = "\n<span id='DomainsGroupFindPopupDiv'></span>\n<table class='flexRT{$t}' style='display: none' id='flexRT{$t}' style='width:100%'></table>\n\n\t\n<script>\n\$(document).ready(function(){\n\$('#flexRT{$t}').flexigrid({\n\turl: '{$page}?search=yes&ou={$_GET["ou"]}&t={$t}&tt={$tt}&dn={$dn}',\n\tdataType: 'json',\n\tcolModel : [\n\t\t{display: '{$group}', name : 'member', width : 183, sortable : false, align: 'left'},\t\n\t\t{display: '{$members}', name : 'email', width :71, sortable : false, align: 'center'},\n\t\t{display: '{$description}', name : 'desc', width : 199, sortable : true, align: 'left'},\n\t\t{display: '&nbsp;', name : 'del', width : 31, sortable : true, align: 'center'},\n\t\t\n\t\t],\n\t{$buttons}\n\tsearchitems : [\n\t\t{display: '{$group}', name : 'find-member'},\n\t\t],\n\tsortname: 'pattern',\n\tsortorder: 'asc',\n\tusepager: true,\n\ttitle: '',\n\tuseRp: true,\n\trp: 50,\n\tshowTableToggleBtn: false,\n\twidth: 550,\n\theight: 350,\n\tsingleSelect: true,\n\trpOptions: [10, 20, 30, 50,100,200]\n\t\n\t});   \n});\n\tfunction DomainsGroupFindPopupDivRefresh(){\n\t\t\$('#flexRT{$t}').flexReload();\n\t}\n\t\n\tfunction CreateGroup{$t}(){\n\t\tLoadjs('domains.edit.group.php?popup-add-group=yes&ou={$_GET["ou"]}&t={$t}&tt={$tt}');\n\t}\n\n\n</script>\n\n";
    echo $html;
}
function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $users = new usersMenus();
    $q = new mysql();
    $sql = "SELECT * FROM officials_domains ORDER BY domain";
    writelogs("{$sql}", __FUNCTION__, __FILE__, __LINE__);
    $results = $q->QUERY_SQL($sql, "artica_backup");
    if (!$q->ok) {
        echo "<H2>{$q->mysql_error}</H2>";
    }
    while ($ligne = mysql_fetch_array($results, MYSQL_ASSOC)) {
        $domains[$ligne["domain"]] = $ligne["domain"];
    }
    $OverWriteRestrictedDomains = 0;
    if ($users->OverWriteRestrictedDomains) {
        $OverWriteRestrictedDomains = 1;
    }
    if ($OverWriteRestrictedDomains == 1) {
        $over = "\n\t\t<hr>\n\t\t<div class=explain>{OverWriteRestrictedDomains_allow_text}</div>\n\t\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td class=legend>{domain}:</td>\n\t\t<td width=100%>" . Field_text("overwrite-domain", null, "font-size:16px;padding:3px;width:320px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button("{add}", "AddSubdomainOUOver()") . "</td>\n\t</tr>\n\t</table>\n\t\t";
    }
    $_GET["ou"] = urlencode($_GET["ou"]);
    $domains[null] = "{select}";
    $html = "\n\t<div id='add_subdomain_explain'></div>\n\t<div class=explain >{add_subdomain_explain}</div>\n\t\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td class=legend>{subdomain}:</td>\n\t\t<td width=50%>" . Field_text("subdomain", null, "font-size:16px;padding:3px;width:220px") . "</td>\n\t\t<td style='font-size:16px;padding:3px' width=1%><strong>.</strong></td>\n\t\t<td width=50%>" . Field_array_Hash($domains, "maindomain", null, "style:font-size:16px;padding:3px;") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=4 align='right'><hr>" . button("{add}", "AddSubdomainOU()") . "</td>\n\t</tr>\n\t</table>\n\t{$over}\n\t<script>\n\tvar x_AddSubdomainOU= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tdocument.getElementById('subdomain').innerHTML='';\n\t\tif(results.length>3){alert(results);return;}\n\t\tYahooWin4Hide();\n\t\tLoadAjax('LocalDomainsList','domains.edit.domains.php?LocalDomainList=yes&ou={$_GET["ou"]}');\n\t}\t\t\n\t\t\n\t\tfunction AddSubdomainOU(){\n\t\t\tvar maindomain=document.getElementById('maindomain').value;\n\t\t\tvar subdomain=document.getElementById('subdomain').value;\n\t\t\tif(maindomain.length<3){return;}\n\t\t\tif(subdomain.length<3){return;}\n\t\t\tvar domain=subdomain+'.'+maindomain;\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('AddNewInternetDomain','{$_GET["ou"]}');\n\t\t\tXHR.appendData('AddNewInternetDomainDomainName',domain);\t\n\t\t\tAnimateDiv('add_subdomain_explain');\n\t\t\tXHR.sendAndLoad('domains.edit.domains.php', 'GET',x_AddSubdomainOU);\n\t\t\t\n\t\t}\n\t\t\n\t\tfunction AddSubdomainOUOver(){\n\t\t\tvar maindomain=document.getElementById('overwrite-domain').value;\n\t\t\tif(maindomain.length<3){return;}\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('AddNewInternetDomain','{$_GET["ou"]}');\n\t\t\tXHR.appendData('AddNewInternetDomainDomainName',maindomain);\t\n\t\t\tAnimateDiv('add_subdomain_explain');\n\t\t\tXHR.sendAndLoad('domains.edit.domains.php', 'GET',x_AddSubdomainOU);\t\t\t\n\t\t}\n\n\t</script>\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
function page()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $html = "<div style='width:98%' class=form>\n\t\t\t<div style='font-size:18px' class=explain>{squid_articadb_restore_explain}</div>\n\t\t\t\n\t\t\t<center style='margin:30px'>" . button("{upload_backuped_container}", "Loadjs('squid.articadb.restore.upload.php')", 32) . "</center>\n\t</div>";
    echo $tpl->_ENGINE_parse_body($html);
}
function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $q = new mysql_squid_builder();
    $ID = $_GET["ID"];
    $sql = "SELECT * FROM webfilter_rules WHERE ID={$ID}";
    $ligne = mysql_fetch_array($q->QUERY_SQL($sql));
    $more8chars = $tpl->javascript_parse_text("{more8chars}");
    if ($ID == 0) {
        $sock = new sockets();
        $ligne = unserialize(base64_decode($sock->GET_INFO("DansGuardianDefaultMainRule")));
    }
    if ($ligne["BypassSecretKey"] == null) {
        $ligne["BypassSecretKey"] = md5(time());
    }
    $TIMES[0] = "{none}";
    $TIMES[300] = "5 {minutes}";
    $TIMES[900] = "15 {minutes}";
    $TIMES[1800] = "30 {minutes}";
    $TIMES[3600] = "1 {hour}";
    $TIMES[7200] = "2 {hours}";
    $TIMES[14400] = "4 {hours}";
    $t = time();
    $html = "\n\t<div id='{$t}'>\n\t<div class=text-info style='font-size:14px'>{TemporaryDeniedPageBypassExplain}<br>{BypassSecretKeyExplain}</div>\n\t<table style='width:99%' class=form>\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:16px'>{bypassFor}:</td>\n\t\t\t<td>" . Field_array_Hash($TIMES, "bypass{$t}", $ligne["bypass"], "style:font-size:16px") . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:16px'>{BypassSecretKey}:</td>\n\t\t\t<td>" . Field_password("BypassSecretKey{$t}", $ligne["BypassSecretKey"], "font-size:16px;width:220px") . "</td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "bypassForSave()") . "</td>\n\t\t</tr>\n\t\t\n\t</tbody>\n\t</table>\n\t</div>\n\t<script>\n\tvar x_bypassForSave= function (obj) {\n\t\tvar res=obj.responseText;\n\t\tvar ID='{$ID}';\n\t\tif (res.length>3){alert(res);}\n\t\tYahooWin4Hide();\n\t}\n\t\n\t\tfunction bypassForSave(){\n\t\t      var XHR = new XHRConnection();\n\t\t      \n\t\t      var bypass=document.getElementById('bypass{$t}').value;\n\t\t      if(bypass.length<8){alert('{$more8chars}');return;}\n\t\t      XHR.appendData('bypass', document.getElementById('bypass{$t}').value);\n\t\t      XHR.appendData('BypassSecretKey', document.getElementById('BypassSecretKey{$t}').value);\n\t\t      XHR.appendData('ID','{$ID}');\n\t\t      AnimateDiv('{$t}');\n\t\t      XHR.sendAndLoad('{$page}', 'POST',x_bypassForSave);  \t\t\n\t\t}\n\t</script>\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
示例#8
0
function config_popup()
{
    $vpn = new openvpn();
    $config = $vpn->BuildClientconf($_SESSION["uid"]);
    $tbconfig = explode("\n", $config);
    $html_logs[] = htmlentities("VPN config -> " . strlen($config) . " bytes length (" . count($tbconfig) . " lines)");
    $uid = $_SESSION["uid"];
    writelogs("VPN config -> " . strlen($config) . " bytes length (" . count($tbconfig) . " lines)", __FUNCTION__, __FILE__, __LINE__);
    $sock = new sockets();
    if (!$sock->SaveConfigFile($config, "{$uid}.ovpn")) {
        $html_logs[] = htmlentities("Framework error while saving  -> {$uid}.ovpn;" . strlen($config) . " bytes length (" . count($tbconfig) . " lines)");
    }
    writelogs("sockets() OK", __FUNCTION__, __FILE__, __LINE__);
    //$datas=$sock->getfile('OpenVPNGenerate:'.$uid);
    $datas = $sock->getFrameWork("openvpn.php?build-vpn-user={$_SESSION["uid"]}&basepath=" . dirname(__FILE__));
    $tbl = explode("\n", $datas);
    $tbl = array_reverse($tbl);
    while (list($num, $line) = each($tbl)) {
        if (trim($line) == null) {
            continue;
        }
        $html_logs[] = "<div><code style='font-size:10px;color:black;'>" . htmlentities($line) . "</code></div>";
    }
    if (is_file('ressources/logs/' . $uid . '.zip')) {
        $download = "\n\t\t<center>\n\t\t\t<a href='ressources/logs/" . $uid . ".zip'><img src='img/download-64.png' title=\"{DOWNLOAD_CONFIG_FILES}\" style='padding:8Px;border:1px solid #055447;margin:3px'></a>\n\t\t</center>\n\t\t";
    }
    $html = "\n\t\n\t{$download}\n\t<H3>{events}</H3>\n\t" . ParagrapheTXT("<div style='width:100%;height:200px;overflow:auto'>" . implode("\n", $html_logs) . "</div>");
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
示例#9
0
function page()
{
    $q = new mysql_squid_builder();
    $timekey = date('Ymd');
    $timekeyMonth = date("Ym");
    $time = time();
    $page = CurrentPageName();
    $tpl = new templates();
    $q = new mysql_squid_builder();
    $tpl = new templates();
    $t = time();
    $per["1m"] = "{minute}";
    $per["5m"] = "5 {minutes}";
    $per["10m"] = "10 {minutes}";
    $per["1h"] = "{hour}";
    $per["1d"] = "{day}";
    $members["MAC"] = "{MAC}";
    $members["USERID"] = "{uid}";
    $members["IPADDR"] = "{ipaddr}";
    if (!isset($_SESSION["SQUID_STATS_MEM_DATE1"])) {
        $_SESSION["SQUID_STATS_MEM_DATE1"] = date("Y-m-d");
    }
    if (!isset($_SESSION["SQUID_STATS_MEM_TIME1"])) {
        $_SESSION["SQUID_STATS_MEM_TIME1"] = "00:00";
    }
    if (!isset($_SESSION["SQUID_STATS_MEM_DATE2"])) {
        $_SESSION["SQUID_STATS_MEM_DATE2"] = date("Y-m-d");
    }
    if (!isset($_SESSION["SQUID_STATS_MEM_TIME2"])) {
        $_SESSION["SQUID_STATS_MEM_TIME2"] = "23:00";
    }
    $html = "\n\t<div style='width:98%;margin-bottom:20px' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td style='vertical-align:top;font-size:18px' class=legend>{interval}:</td>\n\t\t<td style='vertical-align:top;font-size:18px;'>" . Field_array_Hash($per, "interval-{$t}", "10m", "blur()", null, 0, "font-size:18px;") . "</td>\n\t\t<td style='vertical-align:top;font-size:18px' class=legend nowrap>{from_date}:</td>\n\t\t<td style='vertical-align:top;font-size:18px'>" . field_date("from-date-{$t}", $_SESSION["SQUID_STATS_MEM_DATE1"], ";font-size:18px;width:160px") . "</td>\n\t\t<td style='vertical-align:top;font-size:18px'>" . Field_text("from-time-{$t}", $_SESSION["SQUID_STATS_MEM_TIME1"], ";font-size:18px;width:82px") . "</td>\n\t\t<td style='vertical-align:top;font-size:18px' class=legend nowrap>{to_date}:</td>\n\t\t<td style='vertical-align:top;font-size:18px'>" . field_date("to-date-{$t}", $_SESSION["SQUID_STATS_MEM_DATE2"], ";font-size:18px;width:160px") . "</td>\n\t\t<td style='vertical-align:top;font-size:18px'>" . Field_text("to-time-{$t}", $_SESSION["SQUID_STATS_MEM_TIME2"], ";font-size:18px;width:82px") . "</td>\n\t\t<td style='vertical-align:top;font-size:18px;;width:400px'>" . button("Go", "Run{$t}()", 18) . "</td>\n\t\t</tr>\n\t\t</table>\n\t</div>\n\t<div style='font-size:32px'>{proxy_memory_service_status}</div>\n\t<div style='width:1280px;height:550px;margin-bottom:10px' id='graph-{$t}'></div>\n\t<div style='font-size:32px'>{server_memory_consumption}</div>\n\t<div style='width:1280px;height:550px;margin-bottom:10px' id='memstats-{$t}'></div>\n\t\n\t\n\t\n\t\n\t\n\t\n<script>\n\nfunction Run{$t}(){\n\tvar date1=document.getElementById('from-date-{$t}').value;\n\tvar time1=document.getElementById('from-time-{$t}').value;\n\tvar date2=document.getElementById('to-date-{$t}').value\n\tvar time2=document.getElementById('to-time-{$t}').value;\n\tvar interval=document.getElementById('interval-{$t}').value;\n\tLoadjs('{$page}?query=yes&container=graph-{$t}&date1='+date1+'&time1='+time1+'&date2='+date2+'&time2='+time2+'&interval='+interval);\n\tLoadjs('{$page}?memstats=yes&container=memstats-{$t}&date1='+date1+'&time1='+time1+'&date2='+date2+'&time2='+time2+'&interval='+interval);\n\n}\nRun{$t}();\n</script>\t\n";
    echo $tpl->_ENGINE_parse_body($html);
}
示例#10
0
function page()
{
    $sock = new sockets();
    $ArticaTechNetInfluxRepo = unserialize(base64_decode($sock->GET_INFO("ArticaTechNetProFTPDRepo")));
    $tpl = new templates();
    $version = $sock->GET_INFO("ProFTPDVersion");
    $manual_update = $tpl->javascript_parse_text("{manual_update}");
    $html = "\n\t\t\t\n\t<div style='font-size:30px;margin-bottom:30px'>{available_versions} &nbsp;|&nbsp; {current}:&nbsp;{$version}\n\t&nbsp;|&nbsp;<a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('update.upload.php')\"\n\tstyle='text-decoration:underline'>{$manual_update}</a>\n\t&nbsp;|&nbsp;<a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('influx.refresh.update.php')\"\n\tstyle='text-decoration:underline'>{refresh}</a>\n\t\n\t\n\t</div>\n\t<table style='width:100%'>\n\t<tr>\n\t<th style='font-size:22px'>{version}</th>\n\t<th style='font-size:22px'>{OS}</th>\n\t<th style='font-size:22px'>{filename}</th>\n\t<th style='font-size:22px'>{filesize}</th>\n\t<th style='font-size:22px'>&nbsp;</tf>\n\t</tr>\t\t\t\t\n\t";
    $color = null;
    while (list($key, $array) = each($ArticaTechNetInfluxRepo)) {
        while (list($OS, $MAIN) = each($array)) {
            $URL = $MAIN["URL"];
            $VERSION = $MAIN["VERSION"];
            $FILESIZE = $MAIN["FILESIZE"];
            $FILENAME = $MAIN["FILENAME"];
            $FILESIZE = FormatBytes($FILESIZE / 1024);
            $button = button("{update2}", "Loadjs('proftpd.update.progress.php?key={$key}&OS={$OS}&filename={$FILENAME}');", 32);
            if ($color == null) {
                $color = "#F2F0F1";
            } else {
                $color = null;
            }
            $html = $html . "\n\t\t<tr style='background-color:{$color};height:80px'>\n\t\t\t<td style='font-size:28px;padding-left:10px'><center>{$VERSION}</center></td>\n\t\t\t<td style='font-size:28px;padding-left:10px'><center>{$OS}</center></td>\n\t\t\t<td style='font-size:28px;padding-left:10px;text-align:right'><a href=\"{$URL}\" target=_new style='text-decoration:underline'>{$FILENAME}</a></td>\t\n\t\t\t<td style='font-size:28px;padding-left:10px;text-align:right'>{$FILESIZE}</td>\t\n\t\t\t<td style='font-size:28px;padding-left:10px'><center>{$button}</center></td>\t\n\t\t</tr>\n\t\t";
        }
    }
    $html = $html . "</table>";
    echo $tpl->_ENGINE_parse_body($html);
}
示例#11
0
function popup()
{
    $priv = new usersMenus();
    $ct = new user($_GET["popup"]);
    $sock = new sockets();
    $lvm = new lvm_org($ct->ou);
    $array = $lvm->disklist;
    $paths["/home/{$ct->uid}"] = "/home/{$ct->uid} ({system_disk})";
    if (is_array($array)) {
        while (list($num, $val) = each($array)) {
            $sock = new sockets();
            $results = $sock->getFrameWork("cmd.php?fstab-get-mount-point=yes&dev={$num}");
            $array2 = unserialize(base64_decode($results));
            while (list($num, $mounted) = each($array2)) {
                $paths[trim("{$mounted}/{$ct->uid}")] = dirname(trim($mounted . '/' . $ct->uid) . "({dedicated_storage})");
            }
        }
    }
    $loginShell_hidden = Field_hidden('loginShell', $us->loginShell) . Field_hidden('uidNumber', $us->uidNumber);
    $loginShell = "<tr>\n\t\t\t\t\t<td align='right' nowrap class=legend {$styleTDRight}>{loginShell}:</strong>\n\t\t\t\t\t<td {$styleTDLeft}>\n\t\t\t\t\t\t\t<table style='width:100%;margin-left:-4px;'>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align=left width=1%>" . Field_text('loginShell', $us->loginShell, 'width:90px') . "</td>\n\t\t\t\t\t\t\t<td align=left>" . help_icon('{loginShellText}', true) . "</td>\n\t\t\t\t\t\t\t<td class=legend nowrap>{UidNumber}:</td>\n\t\t\t\t\t\t\t<td align=left width=1%>" . Field_text('uidNumber', $us->uidNumber, 'width:90px') . "</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>";
    $dotclear = "<tr>\n\t\t<td class=legend nowrap>{DotClearUserEnabled}:</td>\n\t\t<td align=left width=1%>" . Field_numeric_checkbox_img('DotClearUserEnabled', $us->DotClearUserEnabled) . "</td>\n\t\t<td align=left>" . help_icon('{DotClearUserEnabledText}', true) . "</td>\n\t</tr>";
    $form = Field_hidden('USER_SYSTEM_INFOS_UID', $ct->uid) . "\n\t<div style='text-align:right;margin-top:-5px;margin-bottom:9px;'><code>{home}:{$ct->homeDirectory}</code></div>\n\t<div id='ChangeUserPasswordID'>\n\t<table style='width:100%'>\n\t\n\t<tr>\n\t\t<td class=legend nowrap>{loginShell}:</td>\n\t\t<td align=left width=1%>" . Field_text('loginShell', $ct->loginShell, 'width:190px') . "</td>\n\t\t<td align=left>" . help_icon('{loginShellText}', true) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend nowrap>{homeDirectory}:</td>\n\t\t<td align=left width=1%>" . Field_array_Hash($paths, 'homeDirectory', $ct->homeDirectory) . "</td>\n\t\t<td align=left>" . help_icon('{homeDirectoryText}', true) . "</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td class=legend nowrap>{UidNumber}:</td>\n\t\t<td align=left width=1%>" . Field_text('UidNumber', $ct->uidNumber, 'width:90px') . "</td>\n\t\t<td align=left>" . help_icon('{UidNumberText}', true) . "</td>\n\t</tr>\n\t\t\n\t\t\n\t<tr><td colspan=3><hr></td></tr>\n\t<tr>\n\t\t<td colspan=3 align='right'>" . button("{edit}", "UserSystemInfosSave()") . "\n\t</tr>\n\t</table>\n\t</div>\n\t";
    $form = RoundedLightWhite($form);
    $safebox = Paragraphe("safe-box-64.png", "{coffrefort}", "{coffrefort_create_user}", "javascript:Loadjs('domains.edit.user.safebox.php?uid={$ct->uid}')");
    if (!$priv->CRYPTSETUP_INSTALLED) {
        $safebox = null;
    }
    $html = "<H1>{UserSystemInfos}</H1>\n\t<div style='margin-top:-35px;text-align:right;margin-bottom:30px;width:95%'>\n\t\t<i style='font-size:16px;font-weight:bold;padding-bottom:4px;color:white'>{$ct->DisplayName}</i>\n\t</div>\n\t<div id='UserSystemInfosSave'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>\n\t\t\t{$safebox}\n\t\t</td>\n\t\t<td valign='top'>\n\t\t\t{$form}\n\t\t</td>\n\t</tr>\n\t</table>\n\t\n\t</div>";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
function task_list()
{
    $tpl = new templates();
    $sock = new sockets();
    $ARRAY = unserialize(base64_decode($sock->getFrameWork("zarafa.php?zarafadb-processlist=yes")));
    $data = array();
    $data['page'] = 1;
    $data['total'] = 0;
    $data['rows'] = array();
    if ($_POST["query"] != null) {
        $tofind = $_POST["query"];
        $tofind = str_replace(".", "\\.", $tofind);
        $tofind = str_replace("[", "\\[", $tofind);
        $tofind = str_replace("]", "\\]", $tofind);
        $tofind = str_replace("*", ".*?", $tofind);
    }
    $c = 0;
    $seconds = $tpl->javascript_parse_text("{seconds}");
    while (list($ID, $ligne) = each($ARRAY)) {
        $color = "black";
        if ($tofind != null) {
            if (!preg_match("#{$tofind}#", $ligne[$_POST["qtype"]])) {
                continue;
            }
        }
        $c++;
        $kill = imgsimple("delete-24.png", null, "KillTHREAD('{$ID}')");
        $data['rows'][] = array('id' => md5(serialize($ligne)), 'cell' => array("<span style='font-size:14px;color:{$color}'>{$ID}</span>", "<span style='font-size:14px;color:{$color}'>{$ligne["USER"]}</span>", "<span style='font-size:14px;color:{$color}'>{$ligne["HOST"]}</span>", "<span style='font-size:14px;color:{$color}'>{$ligne["COMMAND"]}</span>", "<span style='font-size:14px;color:{$color}'>{$ligne["TIME"]}&nbsp;{$seconds}</span>", "<span style='font-size:14px;color:{$color}'>{$ligne["STATE"]}</span>", "<span style='font-size:14px;color:{$color}'>{$ligne["INFO"]}</span>", "<span style='font-size:14px;color:{$color}'>{$kill}</span>"));
    }
    $data['total'] = $c;
    echo json_encode($data);
}
示例#13
0
function tabs()
{
    $fontsize = 18;
    $tpl = new templates();
    $page = CurrentPageName();
    $users = new usersMenus();
    $sock = new sockets();
    $SquidUrgency = intval($sock->GET_INFO("SquidUrgency"));
    if ($SquidUrgency == 1) {
        echo FATAL_ERROR_SHOW_128("<div style='font-size:22px'>{proxy_in_emergency_mode}</div>\n\t\t\t<div style='font-size:18px'>{proxy_in_emergency_mode_explain}</div>\n\t\t\t<div style='text-align:right'><a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('squid.urgency.php?justbutton=yes');\"\n\t\t\tstyle='text-decoration:underline'>{disable_emergency_mode}</a></div>\t\n\t\t\t");
        return;
    }
    $array["thishour"] = '{this_hour}';
    $array["thishour2"] = '{this_hour} ({compressed})';
    while (list($num, $ligne) = each($array)) {
        if ($num == "thishour") {
            $html[] = $tpl->_ENGINE_parse_body("<li><a href=\"squid.accesslogs.php\" style='font-size:{$fontsize}px'><span>{$ligne}</span></a></li>\n");
            continue;
        }
        if ($num == "thishour2") {
            $html[] = $tpl->_ENGINE_parse_body("<li><a href=\"squid.accesslogs.compressed.php\" style='font-size:{$fontsize}px'><span>{$ligne}</span></a></li>\n");
            continue;
        }
        if ($num == "thishour3") {
            $html[] = $tpl->_ENGINE_parse_body("<li><a href=\"squid.accesslogs.day.compressed.php\" style='font-size:{$fontsize}px'><span>{$ligne}</span></a></li>\n");
            continue;
        }
        $html[] = $tpl->_ENGINE_parse_body("<li><a href=\"{$page}?{$num}={$time}\" style='font-size:{$fontsize}px'><span>{$ligne}</span></a></li>\n");
    }
    echo build_artica_tabs($html, "main_squid_logs_subtabs");
}
示例#14
0
function page()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $users = new usersMenus();
    if (!$users->APACHE_MOD_BW) {
        echo FATAL_ERROR_SHOW_128("{the_specified_module_is_not_installed}");
        return;
    }
    $servername_enc = urlencode($_GET["servername"]);
    $page = CurrentPageName();
    $tpl = new templates();
    $q = new mysql();
    $sock = new sockets();
    $free = new freeweb($_GET["servername"]);
    $Params = $free->Params;
    $t = time();
    $ForceBandWidthModule = intval($Params["ModeBw"]["ForceBandWidthModule"]);
    $BandwidthAll = intval($Params["ModeBw"]["BandwidthAll"]);
    if ($BandwidthAll == 0) {
        $BandwidthAll = 1536000;
    }
    $BandwidthAll = $BandwidthAll / 1024;
    $html = "\n\n\t<div style='width:98%' class=form>\n\t" . Paragraphe_switch_img("{apache_Bandwidth_enable}", "{apache_Bandwidth_explain}", "bandlimit", "{$free->bandlimit}", null, 650) . "\n\t<table style='width:100%'>\n\t<td colspan=3 align=right>" . button("{rules}", "Loadjs('freeweb.mod.bw.php?servername={$servername_enc}')", 24) . "</td>\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{limit_all_requests}:</td>\n\t\t<td>" . Field_checkbox("ForceBandWidthModule", 1, $ForceBandWidthModule) . "</td>\n\t\t<td></td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{default_limit}:</td>\n\t\t<td style='font-size:18px'>" . Field_text("BandwidthAll", $BandwidthAll, "font-size:18px;width:90px") . "&nbsp;KB/s</td>\n\t\t<td></td>\n\t</tr>\n\n\t<tr>\n\t\t<td colspan=3 align=right><hr>" . button("{apply}", "Save{$t}()", 24) . "</td>\n\t</tr>\n\t</table>\n\t<p>&nbsp;</p>\n\t</div>\n<script>\n\tvar xSave{$t}=function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif(results.length>0){alert(results);}\n\t\t\tRefreshTab('main_freeweb_qos');\n\t}\n\t\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('bandlimit',document.getElementById('bandlimit').value);\n\tif(document.getElementById('ForceBandWidthModule').checked){\n\t\tXHR.appendData('ForceBandWidthModule',1);\n\t}else{\n\t\tXHR.appendData('ForceBandWidthModule',0);\n\t}\n\t\n\t\n\tXHR.appendData('BandwidthAll',document.getElementById('BandwidthAll').value);\n\tXHR.appendData('servername','{$_GET["servername"]}');\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n</script>";
    echo $tpl->_ENGINE_parse_body($html);
}
示例#15
0
function popup()
{
    $users = new usersMenus();
    $users->LoadModulesEnabled();
    $page = CurrentPageName();
    $tpl = new templates();
    $kas_enabled = 0;
    $amavis_enabled = 0;
    $kas = new kas_mysql("default");
    if ($kas->GET_KEY("ACTION_SPAM_MODE") == 2) {
        $ACTION_SPAM_MODE = 1;
    }
    if ($kas->GET_KEY("ACTION_PROBABLE_MODE") == 2) {
        $ACTION_PROBABLE_MODE = 1;
    }
    if ($kas->GET_KEY("ACTION_FORMAL_MODE") == 2) {
        $ACTION_FORMAL_MODE = 1;
    }
    $amavis = new amavis();
    $sa_tag3_level_defltl = $tpl->_ENGINE_parse_body('{sa_tag3_level_deflt}');
    if ($users->kas_installed) {
        if ($users->KasxFilterEnabled == 1) {
            $kas_enabled = 1;
        }
    }
    if ($users->AMAVIS_INSTALLED) {
        if ($users->EnableAmavisDaemon == 1) {
            $amavis_enabled = 1;
        }
    }
    $html = "\n\t<div id='kas3feature'>\n\t\t<table style='width:100%' class=form>\n\t\t<tr>\n\t\t\t<td colspan=2><strong style='font-size:16px'>{APP_KAS3}</strong></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend>{spam option 1}</td>\n\t\t\t<td>" . Field_checkbox("ACTION_SPAM_MODE", 1, $ACTION_SPAM_MODE) . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend>{spam option 2}</td>\n\t\t\t<td>" . Field_checkbox("ACTION_PROBABLE_MODE", 1, $ACTION_PROBABLE_MODE) . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td class=legend>{spam option 4}</td>\n\t\t\t<td>" . Field_checkbox("ACTION_FORMAL_MODE", 1, $ACTION_FORMAL_MODE) . "</td>\n\t\t</tr>\t\n\t\t</table>\n\t</div>\n\t\n\t<div id='amavisfeature'>\n\t\t<table style='width:100%' class=form>\n\t\t\t<tr>\n\t\t\t\t<td colspan=2><strong style='font-size:16px'>{APP_AMAVIS}/{APP_SPAMASSASSIN}</strong></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend>{spam option 1} <b>({score} {$amavis->main_array["BEHAVIORS"]["sa_tag3_level_deflt"]})</b></td>\n\t\t\t\t<td>" . Field_checkbox("EnableQuarantineSpammy2", 1, $amavis->EnableQuarantineSpammy2) . "</td>\n\t\t\t</tr>\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend>{spam option 2} <b>({score} {$amavis->main_array["BEHAVIORS"]["sa_tag2_level_deflt"]})</b></td>\n\t\t\t\t<td>" . Field_checkbox("EnableQuarantineSpammy", 1, $amavis->EnableQuarantineSpammy) . "</td>\n\t\t\t</tr>\n\t\n\t\t\t</table>\n\t</div>\n\t\n\t\n\t<div style='text-align:right;width:100%'><hr>" . button("{apply}", "SaveQuarPolicies()") . "</div>\n\t\n\t<script>\n\t\tfunction DisableQuarPolicies(){\n\t\t\tvar kas_enabled={$kas_enabled};\n\t\t\tvar amavis_enabled={$amavis_enabled};\n\t\t\tif(kas_enabled!==1){\n\t\t\t\tdocument.getElementById('ACTION_SPAM_MODE').disabled=true;\n\t\t\t\tdocument.getElementById('ACTION_PROBABLE_MODE').disabled=true;\n\t\t\t\tdocument.getElementById('ACTION_FORMAL_MODE').disabled=true;\n\t\t\t}\n\t\t\t\n\t\t\tif(amavis_enabled!==1){\n\t\t\t\tdocument.getElementById('EnableQuarantineSpammy2').disabled=true;\n\t\t\t\tdocument.getElementById('EnableQuarantineSpammy').disabled=true;\n\t\t\t}\t\t\t\n\t\t\n\t\t}\n\t\t\nvar x_SaveQuarPolicies= function (obj) {\n\tvar tempvalue=obj.responseText;\n\tif(tempvalue.length>3){alert(tempvalue);}\n\tYahooWin3Hide();\n}\t\t\n\t\n\t\n\t\tfunction SaveQuarPolicies(){\n\t\t\tvar kas_enabled={$kas_enabled};\n\t\t\tvar amavis_enabled={$amavis_enabled};\t\t\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('SAVE_QUAR',1);\n\t\t\tif(kas_enabled==1){\n\t\t\t\tXHR.appendData('SAVE_KAS',1);\n\t\t\t\tif(document.getElementById('ACTION_SPAM_MODE').checked){XHR.appendData('ACTION_SPAM_MODE',1);}else{XHR.appendData('ACTION_SPAM_MODE',0);}\n\t\t\t\tif(document.getElementById('ACTION_PROBABLE_MODE').checked){XHR.appendData('ACTION_PROBABLE_MODE',1);}else{XHR.appendData('ACTION_PROBABLE_MODE',0);}\n\t\t\t\tif(document.getElementById('ACTION_FORMAL_MODE').checked){XHR.appendData('ACTION_FORMAL_MODE',1);}else{XHR.appendData('ACTION_FORMAL_MODE',0);}\n\t\t\t}\n\t\t\t\n\t\t\tif(amavis_enabled==1){\n\t\t\t\tXHR.appendData('SAVE_AMAVIS',1);\n\t\t\t\tif(document.getElementById('EnableQuarantineSpammy2').checked){XHR.appendData('EnableQuarantineSpammy2',1);}else{XHR.appendData('EnableQuarantineSpammy2',0);}\n\t\t\t\tif(document.getElementById('EnableQuarantineSpammy').checked){XHR.appendData('EnableQuarantineSpammy',1);}else{XHR.appendData('EnableQuarantineSpammy',0);}\n\t\t\t}\n\t\t\t\n\t\t\tdocument.getElementById('kas3feature').innerHTML='<center><img src=img/wait_verybig.gif></center>';\n\t\t\tdocument.getElementById('amavisfeature').innerHTML='<center><img src=img/wait_verybig.gif></center>';\n\t\t\tXHR.sendAndLoad('{$page}', 'GET',x_SaveQuarPolicies);\t\t\t\n\t\t\n\t\t}\n\t\n\t\n\tDisableQuarPolicies();\n\t</script>\n\t\n\t\n\n\n";
    echo $tpl->_ENGINE_parse_body($html);
}
示例#16
0
function save()
{
    $sock = new sockets();
    $sock->SET_INFO("EnableMacAddressFilter", $_POST["EnableMacAddressFilter"]);
    $tpl = new templates();
    echo $tpl->javascript_parse_text("{need_restart_reconfigure_proxy}", 1);
}
function popup()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $sock = new sockets();
    $ArticaHotSpotEmergency = intval($sock->GET_INFO("ArticaHotSpotEmergency"));
    $ArticaHotSpotPort = $sock->GET_INFO("ArticaHotSpotPort");
    $ArticaSSLHotSpotPort = $sock->GET_INFO("ArticaSSLHotSpotPort");
    $ArticaSplashHotSpotPort = $sock->GET_INFO("ArticaSplashHotSpotPort");
    $ArticaSplashHotSpotPortSSL = $sock->GET_INFO("ArticaSplashHotSpotPortSSL");
    if (!is_numeric($ArticaHotSpotPort)) {
        $ArticaHotSpotPort = 0;
    }
    if (!is_numeric($ArticaSplashHotSpotPort)) {
        $ArticaSplashHotSpotPort = 16080;
    }
    if (!is_numeric($ArticaSplashHotSpotPortSSL)) {
        $ArticaSplashHotSpotPortSSL = 16443;
    }
    $HotSpotGatewayAddr = $sock->GET_INFO("HotSpotGatewayAddr");
    $HotSpotGatewayAddr_org = $HotSpotGatewayAddr;
    $HotSpotGatewayAddrZ = explode(".", $HotSpotGatewayAddr);
    $HotSpotGatewayAddrz[3] = rand(1, 254);
    $HotSpotGatewayAddr = @implode(".", $HotSpotGatewayAddrz);
    $t = time();
    $ipaddr = $tpl->javascript_parse_text("{ipaddr}");
    $emergency_bt = "<center style='margin:30px'>" . button("{global_urgency_mode}", "Loadjs('squid.hostspot.emergency.enable.progress.php')", 40) . "</center>";
    if ($ArticaHotSpotEmergency == 1) {
        $emergency_bt = "<center style='margin:30px'>" . button("{disable_emergency_mode}", "Loadjs('squid.hostspot.emergency.disable.progress.php')", 40) . "</center>";
        $error = FATAL_ERROR_SHOW_128("{hotspot_in_emergency_mode_explain}");
    }
    $html = "\n\t<inpuyt type='hidden' id='layer-hotspot-maintenance' value='1'>\n\t{$error}\n\t<div style='width:98%' class=form>\n\t<center style='margin:30px'>" . button("{restart_web_service}", "Loadjs('squid.hostspot.restart.web.progress.php')", 40) . "</center>\n\t{$emergency_bt}\n\t\n\t\t\t\n\t\t\t\n\t</div>\n\t<script>\n\n\t</script>\t\t\t\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
function relayhostSave()
{
    $ou = $_GET["ou"];
    $hostname = $_GET["hostname"];
    $tpl = new templates();
    if ($_GET["relay_port"] == null) {
        $_GET["relay_port"] = 25;
    }
    if ($_GET["relay_address"] == null) {
        echo $tpl->_ENGINE_parse_body("{error_no_server_specified}");
        exit;
    }
    $tool = new DomainsTools();
    writelogs("Port={$_GET["relay_port"]} address={$_GET["relay_address"]}", __FUNCTION__, __FILE__);
    $data = $tool->transport_maps_implode($_GET["relay_address"], $_GET["relay_port"], 'smtp', $_GET["MX_lookups"]);
    writelogs("Port={$_GET["relay_port"]} address={$_GET["relay_address"]}={$data}", __FUNCTION__, __FILE__);
    $data = str_replace('smtp:', '', $data);
    //smtp_sasl_password_maps
    $main = new maincf_multi($hostname, $ou);
    if ($_GET["username"] != null) {
        $auth = "{$_GET["username"]}:{$_GET["password"]}";
        $main->SET_VALUE("relayhost_authentication", $auth);
    }
    $main->SET_VALUE("relayhost", $data);
    $sock = new sockets();
    $sock->getFrameWork("cmd.php?postfix-multi-relayhost={$_GET["hostname"]}");
}
示例#19
0
function Page()
{
    $ruleid = $_GET["ID"];
    $t = time();
    $page = CurrentPageName();
    $tpl = new templates();
    $this_feature_is_disabled_corp_license = $tpl->javascript_parse_text("{this_feature_is_disabled_corp_license}");
    $CORP = 0;
    if ($users->CORP_LICENSE) {
        $CORP = 1;
    }
    $sock = new wifidog_settings($ruleid);
    $wifidog_templates = new wifidog_templates($ruleid);
    $users = new usersMenus();
    $CORP = 0;
    if ($users->CORP_LICENSE) {
        $CORP = 1;
    }
    $BACK_REPEAT["no-repeat"] = "no-repeat";
    $BACK_REPEAT["repeat-y"] = "repeat-y";
    $BACK_REPEAT["repeat-x"] = "repeat-x";
    $BACK_REPEAT["repeat"] = "repeat";
    $html = "<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td style='width:500px;'>\n\t\t<div style='width:500px;height:500px;border-radius:5px 5px 5px 5px;\n-moz-border-radius:5px;\n\t\t-webkit-border-radius:5px;background-repeat: {$wifidog_templates->BackgroundRepeat};background-position: {$wifidog_templates->BackgroundTOP}% {$wifidog_templates->BackgroundBottom}%;\n\t\tbackground-image:url(\"{$wifidog_templates->BackgroundPicturePath}\");background-color:#{$wifidog_templates->backgroundColor}'>&nbsp;</div>\n\t\t</td>\n\t\t<td valign='top'>\n\t\t\t<table style='width:100%'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=legend style='font-size:22px'>{picture}:</td>\n\t\t\t\t\t<td style='font-size:16px'>" . button("{upload}", "Loadjs('webauth.rules.picture.upload.php?ruleid={$ruleid}')", 26) . "</td>\n\t\t\t\t</tr>\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=legend style='font-size:22px'>{top_position}:</td>\n\t\t\t\t\t<td style='font-size:22px'>" . Field_text("BackgroundTOP-{$t}", $wifidog_templates->BackgroundTOP, "font-size:22px;width:100px") . "%</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=legend style='font-size:22px'>{bottom_position}:</td>\n\t\t\t\t\t<td style='font-size:22px'>" . Field_text("BackgroundBottom-{$t}", $wifidog_templates->BackgroundBottom, "font-size:22px;width:100px") . "%</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=legend style='font-size:22px;text-transform:capitalize'>" . texttooltip("{repeat}", null) . ":</td>\n\t\t\t\t\t<td style='font-size:22px'>" . Field_array_Hash($BACK_REPEAT, "BackgroundRepeat-{$t}", $wifidog_templates->BackgroundRepeat, null, null, 0, "font-size:22px") . "</td>\n\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "Save{$t}()", "42px") . "</td>\n\t\t\t\t\t</tr>\t\t\t\t\t\t\t\n\t\t\t</table>\n\t\t</td>\n\t</tr>\n\t</table>\n\t</td>\n\t</table>\n\t</div>\n\t<script>\n\t\n\tvar xSave{$t}= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>3){alert(results);}\n\t\t\$('#HOSTPOT_RULES').flexReload();\n\t\tRefreshTab('HOTSPOT_TAB');\n\t}\t\n\t\n\tfunction Save{$t}(){\n\t\tvar CORP={$CORP};\n\t\tif(CORP==0){alert('{$this_feature_is_disabled_corp_license}');return;}\t\t\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('ruleid',{$ruleid});\n\t\tXHR.appendData('BackgroundTOP',encodeURIComponent(document.getElementById('BackgroundTOP-{$t}').value));\n\t\tXHR.appendData('BackgroundBottom',encodeURIComponent(document.getElementById('BackgroundBottom-{$t}').value));\n\t\tXHR.appendData('BackgroundRepeat',encodeURIComponent(document.getElementById('BackgroundRepeat-{$t}').value));\t\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n\t\t\n\t}\n</script>";
    echo $tpl->_ENGINE_parse_body($html);
}
示例#20
0
function popup()
{
    $tpl = new templates();
    $logs = events();
    $html = "\n\t<H1>{APP_DHCP_EVENTS}</H1>\n\t" . RoundedLightWhite("\n\t<div style='width:100%;height:350px;overflow:auto' id='DHCPDL'>{$logs}</div>");
    echo $tpl->_ENGINE_parse_body($html);
}
示例#21
0
function popup()
{
    $page = CurrentPageName();
    $html = "\n\t<H3>{PLEASE_WAIT_RESTARTING_ALL_SERVICES}</H3>\n\t<div style='margin:5px;padding:3px;border:1px solid #CCCCCC;width:95%;height:450px;overflow:auto' id='squid-restart'>\n\t</div>\n\t\n\t<script>\n\t\tLoadAjax('squid-restart','{$page}?start=yes');\n\t</script>\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
示例#22
0
function remove()
{
    $sock = new sockets();
    $sock->getFrameWork("postfix.php?postsuper-remove-all=yes&hostname={$_POST["hostname"]}");
    $tpl = new templates();
    echo $tpl->javascript_parse_text("{task_has_been_scheduled_in_background_mode}");
}
function tabs()
{
    $uuid = $_GET["uuid"];
    $fontsize = 18;
    $tpl = new templates();
    $page = CurrentPageName();
    $array["RTT"] = "{realtime}";
    $array["WEEK"] = "{this_week}";
    $array["websites"] = "{websites}";
    while (list($num, $ligne) = each($array)) {
        if ($num == "RTT") {
            $html[] = $tpl->_ENGINE_parse_body("<li><a href=\"squid.bandwidth.rtt.week.php?uuid={$uuid}&meta=1\" style='font-size:{$fontsize};font-weight:normal'><span>{$ligne}</span></a></li>\n");
            continue;
        }
        if ($num == "WEEK") {
            $html[] = $tpl->_ENGINE_parse_body("<li><a href=\"squid.bandwidth.rttw.week.php?uuid={$uuid}&meta=1\" style='font-size:{$fontsize};font-weight:normal'><span>{$ligne}</span></a></li>\n");
            continue;
        }
        if ($num == "websites") {
            $html[] = $tpl->_ENGINE_parse_body("<li><a href=\"squid.bandwidth.rweb.week.php?uuid={$uuid}&meta=1\" style='font-size:{$fontsize};font-weight:normal'><span>{$ligne}</span></a></li>\n");
            continue;
        }
        $html[] = $tpl->_ENGINE_parse_body("<li><a href=\"{$page}?{$num}=yes\" style='font-size:{$fontsize};font-weight:normal'><span>{$ligne}</span></a></li>\n");
    }
    $html = build_artica_tabs($html, 'main_bandwidth_meta_tabs');
    echo $html;
}
示例#24
0
function popup_proc()
{
    $infos = infos_proc();
    $html = "<H1>{proc_hardware_infos_text}</H1>\n\t<br>\n\t<div style='width:100%;height:400px;overflow:auto'>{$infos}</div>\n\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
function graphs()
{
    $t = $_GET["t"];
    /*
    if($t=='day'){$day='id=tab_current';$title=$t;$t="1$t";}
    if($t=='week'){$week='id=tab_current';$t="2$t";}
    if($t=='month'){$month='id=tab_current';$t="3$t";}	
    
    <div id=tablist>
    <li><a href=\"javascript:LoadAjax2('graphs','$page?graph=yes&hostname={$_GET["hostname"]}&t=day');\">{day}</a></li>
    <li><a href=\"javascript:LoadAjax2('graphs','$page?graph=yes&hostname={$_GET["hostname"]}&t=week');\">{week}</a></li>
    <li><a href=\"javascript:LoadAjax2('graphs','$page?graph=yes&hostname={$_GET["hostname"]}&t=month');\">{month}</a></li>
    </div>*/
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    header("Cache-Control: no-store, no-cache, must-revalidate");
    header("Cache-Control: post-check=0, pre-check=0", false);
    header("Pragma: no-cache");
    header("content-type:text/html");
    $md = md5(date('Ymdhis'));
    $users = new usersMenus(nul, 0, $_GET["hostname"]);
    $html = "\n<input type='hidden' id='t' value='{$t}'>\n<p class='caption'>{queue_flow_text}</p>\n<table style='width:600px' align=center>\n<tr>\n<td valign='top'>\n\t<center style='margin:4px'>\n\t\t<H5>{queue_flow_day}</H5>\n\t\t<img src='images.listener.php?uri=mailgraph/queuegraph_0.png&md={$md}'>\n\t</center>\n\t<center style='margin:4px'>\n\t\t<H5>{queue_flow_week}</H5>\n\t\t<img src='images.listener.php?uri=mailgraph/queuegraph_1.png&md={$md}'>\n\t</center>\n\t<center style='margin:4px'>\n\t\t<H5>{queue_flow_month}</H5>\n\t\t<img src='images.listener.php?uri=mailgraph/queuegraph_2.png&md={$md}'>\n\t</center>\n\t<center style='margin:4px'>\n\t\t<H5>{queue_flow_year}</H5>\n\t\t<img src='images.listener.php?uri=mailgraph/queuegraph_3.png&md={$md}'>\n\t</center>\t\t\t\t\t\t\n</td>\n</tr>\n</table>\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
示例#26
0
function page()
{
    $sock = new sockets();
    $ArticaTechNetSquidRepo = unserialize(base64_decode($sock->GET_INFO("ArticaTechNetSquidRepo")));
    $tpl = new templates();
    $realsquidversion = $sock->getFrameWork("squid.php?full-version=yes");
    $many = texttooltip("{manual_update}", "position:left:{manual_update_proxy_explain}", "Loadjs('squid.compilation.status.php')", null, 0, "font-size:30px;");
    $html = "\n\t\t\t\n\t<div style='font-size:30px;margin-bottom:30px'>{available_versions} &nbsp;|&nbsp; {current}:&nbsp;{$realsquidversion} &nbsp;|&nbsp; {$many}</div>\n\t<table style='width:100%'>\n\t<tr>\n\t<th style='font-size:22px'>{version}</th>\t\t\n\t<th style='font-size:22px'>{filename}</th>\n\t<th style='font-size:22px'>{filesize}</th>\n\t<th style='font-size:22px'>&nbsp;</tf>\n\t</tr>\t\t\t\t\n\t";
    while (list($key, $array) = each($ArticaTechNetSquidRepo)) {
        $URL = $array["URL"];
        $VERSION = $array["VERSION"];
        $FILESIZE = $array["FILESIZE"];
        $FILENAME = $array["FILENAME"];
        $FILESIZE = FormatBytes($FILESIZE / 1024);
        $button = button("{update2}", "Loadjs('squid.update.progress.php?key={$key}&filename={$FILENAME}');", 22);
        if ($realsquidversion == $VERSION) {
            $button = "{current}";
        }
        if ($color == null) {
            $color = "#F2F0F1";
        } else {
            $color = null;
        }
        $html = $html . "\n\t\t<tr style='background-color:{$color};height:80px'>\n\t\t\t<td style='font-size:22px;padding-left:10px'>{$VERSION}</td>\n\t\t\t<td style='font-size:22px;padding-left:10px'><a href=\"{$URL}\" target=_new style='text-decoration:underline'>{$FILENAME}</a></td>\t\n\t\t\t<td style='font-size:22px;padding-left:10px'>{$FILESIZE}</td>\t\n\t\t\t<td style='font-size:22px;padding-left:10px'><center>{$button}</center></td>\t\n\t\t</tr>\n\t\t";
    }
    $html = $html . "</table>";
    echo $tpl->_ENGINE_parse_body($html);
}
示例#27
0
function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $html = "\n\t<div class=explain style='margin-top:10px'>{ipblocks_explain}</div>\n\t<table style='width:100%' class=form>\n\t<tbody>\n\t<tr>\n\t\t<td class=legend>{only_selected}</td>\n\t\t<td>" . Field_checkbox("GEOOnlySelected", 1, null, "RefreshGeoipApacheList()") . "</td>\n\t</tr>\n\t</tbody>\n\t</table>\t\n\t<div id='geoip-apache-list' style='height:600px;overflow:auto;width:100%'></div>\n\n\t\n\t\n\t<script>\n\t\tfunction RefreshGeoipApacheList(){\n\t\t\tonlyS=0;\n\t\t\tif(document.getElementById('GEOOnlySelected').checked){onlyS=1;}\n\t\t\tLoadAjax('geoip-apache-list','{$page}?countries-list=yes&servername={$_GET["servername"]}&onlyS='+onlyS);\n\t\t\t}\n\t\t\t\n\t\tRefreshGeoipApacheList();\n\t</script>\n\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
function items()
{
    //1.4.010916
    $t = $_GET["t"];
    $tpl = new templates();
    $MyPage = CurrentPageName();
    $q = new mysql();
    $CommonName = $_GET["CommonName"];
    $data = array();
    $data['page'] = 1;
    $data['total'] = 0;
    $data['rows'] = array();
    $title = $tpl->javascript_parse_text("{privkey}");
    $jsEdit = "Loadjs('certificates.center.srca.php?CommonName={$CommonName}&js=yes');";
    $urljs = "<a href=\"javascript:blur();\" OnClick=\"{$jsEdit}\" style='font-size:22px;text-decoration:underline'>";
    $data['rows'][] = array('id' => "srca", 'cell' => array("<img src='img/certificate-32.png'>", "<span style='font-size:22px;'>{$urljs}{$title}</a></span>", "<span style='font-size:22px;'>PRIVATE KEY</a></span>"));
    $title = $tpl->javascript_parse_text("{RSA_PRIVATE_KEY}");
    $jsEdit = "Loadjs('certificates.center.privkey.php?CommonName={$CommonName}&js=yes');";
    $urljs = "<a href=\"javascript:blur();\" OnClick=\"{$jsEdit}\" style='font-size:22px;text-decoration:underline'>";
    $data['rows'][] = array('id' => "privkey", 'cell' => array("<img src='img/certificate-32.png'>", "<span style='font-size:22px;'>{$urljs}{$title}</a></span>", "<span style='font-size:22px;'>RSA PRIVATE KEY</a></span>"));
    $title = $tpl->javascript_parse_text("{certificate}");
    $jsEdit = "Loadjs('certificates.center.crt.php?CommonName={$CommonName}&js=yes');";
    $urljs = "<a href=\"javascript:blur();\" OnClick=\"{$jsEdit}\" style='font-size:22px;text-decoration:underline'>";
    $data['rows'][] = array('id' => "certificate", 'cell' => array("<img src='img/certificate-32.png'>", "<span style='font-size:22px;'>{$urljs}{$title}</a></span>", "<span style='font-size:22px;'>CERTIFICATE</a></span>"));
    $title = $tpl->javascript_parse_text("{CSR}");
    $jsEdit = "Loadjs('certificates.center.csr.php?CommonName={$CommonName}&js=yes');";
    $urljs = "<a href=\"javascript:blur();\" OnClick=\"{$jsEdit}\" style='font-size:22px;text-decoration:underline'>";
    $data['rows'][] = array('id' => "CSR", 'cell' => array("<img src='img/certificate-32.png'>", "<span style='font-size:22px;'>{$urljs}{$title}</a></span>", "<span style='font-size:22px;'>CERTIFICATE REQUEST</a></span>"));
    $data['total'] = count($data['rows']);
    echo json_encode($data);
}
示例#29
0
function popup()
{
    $form = "<table style='width=99%'>\n\t<tr>\n\t\t<th>{ip_address}</th>\n\t\t<th>{netmask}</th>\n\t\t<th>{gateway}</th>\n\t</tr>\n\t<tr>\n\t\t<td>" . Field_text("dhcpd_ip", null) . "</td>\n\t\t<td>" . Field_text("dhcpd_netmask", null) . "</td>\n\t\t<td>" . Field_text("dhcpd_gateway", null) . "</td>\n\t</tR>\n\t<tr>\n\t\t<td colspan=3 align='right'><hr><input type='button' OnClick=\"javascript:AddRouteDHCPD();\" value='{add}&nbsp;&nbsp;&raquo;'></td>\n\t</tr>\n\t</table>\n\t";
    $html = "\n\t\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top' width=1%><img src='img/computer-routes-128.png'></td>\n\t\t<td valign='top'>\n\t\t\t\t<div class=explain>{APP_DHCP_ROUTES_EXPLAIN}</div>\n\t\t\t\t{$form}\n\t\t\t\t<br>\n\t\t\t\t" . RoundedLightWhite("<div style='width:100%;height:120px;overflow:auto' id='dhcpdroutes'>" . popup_list() . "</div>") . "\n\t\t</td>\n\t</tr>\n\t</table>\n\t\n\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
示例#30
0
function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $cache_mgr_user = $sock->GET_INFO("cache_mgr_user");
    $cachemgr_passwd = $sock->GET_INFO("cachemgr_passwd");
    $cachemgr_left_menu = $sock->GET_INFO("cachemgr_left_menu");
    $sql = "SELECT servername,useSSL FROM freeweb WHERE `groupware`='cachemgr' LIMIT 0,1";
    $q = new mysql();
    $ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
    if ($ligne["servername"] != null) {
        $FreeWebListenPort = $sock->GET_INFO("FreeWebListenPort");
        $FreeWebListenSSLPort = $sock->GET_INFO("FreeWebListenSSLPort");
        if (!is_numeric($FreeWebListenPort)) {
            $FreeWebListenPort = 80;
        }
        if (!is_numeric($FreeWebListenSSLPort)) {
            $FreeWebListenSSLPort = 443;
        }
        $prefix = "http";
        if ($ligne["useSSL"] == 1) {
            $FreeWebListenPort = $FreeWebListenSSLPort;
            $prefix = "https";
        }
        $link = "{$prefix}://{$ligne["servername"]}:{$FreeWebListenPort}";
        $linkjs = "javascript:s_PopUpFull('{$link}',800,800,'Squid Cache Manager')";
        $link = "<a href=\"javascript:blur();\" OnClick=\"{$linkjs}\" style='font-size:14px;text-decoration:underline'>{$link}</a>";
        $edit_www = "<a href=\"javascript:blur();\" OnClick=\"Loadjs('freeweb.edit.php?hostname={$ligne["servername"]}');\" style='font-size:14px;text-decoration:underline'>{edit}</a>";
    }
    $html = "\n\t<div class=explain>{cachemgr_text}</div><div style='text-align:right;margin-bottom:5px'><i>{$link}</i></div>\n\t<div id='cachemgr-div'>\n\t<div style='font-size:16px'>{cachemgr}:: {authentication}</div>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend>{add_to_left_menu}:</td>\n\t\t<td>" . Field_checkbox("cachemgr_left_menu", 1, $cachemgr_left_menu, "cachemgr_left_menu_save();") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend>{username}:</td>\n\t\t<td>" . Field_text("cache_mgr_user", "{$cache_mgr_user}", "font-size:14px;padding:3px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{password}:</td>\n\t\t<td>" . Field_password("cachemgr_passwd", "{$cachemgr_passwd}", "font-size:14px;padding:3px") . "</td>\n\t</tr>\t\n\t</table>\n\t<br>\n\t\n\t<div style='font-size:16px'>{cachemgr}:: {website_name}</div>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend>{website}:</td>\n\t\t<td>" . Field_text("website", $ligne["servername"], "font-size:14px;padding:3px;width:220px") . "&nbsp;{$edit_www}</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 align='right'>\n\t\t<hr>" . button("{apply}", "SaveCacheManagerParams()") . "</td>\n\t</tr>\n\t</table>\n\t<br>\t\n\t</div>\n\t<script>\n\n\tvar x_SaveCacheManagerParams= function (obj) {\n\t\tvar tempvalue=obj.responseText;\n\t\tif(tempvalue.length>3){alert(tempvalue);}\t\n\t\t\n\t}\n\n\tvar x_cachemgr_left_menu_save= function (obj) {\n\t\tvar tempvalue=obj.responseText;\n\t\tif(tempvalue.length>3){alert(tempvalue);}\t\n\t\tCacheOff();\n\t}\t\n\t\n\tfunction cachemgr_left_menu_save(){\n\t\tvar XHR = new XHRConnection();\n\t\tif(document.getElementById('cachemgr_left_menu').checked){\n\t\t\tXHR.appendData('cachemgr_left_menu',1)\n\t\t}else{\n\t\t\tXHR.appendData('cachemgr_left_menu',0)\n\t\t}\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_cachemgr_left_menu_save);\n\t\t\n\t}\n\t\n\t\n\tfunction SaveCacheManagerParams(key){\n\t\tvar XHR = new XHRConnection();\n\t\tvar a=document.getElementById('cache_mgr_user').value;\n\t\tif(a.length<3){return;}\n\t\ta=document.getElementById('cachemgr_passwd').value;\n\t\tif(a.length<3){return;}\t\t\n\t\ta=document.getElementById('website').value;\n\t\tif(a.length<3){return;}\t\t\t\n\t\t\n\t\tXHR.appendData('cache_mgr_user',document.getElementById('cache_mgr_user').value);\t\n\t\tXHR.appendData('cachemgr_passwd',document.getElementById('cachemgr_passwd').value);\n\t\tXHR.appendData('website',document.getElementById('website').value);\n\t\tdocument.getElementById('cachemgr-div').innerHTML='<center style=\"width:100%\"><img src=img/wait_verybig.gif></center>';\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_SaveCacheManagerParams);\n\t\t}\t\n\n\t</script>\t\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}