From c0948c6c129f8ce6386545ef80147007bf96e8c9 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Thu, 12 Aug 2010 14:17:28 -0300 Subject: Just fix some space and tab problems --- usr/local/www/diag_backup.php | 2 +- usr/local/www/diag_nanobsd.php | 2 +- usr/local/www/diag_system_pftop.php | 2 +- usr/local/www/diag_traceroute.php | 2 +- usr/local/www/firewall_schedule.php | 44 ++--- usr/local/www/firewall_virtual_ip_edit.php | 2 +- usr/local/www/interfaces.php | 186 ++++++++++----------- .../www/load_balancer_virtual_server_edit.php | 16 +- usr/local/www/services_captiveportal.php | 2 +- 9 files changed, 129 insertions(+), 129 deletions(-) diff --git a/usr/local/www/diag_backup.php b/usr/local/www/diag_backup.php index e23a279..85d4050 100755 --- a/usr/local/www/diag_backup.php +++ b/usr/local/www/diag_backup.php @@ -642,7 +642,7 @@ function backuparea_change(obj) {

">

-



+



diff --git a/usr/local/www/diag_nanobsd.php b/usr/local/www/diag_nanobsd.php index c0dcfed..af4efd6 100755 --- a/usr/local/www/diag_nanobsd.php +++ b/usr/local/www/diag_nanobsd.php @@ -161,7 +161,7 @@ if ($savemsg) -
+ diff --git a/usr/local/www/diag_traceroute.php b/usr/local/www/diag_traceroute.php index 009b2ac..6c9df57 100755 --- a/usr/local/www/diag_traceroute.php +++ b/usr/local/www/diag_traceroute.php @@ -133,7 +133,7 @@ if (!isset($do_traceroute)) {   - + diff --git a/usr/local/www/firewall_schedule.php b/usr/local/www/firewall_schedule.php index 28dc5c9..c6c6961 100644 --- a/usr/local/www/firewall_schedule.php +++ b/usr/local/www/firewall_schedule.php @@ -114,27 +114,27 @@ include("head.inc"); if ($schedstatus) { ?>  " width="17" height="17" border="0"> - + - "; @@ -197,16 +197,16 @@ include("head.inc"); $dayFriendly .= $dayArray[$firstDay-1] . " - " . $dayArray[$currentDay-1]; else $dayFriendly .= $dayArray[$firstDay-1]; - $firstDayFound = false; - $firstprint = true; + $firstDayFound = false; + $firstprint = true; } $counter++; } } - } + } $timeFriendly = $starttime . "-" . $stoptime; - $description = $timerange['rangedescr']; - + $description = $timerange['rangedescr']; + ?>
diff --git a/usr/local/www/firewall_virtual_ip_edit.php b/usr/local/www/firewall_virtual_ip_edit.php index 2958657..c2be43b 100755 --- a/usr/local/www/firewall_virtual_ip_edit.php +++ b/usr/local/www/firewall_virtual_ip_edit.php @@ -465,7 +465,7 @@ function typesel_change() {

-
+
  

    . diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index 1a7503a..8ebf2d6 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -93,11 +93,11 @@ if ($wancfg['if'] == $a_ppps[$pppid]['if']) { if ($a_ppps[$pppid]['type'] == "ppp"){ $pconfig['username'] = $a_ppps[$pppid]['username']; $pconfig['password'] = base64_decode($a_ppps[$pppid]['password']); - + $pconfig['phone'] = $a_ppps[$pppid]['phone']; $pconfig['apn'] = $a_ppps[$pppid]['apn']; } - + if ($a_ppps[$pppid]['type'] == "pppoe"){ $pconfig['pppoe_username'] = $a_ppps[$pppid]['username']; $pconfig['pppoe_password'] = base64_decode($a_ppps[$pppid]['password']); @@ -108,7 +108,7 @@ if ($wancfg['if'] == $a_ppps[$pppid]['if']) { /* ================================================ */ /* = force a connection reset at a specific time? = */ /* ================================================ */ - + if (isset($a_ppps[$pppid]['pppoe-reset-type'])) { $pconfig['pppoe-reset-type'] = $a_ppps[$pppid]['pppoe-reset-type']; $itemhash = getMPDCRONSettings($a_ppps[$pppid]['if']); @@ -127,7 +127,7 @@ if ($wancfg['if'] == $a_ppps[$pppid]['if']) { /* just initialize $pconfig['pppoe_resetdate'] if the * coresponding item contains appropriate numeric values. */ - if ($resetTime_a[2] <> "*" && $resetTime_a[3] <> "*") + if ($resetTime_a[2] <> "*" && $resetTime_a[3] <> "*") $pconfig['pppoe_resetdate'] = "{$resetTime_a[3]}/{$resetTime_a[2]}/" . date("Y"); } else if ($a_ppps[$pppid]['pppoe-reset-type'] == "preset") { $pconfig['pppoe_pr_preset'] = true; @@ -147,7 +147,7 @@ if ($wancfg['if'] == $a_ppps[$pppid]['if']) { } } }// End force pppoe reset at specific time - }// End if type == pppoe + }// End if type == pppoe if ($a_ppps[$pppid]['type'] == "pptp"){ $pconfig['pptp_username'] = $a_ppps[$pppid]['username']; $pconfig['pptp_password'] = base64_decode($a_ppps[$pppid]['password']); @@ -298,26 +298,26 @@ if ($_POST['apply']) { unset($input_errors); if (!is_subsystem_dirty('interfaces')) $intput_errors[] = gettext("You have already applied your settings!"); - else { + else { unlink_if_exists("{$g['tmp_path']}/config.cache"); clear_subsystem_dirty('interfaces'); if ($pconfig['enable']) interface_configure($if, true); else interface_bring_down($if); - - /* restart snmp so that it binds to correct address */ - services_snmpd_configure(); - if ($if == "lan") + + /* restart snmp so that it binds to correct address */ + services_snmpd_configure(); + if ($if == "lan") $savemsg = gettext("The changes have been applied. You may need to correct your web browser's IP address."); /* sync filter configuration */ setup_gateways_monitor(); clear_subsystem_dirty('staticroutes'); - + filter_configure(); - + enable_rrd_graphing(); } header("Location: interfaces.php?if={$if}"); @@ -348,7 +348,7 @@ if ($_POST) { * message. */ if (empty($_POST['pppoe-reset-type'])) { - unset($_POST['pppoe_pr_type']); + unset($_POST['pppoe_pr_type']); unset($_POST['pppoe_resethour']); unset($_POST['pppoe_resetminute']); unset($_POST['pppoe_resetdate']); @@ -400,13 +400,13 @@ if ($_POST) { /* normalize MAC addresses - lowercase and convert Windows-ized hyphenated MACs to colon delimited */ $_POST['spoofmac'] = strtolower(str_replace("-", ":", $_POST['spoofmac'])); - if (($_POST['ipaddr'] && !is_ipaddr($_POST['ipaddr']))) + if (($_POST['ipaddr'] && !is_ipaddr($_POST['ipaddr']))) $input_errors[] = gettext("A valid IP address must be specified."); - if (($_POST['subnet'] && !is_numeric($_POST['subnet']))) + if (($_POST['subnet'] && !is_numeric($_POST['subnet']))) $input_errors[] = gettext("A valid subnet bit count must be specified."); - if (($_POST['alias-address'] && !is_ipaddr($_POST['alias-address']))) + if (($_POST['alias-address'] && !is_ipaddr($_POST['alias-address']))) $input_errors[] = gettext("A valid alias IP address must be specified."); - if (($_POST['alias-subnet'] && !is_numeric($_POST['alias-subnet']))) + if (($_POST['alias-subnet'] && !is_numeric($_POST['alias-subnet']))) $input_errors[] = gettext("A valid alias subnet bit count must be specified."); if ($_POST['gateway'] != "none") { $match = false; @@ -419,31 +419,31 @@ if ($_POST) { $input_errors[] = gettext("A valid gateway must be specified."); } } - if (($_POST['provider'] && !is_domain($_POST['provider']))) + if (($_POST['provider'] && !is_domain($_POST['provider']))) $input_errors[] = gettext("The service name contains invalid characters."); - if (($_POST['pppoe_idletimeout'] != "") && !is_numericint($_POST['pppoe_idletimeout'])) + if (($_POST['pppoe_idletimeout'] != "") && !is_numericint($_POST['pppoe_idletimeout'])) $input_errors[] = gettext("The idle timeout value must be an integer."); - if ($_POST['pppoe_resethour'] <> "" && !is_numericint($_POST['pppoe_resethour']) && - $_POST['pppoe_resethour'] >= 0 && $_POST['pppoe_resethour'] <=23) + if ($_POST['pppoe_resethour'] <> "" && !is_numericint($_POST['pppoe_resethour']) && + $_POST['pppoe_resethour'] >= 0 && $_POST['pppoe_resethour'] <=23) $input_errors[] = gettext("A valid PPPoE reset hour must be specified (0-23)."); - if ($_POST['pppoe_resetminute'] <> "" && !is_numericint($_POST['pppoe_resetminute']) && - $_POST['pppoe_resetminute'] >= 0 && $_POST['pppoe_resetminute'] <=59) + if ($_POST['pppoe_resetminute'] <> "" && !is_numericint($_POST['pppoe_resetminute']) && + $_POST['pppoe_resetminute'] >= 0 && $_POST['pppoe_resetminute'] <=59) $input_errors[] = gettext("A valid PPPoE reset minute must be specified (0-59)."); - if ($_POST['pppoe_resetdate'] <> "" && !is_numeric(str_replace("/", "", $_POST['pppoe_resetdate']))) + if ($_POST['pppoe_resetdate'] <> "" && !is_numeric(str_replace("/", "", $_POST['pppoe_resetdate']))) $input_errors[] = gettext("A valid PPPoE reset date must be specified (mm/dd/yyyy)."); - if (($_POST['pptp_local'] && !is_ipaddr($_POST['pptp_local']))) + if (($_POST['pptp_local'] && !is_ipaddr($_POST['pptp_local']))) $input_errors[] = gettext("A valid PPTP local IP address must be specified."); - if (($_POST['pptp_subnet'] && !is_numeric($_POST['pptp_subnet']))) + if (($_POST['pptp_subnet'] && !is_numeric($_POST['pptp_subnet']))) $input_errors[] = gettext("A valid PPTP subnet bit count must be specified."); - if (($_POST['pptp_remote'] && !is_ipaddr($_POST['pptp_remote']))) + if (($_POST['pptp_remote'] && !is_ipaddr($_POST['pptp_remote']))) $input_errors[] = gettext("A valid PPTP remote IP address must be specified."); - if (($_POST['pptp_idletimeout'] != "") && !is_numericint($_POST['pptp_idletimeout'])) + if (($_POST['pptp_idletimeout'] != "") && !is_numericint($_POST['pptp_idletimeout'])) $input_errors[] = gettext("The idle timeout value must be an integer."); - if (($_POST['spoofmac'] && !is_macaddr($_POST['spoofmac']))) + if (($_POST['spoofmac'] && !is_macaddr($_POST['spoofmac']))) $input_errors[] = gettext("A valid MAC address must be specified."); - if ($_POST['mtu'] && ($_POST['mtu'] < 576)) + if ($_POST['mtu'] && ($_POST['mtu'] < 576)) $input_errors[] = gettext("The MTU must be greater than 576 bytes."); - if ($_POST['mss'] && ($_POST['mss'] < 576)) + if ($_POST['mss'] && ($_POST['mss'] < 576)) $input_errors[] = gettext("The MSS must be greater than 576 bytes."); /* Wireless interface? */ if (isset($wancfg['wireless'])) { @@ -519,7 +519,7 @@ if ($_POST) { unset($a_ppps[$pppid]['gateway']); unset($a_ppps[$pppid]['pppoe-reset-type']); unset($a_ppps[$pppid]['provider']); - + $wancfg['descr'] = remove_bad_chars($_POST['descr']); $wancfg['enable'] = $_POST['enable'] == "yes" ? true : false; @@ -544,7 +544,7 @@ if ($_POST) { unset($gateway_item); } } - + switch($_POST['type']) { case "static": $wancfg['ipaddr'] = $_POST['ipaddr']; @@ -615,7 +615,7 @@ if ($_POST) { if($gateway_item) { $a_gateways[] = $gateway_item; } - + break; case "pptp": $a_ppps[$pppid]['ptpid'] = $_POST['ptpid']; @@ -645,7 +645,7 @@ if ($_POST) { break; } handle_pppoe_reset($_POST); - + if($_POST['blockpriv'] == "yes") { $wancfg['blockpriv'] = true; } else { @@ -670,7 +670,7 @@ if ($_POST) { if (isset($wancfg['wireless'])) { handle_wireless_post(); } - + write_config(); mark_subsystem_dirty('interfaces'); /* regenerate cron settings/crontab file */ @@ -679,10 +679,10 @@ if ($_POST) { header("Location: interfaces.php?if={$if}"); exit; } - - - -} // end if($_POST) + + + +} // end if($_POST) function handle_wireless_post() { global $_POST, $config, $g, $wancfg, $if, $wl_countries_attr, $wlanbaseif; @@ -748,7 +748,7 @@ function handle_wireless_post() { unset($wancfg['wireless']['wpa']['mac_acl_enable']); if ($_POST['rsn_preauth'] == "yes") $wancfg['wireless']['wpa']['rsn_preauth'] = true; - else + else unset($wancfg['wireless']['wpa']['rsn_preauth']); if ($_POST['ieee8021x'] == "yes") $wancfg['wireless']['wpa']['ieee8021x']['enable'] = true; @@ -850,7 +850,7 @@ $statusurl = "status_interfaces.php"; $closehead = false; include("head.inc"); -$types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" => gettext("DHCP"), "ppp" => gettext("PPP"), "pppoe" => gettext("PPPoE"), "pptp" => gettext("PPTP") /* , "carpdev-dhcp" => "CarpDev"*/); +$types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" => gettext("DHCP"), "ppp" => gettext("PPP"), "pppoe" => gettext("PPPoE"), "pptp" => gettext("PPTP") /* , "carpdev-dhcp" => "CarpDev"*/); ?> @@ -899,11 +899,11 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" } function show_reset_settings(reset_type) { - if (reset_type == 'preset') { + if (reset_type == 'preset') { Effect.Appear('pppoepresetwrap', { duration: 0.0 }); - Effect.Fade('pppoecustomwrap', { duration: 0.0 }); - } - else if (reset_type == 'custom') { + Effect.Fade('pppoecustomwrap', { duration: 0.0 }); + } + else if (reset_type == 'custom') { Effect.Appear('pppoecustomwrap', { duration: 0.0 }); Effect.Fade('pppoepresetwrap', { duration: 0.0 }); } else { @@ -919,9 +919,9 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" function openwindow(url) { var oWin = window.open(url,"pfSensePop","width=620,height=400,top=150,left=150"); - if (oWin==null || typeof(oWin)=="undefined") + if (oWin==null || typeof(oWin)=="undefined") return false; - else + else return true; } function country_list() { @@ -943,7 +943,7 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" }); $('trcountry').setStyle({display : "table-row"}); } - + function providers_list() { $('provider').childElements().each(function(node) { node.remove(); }); $('providerplan').childElements().each(function(node) { node.remove(); }); @@ -963,7 +963,7 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" $('trprovider').setStyle({display : "table-row"}); $('trproviderplan').setStyle({display : "none"}); } - + function providerplan_list() { $('providerplan').childElements().each(function(node) { node.remove(); }); $('providerplan').insert( new Element('option') ); @@ -975,7 +975,7 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" responseTextArr.each( function(value) { if(value != "") { providerplan = value.split(":"); - + var option = new Element('option'); option.text = providerplan[0] + " - " + providerplan[1]; option.value = providerplan[1]; @@ -986,7 +986,7 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" }); $('trproviderplan').setStyle({display : "table-row"}); } - + function prefill_provider() { new Ajax.Request("getserviceproviders.php",{ parameters: {country : $F('country'), provider : $F('provider'), plan : $F('providerplan')}, @@ -1045,16 +1045,16 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" - + @@ -1081,7 +1081,7 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" - +
gettext("None"), "static" => gettext("Static"), "dhcp" - +
+ "TCP connections to the value entered above minus 40 (TCP/IP " . + "header size) will be in effect."); ?> - + @@ -1111,7 +1111,7 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" - + / > - + "> @@ -1188,7 +1188,7 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp"

- " onClick='hide_add_gatewaysave();'> + " onClick='hide_add_gatewaysave();'> " onClick='hide_add_gateway();'>
@@ -1224,7 +1224,7 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" - + +
- +
- +
 
@@ -1412,16 +1412,16 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" @@ -1429,12 +1429,12 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" - + - + @@ -1442,7 +1442,7 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" - + @@ -1467,7 +1467,7 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" - + / > @@ -1875,7 +1875,7 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" - - @@ -249,7 +249,7 @@ document.observe("dom:loaded", function() { @@ -272,7 +272,7 @@ document.observe("dom:loaded", function() { + -- cgit v1.1
+
  - + >
   + "a private address space, too."); ?>
  + >
gettext("None"), "static" => gettext("Static"), "dhcp"

- "> + "> " onclick="history.back()"> @@ -2033,7 +2033,7 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" } function hide_add_gateway() { document.getElementById("addgateway").style.display = 'none'; - document.getElementById("addgwbox").style.display = ''; + document.getElementById("addgwbox").style.display = ''; document.getElementById("gateway").style.display = ''; document.getElementById("save").style.display = ''; document.getElementById("cancel").style.display = ''; @@ -2058,7 +2058,7 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" parameters: pars, onFailure: report_failure, onComplete: save_callback - }); + }); } function addOption(selectbox,text,value) { @@ -2068,7 +2068,7 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" selectbox.options.add(optn); selectbox.selectedIndex = (selectbox.options.length-1); $('notebox').innerHTML="

."; - } + } function report_failure() { alert("Sorry, we could not create your gateway at this time."); hide_add_gateway(); diff --git a/usr/local/www/load_balancer_virtual_server_edit.php b/usr/local/www/load_balancer_virtual_server_edit.php index 683402b..0f1fe20 100755 --- a/usr/local/www/load_balancer_virtual_server_edit.php +++ b/usr/local/www/load_balancer_virtual_server_edit.php @@ -77,7 +77,7 @@ if ($_POST) { $reqdfieldsn = array(gettext("IP Address"),gettext("Name"),gettext("Port"),gettext("Relay Protocol")); break; } - } + } do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); @@ -192,21 +192,21 @@ document.observe("dom:loaded", function() {

size="16" maxlength="16"> -
+
size="16" maxlength="16"> -
+
- + - + -
+
> Redirect > Relay - +
- "> + "> " onclick="history.back()"> diff --git a/usr/local/www/services_captiveportal.php b/usr/local/www/services_captiveportal.php index 08adf7d..af9d74f 100755 --- a/usr/local/www/services_captiveportal.php +++ b/usr/local/www/services_captiveportal.php @@ -628,7 +628,7 @@ value="">
-