diff options
author | Ermal <eri@pfsense.org> | 2010-06-24 22:30:49 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-06-24 22:30:49 +0000 |
commit | cf7ac033abed3fb70cf33839f266a3471f38dbc7 (patch) | |
tree | a4150e0c4ef4710b0e32e9f718e47f45edd867a5 /usr/local | |
parent | 56c9163122699bcf9e2487af0d0df13df5421d20 (diff) | |
download | pfsense-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')
-rwxr-xr-x | usr/local/www/services_captiveportal_mac.php | 10 |
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; } |