Project

General

Profile

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