-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdashboard.php
executable file
·95 lines (95 loc) · 4.3 KB
/
dashboard.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
<?php
require 'header.php';
$semester = 0;
$department = 0;
if (empty($_SESSION["std_id"])) {
msgBox("error", "You are not logged-in");
} else {
?>
<!-- Page Title -->
<div class="section section-breadcrumbs hidden-print">
<div class="container">
<div class="row">
<div class="col-md-12">
<h1>
<?php echo $_SESSION["std_name"] ?>'s Dashboard
</h1>
</div>
</div>
</div>
</div>
<div class="section">
<div class="container">
<div class="row">
<div class="col-sm-8">
<div class="blog-post blog-single-post">
<div class="single-post-title">
<h3>Profile</h3>
</div>
<div class="single-post-content">
<table class="table table-striped">
<?php
$db = new Database();
$db->query("SELECT * FROM users WHERE user_id = ?",$_SESSION["std_id"]);
$r = $db->fetchObject()
?>
<tr>
<td><strong>Name:</strong></td>
<td><?php echo $r->user_name ?></td>
</tr>
<tr>
<td><strong>Email:</strong></td>
<td><?php echo $r->user_email ?></td>
</tr>
<tr>
<td><strong>Date of Birth:</strong></td>
<td><?php echo $r->user_dob ?></td>
</tr>
<tr>
<td><strong>Address:</strong></td>
<td><?php echo $r->user_address ?></td>
</tr>
<tr>
<td><strong>Gender:</strong></td>
<td><?php echo $r->user_gender ?></td>
</tr>
</table>
</div>
</div>
<div class="blog-post blog-single-post">
<div class="single-post-title">
<h3>Academic Information</h3>
</div>
<div class="single-post-content">
<table class="table table-striped">
<?php
$db->query("SELECT * FROM admission WHERE user_id = ?",$_SESSION["std_id"]);
$r = $db->fetchObject();
$department = $db->queryValues("SELECT * FROM departments WHERE department_id = ?", "department_name", $r->department_id)->department_name;
$semester = $r->semester_id;
$cgpa = $db->queryValues("SELECT * FROM cgpa WHERE student_id = ? ORDER BY cgpa_id DESC", "cgpa_marks", $_SESSION["std_id"])->cgpa_marks;
?>
<tr>
<td><strong>Department:</strong></td>
<td><?php echo $department ?></td>
</tr>
<tr>
<td><strong>Semester:</strong></td>
<td><?php echo $semester ?></td>
</tr>
<tr>
<td><strong>CGPA:</strong></td>
<td><?php echo $cgpa ?></td>
</tr>
</table>
</div>
</div>
<?php print_button(); ?>
</div>
<?php require 'sidebar-user.php'; ?>
</div>
</div>
</div>
<?php
}
require 'footer.php';