-
Notifications
You must be signed in to change notification settings - Fork 3
/
appointments.php
executable file
·352 lines (349 loc) · 13.9 KB
/
appointments.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
344
345
346
347
348
349
350
351
352
<?php
include('config.php');
include('session_check.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Basic Page Needs
================================================== -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>SPA Pathcare : Home</title>
<!-- Mobile Specific Metas
================================================== -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Favicon -->
<link rel="shortcut icon" type="image/icon" href="images/favicon.ico"/>
<!-- CSS
================================================== -->
<!-- Bootstrap css file-->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Font awesome css file-->
<link href="css/font-awesome.min.css" rel="stylesheet">
<!-- Default Theme css file -->
<link id="switcher" href="css/themes/orange-theme.css" rel="stylesheet">
<!-- Slick slider css file -->
<link href="css/slick.css" rel="stylesheet">
<!-- Photo Swipe Image Gallery -->
<link rel="stylesheet prefetch" href="css/photoswipe.css">
<link rel="stylesheet prefetch" href="css/default-skin.css">
<!-- Main structure css file -->
<link href="style.css" rel="stylesheet">
<!-- Google fonts -->
<link href="http://fonts.googleapis.com/css?family=Raleway" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Habibi" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Cinzel+Decorative:900" rel="stylesheet" type="text/css">
<!-- 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.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- BEGAIN PRELOADER -->
<div id="preloader">
<div id="status"> </div>
</div>
<!-- END PRELOADER -->
<!-- SCROLL TOP BUTTON -->
<a class="scrollToTop" href="#"><i class="fa fa-heartbeat"></i></a>
<!-- END SCROLL TOP BUTTON -->
<!--=========== BEGIN HEADER SECTION ================-->
<header id="header">
<!-- BEGIN MENU -->
<div class="menu_area">
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<!-- FOR MOBILE VIEW COLLAPSED BUTTON -->
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- LOGO -->
<!-- TEXT BASED LOGO -->
<a class="navbar-brand" href="index.php"><i class="fa fa-heartbeat"></i>SPA <span>Pathcare</span></a>
<!-- IMG BASED LOGO -->
<!-- <a class="navbar-brand" href="index.php"><img src="images/logo.png" alt="logo"></a> -->
</div>
<!--/.nav-collapse -->
<?php include ('menu.php') ?>
</div>
</nav>
</div>
<!-- END MENU -->
</header>
<!--=========== END HEADER SECTION ================-->
<section id="blogArchive">
<div class="row">
<div class="col-lg-12 col-md-12">
<div class="blog-breadcrumbs-area">
<div class="container">
<div class="blog-breadcrumbs-left">
<h2>My Appointments</h2>
</div>
<div class="blog-breadcrumbs-right">
<ol class="breadcrumb">
<li>You are here</li>
<li><a href="#">Home</a></li>
<li class="active">My Appointments</li>
</ol>
</div>
</div>
</div>
</div>
</div>
</section>
<?php $id =$_SESSION['log']['Id'];
if($_SESSION['log1']=="client")
{
?>
<section id="topFeature">
<div class="row">
<div class="col-lg-4 col-md-4">
<div class="row">
<div class="single-top-feature">
<span class="fa fa-flask"></span>
<h3>Test Appointment</h3>
<?php
$sql = mysqli_query($con,"SELECT * FROM test_appointment WHERE User_id='$id' ");
while($row = mysqli_fetch_array($sql)) {
?>
<ul class="opening-table">
<li><?php echo $row['Test_name'] ?></li>
<li> </li>
</ul>
<?php
}
?>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4">
<div class="row">
<div class="single-top-feature opening-hours">
<span class="fa fa-clock-o"></span>
<h3>Appointment Details</h3>
<?php
$sql=mysqli_query($con,"SELECT * FROM test_appointment WHERE User_id='$id'");
while($row=mysqli_fetch_array($sql)) {
?>
<ul class="opening-table">
<li>
<span>Date</span>
<div><?php echo $row['Test_date'] ?></div>
</li>
<li>
<span>Time</span>
<div><?php echo $row['Test_time'] ?></div>
</li>
</ul>
<?php
}
?>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4">
<div class="row">
<div class="single-top-feature">
<span class="fa fa-hospital-o"></span>
<h3>Report</h3>
<?php
$sql=mysqli_query($con,"SELECT * FROM test_appointment WHERE User_id='$id'");
while($row=mysqli_fetch_array($sql)) {
?>
<ul class="opening-table">
<li><a href="<?php echo $row['Report']?>" target="_blank">Download</a></li>
<li><a href="deletetestapp.php?id=<?php echo $row['Id']; ?>">Delete Appointment</a></li>
</ul>
<?php
}
?>
</div>
</div>
</div>
</div>
</section>
<section id="topFeature">
<div class="row">
<div class="col-lg-4 col-md-4">
<div class="row">
<div class="single-top-feature">
<span class="fa fa-flask"></span>
<h3>Doctor Appointment</h3>
<?php
$sql=mysqli_query($con,"SELECT * FROM doctor_app WHERE User_id='$id' ");
while($row=mysqli_fetch_array($sql)){
?>
<ul class="opening-table">
<li>
<?php echo $row['Doc_name'] ?>
</li>
<li> </li>
</ul>
<?php
}
?>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4">
<div class="row">
<div class="single-top-feature opening-hours">
<span class="fa fa-clock-o"></span>
<h3>Appointment Details</h3>
<?php
$sql=mysqli_query($con,"SELECT * FROM doctor_app WHERE User_id='$id'");
while($row=mysqli_fetch_array($sql))
{
?>
<ul class="opening-table">
<li>
<span>Date</span>
<div><?php echo $row['App_date'] ?></div>
</li>
<li>
<span>Time</span>
<div><?php echo $row['App_time'] ?></div>
</li>
</ul>
<?php
}
?>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4">
<div class="row">
<div class="single-top-feature">
<span class="fa fa-hospital-o"></span>
<h3>Report</h3>
<?php
$sql=mysqli_query($con,"SELECT * FROM doctor_app WHERE User_id='$id'");
while($row=mysqli_fetch_array($sql)) {
// $sts=$row['Status'];
// if($sts=="Rejected") {
if(0) {
?>
<ul class="opening-table">
<li><a>Rejected by Doctor</a></li>
<li><a href="deletedocapp1.php?id=<?php echo $row['Id']; ?>">Delete Appointment</a></li>
</ul>
<?php
} else {
?>
<ul class="opening-table">
<li><a href="<?php echo $row['Report']?>" target="_blank">Download</a></li>
<li><a href="deletedocapp1.php?id=<?php echo $row['Id']; ?>">Delete Appointment</a></li>
</ul>
<?php
}
}
?>
</div>
</div>
</div>
</div>
</section>
<?php
}
else if($_SESSION['log1']=="doctor")
{
$name=$_SESSION['log']['Name'];
$status="Rejected";
?>
<section id="topFeature">
<div class="row">
<div class="col-lg-4 col-md-4">
<div class="row">
<div class="single-top-feature">
<span class="fa fa-flask"></span>
<h3>Patient</h3>
<?php
$sql=mysqli_query($con,"SELECT * FROM doctor_app WHERE Doc_name='$name' ");
while($row=mysqli_fetch_array($sql)) {
?>
<ul class="opening-table">
<li><?php echo $row['User_name'] ?></li>
<li> </li>
</ul>
<?php
}
?>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4">
<div class="row">
<div class="single-top-feature opening-hours">
<span class="fa fa-clock-o"></span>
<h3>Appointment Details</h3>
<?php
$sql=mysqli_query($con,"SELECT * FROM doctor_app WHERE Doc_name='$name' ");
while($row=mysqli_fetch_array($sql)) {
?>
<ul class="opening-table">
<li>
<span>Date</span>
<div><?php echo $row['App_date'] ?></div>
</li>
<li>
<span>Time</span>
<div><?php echo $row['App_time'] ?></div>
</li>
</ul>
<?php
}
?>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4">
<div class="row">
<div class="single-top-feature">
<span class="fa fa-hospital-o"></span>
<h3>Cancel</h3>
<?php
$sql=mysqli_query($con,"SELECT * FROM doctor_app WHERE Doc_name='$name' ");
while($row=mysqli_fetch_array($sql)) {
?>
<ul class="opening-table">
<li><a href="deletedocapp.php?id=<?php echo $row['Id']; ?>">Delete</a></li>
<li> </li>
</ul>
<?php
}
?>
</div>
</div>
</div>
</div>
</section>
<?php
}
?>
<!--=========== Start Footer SECTION ================-->
<?php include('footer.php') ?>
<!--=========== End Footer SECTION ================-->
<!-- jQuery Library -->
<script src="js/jquery.js"></script>
<!-- Bootstrap default js -->
<script src="js/bootstrap.min.js"></script>
<!-- slick slider -->
<script src="js/slick.min.js"></script>
<script type="text/javascript" src="js/modernizr.custom.79639.js"></script>
<!-- counter -->
<script src="js/waypoints.min.js"></script>
<script src="js/jquery.counterup.min.js"></script>
<!-- Doctors hover effect -->
<script src="js/snap.svg-min.js"></script>
<script src="js/hovers.js"></script>
<!-- Custom JS -->
<script src="js/custom.js"></script>
</body>
</html>