-
Notifications
You must be signed in to change notification settings - Fork 2
/
payment.php
361 lines (248 loc) · 10.9 KB
/
payment.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
<?php
session_start();
error_reporting(0);
include('includes/config.php');
?>
<!DOCTYPE HTML>
<html>
<!-- HEAD TAG STARTS -->
<head>
<title>TMS |Payment</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="applijewelleryion/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<link href="css/main.css" rel="stylesheet">
<link href="css/bootstrap.css" rel='stylesheet' type='text/css' />
<link href="css/style.css" rel='stylesheet' type='text/css' />
<link href='//fonts.googleapis.com/css?family=Open+Sans:400,700,600' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Roboto+Condensed:400,700,300' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
<link href="css/font-awesome.css" rel="stylesheet">
<!-- Custom Theme files -->
<script src="js/jquery-1.12.0.min.js"></script>
<script src="js/main.js"></script>
<script src="js/bootstrap.min.js"></script>
<!--animate-->
<link href="css/animate.css" rel="stylesheet" type="text/css" media="all">
<script src="js/wow.min.js"></script>
<link rel="stylesheet" href="css/jquery-ui.css" />
<script>
new WOW().init();
</script>
</head>
<!-- HEAD TAG ENDS -->
<!-- BODY TAG STARTS -->
<body>
<!-- top-header -->
<?php include('includes/header.php');?>
<div class="slider-3">
<div class="container">
<h1 class="wow zoomIn animated animated" data-wow-delay=".5s" style="visibility: visible; animation-delay: 0.5s; animation-name: zoomIn;"> TMS -Payment</h1>
</div>
</div>
<!--- /slider ---->
<?php include("common/headerLoggedIn.php"); ?>
<?php
$mode=$_POST["modeHidden"];
if($mode=="ReturnTripFlight" or $mode=="OneWayFlight") {
$totalPassengers=$_POST["totalPassengersHidden"];
for($i=1; $i<=$totalPassengers; $i++) {
$name[$i]=$_POST["name$i"];
$gender[$i]=$_POST["gender$i"];
}
$fare=$_POST["fareHidden"];
$type=$_POST["typeHidden"];
$class=$_POST["classHidden"];
$origin=$_POST["originHidden"];
$destination=$_POST["destinationHidden"];
$depart=$_POST["departHidden"];
$return=$_POST["returnHidden"];
$adults=$_POST["adultsHidden"];
$children=$_POST["childrenHidden"];
$noOfPassengers=(int)$adults+(int)$children;
if($type=="Return Trip") {
$flightNoOutbound=$_POST["flightNoOutboundHidden"];
$flightNoInbound=$_POST["flightNoInboundHidden"];
}
elseif($type=="One Way") {
$flightNoOutbound=$_POST["flightNoOutboundHidden"];
}
if($class=="Economy Class")
$className="Economy";
else
$className="Business";
} // for flights
elseif($mode=="hotel") {
$fare=$_POST["fareHidden"];
$hotelID=$_POST["hotelIDHidden"];
} //for hotels
elseif($mode=="cabs") {
$fare=$_SESSION["cabsFare"];
$carID=$_SESSION["carID"];
} //for hotels
elseif($mode=="bus") {
$totalPassengers=$_POST["totalPassengersHidden"];
$fare=$_POST["fareHidden"];
$busID=$_POST["busIDHidden"];
$origin=$_POST["originHidden"];
$destination=$_POST["destinationHidden"];
for($i=1; $i<=$totalPassengers; $i++) {
$name[$i]=$_POST["name$i"];
$gender[$i]=$_POST["gender$i"];
}
} //for bus
elseif($mode=="train") {
$totalPassengers=$_POST["totalPassengersHidden"];
$fare=$_POST["fareHidden"];
$trainID=$_POST["trainIDHidden"];
$origin=$_POST["originHidden"];
$destination=$_POST["destinationHidden"];
$date=$_POST["dateHidden"];
$day=$_POST["dayHidden"];
$class=$_POST["classHidden"];
for($i=1; $i<=$totalPassengers; $i++) {
$name[$i]=$_POST["name$i"];
$gender[$i]=$_POST["gender$i"];
}
} //for train
?>
<div class="spacer">a</div>
<div class="col-sm-12 paymentWrapper">
<div class="headingOne">
Payment
</div>
<div class="totalAmount">
Amount to be paid: <span class="sansSerif">₹</span> <?php echo $fare; ?>
</div>
<!--<div class="col-sm-3"></div>-->
<div class="col-sm-3"></div>
<div class="col-sm-6">
<div class="boxCenter">
<div class="col-sm-12 tag">
Card Number:
</div>
<div class="col-sm-12">
<input type="text" class="input" name="cardNumber" placeholder="Enter the card number" id="cardNumber"/>
</div>
<div class="col-sm-12 tag">
Name on Card:
</div>
<div class="col-sm-12">
<input type="text" class="input" name="nameOnCard" placeholder="Enter the name of the card holder" id="nameOnCard"/>
</div>
<div class="col-sm-6 tag">
CVV:
</div>
<div class="col-sm-6 tag">
Expiry:
</div>
<div class="col-sm-6">
<input type="password" class="inputSmall" name="cvv" placeholder="CVV" id="cvv"/>
</div>
<div class="col-sm-6">
<input type="text" class="inputSmall" name="expiry" placeholder="MM/YY" id="cardExpiry"/>
</div>
<!-- flights -->
<?php if($mode=="ReturnTripFlight" or $mode=="OneWayFlight"): ?>
<form action="generateTicket.php" method="POST">
<div class="col-sm-12 bookingButton text-center">
<input type="submit" class="paymentButton" value="Pay Now">
</div>
<input type="hidden" name="totalPassengersHidden" value="<?php echo $totalPassengers; ?>">
<input type="hidden" name="fareHidden" value="<?php echo $fare; ?>">
<input type="hidden" name="typeHidden" value="<?php echo $type; ?>">
<input type="hidden" name="classHidden" value="<?php echo $class; ?>">
<input type="hidden" name="originHidden" value="<?php echo $origin; ?>">
<input type="hidden" name="destinationHidden" value="<?php echo $destination; ?>">
<input type="hidden" name="departHidden" value="<?php echo $depart; ?>">
<input type="hidden" name="returnHidden" value="<?php echo $return; ?>">
<input type="hidden" name="adultsHidden" value="<?php echo $adults; ?>">
<input type="hidden" name="childrenHidden" value="<?php echo $children; ?>">
<input type="hidden" name="modeHidden" value="<?php echo $mode ?>">
<?php for($i=1; $i<=$totalPassengers; $i++) {?>
<input type="hidden" name="nameHidden<?php echo $i; ?>" value="<?php echo $name[$i]; ?>">
<input type="hidden" name="genderHidden<?php echo $i; ?>" value="<?php echo $gender[$i]; ?>">
<?php } ?>
<?php if($type=="Return Trip") { ?>
<input type="hidden" name="flightNoOutboundHidden" value="<?php echo $flightNoOutbound; ?>">
<input type="hidden" name="flightNoInboundHidden" value="<?php echo $flightNoInbound; ?>">
<?php } elseif($type=="One Way") { ?>
<input type="hidden" name="flightNoOutboundHidden" value="<?php echo $flightNoOutbound; ?>">
<?php } ?>
</form>
<!-- hotels -->
<?php elseif($mode=="hotel"): ?>
<form action="generateReceipt.php" method="POST">
<div class="col-sm-12 bookingButton text-center">
<input type="submit" class="paymentButton" value="Pay Now">
</div>
<input type="hidden" name="hotelIDHidden" value="<?php echo $hotelID; ?>">
<input type="hidden" name="fareHidden" value="<?php echo $fare; ?>">
</form>
<?php elseif($mode=="cabs"): ?>
<form action="generateRiderReceipt.php" method="POST">
<div class="col-sm-12 bookingButton text-center">
<input type="submit" class="paymentButton" value="Pay Now">
</div>
</form>
<?php elseif($mode=="bus"): ?>
<form action="generateBusTicket.php" method="POST">
<div class="col-sm-12 bookingButton text-center">
<?php $date=$_POST["dateHidden"]; ?>
<input type="hidden" name="dateHidden" value="<?php echo $date; ?>">
<input type="submit" class="paymentButton" value="Pay Now">
</div>
<input type="hidden" name="totalPassengersHidden" value="<?php echo $totalPassengers; ?>">
<input type="hidden" name="fareHidden" value="<?php echo $fare; ?>">
<input type="hidden" name="originHidden" value="<?php echo $origin; ?>">
<input type="hidden" name="destinationHidden" value="<?php echo $destination; ?>">
<input type="hidden" name="departHidden" value="<?php echo $depart; ?>">
<input type="hidden" name="returnHidden" value="<?php echo $return; ?>">
<input type="hidden" name="modeHidden" value="<?php echo $mode ?>">
<?php for($i=1; $i<=$totalPassengers; $i++) {?>
<input type="hidden" name="nameHidden<?php echo $i; ?>" value="<?php echo $name[$i]; ?>">
<input type="hidden" name="genderHidden<?php echo $i; ?>" value="<?php echo $gender[$i]; ?>">
<?php } ?>
<input type="hidden" name="busIDHidden" value="<?php echo $busID; ?>">
</form>
<?php elseif($mode=="train"): ?>
<form action="generateTrainTicket.php" method="POST">
<div class="col-sm-12 bookingButton text-center">
<?php $date=$_POST["dateHidden"]; ?>
<input type="hidden" name="dateHidden" value="<?php echo $date; ?>">
<input type="hidden" name="dayHidden" value="<?php echo $day; ?>">
<input type="hidden" name="classHidden" value="<?php echo $class; ?>">
<input type="submit" class="paymentButton" value="Pay Now">
</div>
<input type="hidden" name="totalPassengersHidden" value="<?php echo $totalPassengers; ?>">
<input type="hidden" name="fareHidden" value="<?php echo $fare; ?>">
<input type="hidden" name="originHidden" value="<?php echo $origin; ?>">
<input type="hidden" name="destinationHidden" value="<?php echo $destination; ?>">
<input type="hidden" name="modeHidden" value="<?php echo $mode ?>">
<?php for($i=1; $i<=$totalPassengers; $i++) {?>
<input type="hidden" name="nameHidden<?php echo $i; ?>" value="<?php echo $name[$i]; ?>">
<input type="hidden" name="genderHidden<?php echo $i; ?>" value="<?php echo $gender[$i]; ?>">
<?php } ?>
<input type="hidden" name="trainIDHidden" value="<?php echo $trainID; ?>">
</form>
<?php endif; ?>
</div>
</div>
<div class="col-sm-3"></div>
</div> <!-- paymentWrapper -->
<div class="spacerLarge">.</div> <!-- just a dummy class for creating some space -->
<!--- /rooms ---->
<!--- /footer-top ---->
<?php include('includes/footer.php');?>
<!-- signup -->
<?php include('includes/signup.php');?>
<!-- //signu -->
<!-- signin -->
<?php include('includes/signin.php');?>
<!-- //signin -->
<!-- write us -->
<?php include('includes/write-us.php');?>
<!-- //write us -->
</body>
<!-- BODY TAG ENDS -->
</html>