Commit e78874a7 authored by Franco Fichtner's avatar Franco Fichtner

firewall: apply whitespace cleanups

parent 30ed9e9f
......@@ -161,28 +161,28 @@ include("head.inc");
$main_buttons = array(
array('href'=>'firewall_aliases_edit.php?tab='.$tab, 'label'=>gettext("Add a new alias")),
array('href'=>'firewall_aliases_import.php', 'label'=>gettext("Bulk import aliases from list")),
);
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('aliases')): ?><p>
<?php print_info_box_np(gettext("The alias list has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect."));?>
<?php endif; ?>
<?php pfSense_handle_custom_code("/usr/local/pkg/firewall_aliases/pre_table"); ?>
<section class="col-xs-12">
<?php
<?php
$tab_array = array();
$tab_array[] = array(gettext("IP"),($tab=="ip" ? true : ($tab=="host" ? true : ($tab == "network" ? true : false))), "/firewall_aliases.php?tab=ip");
$tab_array[] = array(gettext("Ports"), ($tab=="port"? true : false), "/firewall_aliases.php?tab=port");
......@@ -190,14 +190,14 @@ $main_buttons = array(
$tab_array[] = array(gettext("All"), ($tab=="all"? true : false), "/firewall_aliases.php?tab=all");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12">
<div class="tab-content content-box col-xs-12">
<form action="firewall_aliases.php" method="post" name="iform" id="iform">
<input type="hidden" name="tab" value="<?=htmlspecialchars($tab);?>" />
<input type="hidden" name="tab" value="<?=htmlspecialchars($tab);?>" />
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr>
......@@ -205,7 +205,7 @@ $main_buttons = array(
<td width="43%" class="listhdrr"><?=gettext("Values"); ?></td>
<td width="30%" class="listhdr"><?=gettext("Description"); ?></td>
<td width="7%" class="list">
</td>
</tr>
<?php
......@@ -267,9 +267,9 @@ $main_buttons = array(
<tr>
<td valign="middle">
<a href="firewall_aliases_edit.php?id=<?=$i;?>" class="btn btn-default"><span class="glyphicon glyphicon-edit" title="<?=gettext("Edit alias")." ".$alias['name'];?>"></span></a>
<a href="firewall_aliases.php?act=del&amp;tab=<?=$tab;?>&amp;id=<?=$i;?>" class="btn btn-default" onclick="return confirm('<?=gettext("Do you really want to delete this alias? All elements that still use it will become invalid (e.g. filter rules)!");?>')"><span class="glyphicon glyphicon-remove"></span></a>
</td>
</tr>
</table>
......@@ -278,7 +278,7 @@ $main_buttons = array(
<?php
} // if ($show_alias)
} // foreach
?>
?>
</table>
</div>
<div class="container-fluid">
......@@ -290,4 +290,4 @@ $main_buttons = array(
</div>
</div>
</section>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
......@@ -624,26 +624,26 @@ EOD;
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php pfSense_handle_custom_code("/usr/local/pkg/firewall_aliases_edit/pre_input_errors"); ?>
<?php if ($input_errors) print_input_errors($input_errors); ?>
<div id="inputerrors"></div>
<section class="col-xs-12">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?=gettext("Alias Edit");?></h3>
</header>
<div class="content-box-main">
<form action="firewall_aliases_edit.php" method="post" name="iform" id="iform">
<?php
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?=gettext("Alias Edit");?></h3>
</header>
<div class="content-box-main">
<form action="firewall_aliases_edit.php" method="post" name="iform" id="iform">
<?php
if (empty($tab)) {
if (preg_match("/url/i", $pconfig['type']))
$tab = 'url';
......@@ -655,7 +655,7 @@ EOD;
?>
<input name="tab" type="hidden" id="tab" value="<?=htmlspecialchars($tab);?>" />
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr>
......@@ -713,7 +713,7 @@ EOD;
<td><div id="twocolumn">CIDR</div></td>
<td><div id="threecolumn"><?=gettext("Description"); ?></div></td>
</tr>
<?php
$counter = 0;
if ($pconfig['address'] <> ""):
......@@ -748,7 +748,7 @@ EOD;
</tr>
<?php
$counter++;
endwhile;
endif;
?>
......@@ -770,14 +770,14 @@ EOD;
</tr>
</table>
</div>
</form>
</div>
</div>
</form>
</div>
</div>
</section>
</div>
</div>
</section>
<script type="text/javascript">
//<![CDATA[
......@@ -801,4 +801,4 @@ EOD;
//]]>
</script>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
......@@ -162,25 +162,25 @@ include("head.inc");
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<div id="inputerrors"></div>
<section class="col-xs-12">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?=gettext("Alias Import");?></h3>
</header>
<div class="content-box-main">
<form action="firewall_aliases_import.php" method="post" name="iform" id="iform">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?=gettext("Alias Import");?></h3>
</header>
<div class="content-box-main">
<form action="firewall_aliases_import.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr>
......@@ -230,9 +230,9 @@ include("head.inc");
</tr>
</table>
</div>
</form>
</div>
</div>
</form>
</div>
</div>
</section>
</div>
</div>
......@@ -240,4 +240,4 @@ include("head.inc");
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
This diff is collapsed.
......@@ -154,13 +154,13 @@ $main_buttons = array(
?>
<body>
<?php include("fbegin.inc"); ?>
<script type="text/javascript" src="/javascript/row_toggle.js"></script>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<div class="container-fluid">
<div class="row">
<?php
if ($savemsg)
print_info_box($savemsg);
......@@ -169,9 +169,9 @@ $main_buttons = array(
"<br />" .
gettext("You must apply the changes in order for them to take effect."));
?>
<section class="col-xs-12">
<section class="col-xs-12">
<?php
$tab_array = array();
$tab_array[] = array(gettext("Port Forward"), false, "firewall_nat.php");
......@@ -180,16 +180,16 @@ $main_buttons = array(
$tab_array[] = array(gettext("NPt"), false, "firewall_nat_npt.php");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12">
<div class="tab-content content-box col-xs-12">
<form action="firewall_nat_1to1.php" method="post" name="iform" id="iform">
<input type="hidden" id="id" name="id" value="<?php echo htmlspecialchars($id); ?>" />
<input type="hidden" id="id" name="id" value="<?php echo htmlspecialchars($id); ?>" />
<div class="table-responsive">
<table class="table table-striped table-sort">
<thead>
<thead>
<tr id="frheader">
<th width="3%" class="list">&nbsp;</th>
<th width="3%" class="list">&nbsp;</th>
......@@ -200,8 +200,8 @@ $main_buttons = array(
<th class="listhdr"><?=gettext("Description"); ?></th>
<th class="list"></th>
</tr>
</thead>
<tbody>
</thead>
<tbody>
<?php
$textse = "";
$i = 0;
......@@ -223,12 +223,12 @@ $main_buttons = array(
</td>
<td class="listlr" onclick="fr_toggle(<?=$i;?>)" id="frd<?=$i;?>" ondblclick="document.location='firewall_nat_1to1_edit.php?id=<?=$i;?>';">
<?php
if (!$natent['interface'])
echo htmlspecialchars(convert_friendly_interface_to_friendly_descr("wan"));
else
echo htmlspecialchars(convert_friendly_interface_to_friendly_descr($natent['interface']));
?>
</td>
<td class="listr" id="frd<?=$i;?>" ondblclick="document.location='firewall_nat_1to1_edit.php?id=<?=$i;?>';">
......@@ -257,7 +257,7 @@ $main_buttons = array(
<button name="move_<?=$i;?>_x"
title="<?=gettext("move selected rules before this rule");?>"
type="submit" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-arrow-left"></span></button>
<a href="firewall_nat_1to1_edit.php?id=<?=$i;?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil"></span></a>
<a href="firewall_nat_1to1.php?act=del&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this rule?");?>')" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span></a>
<a href="firewall_nat_1to1_edit.php?dup=<?=$i;?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus"></span></a>
......@@ -270,7 +270,7 @@ $main_buttons = array(
<tr>
<td class="list" colspan="7"></td>
<td class="list nowrap" valign="middle">
<?php
if ($i == 0):
?>
......@@ -282,9 +282,9 @@ $main_buttons = array(
<?php
endif;
?>
<a href="firewall_nat_1to1_edit.php" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus"></span></a>
<?php
if ($i == 0):
?>
......@@ -312,7 +312,7 @@ $main_buttons = array(
</span></p>
</td>
</tr>
</tbody>
</tbody>
</table>
</div>
</form>
......@@ -322,4 +322,4 @@ $main_buttons = array(
</div>
</section>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
......@@ -229,7 +229,7 @@ include("head.inc");
<body>
<?php include("fbegin.inc"); ?>
<script type="text/javascript" src="/javascript/suggestions.js"></script>
<script type="text/javascript" src="/javascript/autosuggest.js"></script>
<script type="text/javascript">
......@@ -276,22 +276,22 @@ include("head.inc");
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<div class="row">
<?php
if ($input_errors)
print_input_errors($input_errors);
?>
<section class="col-xs-12">
<div class="content-box">
<form action="firewall_nat_1to1_edit.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<div class="content-box">
<form action="firewall_nat_1to1_edit.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Edit NAT 1:1 entry"); ?></td>
</tr>
......@@ -311,27 +311,27 @@ include("head.inc");
foreach ($ifdisp as $if => $ifdesc)
if(have_ruleint_access($if))
$interfaces[$if] = $ifdesc;
if ($config['l2tp']['mode'] == "server")
if(have_ruleint_access("l2tp"))
$interfaces['l2tp'] = "L2TP VPN";
if ($config['pptpd']['mode'] == "server")
if(have_ruleint_access("pptp"))
$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']))
if(have_ruleint_access("enc0"))
$interfaces["enc0"] = "IPsec";
/* add openvpn/tun interfaces */
if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"])
$interfaces["openvpn"] = "OpenVPN";
foreach ($interfaces as $iface => $ifacename):
?>
<option value="<?=$iface;?>" <?php if ($iface == $pconfig['interface']) echo "selected=\"selected\""; ?>>
......@@ -418,7 +418,7 @@ include("head.inc");
<?php
for ($i = 31; $i > 0; $i--):
?>
<option value="<?=$i;?>" <?php if ($i == $pconfig['srcmask']) echo "selected=\"selected\""; ?>><?=$i;?></option>
<option value="<?=$i;?>" <?php if ($i == $pconfig['srcmask']) echo "selected=\"selected\""; ?>><?=$i;?></option>
<?php
endfor;
?>
......@@ -475,7 +475,7 @@ include("head.inc");
</option>
<?php
endif;
foreach ($ifdisp as $if => $ifdesc):
if(have_ruleint_access($if)):
?>
......@@ -553,9 +553,9 @@ include("head.inc");
</td>
</tr>
</table>
</div>
</div>
</form>
</div>
</div>
</section>
</div>
</div>
......@@ -572,4 +572,4 @@ include("head.inc");
var oTextbox1 = new AutoSuggestControl(document.getElementById("dst"), new StateSuggestions(addressarray));
//]]>
</script>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
......@@ -247,7 +247,7 @@ if ($_POST) {
}
/* if user enters an alias and selects "network" then disallow. */
if( ($_POST['srctype'] == "network" && is_alias($_POST['src']) )
if( ($_POST['srctype'] == "network" && is_alias($_POST['src']) )
|| ($_POST['dsttype'] == "network" && is_alias($_POST['dst']) ) ) {
$input_errors[] = gettext("You must specify single host or alias for alias entries.");
}
......@@ -310,7 +310,7 @@ if ($_POST) {
}
}
// Allow extending of the firewall edit page and include custom input validation
// Allow extending of the firewall edit page and include custom input validation
pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/input_validation");
if (!$input_errors) {
......@@ -429,7 +429,7 @@ if ($_POST) {
$natent['updated'] = make_config_revision_entry();
// Allow extending of the firewall edit page and include custom input validation
// Allow extending of the firewall edit page and include custom input validation
pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/pre_write_config");
// Update the NAT entry now
......@@ -461,25 +461,25 @@ include("head.inc");
<body>
<?php include("fbegin.inc"); ?>
<script src="/javascript/chosen/chosen.jquery.js" type="text/javascript"></script>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="content-box">
<form action="firewall_nat_edit.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<div class="content-box">
<form action="firewall_nat_edit.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
......@@ -487,7 +487,7 @@ include("head.inc");
<td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Redirect entry"); ?></td>
</tr>
<?php
// Allow extending of the firewall edit page and include custom input validation
// Allow extending of the firewall edit page and include custom input validation
pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/htmlphpearly");
?>
<tr>
......@@ -511,34 +511,34 @@ include("head.inc");
<td width="78%" class="vtable">
<select name="interface" class="formselect" onchange="dst_change(this.value,iface_old,document.iform.dsttype.value);iface_old = document.iform.interface.value;typesel_change();">
<?php
$iflist = get_configured_interface_with_descr(false, true);
// Allow extending of the firewall edit interfaces
// Allow extending of the firewall edit interfaces
pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/pre_interfaces_edit");
foreach ($iflist as $if => $ifdesc)
if(have_ruleint_access($if))
$interfaces[$if] = $ifdesc;
if ($config['l2tp']['mode'] == "server")
if(have_ruleint_access("l2tp"))
$interfaces['l2tp'] = "L2TP VPN";
if ($config['pptpd']['mode'] == "server")
if(have_ruleint_access("pptp"))
$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']))
if(have_ruleint_access("enc0"))
$interfaces["enc0"] = "IPsec";
/* add openvpn/tun interfaces */
if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"])
$interfaces["openvpn"] = "OpenVPN";
foreach ($interfaces as $iface => $ifacename): ?>
<option value="<?=$iface;?>" <?php if ($iface == $pconfig['interface']) echo "selected=\"selected\""; ?>>
<?=htmlspecialchars($ifacename);?>
......@@ -601,7 +601,7 @@ include("head.inc");
<?=$ifdesc?> <?=gettext("address");?>
</option>
<?php endif; ?>
<?php endforeach; ?>
<?php endforeach; ?>
</select>
</td>
</tr>
......@@ -612,7 +612,7 @@ include("head.inc");
<select name="srcmask" class="formselect" id="srcmask">
<?php for ($i = 31; $i > 0; $i--): ?>
<option value="<?=$i;?>" <?php if ($i == $pconfig['srcmask']) echo "selected=\"selected\""; ?>><?=$i;?></option>
<?php endfor; ?>
<?php endfor; ?>
</select>
</td>
</tr>
......@@ -629,9 +629,9 @@ include("head.inc");
<select name="srcbeginport" class="formselect" onchange="src_rep_change();ext_change()">
<option value="">(<?=gettext("other"); ?>)</option>
<option value="any" <?php $bfound = 0; if ($pconfig['srcbeginport'] == "any") { echo "selected=\"selected\""; $bfound = 1; } ?>><?=gettext("any"); ?></option>
<?php foreach ($wkports as $wkport => $wkportdesc): ?>
<?php foreach ($wkports as $wkport => $wkportdesc): ?>
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['srcbeginport']) { echo "selected=\"selected\""; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option>
<?php endforeach; ?>
<?php endforeach; ?>
</select>
<input autocomplete='off' class="formfldalias" name="srcbeginport_cust" id="srcbeginport_cust" type="text" size="5" value="<?php if (!$bfound && $pconfig['srcbeginport']) echo htmlspecialchars($pconfig['srcbeginport']); ?>" />
</td>
......@@ -683,16 +683,16 @@ include("head.inc");
<?php if(have_ruleint_access("l2tp")): ?>
<option value="l2tp" <?php if ($pconfig['dst'] == "l2tp") { echo "selected=\"selected\""; } ?>><?=gettext("L2TP clients"); ?></option>
<?php endif; ?>
<?php foreach ($ifdisp as $if => $ifdesc): ?>
<?php foreach ($ifdisp as $if => $ifdesc): ?>
<?php if(have_ruleint_access($if)): ?>
<option value="<?=$if;?>" <?php if ($pconfig['dst'] == $if) { echo "selected=\"selected\""; } ?>><?=htmlspecialchars($ifdesc);?> <?=gettext("net"); ?></option>
<option value="<?=$if;?>ip"<?php if ($pconfig['dst'] == $if . "ip") { echo "selected=\"selected\""; } ?>>
<?=$ifdesc;?> <?=gettext("address");?>
</option>
<?php endif; ?>
<?php endforeach; ?>
<?php endforeach; ?>
<?php if (is_array($config['virtualip']['vip'])):
foreach ($config['virtualip']['vip'] as $sn):
if (isset($sn['noexpand']))
......@@ -741,10 +741,10 @@ include("head.inc");
<td>
<select name="dstbeginport" id="dstbeginport" class="formselect" onchange="dst_rep_change();ext_change()">
<option value="">(<?=gettext("other"); ?>)</option>
<?php $bfound = 0;
<?php $bfound = 0;
foreach ($wkports as $wkport => $wkportdesc): ?>
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['dstbeginport']) { echo "selected=\"selected\""; $bfound = 1; }?>><?=htmlspecialchars($wkportdesc);?></option>
<?php endforeach; ?>
<?php endforeach; ?>
</select>
<input autocomplete='off' class="formfldalias" name="dstbeginport_cust" id="dstbeginport_cust" type="text" size="5" value="<?php if (!$bfound && $pconfig['dstbeginport']) echo htmlspecialchars($pconfig['dstbeginport']); ?>" />
</td>
......@@ -757,7 +757,7 @@ include("head.inc");
<?php $bfound = 0;
foreach ($wkports as $wkport => $wkportdesc): ?>
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['dstendport']) { echo "selected=\"selected\""; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option>
<?php endforeach; ?>
<?php endforeach; ?>
</select>
<input autocomplete='off' class="formfldalias" name="dstendport_cust" id="dstendport_cust" type="text" size="5" value="<?php if (!$bfound && $pconfig['dstendport']) echo htmlspecialchars($pconfig['dstendport']); ?>" />
</td>
......@@ -844,7 +844,7 @@ include("head.inc");
$linkedrule = "<br /><a href=\"firewall_rules_edit.php?id={$filter_id}\">" . gettext("View the filter rule") . "</a><br />";
}
echo ">". htmlspecialchars('Rule ' . $filter_rule['descr']) . "</option>\n";
}
}
}
......@@ -870,7 +870,7 @@ include("head.inc");
</td>
</tr><?php endif; ?>
<?php
// Allow extending of the firewall edit page and include custom input validation
// Allow extending of the firewall edit page and include custom input validation
pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/htmlphplate");
?>
<?php
......@@ -954,4 +954,4 @@ include("head.inc");
var oTextbox8 = new AutoSuggestControl(document.getElementById("localbeginport_cust"), new StateSuggestions(customarray));
//]]>
</script>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
......@@ -86,20 +86,20 @@ $main_buttons = array(
<body>
<?php include("fbegin.inc"); ?>
<script type="text/javascript" src="/javascript/row_toggle.js"></script>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<div class="container-fluid">
<div class="row">
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('natconf')): ?>
<?php print_info_box_np(gettext("The NAT configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br />
<?php endif; ?>
<section class="col-xs-12">
<section class="col-xs-12">
<?php
$tab_array = array();
$tab_array[] = array(gettext("Port Forward"), false, "firewall_nat.php");
......@@ -108,30 +108,30 @@ $main_buttons = array(
$tab_array[] = array(gettext("NPt"), true, "firewall_nat_npt.php");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12">
<div class="tab-content content-box col-xs-12">
<form action="firewall_nat_npt.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<div class="table-responsive">
<table class="table table-striped table-sort">
<thead>
<tr>
<th width="10%" class="listhdrr"><?=gettext("Interface"); ?></th>
<th width="20%" class="listhdrr"><?=gettext("External Prefix"); ?></th>
<th width="15%" class="listhdrr"><?=gettext("Internal prefix"); ?></th>
<th width="30%" class="listhdr"><?=gettext("Description"); ?></th>
<th class="list"></th>
</tr>
<tr>
<th width="10%" class="listhdrr"><?=gettext("Interface"); ?></th>
<th width="20%" class="listhdrr"><?=gettext("External Prefix"); ?></th>
<th width="15%" class="listhdrr"><?=gettext("Internal prefix"); ?></th>
<th width="30%" class="listhdr"><?=gettext("Description"); ?></th>
<th class="list"></th>
</tr>
</thead>
<tbody>
<?php
<?php
$textse = "</span>";
$i = 0; foreach ($a_npt as $natent):
if (isset($natent['disabled']))
$textss = "<span class=\"gray\">";
else
......@@ -147,17 +147,17 @@ $main_buttons = array(
echo $textse;
?>
</td>
<?php
<?php
$source_net = pprint_address($natent['source']);
$source_cidr = strstr($source_net, '/');
$destination_net = pprint_address($natent['destination']);
$destination_cidr = strstr($destination_net, '/');
?>
<td class="listr" ondblclick="document.location='firewall_nat_npt_edit.php?id=<?=$i;?>';">
<?php echo $textss . $destination_net . $textse; ?>
<?php echo $textss . $destination_net . $textse; ?>
</td>
<td class="listr" ondblclick="document.location='firewall_nat_npt_edit.php?id=<?=$i;?>';">
<?php echo $textss . $source_net . $textse; ?>
<?php echo $textss . $source_net . $textse; ?>
</td>
<td class="listbg" ondblclick="document.location='firewall_nat_npt_edit.php?id=<?=$i;?>';">
<?=$textss;?>
......@@ -169,15 +169,15 @@ $main_buttons = array(
</td>
</tr>
<?php $i++; endforeach; ?>
</tbody>
</tbody>
</table>
</div>
</div>
</form>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
<?php
<?php
/* $Id$ */
/*
firewall_nat_npt_edit.php
part of pfSense (https://www.pfsense.org)
Copyright (C) 2011 Seth Mos <seth.mos@dds.nl>.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
......@@ -98,7 +98,7 @@ if (isset($id) && $a_npt[$id]) {
if ($_POST) {
unset($input_errors);
$pconfig = $_POST;
......@@ -109,7 +109,7 @@ if ($_POST) {
$reqdfieldsn[] = gettext("Source prefix");
$reqdfields[] = "dst";
$reqdfieldsn[] = gettext("Destination prefix");
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
if (!$input_errors) {
......@@ -157,23 +157,23 @@ include("head.inc");
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="content-box">
<form action="firewall_nat_npt_edit.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<div class="content-box">
<form action="firewall_nat_npt_edit.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Edit NAT NPt entry"); ?></td>
</tr>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Disabled"); ?></td>
<td width="78%" class="vtable">
......@@ -190,29 +190,29 @@ include("head.inc");
foreach ($ifdisp as $if => $ifdesc)
if(have_ruleint_access($if))
$interfaces[$if] = $ifdesc;
if ($config['l2tp']['mode'] == "server")
if(have_ruleint_access("l2tp"))
$interfaces['l2tp'] = "L2TP VPN";
if ($config['pptpd']['mode'] == "server")
if(have_ruleint_access("pptp"))
$interfaces['pptp'] = "PPTP VPN";
if ($config['pppoe']['mode'] == "server")
if(have_ruleint_access("pppoe"))
$interfaces['pppoe'] = "PPPoE VPN";
/* add ipsec interfaces */
if (isset($config['ipsec']['enable']) || isset($config['ipsec']['mobileclients']['enable']))
if(have_ruleint_access("enc0"))
$interfaces["enc0"] = "IPsec";
/* add openvpn/tun interfaces */
if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"])
$interfaces["openvpn"] = "OpenVPN";
foreach ($interfaces as $iface => $ifacename):
foreach ($interfaces as $iface => $ifacename):
?>
<option value="<?=$iface;?>" <?php if ($iface == $pconfig['interface']) echo "selected=\"selected\""; ?>>
<?=htmlspecialchars($ifacename);?>
......@@ -245,8 +245,8 @@ include("head.inc");
</tr>
</table>
<br />
<span class="vexpl"><?=gettext("Enter the internal (LAN) ULA IPv6 Prefix for the Network Prefix translation. The prefix size specified for the internal IPv6 prefix will be applied to the
external prefix.");
<span class="vexpl"><?=gettext("Enter the internal (LAN) ULA IPv6 Prefix for the Network Prefix translation. The prefix size specified for the internal IPv6 prefix will be applied to the
external prefix.");
?></span>
</td>
</tr>
......@@ -278,16 +278,16 @@ include("head.inc");
<span class="vexpl"><?=gettext("Enter the Global Unicast routable IPv6 prefix here"); ?><br /></span>
</td>
</tr>
<tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>" />
<br /> <span class="vexpl"><?=gettext("You may enter a description here " .
"for your reference (not parsed)."); ?></span></td>
</tr>
<tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<td width="78%">
<input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" />
<input type="button" class="btn btn-default" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" />
<?php if (isset($id) && $a_npt[$id]): ?>
......@@ -296,12 +296,12 @@ include("head.inc");
</td>
</tr>
</table>
</div>
</div>
</form>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
This diff is collapsed.
......@@ -248,7 +248,7 @@ if ($_POST) {
}
}
// Allow extending of the firewall edit page and include custom input validation
// Allow extending of the firewall edit page and include custom input validation
pfSense_handle_custom_code("/usr/local/pkg/firewall_aon/input_validation");
if (!$input_errors) {
......@@ -268,7 +268,7 @@ if ($_POST) {
} else {
unset($natent['staticnatport']);
}
if(isset($_POST['disabled'])) {
$natent['disabled'] = true;
} else {
......@@ -293,7 +293,7 @@ if ($_POST) {
$natent['destination']['address'] = $ext;
}
if($_POST['natport'] != "" && $protocol_uses_ports && !isset($_POST['nonat'])) {
$natent['natport'] = $_POST['natport'];
$natent['natport'] = $_POST['natport'];
} else {
unset($natent['natport']);
}
......@@ -318,7 +318,7 @@ if ($_POST) {
$natent['updated'] = make_config_revision_entry();
// Allow extending of the firewall edit page and include custom input validation
// 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]) {
......@@ -443,24 +443,24 @@ function poolopts_change() {
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="content-box">
<form action="firewall_nat_out_edit.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<div class="content-box">
<form action="firewall_nat_out_edit.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Advanced Outbound NAT entry");?></td>
</tr>
<?php
// Allow extending of the firewall edit page and include custom input validation
// Allow extending of the firewall edit page and include custom input validation
pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/htmlphpearly");
?>
<tr>
......@@ -488,27 +488,27 @@ function poolopts_change() {
foreach ($iflist as $if => $ifdesc)
if(have_ruleint_access($if))
$interfaces[$if] = $ifdesc;
if ($config['l2tp']['mode'] == "server")
if(have_ruleint_access("l2tp"))
$interfaces['l2tp'] = "L2TP VPN";
if ($config['pptpd']['mode'] == "server")
if(have_ruleint_access("pptp"))
$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']))
if(have_ruleint_access("enc0"))
$interfaces["enc0"] = "IPsec";
/* add openvpn/tun interfaces */
if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"])
$interfaces["openvpn"] = "OpenVPN";
foreach ($interfaces as $iface => $ifacename):
?>
<option value="<?=$iface;?>" <?php if ($iface == $pconfig['interface']) echo "selected=\"selected\""; ?>>
......@@ -700,7 +700,7 @@ function poolopts_change() {
</select>
</td>
</tr>
<tr id="target_network">
<td><?=gettext("Other Subnet:");?>&nbsp;&nbsp;</td>
<td>
......@@ -716,7 +716,7 @@ function poolopts_change() {
</select>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
......@@ -821,7 +821,7 @@ function poolopts_change() {
</tr>
<?php
endif;
if ($has_updated_time):
?>
<tr>
......@@ -833,7 +833,7 @@ function poolopts_change() {
<?php
endif;
endif;
// Allow extending of the firewall edit page and include custom input validation
// Allow extending of the firewall edit page and include custom input validation
pfSense_handle_custom_code("/usr/local/pkg/firewall_aon/htmlphplate");
?>
<tr>
......@@ -852,16 +852,16 @@ function poolopts_change() {
</td>
</tr>
</table>
</div>
</div>
</form>
</div>
</div>
</section>
</div>
</div>
</section>
<script type="text/javascript">
//<![CDATA[
sourcesel_change();
......@@ -880,4 +880,4 @@ function poolopts_change() {
var oTextbox4 = new AutoSuggestControl(document.getElementById("dstport"), new StateSuggestions(customarray));
//]]>
</script>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
This diff is collapsed.
This diff is collapsed.
......@@ -96,34 +96,34 @@ $main_buttons = array(
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($savemsg) print_info_box($savemsg); ?>
<section class="col-xs-12">
<div class="content-box">
<div class="content-box-main ">
<form action="firewall_schedule.php" method="post" name="iform" id="iform">
<div class="content-box">
<div class="content-box-main ">
<form action="firewall_schedule.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<thead>
<table class="table table-striped table-sort">
<thead>
<tr>
<td width="25%" class="listhdrr"><?=gettext("Name");?></td>
<td width="35%" class="listhdrr"><?=gettext("Time Range(s)");?></td>
<td width="35%" class="listhdr"><?=gettext("Description");?></td>
<td width="5%" class="list sort_ignore">
</td>
</tr>
</thead>
<tbody>
</thead>
<tbody>
<?php $i = 0; foreach ($a_schedules as $schedule): ?>
<tr>
<td class="listlr" ondblclick="document.location='firewall_schedule_edit.php?id=<?=$i;?>';">
......@@ -131,14 +131,14 @@ $main_buttons = array(
<?php
$schedstatus = filter_get_time_based_rule_status($schedule);
if ($schedstatus) { ?>
&nbsp;<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_frmfld_time.png" title="<?=gettext("Schedule is currently active");?>" width="17" height="17" border="0" alt="schedule" />
&nbsp;<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_frmfld_time.png" title="<?=gettext("Schedule is currently active");?>" width="17" height="17" border="0" alt="schedule" />
<?php } ?>
</td>
<td class="listlr" ondblclick="document.location='firewall_schedule_edit.php?id=<?=$i;?>';">
<table width="98%" border="0" cellpadding="0" cellspacing="0" summary="schedule">
</td>
<td class="listlr" ondblclick="document.location='firewall_schedule_edit.php?id=<?=$i;?>';">
<table width="98%" border="0" cellpadding="0" cellspacing="0" summary="schedule">
<?php
foreach($schedule['timerange'] as $timerange) {
$tempFriendlyTime = "";
$tempID = "";
......@@ -146,14 +146,14 @@ $main_buttons = array(
if ($timerange){
$dayFriendly = "";
$tempFriendlyTime = "";
//get hours
$temptimerange = $timerange['hour'];
$temptimeseparator = strrpos($temptimerange, "-");
$starttime = substr ($temptimerange, 0, $temptimeseparator);
$stoptime = substr ($temptimerange, $temptimeseparator+1);
if ($timerange['month']){
$tempmontharray = explode(",", $timerange['month']);
$tempdayarray = explode(",",$timerange['day']);
......@@ -163,14 +163,14 @@ $main_buttons = array(
foreach ($tempmontharray as $monthtmp){
$month = $tempmontharray[$arraycounter];
$day = $tempdayarray[$arraycounter];
if (!$firstDayFound)
{
$firstDay = $day;
$firstmonth = $month;
$firstDayFound = true;
}
$currentDay = $day;
$nextDay = $tempdayarray[$arraycounter+1];
$currentDay++;
......@@ -225,15 +225,15 @@ $main_buttons = array(
}
$timeFriendly = $starttime . "-" . $stoptime;
$description = $timerange['rangedescr'];
?><tr><td><?=$dayFriendly;?></td><td><?=$timeFriendly;?></td><td><?=$description;?></td></tr><?php
}
}//end for?></table>
</td>
<td class="listbg" ondblclick="document.location='firewall_schedule_edit.php?id=<?=$i;?>';">
<?=htmlspecialchars($schedule['descr']);?>&nbsp;
</td>
<td valign="middle" class="list nowrap">
<?=htmlspecialchars($schedule['descr']);?>&nbsp;
</td>
<td valign="middle" class="list nowrap">
<table border="0" cellspacing="0" cellpadding="1" summary="buttons">
<tr>
<td valign="middle"><a href="firewall_schedule_edit.php?id=<?=$i;?>" title="<?=gettext("edit alias");?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil"></span></a></td>
......@@ -243,17 +243,17 @@ $main_buttons = array(
</td>
</tr>
<?php $i++; endforeach; ?>
</tbody>
</tbody>
</table>
</div>
<div class="container-fluid">
<p><span class="vexpl"><span class="text-danger"><strong><?=gettext("Note:");?><br /></strong></span><?=gettext("Schedules act as placeholders for time ranges to be used in Firewall Rules.");?></span></p>
</div>
</form>
</div>
</div>
</form>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
This diff is collapsed.
......@@ -56,14 +56,14 @@ $shortcut_section = "trafficshaper";
$shaperIFlist = get_configured_interface_with_descr();
read_altq_config();
/*
/*
* The whole logic in these code maybe can be specified.
* If you find a better way contact me :).
*/
if ($_GET) {
if ($_GET['queue'])
$qname = trim($_GET['queue']);
$qname = trim($_GET['queue']);
if ($_GET['interface'])
$interface = htmlspecialchars(trim($_GET['interface']));
if ($_GET['action'])
......@@ -71,7 +71,7 @@ if ($_GET) {
}
if ($_POST) {
if ($_POST['name'])
$qname = htmlspecialchars(trim($_POST['name']));
$qname = htmlspecialchars(trim($_POST['name']));
if ($_POST['interface'])
$interface = htmlspecialchars(trim($_POST['interface']));
if ($_POST['parentqueue'])
......@@ -137,26 +137,26 @@ if ($_GET) {
/* XXX: Find better way because we shouldn't know about this */
if ($altq) {
switch ($altq->GetScheduler()) {
case "PRIQ":
$q = new priq_queue();
break;
case "PRIQ":
$q = new priq_queue();
break;
case "FAIRQ":
$q = new fairq_queue();
break;
case "HFSC":
$q = new hfsc_queue();
break;
$q = new hfsc_queue();
break;
case "CBQ":
$q = new cbq_queue();
break;
break;
default:
/* XXX: Happens when sched==NONE?! */
$q = new altq_root_queue();
break;
}
break;
}
} else if ($addnewaltq) {
$q = new altq_root_queue();
} else
} else
$input_errors[] = gettext("Could not create new queue/discipline!");
if ($q) {
......@@ -170,7 +170,7 @@ if ($_GET) {
}
break;
case "show":
if ($queue)
if ($queue)
$output_form .= $queue->build_form();
else
$input_errors[] = gettext("Queue not found!");
......@@ -204,7 +204,7 @@ if ($_GET) {
if ($addnewaltq) {
$altq =& new altq_root_queue();
$altq->SetInterface($interface);
switch ($altq->GetBwscale()) {
case "Mb":
$factor = 1000 * 1000;
......@@ -222,14 +222,14 @@ if ($_GET) {
default: /* XXX assume Kb by default. */
$factor = 1000;
break;
}
}
$altq->SetAvailableBandwidth($altq->GetBandwidth() * $factor);
$altq->ReadConfig($_POST);
$altq->validate_input($_POST, $input_errors);
if (!$input_errors) {
unset($tmppath);
$tmppath[] = $altq->GetInterface();
$altq->SetLink($tmppath);
$altq->SetLink($tmppath);
$altq->wconfig();
if (write_config())
mark_subsystem_dirty('shaper');
......@@ -251,9 +251,9 @@ if ($_GET) {
$can_enable = true;
if ($tmp->CanHaveChildren() && $can_enable) {
if ($tmp->GetDefault() <> "")
$can_add = false;
else
$can_add = true;
$can_add = false;
else
$can_add = true;
} else
$can_add = false;
if (write_config())
......@@ -266,7 +266,7 @@ if ($_GET) {
$can_add = true;
}
read_altq_config();
$output_form .= $tmp->build_form();
$output_form .= $tmp->build_form();
} else
$input_errors[] = gettext("Could not add new queue.");
} else if ($_POST['apply']) {
......@@ -275,19 +275,19 @@ if ($_GET) {
$retval = 0;
$retval = filter_configure();
$savemsg = get_std_save_message($retval);
if (stristr($retval, "error") <> true)
$savemsg = get_std_save_message($retval);
else
$savemsg = $retval;
/* reset rrd queues */
/* reset rrd queues */
system("rm -f /var/db/rrd/*queuedrops.rrd");
system("rm -f /var/db/rrd/*queues.rrd");
enable_rrd_graphing();
clear_subsystem_dirty('shaper');
if ($queue) {
$output_form .= $queue->build_form();
$dontshow = false;
......@@ -305,7 +305,7 @@ if ($_GET) {
if (write_config())
mark_subsystem_dirty('shaper');
$dontshow = false;
}
}
read_altq_config();
$output_form .= $queue->build_form();
} else {
......@@ -323,7 +323,7 @@ if ($queue) {
$can_enable = true;
else
$can_enable = false;
if ($queue->CanHaveChildren() && $can_enable) {
if ($queue->CanHaveChildren() && $can_enable) {
if ($altq->GetQname() <> $queue->GetQname() && $queue->GetDefault() <> "")
$can_add = false;
else
......@@ -350,7 +350,7 @@ $output_form .= "</td><td valign=\"middle\" class=\"vncellreq\" width=\"78%\"><b
$output_form .= "<input type=\"submit\" name=\"Submit\" value=\"" . gettext("Save") . "\" class=\"btn btn-primary\" />";
if ($can_add || $addnewaltq) {
$output_form .= "<a href=\"firewall_shaper.php?interface=";
$output_form .= $interface;
$output_form .= $interface;
if ($queue) {
$output_form .= "&amp;queue=" . $queue->GetQname();
}
......@@ -373,7 +373,7 @@ $output_form .= "</a>";
$output_form .= "<br /></td></tr>";
$output_form .= "</table>";
}
else
else
$output_form .= "</table>";
$output = "<table summary=\"output form\">";
......@@ -393,27 +393,27 @@ if ($queue)
echo $queue->build_javascript();
echo $newjavascript;
include("fbegin.inc");
include("fbegin.inc");
?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<div class="container-fluid">
<div class="row">
<div id="inputerrors"></div>
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('shaper')): ?>
<?php print_info_box_np(gettext("The traffic shaper configuration has been changed.")."<br />".gettext("You must apply the changes in order for them to take effect."));?><br />
<?php endif; ?>
<section class="col-xs-12">
<?php
<?php
$tab_array = array();
$tab_array[0] = array(gettext("By Interface"), true, "firewall_shaper.php");
$tab_array[1] = array(gettext("By Queue"), false, "firewall_shaper_queues.php");
......@@ -422,15 +422,15 @@ include("fbegin.inc");
$tab_array[4] = array(gettext("Wizards"), false, "firewall_shaper_wizards.php");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12">
<div class="tab-content content-box col-xs-12">
<form action="firewall_shaper.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<?php if (count($altq_list_queues) > 0): ?>
<tr class="tabcont"><td width="25%" align="left">
......@@ -442,16 +442,16 @@ include("fbegin.inc");
<tr>
<td width="25%" valign="top" align="left" style="vertical-align:top">
<?php
echo $tree;
echo $tree;
?>
</td>
<td width="75%" valign="top" align="center">
<div id="shaperarea" style="position:relative">
<?php
echo $output;
?>
?>
</div>
</td></tr>
</table>
</div>
......@@ -461,5 +461,5 @@ include("fbegin.inc");
</div>
</div>
</section>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
......@@ -391,31 +391,31 @@ function removeRow(tbl,row) {
<body>
<?
$main_buttons = array(
array('label'=>gettext("Create new l7 rules group"), 'href'=>'firewall_shaper_layer7.php?action=add'),
);
);
include("fbegin.inc");
include("fbegin.inc");
?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<div class="container-fluid">
<div class="row">
<div id="inputerrors"></div>
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('shaper')): ?><p>
<?php print_info_box_np(gettext("The traffic shaper configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br /></p>
<?php endif; ?>
<section class="col-xs-12">
<?php
<?php
$tab_array = array();
$tab_array[0] = array(gettext("By Interface"), false, "firewall_shaper.php");
$tab_array[1] = array(gettext("By Queue"), false, "firewall_shaper_queues.php");
......@@ -424,34 +424,34 @@ include("fbegin.inc");
$tab_array[4] = array(gettext("Wizards"), false, "firewall_shaper_wizards.php");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12">
<div class="tab-content content-box col-xs-12">
<form action="firewall_shaper_layer7.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<?php if (count($layer7_rules_list) > 0): ?>
<tr class="tabcont"><td width="25%" align="left">
</td><td width="75%"> </td></tr>
<?php endif; ?>
<tr>
<td width="25%" valign="top" align="left">
<?php
echo $tree;
?>
</td>
<td width="75%" valign="top" align="center">
<div id="shaperarea" style="position:relative">
<?php
echo $output;
?>
<!-- Layer 7 rules form -->
<?php if($show_proto_form): ?>
<tr><td width="22%" valign="top" class="vncellreq">
......@@ -459,11 +459,11 @@ include("fbegin.inc");
<?=gettext("Rule(s)"); ?>
</div>
</td>
<td width="78%" class="vtable">
<table width="236" id="maintable" summary="main table">
<tbody>
<tr>
<td colspan="4">
<div style="font-size: 8pt; padding:5px; margin-top: 16px; margin-bottom: 16px; border:1px dashed #000066;"
......@@ -472,7 +472,7 @@ include("fbegin.inc");
</div>
</td>
</tr>
<tr>
<td>
<div style="font-size: 8pt; padding:5px;"
......@@ -480,14 +480,14 @@ include("fbegin.inc");
<?=gettext("Protocol"); ?>
</div>
</td>
<td>
<div style="font-size: 8pt; padding:5px;"
id="twocolumn">
<?=gettext("Structure"); ?>
</div>
</td>
<td>
<div style="font-size: 8pt; padding:5px;"
id="threecolumn">
......@@ -556,29 +556,29 @@ include("fbegin.inc");
<a onclick="removeRow('maintable',this.parentNode.parentNode); return false;" href="#" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span></a>
</td>
</tr>
<?php
} //end foreach
} //end if
?>
</tbody>
</table>
<a onclick="javascript:addRow('maintable'); return false;" href="#" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus"></span></a><br/><br/>
</td>
</tr>
<tr>
<td width="22%" valign="top">
&nbsp;
</td>
<td width="78%">
<input id="submit" name="submit" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" />
<a href="firewall_shaper_layer7.php">
<input id="cancelbutton" name="cancelbutton" type="button" class="btn btn-default" value="<?=gettext("Cancel"); ?>" />
<?php if($container): ?>
<input id="delete" type="submit" class="formbtn" name="delete" value="<?=gettext("Delete"); ?>" />
<?php endif ?>
......@@ -597,4 +597,4 @@ include("fbegin.inc");
</section>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
......@@ -54,7 +54,7 @@ $shaperIFlist = get_configured_interface_with_descr();
read_altq_config();
$qlist =& get_unique_queue_list();
if (!is_array($qlist))
if (!is_array($qlist))
$qlist = array();
$tree = "<ul class=\"tree\" >";
......@@ -62,14 +62,14 @@ foreach ($qlist as $queue => $qkey) {
$tree .= "<li><a href=\"firewall_shaper_queues.php?queue={$queue}&amp;action=show\" >";
if (isset($shaperIFlist[$queue]))
$tree .= $shaperIFlist[$queue] . "</a></li>";
else
else
$tree .= $queue . "</a></li>";
}
$tree .= "</ul>";
if ($_GET) {
if ($_GET['queue'])
$qname = htmlspecialchars(trim($_GET['queue']));
$qname = htmlspecialchars(trim($_GET['queue']));
if ($_GET['interface'])
$interface = htmlspecialchars(trim($_GET['interface']));
if ($_GET['action'])
......@@ -80,7 +80,7 @@ if ($_GET) {
$altq =& $altq_list_queues[$interface];
$qtmp =& $altq->find_queue("", $qname);
if ($qtmp) {
$qtmp->delete_queue();
$qtmp->delete_queue();
if (write_config())
mark_subsystem_dirty('shaper');
}
......@@ -88,7 +88,7 @@ if ($_GET) {
exit;
break;
case "add":
/*
/*
* XXX: WARNING: This returns the first it finds.
* Maybe the user expects something else?!
*/
......@@ -102,7 +102,7 @@ if ($_GET) {
$config['shaper']['queue'][] = $copycfg;
} else if ($aq) {
$tmp1 =& $qtmp->find_parentqueue($interface, $qname);
if ($tmp1)
if ($tmp1)
$tmp =& $aq->find_queue($interface, $tmp1->GetQname());
if ($tmp)
......@@ -161,7 +161,7 @@ if ($_POST['apply']) {
else
$savemsg = $retval;
/* reset rrd queues */
/* reset rrd queues */
system("rm -f /var/db/rrd/*queuedrops.rrd");
system("rm -f /var/db/rrd/*queues.rrd");
enable_rrd_graphing();
......@@ -183,21 +183,21 @@ include("head.inc");
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<div class="container-fluid">
<div class="row">
<div id="inputerrors"></div>
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('shaper')): ?><p>
<?php print_info_box_np(gettext("The traffic shaper configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br /></p>
<?php endif; ?>
<section class="col-xs-12">
<?php
<?php
$tab_array = array();
$tab_array[0] = array(gettext("By Interface"), false, "firewall_shaper.php");
$tab_array[1] = array(gettext("By Queue"), true, "firewall_shaper_queues.php");
......@@ -206,13 +206,13 @@ include("head.inc");
$tab_array[4] = array(gettext("Wizards"), false, "firewall_shaper_wizards.php");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12">
<div class="tab-content content-box col-xs-12">
<form action="firewall_shaper_queues.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr>
......@@ -220,14 +220,14 @@ include("head.inc");
<?php echo $tree; ?>
</td>
<td width="70%" valign="top" align="center">
<?php
<?php
if ($qname)
echo "<p class=\"pgtitle\">" . $qname . "</p><br />";
echo "<p class=\"pgtitle\">" . $qname . "</p><br />";
echo "<table align=\"center\" class=\"tabcont\" width=\"80%\" border=\"0\" cellpadding=\"4\" cellspacing=\"0\" summary=\"output form\">";
echo $output;
echo "<tr><td>&nbsp;</td></tr>";
echo "</table>";
?>
?>
</td></tr>
</table><!-- table:main area -->
</div><!-- div:main area -->
......@@ -237,6 +237,6 @@ include("head.inc");
</div>
</div>
</section>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
......@@ -54,14 +54,14 @@ $pgtitle = array(gettext("Firewall"),gettext("Traffic Shaper"), gettext("Limiter
$shortcut_section = "trafficshaper-limiters";
read_dummynet_config();
/*
/*
* The whole logic in these code maybe can be specified.
* If you find a better way contact me :).
*/
if ($_GET) {
if ($_GET['queue'])
$qname = htmlspecialchars(trim($_GET['queue']));
$qname = htmlspecialchars(trim($_GET['queue']));
if ($_GET['pipe'])
$pipe = htmlspecialchars(trim($_GET['pipe']));
if ($_GET['action'])
......@@ -69,11 +69,11 @@ if ($_GET) {
}
if ($_POST) {
if ($_POST['name'])
$qname = htmlspecialchars(trim($_POST['name']));
$qname = htmlspecialchars(trim($_POST['name']));
else if ($_POST['newname'])
$qname = htmlspecialchars(trim($_POST['newname']));
$qname = htmlspecialchars(trim($_POST['newname']));
if ($_POST['pipe'])
$pipe = htmlspecialchars(trim($_POST['pipe']));
$pipe = htmlspecialchars(trim($_POST['pipe']));
else
$pipe = htmlspecialchars(trim($qname));
if ($_POST['parentqueue'])
......@@ -155,7 +155,7 @@ if ($_GET) {
} else if ($addnewpipe) {
$q = new dnpipe_class();
$q->SetQname($pipe);
} else
} else
$input_errors[] = gettext("Could not create new queue/discipline!");
if ($q) {
......@@ -166,7 +166,7 @@ if ($_GET) {
}
break;
case "show":
if ($queue)
if ($queue)
$output_form .= $queue->build_form();
else
$input_errors[] = gettext("Queue not found!");
......@@ -204,7 +204,7 @@ if ($_GET) {
$input_errors[] = gettext("You cannot name a child queue with the same name as a parent limiter");
else {
$dnpipe =& new dnpipe_class();
$dnpipe->ReadConfig($_POST);
$dnpipe->validate_input($_POST, $input_errors);
if (!$input_errors) {
......@@ -212,7 +212,7 @@ if ($_GET) {
$dnpipe->SetNumber($number);
unset($tmppath);
$tmppath[] = $dnpipe->GetQname();
$dnpipe->SetLink($tmppath);
$dnpipe->SetLink($tmppath);
$dnpipe->wconfig();
if (write_config())
mark_subsystem_dirty('shaper');
......@@ -250,17 +250,17 @@ if ($_GET) {
$retval = 0;
$retval = filter_configure();
$savemsg = get_std_save_message($retval);
if (stristr($retval, "error") <> true)
$savemsg = get_std_save_message($retval);
else
$savemsg = $retval;
/* XXX: TODO Make dummynet pretty graphs */
/* XXX: TODO Make dummynet pretty graphs */
// enable_rrd_graphing();
clear_subsystem_dirty('shaper');
if ($queue) {
$output_form .= $queue->build_form();
$dontshow = false;
......@@ -278,7 +278,7 @@ if ($_GET) {
if (write_config())
mark_subsystem_dirty('shaper');
$dontshow = false;
}
}
read_dummynet_config();
$output_form .= $queue->build_form();
} else {
......@@ -295,8 +295,8 @@ if ($queue) {
$can_enable = true;
else
$can_enable = false;
if ($queue->CanHaveChildren()) {
$can_add = true;
if ($queue->CanHaveChildren()) {
$can_add = true;
} else
$can_add = false;
}
......@@ -318,7 +318,7 @@ $output_form .= "</td><td valign=\"top\" class=\"vncellreq\" width=\"78%\">";
$output_form .= "<input type=\"submit\" name=\"Submit\" value=\"" . gettext("Save") . "\" class=\"btn btn-primary\" />";
if ($can_add || $addnewaltq) {
$output_form .= "<a href=\"firewall_shaper_vinterface.php?pipe=";
$output_form .= $pipe;
$output_form .= $pipe;
if ($queue) {
$output_form .= "&amp;queue=" . $queue->GetQname();
}
......@@ -337,11 +337,11 @@ if ($queue)
$output_form .= " value=\"" . gettext("Delete this queue") ."\" />";
else
$output_form .= " value=\"" . gettext("Delete Limiter") ."\" />";
$output_form .= "</a>";
$output_form .= "</a>";
$output_form .= "</td></tr>";
$output_form .= "</table>";
}
else
}
else
$output_form .= "</table>";
$output = "<table summary=\"output form\">";
......@@ -372,33 +372,33 @@ if ($queue)
echo $queue->build_javascript();
else
echo $newjavascript;
$main_buttons = array(
array('label'=>gettext("Create new limiter"), 'href'=>'firewall_shaper_vinterface.php?pipe=new&amp;action=add'),
);
include("fbegin.inc");
include("fbegin.inc");
?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<div class="container-fluid">
<div class="row">
<div id="inputerrors"></div>
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('shaper')): ?><p>
<?php print_info_box_np(gettext("The traffic shaper configuration has been changed.")."<br />".gettext("You must apply the changes in order for them to take effect."));?><br /></p>
<?php endif; ?>
<section class="col-xs-12">
<?php
<?php
$tab_array = array();
$tab_array[0] = array(gettext("By Interface"), false, "firewall_shaper.php");
$tab_array[1] = array(gettext("By Queue"), false, "firewall_shaper_queues.php");
......@@ -407,13 +407,13 @@ include("fbegin.inc");
$tab_array[4] = array(gettext("Wizards"), false, "firewall_shaper_wizards.php");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12">
<form action="firewall_shaper_vinterface.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<?php if (count($dummynet_pipe_list) > 0): ?>
......@@ -423,17 +423,17 @@ include("fbegin.inc");
<tr>
<td width="25%" valign="top" align="left">
<?php
echo $tree;
echo $tree;
?>
</td>
<td width="75%" valign="top" align="center">
<div id="shaperarea" style="position:relative">
<?php
echo $output;
?>
?>
</div>
</td>
</tr>
</table>
......@@ -444,16 +444,16 @@ include("fbegin.inc");
</div>
</div>
</section>
<script type='text/javascript'>
//<![CDATA[
<?php
$totalrows = 0;
if (is_array($config['dnshaper']) && is_array($config['dnshaper']['queue']))
if (is_array($config['dnshaper']) && is_array($config['dnshaper']['queue']))
$totalrows = count($config['dnshaper']['queue']);
echo "totalrows = {$totalrows}";
?>
//]]>
</script>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
......@@ -88,19 +88,19 @@ include("head.inc");
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('shaper')): ?><p>
<?php print_info_box_np(gettext("The traffic shaper configuration has been changed.")."<br />".gettext("You must apply the changes in order for them to take effect."));?><br /></p>
<?php endif; ?>
<section class="col-xs-12">
<?php
<?php
$tab_array = array();
$tab_array[0] = array(gettext("By Interface"), false, "firewall_shaper.php");
$tab_array[1] = array(gettext("By Queue"), false, "firewall_shaper_queues.php");
......@@ -109,22 +109,22 @@ include("head.inc");
$tab_array[4] = array(gettext("Wizards"), true, "firewall_shaper_wizards.php");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12">
<div class="tab-content content-box col-xs-12">
<form action="firewall_shaper_wizards.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<thead>
<thead>
<tr>
<td class="listhdrr" width="25%"><?=gettext("Wizard function");?></td>
<td class="listhdrr" width="75%"><?=gettext("Wizard Link");?></td>
</tr>
</thead>
<tbody>
</thead>
<tbody>
<?php
foreach ($wizards as $key => $wizard):
?>
......@@ -151,5 +151,5 @@ include("head.inc");
</div>
</div>
</section>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
......@@ -68,21 +68,21 @@ if ($_POST) {
if (!empty($ovip))
interface_vip_bring_down($ovip);
if ($a_vip[$vid]) {
switch ($a_vip[$vid]['mode']) {
case "ipalias":
interface_ipalias_configure($a_vip[$vid]);
break;
case "proxyarp":
interface_proxyarp_configure($a_vip[$vid]['interface']);
break;
case "carp":
interface_carp_configure($a_vip[$vid]);
switch ($a_vip[$vid]['mode']) {
case "ipalias":
interface_ipalias_configure($a_vip[$vid]);
break;
case "proxyarp":
interface_proxyarp_configure($a_vip[$vid]['interface']);
break;
case "carp":
interface_carp_configure($a_vip[$vid]);
break;
default:
break;
default:
break;
}
}
}
}
}
@unlink("{$g['tmp_path']}/.firewall_virtual_ip.apply");
}
$retval = 0;
......@@ -147,7 +147,7 @@ if ($_GET['act'] == "del") {
if ($subnet == $if_subnet)
$found_if = true;
$vipiface = $a_vip[$_GET['id']]['interface'];
foreach ($a_vip as $vip_id => $vip) {
if ($vip_id == $_GET['id'])
......@@ -163,7 +163,7 @@ if ($_GET['act'] == "del") {
if ($found_carp === true && $found_other_alias === false && $found_if === false)
$input_errors[] = gettext("This entry cannot be deleted because it is still referenced by a CARP IP with the description") . " {$vip['descr']}.";
}
if (!$input_errors) {
if (!session_id())
session_start();
......@@ -197,7 +197,7 @@ $pgtitle = array(gettext("Firewall"),gettext("Virtual IP Addresses"));
include("head.inc");
$main_buttons = array(
array('href'=>'firewall_virtual_ip_edit.php', 'label'=>'Add'),
array('href'=>'firewall_virtual_ip_edit.php', 'label'=>'Add'),
);
?>
......@@ -205,41 +205,41 @@ $main_buttons = array(
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php
if ($input_errors)
<?php
if ($input_errors)
print_input_errors($input_errors);
else
if ($savemsg)
print_info_box($savemsg);
if ($savemsg)
print_info_box($savemsg);
else
if (is_subsystem_dirty('vip'))
print_info_box_np(gettext("The VIP configuration has been changed.")."<br />".gettext("You must apply the changes in order for them to take effect."));
?>
<section class="col-xs-12">
<?php
<?php
/* active tabs */
$tab_array = array();
$tab_array[] = array(gettext("Virtual IPs"), true, "firewall_virtual_ip.php");
$tab_array[] = array(gettext("CARP Settings"), false, "system_hasync.php");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12">
<div class="tab-content content-box col-xs-12">
<form action="firewall_virtual_ip.php" method="post" name="iform" id="iform">
<input type="hidden" id="id" name="id" value="<?php echo htmlspecialchars($id); ?>" />
<input type="hidden" id="id" name="id" value="<?php echo htmlspecialchars($id); ?>" />
<div class="table-responsive">
<table class="table table-striped table-sort">
<thead>
<thead>
<tr>
<td width="30%" class="listhdrr"><?=gettext("Virtual IP address");?></td>
<td width="10%" class="listhdrr"><?=gettext("Interface");?></td>
......@@ -247,8 +247,8 @@ $main_buttons = array(
<td width="40%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list"></td>
</tr>
</thead>
<tbody>
</thead>
<tbody>
<?php
$interfaces = get_configured_interface_with_descr(false, true);
$interfaces['lo0'] = "Localhost";
......@@ -280,7 +280,7 @@ $main_buttons = array(
<tr>
<td valign="middle">
<a href="firewall_virtual_ip_edit.php?id=<?=$i;?>" class="btn btn-default"><span class="glyphicon glyphicon-edit" title="<?=gettext("Edit");?>"></span></a>
<a href="firewall_virtual_ip.php?act=del&amp;tab=<?=$tab;?>&amp;id=<?=$i;?>" class="btn btn-default" onclick="return confirm('<?=gettext("Do you really want to delete this entry?");?>')"><span class="glyphicon glyphicon-remove"></span></a>
</td>
</tr>
......@@ -289,7 +289,7 @@ $main_buttons = array(
</tr>
<?php endif; ?>
<?php $i++; endforeach; ?>
</tbody>
</tbody>
</table>
</div>
<div class="container-fluid">
......@@ -303,5 +303,5 @@ $main_buttons = array(
</div>
</div>
</section>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
......@@ -74,7 +74,7 @@ function find_last_used_vhid() {
global $config, $g;
$vhid = 0;
foreach($config['virtualip']['vip'] as $vip) {
if($vip['vhid'] > $vhid)
if($vip['vhid'] > $vhid)
$vhid = $vip['vhid'];
}
return $vhid;
......@@ -263,7 +263,7 @@ include("head.inc");
<body>
<script type="text/javascript" src="/javascript/jquery.ipv4v6ify.js"></script>
<?php include("fbegin.inc"); ?>
<script type="text/javascript">
......@@ -287,15 +287,15 @@ function enable_change() {
var carpnote = document.createTextNode("<?=gettext("This must be the network's subnet mask. It does not specify a CIDR range.");?>");
var proxyarpnote = document.createTextNode("<?=gettext("This is a CIDR block of proxy ARP addresses.");?>");
var ipaliasnote = document.createTextNode("<?=gettext("This must be the network's subnet mask. It does not specify a CIDR range.");?>");
$mode = get_radio_value(document.iform.mode);
document.iform.password.disabled = $mode != "carp";
document.iform.vhid.disabled = $mode != "carp";
document.iform.advskew.disabled = $mode != "carp";
document.iform.advbase.disabled = $mode != "carp";
document.iform.type.disabled = $mode in {"carp":1,"ipalias":1};
if ($mode in {"carp":1,"ipalias":1})
document.iform.type.selectedIndex = 0;// single-adress
switch($mode)
......@@ -346,29 +346,29 @@ function typesel_change() {
</script>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<div id="inputerrors"></div>
<section class="col-xs-12">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?=gettext("Edit Virtual IP");?></h3>
</header>
<div class="content-box-main">
<form action="firewall_virtual_ip_edit.php" method="post" name="iform" id="iform">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?=gettext("Edit Virtual IP");?></h3>
</header>
<div class="content-box-main">
<form action="firewall_virtual_ip_edit.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Type");?></td>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Type");?></td>
<td width="78%" class="vtable">
<input name="mode" type="radio" onclick="enable_change()" value="ipalias"
<?php if ($pconfig['mode'] == "ipalias") echo "checked=\"checked\"";?> /> <?=gettext("IP Alias");?>
......@@ -384,7 +384,7 @@ function typesel_change() {
<td width="22%" valign="top" class="vncellreq"><?=gettext("Interface");?></td>
<td width="78%" class="vtable">
<select name="interface" class="form-control">
<?php
<?php
$interfaces = get_configured_interface_with_descr(false, true);
$interfaces['lo0'] = "Localhost";
foreach ($interfaces as $iface => $ifacename): ?>
......@@ -420,13 +420,13 @@ function typesel_change() {
</option>
<?php endfor; ?>
</select> <i id="typenote"></i>
</td>
</td>
</tr>
<tr id="noexpandrow">
<td><?=gettext("Expansion:");?>&nbsp;&nbsp;</td>
<td><input name="noexpand" type="checkbox" class="form-control unknown" id="noexpand" <?php echo (isset($pconfig['noexpand'])) ? "checked=\"checked\"" : "" ; ?> />
Disable expansion of this entry into IPs on NAT lists (e.g. 192.168.1.0/24 expands to 256 entries.)
</td>
Disable expansion of this entry into IPs on NAT lists (e.g. 192.168.1.0/24 expands to 256 entries.)
</td>
</tr>
<?php
/*
......@@ -437,7 +437,7 @@ function typesel_change() {
<input name="range_to" type="text" class="form-control unknown" id="range_to" size="28" value="<?=htmlspecialchars($pconfig['range']['to']);?>" />
</td>
</tr>
*/
*/
?>
</table>
</td>
......@@ -465,18 +465,18 @@ function typesel_change() {
<td class="vtable">
Base: <select id='advbase' name='advbase'>
<?php for ($i = 1; $i <= 254; $i++): ?>
<option value="<?=$i;?>" <?php if ($i == $pconfig['advbase']) echo "selected=\"selected\""; ?>>
<option value="<?=$i;?>" <?php if ($i == $pconfig['advbase']) echo "selected=\"selected\""; ?>>
<?=$i;?>
</option>
</option>
<?php endfor; ?>
</select>
</select>
Skew: <select id='advskew' name='advskew'>
<?php for ($i = 0; $i <= 254; $i++): ?>
<option value="<?=$i;?>" <?php if ($i == $pconfig['advskew']) echo "selected=\"selected\""; ?>>
<option value="<?=$i;?>" <?php if ($i == $pconfig['advskew']) echo "selected=\"selected\""; ?>>
<?=$i;?>
</option>
</option>
<?php endfor; ?>
</select>
</select>
<br /><br />
<?=gettext("The frequency that this machine will advertise. 0 means usually master. Otherwise the lowest combination of both values in the cluster determines the master.");?>
</td>
......@@ -501,16 +501,16 @@ function typesel_change() {
</div>
<div class="container-fluid">
<p class="vexpl">
<span class="text-danger">
<span class="text-danger">
<strong><?=gettext("Note:");?><br /></strong>
</span>
<?=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 cases.");?>
<br /><br /><?=gettext("For more information on CARP and the above values, visit the OpenBSD ");?><a href='http://www.openbsd.org/faq/pf/carp.html'> <?=gettext("CARP FAQ"); ?></a>.
</span>
<?=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 cases.");?>
<br /><br /><?=gettext("For more information on CARP and the above values, visit the OpenBSD ");?><a href='http://www.openbsd.org/faq/pf/carp.html'> <?=gettext("CARP FAQ"); ?></a>.
</p>
</div>
</form>
</div>
</div>
</form>
</div>
</div>
</section>
</div>
</div>
......@@ -521,4 +521,4 @@ function typesel_change() {
enable_change();
//]]>
</script>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment