From d2d4c23eb88975f2eece5a4b76c2ae3b9f8f8a44 Mon Sep 17 00:00:00 2001 From: k-paulius Date: Sun, 14 Feb 2016 21:48:13 -0600 Subject: Move result message to the top of the page. --- src/usr/local/www/status_captiveportal_test.php | 33 ++++++++++++------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'src/usr/local/www/status_captiveportal_test.php') 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 .= '' . htmlspecialchars($result) . '' . '
'; + } else { + $output .= '' . htmlspecialchars($result) . '' . '
'; + } + } + 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 .= '' . htmlspecialchars($result) . '' . '
'; - } else { - $output .= '' . htmlspecialchars($result) . '' . '
'; - } - } - - print_info_box($output); - } -} - include("foot.inc"); -- cgit v1.1