From 3a7ade401b3aff5375b98594eec344ed6766321a Mon Sep 17 00:00:00 2001 From: oweissbarth Date: Sun, 16 Mar 2014 18:44:49 +0100 Subject: Added print_login --- www/login.php | 61 +++++++++++++++++++++++++++++++---------------------------- 1 file changed, 32 insertions(+), 29 deletions(-) (limited to 'www') diff --git a/www/login.php b/www/login.php index 3207703..a9f6f70 100755 --- a/www/login.php +++ b/www/login.php @@ -3,52 +3,55 @@ Displays the login page and possible errors. Users can enter their username and password to login. TODO recover Password It has already been checked that the user isn't already logged in. - $_GET["reason"] can have the following values: + $case can have the following values: - failure: Specifies that the username and password didn't match. The user is not logged in. + LOGIN_PASSWORD: Specifies that the username and password didn't match. The user is not logged in. - database: Specifies that the request could not be fullfilled due to a database error. The user is not logged in. + LOGIN_DATABASE: Specifies that the request could not be fullfilled due to a database error. The user is not logged in. - succuss: Specifies that the request was successfull. TODO should probably redirect to user root. + LOGOUT_SUCCESSFULL: Specifies that user has been logged out. $_GET["username"] contains the username if a prior attempt to login wasn't successfull. ================================================================================================================================================== */ -?> - +function print_login($case){ + + include("static/header.html"); - + $username = isset($_POST['username']) ? $_POST['username'] : ""; -