-
Notifications
You must be signed in to change notification settings - Fork 1
/
searchpincontroller.php
379 lines (351 loc) · 14 KB
/
searchpincontroller.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
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
<?php
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>KDAH | Home</title>
<!-- Favicon -->
<link rel="shortcut icon" href="kdah.png" type="image/x-icon">
<!-- Font awesome -->
<link href="assets/css/font-awesome.css" rel="stylesheet">
<!-- Bootstrap -->
<link href="assets/css/bootstrap.css" rel="stylesheet">
<!-- Slick slider -->
<link rel="stylesheet" type="text/css" href="assets/css/slick.css">
<!-- Fancybox slider -->
<link rel="stylesheet" href="assets/css/jquery.fancybox.css" type="text/css" media="screen" />
<!-- Theme color -->
<link id="switcher" href="assets/css/theme-color/default-theme.css" rel="stylesheet">
<!-- Main style sheet -->
<link href="assets/css/style.css" rel="stylesheet">
<!-- Google Fonts -->
<link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Roboto:400,400italic,300,300italic,500,700' 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]-->
<style type="text/css">
#customers {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 80%;
margin-left: 165px;
margin-top: 240px;
}
#customers td, #customers th {
border: 1px solid #ddd;
padding: 8px;
}
#customers tr:nth-child(even){background-color: #f2f2f2;}
#customers tr:hover {background-color: #ddd;}
#customers th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #04AA6D;
color: white;
}
</style>
</head>
<body>
<!--START SCROLL TOP BUTTON -->
<a class="scrollToTop" href="#">
<i class="fa fa-angle-up"></i>
</a>
<!-- END SCROLL TOP BUTTON -->
<!-- Start header -->
<header id="mu-header">
<div class="container">
<div class="row">
<div class="col-lg-12 col-md-12">
<div class="mu-header-area">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
<div class="mu-header-top-left">
<div class="mu-top-email">
<i class="fa fa-envelope"></i>
<span>[email protected]</span>
</div>
<div class="mu-top-phone">
<i class="fa fa-phone"></i>
<span>(568) 986 652</span>
</div>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
<div class="mu-header-top-right">
<nav>
<ul class="mu-top-social-nav">
<li><a href="#"><span class="fa fa-facebook"></span></a></li>
<li><a href="#"><span class="fa fa-twitter"></span></a></li>
<li><a href="#"><span class="fa fa-google-plus"></span></a></li>
<li><a href="#"><span class="fa fa-linkedin"></span></a></li>
<li><a href="#"><span class="fa fa-youtube"></span></a></li>
</ul>
</nav>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</header>
<!-- End header -->
<!-- Start menu -->
<section id="mu-menu">
<nav class="navbar navbar-default" 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"><span><img src="kdah.png" width="55px">KDAH</span></a>
<!-- <a class="navbar-brand" href="index.php"><i class="fa fa-university"></i><span>KDAH</span></a> -->
<!-- IMG BASED LOGO -->
<!-- <a class="navbar-brand" href="index.php"><img src="kdah.png" alt="logo"></a> -->
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul id="top-menu" class="nav navbar-nav navbar-right main-nav">
<li class="active"><a href="index.php">Home</a></li>
<!-- <li class="dropdown"> -->
<li><a href="adminlogin.php">Admin</a></li>
<!-- <ul class="dropdown-menu" role="menu">
<li><a href="course.html">Course Archive</a></li>
<li><a href="course-detail.html">Course Detail</a></li>
</ul> -->
<!-- </li> -->
<li><a href="report.php">Reports</a></li>
<!-- <li class="dropdown"> -->
<li><a href="certificate.php">Certificate</a></li>
<!-- <ul class="dropdown-menu" role="menu"> -->
<!-- <li><a href="blog-archive.html">Blog Archive</a></li> -->
<!-- <li><a href="blog-single.html">Blog Single</a></li> -->
<!-- </ul> -->
<!-- </li> -->
<li><a href="contact.php">Contact</a></li>
<?php
if(!(isset($_SESSION['username']))) {
echo "<li><a href='login.php'>Login</a></li>";
echo "<li><a href='register.php'>Register</a></li>";
}
else {
echo "<li><a href='index.php'>Hi!, ".$_SESSION['username']."</a></li>";
echo "<li><a href='logout.php'>Logout</a></li>";
}
?>
<!-- <li><a href="#" id="mu-search-icon"><i class="fa fa-search"></i></a></li> -->
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
</section>
<!-- End menu -->
<!-- Start search box -->
<div id="mu-search">
<div class="mu-search-area">
<button class="mu-search-close"><span class="fa fa-close"></span></button>
<div class="container">
<div class="row">
<div class="col-md-12">
<form class="mu-search-form">
<input type="search" placeholder="Type Your Keyword(s) & Hit Enter">
</form>
</div>
</div>
</div>
</div>
</div>
<!-- End search box -->
<br>
<!-- End Slider -->
<!-- Start service -->
<section id="mu-page-breadcrumb" style="margin-top: 3px;">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="mu-page-breadcrumb-area">
<h2>Select Vaccine Center</h2>
<ol class="breadcrumb">
<li><a href="index.php">Home</a></li>
<li><a href="searchpin.php">Search By Pin</a></li>
<li class="active">Select Vaccine Center</li>
</ol>
</div>
</div>
</div>
</div>
</section>
<br>
<!-- <div style="height:300px; margin-top:150px; margin-left:400px"> -->
<div>
<?php
$servername = "localhost";
$username = "root";
$password = "";
// Create connection
$conn = mysqli_connect($servername, $username, $password,"vaccineregistration");
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
// echo "Connected successfully";
$pin=$_GET['pin'];
$query = " SELECT * FROM `vaccinecenters` WHERE center_pin='$pin' ";
$result=$conn->query($query);
if(mysqli_num_rows($result)>0)
{
#$rows=mysqli_fetch_array($result);
#echo gettype($rows) ;
#echo print_r($rows);
echo "<table id='customers'>";
echo "<tr>";
echo "<th>Center Name</th>";
echo "<th>Center Address</th>";
echo "<th>Center Pin</th>";
echo "<th>Slots Available</th>";
echo "<th>Book Slot</th>";
echo "</tr>";
while($row = $result->fetch_assoc()) {
echo "<tr>";
echo "<td>";
echo $row["center_name"];
echo "</td>";
echo "<td>";
echo $row["center_address"];
echo "</td>";
echo "<td>";
echo $row["center_pin"];
echo "</td>";
echo "<td>";
echo $row["slots_available"];
echo "</td>";
echo "<td>";
echo "<form action='bookslotpin.php'>";
echo "<input type='hidden' name='pin' value=".$row["center_pin"].">";
echo "<input type='hidden' name='centername' value=".$row["center_name"].">";
echo "<input type='hidden' name='centeraddress' value=".$row["center_address"].">";
echo "<input type='hidden' name='slotsavailable' value=".$row["slots_available"].">";
echo "<input type='hidden' name='centerdistrictname' value=".$row["center_district_name"].">";
echo "<button>Book Slot</button>";
echo "</form>";
echo "</td>";
echo "</tr>";
// echo "<br>"."Center Name: ". $row["center_name"].
// " Center Address: ".$row["center_address"].
// " Center Pin: ".$row["center_pin"].
// " Slots Available: ".$row["slots_available"]." ";
// echo "<form action='bookslotpin.php'>";
// echo "<input type='hidden' name='pin' value=".$row["center_pin"].">";
// echo "<input type='hidden' name='centername' value=".$row["center_name"].">";
// echo "<input type='hidden' name='centeraddress' value=".$row["center_address"].">";
// echo "<input type='hidden' name='slotsavailable' value=".$row["slots_available"].">";
// echo "<input type='hidden' name='centerdistrictname' value=".$row["center_district_name"].">";
// echo "<button>Book Slot</button>";
// echo "</form>";
}
echo "</table>";
}
?>
</div>
<br>
<!-- End from blog -->
<!-- Start footer -->
<footer id="mu-footer">
<!-- start footer top -->
<div class="mu-footer-top">
<div class="container">
<div class="mu-footer-top-area">
<div class="row">
<div class="col-lg-3 col-md-3 col-sm-3">
<div class="mu-footer-widget">
<h4>Information</h4>
<ul>
<li><a href="#">About Us</a></li>
<li><a href="">Features</a></li>
<li><a href="">Course</a></li>
<li><a href="">Event</a></li>
<li><a href="">Sitemap</a></li>
<li><a href="">Term Of Use</a></li>
</ul>
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<div class="mu-footer-widget">
<h4>Student Help</h4>
<ul>
<li><a href="">Get Started</a></li>
<li><a href="#">My Questions</a></li>
<li><a href="">Download Files</a></li>
<li><a href="">Latest Course</a></li>
<li><a href="">Academic News</a></li>
</ul>
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<div class="mu-footer-widget">
<h4>News letter</h4>
<p>Get latest update, news & academic offers</p>
<form class="mu-subscribe-form">
<input type="email" placeholder="Type your Email">
<button class="mu-subscribe-btn" type="submit">Subscribe!</button>
</form>
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<div class="mu-footer-widget">
<h4>Contact</h4>
<address>
<p>P.O. Box 320, Ross, California 9495, USA</p>
<p>Phone: (415) 453-1568 </p>
<p>Website: www.markups.io</p>
<p>Email: [email protected]</p>
</address>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- end footer top -->
<!-- start footer bottom -->
<div class="mu-footer-bottom">
<div class="container">
<div class="mu-footer-bottom-area">
<p>© All Right Reserved. Designed by <a href="http://www.markups.io/" rel="nofollow">MarkUps.io</a></p>
</div>
</div>
</div>
<!-- end footer bottom -->
</footer>
<!-- End footer -->
<!-- jQuery library -->
<script src="assets/js/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="assets/js/bootstrap.js"></script>
<!-- Slick slider -->
<script type="text/javascript" src="assets/js/slick.js"></script>
<!-- Counter -->
<script type="text/javascript" src="assets/js/waypoints.js"></script>
<script type="text/javascript" src="assets/js/jquery.counterup.js"></script>
<!-- Mixit slider -->
<script type="text/javascript" src="assets/js/jquery.mixitup.js"></script>
<!-- Add fancyBox -->
<script type="text/javascript" src="assets/js/jquery.fancybox.pack.js"></script>
<!-- Custom js -->
<script src="assets/js/custom.js"></script>
</body>
</html>