-
Notifications
You must be signed in to change notification settings - Fork 2
/
book.php
238 lines (202 loc) · 10.2 KB
/
book.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
<?php
session_start();
include('config.php');
include('sessioncheck.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Book</title>
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<meta content="" name="keywords">
<meta content="" name="description">
<!-- Facebook Opengraph integration: https://developers.facebook.com/docs/sharing/opengraph -->
<meta property="og:title" content="">
<meta property="og:image" content="">
<meta property="og:url" content="">
<meta property="og:site_name" content="">
<meta property="og:description" content="">
<!-- Twitter Cards integration: https://dev.twitter.com/cards/ -->
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="">
<meta name="twitter:title" content="">
<meta name="twitter:description" content="">
<meta name="twitter:image" content="">
<!-- Place your favicon.ico and apple-touch-icon.png in the template root directory -->
<link href="img/favicon.png" rel="shortcut icon" type="image/png">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,700,700i|Raleway:300,400,500,700,800" rel="stylesheet">
<!-- Bootstrap CSS File -->
<link href="lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Libraries CSS Files -->
<link href="lib/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link href="lib/animate-css/animate.min.css" rel="stylesheet">
<!-- Main Stylesheet File -->
<link href="css/style.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/mainSU.css">
<link rel="stylesheet" type="text/css" href="css/utilSU.css">
</head>
<body>
<div id="preloader"></div>
<?php include('header.php') ?>
<!-- #header -->
<div class="limiter">
<div class="container-login100">
<div class="login100-more" style="background-image: url('img/carbgdash.jpg');"></div>
<div class="wrap-login100 p-l-50 p-r-50 p-t-72 p-b-50">
<?php
$uid = $_SESSION['log']['useruid'];
$qry = mysqli_query($con,"SELECT * FROM logtable WHERE useruid='$uid' ORDER BY id DESC");
$qry1 = mysqli_num_rows($qry);
if($qry1)
{
$row = mysqli_fetch_array($qry);
if($row['payment']=='Paid')
{
?>
<form class="login100-form validate-form" method="post" action="booklot.php">
<span class="login100-form-title p-b-59">
Book a Free Slot
</span>
<div class="wrap-input100 validate-input" data-validate="Car No. is required">
<span class="label-input100">Car No.</span>
<input class="input100" type="text" name="car" placeholder="Car No...." required="required">
<span class="focus-input100"></span>
</div>
<div class="wrap-input100 validate-input" data-validate = "Lot No. is required">
<span class="label-input100">Parking Lot</span>
<select class="input100" name="lot" required="required">
<?php
$qry = mysqli_query($con,"SELECT * FROM lot WHERE status='Free' or status='Leaving' ");
while ($row = mysqli_fetch_array($qry)) {
?>
<option value="<?php echo $row['lotname']; ?>"><?php echo $row['lotname']; ?></option>
<?php
}
?>
</select>
<span class="focus-input100"></span>
</div>
<div class="flex-m w-full p-b-33">
<div class="contact100-form-checkbox">
<input class="input-checkbox100" id="ckb1" type="checkbox" name="remember-me" required="required">
<label class="label-checkbox100" for="ckb1">
<span class="txt1">
I agree to the
<a href="#" class="txt2 hov1">
Terms of User
</a>
</span>
</label>
</div>
</div>
<div class="container-login100-form-btn">
<div class="wrap-login100-form-btn">
<div class="login100-form-bgbtn"></div>
<button class="login100-form-btn">
Book Now
</button>
</div>
</div>
</form>
<?php
}
else
{
?>
<form class="login100-form validate-form" method="post" action="booklot.php">
<span class="login100-form-title p-b-59">
Lot Already Booked!
</span>
</form>
<?php
}
}
else
{
?>
<form class="login100-form validate-form" method="post" action="booklot.php">
<span class="login100-form-title p-b-59">
Book a Free Slot
</span>
<div class="wrap-input100 validate-input" data-validate="Car No. is required">
<span class="label-input100">Car No.</span>
<input class="input100" type="text" name="car" placeholder="Car No...." required="required">
<span class="focus-input100"></span>
</div>
<div class="wrap-input100 validate-input" data-validate = "Lot No. is required">
<span class="label-input100">Parking Lot</span>
<select class="input100" name="lot" required="required">
<?php
$qry = mysqli_query($con,"SELECT * FROM lot WHERE status='Free' or status='Leaving' ");
while ($row = mysqli_fetch_array($qry)) {
?>
<option value="<?php echo $row['lotname']; ?>"><?php echo $row['lotname']; ?></option>
<?php
}
?>
</select>
<span class="focus-input100"></span>
</div>
<div class="flex-m w-full p-b-33">
<div class="contact100-form-checkbox">
<input class="input-checkbox100" id="ckb1" type="checkbox" name="remember-me" required="required">
<label class="label-checkbox100" for="ckb1">
<span class="txt1">
I agree to the
<a href="#" class="txt2 hov1">
Terms of User
</a>
</span>
</label>
</div>
</div>
<div class="container-login100-form-btn">
<div class="wrap-login100-form-btn">
<div class="login100-form-bgbtn"></div>
<button class="login100-form-btn">
Book Now
</button>
</div>
</div>
</form>
<?php
}
?>
</div>
</div>
</div>
<!--===============================================================================================-->
<script src="vendor/jquery/jquery-3.2.1.min.js"></script>
<!--===============================================================================================-->
<script src="vendor/animsition/js/animsition.min.js"></script>
<!--===============================================================================================-->
<script src="vendor/bootstrap/js/popper.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<!--===============================================================================================-->
<script src="vendor/select2/select2.min.js"></script>
<!--===============================================================================================-->
<script src="vendor/daterangepicker/moment.min.js"></script>
<script src="vendor/daterangepicker/daterangepicker.js"></script>
<!--===============================================================================================-->
<script src="vendor/countdowntime/countdowntime.js"></script>
<!--===============================================================================================-->
<script src="js/main.js"></script>
<?php include('footer.php'); ?>
<!-- #footer -->
<a href="#" class="back-to-top"><i class="fa fa-chevron-up"></i></a>
<!-- Required JavaScript Libraries -->
<script src="lib/jquery/jquery.min.js"></script>
<script src="lib/bootstrap/js/bootstrap.min.js"></script>
<script src="lib/superfish/hoverIntent.js"></script>
<script src="lib/superfish/superfish.min.js"></script>
<script src="lib/morphext/morphext.min.js"></script>
<script src="lib/wow/wow.min.js"></script>
<script src="lib/stickyjs/sticky.js"></script>
<script src="lib/easing/easing.js"></script>
<!-- Template Specisifc Custom Javascript File -->
<script src="js/custom.js"></script>
<script src="contactform/contactform.js"></script>
</body>
</html>