1
|
#!/usr/local/bin/php
|
2
|
<?php
|
3
|
/* $Id$ */
|
4
|
/*
|
5
|
diag_logs_auth.php
|
6
|
part of m0n0wall (http://m0n0.ch/wall)
|
7
|
|
8
|
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
|
9
|
All rights reserved.
|
10
|
|
11
|
Redistribution and use in source and binary forms, with or without
|
12
|
modification, are permitted provided that the following conditions are met:
|
13
|
|
14
|
1. Redistributions of source code must retain the above copyright notice,
|
15
|
this list of conditions and the following disclaimer.
|
16
|
|
17
|
2. Redistributions in binary form must reproduce the above copyright
|
18
|
notice, this list of conditions and the following disclaimer in the
|
19
|
documentation and/or other materials provided with the distribution.
|
20
|
|
21
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
22
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
23
|
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
24
|
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
25
|
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
26
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
27
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
28
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
29
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
30
|
POSSIBILITY OF SUCH DAMAGE.
|
31
|
*/
|
32
|
|
33
|
require("guiconfig.inc");
|
34
|
|
35
|
$portal_logfile = "{$g['varlog_path']}/portalauth.log";
|
36
|
|
37
|
$nentries = $config['syslog']['nentries'];
|
38
|
if (!$nentries)
|
39
|
$nentries = 50;
|
40
|
|
41
|
if ($_POST['clear']) {
|
42
|
exec("/usr/sbin/clog -i -s 262144 {$portal_logfile}");
|
43
|
}
|
44
|
|
45
|
$pgtitle = "Diagnostics: System logs: Portal Auth";
|
46
|
include("head.inc");
|
47
|
|
48
|
?>
|
49
|
|
50
|
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
|
51
|
<?php include("fbegin.inc"); ?>
|
52
|
<p class="pgtitle"><?=$pgtitle?></p>
|
53
|
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
54
|
<tr><td>
|
55
|
<?php
|
56
|
$tab_array = array();
|
57
|
$tab_array[] = array("System", false, "diag_logs.php");
|
58
|
$tab_array[] = array("Firewall", false, "diag_logs_filter.php");
|
59
|
$tab_array[] = array("DHCP", false, "diag_logs_dhcp.php");
|
60
|
$tab_array[] = array("Portal Auth", true, "diag_logs_auth.php");
|
61
|
$tab_array[] = array("IPSEC VPN", false, "diag_logs_ipsec.php");
|
62
|
$tab_array[] = array("PPTP VPN", false, "diag_logs_vpn.php");
|
63
|
$tab_array[] = array("Load Balance", false, "diag_logs_slbd.php");
|
64
|
$tab_array[] = array("Settings", false, "diag_logs_settings.php");
|
65
|
display_top_tabs($tab_array);
|
66
|
?>
|
67
|
</td></tr>
|
68
|
<tr>
|
69
|
<td>
|
70
|
<div id="mainarea">
|
71
|
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
|
72
|
<tr>
|
73
|
<td colspan="2" class="listtopic">
|
74
|
Last <?=$nentries;?> Portal Auth log entries</td>
|
75
|
</tr>
|
76
|
<?php dump_clog($portal_logfile, $nentries, true); ?>
|
77
|
<tr><td><br><form action="diag_logs_auth.php" method="post">
|
78
|
<input name="clear" type="submit" class="formbtn" value="Clear log"></td></tr>
|
79
|
</table>
|
80
|
</div>
|
81
|
</form>
|
82
|
</td>
|
83
|
</tr>
|
84
|
</table>
|
85
|
<?php include("fend.inc"); ?>
|
86
|
<meta http-equiv="refresh" content="60;url=<?php print $_SERVER['PHP_SELF']; ?>">
|
87
|
</body>
|
88
|
</html>
|