diff options
author | Phil Davis <phil.davis@inf.org> | 2015-05-15 11:40:50 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2015-05-15 11:40:50 +0545 |
commit | 42b0c92129b93ca6d182f4904ec92708c9a8c750 (patch) | |
tree | 7d396b83ba7920878bb6e8f42ae5907e9518c003 /usr/local/www/status_captiveportal_expire.php | |
parent | c8f1c7bd70cd156f23a59400e5c738ef8bf5281b (diff) | |
download | pfsense-42b0c92129b93ca6d182f4904ec92708c9a8c750.zip pfsense-42b0c92129b93ca6d182f4904ec92708c9a8c750.tar.gz |
Code style WWW Status
Diffstat (limited to 'usr/local/www/status_captiveportal_expire.php')
-rw-r--r-- | usr/local/www/status_captiveportal_expire.php | 87 |
1 files changed, 46 insertions, 41 deletions
diff --git a/usr/local/www/status_captiveportal_expire.php b/usr/local/www/status_captiveportal_expire.php index 5207b20..c4233d9 100644 --- a/usr/local/www/status_captiveportal_expire.php +++ b/usr/local/www/status_captiveportal_expire.php @@ -45,16 +45,18 @@ require("captiveportal.inc"); require_once("voucher.inc"); $cpzone = $_GET['zone']; -if (isset($_POST['zone'])) +if (isset($_POST['zone'])) { $cpzone = $_POST['zone']; +} if (empty($cpzone)) { header("Location: services_captiveportal_zones.php"); exit; } -if (!is_array($config['captiveportal'])) +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']); @@ -66,53 +68,56 @@ include("head.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"> + <tr><td class="tabnavtbl"> <?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(); + $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"> + </td></tr> + <tr> + <td class="tabcont"> -<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="content pane"> - <tr> - <td valign="top" class="vncellreq"><?=gettext("Voucher(s)"); ?></td> - <td class="vtable"> - <textarea name="vouchers" cols="65" rows="3" 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> - <tr> - <td width="22%" valign="top"> </td> - <td width="78%"> - <input name="zone" type="hidden" value="<?=htmlspecialchars($cpzone);?>" /> - <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Submit"); ?>" /> - </td> - </tr> + <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="content pane"> + <tr> + <td valign="top" class="vncellreq"><?=gettext("Voucher(s)"); ?></td> + <td class="vtable"> + <textarea name="vouchers" cols="65" rows="3" 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> + <tr> + <td width="22%" valign="top"> </td> + <td width="78%"> + <input name="zone" type="hidden" value="<?=htmlspecialchars($cpzone);?>" /> + <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Submit"); ?>" /> + </td> + </tr> + </table> + </td> + </tr> </table> -</td></tr></table> </form> <br/> <?php if ($_POST) { - if ($_POST['vouchers']) { - $result = voucher_expire($_POST['vouchers']); - echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"4\" width=\"100%\" summary=\"results\">\n"; - if ( $result) { - echo "<tr><td bgcolor=\"#D9DEE8\"><img src=\"/themes/{$g['theme']}/images/icons/icon_pass.gif\" alt=\"pass\" /></td>"; - echo "<td bgcolor=\"#D9DEE8\">Success</td></tr>"; - } else { - echo "<tr><td bgcolor=\"#FFD9D1\"><img src=\"/themes/{$g['theme']}/images/icons/icon_block.gif\" alt=\"block\" /></td>"; - echo "<td bgcolor=\"#FFD9D1\">Error</td></tr>"; - } - echo "</table>"; - } + if ($_POST['vouchers']) { + $result = voucher_expire($_POST['vouchers']); + echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"4\" width=\"100%\" summary=\"results\">\n"; + if ( $result) { + echo "<tr><td bgcolor=\"#D9DEE8\"><img src=\"/themes/{$g['theme']}/images/icons/icon_pass.gif\" alt=\"pass\" /></td>"; + echo "<td bgcolor=\"#D9DEE8\">Success</td></tr>"; + } else { + echo "<tr><td bgcolor=\"#FFD9D1\"><img src=\"/themes/{$g['theme']}/images/icons/icon_block.gif\" alt=\"block\" /></td>"; + echo "<td bgcolor=\"#FFD9D1\">Error</td></tr>"; + } + echo "</table>"; + } } include("fend.inc"); |