get_banned() ) { echo "You got banned for 5 mins"; return; } if ( $obj_user->get_logged_in() ) { $msg = "You already are logged in."; } else { if ( isset ( $_POST['username'], $_POST['response'] ) ){ $h = $obj_user->log_in($_POST['username'], $_POST['response'] ); switch ( $h ) { case LOGIN_SESSION_EXPIRED: $msg = "Session expired"; break; case LOGIN_NO_USER: $msg = "No such user"; break; case LOGIN_INCORRECT_PWD: $msg = "Incorrect password"; break; case LOGIN_SUCCESS: $msg = "You are now logged in"; break; case LOGIN_SECURITY_BAN: $msg = "You got banned for 5 mins"; return; break; } } } // Nieuwe challenge nodig voor login $_SESSION['challenge'] = sha1(pack("H*", sha1(mt_rand()))); ?> Login

Username:

Password:

Click here for a free account