-
Notifications
You must be signed in to change notification settings - Fork 3
/
studentmyprofile.php
343 lines (235 loc) · 7.43 KB
/
studentmyprofile.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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
<!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>Greendale College</title>
<link rel="icon" type="image/png" href="photos/header.png">
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<script src="https://kit.fontawesome.com/a076d05399.js"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
ul {
list-style-type: none;
margin: 0;
padding: 0;
width: 210px;
background-color: #0b1f5f;
}
li a {
display: block;
color: white;
padding: 8px 16px;
text-decoration: none;
}
li a.active {
background-color:blue;
color: white;
}
li a:hover:not(.active) {
background-color:skyblue;
color: white;
}
* {box-sizing: border-box;}
body {font-family: Verdana, sans-serif;}
.mySlides {display: none;}
img {vertical-align: middle;}
/* Slideshow container */
.slideshow-container {
max-width: 1000px;
margin: auto;
}
/* Fading animation */
.fade {
-webkit-animation-name: fade;
-webkit-animation-duration: 5.5s;
animation-name: fade;
animation-duration: 5.5s;
}
@-webkit-keyframes fade {
from {opacity: .4}
to {opacity: 1}
}
@keyframes fade {
from {opacity: .4}
to {opacity: 1}
}
/* On smaller screens, decrease text size */
@media only screen and (max-width: 300px) {
.text {font-size: 11px}
}
</style>
</head>
<body style="background-color: grey; margin-top: -20px">
<?php
session_start();
include "DBconnection.php";
if(!isset($_SESSION['id']))
{
header("location:loginindex.php");
}
else
{
$id = $_SESSION['id'];
$bid = $_SESSION['bid'];
$result = mysqli_query($conn,"SELECT * FROM students WHERE student_id='" . $id."'");
$row = mysqli_fetch_array($result);
if($row >0)
{
$fname =$row['student_fname'];
$lname =$row['student_lname'];
$semail =$row['email'];
$sbirthday =$row['birthday'];
$scontactnumber =$row['contactnumber'];
$spassword =$row['password'];
$spic =$row['picture'];
$sNIC =$row['NIC'];
$id = $_SESSION['id'];
$bid = $_SESSION['bid'];
$result = mysqli_query($conn,"SELECT * FROM student_batches WHERE batch_id ='" . $bid."'");
$row = mysqli_fetch_array($result);
}
if($row >0)
{
$batch_id =$row['batch_id'];
$batch_name =$row['batch_name'];
$batch_code =$row['batch_code'];
$course_id =$row['course_id'];
$assignment_id =$row['assignment_id'];
$bid = $_SESSION['bid'];
$result = mysqli_query($conn,"SELECT * FROM course_details WHERE course_id ='" . $course_id."'");
$row = mysqli_fetch_array($result);
}
if($row >0)
{
$course_id =$row['course_id'];
$course_name =$row['course_name'];
$module_1 =$row['module_1'];
$module_2 =$row['module_2'];
$module_3 =$row['module_3'];
$module_4 =$row['module_4'];
$module_5 =$row['module_5'];
$module_6 =$row['module_6'];
$module_7 =$row['module_7'];
$module_8 =$row['module_8'];
$module_9 =$row['module_9'];
$module_10 =$row['module_10'];
$bid = $_SESSION['bid'];
}
}
?>
<div class="div_content_admin">
<div class="header_admin">
<div style="margin-right:10px;vertical-align:bottom;">
<table align="right" width="450">
<tr><td>
<div align="right" style="font-size:24px;padding-top:23px; ">
<a href="studentindex.php" style="color: aliceblue">Home</a>
<a href="userLogout.php" style="color:blue">Logout</a>
<hr>
<div align="right" style="font-size:20px; padding: 10px; color: aliceblue">
Student - <?php echo $fname;?>
<img class="img-rounded" style="border-radius: 50%" width="50px" height="50px" src="studentImage/<?php echo $spic;?>">
</div>
</td></tr>
</table>
</div>
</div>
<div class="div_header_title_admin">
<div align="left" style="font-size:20px; padding: 10px; color: aliceblue">
Welcome
</div>
</div>
<div class="mainframe" style="background-color:#0b1f5f">
<div class="section1_admin" >
<ul>
<li><div><a href="studentmyprofile.php">My Profile</a></div></li>
<li><div><a href="studentresultsprediction.php"> Result Predictions</a></div></li>
<li><div><a href="studentviewpayments.php">My Payments</a></div></li>
<li><div><a href="studentviewresults.php">My Results</a></div></li>
<li><div><a href="studentuploadassignments.php">Upload Assignments</a></div></li>
<li><div><a href="studentdownloadassignments.php">Download Assignments</a></div></li>
</ul>
</ul>
</div>
<div class="section2_admin" align="center">
<h1 align="center" >Profile Details</h1>
<table class="table table-bordered" align="center" style="margin-top: -100px; color: black; font-size: 14px; border:10px ">
<thead>
<tr>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<th scope="row" > <img width="150px" height="150px" src="studentImage/<?php echo $spic;?>"></th>
</tr>
<tr>
<th scope="row">Student ID</th>
<td ><?php echo $batch_code; ?>/<?php echo $id; ?></td>
<br>
</tr>
<tr>
<th scope="row">Course</th>
<td ><?php echo $course_name; ?></td>
<br>
</tr>
<tr>
<th scope="row">Batch</th>
<td ><?php echo $batch_name; ?>(<?php echo $batch_code; ?>)</td>
<br>
</tr>
<tr>
<th scope="row">First Name</th>
<td><?php echo $_SESSION['name'];?></td>
</tr>
<tr>
<th scope="row">Last Name</th>
<td><?php echo $lname; ?></td>
</tr>
<tr>
<th scope="row">Email</th>
<td><?php echo $semail; ?></td>
</tr>
<tr>
<th scope="row">Birthday</th>
<td ><?php echo $sbirthday; ?></td>
<br>
</tr>
<tr>
<th scope="row">Contact Number</th>
<td ><?php echo $scontactnumber; ?></td>
<br>
</tr>
<tr>
<th scope="row">NIC</th>
<td ><?php echo $sNIC; ?></td>
<br>
</tr>
<tr>
<th scope="row">Password</th>
<td ><?php echo $spassword; ?></td>
<br>
</tbody>
</table>
</div>
</div>
<div class="section3">
<p align="center" style="color: white; padding-top: 30px; font-size:20px " >© 2021 MAY / GREENDALE COLLEGE</p>
</div>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>