<?php
include_once 'includes/db_connect.php';
include_once 'includes/functions.php';
 
sec_session_start();
 
if (login_check($mysqli) == true) {
	
    $logged = 'in';
} else {
    $logged = 'out';
}
?>
<!DOCTYPE html>
<html>
    <head>
        <title>Juniors Wunschliste: Login</title>
        <link rel="stylesheet" href="css/style.css" />
        <script type="text/JavaScript" src="js/sha512.js"></script> 
        <script type="text/JavaScript" src="js/forms.js"></script> 
    </head>
    <body style="background-color:#d1effc">
        <?php
        if (isset($_GET['error'])) {
            echo '<p class="error">Error Logging In!</p>';
        }
        ?> 
        <form action="includes/process_login.php" method="post" name="login_form" data-ajax="false"> 
		<div id="loginDiv" class="logindiv" style="">
			<table>
				<tr><td>Email: </td><td>&nbsp;</td><td><input class="login-input" style="width:150px;" type="text" name="email" /></td></tr>
				<tr><td>Passwort: </td><td>&nbsp;</td><td><input class="login-input" style="width:150px;" type="password" name="password" id="password" /></td></tr>
				<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
				<tr><td>&nbsp;</td><td>&nbsp;</td><td style="text-align:right;"><input class='login-button' type="button" value="Login" onclick="formhash(this.form, this.form.password);" /></td></tr>	
			</table>
				<br>
				<p style="float:right;">Oder  <strong><a href="register.php">registrieren</a></strong>&nbsp;&nbsp;&nbsp;</p>
				
				
		</div>
		<br>
		<br>
		<br><br>
		<br>
		<div style="margin-left:auto;margin-right:auto;width:565px;font-size:12px;">
		<p>Diese Website ist nicht f&uuml;r Smartphones optimiert und sollte daher mit Laptop oder PC besucht werden! ;)</p>
		</div>
        </form>
    </body>
</html>
