Project

General

Profile

Download (5.03 KB) Statistics
| Branch: | Tag: | Revision:
1 0ffb5926 smos
<?php
2
/* $Id$ */
3
/*
4
	diag_logs_gateways.php
5
	Copyright (C) 2004-2009 Scott Ullrich
6
	Copyright (C) 2012 Seth Mos
7 6317d31d 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-gateways
42
##|*NAME=Diagnostics: Logs: System: Gateways page
43
##|*DESCR=Allow access to the 'Diagnostics: Logs: System: Gateways' page.
44
##|*MATCH=diag_logs_gateways.php*
45
##|-PRIV
46
47
require("guiconfig.inc");
48
49
$system_logfile = "{$g['varlog_path']}/gateways.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("Gateways"));
68 b32dd0a6 jim-p
$shortcut_section = "gateways";
69 0ffb5926 smos
include("head.inc");
70
71
?>
72
73
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
74
<?php include("fbegin.inc"); ?>
75 9890d0c7 Colin Fleming
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="logs system gateways">
76 0ffb5926 smos
	<tr>
77
		<td>
78
<?php
79
	$tab_array = array();
80
	$tab_array[] = array(gettext("System"), true, "diag_logs.php");
81
	$tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
82
	$tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
83
	$tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
84
	$tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
85
	$tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
86
	$tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
87
	$tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
88
	$tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
89 ae2c143a jim-p
	$tab_array[] = array(gettext("NTP"), false, "diag_logs_ntpd.php");
90 0ffb5926 smos
	$tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
91
	display_top_tabs($tab_array);
92
?>
93
		</td>
94
	</tr>
95
  <tr><td class="tabnavtbl">
96
<?php
97
	$tab_array = array();
98
	$tab_array[] = array(gettext("General"), false, "/diag_logs.php");
99
	$tab_array[] = array(gettext("Gateways"), true, "/diag_logs_gateways.php");
100 e0c45357 jim-p
	$tab_array[] = array(gettext("Routing"), false, "/diag_logs_routing.php");
101 0ffb5926 smos
	$tab_array[] = array(gettext("Resolver"), false, "/diag_logs_resolver.php");
102
	$tab_array[] = array(gettext("Wireless"), false, "/diag_logs_wireless.php");
103
	display_top_tabs($tab_array);
104
?>
105
		</td>
106
	</tr>
107
	<tr>
108
		<td>
109
			<div id="mainarea">
110 9890d0c7 Colin Fleming
			<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0" summary="main area">
111 0ffb5926 smos
				<tr>
112
					<td colspan="2" class="listtopic"><?php printf(gettext("Last %s system log entries"),$nentries); ?></td>
113
				</tr>
114
				<?php
115
					if($filtertext)
116
						dump_clog($system_logfile, $nentries, true, array("$filtertext"));
117
					else
118
						dump_clog($system_logfile, $nentries, true, array());
119
				?>
120
				<tr>
121
					<td align="left" valign="top">
122 b0115477 jim-p
						<form id="filterform" name="filterform" action="diag_logs_gateways.php" method="post" style="margin-top: 14px;">
123 0ffb5926 smos
              				<input id="submit" name="clear" type="submit" class="formbtn" value="<?=gettext("Clear log");?>" />
124
						</form>
125
					</td>
126
					<td align="right" valign="top" >
127
						<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");?>" />
130
						</form>
131
					</td>
132
				</tr>
133
			</table>
134
	    	</div>
135
		</td>
136
	</tr>
137
</table>
138
<?php include("fend.inc"); ?>
139
</body>
140
</html>