<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Přihlášení do systému</title>
<script src="js/sha1-min.js"></script>
<style type="text/css">
body
{
	margin: 0px;
	padding: 0px;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	color: #000000;
	background-color: #e0ebf6;
}
input, select, textarea
{
	font-family:Arial, Helvetica, sans-serif;
	background-color:#eaeaea;
	color:#03F;
	border-color:#03F;
	border-style:solid;
	border-width:1px;
	margin:5px;
	border-radius:5px;
	-moz-border-radius:5px;
	padding:3px;
}

#login
{
	width:450px;
	margin-left:auto;
	margin-right:auto;
	margin-top:50px;
	border-color:#03F;
	border-width:2px;
	border-style:solid;
	background-color: #5b6ff7;
	border-radius:5px;
	-moz-border-radius:5px;
  text-align:center;
}

#submit{
font-weight: bold;
color: blue;

}
#message{
font-weight: bold;
color:red;
}

</style>
<script>



function EncryptData(sender)
{       
    var timestamp = sender.timestamp.value;
    var password = sender.password.value;
    var salt = sender.salt.value;
    var passha = hex_hmac_sha1(password,salt);
    sender.passhash.value = hex_hmac_sha1(passha, timestamp);
    sender.password.value="";
    return true;
}
</script>
</head>

<body>
<div id="login">
<h1>Přístupový registrační systém</h1>
<h2>Přihlášení uživatele</h2>
<p>
	<form action="login/authenticate.php" method="POST" onsubmit="return EncryptData(this)">
    	<input type="text" name="username" placeholder="Zadejte jméno..."><br />
		  <input type="text" name="usurname" placeholder="Také příjmení..."><br />
      <input type="hidden" name="salt" value = "prstsystem">
      <input type="hidden" name="timestamp" value = <?php echo time(); ?> >
      <input type="hidden" name="passhash" value = "">     
      <input type="password" name="password" placeholder="Heslo"><br />
      <input type="submit" id="submit" value="Login" >
    </form>
    <span id="message"><?php if(isset($_GET["feedback"])){echo $_GET["feedback"];} ?></span>

</p>
</div>
</body>
</html>


