<?php
	include("index_top_noscript.html");
?>
	
			<script type="text/javascript" src="sha1.js"></script>
			<script type="text/javascript" src="chal_res.js"></script>
			<script type="text/javascript">
				window.onload = setFocus;
				
				function setFocus()
				{
					document.forms[0].username.focus();		// focus op gebruikersnaam
				}
			</script>

			<h3 id="titel" class="centreer">MCH Support</h3>
			
			<div id="login" class="centreer">
				<h3>Inloggen</h3>

				<form action="index.phtml" method="post" name="login_form" onsubmit="doChallengeResponse()">
					<p>
						Gebruiker:  <input type="text" name="username" />
						Wachtwoord: <input type="password" name="password" />
		
<?php
	header("Cache-Control: no-cache, must-revalidate");

	session_start();

	$challenge = sha1(uniqid(rand(), true));

	$_SESSION['challenge'] = $challenge;
	$_SESSION['timestamp'] = time() + 300;
	$_SESSION['auth'] = false;
 	$_SESSION['login'] = true;

	print("\t\t\t\t\t\t<input type=\"hidden\" name=\"challenge\" value=\"$challenge\" />\n");
?>

						<input type="hidden" name="response" value="" />
					</p>
					<p><input id="button" type="submit" value="Inloggen" /></p>
				</form>
			</div>
<?php
	include("index_bottom.html");
?>
