-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanage.php
61 lines (61 loc) · 2.25 KB
/
manage.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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<?php $title = 'Supervisor Management Quiz View'; include_once './header.inc' ?>
<body>
<?php session_start();?>
<?php $select = 6; include_once './menu.inc' ?>
<div class="manage-flex-content">
<div class="manage-menu">
<form method="post" action="manage.php">
<button class="manage-hide" type="submit" name="action" value="5"></button>
<button type="submit" name="action" value="1">List All attempts</button>
<button type="submit" name="action" value="2">List half attempts</button>
<button type="submit" name="action" value="3">Delete attempts</button>
<button type="submit" name="action" value="4">Manage Score</button>
<hr class="manage-menu-hr" />
<?php
if (!isset($_SESSION["username"])) {
print "
<div class='manage-id-field'>
<label for='student_id'>
<input name='username' type='text' placeholder='Username' />
</label>
<label for='student_name'>
<input name='password' type='password' placeholder='Password' />
</label>
</div>";
print "<button type='submit' name='action' value='5'>Login</button>";
} else {
print "
<div class='manage-id-field'>
<p>".$_SESSION["username"]."</p>
</div>";
print "<button type='submit' name='action' value='6'>Logout</button>";
}
if (isset($_SESSION["deafult_login_msg"])) {
print "
<div class='manage-id-field'>
<p>Please change default login in my SQL.</p>
<br>
<p>Username: admin</p>
<p>Password: pass</p>
</div>";
}
?>
</form>
<div style="height: 500px;"></div>
</div>
<div class="manage-content">
<section>
<table>
<?php
$main_page = true;
include_once './manage_processing.php';
?>
</table>
</section>
</div>
</div>
<?php include './footer.inc'; ?>
</body>
</html>