diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2015-11-24 13:46:20 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-11-24 13:46:20 -0500 |
commit | 7721ce270d4394d08e711bb37b2e86513e33f0ec (patch) | |
tree | 504ee312cfbff20f51464817832b10af41c977b8 /src/usr/local/www/status_captiveportal.php | |
parent | eef940ead786bd820299b87a1c7e8ad816b96b90 (diff) | |
download | pfsense-7721ce270d4394d08e711bb37b2e86513e33f0ec.zip pfsense-7721ce270d4394d08e711bb37b2e86513e33f0ec.tar.gz |
Fixes #5529
Diffstat (limited to 'src/usr/local/www/status_captiveportal.php')
-rw-r--r-- | src/usr/local/www/status_captiveportal.php | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/src/usr/local/www/status_captiveportal.php b/src/usr/local/www/status_captiveportal.php index 75259ea..5090413 100644 --- a/src/usr/local/www/status_captiveportal.php +++ b/src/usr/local/www/status_captiveportal.php @@ -78,9 +78,6 @@ if (isset($_POST['zone'])) { } -$pgtitle = array(gettext("Status: Captive portal")); -$shortcut_section = "captiveportal"; - if (!is_array($config['captiveportal'])) { $config['captiveportal'] = array(); } @@ -105,10 +102,6 @@ if ($_GET['act'] == "del" && !empty($cpzone) && isset($cpzoneid) && isset($_GET[ exit; } -include("head.inc"); - -flush(); - function clientcmp($a, $b) { global $order; return strcmp($a[$order], $b[$order]); @@ -133,6 +126,11 @@ if (!empty($cpzone)) { } } +$pgtitle = array(gettext("Status"), gettext("Captive portal")); +$shortcut_section = "captiveportal"; + +include("head.inc"); + if (!empty($cpzone) && isset($config['voucher'][$cpzone]['enable'])): $tab_array = array(); $tab_array[] = array(gettext("Active Users"), true, "status_captiveportal.php?zone=" . htmlspecialchars($cpzone)); @@ -167,17 +165,14 @@ if (count($a_cp) > 1) { print($form); } -?> + +if (!empty($cpzone)): ?> <div class="panel panel-default"> <div class="panel-heading"><h2 class="panel-title"><?=gettext("Captive Portal Status (")?><?=$a_cp[$cpzone]['zone']?>)</h2></div> <div class="panel-body table-responsive"> <table class="table table-striped table-hover table-condensed"> - -<?php -if (!empty($cpzone)): ?> - <tr> <th> <a href="?zone=<?=htmlspecialchars($cpzone)?>&order=ip&showact=<?=htmlspecialchars($_GET['showact'])?>"><?=gettext("IP address")?></a> @@ -251,10 +246,26 @@ if (!empty($cpzone)): ?> </tr> <?php endforeach; +?> + </table> + </div> +</div> +<?php +else: + // If no zones have been defined . . +?> +<div class="panel panel-default"> + <div class="panel-heading"><h2 class="panel-title"><?=gettext("Captive Portal Status")?></h2></div> + <div class="panel-body"><br /> +<?php + print_info_box(gettext("No captive portal zones have been configured. You may add new zones here: ") . '<a href="services_captiveportal_zones.php">' . 'Services->Captive portal' . '</a>'); +?> + </div> +</div> +<?php endif; ?> -</table> <form action="status_captiveportal.php" method="get" style="margin: 14px;"> <input type="hidden" name="order" value="<?=htmlspecialchars($_GET['order'])?>" /> |