本文整理汇总了PHP中boostrap_form::set_AddScript方法的典型用法代码示例。如果您正苦于以下问题:PHP boostrap_form::set_AddScript方法的具体用法?PHP boostrap_form::set_AddScript怎么用?PHP boostrap_form::set_AddScript使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类boostrap_form
的用法示例。
在下文中一共展示了boostrap_form::set_AddScript方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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);
}