-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathAdminHome.php
More file actions
110 lines (86 loc) · 2.14 KB
/
AdminHome.php
File metadata and controls
110 lines (86 loc) · 2.14 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
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?php
session_start();
if($_SESSION['myusername'] == "" | $_SESSION['myusername'] == null)
{
header("location: index.php");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Online Examination</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php
session_start();
?>
<div class="style3"></div><div class="style_2"><span class="style3">
<a href="#" title="Online Exam"><strong>For Adroid</strong></a></span>
</div>
<div id="wrap">
<div id="topbar">
<h1 id="sitename"><a href="#">Online Examination </a></h1>
<div id="menus">
<ul id="topmenu">
<li class="active"><a href="#">Home</a>
</li>
<li><a href="createmultipleusers.html">Create Users</a>
</li>
<li><a href="createTest.html">Create Test</a>
</li>
<li><a href="UploadQuestions.html">Upload Questions</a>
</li>
</ul>
</div>
</div>
<div id="header">
</div>
<div id="content">
<div id="mainpage">
<h2>Welcome <?php echo $_SESSION['myusername'] ?></h2>
<p>
<b>Test Details</b>
<?php
require_once('dbconnect.php');
$user = $_SESSION['myusername'];
$result = mysqli_query($con,"SELECT * FROM test where created_by='$user'");
echo "<table border='1'><tr><th>test ID</th><th>Test name</th><th>questions</th><th>Result</th></tr>";
while($row = mysqli_fetch_array($result))
{
$id = $row[0];
$name = $row[1];
$noq = $row[2];
echo "<tr><td>$id</td><td>$name</td><td>$noq</td><td><a href='viewresult.php?key=$id'> View Result </a></td></tr>";
}
echo "</table>";
?>
</p>
</div>
<div id="sidebar">
</div>
<div id="sidebarcontents">
<ul id="menu">
<li>
<h2>Admin Controll</h2>
</li>
<li>
<ul><li><a href="createmultipleusers.html">Create User</a></li>
<li><a href="createTest.html">Create Test</a></li>
<li><a href="UploadQuestions.html">Upload Questions</a></li>
<li><a href="logout.php">Logout</a></li>
</ul>
</li>
</ul>
</div>
<div id="sidebarbottom"></div>
</div>
<div class="clear"></div>
</div>
</div>
<div id="footer">
<p>Copyright © 2013 | Online Examination For Android Devices.</p>
</div>
</body>
</html>