Revision 5f601060
Added by Phil Davis about 10 years ago
usr/local/www/diag_logs_openvpn.php | ||
---|---|---|
32 | 32 |
POSSIBILITY OF SUCH DAMAGE. |
33 | 33 |
*/ |
34 | 34 |
|
35 |
/*
|
|
35 |
/* |
|
36 | 36 |
pfSense_MODULE: openvpn |
37 | 37 |
*/ |
38 | 38 |
|
... | ... | |
52 | 52 |
$openvpn_logfile = "{$g['varlog_path']}/openvpn.log"; |
53 | 53 |
|
54 | 54 |
$nentries = $config['syslog']['nentries']; |
55 |
if (!$nentries) |
|
55 |
if (!$nentries) {
|
|
56 | 56 |
$nentries = 50; |
57 |
} |
|
57 | 58 |
|
58 |
if ($_POST['clear']) |
|
59 |
if ($_POST['clear']) {
|
|
59 | 60 |
clear_log_file($openvpn_logfile); |
61 |
} |
|
60 | 62 |
|
61 | 63 |
include("head.inc"); |
62 | 64 |
|
... | ... | |
64 | 66 |
<body link="#0000CC" vlink="#0000CC" alink="#0000CC"> |
65 | 67 |
<?php include("fbegin.inc"); ?> |
66 | 68 |
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="logs openvpn"> |
67 |
<tr>
|
|
69 |
<tr> |
|
68 | 70 |
<td> |
69 | 71 |
<?php |
70 | 72 |
$tab_array = array(); |
... | ... | |
81 | 83 |
$tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php"); |
82 | 84 |
display_top_tabs($tab_array); |
83 | 85 |
?> |
84 |
</td>
|
|
86 |
</td> |
|
85 | 87 |
</tr> |
86 | 88 |
<tr> |
87 |
<td>
|
|
89 |
<td>
|
|
88 | 90 |
<div id="mainarea"> |
89 | 91 |
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0" summary="main area"> |
90 |
<tr>
|
|
92 |
<tr> |
|
91 | 93 |
<td colspan="2" class="listtopic"><?php printf(gettext("Last %s OpenVPN log entries"),$nentries)?></td> |
92 |
</tr>
|
|
94 |
</tr> |
|
93 | 95 |
<?php dump_clog($openvpn_logfile, $nentries); ?> |
94 | 96 |
<tr> |
95 | 97 |
<td> |
96 | 98 |
<br /> |
97 | 99 |
<form action="diag_logs_openvpn.php" method="post"> |
98 |
<input name="clear" type="submit" class="formbtn" value="<?=gettext("Clear log"); ?>" /> |
|
100 |
<input name="clear" type="submit" class="formbtn" value="<?=gettext("Clear log"); ?>" />
|
|
99 | 101 |
</form> |
100 | 102 |
</td> |
101 | 103 |
</tr> |
Also available in: Unified diff
Code style usr-local-www diag