-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathindex.php
executable file
·242 lines (227 loc) · 9.6 KB
/
index.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
<?php include('src/functions.php') ?>
<?php include('src/config.php') ?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>SPA Pathcare : Home</title>
<?php include('src/head.php') ?>
</head>
<body>
<?php include('src/preload.php') ?>
<!--=========== BEGIN HEADER SECTION ================-->
<?php include('src/header.php') ?>
<!--=========== END HEADER SECTION ================-->
<!--=========== BEGIN SLIDER SECTION ================-->
<?php include('src/slider.php') ?>
<!--=========== END SLIDER SECTION ================-->
<!--=========== BEGIN Top Feature SECTION ================-->
<?php if (isset($_SESSION['user_data']) == "" || $_SESSION['user_type'] == "client") {
if (isset($_POST['book'])) {
if (isset($_SESSION['user_data']) == "") {
alert_and_redirect("Sign in First", "signin.php");
} else {
$id = $_SESSION['user_data']['id'];
$type = $_POST['type'];
if ($type == 'test') {
$test = $_POST['test'];
$appdate = $_POST['appdate1'];
$apptime = date('H:i:s', strtotime($_POST['apptime1']));
$qry = mysqli_query($con, "INSERT INTO test_appointment (test_id, test_time, test_date, users_id, report) VALUES ('$test','$apptime','$appdate','$id','')");
if ($qry) {
alert_and_redirect("Appointment set Sucessfully", "appointments.php");
} else {
alert("Appointment set Unsucessful RETRY!");
}
} else if ($type == 'doctor') {
$doc = $_POST['docname'];
$appdate = $_POST['appdate'];
$apptime = date('H:i:s', strtotime($_POST['apptime']));
$qry = mysqli_query($con, "INSERT INTO doctor_app (doctor_id, app_date, app_time,users_id, report, status) VALUES ('$doc','$appdate','$apptime','$id','','Accepted')");
if ($qry) {
alert_and_redirect("Appointment set Sucessfully", "appointments.php");
} else {
alert("Appointment set Unsucessful RETRY!");
}
}
}
}
?>
<section id="topFeature">
<div class="row">
<!-- Start Single Top Feature -->
<div class="col-lg-4 col-md-4">
<div class="row">
<div class="single-top-feature">
<span class="fa fa-flask"></span>
<h3>Emergency Care</h3>
<p>In cases of Emergency this is the right place you are looking providing fast test reports
and
catering to our patients need.</p>
<div class="readmore_area">
<a data-hover="Read More" href="#"><span>Read More</span></a>
</div>
</div>
</div>
</div>
<!-- End Single Top Feature -->
<!-- Start Single Top Feature -->
<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>Opening Hours</h3>
<p>Open All seven days of the week.</p>
<ul class="opening-table">
<li>
<span>Monday - Friday</span>
<div class="value">8.00 - 16.00</div>
</li>
<li>
<span>Saturday</span>
<div class="value">9.30 - 15.30</div>
</li>
<li>
<span>Sunday</span>
<div class="value">9.30 - 17.00</div>
</li>
</ul>
</div>
</div>
</div>
<!-- End Single Top Feature -->
<!-- Start Single Top Feature -->
<div class="col-lg-4 col-md-4">
<div class="row">
<div class="single-top-feature">
<span class="fa fa-hospital-o"></span>
<h3>Appointment</h3>
<p>Now booking an appointment is just a click away so just click on the button below and
start
booking appointments straight away.</p>
<div class="readmore_area">
<a data-hover="Appoinment" data-target="#myModal" data-toggle="modal" href="#">
<span>Appoinment</span>
</a>
</div>
<!-- start modal window -->
<div aria-hidden="true" aria-labelledby="myModalLabel" class="modal fade" id="myModal" role="dialog"
tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button aria-hidden="true" class="close" data-dismiss="modal" type="button">
×
</button>
<h4 class="modal-title" id="myModalLabel">Appoinment Details</h4>
</div>
<div class="modal-body">
<div class="appointment-area">
<form class="appointment-form" method="post">
<div class="row">
<div class="col-md-6 col-sm-6">
<label class="control-label">Appointment Date <span class="required">*</span>
</label>
<input type="Date" class="wp-form-control wpcf7-text" placeholder="mm/dd/yy"
name="appdate1" min="<?= date("Y-m-d"); ?>" max="<?= date("Y-m+1-d"); ?>" required>
</div>
<div class="col-md-6 col-sm-6">
<label class="control-label">Appointment Time <span class="required">*</span>
</label>
<input type="time" class="wp-form-control wpcf7-text" placeholder="hh:mm" name="apptime1"
required>
</div>
<div class="col-md-6 col-sm-6">
<label class="control-label">Select Test <span class="required">*</span>
</label>
<?php $sql = mysqli_query($con, "SELECT * FROM test") ?>
<select class="wp-form-control wpcf7-select" name="test" required>
<?php while ($row = mysqli_fetch_array($sql)) { ?>
<option value="<?= $row['id']; ?>">
<?= $row['test_name']; ?>
</option>
<?php } ?>
</select>
</div>
</div>
<input type="hidden" name="type" value="test">
<button class="wpcf7-submit button--itzel" name="book" type="submit">
<i class="button__icon fa fa-share"></i><span>Book Appointment</span>
</button>
</form>
</div>
</div>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
×
</button>
<h4 class="modal-title" id="myModalLabel">Doctor Appoinment Details</h4>
</div>
<div class="modal-body">
<div class="appointment-area">
<form class="appointment-form" method="post">
<div class="row">
<div class="col-md-6 col-sm-6">
<label class="control-label">Appointment Date <span class="required">*</span>
</label>
<input type="date" class="wp-form-control wpcf7-text" placeholder="dd/mm/yy"
name="appdate" min="<?= date("Y-m-d"); ?>" max="<?= date("Y-m+1-d"); ?>" required>
</div>
<div class="col-md-6 col-sm-6">
<label class="control-label">Appointment Time <span class="required">*</span>
</label>
<input type="Time" class="wp-form-control wpcf7-text" placeholder="hh:mm" name="apptime"
required>
</div>
<div class="col-md-6 col-sm-6">
<label class="control-label">Select Doctor <span class="required">*</span>
</label>
<?php $sql1 = mysqli_query($con, "SELECT * FROM doctor"); ?>
<select class="wp-form-control wpcf7-select" name="docname" required>
<?php while ($row1 = mysqli_fetch_array($sql1)) { ?>
<option value="<?= $row1['id'] ?>">
<?= $row1['name'] ?>
</option>
<?php } ?>
</select>
</div>
</div>
<input type="hidden" name="type" value="doctor">
<button class="wpcf7-submit button--itzel" name="book" type="submit">
<i class="button__icon fa fa-share"></i><span>Book
Appointment</span>
</button>
</form>
</div>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</div>
</div>
</div>
<!-- End Single Top Feature -->
</div>
</section>
<?php } ?>
<!--=========== END Top Feature SECTION ================-->
<!--=========== BEGIN Service SECTION ================-->
<?php include('src/services.php') ?>
<!--=========== End Service SECTION ================-->
<!--=========== BEGAIN Why Choose Us SECTION ================-->
<?php include('src/whychoose.php') ?>
<!--=========== END Why Choose Us SECTION ================-->
<!--=========== BEGAIN Counter SECTION ================-->
<?php include('src/counter.php') ?>
<!--=========== End Counter SECTION ================-->
<!--=========== BEGAIN Doctors SECTION ================-->
<?php include('src/meet_our_doc.php') ?>
<!--=========== End Doctors SECTION ================-->
<!--=========== BEGAIN Testimonial SECTION ================-->
<?php include('src/testimony.php') ?>
<!--=========== End Testimonial SECTION ================-->
<!--=========== Start Footer SECTION ================-->
<?php include('src/footer.php') ?>
<!--=========== End Footer SECTION ================-->
<?php include('src/incfooter.php') ?>
</body>
</html>