-
Notifications
You must be signed in to change notification settings - Fork 2
/
billing.php
316 lines (251 loc) · 8.84 KB
/
billing.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
<?php
include('connection.php');
date_default_timezone_set("Asia/Kolkata");
if(isset($_POST['name'])){
$name = $_POST['name'];
$email = $_POST['email'];
$contact = $_POST['contact'];
$date = $_POST['date'];
$dest = $_POST['dest'];
$password = $_POST['password'];
$query = mysqli_query("insert into pass(name, email, contact, date, dest, password) values ('$name', '$email', '$contact', '$date', '$dest', '$password')");
$lid = mysqli_insert_id();
$nod = round((strtotime($date) - time())/(60*60*24))+1;
$result = mysqli_query("select price from destination where name = '$dest'");
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Cloud Based Bus Pass System</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:200,300,400,700,900|Display+Playfair:200,300,400,700">
<link rel="stylesheet" href="fonts/icomoon/style.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/magnific-popup.css">
<link rel="stylesheet" href="css/jquery-ui.css">
<link rel="stylesheet" href="css/owl.carousel.min.css">
<link rel="stylesheet" href="css/owl.theme.default.min.css">
<link rel="stylesheet" href="css/bootstrap-datepicker.css">
<link rel="stylesheet" href="fonts/flaticon/font/flaticon.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/build/mediaelementplayer.min.css">
<link rel="stylesheet" href="css/aos.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="site-wrap">
<div class="site-mobile-menu">
<div class="site-mobile-menu-header">
<div class="site-mobile-menu-close mt-3">
<span class="icon-close2 js-menu-toggle"></span>
</div>
</div>
<div class="site-mobile-menu-body"></div>
</div>
<header class="site-navbar py-1" role="banner">
<div class="container">
<div class="row align-items-center">
<div class="col-6 col-xl-2">
<h1 class="mb-0"><a href="index.html" class="text-black h2 mb-0">Travelers</a></h1>
</div>
<div class="col-10 col-md-8 d-none d-xl-block">
<nav class="site-navigation position-relative text-right" role="navigation">
<ul class="site-menu js-clone-nav mx-auto d-none d-lg-block">
<li class="active">
<a href="index.html">Home</a>
</li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
<li><a href="manage.php">Manage Pass</a></li>
<li><a href="bus_details.html">Bus Details</a></li>
</ul>
</nav>
</div>
</div>
</div>
</header>
<style>
.row {
display: -ms-flexbox; /* IE10 */
display: flex;
-ms-flex-wrap: wrap; /* IE10 */
flex-wrap: wrap;
margin: 0 -16px;
}
.col-25 {
-ms-flex: 25%; /* IE10 */
flex: 25%;
}
.col-50 {
-ms-flex: 50%; /* IE10 */
flex: 50%;
}
.col-75 {
-ms-flex: 75%; /* IE10 */
flex: 75%;
}
.col-25,
.col-50,
.col-75 {
padding: 0 16px;
}
.container {
padding: 5px 20px 15px 20px;
border-radius: 3px;
}
input[type=text] {
width: 100%;
margin-bottom: 20px;
padding: 12px;
border: 1px solid #ccc;
border-radius: 3px;
}
input[type=password] {
width: 100%;
margin-bottom: 20px;
padding: 12px;
border: 1px solid #ccc;
border-radius: 3px;
}
label {
margin-bottom: 10px;
display: block;
}
.icon-container {
margin-bottom: 20px;
padding: 7px 0;
font-size: 24px;
}
.btn {
background-color: #4CAF50;
color: white;
padding: 12px;
margin: 10px 0;
border: none;
width: 100%;
border-radius: 3px;
cursor: pointer;
font-size: 17px;
}
.btn:hover {
background-color: #45a049;
}
span.price {
float: right;
color: grey;
}
/* Responsive layout - when the screen is less than 800px wide, make the two columns stack on top of each other instead of next to each other (and change the direction - make the "cart" column go on top) */
@media (max-width: 800px) {
.row {
flex-direction: column-reverse;
}
.col-25 {
margin-bottom: 20px;
}
}
</style>
<div class="site-blocks-cover inner-page-cover" style="background-image: url(images/hero_bg_2.jpg);" data-aos="fade" data-stellar-background-ratio="0.5">
<div class="container">
<div class="row align-items-center justify-content-center text-center">
<div class="col-md-8" data-aos="fade-up" data-aos-delay="400">
<h1 class="text-white font-weight-light">Book Your Pass</h1>
<div><a href="index.html">Home</a> <span class="mx-2 text-white">•</span> <span class="text-white">Payment</span></div>
</div>
</div>
</div>
</div>
<div class="row" style="margin-right: auto; margin-left: auto">
<div class="col-75">
<div class="container">
<form action="invoice.php" method="post">
<div class="row">
<div class="col-50">
<h3><br>Payment</h3>
<label for="fname">Accepted Cards</label>
<div class="icon-container">
<img src="https://img.icons8.com/ios/50/000000/visa.png">
<img src="https://img.icons8.com/cute-clipart/64/000000/mastercard.png">
<i class="fa fa-cc-mastercard" style="color:red;"></i>
<i class="fa fa-cc-discover" style="color:orange;"></i>
<div>Rs.
<?php
$price = mysqli_fetch_assoc($result)['price'];
$amt = $price * $nod;
echo $amt;
?>
</div>
</div>
<input type="hidden" value="<?php echo $lid ?>" name="id">
<input type="hidden" value="<?php echo $amt ?>" name="amt">
<label for="cname">Name on Card</label>
<input type="text" id="cname" name="cardname" value="<?php echo $name; ?>" required>
<label for="ccnum">Card number</label>
<input type="text" id="ccnum" name="cardnumber" placeholder="1111-2222-3333-4444" required>
<div class="row">
<div class="col-50">
<label for="expyear">Exp Year</label>
<input type="text" id="expyear" name="expyear" placeholder="YYYY" required>
</div>
<div class="col-50">
<label for="expmonth">Exp Month</label>
<input type="text" id="expmonth" name="expmonth" placeholder="MM" required>
</div>
</div>
<label for="cvv">CVV</label>
<input type="password" id="cvv" name="cvv" placeholder="***" required>
</div>
</div>
<input type="submit" value="Continue to checkout" class="btn">
</form>
</div>
</div>
</div>
<footer class="site-footer">
<div class="container">
<div class="row">
<div class="col-lg-4">
<div class="mb-5">
<h3 class="footer-heading mb-4">About Travelers</h3>
<p>Provides student a pass for their daily life to travel to/from GLA University, Mathura</p>
</div>
</div>
<div class="col-lg-4 mb-5 mb-lg-0" style="margin-left: auto;">
<div class="row mb-5">
<div class="col-md-12">
<h3 class="footer-heading mb-4">Navigations</h3>
</div>
<div class="col-md-6 col-lg-6">
<ul class="list-unstyled">
<li><a href="#">Home</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="row pt-5 mt-5 text-center">
<div class="col-md-12">
<p>
Copyright ©<script>document.write(new Date().getFullYear());</script> All rights reserved
</p>
</div>
</div>
</div>
</footer>
</div>
<script src="js/jquery-3.3.1.min.js"></script>
<script src="js/jquery-migrate-3.0.1.min.js"></script>
<script src="js/jquery-ui.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/jquery.stellar.min.js"></script>
<script src="js/jquery.countdown.min.js"></script>
<script src="js/jquery.magnific-popup.min.js"></script>
<script src="js/bootstrap-datepicker.min.js"></script>
<script src="js/aos.js"></script>
<script src="js/main.js"></script>
</body>
</html>