diff options
author | jim-p <jimp@pfsense.org> | 2016-03-11 11:28:13 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2016-03-11 11:28:13 -0500 |
commit | 4fb86e067c92c08f9603a110fed01a5bb537b9f2 (patch) | |
tree | 5ed294840d394fe14749d382ee4cfe6505351d0e /src/usr | |
parent | fff6a2afad957d0ab71033a0747a46dc19c67d91 (diff) | |
download | pfsense-4fb86e067c92c08f9603a110fed01a5bb537b9f2.zip pfsense-4fb86e067c92c08f9603a110fed01a5bb537b9f2.tar.gz |
Fix online user counts for CP/Vouchers. Fixes #5978
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/local/www/status_captiveportal.php | 2 | ||||
-rw-r--r-- | src/usr/local/www/status_captiveportal_vouchers.php | 45 |
2 files changed, 25 insertions, 22 deletions
diff --git a/src/usr/local/www/status_captiveportal.php b/src/usr/local/www/status_captiveportal.php index 79d8ed0..be1be65 100644 --- a/src/usr/local/www/status_captiveportal.php +++ b/src/usr/local/www/status_captiveportal.php @@ -174,7 +174,7 @@ if (count($a_cp) > 1) { if (!empty($cpzone)): ?> <div class="panel panel-default"> - <div class="panel-heading"><h2 class="panel-title"><?=gettext("Captive Portal Status")?></h2></div> + <div class="panel-heading"><h2 class="panel-title"><?=sprintf(gettext("Users Logged In (%d)"), count($cpdb))?></h2></div> <div class="panel-body table-responsive"> <table class="table table-striped table-hover table-condensed"> diff --git a/src/usr/local/www/status_captiveportal_vouchers.php b/src/usr/local/www/status_captiveportal_vouchers.php index 57a139c..4a18d46 100644 --- a/src/usr/local/www/status_captiveportal_vouchers.php +++ b/src/usr/local/www/status_captiveportal_vouchers.php @@ -138,33 +138,36 @@ $tab_array[] = array(gettext("Expire Vouchers"), false, "status_captiveportal_ex display_top_tabs($tab_array); ?> -<div class="table-responsive"> - <table class="table table-striped table-hover table-condensed"> - <thead> - <tr> - <th><a href="?zone=<?=htmlspecialchars($cpzone)?>&order=0&showact=<?=htmlspecialchars($_GET['showact'])?>"><?=gettext("Voucher"); ?></a></th> - <th><a href="?zone=<?=htmlspecialchars($cpzone)?>&order=1&showact=<?=htmlspecialchars($_GET['showact'])?>"><?=gettext("Roll"); ?></a></th> - <th><a href="?zone=<?=htmlspecialchars($cpzone)?>&order=2&showact=<?=htmlspecialchars($_GET['showact'])?>"><?=gettext("Activated at"); ?></a></th> - <th><a href="?zone=<?=htmlspecialchars($cpzone)?>&order=3&showact=<?=htmlspecialchars($_GET['showact'])?>"><?=gettext("Expires in"); ?></a></th> - <th><a href="?zone=<?=htmlspecialchars($cpzone)?>&order=4&showact=<?=htmlspecialchars($_GET['showact'])?>"><?=gettext("Expires at"); ?></a></th> - </tr> - </thead> - <tbody> +<div class="panel panel-default"> + <div class="panel-heading"><h2 class="panel-title"><?=sprintf(gettext("Vouchers in Use (%d)"), count($db))?></h2></div> + <div class="panel-body table-responsive"> + <table class="table table-striped table-hover table-condensed"> + <thead> + <tr> + <th><a href="?zone=<?=htmlspecialchars($cpzone)?>&order=0&showact=<?=htmlspecialchars($_GET['showact'])?>"><?=gettext("Voucher"); ?></a></th> + <th><a href="?zone=<?=htmlspecialchars($cpzone)?>&order=1&showact=<?=htmlspecialchars($_GET['showact'])?>"><?=gettext("Roll"); ?></a></th> + <th><a href="?zone=<?=htmlspecialchars($cpzone)?>&order=2&showact=<?=htmlspecialchars($_GET['showact'])?>"><?=gettext("Activated at"); ?></a></th> + <th><a href="?zone=<?=htmlspecialchars($cpzone)?>&order=3&showact=<?=htmlspecialchars($_GET['showact'])?>"><?=gettext("Expires in"); ?></a></th> + <th><a href="?zone=<?=htmlspecialchars($cpzone)?>&order=4&showact=<?=htmlspecialchars($_GET['showact'])?>"><?=gettext("Expires at"); ?></a></th> + </tr> + </thead> + <tbody> <?php foreach ($db as $dbent): ?> - <tr> - <td><?=$dbent[0]?></td> - <td><?=$dbent[1]?></td> - <td><?=htmlspecialchars(date("m/d/Y H:i:s", $dbent[2]))?></td> - <td><?=$dbent[3]?><?=gettext("min"); ?></td> - <td><?=htmlspecialchars(date("m/d/Y H:i:s", $dbent[4]))?></td> - </tr> + <tr> + <td><?=$dbent[0]?></td> + <td><?=$dbent[1]?></td> + <td><?=htmlspecialchars(date("m/d/Y H:i:s", $dbent[2]))?></td> + <td><?=$dbent[3]?><?=gettext("min"); ?></td> + <td><?=htmlspecialchars(date("m/d/Y H:i:s", $dbent[4]))?></td> + </tr> <?php endforeach; ?> - </tbody> - </table> + </tbody> + </table> + </div> </div> <?php include("foot.inc"); |