From 757733b5e9fc0378023b4946d4c25d369abf0839 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Tue, 21 May 2013 10:11:08 -0300 Subject: Fix whitespace and indent --- usr/local/www/index.php | 266 ++++++++++++++++++++++++------------------------ 1 file changed, 133 insertions(+), 133 deletions(-) (limited to 'usr') diff --git a/usr/local/www/index.php b/usr/local/www/index.php index 2863ed2..a5cc724 100755 --- a/usr/local/www/index.php +++ b/usr/local/www/index.php @@ -1,34 +1,34 @@ . - 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 - AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - oR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. + index.php + Copyright (C) 2004-2012 Scott Ullrich + All rights reserved. + + Originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2003-2004 Manuel Kasper . + 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 + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + oR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. */ /* pfSense_BUILDER_BINARIES: /sbin/ifconfig @@ -69,7 +69,7 @@ if($g['disablecrashreporter'] != true) { $x = 0; if(file_exists("/tmp/PHP_errors.log")) { $total = `/usr/bin/grep -vi warning /tmp/PHP_errors.log | /usr/bin/wc -l | /usr/bin/awk '{ print $1 }'`; - if($total > 0) + if($total > 0) $x++; } $crash = glob("/var/crash/*"); @@ -79,7 +79,7 @@ if($g['disablecrashreporter'] != true) { if (!in_array(basename($c), $skip_files)) $x++; } - if($x > 0) + if($x > 0) $savemsg = "{$g['product_name']} has detected a crash report or programming bug. Click here for more information."; } } @@ -130,7 +130,7 @@ if (!is_array($config['widgets'])) { ## Load Functions Files require_once('includes/functions.inc.php'); - + ## Check to see if we have a swap space, ## if true, display, if false, hide it ... if(file_exists("/usr/sbin/swapinfo")) { @@ -166,14 +166,14 @@ if (!is_array($config['widgets'])) { - + EOF; echo "\n"; - if(file_exists("/usr/local/www/themes/{$g['theme']}/wizard.css")) + if(file_exists("/usr/local/www/themes/{$g['theme']}/wizard.css")) echo "\n"; - else + else echo ""; echo "
\n"; @@ -219,39 +219,39 @@ EOF; ##build widget saved list information if ($config['widgets'] && $config['widgets']['sequence'] != "") { $pconfig['sequence'] = $config['widgets']['sequence']; - + $widgetlist = $pconfig['sequence']; $colpos = array(); $savedwidgetfiles = array(); $widgetname = ""; $widgetlist = explode(",",$widgetlist); - + ##read the widget position and display information foreach ($widgetlist as $widget){ - $dashpos = strpos($widget, "-"); + $dashpos = strpos($widget, "-"); $widgetname = substr($widget, 0, $dashpos); - $colposition = strpos($widget, ":"); + $colposition = strpos($widget, ":"); $displayposition = strrpos($widget, ":"); $colpos[] = substr($widget,$colposition+1, $displayposition - $colposition-1); $displayarray[] = substr($widget,$displayposition+1); $savedwidgetfiles[] = $widgetname . ".widget.php"; } - + ##add widgets that may not be in the saved configuration, in case they are to be displayed later - foreach ($widgetfiles as $defaultwidgets){ - if (!in_array($defaultwidgets, $savedwidgetfiles)){ - $savedwidgetfiles[] = $defaultwidgets; - } - } - + foreach ($widgetfiles as $defaultwidgets){ + if (!in_array($defaultwidgets, $savedwidgetfiles)){ + $savedwidgetfiles[] = $defaultwidgets; + } + } + ##find custom configurations of a particular widget and load its info to $pconfig foreach ($widgetnames as $widget){ - if ($config['widgets'][$widget . '-config']){ - $pconfig[$widget . '-config'] = $config['widgets'][$widget . '-config']; - } - } - - $widgetlist = $savedwidgetfiles; + if ($config['widgets'][$widget . '-config']){ + $pconfig[$widget . '-config'] = $config['widgets'][$widget . '-config']; + } + } + + $widgetlist = $savedwidgetfiles; } else{ // no saved widget sequence found, build default list. $widgetlist = $widgetfiles; @@ -267,7 +267,7 @@ while (false !== ($filename = readdir($dirhandle))) { } foreach($phpincludefiles as $includename) { if(!stristr($includename, ".inc")) - continue; + continue; include($directory . $includename); } @@ -279,26 +279,26 @@ $jscriptstr = <<\"big
"; -if ($savemsg) - print_info_box($savemsg); +if ($savemsg) + print_info_box($savemsg); pfSense_handle_custom_code("/usr/local/pkg/dashboard/pre_dashboard"); @@ -491,26 +491,26 @@ pfSense_handle_custom_code("/usr/local/pkg/dashboard/pre_dashboard");


- @@ -535,7 +535,7 @@ pfSense_handle_custom_code("/usr/local/pkg/dashboard/pre_dashboard");
plus

- +

@@ -558,44 +558,44 @@ pfSense_handle_custom_code("/usr/local/pkg/dashboard/pre_dashboard"); $directory = "/usr/local/www/widgets/widgets/"; $printed = false; $firstprint = false; - ?> -
- +
+
-
+
-
+
- + if ($$widgettitlelink != "") {?> - + + else{ + if ($$widgettitlelink != "") {?> - +
-
+
open
minimize
@@ -701,37 +701,37 @@ pfSense_handle_custom_code("/usr/local/pkg/dashboard/pre_dashboard"); <?=gettext(..." />
-
- " style="display:;"> + + } + ?>
- + + }//end foreach + ?>
- + \n"; + echo "\n"; } ?> -- cgit v1.1