-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpayment.php
More file actions
235 lines (219 loc) · 6.15 KB
/
payment.php
File metadata and controls
235 lines (219 loc) · 6.15 KB
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
<?php
if(session_status() == PHP_SESSION_NONE)
{
session_start();//start session if session not start
}
if(isset($_SESSION['tracker'])){
?>
<!DOCTYPE html>
<html lang="">
<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>Train Ticketing </title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" type="text/css" href="assets/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="assets/css/bootstrap-theme.min.css">
</head>
<body style="background-color: lightblue;">
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">IRCTC</a>
</div>
<ul class="nav navbar-nav">
<li class="active">
<a href="#">Rerservation
<span class="glyphicon glyphicon-share-alt" aria-hidden="true"></span>
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="index.php"><span class="glyphicon glyphicon-backward"></span> Back To Home</a></li>
</ul>
</div>
</nav>
<div class="container-fluid">
<div class="col-md-1"></div>
<div class="col-md-10">
<div class="panel panel-danger">
<div class="panel-heading">
<h3 class="panel-title">STEPS FOR BOOKING</h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">1. ROUTE
</h3>
</div>
<div class="panel-body">
SCHEDULE OF TRAVEL
</div>
</div>
</div>
<div class="col-md-3">
<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title">2. ACCOMODATION
</h3>
</div>
<div class="panel-body">
ACCOMODATION TYPE
</div>
</div>
</div>
<div class="col-md-3">
<div class="panel panel-success">
<div class="panel-heading">
<h3 class="panel-title">3. PASSENGER INFO
</h3>
</div>
<div class="panel-body">
PASSENGER DETAILS
</div>
</div>
</div>
<div class="col-md-3">
<div class="panel panel-warning">
<div class="panel-heading">
<h3 class="panel-title">4. PAYMENT INFO
<span class="glyphicon glyphicon-saved" aria-hidden="true"></span>
</h3>
</div>
<div class="panel-body">
TOTAL PAYMENT
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-1"></div>
</div>
<div class="container-fluid">
<div class="col-md-3"></div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-body">
<h2>
<center>PAYMENT INFO</center>
</h2>
<br />
<div class="panel panel-success">
<div class="panel-heading">
<h3 class="panel-title"><center>DEPARTURE</center></h3>
</div>
<div class="panel-body">
<strong>
<i>IRCTC</i>
<h3>
<?php require_once('data/depart_from_to.php');
echo $origin['origin_desc'];
?>
-
<?= $dest['dest_destination']; ?>
</h3>
<p>Departure Date: <?= $_SESSION['departure_date']; ?> @9:00AM</p>
</strong>
<i>Estimated Arrival Time: The Next Day @3:00PM</i><br />
<strong>
<?php require_once('data/get_accomodation.php');
echo $accomodation['acc_type'];
?>
</strong>
</div>
</div>
<div class="panel panel-success">
<div class="panel-heading">
<h3 class="panel-title">CONTACT INFO</h3>
</div>
<div class="panel-body">
<?php require_once('data/getBooked.php'); ?>
<strong>Book By:</strong> <?= ucwords($bookByInfo['book_by']); ?><br />
<strong>Contact #:</strong> <?= $bookByInfo['book_contact']; ?><br />
<strong>Address:</strong> <?= $bookByInfo['book_address']; ?><br />
</div>
</div>
<div class="container-fluid">
<strong>
<span class="glyphicon glyphicon-user" aria-hidden="true"></span>
PASSENGERS</strong>
<table id="myTable-party" class="table table-bordered table-hover" cellspacing="0" width="100%">
<thead>
<tr>
<th>
<center>
Name
</center>
</th>
<th>
<center>
Age
</center>
</th>
<th>
<center>
Gender
</center>
</th>
<th>
<center>
Departure Price
</center>
</th>
</tr>
</thead>
<tbody>
<?php
require_once('data/getBooked.php');
$totalPayment = 0;
$tracker = '';
foreach($bookPass as $bp):
$name = $bp['book_name'];
$name = ucwords($name);
$price = $bp['acc_price'];
$totalPayment += $price;
$tracker = $bp['book_tracker'];
?>
<tr align="center">
<td><?= $name; ?></td>
<td><?= $bp['book_age']; ?></td>
<td><?= $bp['book_gender']; ?></td>
<td><?= $price; ?></td>
</tr>
<?php endforeach; ?>
<tr>
<td></td>
<td></td>
<td align="right"><strong>TOTAL:</strong></td>
<td align="center"><strong><?= $totalPayment; ?></strong></td>
</tr>
</tbody>
<strong>- Booked ID: <?= $tracker; ?></strong>
</table>
<center>
<a href="index.php" class="btn btn-success">Return Home
<span class="glyphicon glyphicon-backward" aria-hidden="true"></span>
</a>
</center>
</div>
</div>
</div>
</div>
<div class="col-md-3"></div>
</div>
<script type="text/javascript" src="assets/js/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="assets/js/bootstrap.min.js"></script>
</body>
</html>
<?php
}else{
echo '<strong>';
echo 'Page Not Exist';
echo '</strong>';
}//end if else isset
?>