diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-09-11 21:51:05 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-09-11 21:51:05 -0400 |
commit | f986e40271db95c34307852ec8a9d96a094798fb (patch) | |
tree | d88de0c395817e2b29ba3978e4d690e23269aeeb /usr/local/www | |
parent | d6f13f82899b4a58097599193b95559f1cd61d3a (diff) | |
download | pfsense-f986e40271db95c34307852ec8a9d96a094798fb.zip pfsense-f986e40271db95c34307852ec8a9d96a094798fb.tar.gz |
Use already read in file to obtain the number of sessions
Diffstat (limited to 'usr/local/www')
-rwxr-xr-x | usr/local/www/status_captiveportal.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr/local/www/status_captiveportal.php b/usr/local/www/status_captiveportal.php index 358a04d..e1599f8 100755 --- a/usr/local/www/status_captiveportal.php +++ b/usr/local/www/status_captiveportal.php @@ -37,11 +37,14 @@ if ($_GET['act'] == "del") { exit; } +// Lock and read in the captive portal DB $captiveportallck = lock('captiveportal'); -$concurrent = `cat /var/db/captiveportal.db | wc -l`; $cpcontents = file("/var/db/captiveportal.db", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); unlock($captiveportallck); +// Set how many sessions are currently under flight +$concurrent = count($cpcontents); + $pgtitle = "Status: Captive portal ({$concurrent})"; include("head.inc"); |