aboutsummaryrefslogtreecommitdiff
path: root/public/login.php
blob: 7b1a2544108d419d36bcae62d77802f004ff8385 (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
<!DOCTYPE html>
<?php include "../lib/login.php" ?>
<?php if_logged_in(true, "/") ?>
<?php
do {
	if ($_SERVER['REQUEST_METHOD'] !== 'POST') break;
	$username = $_POST['username'];
	$password = $_POST['password'];
	if (!check_login($username, $password)) break;
	cookie_redir($_POST['username'], $_POST['password']);
} while (false);
?>
<html>
<head>
	<?php include 'head.php' ?>
	<title>login</title>
	<link rel='stylesheet' type='text/css' media='screen' href='login.css'>
</head>
<body>
	<?php include 'navbar.php' ?>
	<div class="main limwidth">
		<h1>Inloggen</h1>
		<div class="modal">
			<form action="/login.php" method="post">
				<label for="username">Gebruikersnaam</label>
				<input id="username" name="username" type="text" placeholder="gebruikersnaam" class="buttonstyle" autocomplete="username" autofocus>
				<label for="password">Wachtwoord</label>
				<input id="password" name="password" type="password" placeholder="wachtwoord" class="buttonstyle" autocomplete="current-password">
				<input type="submit" value="Inloggen" class="button filled">
			</form>
			<span class="register">Of <a href="/register.php">een nieuw account maken</a></span>
		</div>
	</div>
	<?php include 'footer.php' ?>
</body>
</html>