Revision 5f601060
Added by Phil Davis about 10 years ago
usr/local/www/diag_logs_resolver.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']}/resolver.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("Resolver")); |
68 |
if (isset($config['dnsmasq']['enable'])) |
|
73 |
if (isset($config['dnsmasq']['enable'])) {
|
|
69 | 74 |
$shortcut_section = "forwarder"; |
70 |
else
|
|
75 |
} else {
|
|
71 | 76 |
$shortcut_section = "resolver"; |
77 |
} |
|
72 | 78 |
|
73 | 79 |
include("head.inc"); |
74 | 80 |
|
... | ... | |
96 | 102 |
?> |
97 | 103 |
</td> |
98 | 104 |
</tr> |
99 |
<tr><td class="tabnavtbl"> |
|
105 |
<tr> |
|
106 |
<td class="tabnavtbl"> |
|
100 | 107 |
<?php |
101 | 108 |
$tab_array = array(); |
102 | 109 |
$tab_array[] = array(gettext("General"), false, "/diag_logs.php"); |
... | ... | |
116 | 123 |
<td colspan="2" class="listtopic"><?php printf(gettext("Last %s system log entries"),$nentries); ?></td> |
117 | 124 |
</tr> |
118 | 125 |
<?php |
119 |
if($filtertext)
|
|
126 |
if ($filtertext) {
|
|
120 | 127 |
dump_clog($system_logfile, $nentries, true, array("$filtertext"), array("ppp")); |
121 |
else
|
|
128 |
} else {
|
|
122 | 129 |
dump_clog($system_logfile, $nentries, true, array(), array("ppp")); |
130 |
} |
|
123 | 131 |
?> |
124 | 132 |
<tr> |
125 | 133 |
<td align="left" valign="top"> |
126 | 134 |
<form id="filterform" name="filterform" action="diag_logs_resolver.php" method="post" style="margin-top: 14px;"> |
127 |
<input id="submit" name="clear" type="submit" class="formbtn" value="<?=gettext("Clear log");?>" />
|
|
135 |
<input id="submit" name="clear" type="submit" class="formbtn" value="<?=gettext("Clear log");?>" />
|
|
128 | 136 |
</form> |
129 | 137 |
</td> |
130 | 138 |
<td align="right" valign="top" > |
131 | 139 |
<form id="clearform" name="clearform" action="diag_logs_resolver.php" method="post" style="margin-top: 14px;"> |
132 |
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>" />
|
|
133 |
<input id="filtersubmit" name="filtersubmit" type="submit" class="formbtn" value="<?=gettext("Filter");?>" />
|
|
140 |
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>" />
|
|
141 |
<input id="filtersubmit" name="filtersubmit" type="submit" class="formbtn" value="<?=gettext("Filter");?>" />
|
|
134 | 142 |
</form> |
135 | 143 |
</td> |
136 | 144 |
</tr> |
137 | 145 |
</table> |
138 |
</div>
|
|
146 |
</div>
|
|
139 | 147 |
</td> |
140 | 148 |
</tr> |
141 | 149 |
</table> |
Also available in: Unified diff
Code style usr-local-www diag