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


PHP Field_checkbox_design函数代码示例

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


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

示例1: page

function page()
{
    $t = time();
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $SquidSimpleConfig = $sock->GET_INFO("SquidSimpleConfig");
    if (!is_numeric($SquidSimpleConfig)) {
        $SquidSimpleConfig = 1;
    }
    $meminfo = unserialize(base64_decode($sock->getFrameWork("system.php?meminfo=yes")));
    $kernel_shmmax = $sock->getFrameWork("cmd.php?sysctl-value=yes&key=" . base64_encode("kernel.shmmax"));
    $MEMTOTAL = intval($meminfo["MEMTOTAL"]);
    $squid = new squidbee();
    $cache_mem = $squid->global_conf_array["cache_mem"];
    if (preg_match("#([0-9]+)\\s+#", $cache_mem, $re)) {
        $cache_mem = $re[1];
    }
    $SquidMemoryPools = intval($sock->GET_INFO("SquidMemoryPools"));
    $memory_pools_limit_suffix = null;
    $SquidMemoryPoolsLimit = intval($sock->GET_INFO("SquidMemoryPoolsLimit"));
    $FF = 1500;
    $FF = $FF * 1024;
    $FF = $FF * 1024;
    $proposal = $meminfo["MEMTOTAL"] - $FF;
    $proposal = $proposal / 2;
    $proposal = $proposal / 1024;
    $proposal = round($proposal / 1024);
    $html = "\n\t\n\t<div class=explain style='font-size:16px'>{squid_cache_memory_explain}</div>\n\t<div style='margin:10px;padding:10px;width:98%' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td colspan=3 style='font-size:32px;margin-bottom:20px'>{central_memory}</div>\n\t\t\t<div class=explain style='font-size:18px'>{cache_mem_explain2}</div>\n\t\t</td>\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:26px'>{central_memory}:</td>\n\t\t<td style='font-size:26px'>" . Field_text("cache_mem-{$t}", $cache_mem, "font-size:26px;width:150px;font-weight:bold") . "&nbsp;MB</td>\n\t\t<td style='font-size:26px' width=1% nowrap>" . help_icon('{cache_mem_text}', true) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:26px'>{current}:</td>\n\t\t<td style='font-size:26px'><span id='squid-cache-mem-current' style='font-size:26px;font-weight:bold'></span></td>\n\t\t<td style='font-size:26px' width=1% nowrap>&nbsp;</td>\n\t</tr>\t\t\t\t\t\n\t<tr>\n\t<td colspan=3 style='font-size:20px;margin-bottom:20px;color:#8E8E8E;text-align:right'>{server_memory}: " . FormatBytes($meminfo["MEMTOTAL"] / 1024) . " ({proposal}: {$proposal}MB)</div>\n\t</table>\n\t</div>\t\t\n\t<div style='margin:10px;padding:10px;width:98%' class=form>\t\n\t<table style='width:100%'>\n\n\t<tr>\n\t\t<td style='font-size:26px' class=legend>{memory_pools}:</td>\n\t\t<td align='left' style='font-size:26px'>" . Field_checkbox_design("SquidMemoryPools-{$t}", 1, $SquidMemoryPools, "SquidMemoryPools{$t}()") . "</td>\n\t\t<td width=1%>" . help_icon('{memory_pools_explain}', true) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td style='font-size:26px' class=legend>{memory_pools_limit}:</td>\n\t\t<td align='left' style='font-size:26px'>" . Field_text("SquidMemoryPoolsLimit-{$t}", $SquidMemoryPoolsLimit, "font-size:26px;width:150px") . "&nbsp;MB</td>\n\t\t<td width=1%>" . help_icon('{memory_pools_limit_explain}', true) . "</td>\n\t</tr>\t\t\t\t\t\t\t\t\t\n</tr>\t\n\t<tr><td colspan=3 style='text-align:right;pdding-top:50px'><hr>" . button("{apply}", "Save{$t}()", 36) . "</td>\n\t</tr>\n</table>\t\n<script>\nvar xSave{$t}= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>3){alert(results);}\n\tLoadjs('squid.compile.progress.php?ask=yes');\n}\n\t\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('cache_mem',document.getElementById('cache_mem-{$t}').value);\n\t\n\tif(document.getElementById('SquidMemoryPools-{$t}').checked){XHR.appendData('SquidMemoryPools',1);}else{\n\tXHR.appendData('SquidMemoryPools',0);}\n\tXHR.appendData('SquidMemoryPoolsLimit',document.getElementById('SquidMemoryPoolsLimit-{$t}').value);\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n\t\nfunction SquidMemoryPools{$t}(){\n\tvar SquidSimpleConfig={$SquidSimpleConfig};\n\tif(SquidSimpleConfig==1){\n\t\tdocument.getElementById('SquidMemoryPools-{$t}').disabled=true;\n\t\tdocument.getElementById('SquidMemoryPoolsLimit-{$t}').disabled=true;\n\t\treturn;\n\t}\n\n\tdocument.getElementById('SquidMemoryPoolsLimit-{$t}').disabled=true;\n\tif(document.getElementById('SquidMemoryPools-{$t}').checked){\n\t\tdocument.getElementById('SquidMemoryPoolsLimit-{$t}').disabled=false;\n\t}\n\t\n\tLoadAjax('squid-cache-mem-current','{$page}?squid-cache-mem-current=yes');\n\t\n}\nSquidMemoryPools{$t}();\n</script>";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:31,代码来源:squid.memory.php

示例2: popup

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

示例3: TEMPLATE_SETTINGS

function TEMPLATE_SETTINGS()
{
    $page = CurrentPageName();
    $sock = new sockets();
    $tpl = new templates();
    $users = new usersMenus();
    $squid = new squidbee();
    $error = null;
    $t = time();
    $button = "<hr>" . button("{save}", "Save{$t}()", 40);
    $TEMPLATE_TITLE = $_GET["TEMPLATE_TITLE"];
    $SquidTemplatesMicrosoft = intval($sock->GET_INFO("SquidTemplatesMicrosoft"));
    $SquidHTTPTemplateLanguage = $sock->GET_INFO("SquidHTTPTemplateLanguage");
    if ($SquidHTTPTemplateLanguage == null) {
        $SquidHTTPTemplateLanguage = "en";
    }
    $lang = $_GET["lang"];
    $ENABLED = 1;
    $xtpl = new template_simple("ERR_ADS_BLOCK", $SquidHTTPTemplateLanguage);
    if (!$users->CORP_LICENSE) {
        $ENABLED = 0;
        $error = "<p class=text-error>{MOD_TEMPLATE_ERROR_LICENSE}</p>";
        $button = null;
    }
    $html = "\n<div style='font-size:40px;margin-bottom:30px'>{error_page}</div>\t\n\n{$error}\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:24px'>{subject}:</td>\n\t\t<td>" . Field_text("TITLE-{$t}", utf8_decode($xtpl->TITLE), "font-size:24px;width:90%") . "</td>\t\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:24px;vertical-align:middle'>{content}:</td>\n\t\t<td><textarea\n\t\tstyle='width:100%;height:350px;font-size:24px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\tCourier,monospace;background-color:white;color:black' id='BODY-{$t}'>" . utf8_decode($xtpl->BODY) . "</textarea>\n\t</tr>\t\n<tr>\n\t<td class=legend style='font-size:24px' width=1% nowrap>{remove_artica_version}:</td>\n\t<td width=99%>" . Field_checkbox_design("SquidADSTemplateNoVersion-{$t}", 1, $xtpl->SquidADSTemplateNoVersion) . "</td>\n</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:24px'>{background_color}:</td>\n\t\t<td>" . Field_ColorPicker("SquidADSTemplateBackgroundColor-{$t}", $xtpl->SquidADSTemplateBackgroundColor, "font-size:24px;width:150px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:24px'>{font_family}:</td>\n\t<td><textarea\n\tstyle='width:100%;height:150px;font-size:24px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\tCourier,monospace;background-color:white;color:black' id='SquidADSTemplateFamily-{$t}'>{$xtpl->SquidADSTemplateFamily}</textarea>\n\t</td>\n\t</tr>\n\t<tr>\n\t<td class=legend style='font-size:24px'>{font_color}:</td>\n\t<td>" . Field_ColorPicker("SquidADSTemplateFontColor-{$t}", $xtpl->SquidADSTemplateFontColor, "font-size:24px;width:150px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:24px'>Smiley:</td>\n\t\t<td>" . Field_text("SquidADSTemplateSmiley-{$t}", $xtpl->SquidADSTemplateSmiley, "width:120px;font-size:24px") . "</td>\n\t</tr>\t\t\n\t<tr>\n\t<td colspan=2 align='right'>{$button}</td>\n\t</tr>\n<script>\n\tvar xSave{$t}=function(obj){\n\tvar tempvalue=obj.responseText;\n\tif(tempvalue.length>3){alert(tempvalue)};\n\tLoadjs('privoxy.progress.template.php');\n}\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('TEMPLATE_TITLE','ERR_ADS_BLOCK');\n\tXHR.appendData('lang','{$lang}');\n\tXHR.appendData('SquidADSTemplateFamily',document.getElementById('SquidADSTemplateFamily-{$t}').value);\n\tXHR.appendData('SquidADSTemplateBackgroundColor',document.getElementById('SquidADSTemplateBackgroundColor-{$t}').value);\n\tXHR.appendData('SquidADSTemplateFontColor',document.getElementById('SquidADSTemplateFontColor-{$t}').value);\n\tXHR.appendData('SquidADSTemplateSmiley',document.getElementById('SquidADSTemplateSmiley-{$t}').value);\n\tXHR.appendData('TITLE',encodeURIComponent(document.getElementById('TITLE-{$t}').value));\n\tXHR.appendData('BODY',encodeURIComponent(document.getElementById('BODY-{$t}').value));\n\tif(document.getElementById('SquidADSTemplateNoVersion-{$t}').checked){XHR.appendData('SquidADSTemplateNoVersion',1);}else{XHR.appendData('SquidADSTemplateNoVersion',0);}\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n\nfunction EnableForm{$t}(){\n\tvar ENABLED={$ENABLED};\n\tif(ENABLED==1){return;}\n\t\n\tdocument.getElementById('SquidADSTemplateSmiley-{$t}').disabled=true;\n\tdocument.getElementById('SquidADSTemplateFamily-{$t}').disabled=true;\n\tdocument.getElementById('SquidADSTemplateBackgroundColor-{$t}').disabled=true;\n\tdocument.getElementById('SquidADSTemplateFontColor-{$t}').disabled=true;\n\tdocument.getElementById('SquidADSTemplateNoVersion-{$t}').disabled=true;\n}\nEnableForm{$t}();\n</script>\n";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:articatech,项目名称:artica,代码行数:27,代码来源:privoxy.template.php

示例4: Page

function Page()
{
    $ruleid = $_GET["ID"];
    $t = time();
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new wifidog_settings($ruleid);
    $wifidog_templates = new wifidog_templates($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} SMS {rule}:{$ruleid}</div>\t\t\n\t<div style='font-size:18px' class=explain>{hotspot_sms_mailexp}</div>\n\t\n\t<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{form_message}:</td>\n\t\t<td style='width:860px'><textarea \n\t\t\tstyle='width:100%;height:140px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='SMS_INTRO-{$t}'>" . $wifidog_templates->SMS_INTRO . "</textarea>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{font_size}:</strong></td>\n\t\t<td>" . Field_text("SMS_FONT_SIZE-{$t}", $wifidog_templates->SMS_FONT_SIZE, 'font-size:22px;padding:3px;width:120px') . "</td>\n\t</tr>\t\t\t\t\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{field_label}:</strong></td>\n\t\t<td>" . Field_text("SMS_FIELD-{$t}", $wifidog_templates->SMS_FIELD, 'font-size:22px;padding:3px;width:450px') . "</td>\n\t</tr>\t\t\t\t\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{button_label}:</strong></td>\n\t\t<td>" . Field_text("SMS_BUTTON-{$t}", $wifidog_templates->SMS_BUTTON, 'font-size:22px;padding:3px;width:450px') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{wrong_code_message}:</td>\n\t\t<td><textarea \n\t\t\tstyle='width:100%;height:90px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='SMS_CODE_ERROR-{$t}'>" . $wifidog_templates->SMS_CODE_ERROR . "</textarea>\n\t\t</td>\n\t</tr>\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='SMS_SMTP_SUBJECT-{$t}'>" . $wifidog_templates->SMS_SMTP_SUBJECT . "</textarea>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{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='SMS_SMTP_BODY-{$t}'>" . $wifidog_templates->SMS_SMTP_BODY . "</textarea>\n\t\t</td>\n\t</tr>\t\n\t\t\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:140px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='SMS_CONFIRM_MESSAGE-{$t}'>" . $wifidog_templates->SMS_CONFIRM_MESSAGE . "</textarea>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{smtp_server_name}:</strong></td>\n\t\t<td>" . Field_text("sms_smtp_server_name-{$t}", trim($sock->GET_INFO("sms_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("sms_smtp_server_port-{$t}", trim($sock->GET_INFO("sms_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("sms_smtp_sender-{$t}", trim($sock->GET_INFO("sms_smtp_sender")), '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'>{recipient}:</strong></td>\n\t\t<td>" . Field_text("sms_smtp_recipient-{$t}", trim($sock->GET_INFO("sms_smtp_recipient")), '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_user}:</strong></td>\n\t\t<td>" . Field_text("sms_smtp_auth_user-{$t}", trim($sock->GET_INFO("sms_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("sms_smtp_auth_passwd-{$t}", trim($sock->GET_INFO("sms_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("sms_tls_enabled-{$t}", 1, $sock->GET_INFO("sms_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('sms_smtp_auth_passwd-{$t}').value);\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('ruleid',{$ruleid});\n\t\tXHR.appendData('SMS_SMTP_BODY',encodeURIComponent(document.getElementById('SMS_SMTP_BODY-{$t}').value));\n\t\tXHR.appendData('SMS_SMTP_SUBJECT',encodeURIComponent(document.getElementById('SMS_SMTP_SUBJECT-{$t}').value));\n\t\tXHR.appendData('SMS_INTRO',encodeURIComponent(document.getElementById('SMS_INTRO-{$t}').value));\n\t\tXHR.appendData('SMS_BUTTON',encodeURIComponent(document.getElementById('SMS_BUTTON-{$t}').value));\n\t\tXHR.appendData('SMS_FIELD',encodeURIComponent(document.getElementById('SMS_FIELD-{$t}').value));\n\t\tXHR.appendData('SMS_CONFIRM_MESSAGE',encodeURIComponent(document.getElementById('SMS_CONFIRM_MESSAGE-{$t}').value));\n\n\t\tXHR.appendData('SMS_FONT_SIZE',encodeURIComponent(document.getElementById('SMS_FONT_SIZE-{$t}').value));\n\t\tXHR.appendData('SMS_CODE_ERROR',encodeURIComponent(document.getElementById('SMS_CODE_ERROR-{$t}').value));\n\t\tif(document.getElementById('sms_tls_enabled-{$t}').checked){XHR.appendData('sms_tls_enabled',1);}else{XHR.appendData('sms_tls_enabled',0); }\n\t\tXHR.appendData('sms_smtp_server_name',encodeURIComponent(document.getElementById('sms_smtp_server_name-{$t}').value));\n\t\tXHR.appendData('sms_smtp_server_port',encodeURIComponent(document.getElementById('sms_smtp_server_port-{$t}').value));\n\t\tXHR.appendData('sms_smtp_sender',encodeURIComponent(document.getElementById('sms_smtp_sender-{$t}').value));\n\t\tXHR.appendData('sms_smtp_recipient',encodeURIComponent(document.getElementById('sms_smtp_recipient-{$t}').value));\n\t\tXHR.appendData('sms_smtp_auth_user',encodeURIComponent(document.getElementById('sms_smtp_auth_user-{$t}').value));\n\t\tXHR.appendData('sms_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:articatech,项目名称:artica,代码行数:27,代码来源:webauth.rules.sms.php

示例5: rule_time

function rule_time()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $eth = $_GET["eth"];
    $ethC = new system_nic($eth);
    $table = $_GET["table"];
    $ID = $_GET["ID"];
    $t = time();
    $q = new mysql();
    $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM iptables_main WHERE ID='{$ID}'", "artica_backup"));
    $title = "{time_restriction}: {$eth}::" . $tpl->javascript_parse_text($ligne["rulename"]);
    $enabled = $ligne["enabled"];
    $table = $ligne["MOD"];
    $eth = $ligne["eth"];
    $bt = "{apply}";
    $array_days = array(1 => "monday", 2 => "tuesday", 3 => "wednesday", 4 => "thursday", 5 => "friday", 6 => "saturday", 7 => "sunday");
    $TTIME = unserialize($ligne["time_restriction"]);
    $tr[] = "<table>";
    while (list($num, $maks) = each($array_days)) {
        $tr[] = "<tr>\n\t\t<td class=legend style='font-size:22px'>{{$maks}}</td>\n\t\t<td>" . Field_checkbox_design("D{$num}-{$t}", 1, $TTIME["D{$num}"]) . "</td>\n\t\t\t</tr>";
        $jsF[] = "if(document.getElementById('D{$num}-{$t}').checked){XHR.appendData('D{$num}',1); }else{ XHR.appendData('D{$num}',0); }";
        $jsD[] = "document.getElementById('D{$num}-{$t}').disabled=true;";
        $jsE[] = "document.getElementById('D{$num}-{$t}').disabled=false;";
    }
    $tr[] = "</table>";
    if ($TTIME["ftime"] == null) {
        $TTIME["ftime"] = "20:00:00";
    }
    if ($TTIME["ttime"] == null) {
        $TTIME["ttime"] = "23:59:00";
    }
    $html = "\n\t<div style='font-size:18px' class=explain>{fwtime_explain}</div>\n\t<div style='width:98%' class=form>\n\t<div style='font-size:28px;margin-bottom:25px;margin-top:10px;margin-left:5px'>{$title}</div>\n\t<table style='width:100%'>\n\t<tr>\n\t<td class=legend style='font-size:22px'>{enabled}:</td>\n\t<td style='font-size:16px'>" . Field_checkbox_design("enabled-{$t}", 1, $ligne["enablet"], "EnableCK{$t}()") . "\n\t</tr>\n\t<tr>\n\t\t<tr>\n\t\t<td style='font-size:26px;vertical-align:top'>{hours}:<hr></td>\n\t<td>\n\t<table style='width:325px'>\n\t<td class=legend style='font-size:22px'>{from_time}:</td>\n\t<td style='font-size:16px'>" . field_text("ftime-{$t}", $TTIME["ftime"], "font-size:22px;width:130px;text-align:right") . "\n\t</tr>\n\t<tr>\n\t<td class=legend style='font-size:22px'>{to_time}:</td>\n\t<td style='font-size:16px'>" . field_text("ttime-{$t}", $TTIME["ttime"], "font-size:22px;width:130px;text-align:right") . "\n\t</tr>\n\t</table>\n\t</td>\n\t</tr>\n\t<tr>\n\t\t<td style='font-size:26px;vertical-align:top'>{days}:<hr></td>\n\t\t<td>" . @implode("", $tr) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "Save{$t}()", 40) . "</td>\n\t\t</tr>\n\t\t</table>\n\t\t</div>\n<script>\nvar xSave{$t}= function (obj) {\n\tvar res=obj.responseText;\n\tif (res.length>3){alert(res);}\n\t\$('#FIREWALL_NIC_RULES').flexReload();\n}\n\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('time-save',  '{$ID}');\n\tXHR.appendData('ttime',  document.getElementById('ttime-{$t}').value);\n\tXHR.appendData('ftime',  document.getElementById('ftime-{$t}').value);\n\tif(document.getElementById('enabled-{$t}').checked){ XHR.appendData('enablet',1); }else{ XHR.appendData('enablet',0); }\n\t" . @implode("\n", $jsF) . "\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n\nfunction EnableCK{$t}(){\n\tif(document.getElementById('enabled-{$t}').checked){\n\t\tdocument.getElementById('ttime-{$t}').disabled=false;\n\t\tdocument.getElementById('ftime-{$t}').disabled=false;\n\t\t" . @implode("\n", $jsE) . "\n\t}else{\n\t\tdocument.getElementById('ttime-{$t}').disabled=true;\n\t\tdocument.getElementById('ftime-{$t}').disabled=true;\n\t\t" . @implode("\n", $jsD) . "\n}\n\n\n}\n\nEnableCK{$t}();\n</script>";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:articatech,项目名称:artica,代码行数:35,代码来源:firehol.nic.rules.time.php

示例6: 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

示例7: Page

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);
}
开发者ID:articatech,项目名称:artica,代码行数:59,代码来源:webauth.rules.parameters.php

示例8: popup

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

示例9: popup

function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $t = $_GET["t"];
    $tt = time();
    $html = "\n\t<div id='id-final-{$t}'>\n\t<div id='serverkerb-{$tt}'></div>\n\t\t<div style='width:98%' class=form>\n\t\t<div style='font-size:30px;margin-bottom:20px'>{delete_all_acls}</div>\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'>{delete_associated_groups}:</td>\n\t\t\t\t\t<td>" . Field_checkbox_design("DeleteGroups-{$t}", 1, 0) . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=2 align='right'><hr>" . button("{delete}", "Save{$tt}()", 28) . "</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</div>\n\t</div>\n\t<script>\n\tvar x_Save{$tt}= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tdocument.getElementById('serverkerb-{$tt}').innerHTML='';\n\t\t\n\t\t\$('#table-{$t}').flexReload();\n\t\tif(results.length>3){\n\t\t\tdocument.getElementById('id-final-{$t}').innerHTML=\"<textarea style='margin-top:5px;font-family:Courier New;font-weight:bold;width:100%;height:520px;border:5px solid #8E8E8E;overflow:auto;font-size:11.5px' id='mibtxt{$t}'>\"+results+\"</textarea>\";\n\t\t}else{\n\t\t\tYahooWin2Hide();\n\t\t}\n\t\t\n\t}\n\t\n\tfunction Save{$tt}(){\n\t\tvar XHR = new XHRConnection();\n\t\tvar DeleteGroups=0;\n\t\tif(document.getElementById('DeleteGroups-{$t}').checked){DeleteGroups=1;}\n\t\tXHR.appendData('DeleteGroups',DeleteGroups);\n\t\tAnimateDiv('serverkerb-{$tt}');\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_Save{$tt});\n\t\n\t}\n\t</script>\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:9,代码来源:squid.acls.delete.php

示例10: main

function main()
{
    $page = CurrentPageName();
    $user = new usersMenus();
    $round = new roundcube();
    $artica = new artica_general();
    $sock = new sockets();
    $debug_levela = array(1 => "log", 2 => "report", 4 => "show", 8 => "trace");
    $tpl = new templates();
    $RoundCubeHTTPSPort = intval($sock->GET_INFO("RoundCubeHTTPSPort"));
    $RoundCubeHTTPPort = intval($sock->GET_INFO("RoundCubeHTTPPort"));
    if ($RoundCubeHTTPSPort == 0) {
        $RoundCubeHTTPSPort = 449;
    }
    if ($RoundCubeHTTPPort == 0) {
        $RoundCubeHTTPPort = 8888;
    }
    $RoundCubeHTTPEngineEnabled = intval($sock->GET_INFO("RoundCubeHTTPEngineEnabled"));
    $RoundCubeUseSSL = intval($sock->GET_INFO("RoundCubeUseSSL"));
    $RoundCubeEnableLDAP = intval($sock->GET_INFO("RoundCubeEnableLDAP"));
    $RoundCubeUserLink = $sock->GET_INFO("RoundCubeUserLink");
    if ($RoundCubeUserLink == null) {
        $RoundCubeUserLink = "http://{$_SERVER["SERVER_NAME"]}:{$RoundCubeHTTPPort}";
        $sock->SET_INFO("RoundCubeUserLink", "http://{$_SERVER["SERVER_NAME"]}:{$RoundCubeHTTPPort}");
    }
    $RoundCubeDebugLevel = intval($sock->GET_INFO("RoundCubeDebugLevel"));
    $debug_level = Field_array_Hash($debug_levela, 'RoundCubeDebugLevel', $RoundCubeDebugLevel, "style:font-size:22px");
    $RoundCubeEnableCaching = intval($sock->GET_INFO("RoundCubeEnableCaching"));
    $RoundCubeAutoCreateuser = intval($sock->GET_INFO("RoundCubeAutoCreateuser"));
    $RoundCubeDefaultHost = $sock->GET_INFO("RoundCubeDefaultHost");
    if ($RoundCubeDefaultHost == null) {
        $RoundCubeDefaultHost = "127.0.0.1";
    }
    $RoundCubeSievePort = $sock->GET_INFO("RoundCubeSievePort");
    if ($RoundCubeSievePort == null) {
        $RoundCubeSievePort = $round->SieveListenIp . ":4190";
    }
    $RoundCubeUploadMaxFilesize = intval($sock->GET_INFO("RoundCubeUploadMaxFilesize"));
    if ($RoundCubeUploadMaxFilesize == 0) {
        $RoundCubeUploadMaxFilesize = 128;
    }
    $RoundeCubeLocalString = $sock->GET_INFO("RoundeCubeLocalString");
    if ($RoundeCubeLocalString == null) {
        $RoundeCubeLocalString = "us";
    }
    $RoundCubeProductName = $sock->GET_INFO("RoundCubeProductName");
    if ($RoundCubeProductName == null) {
        $RoundCubeProductName = "RoundCube Webmail for Artica";
    }
    $RoundCubeSkipDeleted = intval($sock->GET_INFO("RoundCubeSkipDeleted"));
    $RoundCubeFlagForDeletion = intval($sock->GET_INFO("RoundCubeFlagForDeletion"));
    $t = time();
    $html = "\n\t<form name='FFM1'>\n\t<div id='wait'></div>\n\t<div style='width:99%' class=form>\n\t<table style='width:99%'>\n\t<tr>\n\t<td valign='top' nowrap align='right' class=legend style='font-size:22px'>{RoundCubePath}:</strong></td>\n\t<td valign='top' nowrap align='left'><strong style='font-size:22px'>{$user->roundcube_folder}</td>\n\t</tr>\n\t<tr>\n\t<td valign='top' nowrap align='right' class=legend style='font-size:22px'>{roundcube_web_folder}:</strong></td>\n\t<td valign='top' nowrap align='left'><strong style='font-size:22px'>{$user->roundcube_web_folder}</td>\n\t</tr>\n\t<tr>\n\t<td valign='top' nowrap align='right' class=legend style='font-size:22px'>{listen_port} SSL:</strong></td>\n\t<td valign='top' nowrap align='left'>" . Field_text('RoundCubeHTTPSPort', $RoundCubeHTTPSPort, 'width:110px;font-size:22px') . "</td>\n\t</tr>\n\t<tr>\n\t<td valign='top' nowrap align='right' class=legend style='font-size:22px'>{listen_port} HTPP:</strong></td>\n\t<td valign='top' nowrap align='left'>" . Field_text('RoundCubeHTTPPort', $RoundCubeHTTPPort, 'width:110px;font-size:22px') . "</td>\n\t</tr>\t\t\t\n\t<tr>\n\t<td valign='top' nowrap align='right' class=legend style='font-size:22px'>{UseSSL}:</strong></td>\n\t<td valign='top' nowrap align='left'>" . Field_checkbox_design('RoundCubeUseSSL', 1, $RoundCubeUseSSL) . "</td>\n\t</tr>\n<tr>\n\t<td valign='top' nowrap align='right' class=legend style='font-size:22px'>{user_link}:</strong></td>\n\t<td valign='top' nowrap align='left'>" . Field_text('RoundCubeUserLink', $RoundCubeUserLink, 'width:595px;font-size:22px') . "</td>\n</tr>\n<tr>\n\t<td valign='top' nowrap align='right' class=legend style='font-size:22px'>{roundcube_ldap_directory}:</strong></td>\n\t<td valign='top' nowrap align='left'>" . Field_checkbox_design('RoundCubeEnableLDAP', 1, $RoundCubeEnableLDAP) . "</td>\n</tr>\t\n<tr>\n\t<td valign='top' nowrap align='right' class=legend style='font-size:22px'>{debug_level}:</strong></td>\n\t<td valign='top' nowrap align='left'><strong>{$debug_level}</td>\n</tr>\n<tr>\n\t<td valign='top' nowrap align='right' class=legend style='font-size:22px'>{enable_caching}:</strong></td>\n\t<td valign='top' nowrap align='left'>" . Field_checkbox_design('RoundCubeEnableCaching', 1, $RoundCubeEnableCaching) . "</td>\n</tr>\n<tr>\n\t<td valign='top' nowrap align='right' class=legend style='font-size:22px'>{upload_max_filesize}:</strong></td>\n\t<td valign='top' nowrap align='left' style='font-size:22px'>" . Field_text('RoundCubeUploadMaxFilesize', $RoundCubeUploadMaxFilesize, 'width:90px;font-size:22px') . "M</td>\n</tr>\n\n\t\t\n<tr>\n\t<td valign='top' nowrap align='right' class=legend style='font-size:22px'>{auto_create_user}:</strong></td>\n\t<td valign='top' nowrap align='left'>" . Field_checkbox_design('RoundCubeAutoCreateuser', 1, $RoundCubeAutoCreateuser) . "</td>\n</tr>\n<tr>\n\t<td align='right' class=legend style='font-size:22px'>{default_host}:</strong></td>\n\t<td>" . Field_text('RoundCubeDefaultHost', $RoundCubeDefaultHost, 'width:230px;font-size:22px') . "</td>\n</tr>\n\n<tr>\n\t<td valign='top' nowrap align='right' class=legend style='font-size:22px'>Sieve:</strong></td>\n\t<td valign='top' nowrap align='left' style='font-size:22px'>" . Field_text('RoundCubeSievePort', $RoundCubeSievePort, 'width:190px;font-size:22px') . "</td>\n</tr>\n\n<tr>\n\t<td align='right' class=legend style='font-size:22px'>{locale_string}:</strong></td>\n\t<td>" . Field_text('RoundeCubeLocalString', trim($RoundeCubeLocalString), 'width:60px;font-size:22px') . "</td>\n</tr>\t\t\n\t\t\n<tr>\n\t<td align='right' class=legend style='font-size:22px'>{product_name}:</strong></td>\n\t<td>" . Field_text('RoundCubeProductName', trim($RoundCubeProductName), 'width:550px;font-size:22px') . "</td>\n</tr>\t\n<tr>\n\t<td align='right' class=legend style='font-size:22px'>{skip_deleted}:</strong></td>\n\t<td>" . Field_checkbox_design('RoundCubeSkipDeleted', 1, $RoundCubeSkipDeleted) . "</td>\n</tr>\n<tr>\n\t<td align='right' class=legend style='font-size:22px'>{flag_for_deletion}:</strong></td>\n\t<td style='padding-left:-3px'>\n\t<table style='width:100%;margin-left:-4px;padding:0px'>\n\t<tr>\n\t<td width=1%  valign='top' style='padding-left:-3px'>\n\t" . Field_checkbox_design('RoundCubeFlagForDeletion', 1, $RoundCubeFlagForDeletion) . "</td>\n\t<td valign='center' >" . help_icon('{flag_for_deletion_text}', true) . "</td>\n\t</tr>\n\t</table>\n\t</td>\n</tr>\t\t\t\n\t\t\t\n\t\t\t\n\t<tr>\n\t\t<td colspan=2 align='right'>\n\t\t\t" . button('{apply}', "SaveRoundCubeForm{$t}()", 40) . "\n\t</tr>\n\t\t\t</table>\n\t</form>\n</div>\n\t\t\t\t\t\t\t<script>\n\t\t\t\t\t\t\t\t\nvar X_SaveRoundCubeForm{$t}= function (obj) {\n}\n\t\t\t\t\t\t\t\t\nfunction SaveRoundCubeForm{$t}(){\n\tvar XHR = new XHRConnection();\n\t\n\tif(document.getElementById('RoundCubeUseSSL').checked){XHR.appendData('RoundCubeUseSSL','1');}else{XHR.appendData('RoundCubeUseSSL','0');}\n\tif(document.getElementById('RoundCubeEnableLDAP').checked){XHR.appendData('RoundCubeEnableLDAP','1');}else{XHR.appendData('RoundCubeEnableLDAP','0');}\n\tif(document.getElementById('RoundCubeEnableCaching').checked){XHR.appendData('RoundCubeEnableCaching','1');}else{XHR.appendData('RoundCubeEnableCaching','0');}\n\tif(document.getElementById('RoundCubeSkipDeleted').checked){XHR.appendData('RoundCubeSkipDeleted','1');}else{XHR.appendData('RoundCubeSkipDeleted','0');}\n\tif(document.getElementById('RoundCubeFlagForDeletion').checked){XHR.appendData('RoundCubeFlagForDeletion','1');}else{XHR.appendData('RoundCubeFlagForDeletion','0');}\n\t\n\t\n\t\n\tXHR.appendData('RoundCubeProductName',document.getElementById('RoundCubeProductName').value);\n\tXHR.appendData('RoundCubeUploadMaxFilesize',document.getElementById('RoundCubeUploadMaxFilesize').value);\n\tXHR.appendData('RoundCubeSievePort',document.getElementById('RoundCubeSievePort').value);\n\tXHR.appendData('RoundeCubeLocalString',document.getElementById('RoundeCubeLocalString').value);\n\tXHR.appendData('RoundCubeDebugLevel',document.getElementById('RoundCubeDebugLevel').value);\n\tXHR.appendData('RoundCubeUserLink',document.getElementById('RoundCubeUserLink').value);\n\tXHR.appendData('RoundCubeHTTPSPort',document.getElementById('RoundCubeHTTPSPort').value);\n\tXHR.appendData('RoundCubeHTTPPort',document.getElementById('RoundCubeHTTPPort').value);\n\tXHR.sendAndLoad('{$page}', 'POST',X_SaveRoundCubeForm{$t});\n\t}\n</script>";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:articatech,项目名称:artica,代码行数:56,代码来源:roundcube.params.php

示例11: popup_settings

function popup_settings()
{
    $t = $_GET["t"];
    $sock = new sockets();
    $Key = md5("SMTPTESTS-{$_GET["servername"]}&ou={$_GET["ou"]}");
    $datas = unserialize(base64_decode($sock->GET_INFO($Key)));
    $page = CurrentPageName();
    $tpl = new templates();
    $html = "\n\t<div id='params-{$t}' style='text-align:right'><strong>Key:{$Key}</strong></div>\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:18px'>{smtp_sender}:</strong></td>\n\t\t<td>" . Field_text("smtp_sender-{$t}", trim($datas["smtp_sender"]), 'font-size:18px;padding:3px;width:100%') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:18px'>{recipient}:</strong></td>\n\t\t<td>" . Field_text("smtp_dest-{$t}", trim($datas["smtp_dest"]), 'font-size:18px;padding:3px;width:100%') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:18px'>{use_local_service}:</strong></td>\n\t\t<td>" . Field_checkbox_design("smtp_local-{$t}", 1, $datas["smtp_local"], "smtp_localcheck()") . "</td>\n\t</tr>\t\n\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:18px'>{relay}:</strong></td>\n\t\t<td>" . Field_text("relay-{$t}", trim($datas["relay"]), 'font-size:18px;padding:3px;width:100%') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:18px'>{authenticate}:</strong></td>\n\t\t<td>" . Field_checkbox_design("smtp_auth-{$t}", 1, $datas["smtp_auth"], "smtp_authCheck()") . "</td>\n\t</tr>\t\t\t\t\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:18px'>{smtp_auth_user}:</strong></td>\n\t\t<td>" . Field_text("smtp_auth_user-{$t}", trim($datas["smtp_auth_user"]), 'font-size:18px;padding:3px;width:150px') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:18px'>{smtp_auth_passwd}:</strong></td>\n\t\t<td>" . Field_password("smtp_auth_passwd-{$t}", trim($datas["smtp_auth_passwd"]), 'font-size:18px;padding:3px;width:150px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button("{save_and_send}", "SaveTestSend()", 35) . "</td>\n\t</tr>\n\t</table>\n\t<script>\n\tvar x_SaveTestSend= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tdocument.getElementById('params-{$t}').innerHTML='';\n\t\tif(results.length>0){alert(results);return;}\n\t\t\$('#flexRT{$t}').flexReload();\n\t\tYahooWin3Hide();\n\t}\n\t\n\tfunction smtp_localcheck(){\n\t\tdocument.getElementById('relay-{$t}').disabled=false;\n\t\tif(document.getElementById('smtp_local-{$t}').checked){\n\t\t\tdocument.getElementById('relay-{$t}').disabled=true;\n\t\t\t}\n\t}\n\t\n\tfunction smtp_authCheck(){\n\t\tdocument.getElementById('smtp_auth_user-{$t}').disabled=true;\n\t\tdocument.getElementById('smtp_auth_passwd-{$t}').disabled=true;\n\t\t\n\t\t\n\t\tif(document.getElementById('smtp_auth-{$t}').checked){\n\t\t\tdocument.getElementById('smtp_auth_user-{$t}').disabled=false;\n\t\t\tdocument.getElementById('smtp_auth_passwd-{$t}').disabled=false;\t\t\n\t\t}\n\t}\n\n\tfunction SaveTestSend(){\n\t\tvar XHR = new XHRConnection();\n\t\tif(document.getElementById('smtp_auth-{$t}').checked){XHR.appendData('smtp_auth',1);}else {XHR.appendData('smtp_auth',0);}\n\t\tif(document.getElementById('smtp_local-{$t}').checked){XHR.appendData('smtp_local',1);}else {XHR.appendData('smtp_local',0);}\n\t\tvar pp=encodeURIComponent(document.getElementById('smtp_auth_passwd-{$t}').value);\n\t\tXHR.appendData('relay',document.getElementById('relay-{$t}').value);\n\t\tXHR.appendData('smtp_sender',document.getElementById('smtp_sender-{$t}').value);\n\t\tXHR.appendData('smtp_dest',document.getElementById('smtp_dest-{$t}').value);\n\t\tXHR.appendData('smtp_sender',document.getElementById('smtp_sender-{$t}').value);\n\t\tXHR.appendData('smtp_auth_user',document.getElementById('smtp_auth_user-{$t}').value);\n\t\tXHR.appendData('servername','{$_GET["servername"]}');\n\t\tXHR.appendData('ou','{$_GET["ou"]}');\n\t\tXHR.appendData('smtp_auth_passwd',pp);\n\t\tAnimateDiv('params-{$t}');\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_SaveTestSend);\n\t}\n\tsmtp_authCheck();\n\tsmtp_localcheck();\n</script>\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:11,代码来源:postfix.smtp-tests.php

示例12: page

function page()
{
    $sock = new sockets();
    $tpl = new templates();
    $t = time();
    $page = CurrentPageName();
    $NginxBehindLB = intval($sock->GET_INFO("NginxBehindLB"));
    $NginxLBIpaddr = $sock->GET_INFO("NginxLBIpaddr");
    $html = "<div style='font-size:40px;margin-bottom:30px'>{options}</div>\n\t\n\t<div style='width:98%' class=form>\t\n\t<div style='font-size:30px;margin-bottom:20px'>Load-balancer</div>\t\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{enable}:</td>\n\t\t<td>" . Field_checkbox_design("NginxBehindLB", 1, $NginxBehindLB, "Check{$t}()") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{lb_ipaddr}:</td>\n\t\t<td>" . field_ipv4("NginxLBIpaddr", $NginxLBIpaddr, "font-size:22px") . "</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td colspan=2 align='right'>" . button("{apply}", "Submit{$t}()", 32) . "</td>\n\t</tr>\n\t</table>\n\t</div>\n\t<script>\n\tvar xSubmit{$t}= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>3){alert(results);return;}\n\t\tLoadjs('nginx.restart.progress.php');\n\t}\n\t\n\t\n\tfunction Submit{$t}(){\n\t\tvar XHR = new XHRConnection();\n\t\tvar NginxBehindLB=0;\n\t\tif(document.getElementById('NginxBehindLB').checked){NginxBehindLB=1;}\n\t\tXHR.appendData('NginxBehindLB',NginxBehindLB);\n\t\tXHR.appendData('NginxLBIpaddr',document.getElementById('NginxLBIpaddr').value);\n\t\tXHR.sendAndLoad('{$page}', 'POST',xSubmit{$t});\n\t}\n\t\n\tfunction Check{$t}(){\n\t\t\n\t\tdocument.getElementById('NginxLBIpaddr').disabled=true;\n\t\tvar NginxBehindLB=0;\n\t\tif(document.getElementById('NginxBehindLB').checked){NginxBehindLB=1;}\n\t\tif(NginxBehindLB==1){\n\t\t\tdocument.getElementById('NginxLBIpaddr').disabled=false;\n\t\t}\n\t}\n\tCheck{$t}();\n\t</script>\t\t\t\n\t\t\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:articatech,项目名称:artica,代码行数:11,代码来源:nginx.options.php

示例13: popup

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);
}
开发者ID:articatech,项目名称:artica,代码行数:12,代码来源:suricata.rule-zoom.php

示例14: popup

function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $SquidNoAccessLogs = intval($sock->GET_INFO("SquidNoAccessLogs"));
    $t = time();
    $array = unserialize(base64_decode($sock->GET_INFO("SquidSyslogAdd")));
    if (trim($array["PERSO_EVENT"]) == null) {
        $array["PERSO_EVENT"] = "%>eui %>a %[ui %[un %tl %rm %ru HTTP/%rv %>Hs %<st %Ss:%Sh %{User-Agent}>h %{X-Forwarded-For}>h %<A %>A %tr %mt";
    }
    $html = "\n\t<div id='{$t}' style='width:98%' class=form>\n\t<table style='width:99%'>\n\t<tr>\n\t\t<td colspan=2>" . Paragraphe_switch_img("{activate} Syslog", "{squid_syslog_text}", "ENABLE-{$t}", $array["ENABLE"], null, 700, "SquidSyslogAddCheck()") . "</td>\n\t\t\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{remote_server} (local6):</td>\n\t\t<td>" . Field_text("SERVER-{$t}", $array["SERVER"], "font-size:22px;width:300px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{use_personalized_event}:</td>\n\t\t<td>" . Field_checkbox_design("ENABLE_PERSO_EVENT-{$t}", 1, $array["ENABLE_PERSO_EVENT"], "SquidSyslogAddCheck()") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{remove_local_access_events}:</td>\n\t\t<td>" . Field_checkbox_design("SquidNoAccessLogs-{$t}", 1, $SquidNoAccessLogs) . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px' colspan=2>{pattern}:</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px' colspan=2>\n\t\t\t\t\n\t\t<textarea id='PERSO_EVENT-{$t}' style='font-size:16px !important;margin-top:10px;margin-bottom:10px;\n\t\tfont-family:\"Courier New\",Courier,monospace;padding:3px;border:3px solid #5A5A5A;font-weight:bolder;color:#5A5A5A;\n\t\twidth:100%;height:180px;overflow:auto'>{$array["PERSO_EVENT"]}</textarea>\t\t\n\t\t\t\t\n\t\t</td>\n\t</tr>\t\t\t\t\n\t\t\t\t\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "SaveSyslogSquid{$t}()", 28) . "</td>\n\t</tr>\n\t</table>\n\t\n\t<script>\n\t\tvar x_SaveSyslogSquid{$t}= function (obj) {\n\t\t\tLoadjs('squid.compile.progress.php');\n\t\t\tYahooWin2Hide();\n\t\t}\n\t\n\t\n\tfunction SaveSyslogSquid{$t}(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('SERVER',document.getElementById('SERVER-{$t}').value);\n\t\tXHR.appendData('ENABLE',document.getElementById('ENABLE-{$t}').value);\n\t\tif(document.getElementById('ENABLE_PERSO_EVENT-{$t}').checked){XHR.appendData('ENABLE_PERSO_EVENT',1);}else{XHR.appendData('ENABLE_PERSO_EVENT',0); }\n\t\tif(document.getElementById('SquidNoAccessLogs-{$t}').checked){XHR.appendData('SquidNoAccessLogs',1);}else{XHR.appendData('SquidNoAccessLogs',0); }\n\t\tXHR.appendData('PERSO_EVENT',encodeURIComponent(document.getElementById('PERSO_EVENT-{$t}').value));\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_SaveSyslogSquid{$t});\n\t}\n\t\n\tfunction SquidSyslogAddCheck(){\n\t\tdocument.getElementById('SERVER-{$t}').disabled=true;\n\t\tdocument.getElementById('PERSO_EVENT-{$t}').disabled=true;\n\t\tdocument.getElementById('SquidNoAccessLogs-{$t}').disabled=true;\n\t\t\n\t\t\n\t\t\n\t\tif(document.getElementById('ENABLE-{$t}').value==1){\n\t\t\tdocument.getElementById('SERVER-{$t}').disabled=false;\n\t\t\tdocument.getElementById('SquidNoAccessLogs-{$t}').disabled=false;\n\n\t\t\tif(document.getElementById('ENABLE_PERSO_EVENT-{$t}').checked){\n\t\t\t\tdocument.getElementById('PERSO_EVENT-{$t}').disabled=false;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\tdocument.getElementById('SquidNoAccessLogs-{$t}').checked=false;\n\t\t\n\t\t}\n\t\t\n\t\tCheckBoxDesignRebuild();\n\t}\n\t\n\tSquidSyslogAddCheck();\n\n</script>\n\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:14,代码来源:squid.syslog.php

示例15: popup

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


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