-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.php
More file actions
422 lines (357 loc) · 13.5 KB
/
Copy pathindex.php
File metadata and controls
422 lines (357 loc) · 13.5 KB
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
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
<?php
session_start();
if(isset($_POST['loginButton'])){
$useremail = $_POST['useremail'];
$userpass = $_POST['userpass'];
include('includes/conn.php');
$q1 = "SELECT * FROM doctor where email = '$useremail'";
$q2 = "SELECT * FROM patient where email = '$useremail'";
$q3 = "SELECT * FROM admin where email = '$useremail'";
$r = mysqli_query($con, $q1);
$rr = mysqli_query($con, $q2);
$ad = mysqli_query($con, $q3);
if(mysqli_num_rows($r)>0){
while($row = mysqli_fetch_assoc($r)){
$dbname = $row['name'];
$dbemail = $row['email'];
$dbpass = $row['password'];
$type = $row['type'];
}
if($useremail == $dbemail && $userpass == $dbpass){
$_SESSION['useremail'] =$useremail;
$_SESSION['userpass'] = $userpass;
if($_POST['remember'] == 'on' ){
$expire = time()+86400;
setcookie('dpp', $_POST['useremail'], $expire);
}
header("location:./src/doctor/doctor.php");
}
else
{
echo "<script>";
echo "alert('Wrong Doctor Email or Password')";
echo "</script>";
}
}elseif(mysqli_num_rows($rr)>0){
while($row = mysqli_fetch_assoc($rr)){
$dbid = @$row['id'];
$dbname = $row['name'];
$dbemail = $row['email'];
$dbpass = $row['password'];
$type = $row['type'];
}
if($useremail == $dbemail && $userpass == $dbpass){
$_SESSION['useremail'] =$useremail;
$_SESSION['userpass'] = $userpass;
$_SESSION['status'] = "Success";
if($_POST['remember'] == 'on' ){
$expire = time()+86400;
setcookie('dpp', $_POST['useremail'], $expire);
}
header("location:./src/patient/patient.php");
}
else{
echo "<script>";
echo "alert('Wrong Patient Email or Password')";
echo "</script>";
}
}
elseif(mysqli_num_rows($ad)>0){
while($row = mysqli_fetch_assoc($ad)){
$dbname = $row['name'];
$dbemail = $row['email'];
$dbpass = $row['password'];
}
if($useremail == $dbemail && $userpass == $dbpass){
$_SESSION['useremail'] = $useremail;
$_SESSION['userpass'] = $userpass;
$_SESSION['status'] = "Success";
if($_POST['remember'] == 'on' ){
$expire = time()+86400;
setcookie('dpp', $_POST['useremail'], $expire);
}
header("location:./src/admin/adminpanel.php");
}else{
echo "<script>";
echo "alert('Wrong Patient Email or Password')";
echo "</script>";
}
}
else{
echo "<script>";
echo "alert('Account not exist')";
echo "</script>";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Book My Doctor</title>
<!-- Font Awesome -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.0/css/all.css">
<!-- Bootstrap core CSS -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
<!-- Material Design Bootstrap -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.7.5/css/mdb.min.css" rel="stylesheet">
<!-- Meri CSS -->
<link href="./assets/css/style.css" rel="stylesheet">
<link rel="stylesheet" href="./assets/css/index.css">
</head>
<body>
<!--Navbar -->
<nav class="navbar fixed-top navbar-expand-lg navbar-dark scrolling-navbar mdb-color darken-4">
<a class="navbar-brand" href="#">Book My Doctor <i class="fas fa-user-md"></i></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent-333"
aria-controls="navbarSupportedContent-333" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent-333">
<ul class="navbar-nav mr-auto smooth-scroll list-unstyled">
<li class="nav-item active">
<a class="nav-link" href="#home">Home
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#about">About</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" id="navbarDropdownMenuLink-333" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">Signup
</a>
<div class="dropdown-menu dropdown-default" aria-labelledby="navbarDropdownMenuLink-333">
<a class="dropdown-item" href="./src/patient/patientSignup.html">Patient</a>
<a class="dropdown-item" href="./src/doctor/docSignup.html">Doctor </a>
</div>
</li>
</ul>
<ul class="navbar-nav ml-auto nav-flex-icons">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" id="navbarDropdownMenuLink-333" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
<i class="fas fa-user"></i>
</a>
<div class="dropdown-menu dropdown-menu-right dropdown-default" aria-labelledby="navbarDropdownMenuLink-333">
<a class="dropdown-item" href="#login">Login</a>
</div>
</li>
</ul>
</div>
</nav>
<!--/.Navbar -->
<header id="home">
<!-- Full Page Intro -->
<div class="view" style="background-image: url('./assets/img/3.jpg'); background-repeat: no-repeat; background-size: cover; background-position: center center;">
<!-- Mask & flexbox options-->
<div class="mask rgba-black-light d-flex justify-content-center align-items-center">
<!-- Content -->
<div class="container">
<!--Grid row-->
<div class="row wow fadeIn">
<!--Grid column-->
<div class="col-md-6 mb-4 white-text text-center text-md-left">
<h1 class="display-4 font-weight-bold">Book Appointment on the go</h1>
<hr class="hr-light">
<p>
<strong>Best & free platform to do so</strong>
</p>
<p class="mb-4 d-none d-md-block">
<strong>We provide a platform to Book Doctor appointment hassle free & skip long queues.</strong>
</p>
<a href="./src/patient/patientSignup.html" class="btn btn-indigo btn-lg">Patient Signup
<i class="fas fa-diagnoses"></i>
</a>
<a href="./src/doctor/docSignup.html" class="btn btn-indigo btn-lg">Doctor Signup
<i class="fas fa-stethoscope"></i>
</a>
</div>
<!--Grid column-->
<!--Grid column-->
<div class="col-md-6 col-xl-5 mb-4">
<!--Card-->
<div class="card" id="login">
<!--Card content-->
<div class="card-body">
<!-- Form -->
<form name="" method="POST">
<!-- Heading -->
<h3 class="white-text text-center">
<strong>Login</strong>
</h3>
<hr>
<div class="md-form">
<i class="fas fa-envelope prefix white-text"></i>
<input type="text" id="email" name="useremail" class="form-control" style="color: #fff;" required>
<label for="email" style="color: #fff;">Your email</label>
</div>
<div class="md-form">
<i class="fas fa-lock prefix white-text"></i>
<input type="password" id="pass" class="form-control" name="userpass" style="color: #fff;" required>
<label for="pass" style="color: #fff;">Your password</label>
</div>
<div class="text-center">
<button class="btn btn-indigo" name="loginButton">Login <i class="fas fa-arrow-circle-right"></i></button>
<hr>
</div>
</form>
<!-- Form -->
</div>
</div>
<!--/.Card-->
</div>
<!--Grid column-->
</div>
<!--Grid row-->
</div>
<!-- Content -->
</div>
<!-- Mask & flexbox options-->
</div>
<!-- Full Page Intro -->
</header>
<!-- Main navigation -->
<!--Main Layout-->
<main>
<div class="container">
<!--Grid row-->
<div class="row py-5">
</div>
<!--Grid row-->
</div>
</main>
<!--Main Layout-->
<main>
<div class="container">
<hr class="my-5">
<!--Section: Main features & Quick Start-->
<section id="about">
<h3 class="h3 text-center mb-5">About BMD <i class="fas fa-user-md"></i></h3>
<!--Grid row-->
<div class="row wow fadeIn">
<!--Grid column 1-->
<div class="col-lg-6 col-md-12 px-4">
<!--First row-->
<div class="row">
<div class="col-1 mr-3">
<i class="fas fa-angle-right fa-2x cyan-text"></i>
</div>
<div class="col-10">
<h5 class="feature-title">Online appointment</h5>
<p class="grey-text">Thanks to BMD you can now book doctor appointments remotely allowing you to skip long queues.</p>
</div>
</div>
<!--/First row-->
<div style="height:30px"></div>
<!--Second row-->
<div class="row">
<div class="col-1 mr-3">
<i class="fas fa-angle-right fa-2x cyan-text"></i>
</div>
<div class="col-10">
<h5 class="feature-title">Online appointment</h5>
<p class="grey-text">Thanks to BMD you can now book doctor appointments remotely allowing you to skip long queues.</p>
</p>
</div>
</div>
<!--/Second row-->
<div style="height:30px"></div>
<!--Third row-->
<div class="row">
<div class="col-1 mr-3">
<i class="fas fa-angle-right fa-2x cyan-text"></i>
</div>
<div class="col-10">
<h5 class="feature-title">Online appointment</h5>
<p class="grey-text">Thanks to BMD you can now book doctor appointments remotely allowing you to skip long queues.</p>
</div>
</div>
<!--/Third row-->
</div>
<!--/Grid column 1-->
<!--Grid column 2-->
<div class="col-lg-6 col-md-12 px-4">
<!--First row-->
<div class="row">
<div class="col-1 mr-3">
<i class="fas fa-angle-right fa-2x cyan-text"></i>
</div>
<div class="col-10">
<h5 class="feature-title">Online appointment</h5>
<p class="grey-text">Thanks to BMD you can now book doctor appointments remotely allowing you to skip long queues.</p>
</div>
</div>
<!--/First row-->
<div style="height:30px"></div>
<!--Second row-->
<div class="row">
<div class="col-1 mr-3">
<i class="fas fa-angle-right fa-2x cyan-text"></i>
</div>
<div class="col-10">
<h5 class="feature-title">Online appointment</h5>
<p class="grey-text">Thanks to BMD you can now book doctor appointments remotely allowing you to skip long queues.</p>
</p>
</div>
</div>
<!--/Second row-->
<div style="height:30px"></div>
<!--Third row-->
<div class="row">
<div class="col-1 mr-3">
<i class="fas fa-angle-right fa-2x cyan-text"></i>
</div>
<div class="col-10">
<h5 class="feature-title">Online appointment</h5>
<p class="grey-text">Thanks to BMD you can now book doctor appointments remotely allowing you to skip long queues.</p>
</div>
</div>
<!--/Third row-->
</div>
<!--/Grid column 2-->
</div>
<!--/Grid row-->
</section>
<!--Section: Main features & Quick Start-->
<hr class="my-5">
</div>
</main>
<!-- Footer -->
<footer class="page-footer font-small unique-color-dark pt-4">
<!-- Footer Elements -->
<div class="container">
<!-- Call to action -->
<ul class="list-unstyled list-inline text-center py-2">
<li class="list-inline-item">
<h5 class="mb-1">Register for free</h5>
</li>
<li class="list-inline-item">
<a href="./src/patient/patientSignup.html" class="btn btn-outline-white btn-rounded">Sign up!</a>
</li>
</ul>
<!-- Call to action -->
</div>
<!-- Footer Elements -->
<!-- Copyright -->
<div class="footer-copyright text-center py-3">© 2019 Copyright - All rights reserved
<a href="#"></a>
</div>
<!-- Copyright -->
</footer>
<!-- Footer -->
<!-- SCRIPTS -->
<!-- JQuery -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- Bootstrap tooltips -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.4/umd/popper.min.js"></script>
<!-- Bootstrap core JavaScript -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
<!-- MDB core JavaScript -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.7.5/js/mdb.min.js"></script>
<!-- Mer khudki JS -->
<script src="./js/main.js"></script>
</body>
</html>