-
Notifications
You must be signed in to change notification settings - Fork 2
/
passenger_info_table.php
487 lines (480 loc) · 13.3 KB
/
passenger_info_table.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
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
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
<?php
session_start();
if(($_SESSION["user"])==null)
{
header("location: login.php");
}
?>
<?php
include 'connect.php';
$var=0;
$flight = $_POST["flight"];
$user=$_SESSION["user"];
$class=$_POST["class"];
$seats=$_POST["seats"];
$s=$_POST["seats"];
$_SESSION['class']=$class;
$_SESSION['flightid']=$flight;
$_SESSION['seats']=$seats;
$_SERVER["REQUEST_METHOD"]="";
$sql1 = "SELECT email, phone_number FROM customer WHERE login_username = '$user'";
$result = mysqli_query($conn,$sql1);
$row = mysqli_fetch_row($result);
?>
<!DOCTYPE html>
<html>
<head>
<title>Ticket Booking Form</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" type="text/css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
font-family: "Lato", sans-serif;
background-image: url("https://c1.wallpaperflare.com/preview/466/615/643/cappadocia-turkey-travel-hot-air-balloon.jpg");
background-repeat: no-repeat;
background-size: cover;
}
.sidenav {
height: 100%;
width: 160px;
position: fixed;
z-index: 1;
top: 0;
left: 0;
background-color: #111;
overflow-x: hidden;
padding-top: 20px;
}
.sidenav a {
padding: 6px 8px 6px 16px;
text-decoration: none;
font-size: 25px;
color: #818181;
display: block;
}
.sidenav a:hover {
color: #f1f1f1;
}
.main {
margin-left: 60px; /* Same as the width of the sidenav */
font-size: 28px; /* Increased text to enable scrolling */
padding: 0px 10px;
margin-right: 80px;
}
@media screen and (max-height: 450px) {
.sidenav {padding-top: 15px;}
.sidenav a {font-size: 18px;}
}
html, body {
min-height: 100%;
}
.sidenav {
height: 100%;
width: 160px;
position: fixed;
z-index: 1;
top: 0;
left: 0;
background-color: transparent;
overflow-x: hidden;
padding-top: 20px;
}
.sidenav a {
padding: 6px 8px 6px 16px;
text-decoration: none;
font-size: 25px;
color: BLACK;
display: block;
}
.sidenav a:hover {
color: #f1f1f1;
}
body, div, form, input, select, textarea, p {
padding: 0;
margin: 0;
outline: none;
font-family: Roboto, Arial, sans-serif;
font-size: 14px;
color: black;
line-height: 22px;
}
h1 {
position: absolute;
margin: 0;
line-height: 55px;
font-size: 55px;
color: #fff;
z-index: 2;
}
.testbox {
display: flex;
justify-content: center;
align-items: center;
height: inherit;
padding: 20px;
}
form {
width: 100%;
padding: 20px;
border-radius: 6px;
background: #fff;
box-shadow: 0 0 30px 0 #a37547;
}
.banner {
position: relative;
height: 230px;
background-image: url("https://c1.wallpaperflare.com/preview/466/615/643/cappadocia-turkey-travel-hot-air-balloon.jpg");
background-size: cover;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
.banner::after {
content: "";
background-color: rgba(0, 0, 0, 0.4);
position: absolute;
width: 100%;
height: 100%;
}
input, select, textarea {
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 3px;
}
input {
width: calc(100% - 10px);
padding: 5px;
}
select {
width: 100%;
padding: 7px 0;
background: transparent;
}
textarea {
width: calc(100% - 12px);
padding: 5px;
}
.item:hover p, .item:hover i, .question:hover p, .question label:hover, input:hover::placeholder {
color: #a37547;
}
.item input:hover, .item select:hover, .item textarea:hover {
border: 1px solid transparent;
box-shadow: 0 0 6px 0 #a37547;
color: #a37547;
}
.item {
position: relative;
margin: 10px 0;
}
input[type=radio], input[type=checkbox] {
display: none;
}
label.radio {
position: relative;
display: inline-block;
margin: 5px 20px 15px 0;
cursor: pointer;
}
.question span {
margin-left: 30px;
}
label.radio:before {
content: "";
position: absolute;
left: 0;
width: 17px;
height: 17px;
border-radius: 50%;
border: 2px solid #ccc;
}
input[type=radio]:checked + label:before, label.radio:hover:before {
border: 2px solid #a37547;
}
label.radio:after {
content: "";
position: absolute;
top: 6px;
left: 5px;
width: 8px;
height: 4px;
border: 3px solid #a37547;
border-top: none;
border-right: none;
transform: rotate(-45deg);
opacity: 0;
}
input[type=radio]:checked + label:after {
opacity: 1;
}
.btn-block {
margin-top: 10px;
text-align: center;
}
button {
width: 150px;
padding: 10px;
border: none;
border-radius: 5px;
background: #6b4724;
font-size: 16px;
color: #fff;
cursor: pointer;
}
button:hover {
box-shadow: 0 0 18px 0 #3d2914;
}
@media (min-width: 568px) {
.name-item, .city-item {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.name-item input, .city-item input {
width: calc(50% - 20px);
}
.city-item select {
width: calc(50% - 8px);
}
}
#side a, .dropdown-btn {
padding: 6px 8px 6px 16px;
text-decoration: none;
font-size: 20px;
color: white;
display: block;
border: none;
background: none;
width: 100%;
text-align: left;
cursor: pointer;
outline: none;
}
#side a:hover, .dropdown-btn:hover {
color: yellow;
}
.sticky {
position: fixed;
top: 0;
width: 100%;
}
.sticky + .content {
padding-top: 60px;
}
#menu{
width:50px;
position: fixed;
right: 65px;
top:35px;
z-index:2;
cursor:pointer;
}
#side{
width:250px;
height:700px;
position: fixed;
right:-250px;
top:0;
background-color:rgba(0,0,0,0.2);
z-index: 2;
transition: 2s;
overflow-y: scroll;
}
li {list-style-type: none;
font-size: 16pt;
}
nav ul li{
list-style: none;
margin:50px 20px;
}
nav ul li a{
text-transform: uppercase;
text-decoration: none;
color: white;
text-align: right;
}
#navbar {
overflow: hidden;
background-color:rgba(0,0,0,0.5);
text-align: right;
}
#navbar a {
float: right;
display: block;
color: white;
text-align: right;
padding: 30px 30px;
text-decoration: none;
font-size: 17px;
}
#navbar a:hover {
background-color: #ddd;
color: white;
}
#navbar a.active {
background-color: black;
color: white;
}
</style>
</head>
<body>
<div id="navbar">
<div class="container">
<img src="https://5.imimg.com/data5/TK/AD/MY-36130657/flight-booking-500x500.png" class="img-fluid" width="171.2" height="100" style="float:left">
<ul class="nav navbar-nav navbar-right">
<li style="top: 24px;"><a href="profile.php"><span class="glyphicon glyphicon-user"></span> <?php print_r($user);?></a></li>
</ul>
</div>
</div>
<div class="main">
<nav id="side">
<ul>
<br>
<br>
<br>
<br>
<br>
<br>
<li><a href="profile.php">Profile</a></li>
<li><a href="searchflights.php">Book Ticket</a></li>
<li><a href="enquiry.php">Enquiry</a></li>
<li><a href="logout.php"><span class="glyphicon glyphicon-log-out"></span> logout</a></li>
</ul>
</nav>
<img style="top: 120px;" src="https://cdn1.iconfinder.com/data/icons/mobile-device/512/settings-option-configurate-gear-blue-round-512.png" style="width: 70px;"id="menu">
<div class="main">
<div class="testbox">
<form action="passenger.php" method="post">
<div class="banner">
<h1>Ticket Booking Form</h1>
</div>
<div class="item">
<p>Flight ID</p><span class="error">
<div class="name-item">
<input type="text" value="<?php echo $flight ?>" disabled></input>
</div>
</div>
<div class="item">
<p>Class</p><span class="error">
<div class="name-item">
<input type="text" value="<?php echo $class ?>" disabled></input>
</div>
</div>
<div class="item">
<p>Total Passenger</p><span class="error">
<div class="name-item">
<input type="text" value="<?php echo $seats ?>" disabled></input>
</div>
</div>
<div class="item">
<p>Email</p>
<input type="email" name="email" value="<?php echo $row[0] ?>" />
</div>
<div class="item">
<p>Phone</p>
<input type="text" name="phone" value="<?php echo $row[1] ?>" />
</div>
<?php for ($var = 1; $var <= $seats; $var++) { ?>
<div class="item">
<h2>Passenger <?php echo $var?></h2>
</div>
<br>
<div class="item">
<input type="email" name="email<?php echo $var?>" value="<?php echo $row[0] ?>" hidden/>
</div>
<div class="item">
<input type="text" name="phone<?php echo $var?>" value="<?php echo $row[1] ?>" hidden/>
</div>
<div class="item">
<p>Passenger contact name </p>
<div class="name-item">
<input type="text" id="name<?php echo $var?>" name="name<?php echo $var?>" />
</div>
</div>
<div class="item">
<p>Adhaar Number </p>
<input type="text" name="adhaar<?php echo $var?>"/>
</div>
<div class="item">
<p>Address </p>
<div class="city-item">
<input type="text" name="city<?php echo $var?>" placeholder='City' />
<input type="text" name="zipcode<?php echo $var?>" placeholder="Postal / Zip code" />
<select name="state<?php echo $var?>" >
<option selected value="" disabled>State</option>
<option value="Gujarat">Gujarat</option>
<option value="Andhra Pradesh">Andhra Pradesh</option>
<option value="Maharashtra">Maharashtra</option>
<option value="Tamil Nadu">Tamil Nadu</option>
<option value="Kerala">Kerala</option>
<option value="Maharashtra">Maharashtra</option>
<option value="Madhya Pradesh">Madhya Pradesh</option>
<option value="Karnataka">Karnataka</option>
<option value="Punjab">Punjab</option>
<option value="Haryana">Haryana</option>
<option value="Orissa">Orissa</option>
<option value="Assam">Assam</option>
<option value="Arunachal Pradesh">Arunachal Pradesh</option>
<option value="Nagaland">Nagaland</option>
<option value="Sikkim">Sikkim</option>
<option value="Rajasthan">Rajasthan</option>
<option value="Uttar Pradesh">Uttar Pradesh</option>
<option value="Bihar">Bihar</option>
<option value="Jharkand">Jharkand</option>
<option value="Chattishgarh">Chattishgarh</option>
<option value="Telengana">Telengana</option>
<option value="West Bengal">West Bengal</option>
<option value="Meghalaya">Meghalaya</option>
<option value="Himachal Pradesh">Himachal Pradesh</option>
<option value="Jammu and Kashmir">Jammu and Kashmir</option>
<option value="Goa">Goa</option>
<option value="Manipur">Manipur</option>
<option value="Tripura">Tripura</option>
<option value="Mizoram">Mizoram</option>
<option value="Uttrakand">Uttrakand</option>
</select>
</div>
<div class="question">
<p>Gender</p>
<div class="question-answer">
<div>
<input type="radio" value="Male" id="radio_3<?php echo $var?>" name="gender<?php echo $var?>"/>
<label for="radio_3<?php echo $var?>" class="radio"><span>Male</span></label>
</div>
<div>
<input type="radio" value="Female" id="radio_4<?php echo $var?>" name="gender<?php echo $var?>"/>
<label for="radio_4<?php echo $var?>" class="radio"><span>Female</span></label>
</div>
</div>
<p>Date Of Birth </p>
<div class="day-visited">
<input type="date" name="dob<?php echo $var?>" max="2021-04-26" />
</div>
<br>
<?php }?>
<div class="btn-block">
<button type="submit">Book</button>
</div>
</div>
</form>
</div>
</div>
<script>
var menu=document.getElementById("menu");
var side=document.getElementById("side");
side.style.right="-250px";
menu.onclick=function(){
if(side.style.right=="-250px"){
side.style.right="0px"
}
else{
side.style.right="-250px"
}
}
</script>
</body>
</html>