diff --git a/src/www/firewall_aliases.php b/src/www/firewall_aliases.php index ca2ce9ba5..624ec1251 100644 --- a/src/www/firewall_aliases.php +++ b/src/www/firewall_aliases.php @@ -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")), - + ); ?> - +
-
+
- +

" . gettext("You must apply the changes in order for them to take effect."));?> - +

- - - - - -
- - + + +
+ +
- - + +
@@ -205,7 +205,7 @@ $main_buttons = array(
- +
"> - + ')"> - +
@@ -278,7 +278,7 @@ $main_buttons = array( + ?>
@@ -290,4 +290,4 @@ $main_buttons = array(
- \ No newline at end of file + diff --git a/src/www/firewall_aliases_edit.php b/src/www/firewall_aliases_edit.php index 7f368979a..7ae068843 100755 --- a/src/www/firewall_aliases_edit.php +++ b/src/www/firewall_aliases_edit.php @@ -624,26 +624,26 @@ EOD;
-
+
- +
- +
- -
- -
-

-
- -
- - - + +
+

+
+ +
+ + + - +
@@ -713,7 +713,7 @@ EOD; - + ""): @@ -748,7 +748,7 @@ EOD; @@ -770,14 +770,14 @@ EOD;
CIDR
- -
-
+ +
+
- + - \ No newline at end of file + diff --git a/src/www/firewall_aliases_import.php b/src/www/firewall_aliases_import.php index 956e7e876..5909caa98 100755 --- a/src/www/firewall_aliases_import.php +++ b/src/www/firewall_aliases_import.php @@ -162,25 +162,25 @@ include("head.inc");
-
+
- +
- +
- -
- -
-

-
- -
- -
- + +
+ +
+

+
+ +
+ + +
@@ -230,9 +230,9 @@ include("head.inc");
- -
-
+ +
+
@@ -240,4 +240,4 @@ include("head.inc"); - \ No newline at end of file + diff --git a/src/www/firewall_nat.php b/src/www/firewall_nat.php index e82c4e499..645decf49 100644 --- a/src/www/firewall_nat.php +++ b/src/www/firewall_nat.php @@ -107,7 +107,7 @@ if (isset($_POST['del_x'])) { // Check for filter rule associations if (isset($a_nat[$rulei]['associated-rule-id'])){ delete_id($a_nat[$rulei]['associated-rule-id'], $config['filter']['rule']); - + mark_subsystem_dirty('filter'); } unset($a_nat[$rulei]); @@ -179,13 +179,13 @@ $main_buttons = array( body.dragging, body.dragging * { cursor: move !important; } - + .dragged { position: absolute; opacity: 0.5; z-index: 2000; } - + ol.example li.placeholder { position: relative; /** More li styles **/ @@ -193,29 +193,29 @@ $main_buttons = array( ol.example li.placeholder:before { position: absolute; /** Define arrowhead **/ - } + } - + - +
-
+
- - + + " . gettext("You must apply the changes in order for them to take effect."));?>
- +
- - - - -
- + +
+
- - + +
- - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - "; - + $alias_popup = rule_popup($natent['source']['address'], pprint_port($natent['source']['port']), $natent['destination']['address'], pprint_port($natent['destination']['port'])); - + $alias_src_span_begin = $alias_popup["src"]; $alias_src_port_span_begin = $alias_popup["srcport"]; $alias_dst_span_begin = $alias_popup["dst"]; $alias_dst_port_span_begin = $alias_popup["dstport"]; - + $alias_src_span_end = $alias_popup["src_end"]; $alias_src_port_span_end = $alias_popup["srcport_end"]; $alias_dst_span_end = $alias_popup["dst_end"]; $alias_dst_port_span_end = $alias_popup["dstport_end"]; - + $alias_popup = rule_popup("","",$natent['target'], pprint_port($natent['local-port'])); - + $alias_target_span_begin = $alias_popup["dst"]; $alias_local_port_span_begin = $alias_popup["dstport"]; - + $alias_target_span_end = $alias_popup["dst_end"]; $alias_local_port_span_end = $alias_popup["dstport_end"]; - + if (isset($natent['disabled'])) $textss = ""; else $textss = ""; - + $textse = ""; - + /* if user does not have access to edit an interface skip on to the next record */ - if(!have_natpfruleint_access($natent['interface'])) + if(!have_natpfruleint_access($natent['interface'])) continue; ?> @@ -292,10 +292,10 @@ $main_buttons = array( - + - + - + - + - + + + + + + ')" class="btn btn-default btn-xs"> + + - + - + @@ -405,4 +405,4 @@ $main_buttons = array( - \ No newline at end of file + diff --git a/src/www/firewall_nat_1to1.php b/src/www/firewall_nat_1to1.php index edfa04722..8bb35cac2 100644 --- a/src/www/firewall_nat_1to1.php +++ b/src/www/firewall_nat_1to1.php @@ -154,13 +154,13 @@ $main_buttons = array( ?> - +
-
-
- +
+
+ " . gettext("You must apply the changes in order for them to take effect.")); ?> - -
- + +
+ - -
- + +
+ - - + +
  
  
- + - + @@ -308,34 +308,34 @@ $main_buttons = array( ?>   - - - - - ')" class="btn btn-default btn-xs"> - -
      - + - + - + ">
- + @@ -200,8 +200,8 @@ $main_buttons = array( - - + + - +
   
@@ -257,7 +257,7 @@ $main_buttons = array( - + ')" class="btn btn-default btn-xs"> @@ -270,7 +270,7 @@ $main_buttons = array(
- + @@ -282,9 +282,9 @@ $main_buttons = array( - + - + @@ -312,7 +312,7 @@ $main_buttons = array(

@@ -322,4 +322,4 @@ $main_buttons = array(
- \ No newline at end of file + diff --git a/src/www/firewall_nat_1to1_edit.php b/src/www/firewall_nat_1to1_edit.php index 1c19179f7..f9d5621cd 100644 --- a/src/www/firewall_nat_1to1_edit.php +++ b/src/www/firewall_nat_1to1_edit.php @@ -229,7 +229,7 @@ include("head.inc"); - + - \ No newline at end of file + diff --git a/src/www/firewall_nat_edit.php b/src/www/firewall_nat_edit.php index ce6b16ada..8865cdcda 100644 --- a/src/www/firewall_nat_edit.php +++ b/src/www/firewall_nat_edit.php @@ -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"); - + - +
- -
- + +
+ - +
- -
- -
- -
- + +
+ + + +
+
@@ -487,7 +487,7 @@ include("head.inc"); @@ -511,34 +511,34 @@ include("head.inc"); @@ -612,7 +612,7 @@ include("head.inc"); @@ -629,9 +629,9 @@ include("head.inc"); @@ -683,16 +683,16 @@ include("head.inc"); - - $ifdesc): ?> + + $ifdesc): ?> - - + + @@ -757,7 +757,7 @@ include("head.inc"); $wkportdesc): ?> - + @@ -844,7 +844,7 @@ include("head.inc"); $linkedrule = "
" . gettext("View the filter rule") . "
"; } echo ">". htmlspecialchars('Rule ' . $filter_rule['descr']) . "\n"; - + } } } @@ -870,7 +870,7 @@ include("head.inc"); - \ No newline at end of file + diff --git a/src/www/firewall_nat_npt.php b/src/www/firewall_nat_npt.php index 72997d2ac..f62777612 100644 --- a/src/www/firewall_nat_npt.php +++ b/src/www/firewall_nat_npt.php @@ -86,20 +86,20 @@ $main_buttons = array( - +
-
-
- +
+
+ " . gettext("You must apply the changes in order for them to take effect."));?>
- -
- + +
+ - -
+ +
- -
-
- + +
+
+ - - - - - - - + + + + + + + - + - "; - + $i = 0; foreach ($a_npt as $natent): - + if (isset($natent['disabled'])) $textss = ""; else @@ -147,17 +147,17 @@ $main_buttons = array( echo $textse; ?> - - +
- + - + @@ -169,15 +169,15 @@ $main_buttons = array(
-
+
- +
- \ No newline at end of file + diff --git a/src/www/firewall_nat_npt_edit.php b/src/www/firewall_nat_npt_edit.php index 0a10665e0..a0fbe10e9 100644 --- a/src/www/firewall_nat_npt_edit.php +++ b/src/www/firewall_nat_npt_edit.php @@ -1,22 +1,22 @@ -. 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");
- -
+ +
- +
- -
- -
- -
- + +
+ + + +
+
- +
@@ -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): ?>

- @@ -278,16 +278,16 @@ include("head.inc");
- + - +
- +   - + " /> " onclick="window.location.href=''" /> @@ -296,12 +296,12 @@ include("head.inc"); -
+
-
+
- - \ No newline at end of file + + diff --git a/src/www/firewall_nat_out.php b/src/www/firewall_nat_out.php index 29ab31264..6c7bb840b 100644 --- a/src/www/firewall_nat_out.php +++ b/src/www/firewall_nat_out.php @@ -218,22 +218,22 @@ include("head.inc"); - +
-
-
- +
+
+ ".gettext("You must apply the changes in order for them to take effect.")); ?> - +
- -
- + +
+ - +
- +
- + - - + + - + - +
/> @@ -273,7 +273,7 @@ include("head.inc");
/> @@ -296,45 +296,45 @@ include("head.inc");
- + " />
- -
- -
- + +
+ +
+
- - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - + " class=" "> @@ -640,7 +640,7 @@ include("head.inc");
   - - -
   + + +
NO NAT'; elseif (!$natent['target']) @@ -440,7 +440,7 @@ include("head.inc"); - + " alt="edit" class="btn btn-default btn-xs"> ')" title="" alt="delete" class="btn btn-default btn-xs"> " class="btn btn-default btn-xs"> @@ -476,14 +476,14 @@ include("head.inc");
- + - + - - + + @@ -491,9 +491,9 @@ include("head.inc"); - + " alt="add" class="btn btn-default btn-xs"> - + @@ -505,7 +505,7 @@ include("head.inc"); - +
-
+
@@ -648,4 +648,4 @@ include("head.inc");
- \ No newline at end of file + diff --git a/src/www/firewall_nat_out_edit.php b/src/www/firewall_nat_out_edit.php index dc24397e3..cbc72ed67 100644 --- a/src/www/firewall_nat_out_edit.php +++ b/src/www/firewall_nat_out_edit.php @@ -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() {
- -
+ +
- +
- -
- -
- -
- - + +
+ + + +
+
+ @@ -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): ?> - + - + @@ -833,7 +833,7 @@ function poolopts_change() { @@ -852,16 +852,16 @@ function poolopts_change() {
   @@ -716,7 +716,7 @@ function poolopts_change() {
  @@ -821,7 +821,7 @@ function poolopts_change() {
-
+
-
+
- - - + + + - \ No newline at end of file + diff --git a/src/www/firewall_rules.php b/src/www/firewall_rules.php index 3c1e84a52..004c52ec0 100644 --- a/src/www/firewall_rules.php +++ b/src/www/firewall_rules.php @@ -77,10 +77,10 @@ $ifdescs = get_configured_interface_with_descr(); // Drag and drop reordering if($_REQUEST['dragdroporder']) { - - - + + + // First create a new ruleset array and tmp arrays $a_filter_before = array(); $a_filter_order = array(); @@ -256,9 +256,9 @@ if (isset($_POST['del_x'])) { break; } } - - + + /* move selected rules before this rule */ if (isset($movebtn) && is_array($_POST['rule']) && count($_POST['rule'])) { $a_filter_new = array(); @@ -305,13 +305,13 @@ include("head.inc"); body.dragging, body.dragging * { cursor: move !important; } - + .dragged { position: absolute; opacity: 0.5; z-index: 2000; } - + ol.example li.placeholder { position: relative; /** More li styles **/ @@ -319,7 +319,7 @@ include("head.inc"); ol.example li.placeholder:before { position: absolute; /** Define arrowhead **/ - } + } @@ -329,17 +329,17 @@ include("head.inc"); jQuery(window).load( function(){ var originalLeave=jQuery.fn.popover.Constructor.prototype.leave; - jQuery.fn.popover.Constructor.prototype.leave=function(obj) + jQuery.fn.popover.Constructor.prototype.leave=function(obj) { var self=obj instanceof this.constructor?obj:jQuery(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.'+this.type) var container,timeout;originalLeave.call(this,obj); if(obj.currentTarget){container=jQuery(obj.currentTarget).siblings('.popover') timeout=self.timeout; container.one('mouseenter',function() - { + { clearTimeout(timeout); container.one('mouseleave',function() - { + { jQuery.fn.popover.Constructor.prototype.leave.call(self,self); }); }) @@ -356,9 +356,9 @@ include("head.inc");
-
+
- +

- - - - - -
- - + + +
+ +
- +
@@ -416,7 +416,7 @@ include("head.inc"); @@ -460,17 +460,17 @@ include("head.inc"); - + - + @@ -482,9 +482,9 @@ include("head.inc"); @@ -493,7 +493,7 @@ include("head.inc"); - + @@ -505,11 +505,11 @@ include("head.inc"); @@ -570,14 +570,14 @@ include("head.inc"); //$alias_src_port_span_begin = ""; //$alias_dst_span_begin = ""; //$alias_dst_port_span_begin = ""; - + $alias_popup = rule_popup($filterent['source']['address'],pprint_port($filterent['source']['port']),$filterent['destination']['address'],pprint_port($filterent['destination']['port'])); //var_dump($alias_popup); //$alias_src_span_begin = $alias_popup["src"]; //$alias_src_port_span_begin = $alias_popup["srcport"]; //$alias_dst_span_begin = $alias_popup["dst"]; //$alias_dst_port_span_begin = $alias_popup["dstport"]; - + $alias_src_span_end = ""; //$alias_popup["src_end"]; //$alias_src_port_span_end = $alias_popup["srcport_end"]; //$alias_dst_span_end = $alias_popup["dst_end"]; @@ -609,7 +609,7 @@ include("head.inc"); { if ($schedule['name'] == $filterent['sched'] ){ $schedstatus = filter_get_time_based_rule_status($schedule); - + foreach($schedule['timerange'] as $timerange) { $tempFriendlyTime = ""; $tempID = ""; @@ -617,14 +617,14 @@ include("head.inc"); 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']); @@ -634,14 +634,14 @@ include("head.inc"); 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++; @@ -798,7 +798,7 @@ include("head.inc"); @@ -834,9 +834,9 @@ include("head.inc");
- + - + @@ -441,7 +441,7 @@ include("head.inc"); if (!isset($config['system']['webgui']['noantilockout']) && (((count($config['interfaces']) > 1) && ($if == 'lan')) || ((count($config['interfaces']) == 1) && ($if == 'wan')))): - + $alports = implode('
', filter_get_antilockout_ports(true)); ?>
" alt="move" class="btn btn-default btn-xs"> " class="btn btn-default btn-xs"> - + " width="17" height="17" border="0" alt="add" class="btn btn-default btn-xs">
  * * " alt="move" class="btn btn-default btn-xs"> - + " class="btn btn-default btn-xs"> - + " width="17" height="17" border="0" alt="add" class="btn btn-default btn-xs">
  * * " alt="move" class="btn btn-default btn-xs"> - + " class="btn btn-default btn-xs"> - + " width="17" height="17" border="0" alt="add" class="btn btn-default btn-xs"> - +
" class="btn btn-default btn-xs"> - + " onclick="return confirm('Do you really want to delete this rule?')" class="btn btn-default btn-xs"> " class="btn btn-default btn-xs">     - + - + @@ -845,8 +845,8 @@ include("head.inc");
- - + +
@@ -915,13 +915,13 @@ include("head.inc"); - + - \ No newline at end of file + diff --git a/src/www/firewall_rules_edit.php b/src/www/firewall_rules_edit.php index f184d298d..18af8d758 100644 --- a/src/www/firewall_rules_edit.php +++ b/src/www/firewall_rules_edit.php @@ -583,7 +583,7 @@ if ($_POST) { if (($_POST['statetimeout'] != "") && !is_posnumericint($_POST['statetimeout'])) $input_errors[] = gettext("State timeout (advanced option) must be a positive integer"); - if ((($_POST['max-src-conn-rate'] <> "" and $_POST['max-src-conn-rates'] == "")) || + if ((($_POST['max-src-conn-rate'] <> "" and $_POST['max-src-conn-rates'] == "")) || (($_POST['max-src-conn-rate'] == "" and $_POST['max-src-conn-rates'] <> ""))) $input_errors[] = gettext("Both maximum new connections per host and the interval (per second(s)) must be specified"); @@ -810,24 +810,24 @@ include("head.inc"); - +
- -
+ +
- -
- - - - -
-
+ +
+ + + + +
+
@@ -930,7 +930,7 @@ include("head.inc"); 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 */ @@ -945,7 +945,7 @@ include("head.inc"); $selected_interfaces = explode(",", $pconfig['interface']); foreach ($interfaces as $iface => $ifacename): ?> - +
@@ -995,7 +995,7 @@ include("head.inc"); $protocols = explode(" ", "TCP UDP TCP/UDP ICMP ESP AH GRE IPV6 IGMP PIM OSPF any carp pfsync"); foreach ($protocols as $proto): ?> - +

TCP  
@@ -1025,10 +1025,10 @@ include("head.inc"); "maskreq" => gettext("Address mask request"), "maskrep" => gettext("Address mask reply") ); - + foreach ($icmptypes as $icmptype => $descr): ?> - +
@@ -1079,7 +1079,7 @@ include("head.inc"); - + @@ -1090,7 +1090,7 @@ include("head.inc"); @@ -1112,9 +1112,9 @@ include("head.inc"); autocomplete='off' class="formfldalias" name="srcbeginport_cust" id="srcbeginport_cust" type="text" size="5" value="" /> @@ -1172,15 +1172,15 @@ include("head.inc"); - - $ifdesc): ?> + + $ifdesc): ?> - + @@ -1211,9 +1211,9 @@ include("head.inc"); autocomplete='off' class="formfldalias" name="dstbeginport_cust" id="dstbeginport_cust" type="text" size="5" value="" /> @@ -1226,7 +1226,7 @@ include("head.inc"); $wkportdesc): ?> - + autocomplete='off' class="formfldalias" name="dstendport_cust" id="dstendport_cust" type="text" size="5" value="" /> @@ -1266,7 +1266,7 @@ include("head.inc"); " onclick="window.location.href=''" /> - + @@ -1458,7 +1458,7 @@ include("head.inc"); else $opts .= "\n"; } - + $optsset = ""; foreach($vlanprio as $vprioset) { if ($vprioset == $pconfig['vlanprioset']) @@ -1618,7 +1618,7 @@ include("head.inc"); - + @@ -1779,4 +1779,4 @@ include("head.inc"); var oTextbox6 = new AutoSuggestControl(document.getElementById("dstendport_cust"), new StateSuggestions(customarray)); //]]> - \ No newline at end of file + diff --git a/src/www/firewall_schedule.php b/src/www/firewall_schedule.php index 9c2a91157..70f45edee 100644 --- a/src/www/firewall_schedule.php +++ b/src/www/firewall_schedule.php @@ -96,34 +96,34 @@ $main_buttons = array(
-
+
- + - +
- -
- - -
- - - + +
+ + +
+ + +
-
@@ -1745,7 +1745,7 @@ include("head.inc"); " onclick="window.location.href=''" /> - +
- +
+ - - + + - @@ -465,18 +465,18 @@ function typesel_change() { @@ -501,16 +501,16 @@ function typesel_change() {

- +
-
- -

. +
+ +

.

- - - + + + @@ -521,4 +521,4 @@ function typesel_change() { enable_change(); //]]> - \ No newline at end of file +
- +
@@ -131,14 +131,14 @@ $main_buttons = array( -  " width="17" height="17" border="0" alt="schedule" /> +  " width="17" height="17" border="0" alt="schedule" /> - - - + + + - +
+
-   - +   + @@ -243,17 +243,17 @@ $main_buttons = array( - +
" class="btn btn-default btn-xs">


- - - + + + - \ No newline at end of file + diff --git a/src/www/firewall_schedule_edit.php b/src/www/firewall_schedule_edit.php index 0e30d202c..86b0a40a1 100644 --- a/src/www/firewall_schedule_edit.php +++ b/src/www/firewall_schedule_edit.php @@ -84,7 +84,7 @@ if (isset($id) && $a_schedules[$id]) { } if ($_POST) { - + if(strtolower($_POST['name']) == "lan") $input_errors[] = gettext("Schedule may not be named LAN."); if(strtolower($_POST['name']) == "wan") @@ -99,7 +99,7 @@ if ($_POST) { if (is_validaliasname($_POST['name']) == false) $input_errors[] = gettext("The schedule name may only consist of the characters a-z, A-Z, 0-9"); } - + /* check for name conflicts */ foreach ($a_schedules as $schedule) { if (isset($id) && ($a_schedules[$id]) && ($a_schedules[$id] === $schedule)) @@ -111,10 +111,10 @@ if ($_POST) { } } $schedule = array(); - + $schedule['name'] = $_POST['name']; - $schedule['descr'] = htmlentities($_POST['descr'], ENT_QUOTES, 'UTF-8'); - + $schedule['descr'] = htmlentities($_POST['descr'], ENT_QUOTES, 'UTF-8'); + $timerangeFound = false; for ($x=0; $x<99; $x++){ if($_POST['schedule' . $x]) { @@ -133,7 +133,7 @@ if ($_POST) { $timehourstr = $_POST['starttime' . $x]; $timehourstr .= "-"; $timehourstr .= $_POST['stoptime' . $x]; - $timedescrstr = htmlentities($_POST['timedescr' . $x], ENT_QUOTES, 'UTF-8'); + $timedescrstr = htmlentities($_POST['timedescr' . $x], ENT_QUOTES, 'UTF-8'); $dashpos = strpos($timestr, '-'); if ($dashpos === false) { @@ -151,30 +151,30 @@ if ($_POST) { if ($firstprint) { $monthstr .= ","; - $daystr .= ","; + $daystr .= ","; } $tempstr = ""; $monthpos = strpos($currentselection, "m"); $daypos = strpos($currentselection, "d"); $monthstr .= substr($currentselection, $monthpos+1, $daypos-$monthpos-1); - $daystr .= substr($currentselection, $daypos+1); + $daystr .= substr($currentselection, $daypos+1); $firstprint = true; } } $timeparts['month'] = $monthstr; $timeparts['day'] = $daystr; - } + } $timeparts['hour'] = $timehourstr; $timeparts['rangedescr'] = $timedescrstr; $schedule['timerange'][$x] = $timeparts; } } - + if (!$timerangeFound) $input_errors[] = gettext("The schedule must have at least one time range configured."); - - if (!$input_errors) { - + + if (!$input_errors) { + if (!empty($pconfig['schedlabel'])) $schedule['schedlabel'] = $pconfig['schedlabel']; else @@ -192,7 +192,7 @@ if ($_POST) { header("Location: firewall_schedule.php"); exit; - + } //we received input errors, copy data to prevent retype else @@ -204,7 +204,7 @@ if ($_POST) { $pconfig['name'] = $schedule['name']; $pconfig['descr'] = $schedule['descr']; $pconfig['timerange'] = $schedule['timerange']; - } + } } include("head.inc"); @@ -231,17 +231,17 @@ function rgb2hex(rgb) { function repeatExistingDays(){ var tempstr, tempstrdaypos, week, daypos, dayposdone = ""; - + var dayarray = daysSelected.split(","); for (i=0; i<=dayarray.length; i++){ tempstr = dayarray[i]; tempstrdaypos = tempstr.search("p"); week = tempstr.substring(1,tempstrdaypos); week = parseInt(week); - dashpos = tempstr.search("-"); + dashpos = tempstr.search("-"); daypos = tempstr.substring(tempstrdaypos+1, dashpos); daypos = parseInt(daypos); - + daydone = dayposdone.search(daypos); tempstr = 'w' + week + 'p' + daypos; daycell = eval('document.getElementById(tempstr)'); @@ -252,67 +252,67 @@ function repeatExistingDays(){ daytogglerepeating(week,daypos,false); dayposdone += daypos + ","; } - } + } } function daytogglerepeating(week,daypos,bExists){ var tempstr, daycell, dayoriginal = ""; for (j=1; j<=53; j++) - { + { tempstr = 'w' + j + 'p' + daypos; daycell = eval('document.getElementById(tempstr)'); dayoriginalpos = daysSelected.indexOf(tempstr); - + //if bExists set to true, means cell is already select it - //unselect it and remove original day from daysSelected string - + //unselect it and remove original day from daysSelected string + if (daycell != null) { - if (bExists){ + if (bExists){ daycell.style.backgroundColor = "#FFFFFF"; // white } else { - daycell.style.backgroundColor = "#F08080"; // lightcoral - } - + daycell.style.backgroundColor = "#F08080"; // lightcoral + } + if (dayoriginalpos != "-1") - { + { dayoriginalend = daysSelected.indexOf(',', dayoriginalpos); tempstr = daysSelected.substring(dayoriginalpos, dayoriginalend+1); daysSelected = daysSelected.replace(tempstr, ""); - - } - } - } + + } + } + } } function daytoggle(id) { var runrepeat, tempstr = ""; var bFoundValid = false; - + iddashpos = id.search("-"); var tempstrdaypos = id.search("p"); var week = id.substring(1,tempstrdaypos); week = parseInt(week); - + if (iddashpos == "-1") { idmod = id; runrepeat = true; - var daypos = id.substr(tempstrdaypos+1); + var daypos = id.substr(tempstrdaypos+1); } else - { + { idmod = id.substring(0,iddashpos); var daypos = id.substring(tempstrdaypos+1,iddashpos); } - + daypos = parseInt(daypos); - + while (!bFoundValid){ - var daycell = document.getElementById(idmod); - + var daycell = document.getElementById(idmod); + if (daycell != null){ if (rgb2hex(daycell.style.backgroundColor) == "#FF0000"){ // red daycell.style.backgroundColor = "#FFFFFF"; // white @@ -332,7 +332,7 @@ function daytoggle(id) { else { daycell.style.backgroundColor = "#F08080"; // lightcoral - daytogglerepeating(week,daypos,false); + daytogglerepeating(week,daypos,false); } daysSelected += id + ","; } @@ -343,7 +343,7 @@ function daytoggle(id) { //we found an invalid cell when column was clicked, move up to the next week week++; tempstr = "w" + week + "p" + daypos; - idmod = tempstr; + idmod = tempstr; } } } @@ -355,7 +355,7 @@ function update_month(){ for (i=0; i<=11; i++){ option = document.forms[0].monthsel.options[i].text; document.popupMonthLayer = eval('document.getElementById (option)'); - + if(selected == option) { document.popupMonthLayer.style.display="block"; } @@ -379,7 +379,7 @@ function checkForRanges(){ function processEntries(){ var tempstr, starttimehour, starttimemin, stoptimehour, stoptimemin, errors = ""; var passedValidiation = true; - + //get time specified starttimehour = parseInt(document.getElementById("starttimehour").value); starttimemin = parseInt(document.getElementById("starttimemin").value); @@ -387,12 +387,12 @@ function processEntries(){ stoptimemin = parseInt(document.getElementById("stoptimemin").value); - //do time checks + //do time checks if (starttimehour > stoptimehour) { errors = "Error: Start Hour cannot be greater than Stop Hour."; passedValidiation = false; - + } else if (starttimehour == stoptimehour) { @@ -400,8 +400,8 @@ function processEntries(){ errors = "Error: Start Minute cannot be greater than Stop Minute."; passedValidiation = false; } - } - + } + if (passedValidiation){ addTimeRange(); } @@ -421,11 +421,11 @@ function addTimeRange(){ rtempID = ""; nrtempTime = ""; rtempTime = ""; - tempdayarray.sort(); + tempdayarray.sort(); rtempFriendlyDay = ""; monthstr = ""; daystr = ""; - + //check for existing entries var findCurrentCounter; for (u=0; u<99; u++){ @@ -436,25 +436,25 @@ function addTimeRange(){ break; } } - + if (daysSelected != ""){ //get days selected for (i=0; i"; - tr.appendChild(td); - + tr.appendChild(td); + td = d.createElement("td"); td.innerHTML=""; tr.appendChild(td); - + td = d.createElement("td"); td.innerHTML=""; tr.appendChild(td); - + td = d.createElement("td"); td.innerHTML=""; tr.appendChild(td); - + td = d.createElement("td"); td.innerHTML = ""; tr.appendChild(td); - + td = d.createElement("td"); td.innerHTML = ""; tr.appendChild(td); - - td = d.createElement("td"); - td.innerHTML=""; + + td = d.createElement("td"); + td.innerHTML=""; tr.appendChild(td); tbody.appendChild(tr); - + schCounter++; - + //reset calendar and time and descr clearCalendar(); clearTime(); @@ -666,10 +666,10 @@ function clearCalendar(){ tempstr = 'w' + j + 'p' + k; daycell = eval('document.getElementById(tempstr)'); if (daycell != null){ - daycell.style.backgroundColor = "#FFFFFF"; // white - } + daycell.style.backgroundColor = "#FFFFFF"; // white + } } - } + } } function clearTime(){ @@ -685,44 +685,44 @@ function clearDescr(){ function editRow(incTime, el) { var check = checkForRanges(); - - if (check){ - + + if (check){ + //reset calendar and time clearCalendar(); clearTime(); - - var starttimehour, descr, days, tempstr, starttimemin, hours, stoptimehour, stoptimemin = ""; - + + var starttimehour, descr, days, tempstr, starttimemin, hours, stoptimehour, stoptimemin = ""; + tempArray = incTime.split ("||"); - + days = tempArray[0]; hours = tempArray[1]; descr = tempArray[2]; - + var tempdayArray = days.split(","); var temphourArray = hours.split("-"); tempstr = temphourArray[0]; var temphourArray2 = tempstr.split(":"); - + document.getElementById("starttimehour").value = temphourArray2[0]; - document.getElementById("starttimemin").value = temphourArray2[1]; - + document.getElementById("starttimemin").value = temphourArray2[1]; + tempstr = temphourArray[1]; temphourArray2 = tempstr.split(":"); - + document.getElementById("stoptimehour").value = temphourArray2[0]; document.getElementById("stoptimemin").value = temphourArray2[1]; - + document.getElementById("timerangedescr").value = descr; - + //toggle the appropriate days for (i=0; i -
+
- +
- +
- -
- -
-

-
- -
- -
- + +
+ +
+

+
+ +
+ + +
- - + + - + - + - + "; $output_form .= "
- +


- - - - + + + +

- - - - + + + +
@@ -459,11 +459,11 @@ include("fbegin.inc"); - + - + - + - + - +
@@ -556,29 +556,29 @@ include("fbegin.inc");
- +

  " /> - + " /> - + " /> @@ -597,4 +597,4 @@ include("fbegin.inc"); - \ No newline at end of file + diff --git a/src/www/firewall_shaper_queues.php b/src/www/firewall_shaper_queues.php index 17b0089a4..74c919699 100644 --- a/src/www/firewall_shaper_queues.php +++ b/src/www/firewall_shaper_queues.php @@ -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 = ""; 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");
-
-
- +
+
+
- +

" . gettext("You must apply the changes in order for them to take effect."));?>

- - - - - -
- + + +
+ - - + +
@@ -220,14 +220,14 @@ include("head.inc");
- " . $qname . "


"; + echo "

" . $qname . "


"; echo ""; echo $output; echo ""; echo "
 
"; - ?> + ?>
@@ -237,6 +237,6 @@ include("head.inc");
- - \ No newline at end of file + + diff --git a/src/www/firewall_shaper_vinterface.php b/src/www/firewall_shaper_vinterface.php index 3e0f4ffcf..8c4dae5cf 100644 --- a/src/www/firewall_shaper_vinterface.php +++ b/src/www/firewall_shaper_vinterface.php @@ -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 .= "
"; $output_form .= ""; if ($can_add || $addnewaltq) { $output_form .= "GetQname(); } @@ -337,11 +337,11 @@ if ($queue) $output_form .= " value=\"" . gettext("Delete this queue") ."\" />"; else $output_form .= " value=\"" . gettext("Delete Limiter") ."\" />"; -$output_form .= ""; +$output_form .= ""; $output_form .= "
"; -} -else +} +else $output_form .= "
"; $output = ""; @@ -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&action=add'), ); - -include("fbegin.inc"); + +include("fbegin.inc"); ?>
-
-
- +
+
+
- +

".gettext("You must apply the changes in order for them to take effect."));?>

- - - - - + +
- + - - + +
0): ?> @@ -423,17 +423,17 @@ include("fbegin.inc");
- +
+ ?>
- +
@@ -444,16 +444,16 @@ include("fbegin.inc"); - - + + - \ No newline at end of file + diff --git a/src/www/firewall_shaper_wizards.php b/src/www/firewall_shaper_wizards.php index fc2a254e6..b3297e222 100644 --- a/src/www/firewall_shaper_wizards.php +++ b/src/www/firewall_shaper_wizards.php @@ -88,19 +88,19 @@ include("head.inc");
-
-
- +
+
+ - +

".gettext("You must apply the changes in order for them to take effect."));?>

- - - - -
- + + +
+ - - + +
- + - - + + $wizard): ?> @@ -151,5 +151,5 @@ include("head.inc"); - - \ No newline at end of file + + diff --git a/src/www/firewall_virtual_ip.php b/src/www/firewall_virtual_ip.php index 2be5e11c7..b4e74debb 100644 --- a/src/www/firewall_virtual_ip.php +++ b/src/www/firewall_virtual_ip.php @@ -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(
-
+
- - ".gettext("You must apply the changes in order for them to take effect.")); ?> - +
- - - - - -
- - + + +
+ + - - + +
- + @@ -247,8 +247,8 @@ $main_buttons = array( - - + + @@ -289,7 +289,7 @@ $main_buttons = array( - +
"> - + ')">
@@ -303,5 +303,5 @@ $main_buttons = array(
- - \ No newline at end of file + + diff --git a/src/www/firewall_virtual_ip_edit.php b/src/www/firewall_virtual_ip_edit.php index d8a76975f..a9dbd8d90 100644 --- a/src/www/firewall_virtual_ip_edit.php +++ b/src/www/firewall_virtual_ip_edit.php @@ -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"); - +
-
+
- +
- +
- -
- -
-

-
- -
- - - + +
+ +
+

+
+ +
+ + +
- + + + Disable expansion of this entry into IPs on NAT lists (e.g. 192.168.1.0/24 expands to 256 entries.) + " /> - */ + */ ?>
/> @@ -384,7 +384,7 @@ function typesel_change() { -
   /> - Disable expansion of this entry into IPs on NAT lists (e.g. 192.168.1.0/24 expands to 256 entries.) -
Base: + Skew: +