本文整理汇总了PHP中pfSense_handle_custom_code函数的典型用法代码示例。如果您正苦于以下问题:PHP pfSense_handle_custom_code函数的具体用法?PHP pfSense_handle_custom_code怎么用?PHP pfSense_handle_custom_code使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pfSense_handle_custom_code函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: gettext
$savemsg = gettext("The system is now rebooting. Please wait.");
} else {
$savemsg = gettext("Reboot is needed. Please apply the settings in order to reboot.");
}
} else {
$savemsg = gettext("Interface mismatch detected. Please resolve the mismatch and click 'Apply changes'. The firewall will reboot afterwards.");
}
}
if (file_exists("/tmp/reload_interfaces")) {
echo "<p>\n";
print_info_box_np(gettext("The interface configuration has been changed.<br />You must apply the changes in order for them to take effect."));
echo "<br /></p>\n";
} elseif ($savemsg) {
print_info_box($savemsg);
}
pfSense_handle_custom_code("/usr/local/pkg/interfaces_assign/pre_input_errors");
if ($input_errors) {
print_input_errors($input_errors);
}
$tab_array = array();
$tab_array[] = array(gettext("Interface assignments"), true, "interfaces_assign.php");
$tab_array[] = array(gettext("Interface Groups"), false, "interfaces_groups.php");
$tab_array[] = array(gettext("Wireless"), false, "interfaces_wireless.php");
$tab_array[] = array(gettext("VLANs"), false, "interfaces_vlan.php");
$tab_array[] = array(gettext("QinQs"), false, "interfaces_qinq.php");
$tab_array[] = array(gettext("PPPs"), false, "interfaces_ppps.php");
$tab_array[] = array(gettext("GRE"), false, "interfaces_gre.php");
$tab_array[] = array(gettext("GIF"), false, "interfaces_gif.php");
$tab_array[] = array(gettext("Bridges"), false, "interfaces_bridge.php");
$tab_array[] = array(gettext("LAGG"), false, "interfaces_lagg.php");
display_top_tabs($tab_array);
示例2: gettext
echo ">{$l7ckey}</option>";
}
?>
</select>
<br />
<span class="vexpl">
<?php
echo gettext("Choose a Layer7 container to apply application protocol inspection rules. " . "These are valid for TCP and UDP protocols only.");
?>
</span>
</div>
</td>
</tr>
<?php
// Allow extending of the firewall edit page and include custom input validation
pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/htmlphplate");
$has_created_time = isset($a_filter[$id]['created']) && is_array($a_filter[$id]['created']);
$has_updated_time = isset($a_filter[$id]['updated']) && is_array($a_filter[$id]['updated']);
?>
<?php
if ($has_created_time || $has_updated_time) {
?>
<tr>
<td> </td>
</tr>
<tr>
<td colspan="2" valign="top" class="listtopic"><?php
echo gettext("Rule Information");
?>
</td>
</tr>
示例3: htmlspecialchars
echo htmlspecialchars($id);
?>
" />
<?php
}
?>
<br />
<span class="vexpl">
<?php
echo gettext("The name of the alias may only consist of the characters \"a-z, A-Z, 0-9 and _\".");
?>
</span>
</td>
</tr>
<?php
pfSense_handle_custom_code("/usr/local/pkg/firewall_aliases_edit/after_first_tr");
?>
<tr>
<td width="22%" valign="top" class="vncell"><?php
echo gettext("Description");
?>
</td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?php
echo htmlspecialchars($pconfig['descr']);
?>
" />
<br />
<span class="vexpl">
<?php
echo gettext("You may enter a description here for your reference (not parsed).");
示例4: update_alias_names_upon_change
update_alias_names_upon_change(array('nat', 'rule'), array('target'), $_POST['name'], $origname);
update_alias_names_upon_change(array('nat', 'rule'), array('local-port'), $_POST['name'], $origname);
// NAT 1:1 Rules
//update_alias_names_upon_change(array('nat', 'onetoone'), array('external'), $_POST['name'], $origname);
//update_alias_names_upon_change(array('nat', 'onetoone'), array('source', 'address'), $_POST['name'], $origname);
update_alias_names_upon_change(array('nat', 'onetoone'), array('destination', 'address'), $_POST['name'], $origname);
// NAT Outbound Rules
update_alias_names_upon_change(array('nat', 'outbound', 'rule'), array('source', 'network'), $_POST['name'], $origname);
update_alias_names_upon_change(array('nat', 'outbound', 'rule'), array('sourceport'), $_POST['name'], $origname);
update_alias_names_upon_change(array('nat', 'outbound', 'rule'), array('destination', 'address'), $_POST['name'], $origname);
update_alias_names_upon_change(array('nat', 'outbound', 'rule'), array('dstport'), $_POST['name'], $origname);
update_alias_names_upon_change(array('nat', 'outbound', 'rule'), array('target'), $_POST['name'], $origname);
// Alias in an alias
update_alias_names_upon_change(array('aliases', 'alias'), array('address'), $_POST['name'], $origname);
}
pfSense_handle_custom_code("/usr/local/pkg/firewall_aliases_edit/pre_write_config");
if (isset($id) && $a_aliases[$id]) {
if ($a_aliases[$id]['name'] != $alias['name']) {
foreach ($a_aliases as $aliasid => $aliasd) {
if ($aliasd['address'] != "") {
$tmpdirty = false;
$tmpaddr = explode(" ", $aliasd['address']);
foreach ($tmpaddr as $tmpidx => $tmpalias) {
if ($tmpalias == $a_aliases[$id]['name']) {
$tmpaddr[$tmpidx] = $alias['name'];
$tmpdirty = true;
}
}
if ($tmpdirty == true) {
$a_aliases[$aliasid]['address'] = implode(" ", $tmpaddr);
}
示例5: print_info_box
// <![CDATA[
columns = ['col1','col2'];
// ]]>
</script>
<?php
include "fbegin.inc";
echo $jscriptstr;
if (!file_exists("/usr/local/www/themes/{$g['theme']}/no_big_logo")) {
echo "<center><img src=\"./themes/" . $g['theme'] . "/images/logobig.jpg\"></center><br>";
}
if ($savemsg) {
print_info_box($savemsg);
}
pfSense_handle_custom_code("/usr/local/pkg/dashboard/pre_dashboard");
?>
<div id="widgetcontainer" style="display:none">
<div id="content1"><h1><?php
echo gettext("Available Widgets");
?>
</h1><p><?php
$widgetfiles_add = $widgetfiles;
sort($widgetfiles_add);
foreach ($widgetfiles_add as $widget) {
if (!stristr($widget, "widget.php")) {
continue;
}
$periodpos = strpos($widget, ".");
$widgetname = substr($widget, 0, $periodpos);
$nicename = $widgetname;
示例6: header
}
header("Location: firewall_nat.php");
exit;
}
}
/* if a custom message has been passed along, lets process it */
if ($_GET['savemsg']) {
$savemsg = $_GET['savemsg'];
}
if ($_POST) {
$pconfig = $_POST;
if ($_POST['apply']) {
$retval = 0;
$retval |= filter_configure();
$savemsg = get_std_save_message($retval);
pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/apply");
if ($retval == 0) {
clear_subsystem_dirty('natconf');
clear_subsystem_dirty('filter');
}
}
}
if ($_GET['act'] == "del") {
if ($a_nat[$_GET['id']]) {
if (isset($a_nat[$_GET['id']]['associated-rule-id'])) {
delete_id($a_nat[$_GET['id']]['associated-rule-id'], $config['filter']['rule']);
$want_dirty_filter = true;
}
unset($a_nat[$_GET['id']]);
if (write_config()) {
mark_subsystem_dirty('natconf');
示例7: unset
unset($natent['dstport']);
}
if ($_POST['nosync'] == "yes") {
$natent['nosync'] = true;
} else {
unset($natent['nosync']);
}
if (isset($_POST['destination_not']) && $ext != "any") {
$natent['destination']['not'] = true;
}
if (isset($a_out[$id]['created']) && is_array($a_out[$id]['created'])) {
$natent['created'] = $a_out[$id]['created'];
}
$natent['updated'] = make_config_revision_entry();
// Allow extending of the firewall edit page and include custom input validation
pfSense_handle_custom_code("/usr/local/pkg/firewall_aon/pre_write_config");
if (isset($id) && $a_out[$id]) {
$a_out[$id] = $natent;
} else {
$natent['created'] = make_config_revision_entry();
if (is_numeric($after)) {
array_splice($a_out, $after + 1, 0, array($natent));
} else {
$a_out[] = $natent;
}
}
if (write_config()) {
mark_subsystem_dirty('natconf');
}
header("Location: firewall_nat_out.php");
exit;
示例8: print_info_box
<?php
include 'fbegin.inc';
?>
<form action="firewall_aliases.php" method="post">
<?php
if ($savemsg) {
print_info_box($savemsg);
}
if (is_subsystem_dirty('aliases')) {
?>
<p>
<?php
print_info_box_np('Takma adlar listesi değiştirildi' . '<br>' . 'Değişikliklerin etkili olabilmesi için uygulamalısınız.', true);
}
pfSense_handle_custom_code("/usr/local/pkg/firewall_aliases/pre_table");
?>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table class="tabcont" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="100%" class="grids sortable">
<tr>
<td class="head">Ad</td>
<td class="head">İçerik</td>
<td class="head">Açıklama</td>
<td class="head"></td>
</tr>
<?php
示例9: build_if_list
function build_if_list()
{
$iflist = get_configured_interface_with_descr(false, true);
//$iflist = get_interface_list();
// Allow extending of the firewall edit interfaces
pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/pre_interfaces_edit");
foreach ($iflist as $if => $ifdesc) {
$interfaces[$if] = $ifdesc;
}
if ($config['l2tp']['mode'] == "server") {
$interfaces['l2tp'] = "L2TP VPN";
}
if (is_pppoe_server_enabled() && have_ruleint_access("pppoe")) {
$interfaces['pppoe'] = "PPPoE Server";
}
/* add ipsec interfaces */
if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable'])) {
$interfaces["enc0"] = "IPsec";
}
/* add openvpn/tun interfaces */
if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"]) {
$interfaces["openvpn"] = "OpenVPN";
}
return $interfaces;
}
示例10: pfSense_handle_custom_code
Bu ağ arayüzüne kullanıcı tarafından hiç kural eklenmedi.
Eklemek için <i class="icon-plus"></i> simgesine tıklayın.
</span>
</td>
</tr>
<?php
}
?>
</tbody>
<tr id="fr<?php
echo $nrules;
?>
">
<?php
pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/pre_id_tr_belowtable");
?>
<td class="wall" colspan="12"></td>
<td class="wall tools" style="padding-bottom: 4px;">
<?php
if ($nrules != 0) {
?>
<input name="move_<?php
echo $i;
?>
" type="image" src="./themes/nuclewall/images/icons/icon_top.png" title="Seçili kuralları sona taşı" onMouseOver="fr_insline(<?php
echo $nrules;
?>
, true)" onMouseOut="fr_insline(<?php
echo $nrules;
?>
示例11: gettext
<td>
<div align="center" style="vertical-align:top;"><?php
echo gettext("Interface");
?>
</div>
<div align="center" style="vertical-align:top;">
<select name="interface" onchange="dst_change(this.value,iface_old,document.iform.dsttype.value);iface_old = document.iform.interface.value;typesel_change();">
<option value="" <?php
echo $interfacefilter ? "" : "selected=\"selected\"";
?>
>*Any interface</option>
<?php
$iflist = get_configured_interface_with_descr(false, true);
//$iflist = get_interface_list();
// Allow extending of the firewall edit interfaces
pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/pre_interfaces_edit");
foreach ($iflist as $if => $ifdesc) {
$interfaces[$if] = $ifdesc;
}
if ($config['l2tp']['mode'] == "server") {
$interfaces['l2tp'] = "L2TP VPN";
}
if ($config['pptpd']['mode'] == "server") {
$interfaces['pptp'] = "PPTP VPN";
}
if (is_pppoe_server_enabled() && have_ruleint_access("pppoe")) {
$interfaces['pppoe'] = "PPPoE VPN";
}
/* add ipsec interfaces */
if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable'])) {
$interfaces["enc0"] = "IPsec";