本文整理汇总了PHP中print_info_box函数的典型用法代码示例。如果您正苦于以下问题:PHP print_info_box函数的具体用法?PHP print_info_box怎么用?PHP print_info_box使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了print_info_box函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Form_Select
$section->addInput(new Form_Select('n_l2tp_units', 'Number of L2TP users', $pconfig['n_l2tp_units'], array_combine(range(1, 255, 1), range(1, 255, 1))));
$section->addPassword(new Form_Input('secret', 'Secret', 'password', $pconfig['secret']))->setHelp('Specify optional secret shared between peers. Required on some devices/setups.');
$section->addInput(new Form_Select('paporchap', 'Authentication type', $pconfig['paporchap'], array('chap' => 'CHAP', 'chap-msv2' => 'MS-CHAPv2', 'pap' => 'PAP')))->setHelp('Specifies the protocol to use for authentication.');
$section->addInput(new Form_Input('l2tp_dns1', 'Primary L2TM DNS server', 'text', $pconfig['l2tp_dns1']));
$section->addInput(new Form_Input('l2tp_dns2', 'Secondary L2TM DNS server', 'text', $pconfig['l2tp_dns2']));
$form->add($section);
$section = new Form_Section("RADIUS");
$section->addClass('toggle-l2tp-enable');
$section->addInput(new Form_Checkbox('radiusenable', 'Enable', 'Use a RADIUS server for authentication', $pconfig['radiusenable']))->setHelp('When set, all users will be authenticated using the RADIUS server specified below. The local user database will not be used.');
$section->addInput(new Form_Checkbox('radacct_enable', 'Accounting', 'Enable RADIUS accounting', $pconfig['radacct_enable']))->setHelp('Sends accounting packets to the RADIUS server.');
$section->addInput(new Form_IpAddress('radiusserver', 'Server', $pconfig['radiusserver']))->setHelp('Enter the IP address of the RADIUS server.');
$section->addPassword(new Form_Input('radiussecret', 'Secret', 'password', $pconfig['radiussecret']))->setHelp('Enter the shared secret that will be used to authenticate to the RADIUS server.');
$section->addInput(new Form_Checkbox('radiusissueips', 'RADIUS issued IPs', 'Issue IP Addresses via RADIUS server.', $pconfig['radiusissueips']));
$form->add($section);
print $form;
print_info_box(gettext("Don't forget to add a firewall rule to permit traffic from L2TP clients!"), info);
?>
<script type="text/javascript">
//<![CDATA[
events.push(function() {
function setL2TP () {
hide = ! $('#mode').prop('checked');
hideClass('toggle-l2tp-enable', hide);
}
function setRADIUS () {
hide = ! $('#radiusenable').prop('checked');
示例2: array
$shortcut_section = "captiveportal-vouchers";
include "head.inc";
$tab_array = array();
$tab_array[] = array(gettext("Active Users"), false, "status_captiveportal.php?zone={$cpzone}");
$tab_array[] = array(gettext("Active Vouchers"), false, "status_captiveportal_vouchers.php?zone={$cpzone}");
$tab_array[] = array(gettext("Voucher Rolls"), false, "status_captiveportal_voucher_rolls.php?zone={$cpzone}");
$tab_array[] = array(gettext("Test Vouchers"), true, "status_captiveportal_test.php?zone={$cpzone}");
$tab_array[] = array(gettext("Expire Vouchers"), false, "status_captiveportal_expire.php?zone={$cpzone}");
display_top_tabs($tab_array);
require_once 'classes/Form.class.php';
$form = new Form();
$section = new Form_Section('Test Vouchers');
$section->addInput(new Form_Textarea('vouchers', 'Vouchers', $_POST['vouchers']))->setHelp('Enter multiple vouchers separated by space or newline. The remaining time, if valid, will be shown for each voucher.');
$section->addInput(new Form_Input('zone', null, 'hidden', $cpzone));
$form->add($section);
print $form;
if ($_POST) {
if ($_POST['vouchers']) {
$test_results = voucher_auth($_POST['vouchers'], 1);
$output = "";
foreach ($test_results as $result) {
if (strpos($result, " good ") || strpos($result, " granted ")) {
$output .= '<font color="green">' . htmlspecialchars($result) . '</font>' . '<br />';
} else {
$output .= '<font color="red">' . htmlspecialchars($result) . '</font>' . '<br />';
}
}
print_info_box($output);
}
}
include "foot.inc";
示例3: gettext
echo $i;
?>
"></a>
</td>
</tr>
<?php
$i++;
}
?>
</tbody>
</table>
</div>
</div>
<nav class="action-buttons">
<a href="services_unbound_domainoverride_edit.php" class="btn btn-sm btn-success">
<i class="fa fa-plus icon-embed-btn"></i>
<?php
echo gettext('Add');
?>
</a>
</nav>
<div class="infoblock">
<?php
echo print_info_box(sprintf(gettext("If the DNS Resolver is enabled, the DHCP" . " service (if enabled) will automatically serve the LAN IP" . " address as a DNS server to DHCP clients so they will use" . " the DNS Resolver. If Forwarding is enabled, the DNS Resolver will use the DNS servers" . " entered in %sSystem: General setup%s" . " or those obtained via DHCP or PPP on WAN if "Allow" . " DNS server list to be overridden by DHCP/PPP on WAN"" . " is checked."), '<a href="system.php">', '</a>'), 'info', false);
?>
</div>
<?php
include "foot.inc";
示例4: gettext
</button>
<button type="submit" id="order-store" name="order-store" class="btn btn-primary btn-sm" disabled title="<?php
echo gettext('Save mapping order');
?>
">
<i class="fa fa-save icon-embed-btn"></i>
<?php
echo gettext("Save");
?>
</button>
</nav>
</form>
<div class="infoblock">
<?php
echo print_info_box(gettext('Depending on the way your WAN connection is setup, you may also need a ') . '<a href="firewall_virtual_ip.php">' . gettext("Virtual IP.") . '</a>' . '<br />' . gettext('If you add a 1:1 NAT entry for any of the interface IPs on this system, ' . 'it will make this system inaccessible on that IP address. i.e. if ' . 'you use your WAN IP address, any services on this system (IPsec, OpenVPN server, etc.) ' . 'using the WAN IP address will no longer function.'), 'info', false);
?>
</div>
<script type="text/javascript">
//<![CDATA[
events.push(function() {
// Make rules sortable
$('table tbody.user-entries').sortable({
cursor: 'grabbing',
update: function(event, ui) {
$('#order-store').removeAttr('disabled');
dirty = true;
}
示例5: confirm
echo $i;
?>
" onclick="return confirm('<?php
echo gettext("Are you sure you want to delete this virtual server?");
?>
')"></a>
</td>
</tr>
<?php
$i++;
}
} else {
?>
<tr>
<td colspan="8"> <?php
print_info_box(gettext('No virtual servers have been configured'));
?>
</td>
</tr> <?php
}
?>
</tbody>
</table>
</div>
</div>
</form>
<nav class="action-buttons" style="margin-top: 10px;">
<a href="load_balancer_virtual_server_edit.php" class="btn btn-success btn-sm">
<i class="fa fa-plus" style="font-size:15px; vertical-align: middle; margin-right: 6px;"></i>
<?php
示例6: get_crash_report
</section>
<meta http-equiv="refresh" content="3;url=wizard.php">
<?php
exit;
}
?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php
$crash_report = get_crash_report();
if ($crash_report != '') {
print_info_box($crash_report);
}
$totalwidgets = count($widgetfiles);
$halftotal = $totalwidgets / 2 - 2;
$widgetcounter = 0;
$directory = "/usr/local/www/widgets/widgets/";
$printed = false;
$firstprint = false;
foreach ($widgetlist as $widget) {
if (!stristr($widget, "widget.php")) {
continue;
}
$periodpos = strpos($widget, ".");
$widgetname = substr($widget, 0, $periodpos);
if ($widgetname != "") {
$nicename = $widgetname;
示例7: Form_Select
$group->add(new Form_Select('advbase', 'Base', $pconfig['advbase'], array_combine(range(1, 254, 1), range(1, 254, 1))))->setHelp('Base');
$group->add(new Form_Select('advskew', 'Skew', $pconfig['advskew'], array_combine(range(0, 254, 1), range(0, 254, 1))))->setHelp('Skew');
$group->setHelp('The frequency that this machine will advertise. 0 means usually master. Otherwise the lowest combination of both values in the cluster determines the master.');
$section->add($group);
$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_vip[$id]) {
$section->addInput(new Form_Input('id', null, 'hidden', $id));
}
$section->addInput(new Form_Input('uniqid', null, 'hidden', $pconfig['uniqid']));
$form->add($section);
print $form;
?>
<div id="infoblock">
<?php
echo print_info_box(gettext("Proxy ARP and Other type Virtual IPs cannot be bound to by anything running on the firewall, such as IPsec, OpenVPN, etc. Use a CARP or IP Alias type address for these types.") . '<br />' . sprintf(gettext("For more information on CARP and the above values, visit the OpenBSD %s"), '<a href="http://www.openbsd.org/faq/pf/carp.html">CARP FAQ</a>.'), info);
?>
</div>
<script type="text/javascript">
//<![CDATA[
events.push(function() {
// Hides the <div> in which the specified checkbox lives so that the checkbox, its label and help text are hidden
function hideCheckbox(id, hide) {
if (hide) {
$('#' + id).parent().parent().parent('div').addClass('hidden');
} else {
$('#' + id).parent().parent().parent('div').removeClass('hidden');
}
}
示例8: sprintf
<?php
echo $directionicons['both'] . ' = ' . sprintf(gettext('All connections %sto or from%s are allowed'), '<u>', '</u>');
} else {
?>
</tbody>
</table>
<?php
}
?>
</div>
<nav class="action-buttons">
<a href="services_captiveportal_hostname_edit.php?zone=<?php
echo $cpzone;
?>
&act=add" class="btn btn-success btn-sm">
<i class="fa fa-plus icon-embed-btn"></i>
<?php
echo gettext("Add");
?>
</a>
</nav>
<div class="infoblock">
<?php
echo print_info_box($notestr);
?>
</div>
<?php
include "foot.inc";
示例9: foreach
$i = 0;
foreach ($iflist as $ifent => $ifname) {
$oc = $config['interfaces'][$ifent];
if (is_array($config['dhcpd'][$ifent]) && !isset($config['dhcpd'][$ifent]['enable']) && !is_ipaddrv4($oc['ipaddr']) || !is_array($config['dhcpd'][$ifent]) && !is_ipaddrv4($oc['ipaddr'])) {
continue;
}
if ($ifent == $if) {
$active = true;
} else {
$active = false;
}
$tab_array[] = array($ifname, $active, "services_dhcp.php?if={$ifent}");
$tabscounter++;
}
if ($tabscounter == 0) {
print_info_box(gettext("The DHCP Server can only be enabled on interfaces configured with a static IPv4 address. This system has none."));
include "foot.inc";
exit;
}
display_top_tabs($tab_array);
// This form uses a non-standard submit button name
$form = new Form(new Form_Button('submit', gettext("Save")));
$section = new Form_Section('General Options');
if (!is_numeric($pool) && !($act == "newpool")) {
$section->addInput(new Form_Checkbox('enable', 'Enable', sprintf(gettext("Enable DHCP server on %s interface"), htmlspecialchars($iflist[$if])), $pconfig['enable']));
} else {
$section->addInput(new Form_StaticText(null, '<div class="alert alert-info"> Editing Pool-Specific Options. To return to the Interface, click its tab above. </div>'));
}
$section->addInput(new Form_Checkbox('denyunknown', 'Deny unknown clients', 'Only the clients defined below will get DHCP leases from this server.', $pconfig['denyunknown']));
$section->addInput(new Form_Checkbox('nonak', 'Ignore denied clients', 'Denied clients will be ignored rather than rejected.', $pconfig['nonak']));
if (is_numeric($pool) || $act == "newpool") {
示例10: print_input_errors
?>
</span></a></li>
</ul>
</td>
</tr>
<tr>
<td class="tabcont">
<form action="interfaces_vlan.php" method="post">
<?php
if (!empty($input_errors)) {
print_input_errors($input_errors);
}
?>
<?php
if (file_exists($d_sysrebootreqd_path)) {
print_info_box(get_std_save_message(0));
}
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="20%" class="listhdrlr"><?php
echo gettext("Virtual interface");
?>
</td>
<td width="20%" class="listhdrr"><?php
echo gettext("Physical interface");
?>
</td>
<td width="5%" class="listhdrr"><?php
echo gettext("VLAN tag");
?>
示例11: htmlspecialchars
echo htmlspecialchars($sp['src']);
?>
-> <?php
echo htmlspecialchars($sp['dst']);
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<?php
} else {
print_info_box(gettext('No IPsec security policies configured.'));
}
if (ipsec_enabled()) {
?>
<div class="infoblock">
<?php
} else {
?>
<div class="infoblock blockopen">
<?php
}
print_info_box(sprintf(gettext('You can configure IPsec %1$shere%2$s'), '<a href="vpn_ipsec.php">', '</a>'), 'info', false);
?>
</div>
<?php
include "foot.inc";
示例12: gettext
<?php
echo gettext("Confirm");
?>
</button>
<?php
}
?>
</div>
</div>
</div>
<?php
}
?>
<div id="unable" style="display: none">
<?php
echo print_info_box(gettext("Unable to retrieve system versions."), 'danger');
?>
</div>
<?php
if ($_POST) {
if ($firmwareupdate) {
$logfilename = $g['cf_conf_path'] . '/upgrade_log';
} else {
$logfilename = $g['cf_conf_path'] . '/pkg_log_' . $pkgname;
}
}
if ($firmwareupdate) {
$panel_heading_txt = gettext("Updating System");
$pkg_success_txt = gettext('System update successfully completed.');
$pkg_fail_txt = gettext('System update failed!');
$pkg_wait_txt = gettext('Please wait while the system update completes.');
示例13: sprintf
?>
<tbody>
</table>
<?php
echo $directionicons['to'] . ' = ' . sprintf(gettext('All connections %sto%s the address are allowed'), '<u>', '</u>') . ', ';
?>
<?php
echo $directionicons['from'] . ' = ' . sprintf(gettext('All connections %sfrom%s the address are allowed'), '<u>', '</u>') . ', ';
?>
<?php
echo $directionicons['both'] . ' = ' . sprintf(gettext('All connections %sto or from%s are allowed'), '<u>', '</u>');
} else {
?>
</tbody>
</table>
<?php
}
?>
</div>
<nav class="action-buttons">
<a href="services_captiveportal_ip_edit.php?zone=<?php
echo $cpzone;
?>
&act=add" class="btn btn-success">Add</a>
</nav>
<?php
print_info_box(gettext('Adding allowed IP addresses will allow IP access to/from these addresses through the captive portal without being taken to the portal page. ' . 'This can be used for a web server serving images for the portal page or a DNS server on another network, for example.'));
include "foot.inc";
示例14: defCmdT
defCmdT("last 1000 NTP log entries", "/usr/local/sbin/clog /var/log/ntpd.log 2>&1 | tail -n 1000");
defCmdT("last 1000 OpenVPN log entries", "/usr/local/sbin/clog /var/log/openvpn.log 2>&1 | tail -n 1000");
defCmdT("last 1000 Captive Portal auth log entries", "/usr/local/sbin/clog /var/log/portalauth.log 2>&1 | tail -n 1000");
defCmdT("last 1000 PPP log entries", "/usr/local/sbin/clog /var/log/poes.log 2>&1 | tail -n 1000");
defCmdT("last 1000 relayd log entries", "/usr/local/sbin/clog /var/log/relayd.log 2>&1 | tail -n 1000");
defCmdT("last 1000 resolver log entries", "/usr/local/sbin/clog /var/log/resolver.log 2>&1 | tail -n 1000");
defCmdT("last 1000 routing log entries", "/usr/local/sbin/clog /var/log/routing.log 2>&1 | tail -n 1000");
defCmdT("last 1000 wireless log entries", "/usr/local/sbin/clog /var/log/wireless.log 2>&1 | tail -n 1000");
if (file_exists("/tmp/PHP_errors.log")) {
defCmdT("PHP Error Log", "/bin/cat /tmp/PHP_errors.log");
}
defCmdT("System Message Buffer", "/sbin/dmesg -a");
defCmdT("System Message Buffer (Boot)", "/bin/cat /var/log/dmesg.boot");
defCmdT("sysctl values", "/sbin/sysctl -a");
defCmdT("Kernel Environment", "/bin/kenv");
defCmdT("Installed OS Packages", "/usr/sbin/pkg info");
exec("/bin/date", $dateOutput, $dateStatus);
$currentDate = $dateOutput[0];
$pgtitle = array("{$g['product_name']}", "Status");
include "head.inc";
print_info_box(gettext("Make sure all sensitive information is removed! (Passwords, etc.) before posting " . "information from this page in public places (like mailing lists).") . '<br />' . gettext("Common password fields in config.xml have been automatically redacted.") . '<br />' . gettext("When the page has finished loading, the output will be stored in {$output_file}. It may be downloaded via scp or ") . "<a href=\"/exec.php?dlPath={$output_file}\">" . gettext("Diagnostics > Command Prompt.") . '</a>');
listCmds();
execCmds();
print gettext("Saving output to archive...");
if (is_dir($output_path)) {
mwexec("/usr/bin/tar czpf " . escapeshellarg($output_file) . " -C " . escapeshellarg(dirname($output_path)) . " " . escapeshellarg(basename($output_path)));
unlink_if_exists("{$output_path}/*");
@rmdir($output_path);
}
print gettext("Done.");
include "foot.inc";
示例15: gettext
</div>
<nav class="action-buttons">
<a class="btn btn-success btn-sm" role="button" href="interfaces_vlan_edit.php">
<i class="fa fa-plus icon-embed-btn"></i>
<?php
echo gettext('Add');
?>
</a>
</nav>
</form>
<div class="infoblock">
<?php
echo print_info_box(sprintf(gettext('NOTE: Not all drivers/NICs support 802.1Q ' . 'VLAN tagging properly. <br />On cards that do not explicitly support it, VLAN ' . 'tagging will still work, but the reduced MTU may cause problems.<br />See the ' . '%s handbook for information on supported cards.'), $g['product_name']), 'info', false);
?>
</div>
<script type="text/javascript">
//<![CDATA[
events.push(function() {
// Select 'delete button' clicks, extract the id, set the hidden input values and submit
$('[id^=del-]').click(function(event) {
$('#act').val('del');
$('#id').val(this.id.replace("del-", ""));
$(this).parents('form').submit();
});
});
//]]>
</script>
<?php