-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
277 lines (234 loc) · 8.12 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
<?php
session_start();
// Check if user is logged in
if (!isset($_SESSION['studentid'])) {
header("Location: ../login.php");
exit();
}
// Database connection
require '../db_connection.php'; // Adjust the path as per your file structure
// Fetch student details
$studentid = $_SESSION['studentid'];
$stmt = $conn->prepare("SELECT studentid, fullname, level_of_study, institute, programme, semester FROM student WHERE studentid = ?");
$stmt->bind_param("s", $studentid);
$stmt->execute();
$stmt->bind_result($student_id, $fullname, $level_of_study, $institute, $programme, $semester);
$stmt->fetch();
$stmt->close();
// Fetch registered courses for the student
$sql = "SELECT c.course_code, c.course_name, c.credit_hour, sc.group, sc.lab_group
FROM student_course sc
INNER JOIN course c ON sc.course_id = c.id
WHERE sc.studentid = ?";
$stmt_courses = $conn->prepare($sql);
$stmt_courses->bind_param("s", $studentid);
$stmt_courses->execute();
$stmt_courses->bind_result($course_code, $course_name, $credit_hour, $group, $lab_group);
$registered_courses = [];
$total_credit_hours = 0;
// Fetching all registered courses
while ($stmt_courses->fetch()) {
$registered_courses[] = [$course_code, $course_name, $credit_hour, $group, $lab_group];
$total_credit_hours += $credit_hour;
}
$stmt_courses->close();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>UniKL Student Portal</title>
<link rel="apple-touch-icon" sizes="144x144" href="apple-touch-icon-ipad-retina.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="apple-touch-icon-iphone-retina.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="apple-touch-icon-ipad.png"/>
<link rel="apple-touch-icon" sizes="57x57" href="apple-touch-icon-iphone.png"/>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>
<!-- bootstrap -->
<link href="css/bootstrap/bootstrap.css" rel="stylesheet"/>
<link rel="stylesheet" href="css/font-awesome-4.0.3/css/font-awesome.min.css">
<link rel="stylesheet" href="css/jquery-ui.css"/>
<link rel="stylesheet" type="text/css" href="css/toastr.css">
<link href="css/style.css" rel="stylesheet" type="text/css"/>
</head>
<?php include 'includes/header.html';?>
<div id="profile">
<div class="wrapper20">
<div class="userInfo">
<div class="userImg">
<img src="images/user/<?php echo htmlspecialchars($student_id); ?>.jpg" rel="user">
</div>
<div class="userTxt">
<span class="fullname"><?php echo htmlspecialchars($fullname); ?></span>
<i class="fa fa-chevron-right"></i><br>
<span class="username"><?php echo htmlspecialchars($student_id); ?></span>
</div>
</div>
<!-- /userInfo -->
</div>
</div>
<!-- /profile -->
</div>
<!-- /top -->
<div id="sidebar">
<ul class="mainNav">
<li class="active">
<a href="#">
<i class="fa fa-home"></i><br>Dashboard</a>
</li>
<li>
<a href="profile.php">
<i class="fa fa-user"></i><br>My Profile</a>
</li>
<li>
<a href="mycourse.php">
<i class="fa fa-book"></i><br>My Course</a>
</li>
<li>
<a href="meeting.php">
<i class="fa fa-calendar"></i><br>Meeting</a>
<span class="badge badge-mNav">4</span>
</li>
<li>
<a href="ghocs.php">
<i class="fa fa-trophy"></i><br>GHOCs</a>
</li>
</ul>
</div>
<!-- /sidebar -->
<div id="main" class="clearfix">
<div class="topTabs">
<div id="topTabs-container-home">
<div class="topTabs-header clearfix">
<div class="secInfo sec-dashboard">
<h1 class="secTitle">Dashboard</h1>
<span class="secExtra">Welcome</span>
</div>
<!-- /SecInfo -->
<ul class="etabs tabs">
<li class="tab">
<a href="#tab3">
<span class="to-hide">
<i class="fa fa-calendar"></i><br>Calendar
</span>
<i class="fa icon-hidden fa-calendar ttip" data-ttip="Calendar"></i>
</a>
</li>
</ul>
<!-- /tabs -->
</div>
<!-- /topTabs-header -->
<div class="topTabsContent">
<div id="tab3">
<div class="small-calendar cal-tab"></div>
</div>
</div>
<!-- /topTabContent -->
</div>
<!-- /tab-container -->
<!-- </div> -->
</div>
<!-- /topTabs -->
<div class="divider"></div>
<div class="fluid">
<div class="widget leftcontent grid12">
<div class="widget-header">
<div class="widget-controls">
</div>
</div>
<div id="statsTabs-container">
<ul class="etabs stats-tabs">
<li class="tab">
<a href="#stat-tab3">Course Overview</a>
</li>
</ul>
<div class="statsTabsContent">
<div id="stat-tab3">
</div>
</div>
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<img src="images/softwaredesignbanner.png" alt="SDI">
</div>
<div class="item">
<img src="images/artificial intelligence banner.png" alt="AI">
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousel" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="sr-only">Next</span>
</a>
</div>
<div class="recentCourse">
<div class="courseContent">
<p>Recently Accessed Course</p>
</div>
<div class="imageContainer">
<img src="images/artificial intelligence.png" alt="">
</div>
<div class="textBelowImage">
<p>Artificial Intelligence</p>
<p>ISB332233</p>
</div>
</div>
<div class="divider"></div>
</div>
<!-- /widget -->
</div>
</div>
<!-- /main -->
</div>
<!-- /wrapper -->
<div class="clearfix"></div>
<div id="footer">
UniKL 2013 © Made by Haziq Aziz</a>
</div>
<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/jquery.sparkline.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/jquery.easytabs.min.js"></script>
<script type="text/javascript" src="js/excanvas.min.js"></script>
<script type="text/javascript" src="js/jquery.flot.js"></script>
<script type="text/javascript" src="js/jquery.flot.resize.js"></script>
<script type="text/javascript" src="js/toastr.min.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<script type="text/javascript" src="js/charts.js"></script>
<script type="text/javascript">
toastr.options = {
"closeButton": true,
"debug": false,
"positionClass": "toast-top-right",
"onclick": null,
"showDuration": "300",
"hideDuration": "1000",
"timeOut": "5000",
"extendedTimeOut": "1000",
"showEasing": "swing",
"hideEasing": "linear",
"showMethod": "fadeIn",
"hideMethod": "fadeOut"
}
setTimeout(function () {
toastr.info('<span style="color:#333;">Welcome to UniKL! The new student portal look.</span>');
}, 2000);
setTimeout(function () {
toastr.warning('<span style="color:#333;">You could navigate the different sections to discover it...</span>');
}, 4500);
</script>
</body>
</html>