-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlevel1.php
More file actions
executable file
·48 lines (44 loc) · 1.33 KB
/
level1.php
File metadata and controls
executable file
·48 lines (44 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
require_once("models/config.php");
//Checks if user is logged in else redirects to the login page
if(!isUserLoggedIn()) { header("Location: login.php"); die(); }
$pass=$_REQUEST['password'];//on submit button store the password in a variable
if($pass==NULL||$pass!='webserver') //check if password entered is correct,if correct go to the else block.
{
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Level 1</title>
<link href="cakestyle.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="wrapper">
<div id="content">
<div id="left-nav">
<?php include("layout_inc/left-nav.php"); ?>
<div class="clear"></div>
</div>
<div id="main">
<div id="que">
<img src="level1.jpg">
<p>First what?</d>
<form method="post" action="level1.php" id="form"><?//submit the form to the same page?>
<p>password:<input type="text" name="password"></p>
<input type="submit" name="submit" value="submit"></form>
</div>
</div>
</div>
</div>
<
</body>
</html>
<?php
}
else {
/* if password entered is correct then update score and redirect to next question */
updatescore(0);
header("location:level2.php");
}
?>