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);
}
示例#2
0
function license_info()
{
    $sock = new sockets();
    $datas = base64_decode($sock->getFrameWork('kav4proxy.php?license-infos&type=' . $_GET["license-type"]));
    $tp = explode("\n", $datas);
    $html = "<center style='width:97%' class=form><table style='width:100%' >\n\t<tbody>";
    while (list($num, $val) = each($tp)) {
        if (trim($val) == null) {
            continue;
        }
        $val = htmlspecialchars($val);
        if (strlen($val) > 89) {
            $val = texttooltip(substr($val, 0, 86) . '...', $val, null, null, 1);
        }
        if (preg_match("#Error checking#", $val)) {
            $val = "<strong style='color:red'>{$val}</strong>";
        }
        if (preg_match("#Expiration date#", $val)) {
            $val = "<strong style='color:blue'>{$val}</strong>";
        }
        if (preg_match("#Count:#", $val)) {
            $val = "<strong style='color:blue'>{$val}</strong>";
        }
        if (preg_match("#Lifespan:#", $val)) {
            $val = "<strong style='color:blue'>{$val}</strong>";
        }
        if (preg_match("#Objs:#", $val)) {
            $val = "<strong style='color:blue'>{$val}</strong>";
        }
        $html = $html . "\n\t\t\t<tr>\n\t\t\t\t<td style='font-size:12px'>\n\t\t\t\t\t<code>{$val}</code>\n\t\t\t\t</td>\n\t\t\t</tr>";
    }
    $html = $html . "</tbody>\n\t</table></center>";
    echo $html;
}
function page()
{
    $t = time();
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $DirectoriesMonitorH = intval($sock->GET_INFO("DirectoriesMonitorH"));
    $DirectoriesMonitorM = intval($sock->GET_INFO("DirectoriesMonitorM"));
    $DisksBenchs = intval($sock->GET_INFO("DisksBenchs"));
    $t = time();
    for ($i = 0; $i < 24; $i++) {
        $H = $i;
        if ($i < 10) {
            $H = "0{$i}";
        }
        $Hours[$i] = $H;
    }
    for ($i = 0; $i < 60; $i++) {
        $M = $i;
        if ($i < 10) {
            $M = "0{$i}";
        }
        $Mins[$i] = $M;
    }
    $EACH[0] = "{never}";
    $EACH[3] = "{each}: 3 {hours}";
    $EACH[4] = "{each}: 4 {hours}";
    $EACH[5] = "{each}: 5 {hours}";
    $EACH[6] = "{each}: 6 {hours}";
    $EACH[12] = "{each}: 12 {hours}";
    $EACH[24] = "{each}: 1 {day}";
    $html = "\n\t<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t<tr style='height:90px'>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{disks_benchmarks}", "{disks_benchmarks_explain}") . "</td>\n\t\t<td>" . Field_array_Hash($EACH, "DisksBenchs", $DisksBenchs, "style:font-size:22px") . "</td>\n\t</tr>\n\n\t<tr style='height:90px'>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{scan_filesystem_size}", "{scan_filesystem_size_explain}") . "</td>\n\t\t<td style='font-size:22px' colspan=2>\n\t\t\t\t<table style='width:135px'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td style='font-size:22px'>" . Field_array_Hash($Hours, "DirectoriesMonitorH", $DirectoriesMonitorH, "style:font-size:22px;padding:10px") . "</td>\n\t\t\t\t\t<td style='font-size:22px'>:</td>\n\t\t\t\t\t<td style='font-size:22px'>" . Field_array_Hash($Mins, "DirectoriesMonitorM", $DirectoriesMonitorM, "style:font-size:22px;padding:10px") . "</td>\n\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "Save{$t}();", 30) . "</td>\n\t</tr>\n\t</table>\n\t</div>\n<script>\nvar xSave{$t}=function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>0){alert(results);return;}\t\n\tRefreshTab('btrfs-tabs');\n}\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('DisksBenchs',document.getElementById('DisksBenchs').value);\n\tXHR.appendData('DirectoriesMonitorH',document.getElementById('DirectoriesMonitorH').value);\n\tXHR.appendData('DirectoriesMonitorM',document.getElementById('DirectoriesMonitorM').value);\n    XHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n</script>\t\t\t\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
示例#4
0
function page()
{
    $usersmenus = new usersMenus();
    $kas = new kas_filter();
    $pattern_date = $kas->GetPatternDate();
    $linkPattern = texttooltip('{ave_pattern_date}', '{time_date_com_text_moscow}', 'http://www.timeanddate.com/worldclock/city.html?n=166');
    if ($usersmenus->AsPostfixAdministrator == true or $usersmenus->AllowChangeKas == true or $usersmenus->AllowChangeAntiSpamSettings == true) {
    } else {
        header('location:users.index.php');
        exit;
    }
    $html = "\n<div class='caption'><strong>{$linkPattern}:&nbsp;{$pattern_date}</div>\n<table style='width:600px' align=center>\n<tr>\n<td width=1% valign='top'><img src='img/caterpillarkas.jpg'>\n</td>\n<td valign='top'>\n\t<table>";
    if ($usersmenus->AsPostfixAdministrator == true) {
        $html = $html . "<tr><td valign='top'>  " . Paragraphe('folder-caterpillar.jpg', '{antispam_engine}', '{antispam_engine_text}', 'kas.engine.settings.php') . "</td></tr>\n\t\t<tr><td valign='top' >" . Paragraphe('folder-lego.jpg', '{product_update_settings}', '{product_update_settings_text}', 'kas.keepupd2date.settings.php') . "</td></tr>\n\t\t<tr><td valign='top' >" . Paragraphe('folder-licence.jpg', '{product_licence}', '{product_licence_text}', 'kas.licence.settings.php') . "</td></tr>";
    }
    if ($usersmenus->AllowChangeKas == true) {
        $artica = new artica_general();
        if ($artica->EnableGroups == 'yes') {
            $html = $html . "<tr><td valign='top'>  " . Paragraphe('folder-groupe.jpg', '{antispam_rules_group}', '{antispam_rules_group_text}', 'kas.group.rules.php') . "</td></tr>";
        } else {
            $html = $html . "<tr><td valign='top'>  " . Paragraphe('folder-rules-64.jpg', '{antispam_rules}', '{antispam_rules_text}', 'kas.group.rules.php') . "</td></tr>";
        }
    }
    if ($usersmenus->AllowChangeAntiSpamSettings == true) {
        $html = $html . "<tr><td valign='top'>  " . Paragraphe('folder-userrules-64.jpg', '{antispam_user_rules}', '{antispam_user_rules_text}', 'kas.user.rules.php') . "</td></tr>";
    }
    $html = $html . "</table>\n</td>\n</tr>\n</table>\n";
    $tpl = new template_users('Kaspersky Anti-spam', $html);
    echo $tpl->web_page;
}
示例#5
0
function popup()
{
    $tpl = new templates();
    $t = $_GET["t"];
    $page = CurrentPageName();
    $ldap = new clladp();
    if (!isset($_GET["ou"])) {
        $_GET["ou"] = null;
    }
    if ($_GET["ou"] == null) {
        $title = "OpenLDAP";
        $ous = $ldap->hash_get_ou(true);
    } else {
        $title = $_GET["ou"];
        $ous[$title] = true;
    }
    $style = " OnMouseOver=\";this.style.cursor='pointer';\" OnMouseOut=\";this.style.cursor='default';\"";
    $organization = $tpl->_ENGINE_parse_body("{organization}");
    $f[] = "<ul id='root-{$t}' class='jqueryFileTree'>";
    $f[] = "<li class=root>Root: {$title}";
    $f[] = "<ul id='mytree-{$t}' class='jqueryFileTree'>";
    while (list($ou, $ligne) = each($ous)) {
        $CLASS = "directory";
        $id = md5($ou);
        $js = texttooltip("{$organization} {$ou}", $ou, "TreeOuExpand{$t}('{$id}','{$ou}');");
        $f[] = "<li class={$CLASS} collapsed id='{$id}' {$style}>{$js}</li>";
    }
    $f[] = "</ul>";
    $f[] = "</li>";
    $f[] = "</ul>";
    $f[] = "<script>\nvar mem_id{$t}='';\nvar mem_path{$t}='';\n\nvar xTreeOuExpand{$t}= function (obj) {\n\tvar results=obj.responseText;\n\t\$('#'+mem_id{$t}).removeClass('collapsed');\n\tif(\$('#'+mem_id{$t}).hasClass('directorys')){\$('#'+mem_id{$t}).addClass('expandeds');}\n\tif(\$('#'+mem_id{$t}).hasClass('directory')){\$('#'+mem_id{$t}).addClass('expanded');}\n\t\$('#'+mem_id{$t}).append(results);\n}\n\n\tfunction TreeOuExpand{$t}(id,ou){\n\t\tmem_id{$t}=id;\n\t\tmem_path{$t}=ou;\n\t\tvar expanded=false;\n\t\tif(\$('#'+mem_id{$t}).hasClass('expanded')){expanded=true;}\n\t\tif(!expanded){if(\$('#'+mem_id{$t}).hasClass('expandeds')){expanded=true;}}\n\t\t\t\n\t\tif(!expanded){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('browse-ou',ou);\n\t\t\tXHR.appendData('function','{$_GET["function"]}');\n\t\t\tXHR.sendAndLoad('{$page}', 'GET',xTreeOuExpand{$t});\n\t\t}else{\n\t\t\t\$('#'+mem_id{$t}).children('ul').empty();\n\t\t\tif(\$('#'+mem_id{$t}).hasClass('expanded')){\$('#'+mem_id{$t}).removeClass('expanded');}\n\t\t\tif(\$('#'+mem_id{$t}).hasClass('expandeds')){\$('#'+mem_id{$t}).removeClass('expandeds');}\n\t\t\t\$('#'+mem_id{$t}).addClass('collapsed');\n\t\n\t\t}\n\t}\n\t\n\t\t\n</script>";
    echo @implode("\n", $f);
}
示例#6
0
function tabs()
{
    $page = CurrentPageName();
    $tpl = new templates();
    if (!is_file("/usr/lib/ecap_adapter_gzip.so")) {
        echo FATAL_ERROR_SHOW_128("<div style='font-size:26px'>{ERROR_MISSING_MODULE_UPDATE_PROXY}</div>\n\t\t\t\t<center style='font-size:22px;margin:30px;font-weight:bold'>3.5.8-20150910-r13912 {or_above}</div>\n\t\t\t\t<p style='font-size:42px;text-align:right;margin-top:30px'>" . texttooltip("{update_proxy_engine}", "position:top:{proxy_engine_available_explain}", "javascript:LoadProxyUpdate();") . "</p>");
        die;
    }
    $tpl = new templates();
    $array["status"] = '{status}';
    $fontsize = "22";
    while (list($num, $ligne) = each($array)) {
        if ($num == "exclude") {
            $html[] = $tpl->_ENGINE_parse_body("<li>\n\t\t\t\t\t<a href=\"squid.hosts.blks.php?popup=yes&blk=6\" style='font-size:{$fontsize}'>\n\t\t\t\t\t<span>{$ligne}</span></a></li>\n");
            continue;
        }
        if ($num == "exclude-www") {
            $html[] = $tpl->_ENGINE_parse_body("<li><a href=\"c-icap.wwwex.php\" style='font-size:{$fontsize}'>\n\t\t\t\t\t\t\t<span style='font-size:{$fontsize}'>{$ligne}</span></a></li>\n");
            continue;
        }
        $html[] = $tpl->_ENGINE_parse_body("<li><a href=\"{$page}?{$num}=yes\" style='font-size:{$fontsize}px;'>\n\t\t\t\t<span style='font-size:{$fontsize}px;'>{$ligne}</span></a></li>\n");
    }
    $html = build_artica_tabs($html, 'main_ecapGzip_tabs', 1490) . "<script>LeftDesign('webfiltering-white-256-opac20.png');</script>";
    echo $html;
}
示例#7
0
function homebind_list($userid)
{
    $user = new user($userid);
    if (!is_array($user->homeDirectoryBinded)) {
        return null;
    }
    $html = "<table style='width:100%'>\n\t<tr>\n\t\t\n\t\t<th colspan=2>{source}</th>\n\t\t<th colspan=3>{target}</th>\n\t</tr>";
    $sock = new sockets();
    while (list($num, $val) = each($user->homeDirectoryBinded)) {
        if ($val == null) {
            return null;
        }
        if (strlen($val) > 39) {
            $dir = texttooltip(substr($val, 0, 36) . "...", $val);
        } else {
            $dir = $val;
        }
        $tt = $user->homeDirectory . "/" . basename($val);
        if (strlen($tt) > 39) {
            $dir = texttooltip(substr($tt, 0, 36) . "...", $tt);
        }
        $mnt = trim($sock->getfile("ismounted:{$val};{$tt}"));
        if ($mnt == "FALSE") {
            $img = imgtootltip("status_critical.png", '{error_not_mounted},{click_to_mount}', "homebindMount({$num})");
        } else {
            $img = imgtootltip("status_ok.png", '{mounted},{click_to_dismount}', "homebindUMount({$num})");
        }
        $html = $html . "\n\t\t<tr " . CellRollOver() . ">\n\t\t\t<td width=1%  valign='middle'>{$img}</td>\n\t\t\t<td width=50% valign='middle'>{$dir}</td>\n\t\t\t<td width=1%  valign='middle'><img src='img/fw_bold.gif'></td>\n\t\t\t<td width=50% valign='middle'>{$tt}</strong></td>\n\t\t\t<td width=1%  valign='middle'>" . imgtootltip("ed_delete.gif", "{delete}", "homebindDMount({$num})") . "</td>\n\t\t</tr>\n\t\t\n\t\t";
    }
    $html = $html . "</table>";
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($html);
}
示例#8
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);
}
示例#9
0
function popup_list()
{
    $tpl = new templates();
    $sock = new sockets();
    $array = unserialize(base64_decode($sock->getFrameWork("cmd.php?samba-events-list=yes")));
    if (!is_array($array)) {
        echo $tpl->_ENGINE_parse_body("<H2>{error_no_datas}</H2>");
        exit;
    }
    $html = "\n\t<table style='width:100%'>\n\t<tr>\n\t\t<th>&nbsp;</th>\n\t\t<th>{filename}</th>\n\t\t<th>{size}</th>\n\t\t<th>&nbsp;</th>\n\t</tr>\n\t";
    while (list($filename, $size) = each($array)) {
        $img = "30-computer.png";
        if (preg_match("#log\\.(.+)\$#", $filename, $re)) {
            $hostname = $re[1];
        }
        $text_addon = null;
        if (preg_match("#winbindd#", $filename)) {
            $img = "30-logs.png";
            $text_addon = " ({APP_SAMBA_WINBIND})";
        }
        if (preg_match("#nmbd#", $filename)) {
            $img = "30-logs.png";
            $text_addon = " ({APP_SAMBA_NMBD})";
        }
        if (preg_match("#smbd#", $filename)) {
            $img = "30-logs.png";
            $text_addon = " ({APP_SAMBA_SMBD})";
        }
        $html = $html . "\n\t\t<tr " . CellRollOver() . ">\n\t\t\t<td width=1%>" . imgtootltip($img, "{download}", "SambaDownloadEvent('{$filename}')") . "</td>\n\t\t\t<td><strong style='font-size:13px'>" . texttooltip("{$hostname}{$text_addon}", "{download}", "SambaDownloadEvent('{$filename}')", null, 0, "font-size:13px") . "</td>\n\t\t\t<td><strong style='font-size:13px'>" . FormatBytes($size) . "</td>\n\t\t\t<td width=1%>" . imgtootltip("delete-30.png", "{delete}", "SambaDeleteEvent('{$filename}')") . "</td>\n\t\t</tr>\n\t\t";
    }
    $html = $html . "</table>";
    echo $tpl->_ENGINE_parse_body($html);
}
示例#10
0
function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $Param = unserialize(base64_decode($sock->GET_INFO("MimeDefangServiceOptions")));
    $t = time();
    if (!is_numeric($Param["DEBUG"])) {
        $Param["DEBUG"] = 0;
    }
    if (!is_numeric($Param["MX_REQUESTS"])) {
        $Param["MX_REQUESTS"] = 200;
    }
    if (!is_numeric($Param["MX_MINIMUM"])) {
        $Param["MX_MINIMUM"] = 2;
    }
    if (!is_numeric($Param["MX_MAXIMUM"])) {
        $Param["MX_MAXIMUM"] = 10;
    }
    if (!is_numeric($Param["MX_MAX_RSS"])) {
        $Param["MX_MAX_RSS"] = 30000;
    }
    if (!is_numeric($Param["MX_MAX_AS"])) {
        $Param["MX_MAX_AS"] = 90000;
    }
    if (!is_numeric($Param["MX_TMPFS"])) {
        $Param["MX_TMPFS"] = 0;
    }
    $MimeDefangVersion = $sock->GET_INFO("MimeDefangVersion");
    $html = "\n\t<div style='font-size:40px;margin:bottom:40px;text-align:right'>{APP_MIMEDEFANG} v{$MimeDefangVersion} <span style='font-size:18px'>(" . texttooltip("{reload_service}", "{reload_service_text}", "MimeDefangCompileRules()") . ")</span></div>\n\t<table style='width:100%' class=form>\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{debug}:</td>\n\t\t<td>" . Field_checkbox_design("DEBUG-{$t}", 1, $Param["DEBUG"]) . "</td>\n\t\t\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{workingdir_in_memory}", "{workingdir_in_memory_text}") . ":</td>\n\t\t<td style='font-size:22px'>" . Field_text("MX_TMPFS-{$t}", $Param["MX_TMPFS"], "font-size:22px;width:90px") . "&nbsp;M</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{max_requests}", "{MX_REQUESTS_TEXT}") . ":</td>\n\t\t<td>" . Field_text("MX_REQUESTS-{$t}", $Param["MX_REQUESTS"], "font-size:22px;width:90px") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{MX_MINIMUM}", "{MX_MINIMUM_TEXT}") . ":</td>\n\t\t<td>" . Field_text("MX_MINIMUM-{$t}", $Param["MX_MINIMUM"], "font-size:22px;width:90px") . "</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{MX_MAXIMUM}", "{MX_MAXIMUM}") . ":</td>\n\t\t<td>" . Field_text("MX_MAXIMUM-{$t}", $Param["MX_MAXIMUM"], "font-size:22px;width:90px") . "</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{MX_MAX_RSS}", "{MX_MAX_RSS_TEXT}") . ":</td>\n\t\t<td style='font-size:22px'>" . Field_text("MX_MAX_RSS-{$t}", $Param["MX_MAX_RSS_TEXT"], "font-size:22px;width:110px") . "&nbsp;KB</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{MX_MAX_AS}", "{MX_MAX_AS_TEXT}") . ":</td>\n\t\t<td style='font-size:22px'>" . Field_text("MX_MAX_AS-{$t}", $Param["MX_MAX_AS"], "font-size:22px;width:110px") . "&nbsp;KB</td>\n\t</tr>\t\n\t<tr>\n\t\t<td colspan=3 align='right'><hr>" . button("{apply}", "SaveMimeService{$t}()", "40") . "</td>\n\t</tr>\t\n\t</table>\n\n\t<script>\n\t\tfunction MimeDefangCompileRules(){\n\t\tLoadjs('mimedefang.compile.php');\n\t}\n\t\n\t\n\t\tvar x_SaveMimeService{$t}= function (obj) {\n\t\t\tvar tempvalue=obj.responseText;\n\t\t\tif(tempvalue.length>3){alert(tempvalue)};\n\t\t\tLoadjs('mimedefang.compile.php');\n\t\t}\t\t\n\t\n\t\tfunction SaveMimeService{$t}(){\n\t\tvar XHR = new XHRConnection();  \n\t\t  var DEBUG=0;\n\t\t  if(document.getElementById('DEBUG-{$t}').checked){DEBUG=1;}\n\t      XHR.appendData('MX_MAX_AS',document.getElementById('MX_MAX_AS-{$t}').value);\n\t      XHR.appendData('MX_MAX_RSS',document.getElementById('MX_MAX_RSS-{$t}').value);\n\t      XHR.appendData('MX_MAXIMUM',document.getElementById('MX_MAXIMUM-{$t}').value);\n\t      XHR.appendData('MX_MINIMUM',document.getElementById('MX_MINIMUM-{$t}').value);\n\t      XHR.appendData('MX_REQUESTS',document.getElementById('MX_REQUESTS-{$t}').value);\n\t      XHR.appendData('MX_TMPFS',document.getElementById('MX_TMPFS-{$t}').value);\n\t      XHR.appendData('DEBUG',DEBUG);\n\t      XHR.sendAndLoad('{$page}', 'POST',x_SaveMimeService{$t});\n\t\t}\n\t</script>\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
function Page()
{
    $ruleid = $_GET["ID"];
    $t = time();
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new wifidog_settings($ruleid);
    $ArticaHotSpotNowPassword = intval($sock->GET_INFO("ArticaHotSpotNowPassword"));
    $ENABLED_REDIRECT_LOGIN = intval($sock->GET_INFO("ENABLED_REDIRECT_LOGIN"));
    $ArticaSplashHotSpotEndTime = intval($sock->GET_INFO("ArticaSplashHotSpotEndTime"));
    $ENABLED_META_LOGIN = intval($sock->GET_INFO("ENABLED_META_LOGIN"));
    $USE_TERMS = intval($sock->GET_INFO("USE_TERMS"));
    $ArticaSplashHotSpotCacheAuth = intval($sock->GET_INFO("ArticaSplashHotSpotCacheAuth"));
    $USE_MYSQL = intval($sock->GET_INFO("USE_MYSQL"));
    $USE_ACTIVEDIRECTORY = intval($sock->GET_INFO("USE_ACTIVEDIRECTORY"));
    $Timez[0] = "{unlimited}";
    $Timez[30] = "30 {minutes}";
    $Timez[60] = "1 {hour}";
    $Timez[120] = "2 {hours}";
    $Timez[180] = "3 {hours}";
    $Timez[360] = "6 {hours}";
    $Timez[720] = "12 {hours}";
    $Timez[1440] = "1 {day}";
    $Timez[2880] = "2 {days}";
    $Timez[10080] = "1 {week}";
    $Timez[20160] = "2 {weeks}";
    $Timez[40320] = "1 {month}";
    $ENABLED_AUTO_LOGIN = intval($sock->GET_INFO("ENABLED_AUTO_LOGIN"));
    $USE_ACTIVEDIRECTORY = intval($sock->GET_INFO("USE_ACTIVEDIRECTORY"));
    $ALLOW_RECOVER_PASS = intval($sock->GET_INFO("ALLOW_RECOVER_PASS"));
    $DO_NOT_AUTENTICATE = intval($sock->GET_INFO("DO_NOT_AUTENTICATE"));
    $LIMIT_BY_SIZE = intval($sock->GET_INFO("LIMIT_BY_SIZE"));
    $LANDING_PAGE = $sock->GET_INFO("LANDING_PAGE");
    $LOST_LANDING_PAGE = $sock->GET_INFO("LOST_LANDING_PAGE");
    $MACWHITE = intval($sock->GET_INFO("MACWHITE"));
    $SMS_REGISTER = intval($sock->GET_INFO("SMS_REGISTER"));
    $BOUNCE_AUTH = intval($sock->GET_INFO("BOUNCE_AUTH"));
    $TOS_VALUE = intval($sock->GET_INFO("TOS_VALUE"));
    if ($LOST_LANDING_PAGE == null) {
        $LOST_LANDING_PAGE = "http://articatech.net";
    }
    $ArticaSplashHotSpotRemoveAccount = intval($sock->GET_INFO("ArticaSplashHotSpotRemoveAccount"));
    if ($ENABLED_AUTO_LOGIN == 1) {
        $ENABLED_SMTP = intval($sock->GET_INFO("ENABLED_SMTP"));
        if ($ENABLED_SMTP == 0) {
            echo $tpl->_ENGINE_parse_body("<p class=text-error>{HOTSPOT_ENABLED_AUTO_LOGIN_SMTP_DISABLED}</p>");
        } else {
            $smtp_server_name = trim($sock->GET_INFO("smtp_server_name"));
            $smtp_server_port = intval(trim($sock->GET_INFO("smtp_server_port")));
            $smtp_sender = trim($sock->GET_INFO("smtp_sender"));
            if ($smtp_server_name == null or $smtp_sender == null) {
                echo $tpl->_ENGINE_parse_body("<p class=text-error>{HOTSPOT_ENABLED_AUTO_LOGIN_SMTP_SETTINGS}</p>");
            }
        }
    }
    $ayDscp = array(0 => '{default}', 8 => '0x20', 10 => '0x28', 12 => '0x30', 14 => '0x38', 16 => '0x40', 18 => '0x48', 20 => '0x50', 22 => '0x58', 24 => '0x60', 26 => '0x68', 28 => '0x70', 30 => '0x78', 32 => '0x80', 34 => '0x88', 36 => '0x90', 38 => '0x98', 40 => '0xA0', 46 => '0xB8', 48 => '0xC0', 56 => '0xE0');
    $html = "<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{use_terme_of_use}:</td>\n\t\t<td>" . Field_checkbox_design("USE_TERMS-{$t}", 1, $USE_TERMS) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{send_accounts_to_meta_server}", "{send_accounts_to_meta_server_explain}") . ":</td>\n\t\t<td>" . Field_checkbox_design("ENABLED_META_LOGIN-{$t}", 1, $ENABLED_META_LOGIN) . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{allow_recover_password}", "{allow_recover_password_explain_hotspot}") . ":</td>\n\t\t<td>" . Field_checkbox_design("ALLOW_RECOVER_PASS-{$t}", 1, $ALLOW_RECOVER_PASS) . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{lost_landing_page}", "{lost_landing_page_explain}") . ":</td>\n\t\t<td>" . Field_text("LOST_LANDING_PAGE-{$t}", $LOST_LANDING_PAGE, "font-size:22px;width:350px") . "</td>\n\t</tr>\t\n\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{landing_page}", "{landing_page_hotspot_explain}") . ":</td>\n\t\t<td>" . Field_text("LANDING_PAGE-{$t}", $LANDING_PAGE, "font-size:22px;width:350px") . "</td>\n\t</tr>\t\n\t\t\t\t\n\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px;text-transform:capitalize'>{re_authenticate_each} ({default}):</td>\n\t\t<td style='font-size:18px'>" . Field_array_Hash($Timez, "ArticaSplashHotSpotCacheAuth-{$t}", $ArticaSplashHotSpotCacheAuth, null, null, 0, "font-size:22px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px;text-transform:capitalize'>" . texttooltip("{re_authenticate_each}", "{re_authenticate_each_hotspot_size}") . ":</td>\n\t\t<td style='font-size:18px'>" . Field_text("LIMIT_BY_SIZE-{$t}", $LIMIT_BY_SIZE, "font-size:22px;width:120px") . "&nbsp;MB</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>" . texttooltip("{tcp_outgoing_tos}", "{HOTSPOT_TOS_VALUE_EXPLAIN}") . ":</td>\n\t\t<td>" . Field_array_Hash($ayDscp, "TOS_VALUE-{$t}", $TOS_VALUE, 'style:font-size:22px;') . "</td>\n\t</tr>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px;text-transform:capitalize'>" . texttooltip("{disable_account_in} ({default})", "{ArticaSplashHotSpotEndTime_explain}") . ":</td>\n\t\t<td style='font-size:18px'>" . Field_array_Hash($Timez, "ArticaSplashHotSpotEndTime-{$t}", $ArticaSplashHotSpotEndTime, null, null, 0, "font-size:22px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px;text-transform:capitalize'>" . texttooltip("{remove_account_in} ({default})", "{ArticaSplashHotSpotRemoveAccount_explain}") . ":</td>\n\t\t<td style='font-size:18px'>" . Field_array_Hash($Timez, "ArticaSplashHotSpotRemoveAccount-{$t}", $ArticaSplashHotSpotRemoveAccount, null, null, 0, "font-size:22px") . "</td>\n\t</tr>\n\n\t<tr>\n\t\t<td class=legend style='font-size:22px;text-transform:capitalize'>" . texttooltip("{bounce_if_already_authenticated}", "{bounce_if_already_authenticated_hotspot}") . ":</td>\n\t\t<td>" . Field_checkbox_design("BOUNCE_AUTH-{$t}", 1, $BOUNCE_AUTH) . "</td>\n\t</tr>\t\t\t\t\n\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px;text-transform:capitalize'>" . texttooltip("{save_computer_in_whitelist}", "{save_computer_in_whitelist_hotspot}") . ":</td>\n\t\t<td>" . Field_checkbox_design("MACWHITE-{$t}", 1, $MACWHITE) . "</td>\n\t</tr>\t\t\t\t\t\n\t\t\t\t\n\n\t<tr><td colspan=2 style='font-size:30px'>{authentication}</td></tr>\t\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{DO_NOT_AUTENTICATE}", "{DO_NOT_AUTENTICATE_HOTSPOT_EXPLAIN}") . ":</td>\n\t\t<td>" . Field_checkbox_design("DO_NOT_AUTENTICATE-{$t}", 1, $DO_NOT_AUTENTICATE) . "</td>\n\t</tr>\t\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{use_local_database}", "{hotspot_use_local_database}") . ":</td>\n\t\t<td>" . Field_checkbox_design("USE_MYSQL-{$t}", 1, $USE_MYSQL) . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{use_active_directory}", "{hotspot_use_active_directory}") . ":</td>\n\t\t<td>" . Field_checkbox_design("USE_ACTIVEDIRECTORY-{$t}", 1, $USE_ACTIVEDIRECTORY) . "</td>\n\t</tr>\t\t\t\t\n\t\t\t\t\n\t<tr><td colspan=2 style='font-size:30px'>{self_register}</td></tr>\t\t\t\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px;text-transform:capitalize'>" . texttooltip("{enable_hotspot_autologin}", "{enable_hotspot_autologin_explain}") . ":</td>\n\t\t<td>" . Field_checkbox_design("ENABLED_AUTO_LOGIN-{$t}", 1, intval($sock->GET_INFO("ENABLED_AUTO_LOGIN"))) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px;text-transform:capitalize'>" . texttooltip("{enable_hotspot_sms}", "{enable_hotspot_sms_explain}") . ":</td>\n\t\t<td>" . Field_checkbox_design("SMS_REGISTER-{$t}", 1, $SMS_REGISTER) . "</td>\n\t</tr>\n\t\t\t\t\n\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px;text-transform:capitalize'>" . texttooltip("{enable_confirmation_establish_session}", "{enable_confirmation_establish_session_explain}") . ":</td>\n\t\t<td>" . Field_checkbox_design("ENABLED_REDIRECT_LOGIN-{$t}", 1, $ENABLED_REDIRECT_LOGIN) . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px;text-transform:capitalize'>{remove_password_field}:</td>\n\t\t<td>" . Field_checkbox_design("ArticaHotSpotNowPassword-{$t}", 1, $ArticaHotSpotNowPassword) . "</td>\n\t</tr>\t\t\t\t\n\n\t\t\t\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "Save{$t}()", "42px") . "</td>\n\t</tr>\n\t</table>\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}\t\n\t\n\tfunction Save{$t}(){\n\t\t\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('ruleid',{$ruleid});\n\t\t\n\t\t\n\t\tif(document.getElementById('ArticaHotSpotNowPassword-{$t}').checked){XHR.appendData('ArticaHotSpotNowPassword',1);}else{XHR.appendData('ArticaHotSpotNowPassword',0); }\n\t\tif(document.getElementById('USE_TERMS-{$t}').checked){XHR.appendData('USE_TERMS',1); }else{ XHR.appendData('USE_TERMS',0); }\t\t\n\t\tif(document.getElementById('ENABLED_REDIRECT_LOGIN-{$t}').checked){XHR.appendData('ENABLED_REDIRECT_LOGIN',1); }else{ XHR.appendData('ENABLED_REDIRECT_LOGIN',0); }\n\t\tif(document.getElementById('ENABLED_AUTO_LOGIN-{$t}').checked){XHR.appendData('ENABLED_AUTO_LOGIN',1); }else{ XHR.appendData('ENABLED_AUTO_LOGIN',0); }\n\t\tif(document.getElementById('ENABLED_META_LOGIN-{$t}').checked){XHR.appendData('ENABLED_META_LOGIN',1); }else{ XHR.appendData('ENABLED_META_LOGIN',0); }\n\t\tif(document.getElementById('ALLOW_RECOVER_PASS-{$t}').checked){XHR.appendData('ALLOW_RECOVER_PASS',1); }else{ XHR.appendData('ALLOW_RECOVER_PASS',0); }\n\t\tif(document.getElementById('DO_NOT_AUTENTICATE-{$t}').checked){XHR.appendData('DO_NOT_AUTENTICATE',1); }else{ XHR.appendData('DO_NOT_AUTENTICATE',0); }\n\t\tif(document.getElementById('USE_MYSQL-{$t}').checked){XHR.appendData('USE_MYSQL',1); }else{ XHR.appendData('USE_MYSQL',0); }\n\t\tif(document.getElementById('USE_ACTIVEDIRECTORY-{$t}').checked){XHR.appendData('USE_ACTIVEDIRECTORY',1); }else{ XHR.appendData('USE_ACTIVEDIRECTORY',0); }\n\t\tif(document.getElementById('SMS_REGISTER-{$t}').checked){XHR.appendData('SMS_REGISTER',1); }else{ XHR.appendData('SMS_REGISTER',0); }\n\t\tif(document.getElementById('MACWHITE-{$t}').checked){XHR.appendData('MACWHITE',1); }else{ XHR.appendData('MACWHITE',0); }\n\t\tif(document.getElementById('BOUNCE_AUTH-{$t}').checked){XHR.appendData('BOUNCE_AUTH',1); }else{ XHR.appendData('BOUNCE_AUTH',0); }\n\t\tXHR.appendData('TOS_VALUE',document.getElementById('TOS_VALUE-{$t}').value);\n\t\tXHR.appendData('ArticaSplashHotSpotCacheAuth',document.getElementById('ArticaSplashHotSpotCacheAuth-{$t}').value);\n\t\tXHR.appendData('ArticaSplashHotSpotEndTime',document.getElementById('ArticaSplashHotSpotEndTime-{$t}').value);\n\t\tXHR.appendData('ArticaSplashHotSpotRemoveAccount',document.getElementById('ArticaSplashHotSpotRemoveAccount-{$t}').value);\n\t\tXHR.appendData('LIMIT_BY_SIZE',document.getElementById('LIMIT_BY_SIZE-{$t}').value);\n\t\t\n\t\tXHR.appendData('LOST_LANDING_PAGE',document.getElementById('LOST_LANDING_PAGE-{$t}').value);\n\t\tXHR.appendData('LANDING_PAGE',document.getElementById('LANDING_PAGE-{$t}').value);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n\t\t\n\t}\n</script>";
    echo $tpl->_ENGINE_parse_body($html);
}
function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $t = time();
    $html = "<div style='font-size:18px' class=explain>{mysql_hotspot_members_import_explain}</div>\n\t<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{delete_old_items}", "{delete_old_items_table_explain}") . ":</td>\n\t\t<td>" . Field_checkbox_design("DeleteOld-{$t}", 1, 0) . "</td>\n\t</tr>\n\t<tr>\n\t\t\n\t\t\n\t\t<td colspan=2><textarea \n\t\t\tstyle='width:100%;height:350px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='IMPORT-{$t}'></textarea>\n\t\t</td>\n\t</tr>\t\n\t<tr>\n\t\t<td align='right' colspan=2>" . button('{import}', "Save{$t}();", 32) . "</td>\n\t</tr>\n\t</table>\n\t</div>\t\t\n<script>\nvar xSave{$t}= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>3){alert(results);return;}\n\t\$('#flexRT{$_GET["t"]}').flexReload();\n\tYahooWin3Hide();\n}\n\nfunction Save{$t}(){\t\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('IMPORT',document.getElementById('IMPORT-{$t}').value);\n\tif(document.getElementById('DeleteOld-{$t}').checked){XHR.appendData('DeleteOld',1);}else {XHR.appendData('DeleteOld',0);}\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\t\n</script>\t\t\t\n";
    echo $tpl->_ENGINE_parse_body($html);
}
function help()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $downloadvinvin = Paragraphe("setup-icon-64.png", "{DOWNLOAD_OPENVPN_CLIENT}", "{DOWNLOAD_OPENVPN_CLIENT_TEXT}", "javascript:s_PopUp('http://www.articatech.net/download/openvpn-2.1.4-install.exe')", "{DOWNLOAD_OPENVPN_CLIENT_TEXT}");
    $downloadapple = Paragraphe("apple-logo-64.png", "{DOWNLOAD_OPENVPN_CLIENT_APPLE}", "{DOWNLOAD_OPENVPN_CLIENT_TEXT}", "javascript:s_PopUp('http://www.articatech.net/download/Tunnelblick_3.1.7.dmg')", "{DOWNLOAD_OPENVPN_CLIENT_TEXT}");
    $html = "\n\t<div class=explain>{OPENVPN_ADMIN_HELP_TEXT}</div>\n\t<div style='width:98%' class=form>\n\t<table style='width:99%'>\n\t<tbody>\n\t<tr style='height:40px'>\n\t\t<td width=1% nowrap><strong style='font-size:18px'>v2.1.4</td>\n\t\t<td width=95%  style='font-size:18px'>" . texttooltip("{DOWNLOAD_OPENVPN_CLIENT} XP 32bits", "{DOWNLOAD_OPENVPN_CLIENT_TEXT}", "s_PopUp('http://www.articatech.net/download/openvpn-2.1.4-install.exe')") . "</td>\n\t\t<td width=1% nowrap><strong style='font-size:18px'>1.6MB</td>\t\n\t</tr>\t\t\t\n\t<tr style='height:40px'>\n\t\t<td width=1% nowrap><strong style='font-size:18px'>v2.3.9</td>\n\t\t<td width=95%  style='font-size:18px'>" . texttooltip("{DOWNLOAD_OPENVPN_CLIENT} XP 32bits", "{DOWNLOAD_OPENVPN_CLIENT_TEXT}", "s_PopUp('http://www.articatech.net/download/openvpn-install-2.3.9-I001-i686.exe')") . "</td>\n\t\t<td width=1% nowrap><strong style='font-size:18px'>1.7MB</td>\t\n\t</tr>\t\t\t\t\t\t\n\t<tr style='height:40px'>\n\t\t<td width=1% nowrap><strong style='font-size:18px'>v2.3.9</td>\n\t\t<td width=95%  style='font-size:18px'>" . texttooltip("{DOWNLOAD_OPENVPN_CLIENT} XP 64bits", "{DOWNLOAD_OPENVPN_CLIENT_TEXT}", "s_PopUp('http://www.articatech.net/download/openvpn-install-2.3.9-I001-x86_64.exe')") . "</td>\n\t\t<td width=1% nowrap><strong style='font-size:18px'>1.8MB</td>\t\n\t</tr>\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t<tr style='height:40px'>\n\t\t<td width=1% nowrap><strong style='font-size:18px'>v2.3.9</td>\n\t\t<td width=95%  style='font-size:18px'>" . texttooltip("{DOWNLOAD_OPENVPN_CLIENT} 7/10 64Bits", "{DOWNLOAD_OPENVPN_CLIENT_TEXT}", "s_PopUp('http://www.articatech.net/download/openvpn-install-2.3.9-I601-x86_64.exe')") . "</td>\n\t\t<td width=1% nowrap><strong style='font-size:18px'>1.8MB</td>\t\n\t</tr >\n\t<tr style='height:40px'>\n\t\t<td width=1% nowrap><strong style='font-size:18px'>v2.3.9</td>\n\t\t<td width=95%  style='font-size:18px'>" . texttooltip("{DOWNLOAD_OPENVPN_CLIENT} 7 32Bits", "{DOWNLOAD_OPENVPN_CLIENT_TEXT}", "s_PopUp('http://www.articatech.net/download/openvpn-install-2.3.9-I601-i686.exe')") . "</td>\n\t\t<td width=1% nowrap><strong style='font-size:18px'>1.7MB</td>\t\n\t</tr>\t\n\t</tboy>\n\t</table>\n\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
function popup_squidguard()
{
    $sock = new sockets();
    $datas = unserialize(base64_decode($sock->getFrameWork("cmd.php?squidguard-db-status=yes")));
    $tpl = new templates();
    $html = "\n\t<div style='font-size:14px;'>{DANSGUARDIAN_DB_STATUS_EXPLAIN}</div>\n\t<div style='width:100%;height:350px;overflow:auto'>\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t<th style='font-size:14px' nowrap>{category}</th>\n\t\t<th style='font-size:14px' nowrap>{domains}</th>\n\t\t<th style='font-size:14px' nowrap>{urls}</th>\n\t\t<th style='font-size:14px' nowrap>Regex</th>\n\t\t<th style='font-size:14px' nowrap>{date}</th>\n\t\t<th style='font-size:14px' nowrap>{squidguard_database_size}</th>\n\t</tr>";
    if (!is_array($datas)) {
        echo $tpl->_ENGINE_parse_body("<H2>{error_no_datas}</H2>");
        return;
    }
    while (list($path, $array) = each($datas)) {
        //	if($path==null){continue;}
        $category = squidguard_extract_category($path);
        $Narray[$category][$array["type"]]["linesn"] = $array["linesn"];
        $Narray[$category][$array["type"]]["size"] = $array["size"];
        $Narray[$category][$array["type"]]["date"] = $array["date"];
    }
    while (list($category, $array2) = each($Narray)) {
        if ($array2["expressionlist"]["linesn"] == null) {
            $array2["expressionlist"]["linesn"] = 0;
        }
        if ($array2["domainlist"]["linesn"] == null) {
            $array2["expressionlist"]["linesn"] = 0;
        }
        if ($array2["urllist"]["linesn"] == null) {
            $array2["expressionlist"]["linesn"] = 0;
        }
        if (is_array($array2["domainlist"])) {
            if ($array2["domainlist"]["size"] == null) {
                $not_compiled = texttooltip("{not_compiled}", "{compile_squidguard_databases}<hr><i>{compile_squidguard_databases_text}</i>", "Loadjs('squidguard.status.php?compile=yes')", 0, "color:#d32d2d;font-size:14px;font-weight:bold");
                $array2["domainlist"]["size"] = "<span style='color:#d32d2d'>{$not_compiled}</span>";
            } else {
                $array2["domainlist"]["size"] = FormatBytes($array2["domainlist"]["size"] / 1024);
            }
        } else {
            $array2["domainlist"]["size"] = "-";
        }
        if ($array2["domainlist"]["date"] == null) {
            $array2["domainlist"]["date"] = $array2["expressionlist"]["date"];
        }
        $date = date('d M y h:i', $array2["domainlist"]["date"]);
        if (preg_match("#personal-categories\\/(.+)#", $category, $re)) {
            $category = "{personal}: {$re[1]}";
        }
        if (preg_match("#web-filter-plus\\/BL\\/(.+)#", $category, $re)) {
            $category = "{professional}: {$re[1]}";
        }
        if (preg_match("#blacklist-artica\\/(.+)#", $category, $re)) {
            $category = "{artica_community}: {$re[1]}";
        }
        $html = $html . "\n\t\t<tr " . CellRollOver() . ">\n\t\t\t<td style='font-size:14px' nowrap><strong>{$category}</strong></td>\n\t\t\t<td style='font-size:14px'  align='right' width=1%><strong>{$array2["domainlist"]["linesn"]}</strong></td>\n\t\t\t<td style='font-size:14px'  align='right' width=1%>{$array2["urllist"]["linesn"]}</td>\n\t\t\t<td style='font-size:14px'  align='right' width=1%>{$array2["expressionlist"]["linesn"]}</td>\n\t\t\t<td style='font-size:14px'  align='right' width=1% nowrap>{$date}</td>\n\t\t\t<td style='font-size:14px'  align='right' width=1%>{$array2["domainlist"]["size"]}</td>\n\t\t</TR>\n\t\t\n\t\t";
    }
    $html = $html . "</table></div>";
    echo $tpl->_ENGINE_parse_body($html, 'squid.index.php');
}
示例#15
0
function popup()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $q = new postgres_sql();
    $ligne = pg_fetch_assoc($q->QUERY_SQL("SELECT * FROM suricata_sig WHERE signature='{$_GET["sig"]}'"));
    $ligne2 = pg_fetch_assoc($q->QUERY_SQL("SELECT SUM(xcount) as tcount FROM suricata_events WHERE signature='{$_GET["sig"]}'"));
    $sum = FormatNumber($ligne2["tcount"]);
    $t = time();
    $html = "<div style='font-size:30px;margin-bottom:8px;'>{signature} {ID} <strong>{$_GET["sig"]}</strong></div>\n\t<div style='font-size:18px;margin-bottom:30px;border-top:1px solid #CCCCCC;padding-top:8px'><i>{$ligne["description"]}</i></div>\n\t<div style='width:98%' class=form>\n\t\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>{events}:</td>\n\t\t\t<td style='font-size:22px'>{$sum}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>{enabled}:</td>\n\t\t\t<td>" . Field_checkbox_design("enabled-{$t}", 1, $ligne["enabled"]) . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>" . texttooltip("{firewall}", "{suricata_firewall}") . ":</td>\n\t\t\t<td>" . Field_checkbox_design("firewall-{$t}", 1, $ligne["firewall"]) . "</td>\n\t\t</tr>\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t<tr>\n\t\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "Save{$t}()", 30) . "</td>\n\t</table>\n\t</div>\t\t\t\n\t<script>\n\tvar xSave{$t}=function (obj) {\n\t\tvar tempvalue=obj.responseText;\n\t\tif(tempvalue.length>3){alert(tempvalue);return;}\n\t\t\$('#TABLE_SURICATA_EVENTS').flexReload();\n\t\tYahooWinHide();\n\t\tLoadjs('suricata.progress.php');\n\t}\t\n\t\n\tfunction Save{$t}(){\n\t\tvar XHR = new XHRConnection();\n\t\tvar enabled=0;\n\t\tvar firewall=0;\n\t\tif(document.getElementById('enabled-{$t}').checked){enabled=1;}\n\t\tif(document.getElementById('firewall-{$t}').checked){firewall=1;}\n\t\tXHR.appendData('enabled',enabled);\n\t\tXHR.appendData('firewall',firewall);\n\t\tXHR.appendData('sig','{$_GET["sig"]}');\n\t\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\t\n\t}\t\n\n\t</script>\t\t\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
示例#16
0
function Status()
{
    $kav = new kav4mailservers();
    $linkPattern = texttooltip($kav->pattern_date, '{time_date_com_text_moscow}', 'http://www.timeanddate.com/worldclock/city.html?n=166');
    $page = CurrentPageName();
    if ($kav->pid == null) {
        $img1 = "status_critical.gif";
    } else {
        $img1 = "status_ok.gif";
    }
    $status = RoundedLightGreen("\n<H4>Status</H4>\n<table style='width:100%'>\n<tr>\n\t<td valign='top'align='center'><img src='img/{$img1}'></td>\n\t<td align=right valign='top' ><strong>{use_pid}:</strong></td>\n\t<td valign='top'>{$kav->pid}</td>\n</tr>\n<tr>\n\t<td valign='top' align='center'><img src='img/{$img1}'></td>\n\t<td align=right valign='top'><strong>{memory}:</strong></td>\n\t<td valign='top'>{$kav->memory} mb</td>\n</tr>\n\n<tr>\n\t<td valign='top' align='center'><img src='img/icon_info.gif'></td>\n\t<td align=right valign='top'><strong>{version}:</strong></td>\n\t<td valign='top'>{$kav->version}</td>\n</tr>\n<tr>\n<td valign='top' align='center'><img src='img/icon_info.gif'></td>\n<td nowrap align=right valign='top'><strong>{pattern_ver}:</strong></td>\n<td><strong>{$linkPattern}</strong></td>\n\n</tr>\n<tr><td colspan=3 align='right'>" . imgtootltip('icon_refresh-20.gif', '{refresh}', "LoadAjax('servinfos','{$page}?Status=yes');") . "</td></tr>\n</table>");
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($status);
}
示例#17
0
function popup()
{
    $q = new mysql_squid_builder();
    $ID = $_GET["ID"];
    $page = CurrentPageName();
    $tpl = new templates();
    $t = time();
    if (!$q->FIELD_EXISTS("proxy_ports", "FTPProxyMaxClients")) {
        $q->QUERY_SQL("ALTER TABLE `proxy_ports` ADD `FTPProxyMaxClients` BIGINT(100) NOT NULL DEFAULT '64'");
        if (!$q->ok) {
            echo $q->mysql_error . "\n";
        }
    }
    if (!$q->FIELD_EXISTS("proxy_ports", "FTPProxyTimeOuts")) {
        $q->QUERY_SQL("ALTER TABLE `proxy_ports` ADD `FTPProxyTimeOuts` INT(100) NOT NULL DEFAULT '360'");
        if (!$q->ok) {
            echo $q->mysql_error . "\n";
        }
    }
    if (!$q->FIELD_EXISTS("proxy_ports", "FTPProxyDestinationTransferMode")) {
        $q->QUERY_SQL("ALTER TABLE `proxy_ports` ADD `FTPProxyDestinationTransferMode` VARCHAR(32) NOT NULL DEFAULT 'client'");
        if (!$q->ok) {
            echo $q->mysql_error . "\n";
        }
    }
    if (!$q->FIELD_EXISTS("proxy_ports", "FTPUserAuthMagic")) {
        $q->QUERY_SQL("ALTER TABLE `proxy_ports` ADD `FTPUserAuthMagic` VARCHAR(128) NOT NULL DEFAULT '@user'");
        if (!$q->ok) {
            echo $q->mysql_error . "\n";
        }
    }
    if (!$q->FIELD_EXISTS("proxy_ports", "FTPUseMagicChar")) {
        $q->QUERY_SQL("ALTER TABLE `proxy_ports` ADD `FTPUseMagicChar` VARCHAR(32) NOT NULL DEFAULT '@'");
        if (!$q->ok) {
            echo $q->mysql_error . "\n";
        }
    }
    if (!$q->FIELD_EXISTS("proxy_ports", "FTPAllowMagicUser")) {
        $q->QUERY_SQL("ALTER TABLE `proxy_ports` ADD `FTPAllowMagicUser` SMALLINT(1) NOT NULL DEFAULT '1'");
        if (!$q->ok) {
            echo $q->mysql_error . "\n";
        }
    }
    $DestinationTransferModeR["client"] = "client";
    $DestinationTransferModeR["passive"] = "passive";
    $DestinationTransferModeR["active"] = "active";
    $ligne = @mysql_fetch_array($q->QUERY_SQL("SELECT * FROM proxy_ports WHERE ID={$ID}"));
    $html = "\n<div style='width:98%' class=form>\n<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend style='font-size:20px'>{MaxClients}:</td>\n\t\t<td style='font-size:18px'>" . field_text("FTPProxyMaxClients-{$t}", $ligne["FTPProxyMaxClients"], "font-size:20px;width:120px") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:20px'>{timeout2} ({seconds}):</td>\n\t\t<td style='font-size:18px'>" . field_text("FTPProxyTimeOuts-{$t}", $ligne["FTPProxyTimeOuts"], "font-size:20px;width:120px") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:20px'>" . texttooltip("{FTPProxyDestinationTransferMode}", "{FTPProxyDestinationTransferMode_explain}") . ":</td>\n\t\t<td style='font-size:20px'>" . Field_array_Hash($DestinationTransferModeR, "FTPProxyDestinationTransferMode-{$t}", $ligne["FTPProxyDestinationTransferMode"], "style:font-size:20px") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:20px'>" . texttooltip("{FTPAllowMagicUser}", "{FTPAllowMagicUser_explain}") . ":</td>\n\t\t\t<td style='font-size:20px'>" . Field_checkbox_design("FTPAllowMagicUser-{$t}", 1, $ligne["FTPAllowMagicUser"]) . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:20px'>" . texttooltip("{UserAuthMagic}", "{UserAuthMagic_explain}") . ":</td>\n\t\t<td style='font-size:18px'>" . field_text("FTPUserAuthMagic-{$t}", $ligne["FTPUserAuthMagic"], "font-size:20px;width:220px") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:20px'>" . texttooltip("{FTPUseMagicChar}", "{FTPUseMagicChar_explain}") . ":</td>\n\t\t<td style='font-size:18px'>" . field_text("FTPUseMagicChar-{$t}", $ligne["FTPUseMagicChar"], "font-size:20px;width:220px") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\t\n<tr>\n\t<td colspan=2 align='right'><hr>" . button("{apply}", "Save{$t}()", 32) . "</td>\n</tr>\n</table>\n</div>\n<script>\nvar xSave{$t}= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>3){ alert(results); return; }\n\tRefreshTab('main_proxy_listen_ports');\n}\n\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('ID','{$ID}');\n\tXHR.appendData('FTPProxyMaxClients',document.getElementById('FTPProxyMaxClients-{$t}').value);\n\tXHR.appendData('FTPProxyTimeOuts',document.getElementById('FTPProxyTimeOuts-{$t}').value);\n\tXHR.appendData('FTPProxyDestinationTransferMode',document.getElementById('FTPProxyDestinationTransferMode-{$t}').value);\n\tXHR.appendData('FTPUserAuthMagic',document.getElementById('FTPUserAuthMagic-{$t}').value);\n\tXHR.appendData('FTPUseMagicChar',document.getElementById('FTPUseMagicChar-{$t}').value);\n\tif(document.getElementById('FTPAllowMagicUser-{$t}').checked){XHR.appendData('FTPAllowMagicUser',1);}else{XHR.appendData('FTPAllowMagicUser',0);}\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n</script>\n";
    echo $tpl->_ENGINE_parse_body($html);
}
示例#18
0
function popup()
{
    $ldap = new clladp();
    $hash = $ldap->AllDomains();
    $page = CurrentPageName();
    $sock = new sockets();
    $PostfixPostmaster = $sock->GET_INFO("PostfixPostmaster");
    if (preg_match("#(.+?)@(.+)#", $PostfixPostmaster, $re)) {
        $email = $re[1];
        $domain = $re[2];
    }
    $html = "\n\t<div id='postmasterdiv' style='width:80%;margin:30px' class=form>\n\t<center>\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:26px' nowrap>" . texttooltip("{postmaster}", "{postmaster_text}") . ":</td>\n\t\t\t<td width=1%>" . Field_text("postmaster_email", $email, "font-size:26px;padding:3px;width:480px") . "</td>\n\t\t\t<td width=1%><strong style='font-size:26px'>@</td>\n\t\t\t<td width=1%>" . Field_array_Hash($hash, "postmaster_domain", $domain, null, null, 0, "font-size:26px;padding:3px") . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td colspan=4 align='right'>\n\t\t\t<hr>" . button("{apply}", "SavePostMasterForm()", 40) . "</td>\n\t\t</tr>\n\t</table>\n\t</center>\n\t</div>\n\t\n\t<script>\n\t\n\tvar x_SavePostMasterForm= function (obj) {\n\t\tvar results=trim(obj.responseText);\n\t\tif(results.length>0){alert(results);}\n\t}\t\n\t\n\tfunction SavePostMasterForm(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('postmaster',document.getElementById('postmaster_email').value+'@'+document.getElementById('postmaster_domain').value);\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_SavePostMasterForm);\n\t}\n\t\t\n\t\n\t</script>\t\n\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
示例#19
0
function config()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $users = new usersMenus();
    $t = time();
    $t = time();
    $spam = new spamassassin();
    $SpamAssMilterEnabled = intval($sock->GET_INFO("SpamAssMilterEnabled"));
    $block_with_required_score = trim($sock->GET_INFO("SpamAssBlockWithRequiredScore"));
    if ($block_with_required_score == null) {
        $block_with_required_score = 5;
    }
    $html = "\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top' style='width:350px'>\n\t\t\t<div style='width:98%' class=form>\n\t\t\t\t<div style='font-size:30px;margin-bottom:20px'>{services_status}</div>\n\t\t\t\t<div id='SpamAssMilter-status'></div>\n\t\t\t\t<div style='text-align:right'>" . imgtootltip("refresh-32.png", "{refresh}", "LoadAjax('SpamAssMilter-status','{$page}?services-status=yes')") . "</div>\n\t\t\t</div>\n\t\t\n\t\t\n\t\t</td>\n\t\t<td valign='top' style='padding-left:15px'>\n\t<div style='font-size:60px;margin-bottom:15px'>{APP_SPAMASS_MILTER}</div>\t\n\t<hr>\t\n\t<div id='test-{$t}'></div>\n\t<p>&nbsp;</p>\n\t<div style='width:98%' class=form>\n\t\t<table>\n\t\t<tr>\n\t\t<td colspan=2>" . Paragraphe_switch_img("{enable_spamasssin}", "{enable_spamasssin_text}", "SpamAssMilterEnabled", "{$SpamAssMilterEnabled}", null, 1050) . "</td>\n\t\t</tr>\n\t\t\t\t\t\t\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td style='font-size:22px' class=legend>" . texttooltip("{report_safe}", "{report_safe_text}") . ":</strong></td>\n\t\t\t<td valign='top'>" . Field_checkbox_design("report_safe-{$t}", $spam->main_array["report_safe"]) . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td style='font-size:22px' class=legend>" . texttooltip("{use_bayes}", "{use_bayes}") . ":</strong></td>\n\t\t\t<td valign='top'>" . Field_checkbox_design("use_bayes-{$t}", $spam->main_array["use_bayes"]) . "</td>\n\t\t</tr>\t\t\t\n\t\t<tr>\n\t\t\t<td style='font-size:22px' class=legend>" . texttooltip("{auto_learn}", "{auto_learn}") . ":</strong></td>\n\t\t\t<td valign='top'>" . Field_checkbox_design("bayes_auto_learn-{$t}", $spam->main_array["bayes_auto_learn"]) . "</td>\n\t\t</tr>\t\n\t\n\t\t<tr>\n\t\t\t<td style='font-size:22px' class=legend>" . texttooltip("{required_score}", "{required_score_text}") . ":</strong></td>\n\t\t\t<td valign='top' colspan=2>" . Field_text("required_score-{$t}", $spam->main_array["required_score"], 'width:110px;font-size:22px', null, null, '{required_score_text}') . "</td>\n\t\t</tr>\t\t\t\n\t\t<tr>\n\t\t\t<td style='font-size:22px' class=legend>" . texttooltip("{block_with_required_score}", "{block_with_required_score_text}") . ":</strong></td>\n\t\t\t<td valign='top' colspan=2>" . Field_text("block_with_required_score-{$t}", $block_with_required_score, 'width:110px;font-size:22px', null, null) . "</td>\n\t\t</tr>\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t<tr>\n\t\t\t<td colspan=2  align='right'><hr>" . button("{apply}", "Save{$t}()", "40px") . "</td>\n\t\t</tr>\n</table>\n</div>\n</td>\n</tr>\n</table>\n<script>\nvar xSave{$t}= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>3){alert(results);}\n\tLoadjs('postfix.milters.progress.php');\n\tRefreshTab('main_config_milter_spamass');\n}\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('SpamAssMilterEnabled',document.getElementById('SpamAssMilterEnabled').value);\n\tXHR.appendData('block_with_required_score',document.getElementById('block_with_required_score-{$t}').value);\n\tXHR.appendData('required_score',document.getElementById('required_score-{$t}').value);\n\tif(document.getElementById('report_safe-{$t}').checked){XHR.appendData('report_safe',1);}else{XHR.appendData('report_safe',0);}\n\tif(document.getElementById('use_bayes-{$t}').checked){XHR.appendData('use_bayes',1);}else{XHR.appendData('use_bayes',0);}\n\tif(document.getElementById('bayes_auto_learn-{$t}').checked){XHR.appendData('bayes_auto_learn',1);}else{XHR.appendData('bayes_auto_learn',0);}\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t},true);\n\n}\n\nfunction Check{$t}(){\n\tLoadAjax('SpamAssMilter-status','{$page}?services-status=yes');\n\t\n}\nCheck{$t}();\n</script>";
    echo $tpl->_ENGINE_parse_body($html);
}
示例#20
0
function viruslist()
{
    $q = new mysql();
    $sql = "SELECT * FROM antivirus_events WHERE email=0 ORDER BY zDate DESC";
    $results = $q->QUERY_SQL($sql, "artica_events");
    $html = "<table style='width:99%'>\n\t<tr>\n\t\t<th>&nbsp;</th>\n\t\t<th>{date}</th>\n\t\t<th>{virusname}</th>\n\t\t<th>{path}</th>\n\t\t<th>{taskname}</th>\n\t\t<th>&nbsp;</th>\n\t</tr>\n\t\t";
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $len = strlen("{$ligne["InfectedPath"]}");
        if ($len > 65) {
            $ligne["InfectedPath"] = texttooltip(substr($ligne["InfectedPath"], 0, 62) . '...', $ligne["InfectedPath"], null, null, 1);
        }
        $html = $html . "<tr . " . CellRollOver() . ">\n\t\t\t<td width=1%><img src='img/danger16.png'></td>\n\t\t\t<td nowrap width=1%><strong>{$ligne["zDate"]}</strong></td>\n\t\t\t<td nowrap><strong>{$ligne["VirusName"]}</strong></td>\n\t\t\t<td nowrap><strong>{$ligne["InfectedPath"]}</strong></td>\n\t\t\t<td nowrap width=1%><strong>{$ligne["TaskName"]}</strong></td>\n\t\t\t<td width=1%>" . imgtootltip("goodmail.gif", "{mark_has_read}", "VirusEventsAsRead('{$ligne["ID"]}')") . "</td>\n\t\t\t</tr>\n\t\t\t\n\t\t\t";
    }
    $html = $html . "</table>";
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($html);
}
示例#21
0
function tabs()
{
    $tpl = new templates();
    $sock = new sockets();
    $InfluxUseRemote = intval($sock->GET_INFO("InfluxUseRemote"));
    $SquidPerformance = intval($sock->GET_INFO("SquidPerformance"));
    if ($InfluxUseRemote == 1) {
        $InfluxSyslogRemote = intval($sock->GET_INFO("InfluxSyslogRemote"));
        if ($InfluxSyslogRemote == 1) {
            echo FATAL_ERROR_SHOW_128("{feature_disabled_influxsyslog}");
            return;
        }
    }
    if ($SquidPerformance > 1) {
        echo FATAL_ERROR_SHOW_128("{proxy_performance_is_set_to_lowlevel}<br>{artica_statistics_disabled}\n\t\t<br><div style='text-align:right'><span style='font-size:30px;font-weight:bold'>" . texttooltip("{see}:{performance}", "position:top:{performance_squid_explain}", "GotoSquidPerformances()") . "</span></div>\n\t\t\t\t\n\t\t");
        return;
    }
    $fontsize = 24;
    $page = CurrentPageName();
    $tpl = new templates();
    $array["settings"] = "{parameters}";
    $array["rules"] = "{rules}";
    $array["status"] = "{status}";
    $array["events"] = "{events}";
    while (list($num, $ligne) = each($array)) {
        if ($num == "webevents") {
            $tab[] = "<li><a href=\"UpdateUtility.events.php\"><span style='font-size:{$fontsize}px'>{$ligne}</span></a></li>\n";
            continue;
        }
        if ($num == "rules") {
            $tab[] = "<li><a href=\"squid.quotasband.rules.php\"><span style='font-size:{$fontsize}px'>{$ligne}</span></a></li>\n";
            continue;
        }
        if ($num == "status") {
            $tab[] = "<li><a href=\"squid.quotasband.status.php\"><span style='font-size:{$fontsize}px'>{$ligne}</span></a></li>\n";
            continue;
        }
        if ($num == "events") {
            $tab[] = "<li><a href=\"squid.quotasband.events.php\"><span style='font-size:{$fontsize}px'>{$ligne}</span></a></li>\n";
            continue;
        }
        $tab[] = "<li><a href=\"{$page}?{$num}=yes\"><span style='font-size:{$fontsize}px'>{$ligne}</span></a></li>\n";
    }
    echo build_artica_tabs($tab, "main_squid_quotas_bandwidth_config", 1490);
}
示例#22
0
function popup()
{
    $tpl = new templates();
    if ($_GET["user"] != null) {
        $_GET["user"] = "******"user"]}'";
    }
    if ($_GET["t"] == 'today') {
        $_GET["t"] = " AND DATE_FORMAT( zdate, '%Y-%m-%d' )=DATE_FORMAT( NOW(), '%Y-%m-%d' )";
    }
    if ($_GET["t"] == 'week') {
        $_GET["t"] = " AND WEEK( zdate)=WEEK( NOW()) AND YEAR(zdate)=YEAR(NOW())";
    }
    if ($_GET["t"] == 'month') {
        $_GET["t"] = " AND MONTH(zdate)=MONTH( NOW()) AND YEAR(zdate)=YEAR(NOW())";
    }
    if ($_GET["next"] == null) {
        $_GET["next"] = 0;
    }
    if ($_GET["next"] > 0) {
        $next = $_GET["next"] * 100;
    } else {
        $next = 0;
    }
    $nextnext = $next + 100;
    $next_query = $_GET["next"] + 1;
    $back_query = $_GET["next"] - 1;
    $back = button("{back}", "WebUrisStatisticsNext('{$back_query}')");
    if ($next == 100) {
        $back = null;
    }
    $dansguardian_events = "dansguardian_events_" . date('Ym');
    $sql = "SELECT zdate,uri FROM {$dansguardian_events} WHERE sitename='{$_GET["domain"]}'{$_GET["user"]}{$_GET["t"]} ORDER BY zDate DESC LIMIT {$next},{$nextnext} ";
    $html = $tpl->_ENGINE_parse_body("<center style='height:500px;overflow:auto'>\n\t\n\t\n\t<table style='width:100%'>\n\t<tr>\n\t<td width=50% align='left'>&nbsp;{$back}</td>\n\t<td width=50% align='right'>" . button("{next}", "WebUrisStatisticsNext('{$next_query}')") . "</td>\n\t</tr>\n\t</table>\n\t\n\t\n\t<div style='width:90%;text-align:right'>\n\t</div>\n\t<table style='width:500px;border:1px solid #CCCCCC'>\n\t<tr>\n\t\t<th colspan=2>{date}</th>\n\t\t<th>URI</th>\n\t</tr>");
    $q = new mysql();
    $results = $q->QUERY_SQL($sql, "artica_events");
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $uri = $ligne["uri"];
        if (strlen($ligne["uri"]) > 50) {
            $uri = texttooltip(substr($ligne["uri"], 0, 47) . '...', $ligne["uri"], null, null, 1);
        }
        $html = $html . "\n\t<tr " . CellRollOver("s_PopUp('{$ligne["uri"]}',800,800)") . ">\n\t\t<td width=1%><img src='img/web-22.png'></td>\n\t\t<td style='font-size:11px' nowrap valign='top'>{$ligne["zdate"]}</td>\n\t\t<td style='font-size:10px' valign='top'>{$uri}</td>\n\t</tr>\n\t";
    }
    $html = $html . "</table>";
    echo $html;
}
function page()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $ID = $_GET["ID"];
    $t = time();
    $q = new mysql();
    $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM haproxy_backends_groups WHERE ID='{$ID}'", "artica_backup"));
    $mode = array(0 => "TCP", 1 => "HTTP Web", 2 => "HTTP Proxy");
    $servicename = $ligne["servicename"];
    $hap = new haproxy_multi($servicename);
    $MainConfig = unserialize(base64_decode($ligne["MainConfig"]));
    if (!isset($MainConfig["loadbalancetype"])) {
        $MainConfig["loadbalancetype"] = $hap->loadbalancetype;
    }
    if (!isset($MainConfig["tunnel_mode"])) {
        $MainConfig["tunnel_mode"] = $hap->tunnel_mode;
    }
    if (!isset($MainConfig["dispatch_mode"])) {
        $MainConfig["dispatch_mode"] = $hap->dispatch_mode;
    }
    if (!isset($MainConfig["UseCookies"])) {
        $MainConfig["UseCookies"] = $hap->MainConfig["UseCookies"];
    }
    if (!isset($MainConfig["contimeout"])) {
        $MainConfig["contimeout"] = $hap->MainConfig["contimeout"];
    }
    if (!isset($MainConfig["srvtimeout"])) {
        $MainConfig["srvtimeout"] = $hap->MainConfig["srvtimeout"];
    }
    if (!isset($MainConfig["clitimeout"])) {
        $MainConfig["clitimeout"] = $hap->MainConfig["clitimeout"];
    }
    if (!isset($MainConfig["maxretries"])) {
        $MainConfig["maxretries"] = $hap->MainConfig["retries"];
    }
    if (!isset($MainConfig["NTLM_COMPATIBILITY"])) {
        $MainConfig["NTLM_COMPATIBILITY"] = $hap->MainConfig["NTLM_COMPATIBILITY"];
    }
    if (!is_numeric($MainConfig["maxretries"])) {
        $MainConfig["maxretries"] = 3;
    }
    $html = "<div style='width:100%;font-size:30px;margin-bottom:20px'>{$ligne["groupname"]}</div>\n\t<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:20px' nowrap>{default}:</td>\n\t\t\t<td width=99%>" . Field_checkbox_design("default-{$t}", 1, $ligne["default"]) . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:20px' nowrap>{groupname}:</td>\n\t\t\t<td width=99%>" . Field_text("groupname-{$t}", $ligne["groupname"], "font-size:20px;padding:3px") . "&nbsp;<span id='mode-options-{$t}'></span></td>\n\t\t</tr>\n\t\t\n\t\t\n\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:20px' nowrap>{method}:</td>\n\t\t\t<td width=99%>" . Field_array_Hash($mode, "loadbalancetype-{$t}", $MainConfig["loadbalancetype"], "blur()", null, 0, "font-size:20px;padding:3px") . "&nbsp;<span id='mode-options-{$t}'></span></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:20px' nowrap>{tunnel_mode}:</td>\n\t\t\t<td width=99%>" . Field_checkbox_design("tunnel_mode-{$t}", 1, $MainConfig["tunnel_mode"], "blur()") . "&nbsp;<span id='mode-tunnel_mode-{$t}'></span></td>\n\t\t\t\t\n\t\t</tr>\t\t\t\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:20px' nowrap>{dispatch_method}:</td>\n\t\t\t<td width=99%>" . Field_array_Hash($hap->algo, "dispatch_mode-{$t}", $MainConfig["dispatch_mode"], "style:font-size:20px;padding:3px") . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:20px' nowrap>{UseCookies}:</td>\n\t\t\t<td width=99%>" . Field_checkbox_design("UseCookies-{$t}", 1, $MainConfig["UseCookies"]) . "</td>\n\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:20px' nowrap>" . texttooltip("{NTLM_COMPATIBLE}", "{HAP_NTLM_COMPATIBLE}") . ":</td>\n\t\t\t\t<td width=99%>" . Field_checkbox_design("NTLM_COMPATIBILITY-{$t}", 1, $MainConfig["NTLM_COMPATIBILITY"], "blur()") . "</td>\n\t\t\t</tr>\t\t\t\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:20px' nowrap>{contimeout}:</td>\n\t\t\t\t<td style='font-size:20px;'>" . Field_text("contimeout-{$t}", $MainConfig["contimeout"], "font-size:20px;padding:3px;width:100px", null, "contimeoutcalc{$t}()", null, false, "contimeout{$t}()", false) . "&nbsp;{milliseconds}&nbsp;<span id='contimeout-span-{$t}'></span></td>\n\t\t\t\t \n\t\t\t</tr>\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:20px' nowrap>{srvtimeout}:</td>\n\t\t\t\t<td style='font-size:20px;'>" . Field_text("srvtimeout-{$t}", $MainConfig["srvtimeout"], "font-size:20px;padding:3px;width:100px", null, "contimeoutcalc{$t}()", null, false, "contimeout{$t}()", false) . "&nbsp;{milliseconds}&nbsp;<span id='srvtimeout-span-{$t}'></span></td>\n\t\t\t\t \n\t\t\t</tr>\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:20px' nowrap>{clitimeout}:</td>\n\t\t\t\t<td style='font-size:20px;'>" . Field_text("clitimeout-{$t}", $MainConfig["clitimeout"], "font-size:20px;padding:3px;width:100px", null, "contimeoutcalc{$t}()", null, false, "contimeout{$t}()", false) . "&nbsp;{milliseconds}&nbsp;<span id='clitimeout-span-{$t}'></span></td>\n\t\t\t\t \n\t\t\t</tr>\t\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:20px' nowrap>{maxretries}:</td>\n\t\t\t\t<td style='font-size:20px;'>" . Field_text("maxretries-{$t}", $MainConfig["maxretries"], "font-size:20px;padding:3px;width:60px", null, "blur()", null, false, "blur()", false) . "&nbsp;{times}</td>\n\t\t\t\t \n\t\t\t</tr>\t\n\t\t\t\t\t\t<tr>\t\t\t\n\t\t\t\t<td colspan=2 align='right'>" . button("{apply}", "Save{$t}()", 30) . "</td>\n\t\t\t</tr>\n\t\n\t</table>\t\n\t</div>\n<script>\n\nvar xSave{$t}=function (obj) {\n\tvar servicename='{$servicename}';\n\tvar results=obj.responseText;\n\tif(results.length>2){alert(results);return;}\n\t\$('#MAIN_HAPROXY_BALANCERS_TABLE').flexReload();\n\t\$('#HAPROXY_GROUPS_TABLE').flexReload();\n\t\$('#HAPROXY_BROWSE_ACL_GROUPS_TOT').flexReload();\n\tRefreshTab('haproxy_group_{$ID}');\n}\t\n\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tvar pp=encodeURIComponent(document.getElementById('groupname-{$t}').value);\n\tXHR.appendData('groupsave','{$ID}');\n\tXHR.appendData('groupname',pp);\n    XHR.appendData('loadbalancetype',document.getElementById('loadbalancetype-{$t}').value);\n    XHR.appendData('dispatch_mode',document.getElementById('dispatch_mode-{$t}').value);\n    XHR.appendData('contimeout',document.getElementById('contimeout-{$t}').value);\n    XHR.appendData('clitimeout',document.getElementById('clitimeout-{$t}').value);\n    XHR.appendData('srvtimeout',document.getElementById('srvtimeout-{$t}').value);\n    XHR.appendData('maxretries',document.getElementById('maxretries-{$t}').value);\n    \t\t\n    \n    if( document.getElementById('default-{$t}').checked){XHR.appendData('default',1);}else{XHR.appendData('default',0);}\n    if( document.getElementById('UseCookies-{$t}').checked){XHR.appendData('UseCookies',1);}else{XHR.appendData('UseCookies',0);}\n    if( document.getElementById('tunnel_mode-{$t}').checked){XHR.appendData('tunnel_mode',1);}else{XHR.appendData('tunnel_mode',0);}\n    if( document.getElementById('NTLM_COMPATIBILITY-{$t}').checked){XHR.appendData('NTLM_COMPATIBILITY',1);}else{XHR.appendData('NTLM_COMPATIBILITY',0);}\n    XHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n\t\t\n}\n</script>\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
示例#24
0
function license_info()
{
    $sock = new sockets();
    $datas = base64_decode($sock->getFrameWork('cmd.php?Kav4ProxyLicense&type=' . $_GET["license-type"]));
    $tp = explode("\n", $datas);
    $html = "<table style='width:99%' class=form>\n\t<tbody>";
    while (list($num, $val) = each($tp)) {
        if (trim($val) == null) {
            continue;
        }
        $val = htmlspecialchars($val);
        if (strlen($val) > 89) {
            $val = texttooltip(substr($val, 0, 86) . '...', $val, null, null, 1);
        }
        $html = $html . "\n\t\t\t<tr>\n\t\t\t\t<td style='font-size:12px'>\n\t\t\t\t\t<code>{$val}</code>\n\t\t\t\t</td>\n\t\t\t</tr>";
    }
    $html = $html . "</tbody>\n\t</table>";
    echo $html;
}
示例#25
0
function popup()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $squid = new squidbee();
    $sock = new sockets();
    $users = new usersMenus();
    $EnableWebProxyStatsAppliance = $sock->GET_INFO("EnableWebProxyStatsAppliance");
    $EnableRemoteStatisticsAppliance = $sock->GET_INFO("EnableRemoteStatisticsAppliance");
    if (!is_numeric($EnableWebProxyStatsAppliance)) {
        $EnableWebProxyStatsAppliance = 0;
    }
    if (!is_numeric($EnableRemoteStatisticsAppliance)) {
        $EnableRemoteStatisticsAppliance = 0;
    }
    if ($users->WEBSTATS_APPLIANCE) {
        $EnableWebProxyStatsAppliance = 1;
    }
    $DisableTCPEn = intval($sock->GET_INFO("DisableTCPEn"));
    $DisableTCPWindowScaling = intval($sock->GET_INFO("DisableTCPWindowScaling"));
    $SquidUploadTimeouts = intval($sock->GET_INFO("SquidUploadTimeouts"));
    $SquidConnectRetries = intval($sock->GET_INFO("SquidConnectRetries"));
    $SquidSimpleConfig = $sock->GET_INFO("SquidSimpleConfig");
    if (!is_numeric($SquidSimpleConfig)) {
        $SquidSimpleConfig = 1;
    }
    $t = time();
    $Upload_timedout[0] = "{default}";
    $Upload_timedout[10] = "10 {minutes}";
    $Upload_timedout[15] = "15 {minutes}";
    $Upload_timedout[20] = "20 {minutes}";
    $Upload_timedout[30] = "30 {minutes}";
    $Upload_timedout[60] = "1 {hour}";
    $Upload_timedout[120] = "2 {hours}";
    $Upload_timedout[180] = "3 {hours}";
    $Upload_timedout[240] = "4 {hours}";
    for ($i = 0; $i < 11; $i++) {
        $SquidConnectRetriesZ[$i] = $i;
    }
    $SquidConnectRetriesZ[0] = "{nottoretry}";
    $html = "\n\t<div id='{$t}'></div>\n\t<table style='width:99%' class=form>\n\t\n\t\t<tr>\n\t\t\t<td align='right' class=legend style='font-size:22px;vertical-align:top'>" . texttooltip("{DisableTCPEn}", "{DisableTCPEn_explain}") . "</strong>:</td>\n\t\t\t<td align='left' style='font-size:22px;vertical-align:middle'>" . Field_checkbox_design("DisableTCPEn-{$t}", 1, $DisableTCPEn) . "&nbsp;</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td align='right' class=legend style='font-size:22px;vertical-align:top'>" . texttooltip("{DisableTCPWindowScaling}", "{DisableTCPWindowScaling_explain}") . "</strong>:</td>\n\t\t\t<td align='left' style='font-size:22px;vertical-align:middle'>" . Field_checkbox_design("DisableTCPWindowScaling-{$t}", 1, $DisableTCPWindowScaling) . "&nbsp;</td>\n\t\t\t\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td align='right' class=legend style='font-size:22px;vertical-align:middle'>{uploads_timeout}</strong>:</td>\n\t\t\t<td align='left' style='font-size:22px;vertical-align:middle'>" . Field_array_Hash($Upload_timedout, "SquidUploadTimeouts-{$t}", $SquidUploadTimeouts, "SquidUploadTimeouts{$t}()", null, 0, "font-size:22px", false) . "&nbsp;</td>\n\t\t\t\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td align='right' class=legend style='font-size:22px;vertical-align:middle'>" . texttooltip("{forward_max_tries}", "{forward_max_tries_text}") . "</strong>:</td>\n\t\t\t<td align='left' style='font-size:22px;vertical-align:middle'>" . Field_text("forward_max_tries-{$t}", $squid->forward_max_tries, 'width:60%;font-size:22px') . "&nbsp;</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td align='right' class=legend style='font-size:22px;vertical-align:middle'>" . texttooltip("{connect_retries}", "{connect_retries_text}") . "</strong>:</td>\n\t\t\t<td align='left' style='font-size:22px;vertical-align:middle'>" . Field_array_Hash($SquidConnectRetriesZ, "SquidConnectRetries-{$t}", $SquidConnectRetries, "blur()", null, 0, "font-size:22px", false) . "&nbsp;</td>\n\t\t\t\n\t\t</tr>\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t<tr>\n\t\t\t<td align='right' class=legend style='font-size:22px;vertical-align:middle'>" . texttooltip("{forward_timeout}", "{forward_timeout_text}") . "</strong>:</td>\n\t\t\t<td align='left' style='font-size:22px;vertical-align:middle'>" . Field_text("forward_timeout-{$t}", $squid->forward_timeout, 'width:60%;font-size:22px') . "&nbsp;{seconds}</td>\n\t\t\t\n\t\t</tr>\t\t\t\t\t\n\t\t\t\t\t\n\t\t<tr>\n\t\t\t<td align='right' class=legend style='font-size:22px;vertical-align:middle'>" . texttooltip("{client_lifetime}", "{client_lifetime_text}") . "</strong>:</td>\n\t\t\t<td align='left' style='font-size:22px;vertical-align:middle'>" . Field_text("client_lifetime-{$t}", $squid->client_lifetime, 'width:60%;font-size:22px') . "&nbsp;{seconds}</td>\n\t\t\t\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td align='right' class=legend style='font-size:22px;vertical-align:middle'>" . texttooltip("{shutdown_lifetime}", "{shutdown_lifetime_text}") . "</strong>:</td>\n\t\t\t<td align='left' style='font-size:22px;vertical-align:middle'>" . Field_text("shutdown_lifetime-{$t}", $squid->shutdown_lifetime, 'width:60%;font-size:22px') . "&nbsp;{seconds}</td>\n\t\t\t\n\t\t</tr>\t\t\t\t\t\n\t\t<tr>\n\t\t\t<td align='right' class=legend style='font-size:22px;vertical-align:middle'>" . texttooltip("{read_timeout}", "{read_timeout_text}") . "</strong>:</td>\n\t\t\t<td align='left' style='font-size:22px;vertical-align:middle'>" . Field_text("read_timeout-{$t}", $squid->read_timeout, 'width:60%;font-size:22px') . "&nbsp;{seconds}</td>\n\t\t\t\n\t\t</tr>\t\n\t\t\t\t\t \t\n\t\t\t\t\t\n\t\t<tr>\n\t\t\t<td align='right' class=legend style='font-size:22px;vertical-align:middle'>" . texttooltip("{dead_peer_timeout}", "{dead_peer_timeout_text}") . "</strong>:</td>\n\t\t\t<td align='left' style='font-size:22px;vertical-align:middle'>" . Field_text("dead_peer_timeout-{$t}", $squid->dead_peer_timeout, 'width:60%;font-size:22px') . "&nbsp;{seconds}</td>\n\t\t\t\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td align='right' class=legend style='font-size:22px;vertical-align:middle'>" . texttooltip("{dns_timeout}", "{dns_timeout_text}") . "</strong>:</td>\n\t\t\t<td align='left' style='font-size:22px;vertical-align:middle'>" . Field_text("dns_timeout-{$t}", $squid->dns_timeout, 'width:60%;font-size:22px') . "&nbsp;{seconds}</td>\n\t\t\t\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t\t<td align='right' class=legend style='font-size:22px;vertical-align:middle'>" . texttooltip("{connect_timeout}", "{connect_timeout_text}") . "</strong>:</td>\n\t\t\t<td align='left' style='font-size:22px;vertical-align:middle'>" . Field_text("connect_timeout-{$t}", $squid->connect_timeout, 'width:60%;font-size:22px') . "&nbsp;{seconds}</td>\n\t\t\t\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t\t<td align='right' class=legend style='font-size:22px;vertical-align:middle'>" . texttooltip("{peer_connect_timeout}", "{peer_connect_timeout_text}") . "</strong>:</td>\n\t\t\t<td align='left' style='font-size:22px;vertical-align:middle'>" . Field_text("peer_connect_timeout-{$t}", $squid->peer_connect_timeout, 'width:60%;font-size:22px') . "&nbsp;{seconds}</td>\n\t\t\t\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td align='right' class=legend style='font-size:22px;vertical-align:middle'>" . texttooltip("{persistent_request_timeout}", "{persistent_request_timeout_text}") . "</strong>:</td>\n\t\t\t<td align='left' style='font-size:22px;vertical-align:middle'>" . Field_text("persistent_request_timeout-{$t}", $squid->persistent_request_timeout, 'width:60%;font-size:22px') . "&nbsp;{seconds}</td>\n\t\t\t\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td align='right' class=legend style='font-size:22px;vertical-align:middle'>" . texttooltip("{pconn_timeout}", "{pconn_timeout_text}") . "</strong>:</td>\n\t\t\t<td align='left' style='font-size:22px;vertical-align:middle'>" . Field_text("pconn_timeout-{$t}", $squid->pconn_timeout, 'width:60%;font-size:22px') . "&nbsp;{seconds}</td>\n\t\t\t\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td align='right' class=legend style='font-size:22px;vertical-align:middle'>" . texttooltip("{incoming_rate}", "{incoming_rate_text}") . "</strong>:</td>\n\t\t\t<td align='left' style='font-size:22px;vertical-align:middle'>" . Field_text("incoming_rate-{$t}", $squid->incoming_rate, 'width:60%;font-size:22px') . "&nbsp;</td>\n\t\t</tr>\n\t\t\t\t\t \t\n\t\t\t\t\t\n\t\t\t\n\t\t<tr>\n\t\t<td align='right' colspan=2>\n\t\t\t<hr>" . button("{apply}", "SaveSNMP{$t}()", 42) . "\n\t\t</td>\n\t\t</tr>\n\t</table>\n\t\n\t<script>\n\tvar x_SaveSNMP{$t}=function (obj) {\n\t\tvar tempvalue=obj.responseText;\n\t\tif(tempvalue.length>3){alert(tempvalue);return;}\n\t\tLoadjs('squid.restart.php?prepare-js=yes');\n\t\tYahooWin3Hide();\n\t}\t\n\t\n\tfunction SaveSNMP{$t}(){\n\t\tvar lock={$EnableRemoteStatisticsAppliance};\n\t\tif(lock==1){Loadjs('squid.newbee.php?error-remote-appliance=yes');return;}\t\n\t\tvar XHR = new XHRConnection();\n\t\tvar DisableTCPEn=0;\n\t\tvar DisableTCPWindowScaling=0;\n\t\tif(document.getElementById('DisableTCPEn-{$t}').checked){ DisableTCPEn=1 }\n\t\tif(document.getElementById('DisableTCPWindowScaling-{$t}').checked){ DisableTCPWindowScaling=1 }\n\t\t\n\t\tXHR.appendData('DisableTCPWindowScaling',DisableTCPWindowScaling);\n\t\tXHR.appendData('DisableTCPEn',DisableTCPEn);\n\t\tXHR.appendData('dead_peer_timeout',document.getElementById('dead_peer_timeout-{$t}').value);\n\t\tXHR.appendData('dns_timeout',document.getElementById('dns_timeout-{$t}').value);\n\t\tXHR.appendData('connect_timeout',document.getElementById('connect_timeout-{$t}').value);\n\t\tXHR.appendData('peer_connect_timeout',document.getElementById('peer_connect_timeout-{$t}').value);\n\t\tXHR.appendData('client_lifetime',document.getElementById('client_lifetime-{$t}').value);\n\t\tXHR.appendData('read_timeout',document.getElementById('read_timeout-{$t}').value);\n\t\tXHR.appendData('shutdown_lifetime',document.getElementById('shutdown_lifetime-{$t}').value);\n\t\tXHR.appendData('persistent_request_timeout',document.getElementById('persistent_request_timeout-{$t}').value);\n\t\tXHR.appendData('incoming_rate',document.getElementById('incoming_rate-{$t}').value);\n\t\tXHR.appendData('pconn_timeout',document.getElementById('pconn_timeout-{$t}').value);\n\t\tXHR.appendData('forward_max_tries',document.getElementById('forward_max_tries-{$t}').value);\n\t\tXHR.appendData('forward_timeout',document.getElementById('forward_timeout-{$t}').value);\n\t\tXHR.appendData('SquidUploadTimeouts',document.getElementById('SquidUploadTimeouts-{$t}').value);\n\t\tXHR.appendData('SquidConnectRetries',document.getElementById('SquidConnectRetries-{$t}').value);\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_SaveSNMP{$t});\t\n\t\t\n\t}\t\n\t\n\tfunction SquidUploadTimeouts{$t}(){\n\t\tvar SquidSimpleConfig={$SquidSimpleConfig};\n\t\t\n\t\tif(SquidSimpleConfig==1){\n\t\t\tdocument.getElementById('dead_peer_timeout-{$t}').disabled=true;\n\t\t\tdocument.getElementById('dns_timeout-{$t}').disabled=true;\n\t\t\tdocument.getElementById('connect_timeout-{$t}').disabled=true;\n\t\t\tdocument.getElementById('peer_connect_timeout-{$t}').disabled=true;\n\t\t\tdocument.getElementById('client_lifetime-{$t}').disabled=true;\n\t\t\tdocument.getElementById('read_timeout-{$t}').disabled=true;\n\t\t\tdocument.getElementById('persistent_request_timeout-{$t}').disabled=true;\n\t\t\tdocument.getElementById('incoming_rate-{$t}').disabled=true;\n\t\t\tdocument.getElementById('pconn_timeout-{$t}').disabled=true;\n\t\t\tdocument.getElementById('forward_timeout-{$t}').disabled=true;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\tdocument.getElementById('read_timeout-{$t}').disabled=false;\n\t\tdocument.getElementById('pconn_timeout-{$t}').disabled=false;\n\t\tdocument.getElementById('persistent_request_timeout-{$t}').disabled=false;\n\t\t\n\t\t\n\t\tif(document.getElementById('SquidUploadTimeouts-{$t}').value>0){\n\t\t\tdocument.getElementById('read_timeout-{$t}').disabled=true;\n\t\t\tdocument.getElementById('pconn_timeout-{$t}').disabled=true;\n\t\t\tdocument.getElementById('persistent_request_timeout-{$t}').disabled=true;\n\t\t}\n\t\n\t}\n\tSquidUploadTimeouts{$t}();\n\t</script>\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
示例#26
0
function domain_amavis_front()
{
    $tpl = new templates();
    $users = new usersMenus();
    if (!$users->AllowChangeAntiSpamSettings) {
        echo $tpl->_ENGINE_parse_body("alert('{ERROR_NO_PRIVS}')");
        exit;
    }
    $domain = $_GET["domain"];
    $dom = new DomainsTools();
    $dom->LoadAmavisDomain($domain);
    $button_admin = "<div style='text-align:center'>\n\t\t<input type='button' OnClick=\"javascript:GoBackDefaultAmavis()\" value='{back_to_defaults}&nbsp;&raquo;'></div>";
    $form1 = "\n<table style='width:100%'>\n<tr>\n\t<td class=legend>{amavisSpamLover}:</td>\n\t<td>" . Field_TRUEFALSE_checkbox_img('amavisSpamLover', $dom->amavisSpamLover, '{enable_disable}') . "</td>\n</tR>\n<tr>\n\t<td class=legend>{amavisBadHeaderLover}:</td>\n\t<td>" . Field_TRUEFALSE_checkbox_img('amavisBadHeaderLover', $dom->amavisBadHeaderLover, '{enable_disable}') . "</td>\n</tR>\n<tr>\n\t<td class=legend>{amavisBypassVirusChecks}:</td>\n\t<td>" . Field_TRUEFALSE_checkbox_img('amavisBypassVirusChecks', $dom->amavisBypassVirusChecks, '{enable_disable}') . "</td>\n</tR>\n<tr>\n\t<td class=legend>{amavisBypassSpamChecks}:</td>\n\t<td>" . Field_TRUEFALSE_checkbox_img('amavisBypassSpamChecks', $dom->amavisBypassSpamChecks, '{enable_disable}') . "</td>\n</tR>\n<tr>\n\t<td class=legend>{amavisBypassHeaderChecks}:</td>\n\t<td>" . Field_TRUEFALSE_checkbox_img('amavisBypassHeaderChecks', $dom->amavisBypassHeaderChecks, '{enable_disable}') . "</td>\n</tR>\n<tr>\n\t<td colspan=2 align='right'><hr><input type='button' OnClick=\"javascript:SaveUserAmavis();\" value='{edit}&nbsp;&raquo;'></td>\n</tr>\n</table>";
    $sa_quarantine_cutoff_level = $tpl->_ENGINE_parse_body('{sa_quarantine_cutoff_level}', 'amavis.index.php,spamassassin.index.php');
    if (strlen($sa_quarantine_cutoff_level) > 50) {
        $sa_quarantine_cutoff_level = texttooltip(substr($sa_quarantine_cutoff_level, 0, 47) . '...', $sa_quarantine_cutoff_level);
    }
    $sa_dsn_cutoff_level = $tpl->_ENGINE_parse_body('{sa_dsn_cutoff_level}', 'amavis.index.php,spamassassin.index.php');
    if (strlen($sa_dsn_cutoff_level) > 50) {
        $sa_dsn_cutoff_level = texttooltip(substr($sa_dsn_cutoff_level, 0, 47) . '...', $sa_dsn_cutoff_level);
    }
    $form2 = "\n\n<table style='width:100%'>\t\n\t\t<tr>\n\t\t\t<td class=legend nowrap>{sa_tag2_level_deflt}:</td>\n\t\t\t<td width=1%>" . Field_text('amavisSpamTag2Level', $dom->amavisSpamTag2Level, 'width:90px') . "</td>\n\t\t\t<td>&nbsp;</td>\n\t\t\t\t\t\t\t\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend nowrap>{sa_kill_level_deflt}:</td>\n\t\t\t<td width=1%>" . Field_text('amavisSpamKillLevel', $dom->amavisSpamKillLevel, 'width:90px') . "</td>\n\t\t\t<td>&nbsp;</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t<td colspan=3 align='right'><input type='button' value='{edit}&nbsp;&raquo;' OnClick=\"javascript:SaveUserAmavis();\">\n\t\t</tr>\t\t\n\t\t<tr><td colspan=3><hr></td></tR>\n\t\t<tr>\n\t\t\t<td class=legend nowrap>{$sa_dsn_cutoff_level}:</td>\n\t\t\t<td width=1%>" . Field_text('amavisSpamDsnCutoffLevel', $dom->amavisSpamDsnCutoffLevel, 'width:90px') . "</td>\n\t\t\t<td>&nbsp;</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend nowrap>{$sa_quarantine_cutoff_level}:</td>\n\t\t\t<td width=1%>" . Field_text('amavisSpamQuarantineCutoffLevel', $dom->amavisSpamQuarantineCutoffLevel, 'width:90px') . "</td>\n\t\t\t<td>&nbsp;</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=2 align='right'><hr><input type='button' OnClick=\"javascript:SaveUserAmavis();\" value='{edit}&nbsp;&raquo;'></td>\n\t\t</tr>\t\n\t</table>\n\n";
    $spam_subject_tag2_maps = $tpl->_ENGINE_parse_body('{spam_subject_tag2_maps}', 'amavis.index.php,spamassassin.index.php');
    $form3 = "\n<table style='width:100%'>\n<tr>\n\t\n\t\n\t<td class=legend nowrap>{amavisSpamModifiesSubj}:</td>\n\t<td width=1%>" . Field_TRUEFALSE_checkbox_img('amavisSpamModifiesSubj', $dom->amavisSpamModifiesSubj, '{enable_disable}') . "</td>\t\n\t\n</tr>\t\n</table>\n<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td class=legend nowrap>{spam_subject_tag_maps}:</td>\n\t\t\t<td width=1%>" . Field_text('amavisSpamSubjectTag', $dom->amavisSpamSubjectTag, 'width:190px') . "</td>\n\t\t\t<td class=legend nowrap>{score}:</td>\n\t\t\t<td>" . Field_text("amavisSpamTagLevel", $dom->amavisSpamTagLevel, 'width:33px') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend nowrap>{$spam_subject_tag2_maps}:</td>\n\t\t\t<td width=1%>" . Field_text('amavisSpamSubjectTag2', $dom->amavisSpamSubjectTag2, 'width:190px') . "</td>\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>&nbsp;</td>\n\t\t</tr>\t\t\n\t<tr>\n\t\t<td colspan=5 align='right'><hr><input type='button' OnClick=\"javascript:SaveUserAmavis();\" value='{edit}&nbsp;&raquo;'></td>\n\t</tr>\n</table>\n\n";
    $form1 = RoundedLightWhite($form1);
    $form2 = RoundedLightWhite($form2);
    $form3 = RoundedLightWhite($form3);
    $html = "\n<H1>{spam_rules}</H1>\n\n<table style='width:100%'>\n<td valign='top' width=1%>\n<img src='img/caterpillarkas.png'>\n<p class=caption>{amavis_domain_text}</p>\n<hr>\n{$button_admin}\n</td>\n<td><div id='domain-amavis'>{$form1}<br>{$form2}<br>{$form3}</div></td>\n</tr>\n</table>\n\n";
    /*	
    amavisSpamLover: FALSE
    amavisBadHeaderLover: FALSE
    amavisBypassVirusChecks: FALSE
    amavisBypassSpamChecks: FALSE
    
    amavisBypassHeaderChecks: FALSE
    amavisSpamTagLevel: -999
    amavisSpamTag2Level: 5
    amavisSpamKillLevel: 5
    amavisSpamModifiesSubj: TRUE
    */
    echo $tpl->_ENGINE_parse_body($html, 'amavis.index.php,spamassassin.index.php');
}
function popup()
{
    $array["sharedlist"] = "{shared_folders}";
    $array["acldisks"] = "{acl_disks}";
    $tpl = new templates();
    $page = CurrentPageName();
    while (list($num, $ligne) = each($array)) {
        $ligne = $tpl->_ENGINE_parse_body($ligne);
        $ligne_text = html_entity_decode($ligne, ENT_QUOTES, "UTF-8");
        if (strlen($ligne_text) > 17) {
            $ligne_text = substr($ligne_text, 0, 14);
            $ligne_text = htmlspecialchars($ligne_text) . "...";
            $ligne_text = texttooltip($ligne_text, $ligne, null, null, 1);
        }
        //$html=$html . "<li><a href=\"javascript:ChangeSetupTab('$num')\" $class>$ligne</a></li>\n";
        $html[] = "<li><a href=\"{$page}?{$num}=yes\"><span>{$ligne_text}</span></li>\n";
    }
    $tpl = new templates();
    echo "\n\t<div id=main_samba_shared_folders style='width:100%;height:550px;overflow:auto;background-color:white;'>\n\t\t<ul>" . implode("\n", $html) . "</ul>\n\t</div>\n\t\t<script>\n\t\t\t\t\$(document).ready(function(){\n\t\t\t\t\t\$('#main_samba_shared_folders').tabs({\n\t\t\t\t    load: function(event, ui) {\n\t\t\t\t        \$('a', ui.panel).click(function() {\n\t\t\t\t            \$(ui.panel).load(this.href);\n\t\t\t\t            return false;\n\t\t\t\t        });\n\t\t\t\t    }\n\t\t\t\t});\n\t\t\t\n\n\t\t\t});\n\t\t</script>";
}
function ZOOM_POPUP(){
	$ID=$_GET["ID"];
	$q=new mysql_squid_builder();
	$tpl=new templates();	
	$sql="SELECT * FROM {$_GET["table"]} WHERE ID=$ID";	
	$ligne=mysql_fetch_array($q->QUERY_SQL($sql));
	if(isset($ligne["website"])){$website=$ligne["website"];}
	$html="
	<div id='getCategoriesof'></div>
	
	
	<table style='width:99%' class=form>
	<tbody>
	
	";
	while (list ($index, $line) = each ($ligne)){
		if(is_numeric($index)){continue;}
		if(trim($line)==null){continue;}
		$ligne["website"]=texttooltip($ligne["website"],
		$ligne["uri"],"s_PopUpScroll('{$ligne["uri"]}',800,600,'{$ligne["blocktype"]} {$ligne["category"]}')",null,0,"text-decoration:underline");
		unset($ligne["uri"]);
		$html=$html."
		<tr>
		<td class=legend>{{$index}}:</td>
		<td style='font-size:13px'>$line</td>
		</tr>";
		
		
	}
	$html=$html."</tbody>
	</table>
	<script>
		LoadAjaxTiny('getCategoriesof','squid.search.statistics.php?search-stats-categories=$website');
	</script>
	
	";
	echo $tpl->_ENGINE_parse_body($html);
	
	
	
}
function tabs(){
	if(!isset($_GET["main"])){$_GET["main"]="network";};
	
	$hostname=$_GET["hostname"];
	$ou=$_GET["ou"];
	
	$users=new usersMenus();
	$users->LoadModulesEnabled();
	
	$tpl=new templates();
	$filters_settings=$tpl->_ENGINE_parse_body('{filters_settings}');
	if(strlen($filters_settings)>25){$filters_settings=texttooltip(substr($filters_settings,0,22).'...',$filters_settings,null,null,1);}
	
	$page=CurrentPageName();
	$array["status"]='{status}';
	$array["transport"]='{transport_settings}';
	$array["security"]='{security_settings}';
	$array["filters"]=$filters_settings;
	
	
	while (list ($num, $ligne) = each ($array) ){
		$html[]=$tpl->_ENGINE_parse_body("<li><a href=\"$page?$num=yes&hostname=$hostname&ou=$ou\"><span>$ligne</span></a></li>\n");
	}
	
	
	echo "
	<div id=main_multi_config_postfix style='width:100%;height:550px;overflow:auto'>
		<ul>". implode("\n",$html)."</ul>
	</div>
		<script>
				$(document).ready(function(){
					$('#main_multi_config_postfix').tabs();
			
			
			});
		</script>";	
	
	
}
示例#30
0
function search()
{
    $search = $_GET["search"];
    $search = "*{$search}*";
    $search = str_replace("**", "*", $search);
    $search = str_replace("**", "*", $search);
    $search = str_replace("*", "%", $search);
    if (CACHE_SESSION_GET(__FILE__ . __FUNCTION__ . $search, __FILE__, 2)) {
        return;
    }
    $page = CurrentPageName();
    $tpl = new templates();
    $q = new mysql_squid_builder();
    $table = "visited_sites";
    if ($q->COUNT_ROWS($table) == 0) {
        echo "<H2>" . $tpl->_ENGINE_parse_body("TABLE:{$table}<br>{error_no_datas}") . "</H2>";
        return;
    }
    $sql = "SELECT familysite,SUM(HitsNumber) as HitsNumber FROM `{$table}` \n\tGROUP BY familysite HAVING (`familysite` LIKE '{$search}')\n\tORDER BY HitsNumber DESC LIMIT 0,100";
    $html = "<center>\n<table cellspacing='0' cellpadding='0' border='0' class='tableView' style='width:100%'>\n<thead class='thead'>\n\t<tr>\n\t\t\n\t\t<th width=50% nowrap colspan=2>{websites}</th>\n\t\t<th width=50% nowrap>{hits}</th>\n\t\t<th width=1% nowrap>&nbsp;</th>\n\t</tr>\n</thead>\n<tbody class='tbody'>";
    $results = $q->QUERY_SQL($sql);
    if (!$q->ok) {
        echo "<H2>{$q->mysql_error}</H2><center style='font-size:11px'><code>{$sql}</code></center>";
    }
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        if ($classtr == "oddRow") {
            $classtr = null;
        } else {
            $classtr = "oddRow";
        }
        $js = "BrowseWWWSelect('{$ligne["familysite"]}');";
        $siteTool = imgtootltip("website-add-32.png", "{select}:{$ligne["familysite"]}", $js);
        $sitname = texttooltip($ligne["familysite"], "{select}", $js, null, 0, "font-size:14px;text-decoration:underline");
        $html = $html . "\n\t\t<tr class={$classtr}>\n\t\t<td width=1% style='font-size:14px'>{$siteTool}</td>\n\t\t<td style='font-size:14px' width=99%>{$sitname}</td>\n\t\t<td style='font-size:14px' width=1%>{$ligne["HitsNumber"]}</td>\n\t\t</tr>\t\n\t\t\n\t\t";
    }
    $html = $html . "</tbody></table>\n";
    CACHE_SESSION_SET(__FILE__ . __FUNCTION__ . $search, __FILE__, $tpl->_ENGINE_parse_body($html));
}