当前位置: 首页>>代码示例>>PHP>>正文


PHP Field_array_Hash函数代码示例

本文整理汇总了PHP中Field_array_Hash函数的典型用法代码示例。如果您正苦于以下问题:PHP Field_array_Hash函数的具体用法?PHP Field_array_Hash怎么用?PHP Field_array_Hash使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Field_array_Hash函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: popup

function popup()
{
    $squid = new squidbee();
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $WCCP = 1;
    $arrayParams = unserialize(base64_decode($sock->getFrameWork("squid.php?compile-list=yes")));
    $t = time();
    $ip = new networking();
    $ipsH = $ip->ALL_IPS_GET_ARRAY();
    $SquidWCCPEnabled = $sock->GET_INFO("SquidWCCPEnabled");
    if (!is_numeric($SquidWCCPEnabled)) {
        $SquidWCCPEnabled = 0;
    }
    if (!isset($arrayParams["--enable-wccpv2"])) {
        $WCCP = 0;
    }
    $WCCPHash = unserialize(base64_decode($sock->GET_INFO("WCCPHash")));
    $wccp2_forwarding_method_hash = array(1 => "{wccp2_forwarding_method_hash_1}", 2 => "{wccp2_forwarding_method_hash_2}");
    $wccp2_return_method_hash = array("gre" => "GRE encapsulation");
    $wccp2_assignment_method_hash = array("hash" => "Hash assignment", "mask" => "Mask assignment");
    $html = "\n<div style='font-size:22px'>{WCCP_NAME}</div>\n<div class=explain style='font-size:14px'>{WCCP_HOWTO}</div>\n<div id='SquidAVParamWCCP' style='width:98%' class=form>\n<table style='width:100%'>\n\t<tr>\n\t<td style='font-size:16px;' class=legend>{wccp2_enabled}:</td>\n\t<td>" . Field_checkbox("wccp2_enabled", 1, $squid->wccp2_enabled, "wccp2_enabled()") . "</td>\n\t<td>&nbsp;</td>\n\t</tr>\n\n\n\t<tr>\n\t\t<td style='font-size:16px' class=legend nowrap>{wccp2_routers}:</td>\n\t\t<td>" . Field_text("wccp2_router", $WCCPHash["wccp2_router"], "font-size:16px;padding:3px;width:320px") . "</td>\n\t\t<td>" . help_icon("{wccp2_routers_explain}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td style='font-size:16px' class=legend nowrap>{listen_address}:</td>\n\t\t<td>" . Field_array_Hash($ipsH, "listen_address-{$t}", $WCCPHash["listen_address"], "style:font-size:16px") . "</td>\n\t\t<td></td>\n\t</tr>\n\t<tr>\n\t\t<td style='font-size:16px' class=legend nowrap>{wccp2_forwarding_method}:</td>\n\t\t<td>" . Field_array_Hash($wccp2_forwarding_method_hash, "wccp2_forwarding_method", $WCCPHash["wccp2_forwarding_method"], "style:font-size:16px") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\n\n\t<tr>\n\t\t<td style='font-size:16px' class=legend nowrap>{wccp2_return_method}:</td>\n\t\t<td>" . Field_array_Hash($wccp2_return_method_hash, "wccp2_return_method", $WCCPHash["wccp2_return_method"], "style:font-size:16px") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\n\t<tr>\n\t\t<td style='font-size:16px' class=legend nowrap>{wccp2_assignment_method}:</td>\n\t\t<td>" . Field_array_Hash($wccp2_assignment_method_hash, "wccp2_assignment_method", $WCCPHash["wccp2_assignment_method"], "style:font-size:16px") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=3 align='right'>\n\t\t\t<hr>\n\t\t\t\t" . button("{apply}", "SquidWccp2ParamSave()", 18) . "\n\t\t</td>\n\t</tr>\n\t</table>\n</div>\n<script>\nvar X_SquidWccp2ParamSave= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>3){alert(results);}\n\tLoadjs('squid.restart.php?prepare-js=yes');\n\t\n}\n\nfunction SquidWccp2ParamSave(){\n\tvar XHR = new XHRConnection();\n\tif(document.getElementById('wccp2_enabled').checked){\n\t\tXHR.appendData('wccp2_enabled',1);\n\t}else{\n\t\tXHR.appendData('wccp2_enabled',0);\n\t}\n\tXHR.appendData('wccp2_router',\n\tdocument.getElementById('wccp2_router').value);\n\n\tXHR.appendData('wccp2_forwarding_method',\n\tdocument.getElementById('wccp2_forwarding_method').value);\n\n\tXHR.appendData('wccp2_return_method',\n\tdocument.getElementById('wccp2_return_method').value);\n\n\tXHR.appendData('wccp2_assignment_method',\n\tdocument.getElementById('wccp2_assignment_method').value);\n\t\n\tXHR.appendData('listen_address',\n\tdocument.getElementById('listen_address-{$t}').value);\n\n\tXHR.sendAndLoad('{$page}', 'POST',X_SquidWccp2ParamSave);\n}\n\n\nfunction wccp2_disable_all(){\n\tdocument.getElementById('wccp2_forwarding_method').disabled=true;\n\tdocument.getElementById('wccp2_router').disabled=true;\n\tdocument.getElementById('wccp2_forwarding_method').disabled=true;\n\tdocument.getElementById('wccp2_return_method').disabled=true;\n\tdocument.getElementById('wccp2_assignment_method').disabled=true;\n\tdocument.getElementById('listen_address-{$t}').disabled=true;\n\t\n}\nfunction wccp2_enable_all(){\n\tdocument.getElementById('wccp2_forwarding_method').disabled=false;\n\tdocument.getElementById('wccp2_router').disabled=false;\n\tdocument.getElementById('wccp2_forwarding_method').disabled=false;\n\tdocument.getElementById('wccp2_return_method').disabled=false;\n\tdocument.getElementById('wccp2_assignment_method').disabled=false;\n\tdocument.getElementById('listen_address-{$t}').disabled=false;\n}\n\nfunction wccp2_enabled(){\n\twccp2_disable_all();\n\tvar wccp2={$WCCP};\n\tif(wccp2==0){\n\t\tdocument.getElementById('wccp2_enabled').disabled=true;\n\t\tdocument.getElementById('wccp2_enabled').checked=false;\n\t}\n\tif(document.getElementById('wccp2_enabled').checked){wccp2_enable_all();}\n}\n\nwccp2_enabled();\n</script>";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:25,代码来源:squid.wccpv2.php

示例2: Page

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);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:25,代码来源:webauth.rules.picture.php

示例3: popup

function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $users = new usersMenus();
    $q = new mysql();
    $sql = "SELECT * FROM officials_domains ORDER BY domain";
    writelogs("{$sql}", __FUNCTION__, __FILE__, __LINE__);
    $results = $q->QUERY_SQL($sql, "artica_backup");
    if (!$q->ok) {
        echo "<H2>{$q->mysql_error}</H2>";
    }
    while ($ligne = mysql_fetch_array($results, MYSQL_ASSOC)) {
        $domains[$ligne["domain"]] = $ligne["domain"];
    }
    $OverWriteRestrictedDomains = 0;
    if ($users->OverWriteRestrictedDomains) {
        $OverWriteRestrictedDomains = 1;
    }
    if ($OverWriteRestrictedDomains == 1) {
        $over = "\n\t\t<hr>\n\t\t<div class=explain>{OverWriteRestrictedDomains_allow_text}</div>\n\t\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td class=legend>{domain}:</td>\n\t\t<td width=100%>" . Field_text("overwrite-domain", null, "font-size:16px;padding:3px;width:320px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button("{add}", "AddSubdomainOUOver()") . "</td>\n\t</tr>\n\t</table>\n\t\t";
    }
    $_GET["ou"] = urlencode($_GET["ou"]);
    $domains[null] = "{select}";
    $html = "\n\t<div id='add_subdomain_explain'></div>\n\t<div class=explain >{add_subdomain_explain}</div>\n\t\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td class=legend>{subdomain}:</td>\n\t\t<td width=50%>" . Field_text("subdomain", null, "font-size:16px;padding:3px;width:220px") . "</td>\n\t\t<td style='font-size:16px;padding:3px' width=1%><strong>.</strong></td>\n\t\t<td width=50%>" . Field_array_Hash($domains, "maindomain", null, "style:font-size:16px;padding:3px;") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=4 align='right'><hr>" . button("{add}", "AddSubdomainOU()") . "</td>\n\t</tr>\n\t</table>\n\t{$over}\n\t<script>\n\tvar x_AddSubdomainOU= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tdocument.getElementById('subdomain').innerHTML='';\n\t\tif(results.length>3){alert(results);return;}\n\t\tYahooWin4Hide();\n\t\tLoadAjax('LocalDomainsList','domains.edit.domains.php?LocalDomainList=yes&ou={$_GET["ou"]}');\n\t}\t\t\n\t\t\n\t\tfunction AddSubdomainOU(){\n\t\t\tvar maindomain=document.getElementById('maindomain').value;\n\t\t\tvar subdomain=document.getElementById('subdomain').value;\n\t\t\tif(maindomain.length<3){return;}\n\t\t\tif(subdomain.length<3){return;}\n\t\t\tvar domain=subdomain+'.'+maindomain;\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('AddNewInternetDomain','{$_GET["ou"]}');\n\t\t\tXHR.appendData('AddNewInternetDomainDomainName',domain);\t\n\t\t\tAnimateDiv('add_subdomain_explain');\n\t\t\tXHR.sendAndLoad('domains.edit.domains.php', 'GET',x_AddSubdomainOU);\n\t\t\t\n\t\t}\n\t\t\n\t\tfunction AddSubdomainOUOver(){\n\t\t\tvar maindomain=document.getElementById('overwrite-domain').value;\n\t\t\tif(maindomain.length<3){return;}\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('AddNewInternetDomain','{$_GET["ou"]}');\n\t\t\tXHR.appendData('AddNewInternetDomainDomainName',maindomain);\t\n\t\t\tAnimateDiv('add_subdomain_explain');\n\t\t\tXHR.sendAndLoad('domains.edit.domains.php', 'GET',x_AddSubdomainOU);\t\t\t\n\t\t}\n\n\t</script>\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:27,代码来源:domains.add.localdomain.restricted.php

示例4: popup

function popup()
{
    $sock = new sockets();
    $page = CurrentPageName();
    $CyrusEnableLMTPUnix = $sock->GET_INFO("CyrusEnableLMTPUnix");
    if ($CyrusEnableLMTPUnix == null) {
        $CyrusEnableLMTPUnix = 1;
    }
    $nets["127.0.0.1"] = "127.0.0.1";
    $net = new networking();
    while (list($num, $ipaddr) = each($net->array_TCP)) {
        if ($ipaddr == null) {
            continue;
        }
        $nets[$ipaddr] = $ipaddr;
    }
    $CyrusLMTPListen = trim($sock->GET_INFO("CyrusLMTPListen"));
    if ($CyrusLMTPListen == null) {
        $CyrusLMTPListen = "127.0.0.1:2005";
    }
    if (preg_match("#(.+?):(.+)#", $CyrusLMTPListen, $re)) {
        $ipaddr_listen = $re[1];
        $port = $re[2];
    }
    $lmtp_unix = "/var/spool/postfix/var/run/cyrus/socket/lmtp";
    $html = "\n\t<div id='cyrus_lmtp_div'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td width=1% valign='top'><img src='img/database-connect-settings-90.png'></td>\n\t\t<td valign='top'>\n\t<div style='font-size:13px;padding:5px'>{cyrus_lmtp_howto}</div>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend style='font-size:13px'>{enable_lmtp_unix}:</td>\n\t\t<td>" . Field_checkbox("CyrusEnableLMTPUnix", 1, $CyrusEnableLMTPUnix, "CyrusEnableLMTPUnixSwitch()") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:13px'>{listen_ip}:</td>\n\t\t<td>\n\t\t\t<table style='width:1%'>\n\t\t\t<tr>\n\t\t\t\t<td width=1%>" . Field_array_Hash($nets, "lmtp_ipaddr", $ipaddr_listen, null, null, 0, "font-size:13px;padding:3px") . "</td>\n\t\t\t\t<td width=1%>:</td>\n\t\t\t\t<td width=1%>" . Field_text("lmtp_port", $port, "font-size:13px;padding:3px;width:40px") . "</td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>\n\t\t\t" . button("{apply}", "CyrusEnableLMTPUnixSave()") . "</td>\n\t</tr>\n\t</table>\n\t</td>\n\t</tr>\n\t</table>\n\t</div>\n\t<script>\n\t\n\tvar x_CyrusEnableLMTPUnixSave= function (obj) {\n\t\tYahooWinHide();\n\t}\t\n\t\n\tfunction CyrusEnableLMTPUnixSave(){\n\t\tvar XHR = new XHRConnection();\n\t\tif(document.getElementById('CyrusEnableLMTPUnix').checked){XHR.appendData('CyrusEnableLMTPUnix',1);}else{XHR.appendData('CyrusEnableLMTPUnix',0);}\n\t\tXHR.appendData('CyrusLMTPListen',document.getElementById('lmtp_ipaddr').value+':'+document.getElementById('lmtp_port').value);\n\t\tdocument.getElementById('cyrus_lmtp_div').innerHTML='<div style=\"width:100%\"><center style=\"margin:20px;padding:20px\"><img src=\"img/wait_verybig.gif\"></center></div>';\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_CyrusEnableLMTPUnixSave);\n\t}\n\t\t\n\t\tCyrusEnableLMTPUnixSwitch();\n\t</script>\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:29,代码来源:cyrus.lmtp.php

示例5: page

function page()
{
    $q = new mysql_squid_builder();
    $timekey = date('Ymd');
    $timekeyMonth = date("Ym");
    $time = time();
    $page = CurrentPageName();
    $tpl = new templates();
    $q = new mysql_squid_builder();
    $tpl = new templates();
    $t = time();
    $per["1m"] = "{minute}";
    $per["5m"] = "5 {minutes}";
    $per["10m"] = "10 {minutes}";
    $per["1h"] = "{hour}";
    $per["1d"] = "{day}";
    $members["MAC"] = "{MAC}";
    $members["USERID"] = "{uid}";
    $members["IPADDR"] = "{ipaddr}";
    if (!isset($_SESSION["SQUID_STATS_MEM_DATE1"])) {
        $_SESSION["SQUID_STATS_MEM_DATE1"] = date("Y-m-d");
    }
    if (!isset($_SESSION["SQUID_STATS_MEM_TIME1"])) {
        $_SESSION["SQUID_STATS_MEM_TIME1"] = "00:00";
    }
    if (!isset($_SESSION["SQUID_STATS_MEM_DATE2"])) {
        $_SESSION["SQUID_STATS_MEM_DATE2"] = date("Y-m-d");
    }
    if (!isset($_SESSION["SQUID_STATS_MEM_TIME2"])) {
        $_SESSION["SQUID_STATS_MEM_TIME2"] = "23:00";
    }
    $html = "\n\t<div style='width:98%;margin-bottom:20px' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td style='vertical-align:top;font-size:18px' class=legend>{interval}:</td>\n\t\t<td style='vertical-align:top;font-size:18px;'>" . Field_array_Hash($per, "interval-{$t}", "10m", "blur()", null, 0, "font-size:18px;") . "</td>\n\t\t<td style='vertical-align:top;font-size:18px' class=legend nowrap>{from_date}:</td>\n\t\t<td style='vertical-align:top;font-size:18px'>" . field_date("from-date-{$t}", $_SESSION["SQUID_STATS_MEM_DATE1"], ";font-size:18px;width:160px") . "</td>\n\t\t<td style='vertical-align:top;font-size:18px'>" . Field_text("from-time-{$t}", $_SESSION["SQUID_STATS_MEM_TIME1"], ";font-size:18px;width:82px") . "</td>\n\t\t<td style='vertical-align:top;font-size:18px' class=legend nowrap>{to_date}:</td>\n\t\t<td style='vertical-align:top;font-size:18px'>" . field_date("to-date-{$t}", $_SESSION["SQUID_STATS_MEM_DATE2"], ";font-size:18px;width:160px") . "</td>\n\t\t<td style='vertical-align:top;font-size:18px'>" . Field_text("to-time-{$t}", $_SESSION["SQUID_STATS_MEM_TIME2"], ";font-size:18px;width:82px") . "</td>\n\t\t<td style='vertical-align:top;font-size:18px;;width:400px'>" . button("Go", "Run{$t}()", 18) . "</td>\n\t\t</tr>\n\t\t</table>\n\t</div>\n\t<div style='font-size:32px'>{proxy_memory_service_status}</div>\n\t<div style='width:1280px;height:550px;margin-bottom:10px' id='graph-{$t}'></div>\n\t<div style='font-size:32px'>{server_memory_consumption}</div>\n\t<div style='width:1280px;height:550px;margin-bottom:10px' id='memstats-{$t}'></div>\n\t\n\t\n\t\n\t\n\t\n\t\n<script>\n\nfunction Run{$t}(){\n\tvar date1=document.getElementById('from-date-{$t}').value;\n\tvar time1=document.getElementById('from-time-{$t}').value;\n\tvar date2=document.getElementById('to-date-{$t}').value\n\tvar time2=document.getElementById('to-time-{$t}').value;\n\tvar interval=document.getElementById('interval-{$t}').value;\n\tLoadjs('{$page}?query=yes&container=graph-{$t}&date1='+date1+'&time1='+time1+'&date2='+date2+'&time2='+time2+'&interval='+interval);\n\tLoadjs('{$page}?memstats=yes&container=memstats-{$t}&date1='+date1+'&time1='+time1+'&date2='+date2+'&time2='+time2+'&interval='+interval);\n\n}\nRun{$t}();\n</script>\t\n";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:34,代码来源:squid.memory.status.php

示例6: ADD_PAGE

function ADD_PAGE()
{
    if (isset($_GET["EDIT_PAGE"])) {
        $ldap = new clladp();
        $hash = $ldap->UserDatas($_SESSION["uid"]);
        if (preg_match('#<header>(.+?)</header><pattern>(.+?)</pattern><regex>(.+?)</regex><action>(.+?)</action>#', $hash["RegexRules"][$_GET["EDIT_PAGE"]], $reg)) {
            $header_field = $reg[1];
            $action_value = $reg[4];
            $regex_value = $reg[3];
            $pattern_value = $reg[2];
            $button_name = '{edit}';
            $title = '{edit_a_rule}';
            $hidden = "<input type='hidden' id='edit' value='{$_GET["EDIT_PAGE"]}'>";
        }
    } else {
        $button_name = "{add}";
        $title = "{add_a_rule}";
    }
    $fields = Field_array_Hash(ARRAY_HEADERS_FIELD(), 'header_field', $header_field);
    $array_action = array("quarantine" => "{user_quarantine}", "delete" => "{user_delete}", "pass" => "{user_skip_antispam}");
    $action = Field_array_Hash($array_action, 'action', $action_value);
    $html = "\n\t<div style='padding:20px'>\n\t{$hidden}\n\t<H3>{$title}</H3>\n\t<p>&nbsp;</p>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td align='right'><strong>{select_header_field}</strong>:</td>\n\t\t<td>{$fields}</td>\n\t<tr>\n\t\t<td align='right'><strong>{match_pattern}</strong></td>\n\t\t<td>" . Field_text('pattern', $pattern_value) . ":</td>\n\t</tr>\t\n\t<tr>\n\t\t<td nowrap align='right'><strong>{use_regex}</strong>:</td>\n\t\t<td>" . Field_numeric_checkbox_img('regex', $regex_value, '{enable_disable}') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td nowrap align='right'><strong>{then}</strong>:</td>\n\t\t<td>{$action}</td>\n\t</tr>\t\t\t\n\t<tr>\n\t<td colspan=2 class='caption'>{star_explain} {only_regex_off}</td>\t\n\t</tr>\n\t<tr>\n\t<td colspan=2 align='right'><input type='button' value='{$button_name}&nbsp;&raquo;' OnClick=\"javascript:AddFilterRule();\"</td>\t\n\t</tr>\t\n\t\n\t\n\t\n\t</table>\n\t\n\t";
    //ArticaUserFilterRule
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:brucewu16899,项目名称:artica,代码行数:26,代码来源:user.content.rules.php

示例7: page

function page()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $t = time();
    $EnableMilterGreylistExternalDB = intval($sock->GET_INFO("EnableMilterGreylistExternalDB"));
    $MilterGreylistExternalDBSchedule = intval($sock->GET_INFO("MilterGreylistExternalDBSchedule"));
    if ($MilterGreylistExternalDBSchedule == 0) {
        $MilterGreylistExternalDBSchedule = 4;
    }
    $MilterGreyListPatternTime = intval($sock->GET_INFO("MilterGreyListPatternTime"));
    $MilterGreyListPatternCount = intval($sock->GET_INFO("MilterGreyListPatternCount"));
    $EnableArticaTechSpamAssassin = intval($sock->GET_INFO("EnableArticaTechSpamAssassin"));
    $schedules[1] = "1 {hour}";
    $schedules[2] = "2 {hours}";
    $schedules[4] = "4 {hours}";
    $schedules[8] = "8 {hours}";
    $schedules[24] = "1 {day}";
    $p = Paragraphe_switch_img("{EnableMilterGreylistExternalDB}", "{EnableMilterGreylistExternalDB_explain}", "EnableMilterGreylistExternalDB-{$t}", $EnableMilterGreylistExternalDB, null, 960);
    $p1 = Paragraphe_switch_img("{EnableArticaTechSpamAssassin}", "{EnableArticaTechSpamAssassin_explain}", "EnableArticaTechSpamAssassin-{$t}", $EnableArticaTechSpamAssassin, null, 960);
    $field = Field_array_Hash($schedules, "MilterGreylistExternalDBSchedule-{$t}", $MilterGreylistExternalDBSchedule, "blur()", null, 0, "font-size:26px");
    $html = "\n\t<div style='font-size:30px;margin-bottom:20px'>{rules_update}, {current}: v{$MilterGreyListPatternTime} {$MilterGreyListPatternCount} {rules}</div>\t\t\n\t\n\t<div style='width:98%' class=form>\n\t{$p}\n\t{$p1}\n\t\n\t<table style='width:100%'>\n\t<tbody>\n\t<tr>\n\t<td class=legend style='font-size:26px'>{schedule}:</td>\n\t<td style='font-size:16px'>{$field}</td>\n\t</tr>\n\t<tr>\n\t<td colspan=2 align='right'><hr>" . button("{apply}", "Save{$t}()", 45) . "</td>\n\t\t\t</tr>\n\t\t\t</tbody>\n\t\t\t</table>\n\t\t\t</div>\n\t\t\t<script>\n\t\n\t\t\tvar xSave{$t}= function (obj) {\n\t\t\tvar res=obj.responseText;\n\t\t\tif (res.length>3){alert(res);}\n\t}\n\t\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('EnableArticaTechSpamAssassin', document.getElementById('EnableArticaTechSpamAssassin-{$t}').value);\n\tXHR.appendData('MilterGreylistExternalDBSchedule', document.getElementById('MilterGreylistExternalDBSchedule-{$t}').value);\n\tXHR.appendData('EnableMilterGreylistExternalDB', document.getElementById('EnableMilterGreylistExternalDB-{$t}').value);\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n</script>";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:articatech,项目名称:artica,代码行数:27,代码来源:milter.greylist.update.php

示例8: page

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);
}
开发者ID:articatech,项目名称:artica,代码行数:34,代码来源:system.disks.schedules.php

示例9: popup

function popup()
{
    $t = time();
    $q = new mysql();
    $sock = new sockets();
    $page = CurrentPageName();
    $tpl = new templates();
    $results = $q->QUERY_SQL("SELECT servername FROM freeweb WHERE groupware='UPDATEUTILITY'", "artica_backup");
    $hash[null] = "{select}";
    while ($ligne = mysql_fetch_array($results, MYSQL_ASSOC)) {
        $servername = $ligne["servername"];
        $hash[$servername] = $servername;
    }
    $UpdateUtilityRedirectEnable = $sock->GET_INFO("UpdateUtilityRedirectEnable");
    $UpdateUtilityExternWbsrv = $sock->GET_INFO("UpdateUtilityExternWbsrv");
    $UpdateUtilityHTTPSRV = $sock->GET_INFO("UpdateUtilityHTTPSRV");
    $UpdateUtilityExternWbsrvAddr = $sock->GET_INFO("UpdateUtilityExternWbsrvAddr");
    if ($UpdateUtilityExternWbsrvAddr == null) {
        $UpdateUtilityExternWbsrvAddr = "updateserver.example:9010";
    }
    if (!is_numeric($UpdateUtilityExternWbsrv)) {
        $UpdateUtilityExternWbsrv = 0;
    }
    $html = "\n\t<div id='{$t}'></div>\t\t\n\t<div class=explain style='font-size:14px'>{ufdbguard_updateutility_explain}</div>\n\t\n\t<table style='width:99%' class=form>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:16px'>{enable_filter_redirection}:</td>\n\t\t\t<td>" . Field_checkbox("UpdateUtilityRedirectEnable", 1, $UpdateUtilityRedirectEnable, "CheckU{$t}()") . "</td>\n\t\t\t<td>&nbsp;</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:16px'>{webserver}:</td>\n\t\t\t<td>" . Field_array_Hash($hash, "UpdateUtilityHTTPSRV", $UpdateUtilityHTTPSRV, null, null, 0, "font-size:16px") . "</td>\n\t\t\t<td>&nbsp;</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:16px'>{use_external_server}:</td>\n\t\t\t<td>" . Field_checkbox("UpdateUtilityExternWbsrv", 1, $UpdateUtilityExternWbsrv, "CheckU{$t}()") . "</td>\n\t\t\t<td>&nbsp;</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:16px'>{webserver}:</td>\n\t\t\t<td>" . Field_text("UpdateUtilityExternWbsrvAddr", $UpdateUtilityExternWbsrvAddr, "font-size:16px;width:250px") . "</td>\n\t\t\t<td>&nbsp;</td>\n\t\t</tr>\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t<tr>\n\t\t\t<td colspan=3 align='right'><hr>" . button("{apply}", "Save{$t}()", 18) . "</td>\n\t\t</tr>\n\t\t</table>\n<script>\n\tvar x_Save{$t}= function (obj) {\n\t      var results=obj.responseText;\n\t      if(results.length>3){alert(results);}\n\t      document.getElementById('{$t}').innerHTML='';\n\t}\t\n\n\tfunction Save{$t}(){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tif(document.getElementById('UpdateUtilityRedirectEnable').checked){XHR.appendData('UpdateUtilityRedirectEnable','1');}else{XHR.appendData('UpdateUtilityRedirectEnable','0');}\n\t\t\tif(document.getElementById('UpdateUtilityExternWbsrv').checked){XHR.appendData('UpdateUtilityExternWbsrv','1');}else{XHR.appendData('UpdateUtilityExternWbsrv','0');}\n\t\t\tXHR.appendData('UpdateUtilityHTTPSRV',document.getElementById('UpdateUtilityHTTPSRV').value);\n\t\t\tXHR.appendData('UpdateUtilityExternWbsrvAddr',document.getElementById('UpdateUtilityExternWbsrvAddr').value);\n\t\t\tAnimateDiv('{$t}');\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_Save{$t});\t\n\t\t}\t\n\n\tfunction CheckU{$t}(){\n\t\tdocument.getElementById('UpdateUtilityHTTPSRV').disabled=true;\n\t\tdocument.getElementById('UpdateUtilityExternWbsrvAddr').disabled=true;\n\t\tif(document.getElementById('UpdateUtilityRedirectEnable').checked){\n\t\t\tdocument.getElementById('UpdateUtilityHTTPSRV').disabled=false;\n\t\t}\n\t\t\n\t\tif(document.getElementById('UpdateUtilityExternWbsrv').checked){\n\t\t\tdocument.getElementById('UpdateUtilityHTTPSRV').disabled=true;\n\t\t\tdocument.getElementById('UpdateUtilityExternWbsrvAddr').disabled=false;\t\t\n\t\t}\n\t}\n\tCheckU{$t}()\n</script>\n\t\n";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:26,代码来源:ufdbguard.UpdateUtility.php

示例10: page

function page()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $users = new usersMenus();
    $ZarafaMySQLServiceType = $sock->GET_INFO("ZarafaMySQLServiceType");
    if (!is_numeric($ZarafaMySQLServiceType)) {
        $ZarafaMySQLServiceType = 1;
    }
    $ZarafaDedicateMySQLServer = $sock->GET_INFO("ZarafaDedicateMySQLServer");
    if (!is_numeric($ZarafaDedicateMySQLServer)) {
        $ZarafaDedicateMySQLServer = 0;
    }
    $arraySRV[1] = "{main_mysql_server_1}";
    $arraySRV[2] = "{main_mysql_server_2}";
    if ($ZarafaDedicateMySQLServer == 1) {
        $arraySRV[3] = "{main_mysql_server_3}";
    }
    $arraySRV[4] = "{main_mysql_server_4}";
    $t = time();
    $ZarafaRemoteMySQLServer = $sock->GET_INFO("ZarafaRemoteMySQLServer");
    $ZarafaRemoteMySQLServerPort = $sock->GET_INFO("ZarafaRemoteMySQLServerPort");
    $ZarafaRemoteMySQLServerAdmin = $sock->GET_INFO("ZarafaRemoteMySQLServerAdmin");
    $ZarafaRemoteMySQLServerPassword = $sock->GET_INFO("ZarafaRemoteMySQLServerPassword");
    if (!is_numeric($ZarafaRemoteMySQLServerPort)) {
        $ZarafaRemoteMySQLServerPort = 3306;
    }
    $DropDownF = Field_array_Hash($arraySRV, "ZarafaMySQLServiceType", $ZarafaMySQLServiceType, "ZarafaMySQLServiceTypeForm()", null, 0, "font-size:18px");
    $html = "\n\t<div id='{$t}'></div>\n\t<div class=explain id='zarafa_mysql_tuning_text' style='font-size:16px'>{zarafa_mysql_params_text}</div>\n\t\n\t<table style='width:99%' class=form>\n\t<tR>\n\t\t<td class=legend style='font-size:16px'>{mysql_server}:</td>\n\t\t<td>{$DropDownF}</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{remote_mysql_server}:</td>\n\t\t<td style='font-size:18px'>" . Field_text("ZarafaRemoteMySQLServer", $ZarafaRemoteMySQLServer, "font-size:18px;width:190px") . "</td>\n\t\t<td width=1%></td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{mysql_server_port}:</td>\n\t\t<td style='font-size:18px'>" . Field_text("ZarafaRemoteMySQLServerPort", $ZarafaRemoteMySQLServerPort, "font-size:18px;width:90px") . "</td>\n\t\t<td width=1%></td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{mysql_admin}:</td>\n\t\t<td style='font-size:18px'>" . Field_text("ZarafaRemoteMySQLServerAdmin", $ZarafaRemoteMySQLServerAdmin, "font-size:18px;width:190px") . "</td>\n\t\t<td width=1%></td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{password}:</td>\n\t\t<td style='font-size:18px'>" . Field_password("ZarafaRemoteMySQLServerPassword", $ZarafaRemoteMySQLServerPassword, "font-size:18px;width:190px") . "</td>\n\t\t<td width=1%></td>\n\t</tr>\t\t\t\t\t\n\t<tr>\n\t\t<td colspan=3 align=right><hr>" . button("{apply}", "ZarafaSave{$t}()", 24) . "</td>\n\t</tr>\t\n</table>\n<script>\n\tfunction ZarafaMySQLServiceTypeForm(){\n\t\tdocument.getElementById('ZarafaRemoteMySQLServer').disabled=true;\n\t\tdocument.getElementById('ZarafaRemoteMySQLServerPort').disabled=true;\n\t\tdocument.getElementById('ZarafaRemoteMySQLServerAdmin').disabled=true;\n\t\tdocument.getElementById('ZarafaRemoteMySQLServerPassword').disabled=true;\n\t\tif(document.getElementById('ZarafaMySQLServiceType').value==4){\n\t\t\tdocument.getElementById('ZarafaRemoteMySQLServer').disabled=false;\n\t\t\tdocument.getElementById('ZarafaRemoteMySQLServerPort').disabled=false;\n\t\t\tdocument.getElementById('ZarafaRemoteMySQLServerAdmin').disabled=false;\n\t\t\tdocument.getElementById('ZarafaRemoteMySQLServerPassword').disabled=false;\n\t\t}\n\t\n\t}\n\tvar x_ZarafaSave{$t}= function (obj) {\n\t\tvar tempvalue=obj.responseText;\n\t\tdocument.getElementById('{$t}').innerHTML='';\n\t\tif(tempvalue.length>3){alert(tempvalue);}\n\t\t\n\t\t}\t\n\t\n\tfunction ZarafaSave{$t}(){\n\t\tvar XHR = new XHRConnection();\n\t\tvar pp=encodeURIComponent(document.getElementById('ZarafaRemoteMySQLServerPassword').value);\n\t\tXHR.appendData('ZarafaMySQLServiceType',document.getElementById('ZarafaMySQLServiceType').value);\n\t\tXHR.appendData('ZarafaRemoteMySQLServer',document.getElementById('ZarafaRemoteMySQLServer').value);\n\t\tXHR.appendData('ZarafaRemoteMySQLServerPort',document.getElementById('ZarafaRemoteMySQLServerPort').value);\n\t\tXHR.appendData('ZarafaRemoteMySQLServerAdmin',document.getElementById('ZarafaRemoteMySQLServerAdmin').value);\n\t\tXHR.appendData('ZarafaRemoteMySQLServerPassword',pp);\n\t\tAnimateDiv('{$t}');\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_ZarafaSave{$t});\n\t\n\t}\n\t\nZarafaMySQLServiceTypeForm();\n</script>\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:32,代码来源:zarafa.mysqlparams.php

示例11: INDEX

function INDEX()
{
    if (isset($_GET["mail"])) {
        $jsshowmail = "\n\t\t<script>\n\t\t\tLoadjs('domains.quarantine.php?message-id={$_GET["mail"]}');\n\t\t</script>\n\t\t";
    }
    if (isset($_GET["search"])) {
        $lsatquarantines = Search();
        $title = 'your_query';
    } else {
        $lsatquarantines = LastQuarantines();
        $title = 'last_quarantine_files';
    }
    $user = new user($_SESSION["uid"]);
    $show["10"] = 10;
    $show["20"] = 20;
    $show["50"] = 50;
    $show["100"] = 100;
    $show["150"] = 150;
    $show["300"] = 300;
    $show["500"] = 500;
    if ($_GET["show"] == null) {
        $_GET["show"] = 50;
    }
    $show = Field_array_Hash($show, "show", $_GET["show"]);
    $html = "\n<table style='width:100%'>\n<tr>\n<td valign='top'>\n<img src='img/90-quarantaine.png'>\n</td>\n<td valign='top'>\n<form name=FFM1 method=get>\n<input type='hidden' name='search' value='yes'>\n<center>\n" . RoundedLightGrey("\n<div class=caption>{star_supported}</div>\n<table align=center class=table_form>\n<tr><td colspan=2><H3>{search_text}</H3></td></tr>\n<tr><td nowrap class=legend><strong>{by_sender}:</td><td align='left'>" . Field_text('bySender', $_GET["bySender"]) . "</td></tr>\n<tr><td nowrap class=legend><strong>{by_subject}:</td><td align='left'>" . Field_text('BySubject', $_GET["BySubject"]) . "</td></tr>\n<tr><td nowrap class=legend><strong>{show}:</td><td align='left'>{$show}&nbsp;{rows}</td></tr>\n<tr><td colspan=2 align=right><input type=submit value='{search}&nbsp;&raquo'></td></tr>\n<tr><td colspan=2 class=legend>{for}:&nbsp;" . implode(", ", $user->HASH_ALL_MAILS) . "</td></tr>\n</table>") . "\n</center>\n</form>\n</td>\n</tr>\n</table>\n\n\n<p>&nbsp;</p>\n\t<table style='width:100%' align=center>\n\t\t<tr>\n\t\t\t<td width=1% valign='top'>\n\t\t\t\t<H4>{{$title}}</H4>{$lsatquarantines}\n\t\t\t</td>\n\t\t</tr>\n\t</table>\n{$jsshowmail}\n";
    $JS["JS"][] = "js/user.quarantine.js";
    $tpl = new template_users('{query_quarantine}', $html, 0, 0, 0, 0, $JS);
    echo $tpl->web_page;
}
开发者ID:brucewu16899,项目名称:artica,代码行数:29,代码来源:user.quarantine.query.php

示例12: settings

function settings()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $users = new usersMenus();
    if (strlen($users->squid_ext_session_acl) < 3) {
        $error = "<center class=form style='width:95%'>\n\t\t<img src='img/warning-panneau-64.png'>\n\t\t<H2>{squid_ext_session_acl_not_found_explain}</H2>\n\t\t</center>\n\t\t";
    }
    $SquidEnableSessionEngine = $sock->GET_INFO("SquidEnableSessionEngine");
    $SquidSessionEngineTimeOut = $sock->GET_INFO("SquidSessionEngineTimeOut");
    $SquidSessionEngineExternalUrl = $sock->GET_INFO("SquidSessionEngineExternalUrl");
    if (!is_numeric($SquidEnableSessionEngine)) {
        $SquidEnableSessionEngine = 0;
    }
    if (!is_numeric($SquidSessionEngineTimeOut)) {
        $SquidSessionEngineTimeOut = 3600;
    }
    $array[1800] = "30Mn";
    $array[3600] = "1h";
    $array[5400] = "1h30";
    $array[7200] = "2h";
    $array[14400] = "4h";
    $array[28800] = "8h";
    $array[43200] = "12h";
    $array[86400] = "1 {day}";
    $array[604800] = "1 {week}";
    $t = time();
    $html = "{$error}\n\t<div id='div-{$t}'>\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{activate_session_engine}:</td>\n\t\t<td>" . Field_checkbox("SquidEnableSessionEngine", 1, $SquidEnableSessionEngine, "SquidEnableSessionEngineCheck()") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{session_max_time}:</td>\n\t\t<td>" . Field_array_Hash($array, "SquidSessionEngineTimeOut", $SquidSessionEngineTimeOut, "style:font-size:14px") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{external_webpage}:</td>\n\t\t<td>" . Field_text("SquidSessionEngineExternalUrl", $SquidSessionEngineExternalUrl, "font-size:14px;width:300px") . "</td>\n\t</tr>\n\t\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "SquidEnableSessionEngineSave()", 16) . "</td>\n\t</tr>\n\t\n\t</table>\n\t</div>\n\t<script>\n\t\tfunction SquidEnableSessionEngineCheck(){\n\t\t\tdocument.getElementById('SquidSessionEngineTimeOut').disabled=true;\n\t\t\tdocument.getElementById('SquidSessionEngineExternalUrl').disabled=true;\n\t\t\tif(document.getElementById('SquidEnableSessionEngine').checked){\n\t\t\t\tdocument.getElementById('SquidSessionEngineTimeOut').disabled=false;\n\t\t\t\tdocument.getElementById('SquidSessionEngineExternalUrl').disabled=false;\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\tvar x_SquidEnableSessionEngineSave{$t}=function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>0){alert(results);}\t\t\n\t\tRefreshTab('main_squid_sessions');\n\t}\t\t\t\n\t\t\n\t\tfunction SquidEnableSessionEngineSave(){\n\t\t\tvar XHR = new XHRConnection();\n\t  \t\tXHR.appendData('SquidSessionEngineTimeOut',document.getElementById('SquidSessionEngineTimeOut').value);\n\t  \t\tXHR.appendData('SquidSessionEngineExternalUrl',document.getElementById('SquidSessionEngineExternalUrl').value);\n\t\t\tif(document.getElementById('SquidEnableSessionEngine').checked){XHR.appendData('SquidEnableSessionEngine',1);}else{XHR.appendData('SquidEnableSessionEngine',0);}\n\t\t\tAnimateDiv('div-{$t}');\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_SquidEnableSessionEngineSave{$t});\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tSquidEnableSessionEngineCheck();\n\t</script>\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:31,代码来源:squid.sessions.php

示例13: popup

function popup()
{
    $ou = $_GET["ou"];
    $t = $_GET["t"];
    $ldap = new clladp();
    $tpl = new templates();
    $page = CurrentPageName();
    if (!is_numeric($t)) {
        $t = time();
    }
    $EnCryptedFunction = $_GET["EnCryptedFunction"];
    if (strlen($EnCryptedFunction) > 3) {
        $EnCryptedFunction = base64_decode($EnCryptedFunction) . "\n";
    } else {
        $EnCryptedFunction = null;
    }
    if ($ou == null) {
        if (isAdmin()) {
            $OUS = $ldap->hash_get_ou(true);
            $FieldOu = Field_array_Hash($OUS, "ou-{$t}", null, null, null, 0, "font-size:18px");
        } else {
            $FieldOu = Field_hidden("ou-{$t}", $_SESSION["ou"]) . "<span style='font-size:18px'>{$_SESSION["ou"]}</span>";
        }
    } else {
        $FieldOu = Field_hidden("ou-{$t}", $ou) . "<span style='font-size:18px'>{$_SESSION["ou"]}</span>";
    }
    $html = "\n\t\t\t\n\t<div id='animate-{$t}'></div>\t\t\n\t<table style='width:98%' class=form>\n\t\t<tr>\n\t\t  <td class=legend style='font-size:18px'>{domain}:</td>\n\t\t  <td>" . Field_text("domain-{$t}", null, "font-size:18px;font-weigth:bold", null, null, null, false, "AddDomainCk{$t}(event)") . "</td>\n\t\t</tr>\n\t\t<td class=legend style='font-size:18px'>{organization}:</td>  \t\t\n\t\t <td>{$FieldOu}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=2 align='right'>" . button("{add}", "AddDomain{$t}()", "20px") . "</td>\n\t\t</tr>\n\t</table>\n\t\t\t\t\t\n<script>\nvar x_AddDomain{$t}=function(obj){\n\tdocument.getElementById('animate-{$t}').innerHTML='';\n\tvar text;\n\ttext=obj.responseText;\n\tif(text.length>3){alert(text);return;}\n\t\$('#flexRT{$t}').flexReload();\n\tYahooUserHide();\n\t{$EnCryptedFunction}\n\t\n\t\n}\n\nfunction AddDomainCk{$t}(e){\n\tif(checkEnter(e)){ AddDomain{$t}();}\n}\n\nfunction AddDomain{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('perform','yes');\n\tvar ou=document.getElementById('ou-{$t}').value;\n\tif(ou.length<3){alert('Organization:`'+ou+'` not supported');return;}\n\tXHR.appendData('ou',document.getElementById('ou-{$t}').value);\n\tXHR.appendData('domain',document.getElementById('domain-{$t}').value);\n\tAnimateDiv('animate-{$t}');\n\tXHR.sendAndLoad('{$page}', 'POST',x_AddDomain{$t}); \n}\n</script>\t\t\t\t\t\n";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:29,代码来源:domain-local-create.php

示例14: page

function page()
{
    $sock = new sockets();
    $tpl = new templates();
    $page = CurrentPageName();
    $ip = new networking();
    $msftncsiBindIpAddress = $sock->GET_INFO("msftncsiBindIpAddress");
    $msftncsiSchedule = $sock->GET_INFO("msftncsiSchedule");
    $EnableMsftncsi = intval($sock->GET_INFO("EnableMsftncsi"));
    $t = time();
    while (list($eth, $cip) = each($ip->array_TCP)) {
        if ($cip == null) {
            continue;
        }
        $arrcp[$cip] = $cip;
    }
    $CRON[1] = "1 {minute}";
    $CRON[2] = "2 {minutes}";
    $CRON[4] = "4 {minutes}";
    $CRON[5] = "5 {minutes}";
    $CRON[8] = "8 {minutes}";
    $CRON[10] = "10 {minutes}";
    $CRON[30] = "30 {minutes}";
    $CRON[60] = "1 {hour}";
    $arrcp[null] = "{default}";
    $p1 = Paragraphe_switch_img("{network_awareness}", "{network_awareness_explain}", "EnableMsftncsi", $EnableMsftncsi, null, 1030);
    $WgetBindIpAddress = Field_array_Hash($arrcp, "msftncsiBindIpAddress", $msftncsiBindIpAddress, null, null, 0, "font-size:26px;padding:3px;");
    $html = "\n\t<div style='font-size:40px;margin-bottom:40px'>{network_awareness}</div>\n\t<div style='width:98%' class=form>\t\t\n\t{$p1}\n\t\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td width=1% nowrap align='right' class=legend style='font-size:26px'>{url}:</strong></td>\n\t\t<td align='left' style='vertical-align:top;font-size:26px;'>http://www.msftncsi.com/ncsi.txt</td>\n\t</tr>\t\n\t<tr>\n\t\t<td width=1% nowrap align='right' class=legend style='font-size:26px'>{WgetBindIpAddress}:</strong></td>\n\t\t<td align='left'>{$WgetBindIpAddress}</td>\n\t</tr>\n\t<tr>\n\t\t<td style='font-size:24px' class=legend>{interval}:</td>\n\t\t<td style='vertical-align:top;font-size:26px;'>" . Field_array_Hash($CRON, "msftncsiSchedule", $msftncsiSchedule, "blur()", null, 0, "font-size:26px;") . "</td>\t\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "Save{$t}()", 36) . "</td>\n\t</tr>\n</table>\n</div>\n<script>\n\tvar xSave{$t}= function (obj) {\n\tvar results=obj.responseText;\n\tUnlockPage();\n\t\n}\n\n\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('msftncsiBindIpAddress',document.getElementById('msftncsiBindIpAddress').value);\n\tXHR.appendData('msftncsiSchedule',document.getElementById('msftncsiSchedule').value);\n\tXHR.appendData('EnableMsftncsi',document.getElementById('EnableMsftncsi').value);\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n</script>\n";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:articatech,项目名称:artica,代码行数:30,代码来源:system.msftncsi.php

示例15: Page

function Page()
{
    $ruleid = $_GET["ID"];
    $t = time();
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new wifidog_settings($ruleid);
    $wifidog_templates = new wifidog_templates($_GET["ruleid"]);
    $ArticaHotSpotNowPassword = intval($sock->GET_INFO("ArticaHotSpotNowPassword"));
    $ENABLED_REDIRECT_LOGIN = intval($sock->GET_INFO("ENABLED_REDIRECT_LOGIN"));
    $USE_TERMS = intval($sock->GET_INFO("USE_TERMS"));
    $REGISTER_MAX_TIME = $sock->GET_INFO("REGISTER_MAX_TIME");
    $smtp_server_port = intval(trim($sock->GET_INFO("smtp_server_port")));
    if ($smtp_server_port == 0) {
        $smtp_server_port = 25;
    }
    if ($REGISTER_MAX_TIME < 5) {
        $REGISTER_MAX_TIME = 5;
    }
    $Timez[5] = "5 {minutes}";
    $Timez[10] = "10 {minutes}";
    $Timez[15] = "15 {minutes}";
    $Timez[30] = "30 {minutes}";
    $Timez[60] = "1 {hour}";
    $html = "\n\t<div style='width:100%;font-size:30px;margin-bottom:20px'>{self_register} SMTP</div>\t\t\n\t<div style='width:98%' class=form>\n\t\t\t\n" . Paragraphe_switch_img("{enable_hotspot_smtp}", "{enable_hotspot_smtp_explain}", "ENABLED_SMTP-{$t}", intval($sock->GET_INFO("ENABLED_SMTP")), null, 1090) . "\t\t\t\n\t\t\t\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend style='font-size:22px' style='width:600px'>{max_time_register}:</td>\n\t\t<td>" . Field_array_Hash($Timez, "REGISTER_MAX_TIME-{$t}", $REGISTER_MAX_TIME, "style:font-size:22px") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{smtp_register_message}:</td>\n\t\t<td><textarea \n\t\t\tstyle='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='REGISTER_MESSAGE-{$t}'>{$wifidog_templates->REGISTER_MESSAGE}</textarea>\n\t\t</td>\n\t</tr>\t\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{smtp_register_subject}:</td>\n\t\t<td style='width:860px'><textarea \n\t\t\tstyle='width:100%;height:40px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='REGISTER_SUBJECT-{$t}'>{$wifidog_templates->REGISTER_SUBJECT}</textarea>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{smtp_confirm}:</td>\n\t\t<td style='width:860px'><textarea \n\t\t\tstyle='width:100%;height:40px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='CONFIRM_MESSAGE-{$t}'>{$wifidog_templates->CONFIRM_MESSAGE}</textarea>\n\t\t</td>\n\t</tr>\n\t\n\t\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{lost_password_text}:</td>\n\t\t<td style='width:860px'><textarea \n\t\t\tstyle='width:100%;height:40px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='LostPasswordLink-{$t}'>{$wifidog_templates->LostPasswordLink}</textarea>\n\t\t</td>\n\t</tr>\n\t\n\t\n\t\t\t\t\t\n\t\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{smtp_server_name}:</strong></td>\n\t\t<td>" . Field_text("smtp_server_name-{$t}", trim($sock->GET_INFO("smtp_server_name")), 'font-size:22px;padding:3px;width:450px') . "</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{smtp_server_port}:</strong></td>\n\t\t<td>" . Field_text("smtp_server_port-{$t}", $smtp_server_port, 'font-size:22px;padding:3px;width:110px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{smtp_sender}:</strong></td>\n\t\t<td>" . Field_text("smtp_sender-{$t}", trim($sock->GET_INFO("smtp_sender")), 'font-size:22px;padding:3px;width:450px') . "</td>\n\t</tr>\n\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{smtp_auth_user}:</strong></td>\n\t\t<td>" . Field_text("smtp_auth_user-{$t}", trim($sock->GET_INFO("smtp_auth_user")), 'font-size:22px;padding:3px;width:450px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{smtp_auth_passwd}:</strong></td>\n\t\t<td>" . Field_password("smtp_auth_passwd-{$t}", trim($sock->GET_INFO("smtp_auth_passwd")), 'font-size:22px;padding:3px;width:450px') . "</td>\n\t\t\t\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{tls_enabled}:</strong></td>\n\t\t<td>" . Field_checkbox_design("tls_enabled-{$t}", 1, $sock->GET_INFO("tls_enabled")) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right' colspan=2>\n\t\t\t\t" . button('{test}', "TestSMTP{$t}();", 32) . "&nbsp;" . button('{apply}', "Save{$t}();", 32) . "</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}\t\n\t\n\tfunction TestSMTP{$t}(){\n\t\tSave{$t}();\n\t\tLoadjs('{$page}?test-smtp-js=yes&ruleid={$ruleid}');\n\t}\n\t\n\tfunction Save{$t}(){\n\t\tvar pp=encodeURIComponent(document.getElementById('smtp_auth_passwd-{$t}').value);\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('ruleid',{$ruleid});\n\t\tXHR.appendData('ENABLED_SMTP',encodeURIComponent(document.getElementById('ENABLED_SMTP-{$t}').value));\n\t\tXHR.appendData('REGISTER_SUBJECT',encodeURIComponent(document.getElementById('REGISTER_SUBJECT-{$t}').value));\n\t\tXHR.appendData('REGISTER_MESSAGE',encodeURIComponent(document.getElementById('REGISTER_MESSAGE-{$t}').value));\n\t\tXHR.appendData('LostPasswordLink',encodeURIComponent(document.getElementById('LostPasswordLink-{$t}').value));\n\t\tXHR.appendData('REGISTER_MAX_TIME',encodeURIComponent(document.getElementById('REGISTER_MAX_TIME-{$t}').value));\n\t\tXHR.appendData('CONFIRM_MESSAGE',encodeURIComponent(document.getElementById('CONFIRM_MESSAGE-{$t}').value));\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tif(document.getElementById('tls_enabled-{$t}').checked){XHR.appendData('tls_enabled',1);}else{XHR.appendData('tls_enabled',0); }\n\t\tXHR.appendData('smtp_server_name',encodeURIComponent(document.getElementById('smtp_server_name-{$t}').value));\n\t\tXHR.appendData('smtp_server_port',encodeURIComponent(document.getElementById('smtp_server_port-{$t}').value));\n\t\tXHR.appendData('smtp_sender',encodeURIComponent(document.getElementById('smtp_sender-{$t}').value));\n\t\tXHR.appendData('smtp_auth_user',encodeURIComponent(document.getElementById('smtp_auth_user-{$t}').value));\n\t\tXHR.appendData('smtp_auth_passwd',pp);\n\t\tXHR.appendData('smtp_notifications-{$t}','yes');\n\t\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n\t\t\n\t}\n</script>";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:27,代码来源:webauth.rules.smtp.php


注:本文中的Field_array_Hash函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。