diff options
author | jim-p <jimp@pfsense.org> | 2013-02-21 20:18:49 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2013-02-21 20:18:49 -0500 |
commit | 2ead5ea7deeb11abb7c4c81874baee1faa5afd2e (patch) | |
tree | 6c15ac84c97a8e9e27b124a0b1108d89b89c4359 | |
parent | 506bca1210b67a2ed45efd9c986c2c2510406a08 (diff) | |
download | pfsense-2ead5ea7deeb11abb7c4c81874baee1faa5afd2e.zip pfsense-2ead5ea7deeb11abb7c4c81874baee1faa5afd2e.tar.gz |
Don't forget zones here too
-rw-r--r-- | usr/local/www/status_captiveportal_expire.php | 46 |
1 files changed, 30 insertions, 16 deletions
diff --git a/usr/local/www/status_captiveportal_expire.php b/usr/local/www/status_captiveportal_expire.php index ed96210..5b54db7 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 <mwiget@mac.com>. 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"); <form action="status_captiveportal_expire.php" method="post" enctype="multipart/form-data" name="iform" id="iform"> <table width="100%" border="0" cellpadding="0" cellspacing="0" summary="tab pane"> <tr><td class="tabnavtbl"> -<?php +<?php $tab_array = array(); - $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); -?> + $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); +?> </td></tr> <tr> <td class="tabcont"> @@ -70,11 +83,12 @@ include("fbegin.inc"); <td class="vtable"> <textarea name="vouchers" cols="65" rows="3" type="text" id="vouchers" class="formpre"><?=htmlspecialchars($_POST['vouchers']);?></textarea> <br> -<?=gettext("Enter multiple vouchers separated by space or newline. All valid vouchers will be marked as expired"); ?>.</td> - </tr> +<?=gettext("Enter multiple vouchers separated by space or newline. All valid vouchers will be marked as expired"); ?>.</td> + </tr> <tr> <td width="22%" valign="top"> </td> <td width="78%"> + <input name="zone" type="hidden" value="<?=$cpzone;?>"> <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Submit"); ?>"> </td> </tr> |