1 |
18330d38
|
Scott Ullrich
|
<?php
|
2 |
|
|
/* $Id$ */
|
3 |
|
|
/*
|
4 |
|
|
diag_logs_ntpd.php
|
5 |
|
|
part of pfSense
|
6 |
|
|
Copyright (C) 2005 Bill Marquette <bill.marquette@gmail.com>.
|
7 |
|
|
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
|
8 |
29aef6c4
|
Jim Thompson
|
Copyright (C) 2013-2014 Electric Sheep Fencing, LP
|
9 |
18330d38
|
Scott Ullrich
|
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 |
13d193c2
|
Scott Ullrich
|
/*
|
34 |
|
|
pfSense_MODULE: ntpd
|
35 |
|
|
*/
|
36 |
|
|
|
37 |
6b07c15a
|
Matthew Grooms
|
##|+PRIV
|
38 |
ffc7d2c4
|
jim-p
|
##|*IDENT=page-status-systemlogs-ntpd
|
39 |
ae2c143a
|
jim-p
|
##|*NAME=Status: System logs: NTP page
|
40 |
|
|
##|*DESCR=Allow access to the 'Status: System logs: NTP' page.
|
41 |
6b07c15a
|
Matthew Grooms
|
##|*MATCH=diag_logs_ntpd.php*
|
42 |
|
|
##|-PRIV
|
43 |
|
|
|
44 |
18330d38
|
Scott Ullrich
|
require("guiconfig.inc");
|
45 |
|
|
|
46 |
1348a09b
|
Seth Mos
|
$ntpd_logfile = "{$g['varlog_path']}/ntpd.log";
|
47 |
18330d38
|
Scott Ullrich
|
|
48 |
|
|
$nentries = $config['syslog']['nentries'];
|
49 |
|
|
if (!$nentries)
|
50 |
|
|
$nentries = 50;
|
51 |
|
|
|
52 |
d6abaa18
|
Scott Ullrich
|
if ($_POST['clear'])
|
53 |
|
|
clear_log_file($ntpd_logfile);
|
54 |
18330d38
|
Scott Ullrich
|
|
55 |
ae2c143a
|
jim-p
|
$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("NTP"));
|
56 |
b32dd0a6
|
jim-p
|
$shortcut_section = "ntp";
|
57 |
18330d38
|
Scott Ullrich
|
include("head.inc");
|
58 |
|
|
|
59 |
|
|
?>
|
60 |
|
|
|
61 |
|
|
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
|
62 |
|
|
<?php include("fbegin.inc"); ?>
|
63 |
2680a3e9
|
Colin Fleming
|
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="logs ntpd">
|
64 |
18330d38
|
Scott Ullrich
|
<tr><td>
|
65 |
|
|
<?php
|
66 |
|
|
$tab_array = array();
|
67 |
f8ec8de4
|
Renato Botelho
|
$tab_array[] = array(gettext("System"), false, "diag_logs.php");
|
68 |
|
|
$tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
|
69 |
|
|
$tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
|
70 |
|
|
$tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
|
71 |
|
|
$tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
|
72 |
|
|
$tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
|
73 |
|
|
$tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
|
74 |
|
|
$tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
|
75 |
|
|
$tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
|
76 |
ae2c143a
|
jim-p
|
$tab_array[] = array(gettext("NTP"), true, "diag_logs_ntpd.php");
|
77 |
f8ec8de4
|
Renato Botelho
|
$tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
|
78 |
18330d38
|
Scott Ullrich
|
display_top_tabs($tab_array);
|
79 |
|
|
?>
|
80 |
|
|
</td></tr>
|
81 |
|
|
<tr>
|
82 |
|
|
<td>
|
83 |
|
|
<div id="mainarea">
|
84 |
2680a3e9
|
Colin Fleming
|
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0" summary="main area">
|
85 |
18330d38
|
Scott Ullrich
|
<tr>
|
86 |
|
|
<td colspan="2" class="listtopic">
|
87 |
ae2c143a
|
jim-p
|
<?php printf(gettext("Last %s NTP log entries"), $nentries);?></td>
|
88 |
18330d38
|
Scott Ullrich
|
</tr>
|
89 |
1348a09b
|
Seth Mos
|
<?php dump_clog($ntpd_logfile, $nentries); ?>
|
90 |
8cd558b6
|
ayvis
|
<tr><td><br />
|
91 |
5c424e3d
|
Scott Ullrich
|
<form action="diag_logs_ntpd.php" method="post">
|
92 |
2680a3e9
|
Colin Fleming
|
<input name="clear" type="submit" class="formbtn" value="<?=gettext("Clear log"); ?>" />
|
93 |
|
|
</form>
|
94 |
|
|
</td></tr>
|
95 |
18330d38
|
Scott Ullrich
|
</table>
|
96 |
|
|
</div>
|
97 |
|
|
</td>
|
98 |
|
|
</tr>
|
99 |
|
|
</table>
|
100 |
|
|
<?php include("fend.inc"); ?>
|
101 |
|
|
</body>
|
102 |
|
|
</html>
|