1 |
0ffb5926
|
smos
|
<?php
|
2 |
|
|
/* $Id$ */
|
3 |
|
|
/*
|
4 |
|
|
diag_logs_resolver.php
|
5 |
|
|
Copyright (C) 2004-2009 Scott Ullrich
|
6 |
|
|
Copyright (C) 2012 Seth Mos
|
7 |
|
|
All rights reserved.
|
8 |
|
|
|
9 |
|
|
originally part of m0n0wall (http://m0n0.ch/wall)
|
10 |
|
|
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
|
11 |
|
|
All rights reserved.
|
12 |
|
|
|
13 |
|
|
Redistribution and use in source and binary forms, with or without
|
14 |
|
|
modification, are permitted provided that the following conditions are met:
|
15 |
|
|
|
16 |
|
|
1. Redistributions of source code must retain the above copyright notice,
|
17 |
|
|
this list of conditions and the following disclaimer.
|
18 |
|
|
|
19 |
|
|
2. Redistributions in binary form must reproduce the above copyright
|
20 |
|
|
notice, this list of conditions and the following disclaimer in the
|
21 |
|
|
documentation and/or other materials provided with the distribution.
|
22 |
|
|
|
23 |
|
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
24 |
|
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
25 |
|
|
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
26 |
|
|
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
27 |
|
|
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
28 |
|
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
29 |
|
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
30 |
|
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
31 |
|
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
32 |
|
|
POSSIBILITY OF SUCH DAMAGE.
|
33 |
|
|
*/
|
34 |
|
|
|
35 |
|
|
/*
|
36 |
|
|
pfSense_MODULE: system
|
37 |
|
|
*/
|
38 |
|
|
|
39 |
|
|
##|+PRIV
|
40 |
|
|
##|*IDENT=page-diagnostics-logs-resolver
|
41 |
|
|
##|*NAME=Diagnostics: Logs: System: Resolver page
|
42 |
|
|
##|*DESCR=Allow access to the 'Diagnostics: Logs: System: Resolver' page.
|
43 |
|
|
##|*MATCH=diag_logs_resolver.php*
|
44 |
|
|
##|-PRIV
|
45 |
|
|
|
46 |
|
|
require("guiconfig.inc");
|
47 |
|
|
|
48 |
|
|
$system_logfile = "{$g['varlog_path']}/resolver.log";
|
49 |
|
|
|
50 |
|
|
$nentries = $config['syslog']['nentries'];
|
51 |
|
|
if (!$nentries)
|
52 |
|
|
$nentries = 50;
|
53 |
|
|
|
54 |
|
|
if ($_POST['clear'])
|
55 |
|
|
clear_log_file($system_logfile);
|
56 |
|
|
|
57 |
|
|
if ($_GET['filtertext'])
|
58 |
|
|
$filtertext = htmlspecialchars($_GET['filtertext']);
|
59 |
|
|
|
60 |
|
|
if ($_POST['filtertext'])
|
61 |
|
|
$filtertext = htmlspecialchars($_POST['filtertext']);
|
62 |
|
|
|
63 |
|
|
if ($filtertext)
|
64 |
|
|
$filtertextmeta="?filtertext=$filtertext";
|
65 |
|
|
|
66 |
|
|
$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Resolver"));
|
67 |
b32dd0a6
|
jim-p
|
$shortcut_section = "resolver";
|
68 |
0ffb5926
|
smos
|
include("head.inc");
|
69 |
|
|
|
70 |
|
|
?>
|
71 |
|
|
|
72 |
|
|
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
|
73 |
|
|
<?php include("fbegin.inc"); ?>
|
74 |
|
|
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
75 |
|
|
<tr>
|
76 |
|
|
<td>
|
77 |
|
|
<?php
|
78 |
|
|
$tab_array = array();
|
79 |
|
|
$tab_array[] = array(gettext("System"), true, "diag_logs.php");
|
80 |
|
|
$tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
|
81 |
|
|
$tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
|
82 |
|
|
$tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
|
83 |
|
|
$tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
|
84 |
|
|
$tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
|
85 |
|
|
$tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
|
86 |
|
|
$tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
|
87 |
|
|
$tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
|
88 |
ae2c143a
|
jim-p
|
$tab_array[] = array(gettext("NTP"), false, "diag_logs_ntpd.php");
|
89 |
0ffb5926
|
smos
|
$tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
|
90 |
|
|
display_top_tabs($tab_array);
|
91 |
|
|
?>
|
92 |
|
|
</td>
|
93 |
|
|
</tr>
|
94 |
|
|
<tr><td class="tabnavtbl">
|
95 |
|
|
<?php
|
96 |
|
|
$tab_array = array();
|
97 |
|
|
$tab_array[] = array(gettext("General"), false, "/diag_logs.php");
|
98 |
|
|
$tab_array[] = array(gettext("Gateways"), false, "/diag_logs_gateways.php");
|
99 |
e0c45357
|
jim-p
|
$tab_array[] = array(gettext("Routing"), false, "/diag_logs_routing.php");
|
100 |
0ffb5926
|
smos
|
$tab_array[] = array(gettext("Resolver"), true, "/diag_logs_resolver.php");
|
101 |
|
|
$tab_array[] = array(gettext("Wireless"), false, "/diag_logs_wireless.php");
|
102 |
|
|
display_top_tabs($tab_array);
|
103 |
|
|
?>
|
104 |
|
|
</td>
|
105 |
|
|
</tr>
|
106 |
|
|
<tr>
|
107 |
|
|
<td>
|
108 |
|
|
<div id="mainarea">
|
109 |
|
|
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
|
110 |
|
|
<tr>
|
111 |
|
|
<td colspan="2" class="listtopic"><?php printf(gettext("Last %s system log entries"),$nentries); ?></td>
|
112 |
|
|
</tr>
|
113 |
|
|
<?php
|
114 |
|
|
if($filtertext)
|
115 |
|
|
dump_clog($system_logfile, $nentries, true, array("$filtertext"), array("ppp"));
|
116 |
|
|
else
|
117 |
|
|
dump_clog($system_logfile, $nentries, true, array(), array("ppp"));
|
118 |
|
|
?>
|
119 |
|
|
<tr>
|
120 |
|
|
<td align="left" valign="top">
|
121 |
b0115477
|
jim-p
|
<form id="filterform" name="filterform" action="diag_logs_resolver.php" method="post" style="margin-top: 14px;">
|
122 |
0ffb5926
|
smos
|
<input id="submit" name="clear" type="submit" class="formbtn" value="<?=gettext("Clear log");?>" />
|
123 |
|
|
</form>
|
124 |
|
|
</td>
|
125 |
|
|
<td align="right" valign="top" >
|
126 |
b0115477
|
jim-p
|
<form id="clearform" name="clearform" action="diag_logs_resolver.php" method="post" style="margin-top: 14px;">
|
127 |
0ffb5926
|
smos
|
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>" />
|
128 |
|
|
<input id="filtersubmit" name="filtersubmit" type="submit" class="formbtn" value="<?=gettext("Filter");?>" />
|
129 |
|
|
</form>
|
130 |
|
|
</td>
|
131 |
|
|
</tr>
|
132 |
|
|
</table>
|
133 |
|
|
</div>
|
134 |
|
|
</td>
|
135 |
|
|
</tr>
|
136 |
|
|
</table>
|
137 |
|
|
<?php include("fend.inc"); ?>
|
138 |
|
|
</body>
|
139 |
|
|
</html>
|