summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_captiveportal_mac.php
diff options
context:
space:
mode:
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