summaryrefslogtreecommitdiff
path: root/intern.gospeladlershof.de/login.php
blob: aba1467f121a8d9fb235bf63dcf4d8e461e737c6 (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
44
45
46
47
48
<?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/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">Bitte melde dich an</h2>
        <label for="inputEmail" class="sr-only">E-Mail Adresse</label>
        <input name="email" type="text" id="inputEmail" class="form-control" placeholder="E-Mail-Adresse" required autofocus>
        <label for="inputPassword" class="sr-only">Passwort</label>
        <input name="password" type="password" id="inputPassword" class="form-control" placeholder="Passwort" required>
        <!--div class="checkbox">
          <label>
            <input type="checkbox" value="remember-me"> Bleib angemeldet 
          </label>
        </div-->
        <button class="btn btn-lg btn-primary btn-block" type="submit">Lass mich rein</button>
      </form>

    </div> <!-- /container -->
<?php
require_once __DIR__ . '/footer.php';
?>