diff options
Diffstat (limited to 'intern.gospeladlershof.de/check_login.php')
| -rw-r--r-- | intern.gospeladlershof.de/check_login.php | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/intern.gospeladlershof.de/check_login.php b/intern.gospeladlershof.de/check_login.php new file mode 100644 index 0000000..e812a99 --- /dev/null +++ b/intern.gospeladlershof.de/check_login.php @@ -0,0 +1,42 @@ +<?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="text" type="text" id="auth_code" class="form-control" placeholder="Der Code aus der E-Mail-Adresse" required autofocus> + <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'; +?> |
