Project

General

Profile

Download (3.63 KB) Statistics
| Branch: | Tag: | Revision:
1 4d875b4f Scott Ullrich
<?php
2 b46bfcf5 Bill Marquette
/* $Id$ */
3 5b237745 Scott Ullrich
/*
4
	diag_logs_dhcp.php
5 13d193c2 Scott Ullrich
	Copyright (C) 2004-2009 Scott Ullrich
6 4d875b4f Scott Ullrich
	All rights reserved.
7
8
	originially part of m0n0wall (http://m0n0.ch/wall)
9 5b237745 Scott Ullrich
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
10
	All rights reserved.
11 4d875b4f Scott Ullrich
12 5b237745 Scott Ullrich
	Redistribution and use in source and binary forms, with or without
13
	modification, are permitted provided that the following conditions are met:
14 4d875b4f Scott Ullrich
15 5b237745 Scott Ullrich
	1. Redistributions of source code must retain the above copyright notice,
16
	   this list of conditions and the following disclaimer.
17 4d875b4f Scott Ullrich
18 5b237745 Scott Ullrich
	2. Redistributions in binary form must reproduce the above copyright
19
	   notice, this list of conditions and the following disclaimer in the
20
	   documentation and/or other materials provided with the distribution.
21 4d875b4f Scott Ullrich
22 5b237745 Scott Ullrich
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
23
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
24
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
26
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31
	POSSIBILITY OF SUCH DAMAGE.
32
*/
33
34 13d193c2 Scott Ullrich
/*	
35
	pfSense_MODULE:	dhcpserver
36
*/
37
38 6b07c15a Matthew Grooms
##|+PRIV
39
##|*IDENT=page-diagnostics-logs-dhcp
40
##|*NAME=Diagnostics: Logs: DHCP page
41
##|*DESCR=Allow access to the 'Diagnostics: Logs: DHCP' page.
42
##|*MATCH=diag_logs_dhcp.php*
43
##|-PRIV
44
45 5b237745 Scott Ullrich
require("guiconfig.inc");
46
47 963d5343 Bill Marquette
$dhcpd_logfile = "{$g['varlog_path']}/dhcpd.log";
48
49 5b237745 Scott Ullrich
$nentries = $config['syslog']['nentries'];
50
if (!$nentries)
51
	$nentries = 50;
52
53 bd961c65 jim-p
if ($_POST['clear']) {
54 d6abaa18 Scott Ullrich
	clear_log_file($dhcpd_logfile);
55 bd961c65 jim-p
	killbyname("dhcpd");
56
	services_dhcpd_configure();
57
}
58 5b237745 Scott Ullrich
59 f8ec8de4 Renato Botelho
$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("DHCP"));
60 b32dd0a6 jim-p
$shortcut_section = "dhcp";
61 b63695db Scott Ullrich
include("head.inc");
62
63 5b237745 Scott Ullrich
?>
64
65
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
66
<?php include("fbegin.inc"); ?>
67
<table width="100%" border="0" cellpadding="0" cellspacing="0">
68
  <tr><td>
69 b63695db Scott Ullrich
<?php
70
	$tab_array = array();
71 f8ec8de4 Renato Botelho
	$tab_array[] = array(gettext("System"), false, "diag_logs.php");
72
	$tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
73
	$tab_array[] = array(gettext("DHCP"), true, "diag_logs_dhcp.php");
74
	$tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
75
	$tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
76
	$tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
77
	$tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
78
	$tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
79
	$tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
80 ae2c143a jim-p
	$tab_array[] = array(gettext("NTP"), false, "diag_logs_ntpd.php");
81 f8ec8de4 Renato Botelho
	$tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
82 b63695db Scott Ullrich
	display_top_tabs($tab_array);
83
?>
84 5b237745 Scott Ullrich
  </td></tr>
85 4d875b4f Scott Ullrich
  <tr>
86 0f10aee4 Bill Marquette
    <td>
87
	<div id="mainarea">
88
		<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
89 4d875b4f Scott Ullrich
		  <tr>
90
			<td colspan="2" class="listtopic">
91 f8ec8de4 Renato Botelho
			  <?php printf(gettext("Last %s DHCP service log entries"), $nentries);?></td>
92 5b237745 Scott Ullrich
		  </tr>
93 963d5343 Bill Marquette
		  <?php dump_clog($dhcpd_logfile, $nentries); ?>
94 1fe3c758 N0YB
		<tr><td><br/><form action="diag_logs_dhcp.php" method="post">
95
			<input name="clear" type="submit" class="formbtn" value="<?= gettext("Clear log");?>" /></form></td>
96 bd961c65 jim-p
			<td>NOTE: Clearing the log file will restart the DHCP daemon.</td></tr>
97 5b237745 Scott Ullrich
		</table>
98 0f10aee4 Bill Marquette
	</div>
99 5b237745 Scott Ullrich
	</td>
100
  </tr>
101
</table>
102
<?php include("fend.inc"); ?>
103
</body>
104
</html>