Revision 5f601060
Added by Phil Davis over 10 years ago
usr/local/www/diag_logs_gateways.php | ||
---|---|---|
33 | 33 |
POSSIBILITY OF SUCH DAMAGE. |
34 | 34 |
*/ |
35 | 35 |
|
36 |
/*
|
|
36 |
/* |
|
37 | 37 |
pfSense_MODULE: system |
38 | 38 |
*/ |
39 | 39 |
|
... | ... | |
49 | 49 |
$system_logfile = "{$g['varlog_path']}/gateways.log"; |
50 | 50 |
|
51 | 51 |
$nentries = $config['syslog']['nentries']; |
52 |
if (!$nentries) |
|
52 |
if (!$nentries) {
|
|
53 | 53 |
$nentries = 50; |
54 |
} |
|
54 | 55 |
|
55 |
if ($_POST['clear']) |
|
56 |
if ($_POST['clear']) {
|
|
56 | 57 |
clear_log_file($system_logfile); |
58 |
} |
|
57 | 59 |
|
58 |
if ($_GET['filtertext']) |
|
60 |
if ($_GET['filtertext']) {
|
|
59 | 61 |
$filtertext = htmlspecialchars($_GET['filtertext']); |
62 |
} |
|
60 | 63 |
|
61 |
if ($_POST['filtertext']) |
|
64 |
if ($_POST['filtertext']) {
|
|
62 | 65 |
$filtertext = htmlspecialchars($_POST['filtertext']); |
66 |
} |
|
63 | 67 |
|
64 |
if ($filtertext) |
|
68 |
if ($filtertext) {
|
|
65 | 69 |
$filtertextmeta="?filtertext=$filtertext"; |
70 |
} |
|
66 | 71 |
|
67 | 72 |
$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Gateways")); |
68 | 73 |
$shortcut_section = "gateways"; |
... | ... | |
92 | 97 |
?> |
93 | 98 |
</td> |
94 | 99 |
</tr> |
95 |
<tr><td class="tabnavtbl"> |
|
100 |
<tr> |
|
101 |
<td class="tabnavtbl"> |
|
96 | 102 |
<?php |
97 | 103 |
$tab_array = array(); |
98 | 104 |
$tab_array[] = array(gettext("General"), false, "/diag_logs.php"); |
... | ... | |
112 | 118 |
<td colspan="2" class="listtopic"><?php printf(gettext("Last %s system log entries"),$nentries); ?></td> |
113 | 119 |
</tr> |
114 | 120 |
<?php |
115 |
if($filtertext)
|
|
121 |
if ($filtertext) {
|
|
116 | 122 |
dump_clog($system_logfile, $nentries, true, array("$filtertext")); |
117 |
else
|
|
123 |
} else {
|
|
118 | 124 |
dump_clog($system_logfile, $nentries, true, array()); |
125 |
} |
|
119 | 126 |
?> |
120 | 127 |
<tr> |
121 | 128 |
<td align="left" valign="top"> |
122 | 129 |
<form id="filterform" name="filterform" action="diag_logs_gateways.php" method="post" style="margin-top: 14px;"> |
123 |
<input id="submit" name="clear" type="submit" class="formbtn" value="<?=gettext("Clear log");?>" />
|
|
130 |
<input id="submit" name="clear" type="submit" class="formbtn" value="<?=gettext("Clear log");?>" />
|
|
124 | 131 |
</form> |
125 | 132 |
</td> |
126 | 133 |
<td align="right" valign="top" > |
127 | 134 |
<form id="clearform" name="clearform" action="diag_logs_gateways.php" method="post" style="margin-top: 14px;"> |
128 |
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>" />
|
|
129 |
<input id="filtersubmit" name="filtersubmit" type="submit" class="formbtn" value="<?=gettext("Filter");?>" />
|
|
135 |
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>" />
|
|
136 |
<input id="filtersubmit" name="filtersubmit" type="submit" class="formbtn" value="<?=gettext("Filter");?>" />
|
|
130 | 137 |
</form> |
131 | 138 |
</td> |
132 | 139 |
</tr> |
133 | 140 |
</table> |
134 |
</div>
|
|
141 |
</div>
|
|
135 | 142 |
</td> |
136 | 143 |
</tr> |
137 | 144 |
</table> |
Also available in: Unified diff
Code style usr-local-www diag