blob: 1fa65068fdccf1d037bc85754a5d582ed363135d (
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
38
39
40
41
42
43
|
<?php
define('LOGIN_SITE', true);
require_once __DIR__ . '/code/session.php';
$title="Login";
require_once __DIR__ . '/header.php';
?>
<body>
<div class="container">
<form class="form-signin" method="POST" action="/code/check_login.php">
<?php
if ( ! empty($_SESSION) ) {
if ( isset($_SESSION["login"]) && $_SESSION["login"]){
header($_SERVER["SERVER_PROTOCOL"] . " 302 Redirect");
header("Location: /");
exit;
}
if ( !is_null($_SESSION["error"]) ) {
?>
<div class="alert alert-danger" role="alert">
<?php
echo htmlentities($_SESSION["error"]);
unset($_SESSION["error"]);
?>
</div>
<?php
}
}
?>
<h2 class="form-signin-heading">Login</h2>
<label for="inputEmail" class="sr-only">Authentifizierung</label>
<input name="hash" type="text" id="auth_code" class="form-control" placeholder="Der Code aus der E-Mail-Adresse" required autofocus>
<input name="email" type="hidden" value="<?php echo htmlentities($_SESSION['user']);?>">
<span class="help-block">Du hast einen Code aus der E-Mail enthalten. Trag ihn hier ein.</span>
<button class="btn btn-lg btn-primary btn-block" type="submit">Lass mich rein</button>
</form>
</div> <!-- /container -->
<?php
require_once __DIR__ . '/footer.php';
?>
|