-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo_profile.php
324 lines (249 loc) · 13.3 KB
/
demo_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
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
<?php
session_start();
$email=$_SESSION['email'] ;
$password=$_SESSION['password'] ;
$role=$_SESSION['role'] ;
//echo $email;
include_once 'connection.php';
$sql = "SELECT * FROM `user` WHERE `email`='$email' AND `password`='$password' AND `role`='$role'";
$result=mysqli_query($con,$sql);
$row=mysqli_fetch_assoc($result);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>Admin Profile</title>
<meta content="" name="description">
<meta content="" name="keywords">
<!-- Favicons -->
<link href="assets/img/favicon.png" rel="icon">
<link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet">
<!-- Vendor CSS Files -->
<link href="assets/vendor/aos/aos.css" rel="stylesheet">
<link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
<link href="assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
<link href="assets/vendor/glightbox/css/glightbox.min.css" rel="stylesheet">
<link href="assets/vendor/swiper/swiper-bundle.min.css" rel="stylesheet">
<!-- Template Main CSS File -->
<link href="assets/css/style.css" rel="stylesheet">
<!-- =======================================================
* Template Name: iPortfolio - v3.10.0
* Template URL: https://bootstrapmade.com/iportfolio-bootstrap-portfolio-websites-template/
* Author: BootstrapMade.com
* License: https://bootstrapmade.com/license/
======================================================== -->
</head>
<body>
<!-- ======= Mobile nav toggle button ======= -->
<i class="bi bi-list mobile-nav-toggle d-xl-none"></i>
<!-- ======= Header ======= -->
<header id="header">
<div class="d-flex flex-column">
<div class="profile">
<img src="UserImages/<?php echo $row['image'];?>" alt="profile image" class="img-fluid rounded-circle">
<h1 class="text-light"><a href="admin_profile.php"><?php echo $row['user_name']?></a></h1>
<h6 class="text-center"><a href="[email protected]"> <?php echo $row['email']?> </a></h6>
<div class="d-grid gap-2">
<a href ="logout.php"><button class="btn btn-primary" type="button">Log Out</button>
</div>
<nav id="navbar" class="nav-menu navbar">
<ul>
<li><a href="#hero" class="nav-link scrollto active"><i class="bx bx-home"></i> <span>Home</span></a></li>
<li><a href="#about" class="nav-link scrollto"><i class="bx bx-user"></i> <span>Profile</span></a></li>
<li><a href="#createcourse" class="nav-link scrollto"><i class="bx bx-file-blank"></i> <span>Create Course</span></a></li>
<li><a href="#resume" class="nav-link scrollto"><i class="bx bx-file-blank"></i> <span>Add Course Teacher</span></a></li>
<li><a href="#student" class="nav-link scrollto"><i class="bx bx-book-content"></i> <span>Add Student</span></a></li>
<li><a href="#attendance" class="nav-link scrollto"><i class="bx bx-server"></i> <span>Attendance</span></a></li>
<!-- <li><a href="#deletestudent" class="nav-link scrollto"><i class="bx bx-server"></i> <span>Remove Student</span></a></li>
<li><a href="#course" class="nav-link scrollto"><i class="bx bx-book-content"></i> <span>Create Course</span></a></li>
-->
</div>
</ul>
</nav><!-- .nav-menu -->
</div>
</header><!-- End Header -->
<!-- ======= Hero Section ======= -->
<section id="hero" class="d-flex flex-column justify-content-center align-items-center">
<div class="hero-container" data-aos="fade-in">
<h1>ADMIN</h1> -->
<p>Hello , I'm Admin of this website<span class="typed" data-typed-items=""></span></p>
</div>
</section><!-
<main id="main">
<!-- ======= About Section ======= -->
<section id="about" class="about">
<div class="container">
<div class="section-title">
<h2>Profile</h2>
</div>
<div class="row">
<div class="col-lg-4" data-aos="fade-right">
<img src="images/admin_pic.png" class="img-fluid" alt="">
</div>
<div class="col-lg-8 pt-4 pt-lg-0 content" data-aos="fade-left">
<h3>Admin</h3>
<p class="fst-italic">
</p>
<div class="row">
<div class="col-lg-6">
<ul>
<li><i class="bi bi-chevron-right"></i> <strong>Name:</strong> <span><?php echo $row['user_name'] ; ?></span></li>
<li><i class="bi bi-chevron-right"></i> <strong>User ID:</strong> <span><?php echo $row['user_id'] ; ?></span></li>
<li><i class="bi bi-chevron-right"></i> <strong>Email:</strong> <span><?php echo $row['email'] ; ?></span></li>
<!-- <li><i class="bi bi-chevron-right"></i> <strong>Password:</strong> <span>123</span></li> -->
</ul>
</div>
<div class="col-lg-6">
<ul>
<li><i class="bi bi-chevron-right"></i> <strong>Department:</strong> <span><?php echo $row['department'] ;?></span></li>
<!-- <li><i class="bi bi-chevron-right"></i> <strong>Session:</strong> <span>2019-2020</span></li> -->
<li><i class="bi bi-chevron-right"></i> <strong>ID:</strong> <span><?php echo $row['id'] ;?></span></li>
<li><i class="bi bi-chevron-right"></i> <strong>University:</strong> <span><?php echo $row['university'] ;?></span></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</section><!-- End About Section -->
<!-- ======= Facts Section ======= -->
<!-- End Facts Section -->
<section id="createcourse" class="resume section-bg">
<div class="container">
<div class="section-title">
<h2>Create Course</h2>
<!-- <p>Create Course</p> -->
<?php include_once 'create_course_query.php'; ?>
<!-- create course form -->
<div class="container d-flex justify-content-center align-items-center" style="min-height:10vh" >
<form action="" method="POST" class="border shadow p-3 rounded" style="width:450px;" > <h4 class="text-center p-3">Create Course</h1>
<div class="mb-3">
<label for="course_title" class="form-label">Course Title</label>
<input type="text" class="form-control" name="course_title" id="course_title">
</div>
<div class="mb-3">
<label for="course_code" class="form-label">Course Code</label>
<input type="text" name="course_code" class="form-control" id="course_title">
</div>
<div class="mb-3">
<label for="course_code" class="form-label">Semester</label>
<select name="semester" class="form-select mb-3" aria-label="Default select example">
<option selected value="1" id="teacher">1st Semester</option>
<option value="2" id="admin">2nd Semester</option>
<option value="3" id="student">3rd Semester</option>
<option value="4" id="student">4th Semester</option>
<option value="5" id="student">5th Semester</option>
<option value="6" id="student">6th Semester</option>
<option value="7" id="student">7th Semester</option>
<option value="8" id="student">8th Semester</option>
</select>
</div>
<div class="mb-3">
<label for="course_time" class="form-label">Course Time</label>
<input type="text" name="course_time" class="form-control" id="course_time">
</div>
<div class="mb-3">
<label for="course_credit" class="form-label">Course Credit</label>
<input type="text" class="form-control" name="course_credit" id="course_credit">
</div>
<div class="mb-3">
<label for="teacher_name" class="form-label">Teacher Name</label>
<input type="text" class="form-control" name="teacher_name" id="teacher_name">
</div>
<div class="mb-3">
<label for="teacher_id" class="form-label">Teacher ID</label>
<input type="text" class="form-control" name="teacher_id" id="teacher_id">
</div>
<div class="mb-3">
<label for="teacher_email" class="form-label">e-mail</label>
<input type="email" class="form-control" name="teacher_email" id="teacher_email">
</div>
<button type="submit" class="btn btn-primary">Create Course</button>
</form>
</div>
</div>
</section>
<!-- ======= Skills Section ======= -->
<
<!-- ======= Resume Section ======= -->
<!-- End Resume Section -->
<section id="student">
<div class="section-title">
<h2>Add Student</h2>
<div class="container d-flex justify-content-center align-items-center" style="min-height:100vh" >
<form action="" method="POST" class="border shadow p-3 rounded" style="width:450px;" > <h4 class="text-center p-3">ADD STUDENT</h4>
<div class="mb-3">
<label for="student_name" class="form-label">Name</label>
<input type="text" class="form-control" name="student_name" id="student_name">
</div>
<div class="mb-3">
<label for="student_id" class="form-label">ID</label>
<input type="text" name="student_id" class="form-control" id="student_id">
</div>
<div class="mb-3">
<label for="course_time" class="form-label">e-mail</label>
<input type="email" name="email" class="form-control" id="email">
</div>
<button type="add" class="btn btn-primary">Add</button>
</form>
</div>
</div>
</section>
<section id="attendance">
<div class="section-title">
<h2>Attendance</h2>
<!-- <div class="container d-flex justify-content-center align-items-center" style="min-height:100vh" >
<form action="" method="POST" class="border shadow p-3 rounded" style="width:450px;" > <h4 class="text-center p-3">CREATE</h1>
<div class="mb-3">
<label for="teacher_name" class="form-label">Teacher Name</label>
<input type="text" class="form-control" name="teacher_name" id="teacher_name">
</div>
<div class="mb-3">
<label for="teacher_id" class="form-label">Teacher ID</label>
<input type="text" class="form-control" name="teacher_id" id="teacher_id">
</div>
<div class="mb-3">
<label for="teacher_email" class="form-label">e-mail</label>
<input type="email" class="form-control" name="teacher_email" id="teacher_email">
</div>
<button type="remove" class="btn btn-primary">Remove</button>
</form>
</div> -->
</div>
</section>
<!-- End #main -->
<!-- ======= Footer ======= -->
<footer id="footer">
<div class="container">
<div class="copyright">
© Copyright <strong><span>arrr.cusas.com</span></strong>
</div>
<div class="credits">
<!-- All the links in the footer should remain intact. -->
<!-- You can delete the links only if you purchased the pro version. -->
<!-- Licensing information: https://bootstrapmade.com/license/ -->
<!-- Purchase the pro version with working PHP/AJAX contact form: https://bootstrapmade.com/iportfolio-bootstrap-portfolio-websites-template/ -->
Designed by <a href="https://The Great Jobra Lab/">Team CUSAS</a>
</div>
</div>
</footer><!-- End Footer -->
<a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i class="bi bi-arrow-up-short"></i></a>
<!-- Vendor JS Files -->
<script src="assets/vendor/purecounter/purecounter_vanilla.js"></script>
<script src="assets/vendor/aos/aos.js"></script>
<script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="assets/vendor/glightbox/js/glightbox.min.js"></script>
<script src="assets/vendor/isotope-layout/isotope.pkgd.min.js"></script>
<script src="assets/vendor/swiper/swiper-bundle.min.js"></script>
<script src="assets/vendor/typed.js/typed.min.js"></script>
<script src="assets/vendor/waypoints/noframework.waypoints.js"></script>
<script src="assets/vendor/php-email-form/validate.js"></script>
<!-- Template Main JS File -->
<script src="assets/js/main.js"></script>
</body>
</html>