diff --git a/hs20/server/www/terms.php b/hs20/server/www/terms.php index e269b3cd3..acba23ef1 100644 --- a/hs20/server/www/terms.php +++ b/hs20/server/www/terms.php @@ -2,6 +2,13 @@ require('config.php'); +function print_header() +{ + echo "\n"; + echo "
Failed to update user account.
"; - } else { - $res = $db->prepare("DELETE FROM pending_tc WHERE mac_addr=?"); - $res->execute(array($addr)); - - echo "Terms and conditions were accepted.
"; + die("Failed to update user account."); } + $res = $db->prepare("DELETE FROM pending_tc WHERE mac_addr=?"); + $res->execute(array($addr)); + $fp = fsockopen($hostapd_ctrl); if (!$fp) { die("Could not connect to hostapd(AS)"); @@ -69,8 +70,13 @@ if (!$accept) { sleep(1); } if ($ack) { + header('X-WFA-Hotspot20-Filtering: removed'); + print_header(); + echo "Terms and conditions were accepted.
\n"; + echo "Filtering disabled.
\n"; } else { + print_header(); echo "Failed to disable filtering.
\n"; } }