From 336e3c1cabef46d5825bb0540a6715dff86450e7 Mon Sep 17 00:00:00 2001 From: Charlie Date: Sat, 13 Jun 2009 17:24:28 +0000 Subject: Port voucher login ability on CaptivePortal from M0n0Wall. Various locking fixes are done with the import and this means that as of now pfSense has a better performin/behaving CP than m0n0wall. --- usr/local/www/status_captiveportal.php | 36 +++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) (limited to 'usr/local/www/status_captiveportal.php') diff --git a/usr/local/www/status_captiveportal.php b/usr/local/www/status_captiveportal.php index 8895437..9e17d4b 100755 --- a/usr/local/www/status_captiveportal.php +++ b/usr/local/www/status_captiveportal.php @@ -36,11 +36,8 @@ ##|*MATCH=status_captiveportal.php* ##|-PRIV - require("guiconfig.inc"); -$concurrent = `cat /var/db/captiveportal.db | wc -l`; - $pgtitle = array("Status: Captive portal"); include("head.inc"); @@ -64,10 +61,13 @@ function clientcmp($a, $b) { } $cpdb = array(); -if (file_exists("/var/db/captiveportal.db")) - $cpcontents = file("/var/db/captiveportal.db", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); +if (file_exists("{$g['vardb_path']}/captiveportal.db")) + $cpcontents = file("{$g['vardb_path']}/captiveportal.db", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); else $cpcontents = array(); + +$concurrent = count($cpcontents); + foreach ($cpcontents as $cpcontent) { $cpent = explode(",", $cpcontent); if ($_GET['showact']) @@ -88,6 +88,24 @@ if ($_GET['order']) { usort($cpdb, "clientcmp"); } ?> + + +
+ + + + + +
+ +
+ + @@ -115,6 +133,14 @@ if ($_GET['order']) {
+ + +
+
+ +
-- cgit v1.1