Révision f334f8bf
Ajouté par Renato Botelho il y a presque 10 ans
usr/local/www/widgets/widgets/log.widget.php | ||
---|---|---|
1 | 1 |
<?php |
2 | 2 |
/* |
3 |
$Id$
|
|
4 |
Copyright 2007 Scott Dale
|
|
5 |
Part of pfSense widgets (https://www.pfsense.org)
|
|
6 |
originally based on m0n0wall (http://m0n0.ch/wall)
|
|
7 |
|
|
8 |
Copyright (C) 2004-2005 T. Lechat <dev@lechat.org>, Manuel Kasper <mk@neon1.net>
|
|
9 |
and Jonathan Watt <jwatt@jwatt.org>.
|
|
10 |
All rights reserved.
|
|
11 |
|
|
12 |
Redistribution and use in source and binary forms, with or without
|
|
13 |
modification, are permitted provided that the following conditions are met:
|
|
14 |
|
|
15 |
1. Redistributions of source code must retain the above copyright notice,
|
|
16 |
this list of conditions and the following disclaimer.
|
|
17 |
|
|
18 |
2. Redistributions in binary form must reproduce the above copyright
|
|
19 |
notice, this list of conditions and the following disclaimer in the
|
|
20 |
documentation and/or other materials provided with the distribution.
|
|
21 |
|
|
22 |
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
|
23 |
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
24 |
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
25 |
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
|
26 |
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
27 |
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
28 |
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
29 |
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
30 |
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
31 |
POSSIBILITY OF SUCH DAMAGE.
|
|
3 |
$Id$
|
|
4 |
Copyright 2007 Scott Dale
|
|
5 |
Part of pfSense widgets (https://www.pfsense.org)
|
|
6 |
originally based on m0n0wall (http://m0n0.ch/wall)
|
|
7 |
|
|
8 |
Copyright (C) 2004-2005 T. Lechat <dev@lechat.org>, Manuel Kasper <mk@neon1.net>
|
|
9 |
and Jonathan Watt <jwatt@jwatt.org>.
|
|
10 |
All rights reserved.
|
|
11 |
|
|
12 |
Redistribution and use in source and binary forms, with or without
|
|
13 |
modification, are permitted provided that the following conditions are met:
|
|
14 |
|
|
15 |
1. Redistributions of source code must retain the above copyright notice,
|
|
16 |
this list of conditions and the following disclaimer.
|
|
17 |
|
|
18 |
2. Redistributions in binary form must reproduce the above copyright
|
|
19 |
notice, this list of conditions and the following disclaimer in the
|
|
20 |
documentation and/or other materials provided with the distribution.
|
|
21 |
|
|
22 |
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
|
23 |
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
24 |
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
25 |
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
|
26 |
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
27 |
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
28 |
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
29 |
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
30 |
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
31 |
POSSIBILITY OF SUCH DAMAGE.
|
|
32 | 32 |
*/ |
33 | 33 |
|
34 | 34 |
$nocsrf = true; |
... | ... | |
55 | 55 |
if (isset($config['widgets']['filterlogentriesinterfaces'])) $config['widgets']['filterlogentriesinterfaces'] = trim($config['widgets']['filterlogentriesinterfaces']); |
56 | 56 |
|
57 | 57 |
write_config("Saved Filter Log Entries via Dashboard"); |
58 |
$filename = $_SERVER['HTTP_REFERER'];
|
|
59 |
if(headers_sent($file, $line)){
|
|
60 |
echo "<script type=\"text/javascript\">\n";
|
|
61 |
echo "//<![CDATA[\n";
|
|
62 |
echo "window.location.href=\"" . $filename . "\";\n";
|
|
63 |
echo "//]]>\n";
|
|
64 |
echo "</script>\n";
|
|
65 |
echo "<noscript>\n";
|
|
66 |
echo "<meta http-equiv=\"refresh\" content=\"0;url=" . $filename . "\" />\n";
|
|
67 |
echo "</noscript>\n";
|
|
68 |
}
|
|
58 |
$filename = $_SERVER['HTTP_REFERER'];
|
|
59 |
if(headers_sent($file, $line)){
|
|
60 |
echo "<script type=\"text/javascript\">\n";
|
|
61 |
echo "//<![CDATA[\n";
|
|
62 |
echo "window.location.href=\"" . $filename . "\";\n";
|
|
63 |
echo "//]]>\n";
|
|
64 |
echo "</script>\n";
|
|
65 |
echo "<noscript>\n";
|
|
66 |
echo "<meta http-equiv=\"refresh\" content=\"0;url=" . $filename . "\" />\n";
|
|
67 |
echo "</noscript>\n";
|
|
68 |
}
|
|
69 | 69 |
header("Location: /"); |
70 | 70 |
} |
71 | 71 |
|
... | ... | |
111 | 111 |
'<td class="listMRr ellipsis" title="' + row[1] + '">' + row[1].slice(0,-3) + '<\/td>' + |
112 | 112 |
'<td class="listMRr ellipsis" title="' + row[2] + '">' + row[2] + '<\/td>' + |
113 | 113 |
'<td class="listMRr ellipsis" title="' + row[3] + '">' + row[3] + '<\/td>' + |
114 |
'<td class="listMRr ellipsis" title="' + row[4] + '">' + row[4] + '<\/td>';
|
|
114 |
'<td class="listMRr ellipsis" title="' + row[4] + '">' + row[4] + '<\/td>'; |
|
115 | 115 |
|
116 | 116 |
var nentriesacts = "<?php echo $nentriesacts; ?>"; |
117 | 117 |
var nentriesinterfaces = "<?php echo $nentriesinterfaces; ?>"; |
... | ... | |
149 | 149 |
Interfaces: |
150 | 150 |
<select id="filterlogentriesinterfaces" name="filterlogentriesinterfaces" class="formselect"> |
151 | 151 |
<option value="All">ALL</option> |
152 |
<?php |
|
153 |
$interfaces = get_configured_interface_with_descr(); |
|
154 |
foreach ($interfaces as $iface => $ifacename): ?> |
|
155 |
<option value="<?=$iface;?>" <?php if ($nentriesinterfaces == $iface) echo "selected=\"selected\"";?>> |
|
156 |
<?=htmlspecialchars($ifacename);?> |
|
157 |
</option> |
|
158 |
<?php endforeach; ?> |
|
159 |
</select> |
|
152 |
<?php |
|
153 |
$interfaces = get_configured_interface_with_descr(); |
|
154 |
foreach ($interfaces as $iface => $ifacename): |
|
155 |
?> |
|
156 |
<option value="<?=$iface;?>" <?php if ($nentriesinterfaces == $iface) echo "selected=\"selected\"";?>> |
|
157 |
<?=htmlspecialchars($ifacename);?> |
|
158 |
</option> |
|
159 |
<?php |
|
160 |
endforeach; |
|
161 |
?> |
|
162 |
</select> |
|
160 | 163 |
|
161 | 164 |
<input id="submita" name="submita" type="submit" class="formbtn" value="Save" /> |
162 | 165 |
</form> |
Formats disponibles : Unified diff
Fix whitespaces and indent