From 2ead5ea7deeb11abb7c4c81874baee1faa5afd2e Mon Sep 17 00:00:00 2001 From: jim-p Date: Thu, 21 Feb 2013 20:18:49 -0500 Subject: [PATCH] Don't forget zones here too --- usr/local/www/status_captiveportal_expire.php | 46 ++++++++++++------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/usr/local/www/status_captiveportal_expire.php b/usr/local/www/status_captiveportal_expire.php index ed96210f38..5b54db7ebb 100644 --- a/usr/local/www/status_captiveportal_expire.php +++ b/usr/local/www/status_captiveportal_expire.php @@ -2,17 +2,17 @@ /* Copyright (C) 2007 Marcel Wiget . All rights reserved. - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE @@ -24,7 +24,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* +/* pfSense_MODULE: captiveportal */ @@ -42,7 +42,20 @@ require("shaper.inc"); require("captiveportal.inc"); require_once("voucher.inc"); -$pgtitle = array(gettext("Status"), gettext("Captive portal"), gettext("Expire Vouchers")); +$cpzone = $_GET['zone']; +if (isset($_POST['zone'])) + $cpzone = $_POST['zone']; + +if (empty($cpzone)) { + header("Location: services_captiveportal_zones.php"); + exit; +} + +if (!is_array($config['captiveportal'])) + $config['captiveportal'] = array(); +$a_cp =& $config['captiveportal']; + +$pgtitle = array(gettext("Status"), gettext("Captive portal"), gettext("Expire Vouchers"), $a_cp[$cpzone]['zone']); include("head.inc"); include("fbegin.inc"); @@ -51,15 +64,15 @@ include("fbegin.inc");
- +. +
- + $tab_array[] = array(gettext("Active Users"), false, "status_captiveportal.php?zone={$cpzone}"); + $tab_array[] = array(gettext("Active Vouchers"), false, "status_captiveportal_vouchers.php?zone={$cpzone}"); + $tab_array[] = array(gettext("Voucher Rolls"), false, "status_captiveportal_voucher_rolls.php?zone={$cpzone}"); + $tab_array[] = array(gettext("Test Vouchers"), false, "status_captiveportal_test.php?zone={$cpzone}"); + $tab_array[] = array(gettext("Expire Vouchers"), true, "status_captiveportal_expire.php?zone={$cpzone}"); + display_top_tabs($tab_array); +?>
@@ -70,11 +83,12 @@ include("fbegin.inc");
-.
  + ">