-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathstudent_profile.php
148 lines (123 loc) · 5.68 KB
/
student_profile.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
<?php
include 'lib/Session.php';
Session::checkStudentSession();
include 'helpers/Format.php';
spl_autoload_register(function ($class) {
include_once "classes/" . $class . ".php";
});
$class = new ClassApp();
$student = new Student();
$fm = new Format()
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="./css/student_profile.css">
<title>Mathisi</title>
</head>
<body>
<?php
if (isset($_GET['action']) && $_GET['action'] == 'logout') {
Session::destroy();
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['submit'])) {
$enroll = $class->enrollToClass($_POST, Session::get('studentId'));
}
?>
<main class="view">
<div class="sidebar">
<div class="nav-name-display">
<div class="nav-image">
<img src="./images/HT.jpg" alt="profile-image" class="p-image">
</div>
<div class="nav-name">
<p class="nav-name-text">
<!-- <span class="firstname">Name</span> <span class="lastname">Place</span> -->
</p>
</div>
</div>
<div class="navigation">
<a style="text-decoration: none;
color: white;" href="dashboard.html">
<p class="announcements nav-item"><img src="./images/ic-round-notifications-none.png" alt="announcements"> Announcements</p>
</a>
<a style="text-decoration: none;
color: white;" href="classroom.php">
<p class="classes nav-item"><img src="./images/mdi-teach.png" alt="classes"> Classes</p>
</a>
<a style="text-decoration: none;
color: white;" href="student-class.php">
<p class="materials nav-item"><img src="./images/foundation-book.png" alt="materials"> Materials</p>
</a>
</div>
</div>
<div class="profile-section">
<div class="inner-profile">
<div class="profile-section-image">
<p><img src="./images/HT.jpg" alt="profile-image" class="profile-image">
<!--<span class="change-profile-image link">Change Profile Image</span> -->
</p>
</div>
<div class="profile-info ">
<p class="name">
Name:
<span class="firstname plate"><?php echo Session::get('studentName'); ?></span>
<span class="lastname plate"></span>
</p>
<p class="email plate">Email: <?php echo Session::get('studentEmail'); ?> </p>
<p class="phone plate">Phone: 0123456789</p>
</div>
<div class="class-details">
<form class="cc-form" action="" method="post">
<!---<label>Create class</label><br>-->
<select class="choose-item" name="classId">
<option>Select Class</option>
<!-- get all classes -->
<?php
$getAllClasses = $class->selectAllClasses();
if ($getAllClasses) {
while ($result = $getAllClasses->fetch_assoc()) {
?>
<option value="<?php echo $result['id']; ?>"><?php echo $result['class_name']; ?></option>
<?php }
} ?>
</select>
<button class="select" name="submit">Enroll</button>
</form>
<!-- <table class="class-list">
<tr>
<th>Classes</th>
<th></th>
<th></th>
</tr>
<tr class="class-table-field">
<td class="class-title">English</td>
<td class="teacher-name">Faith Promise Ms.</td>
<td><input type="submit" value="Go To Class" class="class-action link"></td>
</tr>
<tr class="class-table-field">
<td class="class-title">Mathematics</td>
<td class="teacher-name">Collin Francis Mr.</td>
<td><input type="submit" value="Go To Class" class="class-action link"></td>
</tr>
<tr class="class-table-field">
<td class="class-title">Physics</td>
<td class="teacher-name">Margaret Chan Ms.</td>
<td><input type="submit" value="Go To Class" class="class-action link"></td>
</tr>
<tr class="class-table-field">
<td class="class-title">Chemistry</td>
<td class="teacher-name">James Javier Mr.</td>
<td><input type="submit" value="Go To Class" class="class-action link"></td>
</tr>
</table>
<td><input type="submit" value="Change Password" class="reset-action link"></td> -->
</div>
</div>
</div>
</main>
</body>
</html>