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


PHP boostrap_form::set_field方法代码示例

本文整理汇总了PHP中boostrap_form::set_field方法的典型用法代码示例。如果您正苦于以下问题:PHP boostrap_form::set_field方法的具体用法?PHP boostrap_form::set_field怎么用?PHP boostrap_form::set_field使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在boostrap_form的用法示例。


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

示例1: popup

function popup()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $ID = $_GET["ID"];
    $title = "{new_page}";
    $buttonname = "{add}";
    if ($ID > 0) {
        $q = new mysql_squid_builder();
        $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM reverse_pages_content WHERE ID='{$ID}'"));
        $title = $ligne["subject"];
        $buttonname = "{apply}";
    }
    if ($ligne["content"] == null) {
        $ligne["content"] = "<html>\n<head>\n<title>It's works</title>\n</head>\n<body>\n\t<H1>It works!</H1>\n</body>\n</html>";
    }
    $boot = new boostrap_form();
    $boot->set_hidden("ID", $ID);
    $boot->set_formtitle($title);
    if (!is_numeric($ligne["cachemin"])) {
        $ligne["cachemin"] = 5;
    }
    $boot->set_list("cachemin", "{cache}", $ligne["cachemin"], $q->CACHE_AGES);
    $boot->set_field("subject", "{subject}", $ligne["subject"]);
    $boot->set_textarea("content", "{content}", $ligne["content"], array("ENCODE" => true, "HEIGHT" => 350));
    $boot->set_button($buttonname);
    $boot->set_RefreshSearchs();
    if ($ID == 0) {
        $boot->set_CloseYahoo("YahooWin6");
    }
    echo $boot->Compile();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:32,代码来源:miniadmin.crm.pages.php

示例2: etchosts_popup

function etchosts_popup()
{
    $boot = new boostrap_form();
    $sock = new sockets();
    $users = new usersMenus();
    $ldap = new clladp();
    $ID = $_GET["ID"];
    $title_button = "{add_new_entry}";
    $boot->set_field("hostname", "{hostname}", $ligne["name"]);
    $boot->set_field("ipaddr", "{tcp_address}", $ligne["ipaddr"], array("IPV4" => true));
    $boot->set_field("alias", "{alias}", null);
    if (!$users->AsSystemAdministrator) {
        $boot->set_form_locked();
    }
    if ($ID == 0) {
        $boot->set_CloseYahoo("YahooWin2");
    }
    $boot->set_button("{add}");
    $boot->set_RefreshSearchs();
    echo $boot->Compile();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:21,代码来源:miniadm.network.etchosts.php

示例3: virtip_popup

function virtip_popup()
{
    $boot = new boostrap_form();
    $sock = new sockets();
    $users = new usersMenus();
    $ldap = new clladp();
    $ID = $_GET["ID"];
    $title_button = "{add}";
    $nics = unserialize(base64_decode($sock->getFrameWork("cmd.php?list-nics=yes")));
    if ($_GET["ID"] > 0) {
        $sql = "SELECT * FROM nics_virtuals WHERE ID='{$ID}'";
        $q = new mysql();
        $ligne = @mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
        $title_button = "{apply}";
    }
    $ous = $ldap->hash_get_ou(true);
    $ous["openvpn_service"] = "{APP_OPENVPN}";
    while (list($num, $val) = each($nics)) {
        $nics_array[$val] = $val;
    }
    $nics_array[null] = "{select}";
    $ous[null] = "{select}";
    $boot->set_list("nic", "{nic}", $nics_array, $ligne["nic"]);
    $boot->set_list("org", "{organization}", $ous, $ligne["org"]);
    $boot->set_field("ipaddr", "{tcp_address}", $ligne["ipaddr"], array("IPV4" => true));
    $boot->set_field("netmask", "{netmask}", $ligne["netmask"], array("IPV4" => true));
    $boot->set_field("cdir", "CDIR", $ligne["cdir"], array("CDIR" => "ipaddr,netmask"));
    $boot->set_field("gateway", "{gateway}", $ligne["gateway"], array("IPV4" => true));
    $boot->set_field("metric", "{metric}", $ligne["metric"]);
    $boot->set_hidden("ID", $_GET["ID"]);
    $boot->set_checkbox("ForceGateway", "{ForceGateway}", $ligne["ForceGateway"]);
    if (!$users->AsSystemAdministrator) {
        $boot->set_form_locked();
    }
    if ($ID == 0) {
        $boot->set_CloseYahoo("YahooWin2");
    }
    $boot->set_RefreshSearchs();
    echo $boot->Compile();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:40,代码来源:miniadm.network.virtips.php

示例4: watchdog_params


//.........这里部分代码省略.........
    if ($ini->_params["SMTP"]["smtp_server_port"] == null) {
        $ini->_params["SMTP"]["smtp_server_port"] = 25;
    }
    if ($ini->_params["SMTP"]["smtp_sender"] == null) {
        $users = new usersMenus();
        $ini->_params["SMTP"]["smtp_sender"] = "artica@{$users->fqdn}";
    }
    $t = time();
    $UfdbguardSMTPNotifs = unserialize(base64_decode($sock->GET_INFO("UfdbguardSMTPNotifs")));
    if (!isset($UfdbguardSMTPNotifs["ENABLED_SQUID_WATCHDOG"])) {
        $UfdbguardSMTPNotifs["ENABLED_SQUID_WATCHDOG"] = 0;
    }
    if (!is_numeric($UfdbguardSMTPNotifs["ENABLED_SQUID_WATCHDOG"])) {
        $UfdbguardSMTPNotifs["ENABLED_SQUID_WATCHDOG"] = 0;
    }
    if (!isset($UfdbguardSMTPNotifs["smtp_server_name"])) {
        $UfdbguardSMTPNotifs["smtp_server_name"] = $ini->_params["SMTP"]["smtp_server_name"];
    }
    if (!isset($UfdbguardSMTPNotifs["smtp_server_port"])) {
        $UfdbguardSMTPNotifs["smtp_server_port"] = $ini->_params["SMTP"]["smtp_server_port"];
    }
    if (!isset($UfdbguardSMTPNotifs["smtp_sender"])) {
        $UfdbguardSMTPNotifs["smtp_server_port"] = $ini->_params["SMTP"]["smtp_sender"];
    }
    if (!isset($UfdbguardSMTPNotifs["smtp_dest"])) {
        $UfdbguardSMTPNotifs["smtp_dest"] = $ini->_params["SMTP"]["smtp_dest"];
    }
    if (!isset($UfdbguardSMTPNotifs["smtp_auth_user"])) {
        $UfdbguardSMTPNotifs["smtp_dest"] = $ini->_params["SMTP"]["smtp_auth_user"];
    }
    if (!isset($UfdbguardSMTPNotifs["smtp_auth_passwd"])) {
        $UfdbguardSMTPNotifs["smtp_auth_passwd"] = $ini->_params["SMTP"]["smtp_auth_passwd"];
    }
    if (!isset($UfdbguardSMTPNotifs["tls_enabled"])) {
        $UfdbguardSMTPNotifs["tls_enabled"] = $ini->_params["SMTP"]["tls_enabled"];
    }
    if (!isset($UfdbguardSMTPNotifs["ssl_enabled"])) {
        $UfdbguardSMTPNotifs["ssl_enabled"] = $ini->_params["SMTP"]["ssl_enabled"];
    }
    if (!is_numeric($UfdbguardSMTPNotifs["smtp_server_port"])) {
        $UfdbguardSMTPNotifs["smtp_server_port"] = 25;
    }
    if (!isset($MonitConfig["ALLOW_RETURN_1CPU"])) {
        $MonitConfig["ALLOW_RETURN_1CPU"] = 1;
    }
    if (!is_numeric($MonitConfig["ALLOW_RETURN_1CPU"])) {
        $MonitConfig["ALLOW_RETURN_1CPU"] = 1;
    }
    $boot = new boostrap_form();
    $boot->set_checkbox("watchdog", "{enable}", $MonitConfig["watchdog"], array("DISABLEALL" => true));
    $boot->set_checkbox("EnableFailover", "{enable} {failover}", $EnableFailover, array("TOOLTIP" => "{EnableFailover_explain}"));
    $boot->set_field("MinTimeFailOverSwitch", "{failover_ttl} ({minutes})", $MonitConfig["MinTimeFailOverSwitch"], array("TOOLTIP" => "{failover_ttl_explain}"));
    $boot->set_checkbox("ALLOW_RETURN_1CPU", "{ALLOW_RETURN_1CPU}", $MonitConfig["ALLOW_RETURN_1CPU"], array("TOOLTIP" => "{ALLOW_RETURN_1CPU_EXPLAIN}"));
    $boot->set_field("WEBPROCISSUE", "{max_attempts}", $MonitConfig["WEBPROCISSUE"]);
    $boot->set_checkbox("DisableWebFilteringNetFailed", "{DisableWebFilteringNetFailed}", $MonitConfig["DisableWebFilteringNetFailed"], array("TOOLTIP" => "{DisableWebFilteringNetFailed_explain}"));
    $boot->set_field("SquidCacheReloadTTL", "{minimum_reload_interval} ({minutes})", $SquidCacheReloadTTL, array("TOOLTIP" => "{SquidCacheReloadTTL_explain}"));
    $boot->set_field("REBOOT_INTERVAL", "{minimum_reboot_interval} ({minutes})", $MonitConfig["REBOOT_INTERVAL"], array("TOOLTIP" => "{minimum_reboot_interval_explain}"));
    $boot->set_field("MAX_RESTART", "{SQUID_MAX_RESTART}", $MonitConfig["MAX_RESTART"], array("TOOLTIP" => "{SQUID_MAX_RESTART_EXPLAIN}"));
    $boot->set_field("MgrInfosMaxTimeOut", "{tests_timeout}  ({seconds})", $MonitConfig["MgrInfosMaxTimeOut"]);
    $boot->set_spacertitle("{performance}");
    $boot->set_field("watchdogCPU", "{notify_when_cpu_exceed} %", $MonitConfig["watchdogCPU"]);
    $boot->set_field("watchdogMEM", "{notify_when_memory_exceed} (MB)", $MonitConfig["watchdogMEM"]);
    $boot->set_field("MaxSwapPourc", "{MaxSwapPourc}  (%)", $MonitConfig["MaxSwapPourc"], array("TOOLTIP" => "{MaxSwapPourc_explain}"));
    $boot->set_field("MaxLoad", "{max_system_load}", $MonitConfig["MaxLoad"], array("TOOLTIP" => "{max_system_load_squid_explain}"));
    $boot->set_field("MinFreeMem", "{MinFreeMem} MB", $MonitConfig["MinFreeMem"], array("TOOLTIP" => "{MinFreeMem_squid_explain}"));
    $boot->set_checkbox("MaxLoadFailOver", "{max_system_load_failover}", $MonitConfig["MaxLoadFailOver"], array("TOOLTIP" => "{max_system_load_failover_explain}"));
    $boot->set_checkbox("MaxLoadReboot", "{max_system_load_reboot}", $MonitConfig["MaxLoadReboot"], array("TOOLTIP" => "{max_system_load_reboot_explain}"));
    $boot->set_checkbox("RestartWhenCrashes", "{RestartWhenCrashes}", $MonitConfig["RestartWhenCrashes"], array("TOOLTIP" => "{RestartWhenCrashes_explain}"));
    $boot->set_spacertitle("SWAP");
    $boot->set_checkbox("SWAP_MONITOR", "{enable}", $MonitConfig["SWAP_MONITOR"], array("TOOLTIP" => "{SWAP_MONITOR_EXPLAIN}"));
    $boot->set_field("SWAP_MIN", "{SWAP_MIN} %", $MonitConfig["SWAP_MIN"], array("TOOLTIP" => "{SWAP_MIN_EXPLAIN}"));
    $boot->set_field("SWAP_MAX", "{SWAP_MAX} %", $MonitConfig["SWAP_MAX"], array("TOOLTIP" => "{SWAP_MAX_EXPLAIN}"));
    $boot->set_spacertitle("PING");
    $boot->set_checkbox("ENABLE_PING_GATEWAY", "{enable}", $MonitConfig["ENABLE_PING_GATEWAY"], array("TOOLTIP" => "{ENABLE_PING_GATEWAY_EXPLAIN}"));
    $boot->set_field("MAX_PING_GATEWAY", "{MAX_PING_GATEWAY}", $MonitConfig["MAX_PING_GATEWAY"], array("TOOLTIP" => "{MAX_PING_GATEWAY_EXPLAIN}"));
    $boot->set_field("PING_GATEWAY", "{ipaddr}", $MonitConfig["PING_GATEWAY"], array("IPV4" => true));
    $boot->set_checkbox("PING_FAILED_RELOAD_NET", "{reload_network}", $MonitConfig["PING_FAILED_RELOAD_NET"], array("TOOLTIP" => "{PING_FAILED_RELOAD_NET_EXPLAIN}"));
    $boot->set_checkbox("PING_FAILED_REPORT", "{send_report}", $MonitConfig["PING_FAILED_REPORT"], array("TOOLTIP" => "{PING_FAILED_REPORT_EXPLAIN}"));
    $boot->set_checkbox("PING_FAILED_FAILOVER", "{switch_to_failover}", $MonitConfig["PING_FAILED_FAILOVER"], array("TOOLTIP" => "{PING_FAILED_FAILOVER_EXPLAIN}"));
    $boot->set_checkbox("PING_FAILED_REBOOT", "{reboot_system}", $MonitConfig["PING_FAILED_REBOOT"], array("TOOLTIP" => "{reboot_system_explain}"));
    $boot->set_spacertitle("DNS");
    $boot->set_checkbox("NotifyDNSIssues", "{NotifyDNSIssues}", $MonitConfig["NotifyDNSIssues"], array("TOOLTIP" => "{NotifyDNSIssues_explain}"));
    $boot->set_field("DNSIssuesMAX", "{DNSIssuesMAX}", $MonitConfig["DNSIssuesMAX"]);
    $boot->set_spacertitle("{external_page}");
    $boot->set_checkbox("TestExternalWebPage", "{TestExternalWebPage}", $MonitConfig["TestExternalWebPage"], array("TOOLTIP" => "{squid_TestExternalWebPage_explain}"));
    $boot->set_field("ExternalPageToCheck", "{page_to_check}", $MonitConfig["ExternalPageToCheck"], array("TOOLTIP" => "{ExternalPageToCheck_explain}"));
    $boot->set_field("ExternalPageUsername", "{username}", $MonitConfig["ExternalPageUsername"], array("TOOLTIP" => "{ExternalPageUsername_EXPLAIN}"));
    $boot->set_fieldpassword("ExternalPagePassword", "{password}", $MonitConfig["ExternalPagePassword"], array("TOOLTIP" => "{ExternalPageUsername_EXPLAIN}", "ENCODE" => TRUE));
    $boot->set_list("ExternalPageListen", "{addr}", $ALL_IPS_GET_ARRAY, $MonitConfig["ExternalPageListen"], array("TOOLTIP" => "{ExternalPageListen_explain}"));
    $boot->set_spacertitle("{smtp_notifications}");
    $boot->set_checkbox("ENABLED_SQUID_WATCHDOG", "{smtp_enabled}", $UfdbguardSMTPNotifs["ENABLED_SQUID_WATCHDOG"]);
    $boot->set_field("smtp_server_name", "{smtp_server_name}", $UfdbguardSMTPNotifs["smtp_server_name"]);
    $boot->set_field("smtp_server_port", "{smtp_server_port}", $UfdbguardSMTPNotifs["smtp_server_port"]);
    $boot->set_field("smtp_sender", "{smtp_sender}", $UfdbguardSMTPNotifs["smtp_sender"]);
    $boot->set_field("smtp_dest", "{smtp_dest}", $UfdbguardSMTPNotifs["smtp_dest"]);
    $boot->set_field("smtp_auth_user", "{smtp_auth_user}", $UfdbguardSMTPNotifs["smtp_auth_user"]);
    $boot->set_fieldpassword("smtp_auth_passwd", "{smtp_auth_passwd}", $UfdbguardSMTPNotifs["smtp_auth_passwd"], array("ENCODE" => true));
    $boot->set_checkbox("tls_enabled", "{tls_enabled}", $UfdbguardSMTPNotifs["tls_enabled"]);
    echo $boot->Compile();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:101,代码来源:miniadmin.proxy.monitor.php

示例5: NewMacLink_popup

function NewMacLink_popup()
{
    $tpl = new templates();
    $_GET["MAC"] = trim($_GET["MAC"]);
    if ($_GET["MAC"] != null) {
        if (!IsPhysicalAddress($_GET["MAC"])) {
            unset($_GET["MAC"]);
        }
    } else {
        unset($_GET["MAC"]);
    }
    $q = new mysql_squid_builder();
    $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM webfilters_nodes WHERE MAC='{$_GET["MAC"]}'"));
    $boot = new boostrap_form();
    if ($_GET["MAC"] == null) {
        $boot->set_field("MAC", "{MAC}", null, array("MANDATORY" => true, "BUTTON" => array("JS" => "Loadjs('miniadm.squid.macbrowser.php?field=%f')", "LABEL" => $tpl->_ENGINE_parse_body("{browse}"))));
    } else {
        $boot->set_formtitle("{MAC}:{$_GET["MAC"]}");
        $boot->set_hidden("MAC", $_GET["MAC"]);
        $ips = array();
        $results2 = $q->QUERY_SQL("SELECT ipaddr FROM members_macip WHERE MAC='{$_GET["MAC"]}' ORDER BY ipaddr");
        while ($ligne2 = mysql_fetch_assoc($results2)) {
            $ips[] = $ligne2["ipaddr"];
        }
        if (count($ips) > 0) {
            $boot->set_formdescription(@implode(", ", $ips));
        }
        $linkstats = "<div style='width:100%'>\n\t\t\t\t<a href=\"javascript:blur();\" \n\t\t\t\tOnClick=\"javascript:miniadm.squid.macbrowser.php?visits-day-js={$_GET["MAC"]}');>{statistics}</a></div>";
    }
    $boot->set_hidden("save-mac", 'yes');
    $boot->set_field("hostname", "{hostname}", $ligne["hostname"]);
    $boot->set_field("uid", "{member}", $ligne["uid"], array("MANDATORY" => true));
    $boot->set_button("{add}");
    $boot->set_RefreshSearchs();
    echo $boot->Compile();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:36,代码来源:miniadm.squid.MacToMembers.php

示例6: settings

function settings()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $q = new mysql_catz();
    $users = new usersMenus();
    $sock = new sockets();
    $SquidDBTuningParameters = unserialize(base64_decode($sock->GET_INFO("MySQLCatzParams")));
    $query_cache_size = $SquidDBTuningParameters["query_cache_size"];
    $max_allowed_packet = $SquidDBTuningParameters["max_allowed_packet"];
    $max_connections = $SquidDBTuningParameters["max_connections"];
    $connect_timeout = $SquidDBTuningParameters["connect_timeout"];
    $interactive_timeout = $SquidDBTuningParameters["interactive_timeout"];
    $key_buffer_size = $SquidDBTuningParameters["key_buffer_size"];
    $table_open_cache = $SquidDBTuningParameters["table_open_cache"];
    $myisam_sort_buffer_size = $SquidDBTuningParameters["myisam_sort_buffer_size"];
    $ListenPort = $SquidDBTuningParameters["ListenPort"];
    $tmpdir = $SquidDBTuningParameters["tmpdir"];
    if (!isset($SquidDBTuningParameters["net_read_timeout"])) {
        $SquidDBTuningParameters["net_read_timeout"] = 120;
    }
    $serverMem = round(($users->MEM_TOTAL_INSTALLEE - 300) / 1024);
    $VARIABLES = $q->SHOW_VARIABLES();
    if (is_array($SquidDBTuningParameters)) {
        while (list($key, $value) = each($SquidDBTuningParameters)) {
            if (isset($SquidDBTuningParameters[$key])) {
                if ($GLOBALS["VERBOSE"]) {
                    echo "VARIABLES[{$key}]={$VARIABLES[$key]} MySQLCatzParams[{$key}]={$SquidDBTuningParameters[$key]}<br>\n";
                }
                if ($VARIABLES[$key] == null) {
                    $VARIABLES[$key] = $SquidDBTuningParameters[$key];
                }
            }
        }
    }
    $read_buffer_size = round($VARIABLES["read_buffer_size"] / 1024 / 1000, 2);
    $read_rnd_buffer_size = round($VARIABLES["read_rnd_buffer_size"] / 1024 / 1000, 2);
    $sort_buffer_size = round($VARIABLES["sort_buffer_size"] / 1024 / 1000, 2);
    $thread_stack = round($VARIABLES["thread_stack"] / 1024 / 1000, 2);
    $join_buffer_size = round($VARIABLES["join_buffer_size"] / 1024 / 1000, 2);
    $max_tmp_table_size = round($VARIABLES["max_tmp_table_size"] / 1024 / 1000, 2);
    $innodb_log_buffer_size = round($VARIABLES["innodb_log_buffer_size"] / 1024 / 1000, 2);
    $innodb_additional_mem_pool_size = round($VARIABLES["innodb_additional_mem_pool_size"] / 1024 / 1000, 2);
    $innodb_log_buffer_size = round($VARIABLES["innodb_log_buffer_size"] / 1024 / 1000, 2);
    $innodb_buffer_pool_size = round($VARIABLES["innodb_buffer_pool_size"] / 1024 / 1000, 2);
    $max_connections = $VARIABLES["max_connections"];
    $per_thread_buffers = $sort_buffer_size + $read_rnd_buffer_size + $sort_buffer_size + $thread_stack + $join_buffer_size;
    $total_per_thread_buffers = $per_thread_buffers * $max_connections;
    if ($total_per_thread_buffers > $serverMem) {
        $color = "#EB0000";
    }
    $query_cache_size = round($VARIABLES["query_cache_size"] / 1024 / 1000, 2);
    $key_buffer_size = round($VARIABLES["key_buffer_size"] / 1024 / 1000, 2);
    if ($tmpdir == null) {
        $tmpdir = "/tmp";
    }
    $server_buffers = $key_buffer_size + $max_tmp_table_size + $innodb_buffer_pool_size + $innodb_additional_mem_pool_size + $innodb_log_buffer_size + $query_cache_size;
    if ($server_buffers > $serverMem) {
        $color = "#EB0000";
    }
    $max_used_memory = $server_buffers + $total_per_thread_buffers;
    if ($max_used_memory > $serverMem) {
        $color = "#EB0000";
    }
    $UNIT = "M";
    if ($max_used_memory > 1000) {
        $max_used_memory = round($max_used_memory / 1000, 2);
        $UNIT = "G";
    }
    if (!is_numeric($ListenPort)) {
        $ListenPort = 0;
    }
    $boot = new boostrap_form();
    $boot->set_hidden("innodb_buffer_pool_size", $innodb_buffer_pool_size);
    $boot->set_hidden("innodb_additional_mem_pool_size", $innodb_additional_mem_pool_size);
    $boot->set_hidden("innodb_log_buffer_size", $innodb_log_buffer_size);
    $boot->set_spacertitle("{threads}:");
    $boot->set_field("read_buffer_size", "{read_buffer_size} (MB)", $read_buffer_size, array("TOOLTIP" => "{read_buffer_size_text}"));
    $boot->set_field("read_rnd_buffer_size", "{read_rnd_buffer_size} (MB)", $read_rnd_buffer_size, array("TOOLTIP" => "{read_rnd_buffer_size_text}"));
    $boot->set_field("sort_buffer_size", "{sort_buffer_size} (MB)", $sort_buffer_size, array("TOOLTIP" => "{sort_buffer_size_text}"));
    $boot->set_field("thread_stack", "Thread Stack", $thread_stack, array("TOOLTIP" => "{thread_stack_text}"));
    $boot->set_spacertitle("{server}:");
    $boot->set_field("ListenPort", "{listen_port}", $ListenPort);
    $boot->set_field("tmpdir", "{working_directory}", $tmpdir, array("BUTTON" => array("LABEL" => "{browse}", "JS" => "Loadjs('SambaBrowse.php?no-shares=yes&field=%f&no-hidden=yes')")));
    $boot->set_field("net_read_timeout", "{net_read_timeout} ({seconds})", $SquidDBTuningParameters["net_read_timeout"]);
    $boot->set_field("max_connections", "{max_connections}", $max_connections);
    $boot->set_field("key_buffer_size", "{key_buffer_size} (MB)", $key_buffer_size);
    $boot->set_field("max_tmp_table_size", "MAX TMP Table size (MB)", $max_tmp_table_size);
    $boot->set_field("query_cache_size", "{query_cache_size} (MB)", $query_cache_size, array("TOOLTIP" => "{thread_stack_text}"));
    $boot->set_button("{apply}");
    $boot->set_formdescription("{$server_buffers}M + {$total_per_thread_buffers}M = {$max_used_memory}{$UNIT}");
    $html = $boot->Compile();
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:94,代码来源:miniadm.proxy.category.database.php

示例7: parameters

function parameters()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $sock = new sockets();
    $CacheReplacementPolicy = $sock->GET_INFO("CacheReplacementPolicy");
    $DisableAnyCache = $sock->GET_INFO("DisableAnyCache");
    if ($CacheReplacementPolicy == null) {
        $CacheReplacementPolicy = "heap_LFUDA";
    }
    $SquidDebugCacheProc = $sock->GET_INFO("SquidDebugCacheProc");
    $ForceWindowsUpdateCaching = $sock->GET_INFO("ForceWindowsUpdateCaching");
    $ProxyDedicateMicrosoftRules = $sock->GET_INFO("ProxyDedicateMicrosoftRules");
    if (!is_numeric($SquidDebugCacheProc)) {
        $SquidDebugCacheProc = 0;
    }
    if (!is_numeric($DisableAnyCache)) {
        $DisableAnyCache = 0;
    }
    if (!is_numeric($ForceWindowsUpdateCaching)) {
        $ForceWindowsUpdateCaching = 0;
    }
    $squid = new squidbee();
    $t = time();
    $array["lru"] = "{cache_lru}";
    $array["heap_GDSF"] = "{heap_GDSF}";
    $array["heap_LFUDA"] = "{heap_LFUDA}";
    $array["heap_LRU"] = "{heap_LRU}";
    if (preg_match("#([0-9]+)#", $squid->global_conf_array["maximum_object_size"], $re)) {
        $maximum_object_size = $re[1];
        if (preg_match("#([A-Z]+)#", $squid->global_conf_array["maximum_object_size"], $re)) {
            $unit = $re[1];
        }
        if ($unit == "KB") {
            $maximum_object_size_in_memory = round($maximum_object_size_in_memory / 1024);
        }
    }
    if (preg_match("#([0-9]+)#", $squid->global_conf_array["maximum_object_size_in_memory"], $re)) {
        $maximum_object_size_in_memory = $re[1];
        if (preg_match("#([A-Z]+)#", $squid->global_conf_array["maximum_object_size_in_memory"], $re)) {
            $unit = $re[1];
        }
        if ($unit == "KB") {
            $maximum_object_size_in_memory = round($maximum_object_size_in_memory / 1024);
        }
    }
    $boot = new boostrap_form();
    $boot->set_formtitle("{caches}::{parameters}");
    $boot->set_checkbox("DisableAnyCache", "{DisableAnyCache}", $DisableAnyCache);
    $boot->set_checkbox("ForceWindowsUpdateCaching", "{ForceWindowsUpdateCaching}", $ForceWindowsUpdateCaching);
    $boot->set_checkbox("ProxyDedicateMicrosoftRules", "{ProxyDedicateMicrosoftRules}", $ProxyDedicateMicrosoftRules);
    $boot->set_checkbox("SquidDebugCacheProc", "{debug_cache_processing}", $SquidDebugCacheProc);
    $boot->set_list("CacheReplacementPolicy", "{cache_replacement_policy}", $array, $CacheReplacementPolicy, array("TOOLTIP" => "{cache_replacement_policy_explain}"));
    $boot->set_field("maximum_object_size", "{maximum_object_size_in_memory} (MB)", $maximum_object_size_in_memory, array("TOOLTIP" => "{maximum_object_size_text}"));
    $boot->set_field("maximum_object_size", "{maximum_object_size_in_memory} (MB)", $maximum_object_size, array("TOOLTIP" => "{maximum_object_size_in_memory_text}"));
    $boot->set_button("{apply}");
    echo $boot->Compile();
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:58,代码来源:miniadmin.proxy.caches30.php

示例8: NewipaddrLink_popup

function NewipaddrLink_popup()
{
    $tpl = new templates();
    $_GET["ipaddr"] = trim($_GET["ipaddr"]);
    $q = new mysql_squid_builder();
    $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM webfilters_ipaddr WHERE ipaddr='{$_GET["ipaddr"]}'"));
    $boot = new boostrap_form();
    if ($_GET["ipaddr"] == null) {
        $boot->set_field("ipaddr", "{ipaddr}", null, array("MANDATORY" => true, "IPV4" => true));
    } else {
        $boot->set_formtitle("{ipaddr}:{$_GET["ipaddr"]}");
        $boot->set_hidden("ipaddr", $_GET["ipaddr"]);
        $ips = array();
        $linkstats = "<div style='width:100%'>\n\t\t\t\t<a href=\"javascript:blur();\" \n\t\t\t\tOnClick=\"javascript:miniadm.squid.ipaddrbrowser.php?visits-day-js={$_GET["ipaddr"]}');>{statistics}</a></div>";
    }
    $linkstats = null;
    $boot->set_hidden("save-ipaddr", 'yes');
    $boot->set_field("uid", "{member}", $ligne["uid"], array("MANDATORY" => true));
    $boot->set_field("hostname", "{hostname}", $ligne["hostname"]);
    $boot->set_button("{add}");
    $boot->set_RefreshSearchs();
    echo $boot->Compile();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:23,代码来源:miniadm.squid.IPToMembers.php

示例9: charter_settings

function charter_settings()
{
    $ID = $_GET["ID"];
    $users = new usersMenus();
    $page = CurrentPageName();
    $sock = new sockets();
    $boot = new boostrap_form();
    $users = new usersMenus();
    $title = "Acceptable Use Policy";
    $btname = "{add}";
    if ($ID > 0) {
        $q = new mysql_squid_builder();
        $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT TextIntro,TextButton,title FROM itcharters WHERE ID='{$ID}'"));
        if (!$q->ok) {
            echo "<p class=text-error>{$q->mysql_error}</p>";
        }
        $title = $ligne["title"];
        $btname = "{apply}";
    }
    if ($ligne["TextIntro"] == null) {
        $ligne["TextIntro"] = "<p style='font-size:18px'>Please read the IT chart before accessing trough Internet</p>";
    }
    if ($ligne["TextButton"] == null) {
        $ligne["TextButton"] = "I accept the terms and conditions of this agreement";
    }
    $boot->set_formtitle($title);
    $boot->set_hidden("ID", $ID);
    $boot->set_field("title", "{page_title}", $title);
    $boot->set_textarea("TextIntro", "{introduction_text}", $ligne["TextIntro"], array("ENCODE" => true));
    $boot->set_field("TextButton", "{text_button}", $ligne["TextButton"], array("ENCODE" => true));
    if (!$users->AsDansGuardianAdministrator) {
        $boot->set_form_locked();
    }
    $boot->set_button($btname);
    if ($ID == 0) {
        $boot->set_CloseYahoo("YahooWin2");
    }
    $boot->set_RefreshSearchs();
    echo $boot->Compile();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:40,代码来源:miniadmin.proxy.charter.php

示例10: wbl_popup

function wbl_popup()
{
    $page = CurrentPageName();
    $q = new amavisdb();
    $tpl = new templates();
    $t = time();
    $type = $_GET["type"];
    $boot = new boostrap_form();
    $email = $q->email_from_emailid($_GET["rid"]);
    $sender = $q->email_from_mailid($_GET["sid"]);
    $user = new user($_SESSION["uid"]);
    $mails = $user->HASH_ALL_MAILS;
    while (list($b, $email) = each($mails)) {
        $mailZ[$email] = $email;
    }
    if ($_GET["sid"] == 0) {
        $bt = "{add}";
    } else {
        $bt = "{apply}";
    }
    $policy_id = $q->policyid_from_mail($email);
    $boot->set_hidden("wbl-type", $type);
    $boot->set_list("rcpt", "{email}", $mailZ, $email);
    $boot->set_field("sender", "{sender}", $sender, array("MANDATORY" => true));
    $boot->set_button($bt);
    $boot->set_CallBack("YahooWin2Hide");
    $boot->set_RefreshSearchs();
    $boot->set_formdescription("{amavis_wblsql_explain}");
    echo $boot->Compile();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:30,代码来源:miniadm.messaging.amavis.php

示例11: parameters

function parameters()
{
    $users = new usersMenus();
    $page = CurrentPageName();
    $boot = new boostrap_form();
    $squid = new squidbee();
    $squid_reverse = new squid_reverse();
    if (!$users->AsSquidAdministrator) {
        senderror("{ERROR_NO_PRIVS}");
        return;
    }
    $sock = new sockets();
    $SquidReverseDefaultWebSite = $sock->GET_INFO("SquidReverseDefaultWebSite");
    $SquidReverseDefaultCert = $sock->GET_INFO("SquidReverseDefaultWebSite");
    if ($SquidReverseDefaultWebSite == null) {
        $SquidReverseDefaultWebSite = $squid->visible_hostnameF();
    }
    $boot->set_formtitle("{global_parameters}");
    $boot->set_field("SquidReverseDefaultWebSite", "{default_website}", "{$SquidReverseDefaultWebSite}");
    $squid_reverse = new squid_reverse();
    $sslcertificates = $squid_reverse->ssl_certificates_list();
    $q = new mysql();
    $boot->set_list("certificate_center", "{default_certificate}", $sslcertificates, $squid->certificate_center);
    $boot->set_button("{apply}");
    echo $boot->Compile();
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:26,代码来源:miniadmin.proxy.reverse.nginx-pools.php

示例12: ldap_auth_parameters

function ldap_auth_parameters()
{
    $boot = new boostrap_form();
    $squid = new squidbee();
    $users = new usersMenus();
    $sock = new sockets();
    $SquidLdapAuthEnableGroups = $sock->GET_INFO("SquidLdapAuthEnableGroups");
    $EnableKerbAuth = $sock->GET_INFO("EnableKerbAuth");
    $SquidLdapAuthBanner = $sock->GET_INFO("SquidLdapAuthBanner");
    if ($SquidLdapAuthBanner == null) {
        $SquidLdapAuthBanner = "Basic credentials, Please logon...";
    }
    if ($EnableKerbAuth == 1) {
        $error = "<p class=text-error>{ldap_with_ad_explain}</p>";
    }
    $boot->set_spacertitle("{local_ldap}");
    $boot->set_spacerexplain("{authenticate_users_explain}");
    $boot->set_checkbox("ldap_auth", "{local_ldap}", $squid->LDAP_AUTH);
    //$boot->set_checkbox("SquidLdapAuthEnableGroups", "{enable_group_checking}",$SquidLdapAuthEnableGroups);
    $boot->set_field("SquidLdapAuthBanner", "{auth_banner}", $SquidLdapAuthBanner, array("ENCODE" => true));
    $boot->set_spacertitle("{remote_database}");
    $boot->set_spacerexplain("{SQUID_LDAP_AUTH_EXT}");
    $ldap_server = $squid->EXTERNAL_LDAP_AUTH_PARAMS["ldap_server"];
    $ldap_port = $squid->EXTERNAL_LDAP_AUTH_PARAMS["ldap_port"];
    $userdn = $squid->EXTERNAL_LDAP_AUTH_PARAMS["ldap_user"];
    $ldap_password = $squid->EXTERNAL_LDAP_AUTH_PARAMS["ldap_password"];
    $ldap_suffix = $squid->EXTERNAL_LDAP_AUTH_PARAMS["ldap_suffix"];
    $ldap_filter_users = $squid->EXTERNAL_LDAP_AUTH_PARAMS["ldap_filter_users"];
    $ldap_filter_group = $squid->EXTERNAL_LDAP_AUTH_PARAMS["ldap_filter_group"];
    $ldap_server = $squid->EXTERNAL_LDAP_AUTH_PARAMS["ldap_server"];
    $auth_banner = $squid->EXTERNAL_LDAP_AUTH_PARAMS["auth_banner"];
    $EnableSquidExternalLDAP = $squid->LDAP_EXTERNAL_AUTH;
    if ($auth_banner == null) {
        $auth_banner = $SquidLdapAuthBanner;
    }
    if ($ldap_filter_users == null) {
        $ldap_filter_users = "sAMAccountName=%s";
    }
    if ($ldap_filter_group == null) {
        $ldap_filter_group = "(&(objectclass=person)(sAMAccountName=%u)(memberof=*))";
    }
    if ($ldap_port == null) {
        $ldap_port = 389;
    }
    $boot->set_checkbox("EnableSquidExternalLDAP", "{activate}", $EnableSquidExternalLDAP);
    $boot->set_field("ldap_server", "{hostname}", $ldap_server);
    $boot->set_field("ldap_port", "{listen_port}", $ldap_port);
    $boot->set_field("auth_banner", "{auth_banner}", $auth_banner);
    $boot->set_field("ldap_user", "{userdn}", $userdn);
    $boot->set_fieldpassword("ldap_password", "{ldap_password}", $ldap_password, array("ENCODE" => true));
    $boot->set_field("ldap_suffix", "{ldap_suffix}", $ldap_suffix);
    $boot->set_field("ldap_filter_users", "{ldap_filter_users}", $ldap_filter_users);
    $boot->set_field("ldap_filter_group", "{ldap_filter_group}", $ldap_filter_group);
    $boot->set_button("{apply}");
    if (!$users->AsSquidAdministrator) {
        $boot->set_form_locked();
    }
    $boot->set_Newbutton("{restart_onlysquid}", "Loadjs('squid.restart.php?onlySquid=yes&ask=yes');");
    echo $error . $boot->Compile();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:60,代码来源:miniadmin.proxy.authentication.php

示例13: section_ports

function section_ports()
{
    $boot = new boostrap_form();
    $sock = new sockets();
    $squid = new squidbee();
    $tpl = new templates();
    $sock = new sockets();
    $arrayParams = unserialize(base64_decode($sock->getFrameWork("squid.php?compile-list=yes")));
    $SSL = 1;
    if (!isset($arrayParams["--enable-ssl"])) {
        echo $tpl->_ENGINE_parse_body("<p class=text-error>{SSL_NOT_COMPILED}</p>");
    }
    $KernelSendRedirects = $sock->GET_INFO("KernelSendRedirects");
    $SquidTransparentMixed = $sock->GET_INFO("SquidTransparentMixed");
    $SQUIDEnable = $sock->GET_INFO("SQUIDEnable");
    if (!is_numeric($KernelSendRedirects)) {
        $KernelSendRedirects = 1;
    }
    if (!is_numeric($SquidTransparentMixed)) {
        $SquidTransparentMixed = 0;
    }
    if (!is_numeric($SQUIDEnable)) {
        $SQUIDEnable = 1;
    }
    $sql = "SELECT CommonName FROM sslcertificates ORDER BY CommonName";
    $q = new mysql();
    $sslcertificates[null] = "{select}";
    $results = $q->QUERY_SQL($sql, 'artica_backup');
    while ($ligneZ = mysql_fetch_array($results, MYSQL_ASSOC)) {
        $sslcertificates[$ligneZ["CommonName"]] = $ligneZ["CommonName"];
    }
    $boot->set_formtitle("{behavior}");
    $boot->set_checkbox("SQUIDEnable", "{enable_squid_service}", $SQUIDEnable, array("TOOLIP" => "{enable_squid_service_explain}", "DISABLEALL" => true));
    $boot->set_field("visible_hostname", "{visible_hostname}", $squid->visible_hostname, array("TOOLIP" => "{visible_hostname_text}"));
    $boot->set_checkbox("hasProxyTransparent", "{transparent_mode}", $squid->hasProxyTransparent, array("TOOLIP" => "{transparent_mode_text}", "LINK" => "SquidTransparentMixed,KernelSendRedirects"));
    $boot->set_checkbox("SquidTransparentMixed", "{SquidTransparentMixed}", $SquidTransparentMixed, array("TOOLIP" => "{SquidTransparentMixed_text}"));
    $boot->set_checkbox("KernelSendRedirects", "{KernelSendRedirects}", $KernelSendRedirects, array("TOOLIP" => "{KernelSendRedirects_explain}"));
    $boot->set_spacertitle("{listen_ports}");
    $boot->set_spacerexplain("{listen_port_text}");
    $boot->set_field("listen_port", "HTTP", $squid->listen_port);
    $boot->set_field("second_listen_port", "HTTP (2)", $squid->second_listen_port, array("TOOLTIP" => "{squid_second_port_explain}"));
    $boot->set_field("ssl_port", "HTTPS", $squid->ssl_port, array("TOOLTIP" => "{squid_ssl_port_explain}"));
    $boot->set_list("certificate_center", "{certificate}", $sslcertificates, $squid->certificate_center);
    $boot->set_field("icp_port", "{icp_port}", $squid->ICP_PORT, array("TOOLTIP" => "{icp_port_explain}"));
    $boot->set_field("htcp_port", "{htcp_port}", $squid->HTCP_PORT, array("TOOLTIP" => "{htcp_port_explain}"));
    $boot->set_button("{apply}");
    $users = new usersMenus();
    if (!$users->AsSquidAdministrator) {
        $boot->set_form_locked();
    }
    echo $boot->Compile();
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:52,代码来源:miniadmin.proxy.infrastructure.php

示例14: settings

function settings()
{
    $schedules = new system_tasks();
    $q = new mysql_squid_builder();
    $tpl = new templates();
    $buttontext = "{apply}";
    $ID = $_GET["ID"];
    $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM webfilters_schedules WHERE ID={$ID}"));
    $ligne["TimeDescription"] = utf8_encode($ligne["TimeDescription"]);
    $TimeText = $tpl->_ENGINE_parse_body($schedules->PatternToHuman($ligne["TimeText"]));
    $TimeText = str_replace("<br>", "", $TimeText);
    $explain = $tpl->_ENGINE_parse_body($q->tasks_explain_array[$ligne["TaskType"]]);
    $boot = new boostrap_form();
    $boot->set_hidden("ID", $ID);
    $boot->set_checkbox("enabled", "{enabled}", $ligne["enabled"]);
    $boot->set_field("TimeDescription", "{description}", $ligne["TimeDescription"], array("ENCODE" => TRUE));
    $boot->set_button("{apply}");
    $boot->set_formtitle("{task} {$ligne["ID"]}");
    $runtask = $tpl->_ENGINE_parse_body("<div style='text-align:right'><i class='icon-play'></i> <a href=\"javascript:Blurz();\" OnClick=\"javascript:Loadjs('miniadm.ajax.squid.schedules.php?schedule-run-js=yes&ID={$ID}');\">{run} {task}</div>");
    $boot->set_formdescription("{$explain}<br>{$TimeText}{$runtask}");
    $boot->set_RefreshSearchs();
    echo $boot->Compile();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:23,代码来源:miniadm.ajax.proxy.schedule.php

示例15: policy3

function policy3()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $boot = new boostrap_form();
    $t = time();
    $q = new amavisdb();
    $users = new usersMenus();
    $policy_id = $_GET["policy-id"];
    $btname = "{apply}";
    $sql = "SELECT * FROM policy WHERE id='{$policy_id}'";
    $ligne = mysql_fetch_array($q->QUERY_SQL($sql));
    if (!$q->ok) {
        $error = "<p class='text-error'>{$q->mysql_error}.</p>";
    }
    $boot->set_hidden("policy_id", $policy_id);
    $boot->set_spacertitle("{warnrecip}");
    $boot->set_checkboxYN("warnvirusrecip", "{warnvirusrecip}", $ligne["warnvirusrecip"]);
    $boot->set_checkboxYN("warnbannedrecip", "{warnbannedrecip}", $ligne["warnbannedrecip"]);
    $boot->set_checkboxYN("warnbadhrecip", "{warnbadhrecip}", $ligne["warnbadhrecip"]);
    $boot->set_spacertitle("{sendreportto}");
    $boot->set_field("newvirus_admin", "{virus_detected}", $ligne["newvirus_admin"]);
    $boot->set_field("banned_admin", "{banned_files}", $ligne["banned_admin"]);
    $boot->set_field("bad_header_admin", "{bad_headers}", $ligne["bad_header_admin"]);
    $boot->set_field("spam_admin", "{spam_messages}", $ligne["spam_admin"]);
    $boot->set_spacertitle("{subjects_tags}");
    $boot->set_field("spam_subject_tag", "{non_spam_messages}", $ligne["spam_subject_tag"]);
    $boot->set_field("spam_subject_tag2", "{spam_messages}", $ligne["spam_subject_tag2"]);
    $boot->set_field("spam_subject_tag3", "{blatant_spam}", $ligne["spam_subject_tag3"]);
    $boot->set_RefreshSearchs();
    echo $boot->Compile();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:32,代码来源:miniadm.messaging.ou.amavis.php


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