summaryrefslogtreecommitdiff
path: root/www/login.php
blob: 91ef46ea313cb4138b7943c7c1ee43134c62be41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?
/*
	$_GET Paramter für Oli von Max:

	--LOGIN--

	$_GET["username"]: 	derjenige, der sich ein-/ausloggt (wird immer mitgegeben)
	$_GET["reason"]:	failure 	wenn das Passwort aus der Datenbank nicht übereinstimmt mit dem eingegeben
				database	wenn aus irgendwelchen Gründen nicht in die Datenbank geschrieben werden kann aka. transaction failed
				logout		nachdem logout erfolgreich war (man wird auf /login wieder zurück geleitet)

*/
?>

<?php include("static/header.html");?>
	
	<link rel="stylesheet" type="text/css" href="static/login.css">
	
	<div class="login-area">
		<h1 class="login-area"> Log in </h1>
		<?php if(isset($_GET['username'])){
			echo '<h1 id="login-error"> Invalid username or password </h1>';
		}?>
		<form id="login-form" method='post' action='/login'>
			<?php if(isset($_GET['username'])){
				echo '<input type="text" placeholder="username" name="username" id="username-input" class="login-input" value="'.$_GET['username'].'">';
			}else{
				echo '<input type="text" placeholder="username" name="username" id="username-input" class="login-input">';
			}?>
			<input type="password" placeholder="password" name="password" id="password-input" class="login-input">
			
			<input type="submit" name="login" id="button-input" class="login-input" value="login">
			<a href="recover-password.php" id="recover-password-link">recover password</a>
		</form>
	</div>

<?php include("static/footer.html");?>