本文整理汇总了PHP中boostrap_form::set_hidden方法的典型用法代码示例。如果您正苦于以下问题:PHP boostrap_form::set_hidden方法的具体用法?PHP boostrap_form::set_hidden怎么用?PHP boostrap_form::set_hidden使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类boostrap_form
的用法示例。
在下文中一共展示了boostrap_form::set_hidden方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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();
}
示例2: 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();
}
示例3: bridge_popup
function bridge_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")));
$IP = new networking();
while (list($key, $value) = each($nics)) {
$array = $IP->GetNicInfos($value);
$NICZ[$value] = $value . " [{$array["IPADDR"]}]";
}
$boot->set_list("nic_inbound", "{from}", $NICZ, null);
$boot->set_list("nic_linked", "{to}", $NICZ, null);
$boot->set_hidden("ID", $_GET["ID"]);
if (!$users->AsSystemAdministrator) {
$boot->set_form_locked();
}
if ($ID == 0) {
$boot->set_CloseYahoo("YahooWin2");
}
$boot->set_RefreshSearchs();
echo $boot->Compile();
}
示例4: 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();
}
示例5: page_popup
function page_popup()
{
$boot = new boostrap_form();
$sock = new sockets();
$users = new usersMenus();
$ldap = new clladp();
$ID = $_GET["ID"];
$title_button = "{add}";
$title = "{new_error_page}";
$f = new squid_reverse();
if ($ID > 0) {
$sql = "SELECT * FROM nginx_error_pages 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["pagename"] . " »» " . $ligne["error_code"];
}
while (list($key, $value) = each($f->errors_page)) {
$errors_code[$value] = $value;
}
$boot->set_formtitle($title);
$boot->set_hidden("page-save", "yes");
$boot->set_hidden("ID", $ID);
$boot->set_field("pagename", "{pagename}", $ligne["pagename"], array("ENCODE" => true));
$boot->set_list("error_code", "{error_code}", $errors_code, $ligne["error_code"]);
$boot->set_field("title", "{page_title}", $ligne["title"], array("ENCODE" => true));
$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();
}
示例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);
}
示例7: 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();
}
示例8: new_port
function new_port()
{
$t = $_GET["t"];
include_once dirname(__FILE__) . "/ressources/class.system.network.inc";
$page = CurrentPageName();
$tpl = new templates();
$boot = new boostrap_form();
$ip = new networking();
$ips = $ip->ALL_IPS_GET_ARRAY();
$ipz["0.0.0.0"] = "{all}";
while (list($ip, $line) = each($ips)) {
$ipz[$ip] = $ip;
}
$boot->set_field("portname", "{rulename}", "MyNew port", array("ENCODE" => true));
$boot->set_field("aclport", "{listen_port}", "9090");
$boot->set_list("interface", "{listen_address}", $ipz, "0.0.0.0");
$boot->set_button("{add}");
$boot->set_hidden("bubble-add", "yes");
$boot->set_formtitle("{new_port}");
$boot->set_CallBack("LoadAjax('center-{$t}','{$page}?tabs=yes&t={$t}');");
$form = $boot->Compile();
echo $tpl->_ENGINE_parse_body($form);
}
示例9: cache_popup
function cache_popup()
{
$tpl = new templates();
$page = CurrentPageName();
$servername = $_GET["servername"];
$q = new mysql_squid_builder();
$title = "{new_cache}";
$bt = "{add}";
$ID = $_GET["ID"];
$boot = new boostrap_form();
$sock = new sockets();
$NginxProxyStorePath = $sock->GET_INFO("NginxProxyStorePath");
if ($NginxProxyStorePath == null) {
$NginxProxyStorePath = "/home/nginx";
}
if ($ID > 0) {
$q = new mysql_squid_builder();
$ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM nginx_caches WHERE ID='{$ID}'"));
$bt = "{apply}";
$title = "{$ligne["keys_zone"]}";
}
if ($ligne["keys_zone"] == null) {
$ligne["keys_zone"] = time();
}
if (trim($ligne["directory"]) == null) {
$ligne["directory"] = $NginxProxyStorePath . "/{$ligne["keys_zone"]}";
}
if ($ligne["levels"] == null) {
$ligne["levels"] = "1:2";
}
if (!is_numeric($ligne["keys_zone_size"])) {
$ligne["keys_zone_size"] = 1;
}
if (!is_numeric($ligne["max_size"])) {
$ligne["max_size"] = 2;
}
if (!is_numeric($ligne["inactive"])) {
$ligne["inactive"] = 10;
}
if (!is_numeric($ligne["loader_files"])) {
$ligne["loader_files"] = 100;
}
if (!is_numeric($ligne["loader_sleep"])) {
$ligne["loader_sleep"] = 10;
}
if (!is_numeric($ligne["loader_threshold"])) {
$ligne["loader_threshold"] = 100;
}
$boot->set_hidden("ID", $ID);
$boot->set_formtitle($title);
$boot->set_field("keys_zone", "{name}", $ligne["keys_zone"]);
$boot->set_field("directory", "{directory}", $ligne["directory"], array("BROWSE" => true, "MANDATORY" => true, "ENCODE" => true));
$boot->set_field("levels", "{levels}", $ligne["levels"]);
$boot->set_field("keys_zone_size", "{memory_size} (MB)", $ligne["keys_zone_size"]);
$boot->set_field("max_size", "{max_size} (GB)", $ligne["max_size"]);
$boot->set_field("inactive", "{inactive} ({minutes})", $ligne["inactive"], array("TOOLTIP" => "{nginx_inactive_explain}"));
$boot->set_field("loader_files", "{loader_files}", $ligne["loader_files"]);
$boot->set_field("loader_sleep", "{loader_sleep} {milliseconds}", $ligne["loader_sleep"]);
$boot->set_field("loader_threshold", "{loader_threshold} {milliseconds}", $ligne["loader_threshold"]);
$boot->set_button($bt);
if ($servername == null) {
$boot->set_CloseYahoo("YahooWin");
}
$boot->set_RefreshSearchs();
if (!AdminPrivs()) {
$boot->set_form_locked();
}
echo $boot->Compile();
}
示例10: remotedomain_add
function remotedomain_add()
{
$ldap = new clladp();
$ou = $_SESSION["ou"];
$btname = "{add}";
$domain = $_GET["domain"];
if ($domain != null) {
$btname = "{apply}";
}
if ($ou == null) {
$ou = $ldap->ou_by_smtp_domain($domain);
}
$HashDomains = $ldap->Hash_relay_domains();
$tools = new DomainsTools();
$arr = $tools->transport_maps_explode($HashDomains[$domain]);
$dn = "cn=@{$domain},cn=relay_recipient_maps,ou={$ou},dc=organizations,{$ldap->suffix}";
$trusted_smtp_domain = 0;
if ($ldap->ExistsDN($dn)) {
$trusted_smtp_domain = 1;
}
if (!is_numeric($arr[2])) {
$arr[2] = 25;
}
if ($arr[3] == null) {
$arr[3] = 0;
} else {
if ($arr[3] == "no") {
$arr[3] = 0;
} else {
$arr[3] = 1;
}
}
$boot = new boostrap_form();
$ldap = new clladp();
if ($domain != null) {
$boot->set_field("remotedomain", "{domain}", $domain, array("MANDATORY" => true, "DISABLED" => true));
} else {
$boot->set_field("remotedomain", "{domain}", $domain, array("MANDATORY" => true));
}
$users = new usersMenus();
if ($users->AsPostfixAdministrator) {
$ous = $ldap->hash_get_ou(true);
$boot->set_list("ou", "{ou}", $ous, $ou);
} else {
$boot->set_hidden("ou", $ou);
}
$boot->set_field("destination", "{destination}", $arr[1], null, array("MANDATORY" => true));
$boot->set_field("destination_port", "{port}", $arr[2], null, array("MANDATORY" => true));
$boot->set_checkbox("MX", "{MX_lookups}", $arr[3], array('TOOLTIP' => "{mx_look}"));
$boot->set_checkbox("trusted_smtp_domain", "{trusted_smtp_domain}", $trusted_smtp_domain, array('TOOLTIP' => "{trusted_smtp_domain_text}"));
$boot->set_button($btname);
$boot->set_RefreshSearchs();
$boot->set_CloseYahoo("YahooWin");
echo $boot->Compile();
}
示例11: firewall_popup
function firewall_popup()
{
$ID = $_GET["ID"];
$q = new mysql_squid_builder();
$bt = "{apply}";
$servername = $_GET["servername"];
if (!$q->TABLE_EXISTS("nginx_exploits_fw")) {
$sql = "CREATE TABLE IF NOT EXISTS `nginx_exploits_fw` (\n\t\t`servername` CHAR(255) NOT NULL PRIMARY KEY,\n\t\t`maxaccess` smallint(1) NOT NULL DEFAULT 0,\n\t\t`sendlogs` smallint(1) NOT NULL DEFAULT 0,\n\t\tKEY `maxaccess` (`maxaccess`),\n\t\tKEY `sendlogs` (`sendlogs`)\n\t\t) ENGINE = MYISAM;";
if (!$q->QUERY_SQL($sql)) {
echo $q->mysql_error_html();
}
}
$ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM nginx_exploits_fw WHERE servername='{$servername}'"));
if (!is_numeric($ligne["maxaccess"])) {
$ligne["maxaccess"] = 0;
}
$boot = new boostrap_form();
$sock = new sockets();
$boot->set_hidden("servername", $_GET["servername"]);
$boot->set_hidden("firewall", $_GET["servername"]);
$boot->set_formtitle("{firewall}");
$boot->set_formdescription("{NGINX_FW_EXPLAIN}");
$boot->set_field("maxaccess", "{MAX_EVENTS}", $ligne["maxaccess"], array("TOOLTIP" => "{NGINX_MAXACCESS_FW_EXPLAIN}"));
$boot->set_checkbox("sendlogs", "{write_logs}", $ligne["sendlogs"]);
$boot->set_button($bt);
if ($ID == 0) {
$boot->set_CloseYahoo("YahooWin4");
}
$boot->set_RefreshSearchs();
echo $boot->Compile();
}
示例12: add_www_import
function add_www_import()
{
$boot = new boostrap_form();
$boot->set_formdescription("{free_catgorized_explain}");
$boot->set_hidden("category", $_GET["category"]);
$boot->set_checkbox("ForceCat", "{force}", 0, array("TOOLTIP" => "{free_cat_force_explain}"));
$boot->set_textarea("categorize", "{items}", null, array("HEIGHT" => 250));
$boot->set_button("{add}");
$boot->set_RefreshSearchs();
$boot->set_RefreshSearchsForced();
echo $boot->Compile();
}
示例13: add_user_popup
function add_user_popup()
{
$ldap = new clladp();
if ($_GET["ou"] == null) {
senderror("{ERROR_NO_ORGANISATION_SELECTED}");
}
$hash = $ldap->hash_groups($_GET["ou"], 1);
$domains = $ldap->hash_get_domains_ou($_GET["ou"]);
$boot = new boostrap_form();
$boot->set_hidden("ou", $_GET["ou"]);
$boot->set_hidden("encpass", 1);
$boot->set_field("new_userid", "{name_the_new_account_title}", null, array("MANDATORY" => true));
$boot->set_field("password", "{password}", null, array("MANDATORY" => true));
$boot->set_field("email", "{email}", null, array("MANDATORY" => true));
$boot->set_field("password", "{password}", null, array("MANDATORY" => true, "ENCODE" => true));
$boot->set_list("group_id", "{group}", $hash);
$boot->set_button("{add}");
$boot->set_CloseYahoo("YahooWin2");
$boot->set_RefreshSearchs();
$boot->setAjaxPage("domains.edit.user.php");
$boot->set_formtitle("{$_GET["ou"]}:: {new_member}");
echo $boot->Compile();
}
示例14: bridge_popup
function bridge_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_bridge WHERE ID='{$ID}'";
$q = new mysql();
$ligne = @mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
$title_button = "{apply}";
}
$nics_array[null] = "{select}";
$ous[null] = "{select}";
$boot->set_field("name", "{name}", $ligne["name"]);
$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("broadcast", "{broadcast}", $ligne["broadcast"], array("IPV4" => true));
$boot->set_field("gateway", "{gateway}", $ligne["gateway"], array("IPV4" => true));
$boot->set_hidden("ID", $_GET["ID"]);
if (!$users->AsSystemAdministrator) {
$boot->set_form_locked();
}
if ($ID == 0) {
$boot->set_CloseYahoo("YahooWin2");
}
$boot->set_RefreshSearchs();
echo $boot->Compile();
}
示例15: failover
function failover()
{
//this_feature_is_disabled_corp_license
$users = new usersMenus();
$boot = new boostrap_form();
$tpl = new templates();
$t = time();
$page = CurrentPageName();
$sock = new sockets();
$eth = $_GET["nic"];
$nic = new system_nic($eth);
for ($i = 1; $i < 256; $i++) {
$ucarp_vids[$i] = $i;
}
$boot->set_hidden("save_nic", $eth);
$array = unserialize(base64_decode($sock->getFrameWork("system.php?ucarp-status={$eth}")));
if (!isset($array["PID"])) {
$boot->set_formdescription("{status}:{stopped}");
$boot->set_Newbutton("{start}", "Start{$t}()");
} else {
$boot->set_Newbutton("{stop}", "Stop{$t}()");
$boot->set_formdescription("{status}:{running} PID:{$array["PID"]} {since} {$array["TIME"]}Mn");
}
$XHR = array();
$XHR["start-vip"] = "yes";
$boot->set_AddScript("Start{$t}", array("XHR" => $XHR));
$XHR = array();
$XHR["stop-vip"] = "yes";
$boot->set_AddScript("Stop{$t}", array("XHR" => $XHR));
$boot->set_checkbox("ucarp_enabled", "{enabled}", $nic->ucarp_enabled, array("DISABLEALL" => true));
$boot->set_checkbox("ucarp_master", "{isamaster}", $nic->ucarp_master, array("TOOLTIP" => "{ucarp_master_explain}"));
$boot->set_list("ucarp_vid", "{ucarp-vid}", $ucarp_vids, $nic->ucarp_vid);
$boot->set_field("ucarp_vip", "{ucarp-vip}", $nic->ucarp_vip, array("MANDATORY" => true, "IPV4" => true, "TOOLTIP" => "{ucarp_vip_explain}"));
$boot->set_list("ucarp_advskew", "{ucarp-advskew}", $ucarp_vids, $nic->ucarp_advskew);
$boot->set_field("ucarp_advbase", "{interval} ({seconds})", $nic->ucarp_advbase, array("MANDATORY" => true));
$boot->set_button("{apply}");
$boot->set_RefreshSearchs();
if (!$users->AsSystemAdministrator) {
$boot->set_form_locked();
}
if (!$users->CORP_LICENSE) {
$error = "<p class=text-error>{this_feature_is_disabled_corp_license}</p>";
$boot->set_form_locked();
}
$form = $boot->Compile();
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($error . $form);
}