本文整理汇总了PHP中boostrap_form::set_button方法的典型用法代码示例。如果您正苦于以下问题:PHP boostrap_form::set_button方法的具体用法?PHP boostrap_form::set_button怎么用?PHP boostrap_form::set_button使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类boostrap_form
的用法示例。
在下文中一共展示了boostrap_form::set_button方法的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();
}
示例2: policy_domain
function policy_domain()
{
$page = CurrentPageName();
$tpl = new templates();
$t = time();
$q = new amavisdb();
$boot = new boostrap_form();
$email = $_GET["policy-domain"];
$sql = "SELECT id,policy_name FROM policy WHERE ou='{$_SESSION["ou"]}' ORDER BY policy_name";
$results = $q->QUERY_SQL($sql);
if (!$q->ok) {
echo "<p class=text-error>{$q->mysql_error}<br>{$sql}<hr></p>";
}
$policies[0] = "{default}";
while ($ligne = mysql_fetch_assoc($results)) {
$policies[$ligne["id"]] = $ligne["policy_name"];
}
$email_id = $q->emailid_from_email("@{$email}");
$policy_id = $q->policyid_from_mail("@{$email}");
$boot->set_hidden("policy_domain", $email);
$boot->set_hidden("email_id", $email_id);
$boot->set_list("policy_id", "{policy}", $policies, $policy_id);
$boot->set_button("{apply}");
$boot->set_CallBack("YahooWin2Hide");
$boot->set_RefreshSearchs();
echo $boot->Compile();
}
示例3: 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();
}
示例4: group_popup
function group_popup()
{
$ID = $_GET["ID"];
$q = new mysql_squid_builder();
$title = "{new_group}";
$bt = "{add}";
$q = new mysql_squid_builder();
if (!$q->TABLE_EXISTS("nginx_exploits_groups")) {
$sql = "CREATE TABLE IF NOT EXISTS `nginx_exploits_groups` (\n\t\t\t `ID` INT NOT NULL AUTO_INCREMENT,\n\t\t\t `groupname` CHAR(255) NOT NULL,\n\t\t\t PRIMARY KEY (`ID`),\n\t\t\t KEY `groupname` (`groupname`)\n\t\t\t) ENGINE = MYISAM;";
if (!$q->QUERY_SQL($sql)) {
echo $q->mysql_error_html();
}
}
$boot = new boostrap_form();
$sock = new sockets();
if ($ID > 0) {
$ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM nginx_exploits_groups WHERE ID='{$ID}'"));
$bt = "{apply}";
$title = "{$ligne["groupname"]}";
}
$boot->set_hidden("editgroupid", $ID);
$boot->set_hidden("servername", $_GET["servername"]);
$boot->set_formtitle($title);
$boot->set_field("groupname", "{groupname}", $ligne["groupname"]);
if ($ID == 0) {
$boot->set_checkbox("addef", "{add_defaults}", 0);
}
$boot->set_button($bt);
if ($ID == 0) {
$boot->set_CloseYahoo("YahooWin5");
}
$boot->set_RefreshSearchs();
echo $boot->Compile();
}
示例5: websites_popup_webserver_replace_popup
function websites_popup_webserver_replace_popup()
{
$tpl = new templates();
$page = CurrentPageName();
$servername = $_GET["servername"];
$q = new mysql_squid_builder();
$title = "{new_rule}";
$bt = "{add}";
$ID = $_GET["replaceid"];
$boot = new boostrap_form();
$sock = new sockets();
$servername = $_GET["servername"];
if ($ID > 0) {
$q = new mysql_squid_builder();
$ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM nginx_replace_www WHERE ID='{$ID}'"));
$bt = "{apply}";
$title = "{$ligne["rulename"]}";
$ligne["stringtosearch"] = stripslashes($ligne["stringtosearch"]);
$ligne["replaceby"] = stripslashes($ligne["replaceby"]);
$servername = $ligne["servername"];
}
if ($ligne["tokens"] == null) {
$ligne["tokens"] = "g";
}
if ($ligne["rulename"] == null) {
$ligne["rulename"] = time();
}
$boot->set_hidden("replaceid", $ID);
$boot->set_hidden("servername", $servername);
$boot->set_formtitle($title);
$boot->set_field("rulename", "{name}", $ligne["rulename"]);
$boot->set_field("zorder", "{order}", $ligne["zorder"]);
$boot->set_spacertitle("{search}");
$boot->set_textarea("stringtosearch", "{search}", $ligne["stringtosearch"], array("MANDATORY" => true, "ENCODE" => true));
$boot->set_checkbox("AsRegex", "{regex}", $ligne["AsRegex"], array("TOOLTIP" => "{replace_regex_explain}"));
$boot->set_spacertitle("{replace}");
$boot->set_textarea("replaceby", "{replace}", $ligne["replaceby"], array("MANDATORY" => true, "ENCODE" => true));
$boot->set_field("tokens", "{flags}", $ligne["tokens"], array("MANDATORY" => true));
$boot->set_button($bt);
if ($ID == 0) {
$boot->set_CloseYahoo("YahooWin3");
}
$boot->set_RefreshSearchs();
$boot->set_formdescription("{nginx_subst_explain}");
echo $boot->Compile();
}
示例6: 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();
}
示例7: 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();
}
示例8: lang_popup
function lang_popup()
{
$htmlT = new htmltools_inc();
$page = CurrentPageName();
$lang = $htmlT->LanguageArray();
$tpl = new templates();
$boot = new boostrap_form();
$boot->set_list("lang", "{language}", $lang, $tpl->language, array("COOKIE" => "artica-language"));
$boot->set_AjaxFinal("window.location.href='{$page}';");
$boot->set_button("{apply}");
$boot->set_CloseYahoo("YahooWin3");
echo $boot->Compile();
}
示例9: 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();
}
示例10: 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();
}
示例11: item_config
function item_config()
{
$ldap = new clladp();
$tpl = new templates();
$id = $_GET["item-id"];
if (!is_numeric($id)) {
$id = 0;
}
$t = $_GET["t"];
if (!is_numeric($t)) {
$t = time();
}
$bname = "{add}";
$page = CurrentPageName();
$explian = "<div class=text-info style='font-size:14px'>{ADD_DNS_ENTRY_TEXT}</div>";
$q = new mysql();
if ($id > 0) {
$bname = "{apply}";
$sql = "SELECT * FROM records WHERE id={$id}";
$ligne = mysql_fetch_array($q->QUERY_SQL($sql, "powerdns"));
$hostname = $ligne["name"];
$tr = explode(".", $hostname);
$computername = $tr[0];
unset($tr[0]);
$DnsZoneNameV = @implode(".", $tr);
$DnsType = $ligne["type"];
$ComputerIP = $ligne["content"];
$ttl = $ligne["ttl"];
$prio = $ligne["prio"];
$explainthis = $ligne["explainthis"];
$domain_id = $ligne["domain_id"];
$ligneZ = mysql_fetch_array($q->QUERY_SQL("SELECT name FROM domains WHERE id={$domain_id}", "powerdns"));
$DnsZoneName = $ligneZ["name"];
}
if (!is_numeric($domain_id)) {
$domain_id = 0;
}
$dnstypeTable = array("" => "{select}", "MX" => "{mail_exchanger}", "A" => "{dnstypea}");
$DnsType = Field_array_Hash($dnstypeTable, "DnsType", $DnsType, null, null, 0, null);
$ERROR_VALUE_MISSING_PLEASE_FILL_THE_FORM = $tpl->javascript_parse_text('{ERROR_VALUE_MISSING_PLEASE_FILL_THE_FORM}');
$addDomain = imgtootltip("plus-24.png", "{new_dnsdomain}", "Loadjs('postfix.transport.table.php?localdomain-js=yes&domain=&t={$t}&callback=RefreshFieldDomain{$t}')");
if (!$users->AsSystemAdministrator) {
if (!$users->AsDnsAdministrator) {
$ldap = new clladp();
$addDomain = null;
}
}
if ($ttl == null) {
$ttl = 8600;
}
if (!is_numeric($prio)) {
$prio = 0;
}
$boot = new boostrap_form();
$boot->set_field("ComputerIP", "{computer_ip}", $ComputerIP);
if ($domain_id > 0) {
$boot->set_field("DnsZoneName", "{DnsZoneName}", $DnsZoneName, array("DISABLED" => true));
} else {
$boot->set_field("DnsZoneName", "{DnsZoneName}", $DnsZoneName);
}
$boot->set_field("computername", "{computer_name}", $computername);
$boot->set_field("TTL", "TTL", $ttl);
$boot->set_field("PRIO", "PRIO", $prio);
$boot->set_field("explainthis", "{explain}", $explainthis, array("ENCODE" => true));
$boot->set_button($bname);
$boot->set_hidden("id", $id);
$boot->set_RefreshSearchs();
$boot->set_formtitle("{record}");
$form = $boot->Compile();
echo $tpl->_ENGINE_parse_body($form);
}
示例12: activedirectory
function activedirectory()
{
$sock = new sockets();
$ChilliConf = unserialize(base64_decode($sock->GET_INFO("ChilliConf")));
$boot = new boostrap_form();
if (!is_numeric($ChilliConf["AD_PORT"])) {
$ChilliConf["AD_PORT"] = 389;
}
$ip = new networking();
$Interfaces = $ip->Local_interfaces();
$Interfaces[null] = "{none}";
unset($Interfaces["lo"]);
if ($ChilliConf["AD_DOMAIN"] == null) {
$ChilliConf["AD_DOMAIN"] = "my-ad-domain.tld";
}
$boot->set_spacertitle("Microsoft Active Directory");
$boot->set_checkbox("EnableActiveDirectory", "{enable}", $ChilliConf["EnableActiveDirectory"], array("DISABLEALL" => true));
$boot->set_field("AD_SERVER", "{hostname}", $ChilliConf["AD_SERVER"]);
$boot->set_field("AD_PORT", "{ldap_port}", $ChilliConf["AD_PORT"]);
$boot->set_field("AD_DOMAIN", "{domain}", $ChilliConf["AD_DOMAIN"]);
$boot->set_button("{apply}");
echo $boot->Compile();
}
示例13: sources_add_group_popup
function sources_add_group_popup()
{
$boot = new boostrap_form();
$sock = new sockets();
$users = new usersMenus();
$ldap = new clladp();
$ID = $_GET["groupid"];
$title_button = "{add}";
$title = "{new_group}";
if ($ID > 0) {
$sql = "SELECT * FROM authenticator_auth WHERE ID='{$ID}'";
$q = new mysql_squid_builder();
$ligne = @mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
if (!$q->ok) {
echo "<p class=text-error>{$q->mysql_error}</p>";
}
$title_button = "{apply}";
$title = $ligne["groupname"] . " »» " . $GLOBALS["TYPES"][$ligne["group_type"]];
}
$mainrule = $_GET["mainrule"];
if (!is_numeric($mainrule)) {
$mainrule = 0;
}
$boot->set_formtitle($title);
$boot->set_hidden("rules-sources-add-group-save", "yes");
$boot->set_hidden("mainrule", $mainrule);
$boot->set_hidden("groupid", $ID);
$boot->set_field("groupname", "{groupname}", $ligne["groupname"], array("ENCODE" => true));
$boot->set_checkbox("enabled", "{enabled}", $ligne["enabled"]);
if ($ID == 0) {
$boot->set_list("group_type", "{groupe_type}", $GLOBALS["TYPES"], $ligne["group_type"]);
} else {
$boot->set_hidden("group_type", $ligne["group_type"]);
}
$boot->set_button($title_button);
$AdminPrivs = AdminPrivs();
if (!$AdminPrivs) {
$boot->set_form_locked();
}
if ($ID == 0) {
$boot->set_CloseYahoo("YahooWin3");
}
$boot->set_RefreshSearchs();
echo $boot->Compile();
}
示例14: 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();
}
示例15: 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();
}