/
index.php
128 lines (120 loc) · 4.82 KB
/
index.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
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!-- View students (index.php) for basic Teacher account -->
<?php include "../../../../base.php"; ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title> Gonzaga Small Talk</title>
<!-- Bootstrap -->
<link href="/css/bootstrap.css" rel="stylesheet">
<link href="/css/simple-sidebar.css" rel="stylesheet">
<link rel="stylesheet/less" type="text/css" href="/datepicker.less" />
<link href="/css/SidebarPractice.css" rel="stylesheet">
<link href="/FlatUI/css/theme.css" rel="stylesheet" media="screen">
<!-- Including Header -->
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="/js/SidebarPractice.js"></script>
<script>
$(function(){
$("#header").load("/header.php");
});
$(function(){
$("#sidebar").load("/sidebar.php");
});
</script>
</head>
<?php
if(!empty($_SESSION['LoggedIn']) && !empty($_SESSION['Username']))
{
if($_SESSION['Role'] != 'Teacher')
{
?>
<p>You do not have permission to view this page. Redirecting in 5 seconds</p>
<p>Click <a href="/">here</a> if you don't want to wait</p>
<meta http-equiv='refresh' content='5;/' />
<?php
}
else
{
?>
<body>
<div id="wrapper">
<div id = "sidebar"></div>
<div id="page-content-wrapper">
<button type="button" class="hamburger is-closed" data-toggle="offcanvas">
<span class="hamb-top"></span>
<span class="hamb-middle"></span>
<span class="hamb-bottom"></span>
</button>
<div class="container-fluid">
<div class="row">
<div class="col-md-8">
<div class="panel panel-primary">
<div class="panel-heading">
<h4>Course Details</h4>
</div>
<div class="panel-body">
<p>Course Name:</p>
<p>Institution:</p>
<p>Session:</p>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-8">
<div class="panel panel-primary">
<div class="panel-heading">
<h4>Students</h4>
</div>
<div class="panel-body">
<table class="table table-hover">
<thead>
<tr>
<th>Name</th>
<th>Worksheets Completed</th>
<th>Go To</th>
</tr>
</thead>
<tbody>
<tr>
<td>Stu Dent</td>
<td>4/6</td>
<td><a href="ViewStudentProfile/?sid=">Review Student</a></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="/js/bootstrap.min.js"></script>
<script>
$("#menu-toggle").click(function(e) {
e.preventDefault();
$("#wrapper").toggleClass("toggled");
});
</script>
</body>
<?php
}
}
else
{
?>
<p>Oops! You are not logged in. Redirecting to log-in in 5 seconds</p>
<p>Click <a href="/">here</a> if you don't want to wait</p>
<meta http-equiv='refresh' content='5;/' />
<?php
}
?>
</html>