Commit d8af36e3 authored by Imran Hussain's avatar Imran Hussain
Browse files

don't show ugly messages anymore

parent bfa1987e
......@@ -32,14 +32,15 @@ if(isset($_REQUEST['password'])) {
}
if ( in_array($username,$bannedUsers) ) {
die("u r b&");
$banned = true;
//die("u r b&");
}
include_once("../ldap-auth.php");
$isAuthd = ldapAuth($username, $password);
if ($isAuthd == "sucs" && !$outsider) {
if ($isAuthd == "sucs" && !$outsider && !$banned) {
include_once("../doorkey.php");
//curl door
$curl = curl_init();
......@@ -47,7 +48,8 @@ if ($isAuthd == "sucs" && !$outsider) {
curl_setopt($curl,CURLOPT_RETURNTRANSFER,TRUE);
curl_exec($curl);
curl_close($curl);
exit("door unlocked! (probably)");
$success = true;
//exit("door unlocked! (probably)");
}
?>
......@@ -83,9 +85,27 @@ if ($isAuthd == "sucs" && !$outsider) {
<h4 class="card-title">❌</h4>
<p>You must be connected to GuestNET to use this service.</p>
</div>
');
} elif ($banned) {
print('
<div class="card-body">
<h4 class="card-title">🔨</h4>
<p>You are banned from the room.</p>
</div>
');
}
} elif ($success) {
print('
<div class="card-body">
<h4 class="card-title">✔️</h4>
<p>Door unlocked!</p>
</div>
');
} else {
}
else {
print('
<div class="card-body">
<h4 class="card-title">🔑</h4>
......@@ -104,7 +124,6 @@ if ($isAuthd == "sucs" && !$outsider) {
</div>
</div>
</div>
</div>
</body>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment