From b2b6130819e72ebf6e4f174444b59f40e88b7b06 Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 2 Nov 2010 14:11:55 -0400 Subject: Switch from buttons to tabs, add a mode to view raw mpd logs for each vpn type, and some general cleanup. Fixes #912 --- usr/local/www/diag_logs_vpn.php | 85 +++++++++++++++++++++++------------------ 1 file changed, 48 insertions(+), 37 deletions(-) (limited to 'usr/local/www/diag_logs_vpn.php') diff --git a/usr/local/www/diag_logs_vpn.php b/usr/local/www/diag_logs_vpn.php index 6e927d1..5bf0651 100755 --- a/usr/local/www/diag_logs_vpn.php +++ b/usr/local/www/diag_logs_vpn.php @@ -49,12 +49,8 @@ $nentries = $config['syslog']['nentries']; if (!$nentries) $nentries = 50; -if ($_GET['vpntype']) - $vpntype = $_GET['vpntype']; -else - $vpntype = "pptp"; -if ($_POST['vpntype']) - $vpntype = $_POST['vpntype']; +$vpntype = ($_GET['vpntype']) ? $_GET['vpntype'] : "pptp"; +$mode = ($_GET['mode']) ? $_GET['mode'] : "login"; if ($_POST['clear']) clear_log_file("/var/log/vpn.log"); @@ -69,7 +65,7 @@ function dump_clog_vpn($logfile, $tail) { if(isset($config['system']['usefifolog'])) exec("/usr/sbin/fifolog_reader " . $logfile . " | tail {$sor} -n " . $tail, $logarr); else - exec("/usr/sbin/clog " . $logfile . " | grep -v \"CLOG\" | grep -v \"\033\" | tail {$sor} -n " . $tail, $logarr); + exec("/usr/sbin/clog " . $logfile . " | tail {$sor} -n " . $tail, $logarr); foreach ($logarr as $logent) { $logent = preg_split("/\s+/", $logent, 6); @@ -114,39 +110,54 @@ include("head.inc"); display_top_tabs($tab_array); ?> + + + -
- - - - - - - - - - - - + +
- -
- gettext("PPTP"), "poes" => gettext("PPPoE"), "l2tp" => gettext("L2TP")); - foreach ($vpns as $kvpn => $dvpn): - ?> - - - - - -
-
+ + + + + + + + + + -
+
-
- -"> -
+ + + + +
+ + "> + -- cgit v1.1