本文整理汇总了PHP中Form_Button类的典型用法代码示例。如果您正苦于以下问题:PHP Form_Button类的具体用法?PHP Form_Button怎么用?PHP Form_Button使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Form_Button类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($submit = null)
{
if (!isset($submit)) {
$submit = gettext('Save');
}
if (gettype($submit) == 'string') {
$submit = new Form_Button('save', $submit, null, 'fa-save');
$submit->addClass('btn-primary');
}
if (false !== $submit) {
$this->addGlobal($submit);
}
if (!isset($this->_attributes['action'])) {
$this->_attributes['action'] = $_SERVER['REQUEST_URI'];
}
}
示例2: Form_Section
$section = new Form_Section('Domain override options');
$section->addInput(new Form_Input('host', 'Host', 'text', $pconfig['host']))->setHelp('Name of the host, without the domain part' . '<br />' . 'e.g.: "myhost"');
$section->addInput(new Form_Input('domain', 'Domain', 'text', $pconfig['domain']))->setHelp('Domain of the host' . '<br />' . 'e.g.: "example.com"');
$section->addInput(new Form_IpAddress('ip', 'IP Address', $pconfig['ip']))->setHelp('IP address of the host' . '<br />' . 'e.g.: 192.168.100.100 or fd00:abcd::1');
$section->addInput(new Form_Input('descr', 'Description', 'text', $pconfig['descr']))->setHelp('You may enter a description here for your reference (not parsed).');
if (isset($id) && $a_hosts[$id]) {
$section->addInput(new Form_Input('id', null, 'hidden', $pconfig['id']));
}
$form->add($section);
$section = new Form_Section('Additional names for this host');
if ($pconfig['aliases']['item']) {
$counter = 0;
$last = count($pconfig['aliases']['item']) - 1;
foreach ($pconfig['aliases']['item'] as $item) {
$group = new Form_Group(null);
$group->add(new Form_Input('aliashost' . $counter, null, 'text', $item['host']))->setHelp($counter == $last ? 'Host name' : null);
$group->add(new Form_Input('aliasdomain' . $counter, null, 'text', $item['domain']))->setHelp($counter == $last ? 'Value' : null);
$group->add(new Form_Input('aliasdescription' . $counter, null, 'text', $item['description']))->setHelp($counter == $last ? 'Description' : null);
$btn = new Form_Button('btn' . $counter, 'Delete', 'services_dnsmasq_edit.php?act=delopt' . '&id=' . $counter);
$btn->removeClass('btn-primary')->addClass('btn-danger btn-sm');
$group->add($btn);
$section->add($group);
$counter++;
}
}
$btnaddopt = new Form_Button('btnaddopt', 'Add Option', 'services_dnsmasq_edit.php?act=addopt');
$btnaddopt->removeClass('btn-primary')->addClass('btn-success btn-sm');
$section->addInput($btnaddopt);
$form->add($section);
print $form;
include "foot.inc";
示例3: Form_StaticText
$btndyndns->removeClass('btn-primary')->addClass('btn-default btn-sm');
$section->addInput(new Form_StaticText('Dynamic DNS', $btndyndns . ' ' . 'Show dynamic DNS settings'));
$section->addInput(new Form_Checkbox('ddnsupdate', 'DHCP Registration', 'Enable registration of DHCP client names in DNS.', $pconfig['ddnsupdate']));
$section->addInput(new Form_Input('ddnsdomain', 'DDNS Domain', 'text', $pconfig['ddnsdomain']))->setHelp('Leave blank to disable dynamic DNS registration. Enter the dynamic DNS domain which will be used to register client names in the DNS server.');
$section->addInput(new Form_IpAddress('ddnsdomainprimary', 'DDNS Server IP', $pconfig['ddnsdomainprimary']))->setHelp('Enter the primary domain name server IP address for the dynamic domain name.');
$section->addInput(new Form_Input('ddnsdomainkeyname', 'DDNS Domain Key name', 'text', $pconfig['ddnsdomainkeyname']))->setHelp('Enter the dynamic DNS domain key name which will be used to register client names in the DNS server.');
$section->addInput(new Form_Input('ddnsdomainkey', 'DDNS Domain Key secret', 'text', $pconfig['ddnsdomainkey']))->setHelp('Enter the dynamic DNS domain key secret which will be used to register client names in the DNS server.');
$btnntp = new Form_Button('btnntp', 'Advanced');
$btnntp->removeClass('btn-primary')->addClass('btn-default btn-sm');
$section->addInput(new Form_StaticText('NTP servers', $btnntp . ' ' . 'Show NTP Configuration'));
$group = new Form_Group('NTP Servers');
$group->add(new Form_Input('ntp1', 'NTP Server 1', 'text', $pconfig['ntp1'], ['placeholder' => 'NTP 1']));
$group->add(new Form_Input('ntp2', 'NTP Server 2', 'text', $pconfig['ntp2'], ['placeholder' => 'NTP 2']));
$group->addClass('ntpclass');
$section->add($group);
$btntftp = new Form_Button('btntftp', 'Advanced');
$btntftp->removeClass('btn-primary')->addClass('btn-default btn-sm');
$section->addInput(new Form_StaticText('TFTP servers', $btntftp . ' ' . 'Show TFTP Configuration'));
$section->addInput(new Form_Input('tftp', 'TFTP Server', 'text', $pconfig['tftp']))->setHelp('Leave blank to disable. Enter a full hostname or IP for the TFTP server.');
$form->add($section);
print $form;
?>
<script type="text/javascript">
//<![CDATA[
events.push(function() {
function hideDDNS(hide) {
hideCheckbox('ddnsupdate', hide);
hideInput('ddnsdomain', hide);
hideInput('ddnsdomainprimary', hide);
示例4: array
if (isset($config['system']['lb_use_sticky'])) {
$tab_array[] = array(gettext("Source Tracking"), false, "diag_dump_states_sources.php");
}
$tab_array[] = array(gettext("Reset States"), false, "diag_resetstate.php");
display_top_tabs($tab_array);
// Start of tab content
$current_statecount = `pfctl -si | grep "current entries" | awk '{ print \$3 }'`;
require_once 'classes/Form.class.php';
$form = new Form(false);
$section = new Form_Section('State filter');
$section->addInput(new Form_Input('filter', 'Filter expression', 'text', $_POST['filter'], ['placeholder' => 'Simple filter such as 192.168, v6, icmp or ESTABLISHED']));
$filterbtn = new Form_Button('filterbtn', 'Filter', null);
$filterbtn->removeClass('btn-primary')->addClass('btn-default btn-sm');
$section->addInput(new Form_StaticText('', $filterbtn));
if (isset($_POST['filter']) && (is_ipaddr($_POST['filter']) || is_subnet($_POST['filter']))) {
$killbtn = new Form_Button('killfilter', 'Kill States');
$killbtn->removeClass('btn-primary')->addClass('btn-danger btn-sm');
$section->addInput(new Form_StaticText('Kill filtered states', $killbtn))->setHelp('Remove all states to and from the filtered address');
}
$form->add($section);
print $form;
?>
<table class="table table-striped">
<thead>
<tr>
<th><?php
echo gettext("Int");
?>
</th>
<th><?php
echo gettext("Proto");
示例5: array
}
return $portlist;
}
$pgtitle = array(gettext("Interfaces"), gettext("Bridges"), gettext("Edit"));
$shortcut_section = "interfaces";
include "head.inc";
if ($input_errors) {
print_input_errors($input_errors);
}
$form = new Form();
$section = new Form_Section('Bridge Configuration');
$memberslist = build_port_list($pconfig['members']);
$section->addInput(new Form_Select('members', 'Member Interfaces', $memberslist['selected'], $memberslist['list'], true))->setHelp('Interfaces participating in the bridge.');
$section->addInput(new Form_Input('descr', 'Description', 'text', $pconfig['descr']));
// Advanced Additional options
$btnadv = new Form_Button('btnadvopts', 'Display Advanced', null, 'fa-cog');
$btnadv->setAttribute('type', 'button')->addClass('btn-info btn-sm');
$section->addInput(new Form_StaticText('Advanced Options', $btnadv));
$form->add($section);
$section = new Form_Section('Advanced Configuration');
$section->addClass('adnlopts');
$section->addInput(new Form_Input('maxaddr', 'Cache Size', 'text', $pconfig['maxaddr']))->setHelp('Set the size of the bridge address cache. The default is 2000 entries.');
$section->addInput(new Form_Input('timeout', 'Cache expire time', 'text', $pconfig['timeout']))->setHelp('Set the timeout of address cache entries to this number of seconds. If seconds is zero, then address cache entries will not be expired. The default is 1200 seconds.');
$spanlist = build_port_list($pconfig['span']);
$section->addInput(new Form_Select('span', 'Span Port', $spanlist['selected'], $spanlist['list'], true))->setHelp('Add the interface named by interface as a span port on the bridge. Span ports transmit a copy of every frame received by the bridge. ' . 'This is most useful for snooping a bridged network passively on another host connected to one of the span ports of the bridge. <br />' . '%sThe span interface cannot be part of the bridge member interfaces.%s', ['<strong>', '</strong>']);
$edgelist = build_port_list($pconfig['edge']);
$section->addInput(new Form_Select('edge', 'Edge Ports', $edgelist['selected'], $edgelist['list'], true))->setHelp('Set interface as an edge port. An edge port connects directly to end stations and cannot create bridging loops in the network; this allows it to transition straight to forwarding.');
$edgelist = build_port_list($pconfig['autoedge']);
$section->addInput(new Form_Select('autoedge', 'Auto Edge Ports', $edgelist['selected'], $edgelist['list'], true))->setHelp('Allow interface to automatically detect edge status. This is the default for all interfaces added to a bridge.' . '%sThis will disable the autoedge status of interfaces. %s', ['<strong>', '</strong>']);
$edgelist = build_port_list($pconfig['ptp']);
$section->addInput(new Form_Select('ptp', 'PTP Ports', $edgelist['selected'], $edgelist['list'], true))->setHelp('Set the interface as a point-to-point link. This is required for straight transitions to forwarding and should be enabled on a direct link to another RSTP-capable switch.');
示例6: print_info_box
}
if ($savemsg) {
print_info_box($savemsg, 'success');
}
$cols = 0;
$savevalue = gettext("Save");
if ($pkg['savetext'] != "") {
$savevalue = $pkg['savetext'];
}
$savehelp = "";
if ($pkg['savehelp'] != "") {
$savehelp = $pkg['savehelp'];
}
$grouping = false;
// Indicates the elements we are composing are part of a combined group
$savebutton = new Form_Button('submit', $savevalue);
if ($savehelp) {
$savebutton->setHelp($savehelp);
}
$form = new Form($savebutton);
$form->addGlobal(new Form_Input('xml', null, 'hidden', $xml));
/* If a package's XML has <advanced_options/> configured, then setup
* the section for the fields that have <advancedfield/> set.
* These fields will be placed below other fields in a separate area titled 'Advanced Features'.
* These advanced fields are not normally configured and generally left to default to 'default settings'.
*/
if ($pkg['advanced_options'] == "enabled") {
$advfield_count = 0;
$advanced = new Form_Section("Advanced Features");
$advanced->addClass('advancedoptions');
}
示例7: str_replace
exit;
}
}
// Get the MAC address
$ip = $_SERVER['REMOTE_ADDR'];
$mymac = `/usr/sbin/arp -an | grep '('{$ip}')' | head -n 1 | cut -d" " -f4`;
$mymac = str_replace("\n", "", $mymac);
include "head.inc";
if ($input_errors) {
print_input_errors($input_errors);
}
$form = new Form();
$section = new Form_Section('Edit MAC Address Rules');
$section->addInput(new Form_Select('action', 'Action', strtolower($pconfig['action']), array('pass' => gettext('Pass'), 'block' => gettext('Block'))))->setHelp('Choose what to do with packets coming from this MAC address.');
$macaddress = new Form_Input('mac', 'MAC Address', 'text', $pconfig['mac'], ['placeholder' => 'xx:xx:xx:xx:xx:xx']);
$btnmymac = new Form_Button('btnmymac', 'Copy My MAC', null, 'fa-clone');
$btnmymac->setAttribute('type', 'button')->removeClass('btn-primary')->addClass('btn-success btn-sm');
$group = new Form_Group('MAC Address');
$group->add($macaddress);
$group->add($btnmymac);
$group->setHelp('6 hex octets separated by colons');
$section->add($group);
$section->addInput(new Form_Input('descr', 'Description', 'text', $pconfig['descr']))->setHelp('A description may be entered here for administrative reference (not parsed)');
$section->addInput(new Form_Input('bw_up', 'Bandwidth up', 'text', $pconfig['bw_up']))->setHelp('Enter an upload limit to be enforced on this MAC in Kbit/s');
$section->addInput(new Form_Input('bw_down', 'Bandwidth down', 'text', $pconfig['bw_down']))->setHelp('Enter a download limit to be enforced on this MAC in Kbit/s');
$section->addInput(new Form_Input('zone', null, 'hidden', $cpzone));
if (isset($id) && $a_passthrumacs[$id]) {
$section->addInput(new Form_Input('id', null, 'hidden', $id));
}
if (isset($pconfig['username']) && $pconfig['username']) {
$section->addInput(new Form_Input('username', null, 'hidden', $pconfig['username']));
示例8: foreach
foreach ($item as $ww) {
$wws = explode(":", $ww);
$user = $wws[0];
$passwd = base64_decode($wws[1]);
$ip = $wws[2];
$group = new Form_Group($counter == 0 ? 'User table' : null);
$group->addClass('repeatable');
$group->add(new Form_Input('username' . $counter, null, 'text', $user))->setHelp($numrows == $counter ? 'Username' : null);
$group->add(new Form_Input('password' . $counter, null, 'password', $passwd))->setHelp($numrows == $counter ? 'Password' : null);
$group->add(new Form_IpAddress('ip' . $counter, null, $ip))->setHelp($numrows == $counter ? 'IP Address' : null);
$group->add(new Form_Button('deleterow' . $counter, 'Delete', null, 'fa-trash'))->addClass('btn-warning');
$section->add($group);
$counter++;
}
}
$btnaddrow = new Form_Button('addrow', 'Add user', null, 'fa-plus');
$btnaddrow->addClass('btn-success');
$section->addInput(new Form_StaticText(null, ' ' . $btnaddrow));
// Hidden fields
if (isset($id)) {
$section->addInput(new Form_Input('id', null, 'hidden', htmlspecialchars($id, ENT_QUOTES | ENT_HTML401)));
}
if (isset($pconfig['pppoeid'])) {
$section->addInput(new Form_Input('pppoeid', null, 'hidden', $pconfig['pppoeid']));
}
$form->add($section);
print $form;
print_info_box(gettext('Don\'t forget to add a firewall rule to permit traffic from PPPoE clients.'));
?>
<script type="text/javascript">
//<![CDATA[
示例9: Form_Section
$section = new Form_Section('State Filter', 'secfilter', COLLAPSIBLE | SEC_OPEN);
$iflist = get_configured_interface_with_descr();
$iflist['lo0'] = "lo0";
$iflist['all'] = "all";
if (isset($_POST['interface'])) {
$ifselect = $_POST['interface'];
} else {
$ifselect = "all";
}
$section->addInput(new Form_Select('interface', 'Interface', $ifselect, $iflist));
$section->addInput(new Form_Input('filter', 'Filter expression', 'text', $_POST['filter'], ['placeholder' => 'Simple filter such as 192.168, v6, icmp or ESTABLISHED']));
$filterbtn = new Form_Button('filterbtn', 'Filter', null, 'fa-filter');
$filterbtn->addClass('btn-primary btn-sm');
$section->addInput(new Form_StaticText('', $filterbtn));
if (isset($_POST['filter']) && (is_ipaddr($_POST['filter']) || is_subnet($_POST['filter']))) {
$killbtn = new Form_Button('killfilter', 'Kill States', null, 'fa-trash');
$killbtn->addClass('btn-danger btn-sm');
$section->addInput(new Form_StaticText('Kill filtered states', $killbtn))->setHelp('Remove all states to and from the filtered address');
}
$form->add($section);
print $form;
?>
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?php
echo gettext("States");
?>
</h2></div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table-condensed table-hover sortable-theme-bootstrap" data-sortable>
<thead>
示例10: Form_Select
$section->add($group);
$section->addInput(new Form_Select('device', 'Device: /dev/', false, array_combine($devs, $devs)));
$section->addInput(new Form_StaticText('', $btntest));
$form->add($section);
print $form;
// Logs
$form = new Form(false);
$btnview = new Form_Button('submit', 'View');
$section = new Form_Section('View Logs');
$section->addInput(new Form_Input('action', null, 'hidden', 'logs'));
$group = new Form_Group('Log type');
$group->add(new Form_Checkbox('type', null, 'Error', true, 'error'))->displayAsRadio();
$group->add(new Form_Checkbox('type', null, 'Self-test', false, 'selftest'))->displayAsRadio();
$section->add($group);
$section->addInput(new Form_Select('device', 'Device: /dev/', false, array_combine($devs, $devs)));
$section->addInput(new Form_StaticText('', $btnview));
$form->add($section);
print $form;
// Abort
$btnabort = new Form_Button('submit', 'Abort');
$btnabort->removeClass('btn-primary')->addClass('btn-danger');
$form = new Form(false);
$section = new Form_Section('Abort');
$section->addInput(new Form_Input('action', null, 'hidden', 'abort'));
$section->addInput(new Form_Select('device', 'Device: /dev/', false, array_combine($devs, $devs)));
$section->addInput(new Form_StaticText('', $btnabort));
$form->add($section);
print $form;
break;
}
include "foot.inc";
示例11: display_top_tabs
display_top_tabs($tab_array);
$form = new Form();
if (isset($groupid)) {
$form->addGlobal(new Form_Input('groupid', null, 'hidden', $groupid));
}
$section = new Form_Section('Add privileges for ' . $a_group['name']);
$priv_list = array_map(function ($p) {
return $p['name'];
}, $priv_list);
asort($priv_list, SORT_STRING | SORT_FLAG_CASE);
$section->addInput(new Form_Select('sysprivs', 'Assigned privileges', $a_group['priv'], build_priv_list(), true))->addClass('multiselect')->setHelp('Hold down CTRL (PC)/COMMAND (Mac) key to select multiple items.')->setAttribute('style', 'height:400px;');
$section->addInput(new Form_Input('filtertxt', 'Filter', 'text', null))->setHelp('Show only the choices containing this term');
$btnfilter = new Form_Button('btnfilter', 'Filter', null, 'fa-filter');
$btnfilter->addClass('btn btn-info');
$form->addGlobal($btnfilter);
$btnclear = new Form_Button('btnclear', 'Clear', null, 'fa-times');
$btnclear->addClass('btn btn-warning');
$form->addGlobal($btnclear);
$form->add($section);
print $form;
?>
<div class="panel panel-body alert-info col-sm-10 col-sm-offset-2" id="pdesc">Select a privilege from the list above for a description</div>
<script type="text/javascript">
//<![CDATA[
events.push(function() {
<?php
// Build a list of privilege descriptions
if (is_array($priv_list)) {
$id = 0;
示例12: Form_Select
}
if (is_pppoe_server_enabled() && have_ruleint_access("pppoe")) {
$interfaces['pppoe'] = "PPPoE Server";
}
/* add ipsec interfaces */
if (ipsec_enabled() && have_ruleint_access("enc0")) {
$interfaces["enc0"] = "IPsec";
}
/* add openvpn/tun interfaces */
if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"]) {
$interfaces["openvpn"] = "OpenVPN";
}
$section->addInput(new Form_Select('interface', 'Interface', $pconfig['interface'], $interfaces))->setHelp('Choose which interface this rule applies to. In most cases "WAN" is specified.');
$protocols = "TCP UDP TCP/UDP ICMP ESP AH GRE IPV6 IGMP PIM OSPF";
$section->addInput(new Form_Select('proto', 'Protocol', $pconfig['proto'], array_combine(explode(" ", strtolower($protocols)), explode(" ", $protocols))))->setHelp('Choose which protocol this rule should match. In most cases "TCP" is specified.');
$btnsrcadv = new Form_Button('srcadv', 'Advanced');
$btnsrcadv->removeClass('btn-primary')->addClass('btn-default');
$section->addInput(new Form_StaticText('Source', $btnsrcadv));
$group = new Form_Group('Source');
$group->addClass('srcadv');
$group->add(new Form_Checkbox('srcnot', 'Source not', 'Invert match.', $pconfig['srcnot']))->setWidth(2);
$group->add(new Form_Select('srctype', null, srctype_selected(), build_srctype_list()))->setHelp('Type');
$group->add(new Form_IpAddress('src', null, is_specialnet($pconfig['src']) ? '' : $pconfig['src']))->setPattern('[.a-zA-Z0-9_]+')->addMask('srcmask', $pconfig['srcmask'])->setHelp('Address/mask');
$section->add($group);
$portlist = array("" => 'Other', 'any' => 'Any');
foreach ($wkports as $wkport => $wkportdesc) {
$portlist[$wkport] = $wkportdesc;
}
$group = new Form_Group('Source port range');
$group->addClass('srcportrange');
$group->add(new Form_Select('srcbeginport', null, $pconfig['srcbeginport'], $portlist))->setHelp('From port');
示例13: Form_StaticText
$section->addInput(new Form_StaticText('', $btntest));
$form->add($section);
print $form;
// Logs
$form = new Form(false);
$btnview = new Form_Button('submit', 'View', null, 'fa-file-text-o');
$btnview->addClass('btn-primary');
$btnview->setAttribute('id');
$section = new Form_Section('View Logs');
$section->addInput(new Form_Input('action', null, 'hidden', 'logs'))->setAttribute('id');
$group = new Form_Group('Log type');
$group->add(new Form_Checkbox('type', null, 'Error', true, 'error'))->displayAsRadio();
$group->add(new Form_Checkbox('type', null, 'Self-test', false, 'selftest'))->displayAsRadio();
$section->add($group);
$section->addInput(new Form_Select('device', 'Device: /dev/', false, array_combine($devs, $devs)))->setAttribute('id');
$section->addInput(new Form_StaticText('', $btnview));
$form->add($section);
print $form;
// Abort
$btnabort = new Form_Button('submit', 'Abort', null, 'fa-times');
$btnabort->addClass('btn-danger')->setAttribute('id');
$form = new Form(false);
$section = new Form_Section('Abort');
$section->addInput(new Form_Input('action', null, 'hidden', 'abort'))->setAttribute('id');
$section->addInput(new Form_Select('device', 'Device: /dev/', false, array_combine($devs, $devs)))->setAttribute('id');
$section->addInput(new Form_StaticText('', $btnabort));
$form->add($section);
print $form;
break;
}
include "foot.inc";
示例14: array
$tab_array[] = array(gettext("Groups"), true, "system_groupmanager.php");
$tab_array[] = array(gettext("Settings"), false, "system_usermanager_settings.php");
$tab_array[] = array(gettext("Authentication Servers"), false, "system_authservers.php");
display_top_tabs($tab_array);
$form = new Form();
if (isset($groupid)) {
$form->addGlobal(new Form_Input('groupid', null, 'hidden', $groupid));
}
$section = new Form_Section('Add Privileges for ' . $a_group['name']);
$section->addInput(new Form_Select('sysprivs', 'Assigned privileges', $a_group['priv'], build_priv_list(), true))->addClass('multiselect')->setHelp('Hold down CTRL (PC)/COMMAND (Mac) key to select multiple items.');
$section->addInput(new Form_Select('shadow', 'Shadow', null, build_priv_list(), true))->addClass('shadowselect')->setHelp('Hold down CTRL (PC)/COMMAND (Mac) key to select multiple items.');
$section->addInput(new Form_Input('filtertxt', 'Filter', 'text', null))->setHelp('Show only the choices containing this term');
$btnfilter = new Form_Button('btnfilter', 'Filter', null, 'fa-filter');
$btnfilter->setAttribute('type', 'button')->addClass('btn btn-info');
$form->addGlobal($btnfilter);
$btnclear = new Form_Button('btnclear', 'Clear', null, 'fa-times');
$btnclear->setAttribute('type', 'button')->addClass('btn btn-warning');
$form->addGlobal($btnclear);
$form->add($section);
print $form;
?>
<div class="panel panel-body alert-info col-sm-10 col-sm-offset-2" id="pdesc"><?php
echo gettext("Select a privilege from the list above for a description");
?>
</div>
<script type="text/javascript">
//<![CDATA[
events.push(function() {
<?php
示例15: gettext
?>
" />
<input name="sig_no" type="submit" class="btn btn-default" id="sig_no" value=" <?php
echo gettext("No");
?>
" />
</form>
<?php
} else {
// This is where the work gets done so Forms.classes will be used from this point
if (!is_subsystem_dirty('firmwarelock')) {
require_once 'classes/Form.class.php';
if (!is_subsystem_dirty('rebootreq')) {
// Provide a button to enable firmware upgrades. Upgrades should be disabled on initial page load
if (!is_subsystem_dirty('firmware') || !$_POST || $_POST['save']) {
$enablebtn = new Form_Button('Submit', 'Enable firmware upload');
$enablebtn->addClass('btn-warning');
$form = new Form($enablebtn);
$section = new Form_Section('Invoke ' . $g['product_name'] . ' Manual Upgrade');
$section->addInput(new Form_StaticText('Enable', 'Click the "Enable firmware upload" button below to begin.'));
} else {
// Upgrades are now enabled
$form = new Form('Disable firmware upload');
$form->setMultipartEncoding();
$section = new Form_Section('Perform ' . $g['product_name'] . ' Manual Upgrade');
if (!session_id()) {
$upload_id = uniqid();
} else {
$upload_id = session_id();
}
$section->addInput(new Form_Input('UPLOAD_IDENTIFIER', '', 'hidden', $upload_id));