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


PHP Field_hidden函数代码示例

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


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

示例1: popup

function popup()
{
    $ou = base64_decode($_GET["ou"]);
    $sql = "SELECT ID,enabled,report_datas FROM reports WHERE ou='{$ou}' AND report_type=1";
    $q = new mysql();
    $ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
    $array = unserialize(base64_decode($ligne["report_datas"]));
    if ($array["day"] == null) {
        $array["day"] = 1;
    }
    if ($array["hour"] == null) {
        $array["hour"] = "5";
    }
    if ($array["min"] == null) {
        $array["min"] = "0";
    }
    if ($array["lastdays"] == null) {
        $array["lastdays"] = "7";
    }
    $cron = new cron_macros(1);
    $days = $cron->cron_days;
    for ($i = 1; $i < 60; $i++) {
        $lastdays[$i] = $i;
    }
    $html = "\n\t" . Field_hidden("ID", $ligne["ID"]) . "\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'><img src='img/postmaster-identity-128.png' id='report-image'></td>\n\t\t<td>\n\t\t<div style='font-size:14px' class=explain>{global_director_report_explain}</div>\n\t\t<table style='width:99%' class=form>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:13px'>{enabled}:</td>\n\t\t\t<td>" . Field_checkbox("report_enabled", 1, $ligne["enabled"]) . "</td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:13px'>{generate_report_each}:</td>\n\t\t\t<td>" . Field_array_Hash($days, "day", $array["day"], null, null, 0, "font-size:13px;padding:3px") . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:13px'>{time}:</td>\n\t\t\t<td><table style='width:1%'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t" . Field_array_Hash($cron->cron_hours, "hour", $array["hour"], null, null, 0, "font-size:13px;padding:3px") . "</td>\n\t\t\t\t\t<td width=1% style='font-size:13px'>:</td>\n\t\t\t\t\t<td>" . Field_array_Hash($cron->cron_mins, "min", $array["min"], null, null, 0, "font-size:13px;padding:3px") . "</td>\n\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:13px'>{recipient}:</td>\n\t\t\t<td>" . Field_text("recipient", $array["recipient"], "font-size:13px;padding:3px") . "</td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:13px'>{last_days}:</td>\n\t\t\t<td>" . Field_array_Hash($lastdays, "lastdays", $array["lastdays"], null, null, 0, "font-size:13px;padding:3px") . "</td>\n\t\t</tr>\n\t\t\n\t\t<tr>\n\t\t\t<td colspan='2' align='right'><hr>" . button("{apply}", "DIRECTOR_SAVE()") . "</td>\n\t\t</tr>\n\t\t\n\t\t</table>\n\t\t\n\t\t\n\t\t</td>\n\t</tr>\n\t</table>\n\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:28,代码来源:domains.director.report.php

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

示例3: INDEX_CREATE

function INDEX_CREATE()
{
    $ldap = new clladp();
    if ($_GET["ou"] == null) {
        die;
    }
    $_GET["ou"] = base64_decode($_GET["ou"]);
    $hash = $ldap->hash_groups($_GET["ou"], 1);
    $domains = $ldap->hash_get_domains_ou($_GET["ou"]);
    if (count($domains) == 0) {
        $users = new usersMenus();
        if ($users->POSTFIX_INSTALLED) {
            $field_domains = Field_text('user_domain', "{$_GET["ou"]}.com", "width:85px");
        } else {
            if (!preg_match("#(.+?)\\.(.+)#", $_GET["ou"])) {
                $dom = "{$_GET["ou"]}.com";
            } else {
                $dom = "{$_GET["ou"]}";
            }
            $field_domains = "<code><strong>{$dom}</strong></code>" . Field_hidden('user_domain', "{$dom}", "width:120px");
        }
    } else {
        $field_domains = Field_array_Hash($domains, 'user_domain', "style:font-size:18px;padding:3px");
    }
    $tpl = new templates();
    $hash[null] = "{select}";
    $groups = Field_array_Hash($hash, 'group_id', $_GET["gpid"], "style:font-size:18px;padding:3px");
    $error_no_password = $tpl->javascript_parse_text("{error_no_password}");
    $error_no_userid = $tpl->javascript_parse_text("{error_no_userid}");
    $t = time();
    $title = "{$_GET["ou"]}:{create_user}";
    $step1 = "\n\t<div style='width:98%' class=form>\n\t<table style='width:99%' class='TableRemove' OnMouseOver=\"javascript:HideExplainAll(1)\">\n\t<tr>\n\t<td valign='top' width=1%><img src='img/chiffre1_32.png'></td>\n\t<td valign='top'>\n\t<div style='font-size:18px;font-weight:bold;margin-bottom:5px'>{name_the_new_account_title}:</div>\n\t" . Field_text('new_userid', null, "font-size:18px;padding:3px;font-weight:bold;color:#C80000", null, "UserAutoChange_eMail()", null, false, "UserADDCheck(event)") . "\n\n\t</td>\n\t</tr>\n\t</table></div>";
    $step2 = "\n\t<div style='width:98%' class=form>\n\t<table style='width:99%' class='TableRemove' OnMouseOver=\"javascript:HideExplainAll(2)\">\n\t<tr>\n\t<td valign='top' width=1%><img src='img/chiffre2_32.png'></td>\n\t<td valign='top'>\n\t<div style='font-size:18px;font-weight:bold;margin-bottom:5px'>{email}</div><br>\n\t<input type='hidden' name='email' value='' id='email'>\n\t<span id='prefix_email' style='width:90px;border:1px solid #CCCCCC;padding:2px;font-size:18px;font-weight:bold;margin:2px'>\n\t</span>@{$field_domains}&nbsp;\n\t<div style='text-align:right;font-size:14px;'><i><a href='javascript:ChangeAddUsereMail();'>{change}</a></i>\n\t\n\t</td>\n\t</tr>\n\t</table></div>";
    $step3 = "\n\t<div style='width:98%' class=form>\n\t<table style='width:99%' class='TableRemove' OnMouseOver=\"javascript:HideExplainAll(4)\">\n\t<tr>\n\t<td valign='top' width=1%><img src='img/chiffre3_32.png'></td>\n\t<td valign='top'>\n\t<div style='font-size:18px;font-weight:bold;margin-bottom:5px'>{password}</div>\n\t" . Field_password("password-{$t}", null, "font-size:18px;padding:3px;width:190px;letter-spacing:3px", null, null, null, false, "UserADDCheck(event)") . "\n\t</td>\n\t</tr>\n\t</table>\n\t</div>\n\t";
    $step4 = "\n\t<div style='width:98%' class=form>\n\t<table style='width:99%' class='TableRemove' OnMouseOver=\"javascript:HideExplainAll(3)\">\n\t<tr>\n\t<td valign='top' width=1%><img src='img/chiffre4_32.png'></td>\n\t<td valign='top'>\n\t<div style='font-size:18px;font-weight:bold;margin-bottom:5px'>{group}</div>\n\t<div style='font-size:18px;margin-bottom:5px'>{select_user_group_title}:</div><br>{$groups}\n\t</td>\n\t</tr>\n\t</table></div>\n\t";
    if ($_GET["gpid"] > 0) {
        $step4 = "<input type='hidden' id='group_id' value='{$_GET["gpid"]}'>";
    }
    $html = "\n\t<input type='hidden' id='ou-mem-add-form-user' value='{$_GET["ou"]}'>\n\t<input type='hidden' id='ou' value='{$_GET["ou"]}'>\n\t<div id='adduser_ajax_newfrm' style='margin-top:5px'>\n\t<div style='width:98%' class=form>\n\t<table style='width:100%' class=TableRemove>\n\t<tr>\n\t<td valign='top' style='width:450px;vertical-align:top'>\n\t\t<table style='width:450px'>\n\t\t<tr>\n\t\t\t<td valign='top' width=290px>{$step1}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td valign='top'>{$step2}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td valign='top'><br>{$step3}</td>\n\t\t</tr>\n\t\t\t<td valign='top'><br>{$step4}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td align='right'>\n\t\t\t\t<hr>" . button("{add}", "UserADDSubmit()", 26) . "\n\t\t\t</td>\n\t\t</tr>\t\t\t\n\t\t</table>\n\t</td>\n\t<td valign='top' style='width:50%'>\n\t\t\t<center style='margin-bottom:8px'><img src='img/add-woman-256.png'></center>\n\t\t\t<div style='padding-left:10px'>\t\t\n\t\t\t\t<div class=text-info id='text-1' style='font-size:16px'>{name_the_new_account_explain}</div>\n\t\t\t\t<div class=text-info id='text-2' style='font-size:16px'>{user_email_text}</div>\n\t\t\t\t<div class=text-info id='text-3' style='font-size:16px'>{select_user_group_text}</div>\n\t\t\t\t<div class=text-info id='text-4' style='font-size:16px'>{give_password_text}</div>\n\t\t\t</div>\n\t\t\t\n\t</td>\n\t</tr>\t\n\t</table>\n\t</div>\n\t</div>\n\t<input type='hidden' id='flexRTMEM' value='{$_GET["flexRT"]}'>\n\t<script>\n\t\tfunction VerifyFormAddUserCheck(){\n\t\t\tvar pass;\n\t\t\tvar uid;\n\t\t\tpass=document.getElementById('password-{$t}').value;\n\t\t\tuid=document.getElementById('new_userid').value;\n\t\t\tif(uid.length<1){alert('{$error_no_userid}');return false;}\n\t\t\tif(pass.length<1){alert('{$error_no_password}');return false;}\n\t\t\treturn true;\n\t\t\t}\n\t\t\n\t\tfunction UserADDSubmit(){\n\t\t\tif(!VerifyFormAddUserCheck()){return;}\n\t\t\tUserADD{$t}();\n\t\t}\n\t\n\t\n\t\tfunction UserADDCheck(e){\n\t\t\tif(checkEnter(e)){UserADDSubmit();}\n\t\t}\n\t\t\n\t\tfunction HideExplainAll(id){\n\t\t\tdocument.getElementById('text-1').style.display='none';\n\t\t\tdocument.getElementById('text-2').style.display='none';\n\t\t\tdocument.getElementById('text-3').style.display='none';\n\t\t\tdocument.getElementById('text-4').style.display='none';  \n\t\t\tif(document.getElementById('text-'+id)){\n\t\t\t\tdocument.getElementById('text-'+id).style.display='block';\n\t\t\t\t} \n\t\t\t\n\t\t}\n\t\t\nfunction UserADD{$t}(){\n\t\tvar XHR = new XHRConnection();\n\t\tvar ou=document.getElementById('ou').value;\n\t\tif(ou.length==0){if(document.getElementById('ou-mem-add-form-user')){ou=document.getElementById('ou-mem-add-form-user').value;}}\n\t\tif(ou.length==0){Alert('Unable to stat Organization name (ou field is empty)');return;}\n\t\t\n\t\tXHR.appendData('ou',ou);\n\t\tXHR.appendData('new_userid',document.getElementById('new_userid').value);\n\t\tXHR.appendData('password',document.getElementById('password-{$t}').value);\n\t\tXHR.appendData('group_id',document.getElementById('group_id').value);\n\t\tXHR.appendData('email',document.getElementById('email').value);\n\t\tXHR.appendData('user_domain',document.getElementById('user_domain').value);\n\t\t\n\t\tif(document.getElementById('adduser_ajax_newfrm')){AnimateDiv('adduser_ajax_newfrm');}\n\t\tif(document.getElementById('bglego')){document.getElementById('bglego').src='img/wait_verybig.gif';}\n\t\tif(document.getElementById('member_add_to_wait')){AnimateDiv('member_add_to_wait');}\n\t\tXHR.sendAndLoad('domains.edit.user.php', 'POST',X_UserADD);\t\n\t}\t\t\n\t\n\t\n\t\t\n\t\tHideExplainAll();\n</script>\t\n\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:41,代码来源:domains.add.user.php

示例4: INDEX_CREATE

function INDEX_CREATE()
{
    $ldap = new clladp();
    if ($_GET["ou"] == null) {
        die;
    }
    $_GET["ou"] = base64_decode($_GET["ou"]);
    $hash = $ldap->hash_groups($_GET["ou"], 1);
    $domains = $ldap->hash_get_domains_ou($_GET["ou"]);
    if (count($domains) == 0) {
        $users = new usersMenus();
        if ($users->POSTFIX_INSTALLED) {
            $field_domains = Field_text('user_domain', "{$_GET["ou"]}.com", "width:85px");
        } else {
            if (!preg_match("#(.+?)\\.(.+)#", $_GET["ou"])) {
                $dom = "{$_GET["ou"]}.com";
            } else {
                $dom = "{$_GET["ou"]}";
            }
            $field_domains = "<code><strong>{$dom}</strong></code>" . Field_hidden('user_domain', "{$dom}", "width:120px");
        }
    } else {
        $field_domains = Field_array_Hash($domains, 'user_domain');
    }
    $hash[null] = "{select}";
    $groups = Field_array_Hash($hash, 'group_id', $_GET["gpid"]);
    $title = "{$_GET["ou"]}:{create_user}";
    $step1 = "<table style='width:100%'>\n\t<tr>\n\t<td valign='top' width=1%><img src='img/chiffre1.png'></td>\n\t<td valign='top'>\n\t<H3>{name_the_new_account_title}</H3><br>\n\t<strong>{name_the_new_account_field}:</strong>\n\t<br>" . Field_text('new_userid', null, null, null, "UserAutoChange_eMail()") . "\n\t<div class=caption>{name_the_new_account_explain}</div>\n\t</td>\n\t</tr>\n\t</table>";
    $step2 = "\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top' width=1%><img src='img/chiffre2.png'></td>\n\t<td valign='top'>\n\t<H3>{email}</H3><br>\n\t<strong>{email}:</strong>\n\t<br><input type='hidden' name='email' value='' id='email'>\n\t<span id='prefix_email' style='width:90px;border:1px solid #CCCCCC;padding:2px;font-size:11px;font-weight:bold;margin:2px'></span>@{$field_domains}&nbsp;<a href='javascript:ChangeAddUsereMail();'>[{change}]</a>\n\t<div class=caption>{user_email_text}</div>\n\t</td>\n\t</tr>\n\t</table>";
    $step3 = "\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top' width=1%><img src='img/chiffre3.png'></td>\n\t<td valign='top'>\n\t<H3>{password}</H3><br>\n\t<strong>{give_password}:</strong>\n\t<br>" . Field_password('password') . "\n\t<div class=caption>{give_password_text}</div>\n\t</td>\n\t</tr>\n\t</table>\n\t";
    $step4 = "\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top' width=1%><img src='img/chiffre4.png'></td>\n\t<td valign='top'>\n\t<H3>{group}</H3><br>\n\t<strong>{select_user_group_title}:</strong>{$groups}\n\t<div class=caption>{select_user_group_text}</div>\n\t</td>\n\t</tr>\n\t</table>\n\t";
    if ($_GET["gpid"] > 0) {
        $step4 = "<input type='hidden' id='group_id' value='{$_GET["gpid"]}'>";
    }
    $html = "\n\t<input type='hidden' id='ou-mem-add-form-user' value='{$_GET["ou"]}'>\n\t<input type='hidden' id='ou' value='{$_GET["ou"]}'>\n\t<div style='float:right'><img src='img/64_bg_lego.png'></div><H1>{$title}</H1>\n\t<p class=caption>{create_user_text}</p>\n\t<div id='adduser_ajax_newfrm'>\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>{$step1}</td>\n\t<td valign='top'>{$step2}</td>\n\t</tr>\n\t<tr>\n\t<td valign='top'><br>{$step3}\n\t</td>\n\t<td valign='top'><br>{$step4}</td>\n\t</tr>\n\t<tr>\n\t<td colspan=2>\n\t<hr>\n\t<div style='padding:10px;text-align:right'>\n\t\t" . button("{add}", "UserADD()") . "\n\t\n\t</td>\n\t</tr>\t\t\n\t\n\t</table>\n\t</div>\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:brucewu16899,项目名称:artica,代码行数:38,代码来源:domains.add.user.php

示例5: TOOLS_SYNC

function TOOLS_SYNC()
{
    $uid = $_GET["uid"];
    $user = new usersMenus();
    $content = Field_hidden('export_from_uid', $uid) . "\n\n<table style='width:100%'>\n<tr>\n\t<td class=legend nowrap>{sync_find_user}:</td>\n\t<td>" . Field_text('sync_find_user', null, null, null) . "</td>\n\t<td><input type='button' OnClick=\"javascript:ExpFindUser();\" value='{search}&nbsp;&raquo;'></td>\n\t</tr>\n</table>\n\n";
    if (!$user->mailsync_installed) {
        $content = Paragraphe('add-remove-64.png', '{imapsync_not_installed}', '{imapsync_not_installed_text}', 'setup.index.php', null, 290);
    }
    $html = "\n\t<H1>{$uid} {export_mailbox}</H1>\n\t<p class=caption>{export_mailbox_text}</p>\n\t<center>\n\t{$content}\n\t</center>\n\t<div id='imapsync_logs'></div>";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:12,代码来源:domains.edit.user.php

示例6: settings

function settings()
{
    $tpl = new templates();
    $sock = new sockets();
    $page = CurrentPageName();
    $users = new usersMenus();
    $influx = new influx();
    $t = time();
    $ERROR_PERF = null;
    $InfluxAdminDisabled = intval($sock->GET_INFO("InfluxAdminDisabled"));
    $InfluxAdminPort = intval($sock->GET_INFO("InfluxAdminPort"));
    if ($InfluxAdminPort == 0) {
        $InfluxAdminPort = 8083;
    }
    $InfluxAdminEnabled = 1;
    if ($InfluxAdminDisabled == 1) {
        $InfluxAdminEnabled = 0;
    }
    $InfluxAdminRetentionTime = intval($sock->GET_INFO("InfluxAdminRetentionTime"));
    $UserAgentsStatistics = intval($sock->GET_INFO("UserAgentsStatistics"));
    $ResolvIPStatistics = intval($sock->GET_INFO("ResolvIPStatistics"));
    $EnableQuotasStatistics = intval($sock->GET_INFO("EnableQuotasStatistics"));
    $QuotasStatisticsInterval = intval($sock->GET_INFO("QuotasStatisticsInterval"));
    $InfluxListenInterface = intval($sock->GET_INFO("InfluxListenInterface"));
    if ($InfluxListenInterface == null) {
        $InfluxListenInterface = "lo";
    }
    $EnableInfluxDB = intval($sock->GET_INFO("EnableInfluxDB"));
    $SquidPerformance = intval($sock->GET_INFO("SquidPerformance"));
    $MySQLStatisticsRetentionDays = intval($sock->GET_INFO("MySQLStatisticsRetentionDays"));
    if ($MySQLStatisticsRetentionDays == 0) {
        $MySQLStatisticsRetentionDays = 5;
    }
    $bt_disconnect = null;
    $STATS_APPLIANCE = 0;
    $sys = new networking();
    $influxstop = null;
    $Local_interfaces = $sys->Local_interfaces();
    if (!$users->STATS_APPLIANCE) {
        $Local_interfaces["lo"] = "loopback";
    } else {
        $STATS_APPLIANCE = 1;
    }
    $Local_interfaces["ALL"] = "{all}";
    if ($InfluxAdminRetentionTime == 0) {
        $InfluxAdminRetentionTime = 365;
    }
    $users = new usersMenus();
    $InfluxAdminRetention[7] = "7 {days}";
    $InfluxAdminRetention[15] = "15 {days}";
    $InfluxAdminRetention[30] = "1 {month}";
    $InfluxAdminRetention[90] = "3 {months}";
    $InfluxAdminRetention[180] = "6 {months}";
    $InfluxAdminRetention[365] = "1 {year}";
    $InfluxAdminRetention[730] = "2 {years}";
    $InfluxAdminRetention[1095] = "3 {years}";
    $MySQLStatisticsRetention[1] = "1 {day}";
    $MySQLStatisticsRetention[2] = "2 {days}";
    $MySQLStatisticsRetention[3] = "3 {days}";
    $MySQLStatisticsRetention[4] = "4 {days}";
    $MySQLStatisticsRetention[5] = "5 {days}";
    $MySQLStatisticsRetention[6] = "6 {days}";
    $MySQLStatisticsRetention[7] = "7 {days}";
    $MySQLStatisticsRetention[8] = "8 {days}";
    $MySQLStatisticsRetention[9] = "9 {days}";
    $MySQLStatisticsRetention[10] = "10 {days}";
    $QuotasStatisticsIntervalA[5] = "5 {minutes}";
    $QuotasStatisticsIntervalA[10] = "10 {minutes}";
    $QuotasStatisticsIntervalA[15] = "15 {minutes}";
    $QuotasStatisticsIntervalA[30] = "30 {minutes}";
    if ($QuotasStatisticsInterval == 0) {
        $QuotasStatisticsInterval = 15;
    }
    $CORP_LICENSE = 1;
    $explain_retention = "&nbsp;";
    $field_ret = Field_array_Hash($InfluxAdminRetention, "InfluxAdminRetentionTime", "{$InfluxAdminRetentionTime}", "blur()", null, 0, "font-size:22px");
    if (!$users->CORP_LICENSE) {
        $InfluxAdminRetentionTime = 7;
        $CORP_LICENSE = 0;
        $field_ret = Field_hidden("InfluxAdminRetentionTime", 5) . "5 {days}<div><i style='font-size:16px'>{retention_time_limited_license}</i></div>";
    }
    if ($EnableInfluxDB == 0) {
        $influxstop = "<div class=explain style='font-size:18px'>{influxdb_is_disabled}</div>";
    }
    $InFluxBackupDatabaseDir = $sock->GET_INFO("InFluxBackupDatabaseDir");
    if ($InFluxBackupDatabaseDir == null) {
        $InFluxBackupDatabaseDir = "/home/artica/influx/backup";
    }
    $InFluxBackupDatabaseMaxContainers = intval("InFluxBackupDatabaseMaxContainers");
    if ($InFluxBackupDatabaseMaxContainers == 0) {
        $InFluxBackupDatabaseMaxContainers = 5;
    }
    $InFluxBackupDatabaseInterval = intval("InFluxBackupDatabaseInterval");
    if ($InFluxBackupDatabaseInterval == 0) {
        $InFluxBackupDatabaseInterval = 10080;
    }
    if ($InFluxBackupDatabaseInterval < 1440) {
        $InFluxBackupDatabaseInterval = 1440;
    }
    $influxdb_snapshotsize = @file_get_contents("{$GLOBALS["BASEDIR"]}/influxdb_snapshotsize");
//.........这里部分代码省略.........
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:101,代码来源:squid.statistics.options.php

示例7: add_new_disk_popup

function add_new_disk_popup()
{
    $t = time();
    $page = CurrentPageName();
    $squid = new squidbee();
    $tpl = new templates();
    $sock = new sockets();
    $caches_types = unserialize(base64_decode($sock->getFrameWork("squid.php?caches-types=yes")));
    $caches_types[null] = '{select}';
    unset($caches_types["rock"]);
    $type = $tpl->_ENGINE_parse_body(Field_array_Hash($caches_types, "cache_type-{$t}", "aufs", "CheckCachesTypes()", null, 0, "font-size:16px;padding:3px"));
    $WARN_OPE_RESTART_SQUID_ASK = $tpl->javascript_parse_text("{WARN_OPE_RESTART_SQUID_ASK}");
    $currentsize = Calculate_maxcachessize();
    $maxCacheSizeInt = 0;
    $maxCacheSize = 0;
    $BUTTON_NAME = "{add}";
    $DefaultmaxCacheSize = round($maxCacheSize / 4, 1);
    $NextCache = count($squid->cache_list) + 1;
    $defaultCachedir = "/home/squid/cache/squid0{$NextCache}";
    $cachedirtext = "\n\t\t<tr>\n\t\t<td class=legend style='font-size:16px' nowrap>{directory}:</td>\n\t\t<td>" . Field_text("cache_directory-{$t}", $defaultCachedir, "width:270px;font-size:16px;padding:3px", null, "Slider{$t}()") . "</td>\n\t\t<td>" . button("{browse}...", "Loadjs('SambaBrowse.php?no-shares=yes&field=cache_directory-{$t}&functionAfter=Slider{$t}')", 12) . "</td>\n\t\t</tr>";
    $SliderDef = 1;
    $cache_dir_level1_def = 16;
    $LockOthers = 0;
    if (isset($_GET["chdef"])) {
        $DF = unserialize(base64_decode($sock->getFrameWork("system.php?DF_SATUS_K=" . urlencode($squid->CACHE_PATH))));
        $BUTTON_NAME = "{apply}";
        $SIZE = round($DF["SIZE"] / 1024 / 1024);
        $maxCacheSize = round($SIZE * 0.9);
        $cachedirtext = "<tr>\n\t\t<td class=legend style='font-size:16px' nowrap>{directory}:</td>\n\t\t<td><strong style='font-size:14px'>{$squid->CACHE_PATH}</strong>" . Field_hidden("cache_directory-{$t}", $squid->CACHE_PATH) . "</td>\n\t\t<td>&nbsp;</td>\n\t\t</tr>";
        if ($squid->CACHE_TYPE == null) {
            $squid->CACHE_TYPE = "aufs";
        }
        $type = $tpl->_ENGINE_parse_body(Field_array_Hash($caches_types, "cache_type-{$t}", $squid->CACHE_TYPE, "CheckCachesTypes()", null, 0, "font-size:16px;padding:3px"));
        $SliderDef = round($squid->CACHE_SIZE / 1000);
        $DefaultmaxCacheSize = $squid->CACHE_SIZE / 1000;
        $XHRADD = "XHR.appendData('DEFAULT_CACHE_SAVE_TRUE','OK');";
        $LockOthers = 1;
    }
    $html = "\t<div id='waitcache-{$t}'></div>\n\t\n\t<div style='width:98%' class=form>\n\t<table style='width:99%'>\n\t\t{$cachedirtext}\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:16px' nowrap>{type}:</td>\n\t\t\t<td>{$type}</td>\n\t\t\t<td>&nbsp;</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;;vertical-align:middle' nowrap>{cache_size}:</td>\n\t\t\t<td style='font-size:16px;vertical-align:middle' width=1% >" . Field_text("squid-cache-size-{$t}", $SliderDef, "font-size:16px;width:90px", null, "Slider{$t}()", null, false, "Slider{$t}()") . "<strong style='font-size:16px'>&nbsp;G&nbsp;</td>\n\t\t\t<td style='width:1%'><div style='font-size:22px;font-weight:bold;text-align:right;letter-spacing:3px;width:220px' id='{$t}-value'>{max_size}:{$maxCacheSize}G</div></td>\n\t\t\t<td>" . help_icon('{cache_size_text}', false, 'squid.index.php') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td colspan=4>\n\t\t\t\t\t\n\t\t\t\t\t<input type='hidden' id='{$t}-mem' value='{$SquidBoosterMem}'>\n\t\t\t\t\t<div class=explain style='font-size:13px'>{warn_calculate_nothdsize}</div></td>\t\t\n\n\t\t<tr>\n\t\t\t<td class=legend nowrap style='font-size:16px'>{cache_dir_level1}:</td>\n\t\t\t<td>" . Field_text("cache_dir_level1-{$t}", 16, 'width:50px;font-size:16px;padding:3px') . "</td>\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>" . help_icon('{cache_dir_level1_text}', false, 'squid.index.php') . "</td>\n\t\t</tr>\t\t\t\n\t\t<tr>\n\t\t\t<td class=legend nowrap style='font-size:16px'>{cache_dir_level2}:</td>\n\t\t\t<td>" . Field_text("cache_dir_level2-{$t}", 256, 'width:50px;font-size:16px;padding:3px') . "</td>\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>" . help_icon('{cache_dir_level2_text}', false, 'squid.index.php') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend nowrap style='font-size:16px'>{max_objects_size}:</td>\n\t\t\t<td  style='font-size:16px'>" . Field_text("cache_maxsize-{$t}", $s->cache_list[$cache]["cache_maxsize"], 'width:50px;font-size:16px;padding:3px', null, "calculateSize()", null, false, null) . "&nbsp;Mbytes&nbsp;<span id='squid-maxsize-vals'></span></td>\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>" . help_icon('{squid_rock_maxsize}', false, 'squid.index.php') . "</td>\n\t\t</tr>\n\t\t\n\t\t<tr>\n\t\t<td align='right' colspan=4><hr>" . button($BUTTON_NAME, "AddNewCacheSave{$t}()", 18) . "</td>\n\t\t</tr>\n\t</table>\n\t</div>\n<script>\n\n\t\t\n\t\t\n\n\t\tfunction CheckCachesTypes(){\n\t\t\tcachetypes=document.getElementById('cache_type-{$t}').value;\n\t\t\tvar LockOthers={$LockOthers};\n\t\t\tif(LockOthers==1){\n\t\t\t\tdocument.getElementById('cache_dir_level2-{$t}').disabled=true;\n\t\t\t\tdocument.getElementById('cache_dir_level1-{$t}').disabled=true;\n\t\t\t\tdocument.getElementById('cache_maxsize-{$t}').disabled=true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\tvar x_AddNewCacheSave{$t}= function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif(results.length>0){\n\t\t\t\talert(results);\n\t\t\t\tdocument.getElementById('waitcache').innerHTML='';\n\t\t\t\t}\n\t\t\tYahooWin3Hide();\n\t\t\tSaveSquid32CachesStatus();\n\t\t\tExecuteByClassName('SearchFunction');\n\t\t}\t\t\n\t\n\tfunction AddNewCacheSave{$t}(){\n\t\tif(confirm('{$WARN_OPE_RESTART_SQUID_ASK}')){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\t{$XHRADD}\n\t\t\tXHR.appendData('cache_directory',document.getElementById('cache_directory-{$t}').value);\n\t\t\tXHR.appendData('cache_type',document.getElementById('cache_type-{$t}').value);\n\t\t\tXHR.appendData('size',document.getElementById('squid-cache-size-{$t}').value);\n\t\t\tXHR.appendData('cache_dir_level1',document.getElementById('cache_dir_level1-{$t}').value);\n\t\t\tXHR.appendData('cache_dir_level2',document.getElementById('cache_dir_level2-{$t}').value);\n\t\t\tXHR.appendData('cache_maxsize',document.getElementById('cache_maxsize-{$t}').value);\n\t\t\tAnimateDiv('waitcache-{$t}');\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_AddNewCacheSave{$t});\n\t\t\t}\n\t\t}\t\t\n\t\t\n\tfunction Slider{$t}(){\n\t\tLoadjs('{$page}?slider-t=yes&t={$t}');\n\t\n\t}\n\t\t\n\t\tCheckCachesTypes();\n\t\tSlider{$t}();\n</script>";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:41,代码来源:squid.caches32.php

示例8: change_field

function change_field()
{
    $type = $_GET["type"];
    $t = $_GET["t"];
    $tpl = new templates();
    $q = new mysql();
    $sql = "SELECT uid FROM postfix_transport_mailbox WHERE `ID`='{$_POST["key"]}'";
    $ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
    if ($type == 0) {
        echo Field_text("uid-{$t}", $ligne["uid"], "font-size:16px;width:180px");
        return;
    }
    $ldap = new clladp();
    $users = new usersMenus();
    if ($users->AsSystemAdministrator) {
        $ous = $ldap->hash_get_ou(true);
        $ous[null] = "{select}";
        echo $tpl->_ENGINE_parse_body(Field_array_Hash($ous, "uid-{$t}", $ligne["uid"], "blur()", null, 0, "font-size:16px"));
        return;
    }
    echo Field_hidden("uid-{$t}", $_SESSION["ou"]) . "<span style='font-size:16px'>{$_SESSION["ou"]}</span>";
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:22,代码来源:postfix.routing.lmtp.php

示例9: main_artica_update_config


//.........这里部分代码省略.........
    if (trim($AUTOUPDATE["enabled"]) == null) {
        $AUTOUPDATE["enabled"] = "yes";
    }
    if (trim($AUTOUPDATE["autoinstall"]) == null) {
        $AUTOUPDATE["autoinstall"] = "yes";
    }
    if (trim($AUTOUPDATE["CheckEveryMinutes"]) == null) {
        $AUTOUPDATE["CheckEveryMinutes"] = "60";
    }
    if (trim($AUTOUPDATE["front_page_notify"]) == null) {
        $AUTOUPDATE["front_page_notify"] = "yes";
    }
    if (trim($AUTOUPDATE["samba_notify"]) == null) {
        $AUTOUPDATE["samba_notify"] = "no";
    }
    if (trim($AUTOUPDATE["auto_apt"]) == null) {
        $AUTOUPDATE["auto_apt"] = "no";
    }
    $action_http_proxy = "\t<td valign='top' width=33%>\n\t" . Paragraphe("proxy-64.png", "{http_proxy}", "{http_proxy_text}", "javascript:Loadjs('artica.settings.php?js=yes&func-ProxyInterface=yes');", 300, null, $nowrap = 1) . "\n\t</td>";
    $action_update_now = "\t<td valign='top' width=33%>\n\t" . Paragraphe('64-recycle.png', '{update_now}', '{perform_update_text}', "javascript:Loadjs('artica.update.progress.php',true)", "{perform_update_text}", 300, null, $nowrap = 1) . "\n\t</td>";
    $action_refresh_index = "<td colspan=2 align='right'>" . button("{refresh_index_file}", "Loadjs('setup.index.php?TestConnection-js=yes')") . "</td>";
    if ($EnableArticaMetaClient == 1) {
        $action_http_proxy = null;
        $action_update_now = null;
        $action_refresh_index = null;
    }
    $CURVER = @file_get_contents("VERSION");
    if (preg_match("#^2\\.#", $CURVER)) {
        $UpgradeTov10 = intval($sock->GET_INFO("UpgradeTov10"));
        if ($UpgradeTov10 == 0) {
            $html = FATAL_INFO_SHOW_128("{need_to_upgrade_to_v10}") . "<center style='margin:50px'>" . button("{perform_upgrade}", "Loadjs('squid.upgradev10.progress.php')", 42) . "</center>";
            echo $tpl->_ENGINE_parse_body($html);
            return;
        }
    }
    $CUR_BRANCH = @file_get_contents("/usr/share/artica-postfix/MAIN_RELEASE");
    $html = "\n\t<input type='hidden' id='perform_update_text' value='{perform_update_text}'>\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>\n\t<td valign='top' width=33%>\n\t" . Paragraphe("64-download.png", "{manual_update}", "{artica_manual_update_text}", "javascript:Loadjs('artica.update-manu.php');", 300, null, $nowrap = 1) . "\n\t</td>\t\n\t</td>\n\t{$action_http_proxy}\n\t{$action_update_now}\n\t</tr>\t\t\t\t\t\n\t</table>\n\t";
    if ($AUTOUPDATE["nightlybuild"] == "yes") {
        $AUTOUPDATE["nightlybuild"] = 1;
    } else {
        $AUTOUPDATE["nightlybuild"] = 0;
    }
    if ($AUTOUPDATE["front_page_notify"] == "yes") {
        $AUTOUPDATE["front_page_notify"] = 1;
    } else {
        $AUTOUPDATE["front_page_notify"] = 0;
    }
    if ($AUTOUPDATE["autoinstall"] == "yes") {
        $AUTOUPDATE["autoinstall"] = 1;
    } else {
        $AUTOUPDATE["autoinstall"] = 0;
    }
    if ($AUTOUPDATE["enabled"] == "yes") {
        $AUTOUPDATE["enabled"] = 1;
    } else {
        $AUTOUPDATE["enabled"] = 0;
    }
    if ($AUTOUPDATE["samba_notify"] == "yes") {
        $AUTOUPDATE["samba_notify"] = 1;
    } else {
        $AUTOUPDATE["samba_notify"] = 0;
    }
    $form = Field_hidden("EnablePatchUpdates", $EnablePatchUpdates) . Field_hidden("EnableSystemUpdates", $EnableSystemUpdates) . "\n\t\t\t\n\t<div id='ArticaUpdateForm' class='form' style='width:95%'>\n\t\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td style='width:30%' valign=middle><div id='status-versions'></div></td>\n\t\t<td style='width:70%'>\n\t<div class=explain style='font-size:16px'>\n\t\t<div style='margin-bottom:5px;text-align:right;padding-bottom:1px;border-bottom:1px solid #999999;width:97%'>\n\t\t\t<strong style='font-size:22px'>{current} Artica v.{$CURVER} Branch v.{$CUR_BRANCH}</strong>\n\t\t</div>{autoupdate_text}\n\t</div>\n\t</td>\n\t</tr>\n\t</tr>\n\t\t{$action_refresh_index}\n\t</tr>\n\t</table>\n\t<script>LoadAjax('status-versions','{$page}?status-versions=yes');</script>\n\t\n\t<form name='ffm1' >\n\t<table style='width:99%' >\n\t<tr>\n\t\t<td width=1% nowrap align='right' class=legend class=legend style='font-size:16px'>{enable_autoupdate}:</strong></td>\n\t\t<td align='left'>" . Field_checkbox_design('enabled', 1, $AUTOUPDATE["enabled"]) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td width=1% nowrap align='right' class=legend style='font-size:16px'>{enable_autoinstall}:</strong></td>\n\t\t<td align='left'>" . Field_checkbox_design('autoinstall', 1, $AUTOUPDATE["autoinstall"]) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td width=1% nowrap align='right' class=legend style='font-size:16px'>{enable_nightlybuild}:</strong></td>\n\t\t<td align='left'>" . Field_checkbox_design('nightlybuild', 1, $AUTOUPDATE["nightlybuild"]) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td width=1% nowrap align='right' class=legend style='font-size:16px'>{free_update_during_the_day}:</strong></td>\n\t\t<td align='left'>" . Field_checkbox_design('ArticaUpdateIntervalAllways', 1, $ArticaUpdateIntervalAllways) . "</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td width=1% nowrap align='right' class=legend style='font-size:16px'>{EnableNightlyInFrontEnd}:</strong></td>\n\t\t<td align='left'>" . Field_checkbox_design('EnableNightlyInFrontEnd', 1, $EnableNightlyInFrontEnd) . "</td>\n\t</tr>\n\n\t<tr>\n\t\t<td width=1% nowrap align='right' class=legend style='font-size:16px'>{front_page_notify}:</strong></td>\n\t\t<td align='left'>" . Field_checkbox_design('front_page_notify', 1, $AUTOUPDATE["front_page_notify"]) . "</td>\n\t</tr>";
    if ($users->SAMBA_INSTALLED) {
        $form = $form . "<td width=1% nowrap align='right' class=legend style='font-size:16px'>{samba_notify}:</strong></td>\n\t<td align='left'>" . Field_checkbox_design('samba_notify', 1, $AUTOUPDATE["samba_notify"]) . "</td>\n\t</tr>";
    }
    $form = $form . "\n\t<tr><td colspan=2>&nbsp;</td></tr>\n\t<tr>\n\t\t<td width=1% nowrap align='right' class=legend style='font-size:16px'>{DisableInstantLDAPBackup}:</strong></td>\n\t\t<td align='left'>" . Field_checkbox_design('DisableInstantLDAPBackup', 1, $DisableInstantLDAPBackup) . "</td>\n\t</tr>\t\n\t\n\t";
    $ip = new networking();
    while (list($eth, $cip) = each($ip->array_TCP)) {
        if ($cip == null) {
            continue;
        }
        $arrcp[$cip] = $cip;
    }
    $arrcp[null] = "{default}";
    $WgetBindIpAddress = $sock->GET_INFO("WgetBindIpAddress");
    $CurlBandwith = $sock->GET_INFO("CurlBandwith");
    $CurlTimeOut = $sock->GET_INFO("CurlTimeOut");
    if (!is_numeric($CurlBandwith)) {
        $CurlBandwith = 0;
    }
    if (!is_numeric($CurlTimeOut)) {
        $CurlTimeOut = 3600;
    }
    if ($CurlTimeOut < 720) {
        $CurlTimeOut = 3600;
    }
    $NoCheckSquid = $sock->GET_INFO("NoCheckSquid");
    if (!is_numeric($NoCheckSquid)) {
        $NoCheckSquid = 0;
    }
    $WgetBindIpAddress = Field_array_Hash($arrcp, "WgetBindIpAddress", $WgetBindIpAddress, null, null, 0, "font-size:16px;padding:3px;");
    $RebootAfterArticaUpgrade = $sock->GET_INFO("RebootAfterArticaUpgrade");
    if (!is_numeric($RebootAfterArticaUpgrade)) {
        $RebootAfterArticaUpgrade = 0;
    }
    $form = $form . "\n\t<tr>\n\t<td width=1% nowrap align='right' class=legend style='font-size:16px'>{WgetBindIpAddress}:</strong></td>\n\t<td align='left'>{$WgetBindIpAddress}</td>\n\t</tr>\t\t\t\n\t<tr>\n\t<td width=1% nowrap align='right' class=legend style='font-size:16px'>{CheckEveryMinutes}:</strong></td>\n\t<td align='left'>" . Field_text('CheckEveryMinutes', $AUTOUPDATE["CheckEveryMinutes"], 'font-size:16px;padding:3px;width:90px') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td width=1% nowrap align='right' class=legend style='font-size:16px'>{NoCheckSquid}:</strong></td>\n\t\t<td align='left'>" . Field_checkbox_design('NoCheckSquid', 1, $NoCheckSquid) . "&nbsp;</td>\n\t</tr>\n\t<tr>\n\t\t<td width=1% nowrap align='right' class=legend style='font-size:16px'>{HTTP_TIMEOUT}:</strong></td>\n\t\t<td align='left' style='font-size:16px'>" . Field_text('CurlTimeOut', $CurlTimeOut, 'font-size:16px;padding:3px;width:90px') . "&nbsp;{seconds}</td>\n\t</tr>\t\n\t<tr>\n\t\t<td width=1% nowrap align='right' class=legend style='font-size:16px'>{limit_bandwidth}:</strong></td>\n\t\t<td align='left' style='font-size:16px'>" . Field_text('CurlBandwith', $CurlBandwith, 'font-size:16px;padding:3px;width:90px') . "&nbsp;kb/s</td>\n\t</tr>\t\t\t\t\t\t\t\t\t\t\n\t<tr>\n\t\t<td width=1% nowrap align='right' class=legend style='font-size:16px'>{EnableScheduleUpdates}:</strong></td>\n\t\t<td align='left'>" . Field_checkbox_design('EnableScheduleUpdates', 1, $EnableScheduleUpdates, "CheckSchedules()") . "&nbsp;\n\t\t<a href=\"javascript:blur()\" OnClick=\"javascript:Loadjs('cron.php?field=ArticaScheduleUpdates&function2=SaveArticaUpdateForm')\" style='font-size:16px;text-decoration:underline;color:black' id='scheduleAID'>{schedule}</a>\n\t</td>\n\t<tr>\n\t\t<td width=1% nowrap align='right' class=legend style='font-size:16px'>{RebootAfterArticaUpgrade}:</strong></td>\n\t\t<td align='left'>" . Field_checkbox_design('RebootAfterArticaUpgrade', 1, $RebootAfterArticaUpgrade, "RebootAfterArticaUpgradeCheck()") . "&nbsp;\n\t</tr>\t\n\t\n\t\n\t\n\t</tr>\t\n\n\t<tr>\n\t<td width=1% align='right' class=legend  style='font-size:16px;vertical-align:top' nowrap>{uri}:</strong></td>\n\t<td align='left'>\n\t\t\t" . Field_text('uri', $AUTOUPDATE["uri"], 'font-size:16px;padding:3px;width:390px') . "\n\t\t\t\n\t</td>\n\t</tr>\t\n\t<tr>\n\t<td colspan=2 align='right'>\n\t<hr>\n\t" . button("{apply}", "SaveArticaUpdateForm()", 28) . "\n\t</tr>\t\t\t\n\t</table>\n\t</form>\n\t</div>\n\t<input type='hidden' id='ArticaScheduleUpdates' value='{$ArticaScheduleUpdates}'>\n\t<script>\n\t\tfunction CheckSchedules(){\n\t\t\tdocument.getElementById('CheckEveryMinutes').disabled=true;\n\t\t\tif(!document.getElementById('EnableScheduleUpdates').checked){\n\t\t\t\tdocument.getElementById('CheckEveryMinutes').disabled=false;\n\t\t\t\tdocument.getElementById('scheduleAID').style.color='#CCCCCC';\n\t\t\t}else{\n\t\t\t\tdocument.getElementById('scheduleAID').style.color='black';\n\t\t\t}\n\t\t\n\t\t}\n\t\n\t\n\n\t\n\t\n\tCheckSchedules();\n\t\n\t\nvar x_SaveArticaUpdateForm= function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif(results.length>0){alert(results);}\n\t\t\tRefreshTab('main_config_artica_update');\n\t\t\t}\n\n\t\t\t\n\tfunction RebootAfterArticaUpgradeCheck(){\n\t\tvar XHR = new XHRConnection();\n\t\tif(document.getElementById('RebootAfterArticaUpgrade').checked){XHR.appendData('RebootAfterArticaUpgrade','1');}else{XHR.appendData('RebootAfterArticaUpgrade','0');}\n\t\tXHR.sendAndLoad('{$page}', 'POST');\n\t}\n\t\n\t\n\tfunction SaveArticaUpdateForm(){\n\t\tvar XHR = new XHRConnection();\n\t\t\n\t\tif(document.getElementById('enabled')){\n\t\t\tif(document.getElementById('enabled').checked){XHR.appendData('enabled','yes');}else{XHR.appendData('enabled','no');}\n\t\t}\n\t\t\n\t\tif(document.getElementById('autoinstall')){\n\t\t\tif(document.getElementById('autoinstall').checked){XHR.appendData('autoinstall','yes');}else{XHR.appendData('autoinstall','no');}\n\t\t}\n\t\t\n\t\tif(document.getElementById('nightlybuild')){\n\t\t\tif(document.getElementById('nightlybuild').checked){\n\t\t\t\tXHR.appendData('nightlybuild','yes');}else{XHR.appendData('nightlybuild','no');}\n\t\t}\t\t\n\t\t\n\t\tif(document.getElementById('front_page_notify')){\n\t\t\tif(document.getElementById('front_page_notify').checked){XHR.appendData('front_page_notify','yes');}else{XHR.appendData('front_page_notify','no');}\n\t\t}\n\t\t\n\t\tif(document.getElementById('EnableNightlyInFrontEnd')){\n\t\t\tif(document.getElementById('EnableNightlyInFrontEnd').checked){XHR.appendData('EnableNightlyInFrontEnd','1');}else{XHR.appendData('EnableNightlyInFrontEnd','0');}\n\t\t}\n\t\t\n\t\tif(document.getElementById('ArticaUpdateIntervalAllways')){\n\t\t\tif(document.getElementById('ArticaUpdateIntervalAllways').checked){XHR.appendData('ArticaUpdateIntervalAllways','1');}else{XHR.appendData('ArticaUpdateIntervalAllways','0');}\n\t\t}\t\t\n\t\t\n\t\t\n\t\tif(document.getElementById('EnablePatchUpdates')){\n\t\t\tif(document.getElementById('EnablePatchUpdates').checked){XHR.appendData('EnablePatchUpdates','1');}else{XHR.appendData('EnablePatchUpdates','0');}\n\t\t}\n\t\tif(document.getElementById('EnableSystemUpdates')){\n\t\t\tif(document.getElementById('EnableSystemUpdates').checked){\n\t\t\tXHR.appendData('EnableSystemUpdates','1');\n\t\t\t\t}else{\n\t\t\tXHR.appendData('EnableSystemUpdates','0');\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t\n\t\tif(document.getElementById('EnableScheduleUpdates')){\n\t\t\tif(document.getElementById('EnableScheduleUpdates').checked){\n\t\t\t\tvar ArticaScheduleUpdates=document.getElementById('ArticaScheduleUpdates').value;\n\t\t\t\tif(ArticaScheduleUpdates.length==0){\n\t\t\t\t\talert('{$cannot_schedule_update_without_schedule}');\n\t\t\t\t}\n\t\t\t\tXHR.appendData('EnableScheduleUpdates','1');}\n\t\t\telse{XHR.appendData('EnableScheduleUpdates','0');}\n\t\t}\n\t\t\n\t\tif(document.getElementById('samba_notify')){if(document.getElementById('samba_notify').checked){XHR.appendData('samba_notify','yes');}else{XHR.appendData('samba_notify','no');}}\n\t\t\n\t\t\n\t\n\t\tif(document.getElementById('DisableInstantLDAPBackup')){\n\t\t\tif(document.getElementById('DisableInstantLDAPBackup').checked){XHR.appendData('DisableInstantLDAPBackup','1');}else{XHR.appendData('DisableInstantLDAPBackup','0');}\n\t\t}\n\t\t\n\t\tif(document.getElementById('ArticaScheduleUpdates')){\n\t\t\tXHR.appendData('ArticaScheduleUpdates',document.getElementById('ArticaScheduleUpdates').value);\n\t\t}\t\t\t\n\t\tif(document.getElementById('WgetBindIpAddress')){\n\t\t\tXHR.appendData('WgetBindIpAddress',document.getElementById('WgetBindIpAddress').value);\n\t\t}\n\t\tif(document.getElementById('CheckEveryMinutes')){\n    \t\tXHR.appendData('CheckEveryMinutes',document.getElementById('CheckEveryMinutes').value);\n    \t}\n    \tif(document.getElementById('uri')){\n    \t\tXHR.appendData('uri',document.getElementById('uri').value);\n    \t}\n\t\tif(document.getElementById('CurlBandwith')){\n    \t\tXHR.appendData('CurlBandwith',document.getElementById('CurlBandwith').value);\n    \t}\n\t\tif(document.getElementById('CurlTimeOut')){\n    \t\tXHR.appendData('CurlTimeOut',document.getElementById('CurlTimeOut').value);\n    \t}  \n\n    \tif(document.getElementById('NoCheckSquid')){\n    \t\tif(document.getElementById('NoCheckSquid').checked){XHR.appendData('NoCheckSquid','1');}else{XHR.appendData('NoCheckSquid','0');}\n    \t}\n    \t\n    \t\n    \tAnimateDiv('ArticaUpdateForm');\n    \tXHR.sendAndLoad('{$page}', 'GET',x_SaveArticaUpdateForm);\n\t\t}\t\n\t\n\t</script>\n\t";
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($html . $form);
}
开发者ID:articatech,项目名称:artica,代码行数:101,代码来源:artica.update.php

示例10: rule_popup


//.........这里部分代码省略.........

	}





	$AllSystems=$tpl->javascript_parse_text("{AllSystems}");
	$AllPorts=$tpl->javascript_parse_text("{AllPorts}");

	if($source_group==0){
	$inbound_object=$AllSystems;
	}
	if($dest_group==0){
	$outbound_object=$AllSystems;
	}

	if($destport_group==0){
	$destports_object=$AllPorts;
	}

	if(!is_numeric($ligne["zOrder"])){$ligne["zOrder"]=1;}
	if(!is_numeric($ligne["masquerade"])){$ligne["masquerade"]=1;}
	$jsGroup1="squid.BrowseAclGroups.php?callback=LinkInBoundGroup$t&FilterType=FW-IN";
	$jsGroup2="squid.BrowseAclGroups.php?callback=LinkOutbBoundGroup$t&FilterType=FW-OUT";
	$jsGroup3="squid.BrowseAclGroups.php?callback=LinkPortGroup$t&FilterType=FW-PORT";

	$sDel1=imgtootltip("22-delete.png","{unlink}","Delgroup1$t()");
	$sDel2=imgtootltip("22-delete.png","{unlink}","Delgroup2$t()");
	$sDel3=imgtootltip("22-delete.png","{unlink}","Delgroup3$t()");

	$html="
	<div style='width:98%' class=form>
	". Field_hidden("source_group-$t", $ligne["source_group"])."
	". Field_hidden("dest_group-$t", $ligne["dest_group"])."
	". Field_hidden("destport_group-$t", $ligne["destport_group"])."
	<div style='font-size:26px;margin-bottom:25px;margin-top:10px;margin-left:5px'>[$table] $title</div>

	<table style='width:100%'>
	<tr>
	<td class=legend style='font-size:22px' nowrap>{rulename}:</td>
	<td>". Field_text("rulename-$t",$rulename,"font-size:22px;width:450px")."</td>
		<td width=1%>&nbsp;</td>
	</tr>
	<tr>
		<td class=legend style='font-size:22px' nowrap>{order}:</td>
		<td>". Field_text("zOrder-$t",$ligne["zOrder"],"font-size:22px;width:90px")."</td>
		<td width=1%>&nbsp;</td>
	</tr>
	<tr>
		<td class=legend style='font-size:22px' nowrap>{enabled}:</td>
		<td>". Field_checkbox("enabled-$t", 1,$enabled)."</td>
		<td width=1%>&nbsp;</td>
	</tr>
		<tr>
		<td class=legend style='font-size:22px' nowrap><span id='OverideNet-label-$t'>{OverideNet}:</span></td>
		<td><span id='OverideNet-field-$t'>". Field_checkbox("OverideNet-$t", 1,$ligne["OverideNet"])."</span></td>
		<td width=1%><span id='OverideNet-explain-$t'>". help_icon("{OverideNet_explain}")."</span></td>
	</tr>
	<tr>
		<td class=legend style='font-size:22px' nowrap>{log_all_events}:</td>
		<td>". Field_checkbox("jlog-$t", 1,$jlog)."</td>
		<td width=1%>&nbsp;</td>
	</tr>
	<tr>
	<td class=legend style='font-size:22px' nowrap>{protocol}:</td>
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:67,代码来源:system.firewall.php

示例11: add_new_disk_popup

function add_new_disk_popup()
{
    $t = $_GET["t"];
    $page = CurrentPageName();
    $squid = new squidbee();
    $tpl = new templates();
    $sock = new sockets();
    $caches_types[null] = '{select}';
    $caches_types["aufs"] = "aufs";
    $caches_types["diskd"] = "diskd";
    unset($caches_types["rock"]);
    $type = $tpl->_ENGINE_parse_body(Field_array_Hash($caches_types, "cache_type-{$t}", "aufs", "CheckCachesTypes()", null, 0, "font-size:16px;padding:3px"));
    $WARN_OPE_RESTART_SQUID_ASK = $tpl->javascript_parse_text("{WARN_OPE_RESTART_SQUID_ASK}");
    $currentsize = Calculate_maxcachessize();
    $maxCacheSizeInt = 250 * 1000 - $currentsize;
    $maxCacheSize = 50;
    $DefaultmaxCacheSize = round($maxCacheSize / 4, 1);
    $NextCache = count($squid->cache_list) + 1;
    $defaultCachedir = "/home/squid/cache/squid0{$NextCache}";
    $cachedirtext = "\n\t\t<tr>\n\t\t<td class=legend style='font-size:16px' nowrap>{directory}:</td>\n\t\t<td>" . Field_text("cache_directory-{$t}", $defaultCachedir, "width:270px;font-size:16px;padding:3px") . "</td>\n\t\t<td></td>\n\t\t</tr>";
    $btname = "{add}";
    $SliderDef = 10;
    $cache_dir_level1_def = 16;
    $LockOthers = 0;
    if (isset($_GET["chdef"])) {
        $cachedirtext = "<tr>\n\t\t<td class=legend style='font-size:16px' nowrap>{directory}:</td>\n\t\t<td><strong style='font-size:14px'>{$squid->CACHE_PATH}</strong>" . Field_hidden("cache_directory-{$t}", $squid->CACHE_PATH) . "</td>\n\t\t<td>&nbsp;</td>\n\t\t</tr>";
        $btname = "{apply}";
        $type = $tpl->_ENGINE_parse_body(Field_array_Hash($caches_types, "cache_type-{$t}", $squid->CACHE_TYPE, "CheckCachesTypes()", null, 0, "font-size:16px;padding:3px"));
        $SliderDef = round($squid->CACHE_SIZE / 1000);
        $DefaultmaxCacheSize = $squid->CACHE_SIZE / 1000;
        $XHRADD = "XHR.appendData('DEFAULT_CACHE_SAVE_TRUE','OK');";
        $LockOthers = 1;
    }
    $html = "\t<div id='waitcache-{$t}'></div>\n\t<input type='hidden' name='squid-cache-size-{$t}' id='squid-cache-size-{$t}' value='10'>\n\t<table style='width:99%' class=form>\n\t\t{$cachedirtext}\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:16px' nowrap>{type}:</td>\n\t\t\t<td>{$type}</td>\n\t\t\t<td>&nbsp;</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' nowrap>{cache_size}:</td>\n\t\t\t<td style='font-size:16px'><div id='slider{$t}'></div></td>\n\t\t\t<td>&nbsp;<strong style='font-size:16px' id='{$t}-value'>{$DefaultmaxCacheSize}G/{$maxCacheSize}G</strong><input type='hidden' id='{$t}-mem' value='{$SquidBoosterMem}'></td>\n\t\t\t<td>" . help_icon('{cache_size_text}', false, 'squid.index.php') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td colspan=4><strong>{warn_calculate_nothdsize}</strong></td>\t\t\n\n\t\t<tr>\n\t\t\t<td class=legend nowrap style='font-size:16px'>{cache_dir_level1}:</td>\n\t\t\t<td>" . Field_text("cache_dir_level1-{$t}", 16, 'width:50px;font-size:16px;padding:3px') . "</td>\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>" . help_icon('{cache_dir_level1_text}', false, 'squid.index.php') . "</td>\n\t\t</tr>\t\t\t\n\t\t<tr>\n\t\t\t<td class=legend nowrap style='font-size:16px'>{cache_dir_level2}:</td>\n\t\t\t<td>" . Field_text("cache_dir_level2-{$t}", 256, 'width:50px;font-size:16px;padding:3px') . "</td>\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>" . help_icon('{cache_dir_level2_text}', false, 'squid.index.php') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend nowrap style='font-size:16px'>{max_objects_size}:</td>\n\t\t\t<td  style='font-size:16px'>" . Field_text("cache_maxsize-{$t}", $s->cache_list[$cache]["cache_maxsize"], 'width:50px;font-size:16px;padding:3px', null, "calculateSize()", null, false, null) . "&nbsp;Mbytes&nbsp;<span id='squid-maxsize-vals'></span></td>\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>" . help_icon('{squid_rock_maxsize}', false, 'squid.index.php') . "</td>\n\t\t</tr>\n\t\t\n\t\t<tr>\n\t\t<td align='right' colspan=4><hr>" . button($btname, "AddNewCacheSave{$t}()", 14) . "</td>\n\t\t</tr>\n\t</table>\n\t\n<script>\n\t\t\$(document).ready(function(){\n\t\t\t\$('#slider{$t}').slider({ max: {$maxCacheSize},step:2,value:{$SliderDef},slide: function(e, ui) {ChangeSlideField{$t}(ui.value)},change: function(e, ui) {ChangeSlideField{$t}(ui.value);} });\n\t\t});\n\t\t\n\t\tfunction ChangeSlideField{$t}(val){\n\t\t\tvar disabled='';\n\t\t\tif(val==0){disabled='&nbsp;{$disabled}';}\n\t\t\tdocument.getElementById('{$t}-value').innerHTML=val+'G/{$maxCacheSize}G'+disabled;\n\t\t\tdocument.getElementById('squid-cache-size-{$t}').value=val;\n\t\t}\t\t\n\n\n\t\tfunction CheckCachesTypes(){\n\t\t\tcachetypes=document.getElementById('cache_type-{$t}').value;\n\t\t\tvar LockOthers={$LockOthers};\n\t\t\tif(LockOthers==1){\n\t\t\t\tdocument.getElementById('cache_dir_level2-{$t}').disabled=true;\n\t\t\t\tdocument.getElementById('cache_dir_level1-{$t}').disabled=true;\n\t\t\t\tdocument.getElementById('cache_maxsize-{$t}').disabled=true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\tvar x_AddNewCacheSave{$t}= function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif(results.length>0){\n\t\t\t\talert(results);\n\t\t\t\tdocument.getElementById('waitcache').innerHTML='';\n\t\t\t\t}\n\t\t\tYahooWin3Hide();\n\t\t\t\$('flexRT{$t}').flexReload();\n\t\t\tRefreshTab('squid_main_caches_new');\n\t\t}\t\t\n\t\n\tfunction AddNewCacheSave{$t}(){\n\t\t\n\t\t\tvar XHR = new XHRConnection();\n\t\t\t{$XHRADD}\n\t\t\tXHR.appendData('cache_directory',document.getElementById('cache_directory-{$t}').value);\n\t\t\tXHR.appendData('cache_type',document.getElementById('cache_type-{$t}').value);\n\t\t\tXHR.appendData('size',document.getElementById('squid-cache-size-{$t}').value);\n\t\t\tXHR.appendData('cache_dir_level1',document.getElementById('cache_dir_level1-{$t}').value);\n\t\t\tXHR.appendData('cache_dir_level2',document.getElementById('cache_dir_level2-{$t}').value);\n\t\t\tXHR.appendData('cache_maxsize',document.getElementById('cache_maxsize-{$t}').value);\n\t\t\tAnimateDiv('waitcache-{$t}');\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_AddNewCacheSave{$t});\n\t\t\t\n\t\t}\t\t\n\t\tCheckCachesTypes();\n</script>";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:36,代码来源:squid.cache-central.php

示例12: connection_popup

function connection_popup()
{
    $ID = $_GET["connection-id"];
    $tpl = new templates();
    $q = new mysql();
    $page = CurrentPageName();
    $bt_title = "{add}";
    if ($ID == 0) {
        $title = $tpl->javascript_parse_text("{new_connection}");
    }
    if ($ID != null) {
        $bt_title = "{apply}";
        $q = new mysql();
        $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM texttoldap WHERE ID='{$ID}'", "artica_backup"));
    }
    $t = time();
    $ldap_group_text = "-";
    if ($ligne["ldapgroup"] > 0) {
        $gp = new groups($ligne["ldapgroup"]);
        $ldap_group_text = $gp->groupName;
    }
    $html = "\n\t<div style='font-size:20px'>{$title}</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:16px'>{connection}:</td>\n\t\t<td>" . Field_text("connection-{$t}", $ligne["connection"], "font-size:16px;width:300px") . "</td>\n\t</tr>\t\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{hostname}:</td>\n\t\t<td>" . Field_text("hostname-{$t}", $ligne["hostname"], "font-size:16px;width:250px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{shared_folder}:</td>\n\t\t<td>" . Field_text("folder-{$t}", $ligne["folder"], "font-size:16px;width:250px") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{filename}:</td>\n\t\t<td>" . Field_text("filename-{$t}", $ligne["filename"], "font-size:16px;width:250px") . "</td>\n\t</tr>\t\t\t\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{username}:</td>\n\t\t<td>" . Field_text("username-{$t}", $ligne["username"], "font-size:16px;width:250px") . "</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{password}:</td>\n\t\t<td>" . Field_password("password-{$t}", $ligne["password"], "font-size:16px;width:250px") . "</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{default_ldap_group}:</td>\n\t\t<td>" . Field_hidden("ldapgroup-{$t}", $ligne["ldapgroup"]) . "<span id='group-text-{$t}' style='font-size:16px;'>{$ldap_group_text}</span>&nbsp;&nbsp;&nbsp;" . button_browse_ldap_group("ChooseGroup{$t}") . "</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td colspan=2 align='right'>" . button($bt_title, "Save{$t}()", 18) . "</td>\n\t</tr>\n\t</table>\n<script>\n\tvar xSave{$t}= function (obj) {\n\t\tvar res=obj.responseText;\n\t\tif (res.length>3){alert(res);}\n\t\tvar ID='{$ID}';\n\t\t\$('#flexRT{$_GET["t"]}').flexReload();\n\t\t\$('#flexRT{$_GET["tt"]}').flexReload();\n\t\tExecuteByClassName('SearchFunction');\n\t\tif(ID.length==0){YahooWin2Hide();}\n\t}\n\t\n\tfunction SaveCHK{$t}(e){\n\t\tif(!checkEnter(e)){return;}\n\t\tSave{$t}();\n\t}\n\t\n\tfunction ChooseGroup{$t}(num,groupname){\n\t\tdocument.getElementById('group-text-{$t}').innerHTML=groupname;\n\t\tdocument.getElementById('ldapgroup-{$t}').value=num;\n\t}\n\t\n\t\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('connection-id',  '{$ID}');\n\tXHR.appendData('connection',  encodeURIComponent(document.getElementById('connection-{$t}').value));\n\tXHR.appendData('hostname',  encodeURIComponent(document.getElementById('hostname-{$t}').value));\n\tXHR.appendData('folder',  encodeURIComponent(document.getElementById('folder-{$t}').value));\n\tXHR.appendData('filename',  encodeURIComponent(document.getElementById('filename-{$t}').value));\n\tXHR.appendData('username',  encodeURIComponent(document.getElementById('username-{$t}').value));\n\tXHR.appendData('password',  encodeURIComponent(document.getElementById('password-{$t}').value));\n\tXHR.appendData('ldapgroup',  encodeURIComponent(document.getElementById('ldapgroup-{$t}').value));\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n\t</script>\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:24,代码来源:csvToLdap.php

示例13: AddCachedSitelist_popup

function AddCachedSitelist_popup()
{
    if (!$_SESSION["CORP"]) {
        $tpl = new templates();
        $onlycorpavailable = $tpl->_ENGINE_parse_body("{onlycorpavailable}");
        $content = "<p class=text-error>{$onlycorpavailable}</p>";
        echo $content;
        return;
    }
    $page = CurrentPageName();
    $t = $_GET["t"];
    $option[null] = "---------";
    $option["override-lastmod"] = "override-lastmod";
    $option["override-expire"] = "override-expire";
    $option["reload-into-ims"] = "reload-into-ims";
    $option["override-expire ignore-no-cache ignore-no-store ignore-private"] = "{ignore_all}";
    $option["ignore-reload"] = "ignore-reload";
    $option["reload-into-ims ignore-no-cache"] = "reload-into-ims+ignore-no-cache";
    $button = "{add}";
    if (!is_numeric($_GET["id"])) {
        $_GET["id"] = 0;
    }
    if ($_GET["id"] > 0) {
        $sql = "SELECT * FROM squid_speed WHERE ID={$_GET["id"]}";
        $q = new mysql();
        $ligne = @mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
        $domain = $ligne["domain"];
        $pourc = $ligne["refresh_pattern_perc"];
        $refresh_pattern_min = $ligne["refresh_pattern_min"];
        $refresh_pattern_max = $ligne["refresh_pattern_max"];
        $refresh_pattern_option = $ligne["refresh_pattern_options"];
        $button = "{apply}";
    }
    $refresh_pattern_opt = Field_array_Hash($option, "refresh_pattern_option-{$t}", $refresh_pattern_option, null, null, 0, "font-size:22px;padding:3px");
    $html = "\n\t<div id='AddCachedSitelistDiv-{$t}'></div>\n\t<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>\n\t\n\t" . Field_hidden("id", "{$_GET["id"]}") . "\n\t<div style='font-size:18px;padding:5px' class=explain>{squid_refresh_pattern_explain}</div>\n\t<table style='width:99%'>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{pattern}", "{refresh_pattern_site}") . ":</td>\n\t\t<td style='font-size:22px'>" . Field_text("refresh_pattern_site-{$t}", $domain, 'font-size:22px;padding:3px;width:640px', null, null, null, false, "AddCachedSiteListCheckEnter(event)") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{minimal_time}", "{refresh_pattern_min}") . ":</td>\n\t\t<td style='font-size:18px'>" . Field_text("refresh_pattern_min-{$t}", $refresh_pattern_min, 'width:110px;font-size:22px;padding:3px', null, null, null, false, "AddCachedSiteListCheckEnter(event)") . "&nbsp;Mn</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{percentage}", "{refresh_pattern_pourc}") . ":</td>\n\t\t<td style='font-size:18px'>" . Field_text("refresh_pattern_pourc-{$t}", $pourc, 'width:110px;font-size:22px;padding:3px', null, null, null, false, "AddCachedSiteListCheckEnter(event)") . "&nbsp;%</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{maximal_time}", "{refresh_pattern_max}") . ":</td>\n\t\t<td style='font-size:18px'>" . Field_text("refresh_pattern_max-{$t}", $refresh_pattern_max, 'width:110px;font-size:22px;padding:3px', null, null, null, false, "AddCachedSiteListCheckEnter(event)") . "&nbsp;Mn</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{option}", "{refresh_pattern_option}") . ":</td>\n\t\t<td style='font-size:18px'>{$refresh_pattern_opt}</td>\n\t</tr>\t\n\t<tr>\n\t\t<td colspan=3 align='right'><hr>\n\t\t\t" . button($button, "AddCachedSitelistSave{$t}()", 32) . "</td>\n\t</tr>\n\t</table>\t\t\n\t\n\t</td>\n\t</tr>\n\t</table>\n\t\n\t<center style='margin-top:10px'>\n\t<div style='width:98%' class=form>\n\t<center><img src='img/refresh_pattern_graph.gif' style='border:3px solid #CCCCCC'></center>\n\t</div>\n\t</div>\n\t</center>\n\t\n\t<script>\n\t\tvar x_AddCachedSitelistSave{$t}= function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tdocument.getElementById('AddCachedSitelistDiv-{$t}').innerHTML='';\n\t\t\tif(results.length>0){alert(results);}\n\t\t\tif(document.getElementById('flexRT{$_GET["t"]}')){\n\t\t\t\t\$('#flexRT{$_GET["t"]}').flexReload();\t\n\t\t\t\t\n\t\t\t}\n\t\t\tExecuteByClassName('SearchFunction');\t\n\t\t\tYahooWin3Hide();\n\t\t}\t\t\t\n\t\t\n\t\tfunction AddCachedSitelistSave{$t}(){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('id','{$_GET["id"]}');\n\t\t\tvar pp=encodeURIComponent(document.getElementById('refresh_pattern_site-{$t}').value);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tXHR.appendData('refresh_pattern_site',pp);\n\t\t\tXHR.appendData('refresh_pattern_min',document.getElementById('refresh_pattern_min-{$t}').value);\n\t\t\tXHR.appendData('refresh_pattern_pourc',document.getElementById('refresh_pattern_pourc-{$t}').value);\n\t\t\tXHR.appendData('refresh_pattern_max',document.getElementById('refresh_pattern_max-{$t}').value);\n\t\t\tXHR.appendData('refresh_pattern_option',document.getElementById('refresh_pattern_option-{$t}').value);\n\t\t\tAnimateDiv('AddCachedSitelistDiv-{$t}');\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_AddCachedSitelistSave{$t});\t\t\t\n\t\t\n\t\t}\n\t\t\n\n\t\t\n\t\tfunction AddCachedSiteListCheckEnter(e){\n\t\t\tif(checkEnter(e)){AddCachedSitelistSave{$t}();}\n\t\t}\n\t</script>\t\n\t\n\t\n\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:38,代码来源:squid.cached.sitesinfos.php

示例14: add_form

function add_form()
{
    $ldap = new clladp();
    $sock = new sockets();
    $page = CurrentPageName();
    $users = new usersMenus();
    $tpl = new templates();
    $t = $_GET["t"];
    if (!is_numeric($t)) {
        $t = 0;
    }
    $nics = unserialize(base64_decode($sock->getFrameWork("cmd.php?list-nics=yes")));
    $title_button = "{add}";
    if (!is_numeric($_GET["ID"])) {
        $_GET["ID"] = 0;
    }
    if ($_GET["ID"] > 0) {
        $sql = "SELECT * FROM nics_vde WHERE ID='{$_GET["ID"]}'";
        $q = new mysql();
        $ligne = @mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
        $title_button = "{apply}";
    }
    for ($i = 1; $i < 33; $i++) {
        $ports[$i] = $i;
    }
    $vlans[0] = "{none}";
    for ($i = 1; $i < 256; $i++) {
        $vlans[$i] = $i;
    }
    if (isset($_GET["default-datas"])) {
        $default_array = unserialize(base64_decode($_GET["default-datas"]));
        if (is_array($default_array)) {
            $ligne["nic"] = $default_array["NIC"];
            if (preg_match("#(.+?)\\.([0-9]+)\$#", $default_array["IP"], $re)) {
                if ($re[2] > 254) {
                    $re[2] = 1;
                }
                $re[2] = $re[2] + 1;
                $ligne["ipaddr"] = "{$re[1]}.{$re[2]}";
                $ligne["gateway"] = $default_array["GW"];
                $ligne["netmask"] = $default_array["NETMASK"];
            }
        }
    }
    if ($ligne["metric"] == 0) {
        $ligne["metric"] = 100 + $_GET["ID"];
    }
    $styleOfFields = "font-size:16px;padding:3px";
    while (list($num, $val) = each($nics)) {
        if (preg_match("#^virt#", $val)) {
            continue;
        }
        $nics_array[$val] = $val;
    }
    $nics_array[null] = "{select}";
    if (!is_numeric($ligne["port"])) {
        $ligne["port"] = 1;
    }
    $nic_field = Field_array_Hash($nics_array, "nic-{$t}", $ligne["nic"], null, null, 0, "font-size:16px;padding:3px");
    $port_field = Field_array_Hash($ports, "port-{$t}", $ligne["port"], null, null, 0, "font-size:16px;padding:3px");
    $vlan_field = Field_array_Hash($vlans, "vlan-{$t}", $ligne["vlan"], null, null, 0, "font-size:16px;padding:3px");
    $html = "\n<div id='animate-{$t}'></div>\n<div id='virtip'>" . Field_hidden("ID", "{$_GET["ID"]}") . "\n<div style='width:98%' class=form>\n<table style='width:99%'>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{nic}:</td>\n\t\t<td>{$nic_field}</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{vlan_id}:</td>\n\t\t<td>{$vlan_field}</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{switch_port}:</td>\n\t\t<td>{$port_field}</td>\n\t</tr>\t\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{tcp_address}:</td>\n\t\t<td>" . field_ipv4("ipaddr-{$t}", $ligne["ipaddr"], $styleOfFields, false, "CalcCdirVirt{$t}(0)") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{netmask}:</td>\n\t\t<td>" . field_ipv4("netmask-{$t}", $ligne["netmask"], $styleOfFields, false, "CalcCdirVirt{$t}(0)") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>CDIR:</td>\n\t\t\t<td style='padding:-1px;margin:-1px'>\n\t\t\t<table style='width:99%;padding:-1px;margin:-1px'>\n\t\t\t<tr>\n\t\t\t<td width=1%>\n\t\t\t" . Field_text("cdir-{$t}", $ligne["cdir"], "{$styleOfFields};width:190px", null, null, null, false, null, $DISABLED) . "</td>\n\t\t\t<td align='left'> " . imgtootltip("img_calc_icon.gif", "cdir", "CalcCdirVirt{$t}(1)") . "</td>\n\t\t\t</tr>\n\t\t\t</table></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:16px'>{gateway}:</td>\n\t\t\t<td>" . field_ipv4("gateway-{$t}", $ligne["gateway"], $styleOfFields, false) . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:16px'>{metric}:</td>\n\t\t\t<td>" . field_text("metric-{$t}", $ligne["metric"], "{$styleOfFields};width:90px", false) . "</td>\n\t\t</tr>\n\t</table>\n\t</div>\n\n\t<div id='infosVirtual' style='font-size:13px'></div>\n\t<div style='text-align:right'><hr>" . button($title_button, "Save{$t}()", 18) . "</div>\n</div>\n<script>\nvar Netid={$_GET["ID"]};\nvar cdir=document.getElementById('cdir-{$t}').value;\nvar netmask=document.getElementById('netmask-{$t}').value;\nif(netmask.length>0){if(cdir.length==0){CalcCdirVirt{$t}(0);}}\n\n\nvar X_CalcCdirVirt{$t}= function (obj) {\n\tvar results=obj.responseText;\n\tdocument.getElementById('cdir-{$t}').value=results;\n}\n\nvar xSave{$t}= function (obj) {\n\tvar results=obj.responseText;\n\tdocument.getElementById('animate-{$t}').innerHTML='';\n\tif(results.length>3){alert(results);return;}\n\t\$('#table-{$t}').flexReload();\n\tYahooWin4Hide();\n\t\n}\n\nfunction CalcCdirVirt{$t}(recheck){\n\tvar cdir=document.getElementById('cdir-{$t}').value;\n\tif(recheck==0){if(cdir.length>0){return;}}\n\tvar XHR = new XHRConnection();\n\tXHR.setLockOff();\n\tXHR.appendData('cdir-ipaddr',document.getElementById('ipaddr-{$t}').value);\n\tXHR.appendData('netmask',document.getElementById('netmask-{$t}').value);\n\tXHR.sendAndLoad('artica.settings.php', 'GET',X_CalcCdirVirt{$t});\n}\t\n\n\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('ipaddr',document.getElementById('ipaddr-{$t}').value);\n\tXHR.appendData('netmask',document.getElementById('netmask-{$t}').value);\n\tXHR.appendData('cdir',document.getElementById('cdir-{$t}').value);\n\tXHR.appendData('metric',document.getElementById('metric-{$t}').value);\n\tXHR.appendData('nic',document.getElementById('nic-{$t}').value);\n\tXHR.appendData('gateway',document.getElementById('gateway-{$t}').value);\n\tXHR.appendData('port',document.getElementById('port-{$t}').value);\n\tXHR.appendData('vlan',document.getElementById('vlan-{$t}').value);\n\tXHR.appendData('ID','{$_GET["ID"]}');\n\tMemFlexGrid={$t};\n\tAnimateDiv('animate-{$t}');\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n</script>\n";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:64,代码来源:system.nic.vde.php

示例15: GROUP_PRIVILEGES


//.........这里部分代码省略.........
            $q = new mysql();
            if (!class_exists("maincf_multi")) {
                include_once dirname(__FILE__) . "/ressources/class.maincf.multi.inc";
            }
            $sql = "SELECT `value`,ip_address FROM postfix_multi WHERE `ou`='{$ou}' AND `key`='myhostname'";
            $results = $q->QUERY_SQL($sql, "artica_backup");
            if (!$q->ok) {
                $VirtualPostfixError = $q->mysql_error;
            }
            $PostfixInstances[null] = "{select}";
            if (mysql_num_rows($results) > 0) {
                while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
                    $main = new maincf_multi($ligne["value"], $ou);
                    $servername = $ligne["value"];
                    $VirtualHostNameToChange = $main->GET("VirtualHostNameToChange");
                    $servernameTEXT = $servername;
                    if ($VirtualHostNameToChange != null) {
                        $servernameTEXT = $VirtualHostNameToChange;
                    }
                    $PostfixInstances[$servername] = $servernameTEXT;
                }
                $VirtualPostfixFieldColor = "#B3B3B3";
                $VirtualPostfixHidden = "<input type='hidden' id='PostfixInstance', value='{$HashPrivieleges["PostfixInstance"]}'><span style='font-size:13.5px'>{$HashPrivieleges["PostfixInstance"]}</span>";
                $VirtualPostfixField = Field_array_Hash($PostfixInstances, "PostfixInstance", $HashPrivieleges["PostfixInstance"], null, null, 0, "font-size:11px");
                $VirtualPostfix = $VirtualPostfixHidden;
            } else {
                $VirtualPostfixError = "{no_instance}:{$ou}";
            }
        } else {
            $VirtualPostfixError = "{feature_disabled}";
        }
    }
    if ($priv->AllowAddUsers == false) {
        $AllowAddUsers = "<img src='img/status_critical.png'>" . Field_hidden('AllowAddUsers', $HashPrivieleges["AllowAddUsers"]);
        $AsDansGuardianGroupRule = "<img src='img/status_critical.png'>" . Field_hidden('AsDansGuardianGroupRule', $HashPrivieleges["AsDansGuardianGroupRule"]);
        $AsMessagingOrg = "<img src='img/status_critical.png'>" . Field_hidden('AsMessagingOrg', $HashPrivieleges["AsMessagingOrg"]);
        $AsOrgAdmin = "<img src='img/status_critical.png'>" . Field_hidden('AsOrgAdmin', $HashPrivieleges["AsOrgAdmin"]);
        $AsJoomlaWebMaster = "<img src='img/status_critical.png'>" . Field_hidden('AsJoomlaWebMaster', $HashPrivieleges["AsJoomlaWebMaster"]);
        $AsVirtualBoxManager = "<img src='img/status_critical.png'>" . Field_hidden('AsVirtualBoxManager', $HashPrivieleges["AsVirtualBoxManager"]);
        $AsComplexPassword = "<img src='img/status_critical.png'>" . Field_hidden('AsComplexPassword', $HashPrivieleges["AsComplexPassword"]);
        $RestrictNabToGroups = "<img src='img/status_critical.png'>" . Field_hidden('RestrictNabToGroups', $HashPrivieleges["RestrictNabToGroups"]);
        $AsWebFilterRepository = "<img src='img/status_critical.png'>" . Field_hidden('AsWebFilterRepository', $HashPrivieleges["AsWebFilterRepository"]);
        $AsWebStatisticsAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsWebStatisticsAdministrator', $HashPrivieleges["AsWebStatisticsAdministrator"]);
    }
    if ($priv->AsArticaAdministrator == false) {
        $AsArticaAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsArticaAdministrator', $HashPrivieleges["AsArticaAdministrator"]);
        $AsSambaAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsSambaAdministrator', $HashPrivieleges["AsSambaAdministrator"]);
        $AsDnsAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsDnsAdministrator', $HashPrivieleges["AsDnsAdministrator"]);
        $AsQuarantineAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsQuarantineAdministrator', $HashPrivieleges["AsQuarantineAdministrator"]);
        $AsOrgStorageAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsOrgStorageAdministrator', $HashPrivieleges["AsOrgStorageAdministrator"]);
        $AsOrgPostfixAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsOrgPostfixAdministrator', $HashPrivieleges["AsOrgPostfixAdministrator"]);
        $AsDansGuardianGroupRule = "<img src='img/status_critical.png'>" . Field_hidden('AsDansGuardianGroupRule', $HashPrivieleges["AsDansGuardianGroupRule"]);
        $AsMessagingOrg = "<img src='img/status_critical.png'>" . Field_hidden('AsMessagingOrg', $HashPrivieleges["AsMessagingOrg"]);
        $AsOrgAdmin = "<img src='img/status_critical.png'>" . Field_hidden('AsOrgAdmin', $HashPrivieleges["AsOrgAdmin"]);
        $AsInventoryAdmin = "<img src='img/status_critical.png'>" . Field_hidden('AsInventoryAdmin', $HashPrivieleges["AsInventoryAdmin"]);
        $AsVirtualBoxManager = "<img src='img/status_critical.png'>" . Field_hidden('AsVirtualBoxManager', $HashPrivieleges["AsVirtualBoxManager"]);
        $OverWriteRestrictedDomains = "<img src='img/status_critical.png'>" . Field_hidden('OverWriteRestrictedDomains', $HashPrivieleges["OverWriteRestrictedDomains"]);
        $AsDansGuardianAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsDansGuardianAdministrator', $HashPrivieleges["AsDansGuardianAdministrator"]);
        $AsWebFilterRepository = "<img src='img/status_critical.png'>" . Field_hidden('AsWebFilterRepository', $HashPrivieleges["AsWebFilterRepository"]);
        $AsWebStatisticsAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsWebStatisticsAdministrator', $HashPrivieleges["AsWebStatisticsAdministrator"]);
        $AsPostfixAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsPostfixAdministrator', $HashPrivieleges["AsPostfixAdministrator"]);
        $AsSquidAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsSquidAdministrator', $HashPrivieleges["AsSquidAdministrator"]);
        $AsMailBoxAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsMailBoxAdministrator', $HashPrivieleges["AsMailBoxAdministrator"]);
        $AllowViewStatistics = "<img src='img/status_critical.png'>" . Field_hidden('AllowViewStatistics', $HashPrivieleges["AllowViewStatistics"]);
        $AllowEditOuSecurity = "<img src='img/status_critical.png'>" . Field_hidden('AllowEditOuSecurity', $HashPrivieleges["AllowEditOuSecurity"]);
        $AsHotSpotManager = "<img src='img/status_critical.png'>" . Field_hidden('AsHotSpotManager', $HashPrivieleges["AsHotSpotManager"]);
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:67,代码来源:domains.edit.group.php


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