diff options
Diffstat (limited to 'www/login.php')
| -rw-r--r-- | www/login.php | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/www/login.php b/www/login.php index bfba63e..f20a568 100644 --- a/www/login.php +++ b/www/login.php @@ -3,22 +3,23 @@ /* Copyright Maximilian Möhring, 2013 Licensed under the GPL. Read LICENSE for more Information.*/ -if ($_GET["logout"] == 1) { - $logout = "<br><div style='color:red;'>Ausloggen erfolgreich</div>"; -} -if ($_GET["failure"] == 1) { - $logout = "<br><div style='color:red;'>Name oder Passwort falsch!</div>"; -} +function print_login($var){ + if ($var == LOGOUT_SUCCESSFULL) { + $logout = "<br><div style='color:red;'>Ausloggen erfolgreich</div>"; + } + if ($var == LOGIN_PASSWORD) { + $logout = "<br><div style='color:red;'>Name oder Passwort falsch!</div>"; + } -?> -<!doctype html public '-//W3C//DTD XHTML 1.0 //EN'> + echo " +<!doctype html> <html> <head> <title>Junge Gemeinde Adlershof.</title> <meta http-equiv='Content-type' content='text/html; charset=utf-8' /> - <link rel='stylesheet' type='text/css' href='hyperstyle.css' /> + <link rel='stylesheet' type='text/css' href='/static/hyperstyle.css' /> <link rel='shortcut icon' href='/favicon.ico' type='image/x-icon'> </head> @@ -35,9 +36,9 @@ if ($_GET["failure"] == 1) { <div class='ueberschrift'><p>JUNGE GEMEINDE ADLERSHOF</p></div> <div id='container' align='center'> - <?php echo $logout; ?> + $logout <br> - <form method='post' action='check.php' > + <form method='post' action='/login' > <div class='hundertfuenfzig'><p>Login:</p></div> <p><input type='text' name='username' size='40'/></p> <p><input type='password' name='password' size='40'/></p> @@ -46,8 +47,8 @@ if ($_GET["failure"] == 1) { <p><input type='submit' name='submit' value='Miau!'/></p> </form><br> - Info: You have five attempts. You will be banned for 6 hours after your login attempts run out.<br> - <a style='text-decoration:underline;' href='reset.php'>Passwort vergessen? Klick hier.</a> + Info: You have ".$_SESSION["login_attempts"]." attempts. You will be banned for six hours after your login attempts run out.<br> + <a style='text-decoration:underline;' href='/password_recover'>Passwort vergessen? Klick hier.</a> <br><br> @@ -65,6 +66,5 @@ if ($_GET["failure"] == 1) { </div> </div> </div> -</body> -</html> - +"; +} |
