-
Notifications
You must be signed in to change notification settings - Fork 9
/
completetest.php
84 lines (71 loc) · 2.65 KB
/
completetest.php
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
/*
***************************************************
*** Online Examination System ***
*** Title: Test Completion Acknowledgement ***
***************************************************
*/
error_reporting(0);
session_start();
include_once 'oesdb.php';
if(!isset($_SESSION['stdname'])) {
$_GLOBALS['message']="Session Timeout.Click here to <a href=\"index.php\">Re-LogIn</a>";
}
else if(isset($_REQUEST['logout']))
{
//Log out and redirect login page
unset($_SESSION['stdname']);
header('Location: index.php');
}
else if(isset($_REQUEST['dashboard'])){
//redirect to dashboard
header('Location: studentdwelcome.php');
}
if(isset($_SESSION['starttime']))
{
unset($_SESSION['starttime']);
unset($_SESSION['endtime']);
unset($_SESSION['tqn']);
unset($_SESSION['qn']);
unset($_SESSION['duration']);
executeQuery("update studenttest set status='over' where testid=".$_SESSION['testid']." and stdid=".$_SESSION['stdid'].";");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>OES-Test Acknowledgement</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="oes.css"/>
<script type="text/javascript" src="validate.js" ></script>
</head>
<body >
<?php
if($_GLOBALS['message']) {
echo "<div class=\"message\">".$_GLOBALS['message']."</div>";
}
?>
<div id="container">
<div class="header"><h3 class="headtext"> Online Examination System </h3><h4 style="color:#ffffff;text-align:center;margin:0 0 5px 5px;">
</div>
<form id="editprofile" action="editprofile.php" method="post">
<div class="menubar">
<ul id="menu">
<?php if(isset($_SESSION['stdname'])) {
// Navigations
?>
<li><input type="submit" value="LogOut" name="logout" class="subbtn" title="Log Out"/></li>
<li><input type="submit" value="DashBoard" name="dashboard" class="subbtn" title="Dash Board"/></li>
</ul>
</div>
<div class="page">
<h3 style="color:#0000cc;text-align:center;">Your answers are Successfully Submitted. To view the Results <b><a href="viewresult.php">Click Here</a></b> </h3>
<?php
}
?>
</div>
</form>
</div>
</body>
</html>