diff options
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/local/www/status_captiveportal_test.php | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/src/usr/local/www/status_captiveportal_test.php b/src/usr/local/www/status_captiveportal_test.php index 4eb59d2..b0cd714 100644 --- a/src/usr/local/www/status_captiveportal_test.php +++ b/src/usr/local/www/status_captiveportal_test.php @@ -88,6 +88,22 @@ $shortcut_section = "captiveportal-vouchers"; include("head.inc"); +if ($_POST) { + if ($_POST['vouchers']) { + $test_results = voucher_auth($_POST['vouchers'], 1); + $output = ""; + + foreach ($test_results as $result) { + if (strpos($result, " good ") || strpos($result, " granted ")) { + $output .= '<span class="text-success">' . htmlspecialchars($result) . '</span>' . '<br />'; + } else { + $output .= '<span class="text-danger">' . htmlspecialchars($result) . '</span>' . '<br />'; + } + } + print_info_box($output); + } +} + $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}"); @@ -116,21 +132,4 @@ $section->addInput(new Form_Input( $form->add($section); print($form); -if ($_POST) { - if ($_POST['vouchers']) { - $test_results = voucher_auth($_POST['vouchers'], 1); - $output = ""; - - foreach ($test_results as $result) { - if (strpos($result, " good ") || strpos($result, " granted ")) { - $output .= '<span class="text-success">' . htmlspecialchars($result) . '</span>' . '<br />'; - } else { - $output .= '<span class="text-danger">' . htmlspecialchars($result) . '</span>' . '<br />'; - } - } - - print_info_box($output); - } -} - include("foot.inc"); |