summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_captiveportal_mac.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-06-24 22:30:49 +0000
committerErmal <eri@pfsense.org>2010-06-24 22:30:49 +0000
commitcf7ac033abed3fb70cf33839f266a3471f38dbc7 (patch)
treea4150e0c4ef4710b0e32e9f718e47f45edd867a5 /usr/local/www/services_captiveportal_mac.php
parent56c9163122699bcf9e2487af0d0df13df5421d20 (diff)
downloadpfsense-cf7ac033abed3fb70cf33839f266a3471f38dbc7.zip
pfsense-cf7ac033abed3fb70cf33839f266a3471f38dbc7.tar.gz
Provide some error messages when posting from a script so consumers can have a clue at what happened.
Diffstat (limited to 'usr/local/www/services_captiveportal_mac.php')
-rwxr-xr-xusr/local/www/services_captiveportal_mac.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr/local/www/services_captiveportal_mac.php b/usr/local/www/services_captiveportal_mac.php
index 828c9e5..38989a5 100755
--- a/usr/local/www/services_captiveportal_mac.php
+++ b/usr/local/www/services_captiveportal_mac.php
@@ -68,12 +68,16 @@ if ($_POST) {
}
if ($_POST['postafterlogin']) {
- if (!is_array($a_passthrumacs))
+ if (!is_array($a_passthrumacs)) {
+ echo "No entry exists yet!\n";
exit;
+ }
if ($_POST['username']) {
$mac = captiveportal_passthrumac_findbyname($_POST['username']);
if (!empty($mac))
$_POST['delmac'] = $mac['mac'];
+ else
+ echo "No entry exists for this username: {$_POST['username']}\n";
}
if ($_POST['delmac']) {
$found = false;
@@ -91,7 +95,9 @@ if ($_POST) {
}
unset($a_passthrumacs[$idx]);
write_config();
- }
+ echo "The entry was sucessfully deleted\n";
+ } else
+ echo "No entry exists for this mac address: {$_POST['delmac']}\n";
}
exit;
}
OpenPOWER on IntegriCloud