summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-06-18 15:41:24 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-06-18 15:41:24 -0300
commitf1a13a7fce25768488e5d92294fe928669201fcf (patch)
tree5ba352688a147c93c1095de585400eb2fc09317b /usr/local/www
parent811baa9bf50571bac372ddea0df5771fe1167d7b (diff)
downloadpfsense-f1a13a7fce25768488e5d92294fe928669201fcf.zip
pfsense-f1a13a7fce25768488e5d92294fe928669201fcf.tar.gz
Fix whitespaces and indent
Diffstat (limited to 'usr/local/www')
-rw-r--r--usr/local/www/widgets/widgets/log.widget.php91
1 files changed, 45 insertions, 46 deletions
diff --git a/usr/local/www/widgets/widgets/log.widget.php b/usr/local/www/widgets/widgets/log.widget.php
index e4114e0..9667500 100644
--- a/usr/local/www/widgets/widgets/log.widget.php
+++ b/usr/local/www/widgets/widgets/log.widget.php
@@ -1,34 +1,34 @@
<?php
/*
- $Id$
- Copyright 2007 Scott Dale
- Part of pfSense widgets (https://www.pfsense.org)
- originally based on m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2004-2005 T. Lechat <dev@lechat.org>, Manuel Kasper <mk@neon1.net>
- and Jonathan Watt <jwatt@jwatt.org>.
- 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.
+ $Id$
+ Copyright 2007 Scott Dale
+ Part of pfSense widgets (https://www.pfsense.org)
+ originally based on m0n0wall (http://m0n0.ch/wall)
+
+ Copyright (C) 2004-2005 T. Lechat <dev@lechat.org>, Manuel Kasper <mk@neon1.net>
+ and Jonathan Watt <jwatt@jwatt.org>.
+ 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.
*/
$nocsrf = true;
@@ -55,17 +55,17 @@ if($_POST['filterlogentries']) {
if (isset($config['widgets']['filterlogentriesinterfaces'])) $config['widgets']['filterlogentriesinterfaces'] = trim($config['widgets']['filterlogentriesinterfaces']);
write_config("Saved Filter Log Entries via Dashboard");
- $filename = $_SERVER['HTTP_REFERER'];
- if(headers_sent($file, $line)){
- echo '<script type="text/javascript">';
- echo '//<![CDATA[';
- echo 'window.location.href="'.$filename.'";';
- echo '//]]>';
- echo '</script>';
- echo '<noscript>';
- echo '<meta http-equiv="refresh" content="0;url='.$filename.'" />';
- echo '</noscript>';
- }
+ $filename = $_SERVER['HTTP_REFERER'];
+ if(headers_sent($file, $line)){
+ echo '<script type="text/javascript">';
+ echo '//<![CDATA[';
+ echo 'window.location.href="'.$filename.'";';
+ echo '//]]>';
+ echo '</script>';
+ echo '<noscript>';
+ echo '<meta http-equiv="refresh" content="0;url='.$filename.'" />';
+ echo '</noscript>';
+ }
Header("Location: /");
}
@@ -111,7 +111,7 @@ function format_log_line(row) {
'<td class="listMRr ellipsis" title="' + row[1] + '">' + row[1].slice(0,-3) + '<\/td>' +
'<td class="listMRr ellipsis" title="' + row[2] + '">' + row[2] + '<\/td>' +
'<td class="listMRr ellipsis" title="' + row[3] + '">' + row[3] + '<\/td>' +
- '<td class="listMRr ellipsis" title="' + row[4] + '">' + row[4] + '<\/td>';
+ '<td class="listMRr ellipsis" title="' + row[4] + '">' + row[4] + '<\/td>';
var nentriesacts = "<?php echo $nentriesacts; ?>";
var nentriesinterfaces = "<?php echo $nentriesinterfaces; ?>";
@@ -131,14 +131,14 @@ function format_log_line(row) {
<div id="log-settings" class="widgetconfigdiv" style="display:none;">
<form action="/widgets/widgets/log.widget.php" method="post" name="iforma">
- Number of lines to display:
+ Number of lines to display:
<select name="filterlogentries" class="formfld unknown" id="filterlogentries">
<?php for ($i = 1; $i <= 20; $i++) { ?>
<option value="<?php echo $i;?>" <?php if ($nentries == $i) echo "selected=\"selected\"";?>><?php echo $i;?></option>
<?php } ?>
</select>
-<?php
+<?php
$Include_Act = explode(",", str_replace(" ", ",", $nentriesacts));
if ($nentriesinterfaces == "All") $nentriesinterfaces = "";
?>
@@ -146,10 +146,9 @@ function format_log_line(row) {
<input id="actblock" name="actblock" type="checkbox" value="Block" <?php if (in_arrayi('Block', $Include_Act)) echo "checked=\"checked\""; ?> /> Block
<input id="actreject" name="actreject" type="checkbox" value="Reject" <?php if (in_arrayi('Reject', $Include_Act)) echo "checked=\"checked\""; ?> /> Reject
<br/>
- Interfaces:
+ Interfaces:
<input id="filterlogentriesinterfaces" name="filterlogentriesinterfaces" class="formfld unknown" type="text" size="20" value="<?= $nentriesinterfaces ?>" />
- &nbsp; &nbsp; &nbsp;
-
+ &nbsp; &nbsp; &nbsp;
<input id="submita" name="submita" type="submit" class="formbtn" value="Save" />
</form>
</div>
OpenPOWER on IntegriCloud