<?php
	require('flags.php');
	if(!isset($_COOKIE['currentLevel'])) {
		setcookie("currentLevel", "Flags_will_appear_here_when_you_complete_a_level...", time()+24*60*60); 
	}
	switch ($_COOKIE['currentLevel']) {
		case $flag_1:
			header('Location: 2.php');
			break;
		case $flag_2:
			break;
		case $flag_3:
			header('Location: 4.php');
			break;
		case $flag_4:
			header('Location: 5.php');
			break;
		case $flag_5:
			header('Location: final.php');
			break;
		default:
			header('Location: 1.php');
			break;
	}
		
?>
<!DOCTYPE html>
<html>
	<head>
		<title>Level 3</title>

		<meta charset="UTF-8">
		<meta name="author" content="Benjamin Ver">

		<link rel="stylesheet" type="text/css" href="css/jquery-ui.css">
		<link rel="stylesheet" type="text/css" href="css/normalize.css">
		<link rel="stylesheet" type="text/css" href="css/main.css">

		<script type="text/javascript" src="script/jquery.js"></script>
		<script type="text/javascript" src="script/jquery-ui.js"></script>
		<script type="text/javascript" src="script/main.js"></script>
		<script type="text/javascript" src="script/1.js"></script>
	</head>
	<body>
		<div class="front">
			<div class="lock intel">
				<img src="img/lock_locked.jpg">
			</div>
			<table class="unlockpad intel">
				<tr>
					<td class='formInfo'>Username:</td>
					<td><input type="text" name="user" id="inp_user"></td>
				</tr>
				<tr>
					<td class='formInfo'>Password:</td>
					<td><input type="password" name="passw" id="inp_passw"></td>
				</tr>
				<tr>
					<td colspan='2'>
						<button id='submit'>Give it a shot...</button>
					</td>
				</tr>
			</table>
		</div>

		<div class="half left"></div>
		<div class="half right"></div>

	</body>
</html>