-
Notifications
You must be signed in to change notification settings - Fork 0
/
checkout.php
287 lines (246 loc) · 13.5 KB
/
checkout.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
<!DOCTYPE html>
<html lang="en">
<?php
include("connection/connect.php");
include_once 'product-action.php';
error_reporting(0);
session_start();
if(empty($_SESSION["user_id"]))
{
header('location:login.php');
}
else{
foreach ($_SESSION["cart_item"] as $item)
{
$item_total += ($item["price"]*$item["quantity"]);
if($_POST['submit'])
{
$SQL="insert into users_orders(u_id,title,quantity,price) values('".$_SESSION["user_id"]."','".$item["title"]."','".$item["quantity"]."','".$item["price"]."')";
mysqli_query($db,$SQL);
$success = "Thankyou! Your Order Placed Successfully!";
}
}
?>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="checkout.png">
<title>Order Checkout</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/animsition.min.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/style.css" rel="stylesheet"> </head>
<body>
<div class="site-wrapper">
<!--header starts-->
<header id="header" class="header-scroll top-header headrom">
<!-- .navbar -->
<nav class="navbar navbar-dark">
<div class="container">
<button class="navbar-toggler hidden-lg-up" type="button" data-toggle="collapse" data-target="#mainNavbarCollapse">☰</button>
<a class="navbar-brand" href="index.php"> <img class="img-rounded" src="images/food-picky-logo.png" alt=""> </a>
<div class="collapse navbar-toggleable-md float-lg-right" id="mainNavbarCollapse">
<ul class="nav navbar-nav">
<li class="nav-item"> <a class="nav-link active" href="index.php">Home <span class="sr-only">(current)</span></a> </li>
<li class="nav-item"> <a class="nav-link active" href="restaurants.php">Restaurants <span class="sr-only"></span></a> </li>
<?php
if(empty($_SESSION["user_id"]))
{
echo '<li class="nav-item"><a href="login.php" class="nav-link active">Login</a> </li>
<li class="nav-item"><a href="registration.php" class="nav-link active">Sign Up</a> </li>';
}
else
{
echo '<li class="nav-item"><a href="your_orders.php" class="nav-link active">Your Orders</a> </li>';
echo '<li class="nav-item"><a href="logout.php" class="nav-link active">LogOut</a> </li>';
}
?>
</ul>
</div>
</div>
</nav>
<!-- /.navbar -->
</header>
<div class="page-wrapper">
<div class="top-links">
<div class="container">
<ul class="row links">
<li class="col-xs-12 col-sm-4 link-item"><span>1</span><a href="restaurants.php">Choose Restaurant</a></li>
<li class="col-xs-12 col-sm-4 link-item "><span>2</span><a href="#">Pick your favourite dishes</a></li>
<li class="col-xs-12 col-sm-4 link-item active" ><span>3</span><a href="checkout.php">Get delivered & Pay</a></li>
</ul>
</div>
</div>
<div class="container">
<span style="color:green;">
<?php echo $success; ?>
</span>
</div>
<div class="container m-t-30">
<form action="" method="post">
<div class="widget clearfix">
<div class="widget-body">
<form method="post" action="#">
<div class="row">
<div class="col-sm-12">
<div class="cart-totals margin-b-20">
<div class="cart-totals-title">
<h4>Cart Summary</h4> </div>
<div class="cart-totals-fields">
<table class="table">
<tbody>
<tr>
<td>Cart Subtotal</td>
<td> ₹<?php echo $item_total; ?></td>
</tr>
<tr>
<td>Shipping & Handling</td>
<td>FREE*</td>
</tr>
<tr>
<td class="text-color"><strong>Total</strong></td>
<td class="text-color"><strong> ₹<?php echo $item_total; ?></strong></td>
</tr>
</tbody>
</table>
</div>
</div>
<!--cart summary-->
<div class="payment-option">
<ul class=" list-unstyled">
<li>
<label class="custom-control custom-radio m-b-20">
<input name="mod" id="radioStacked1" checked value="COD" type="radio" class="custom-control-input"> <span class="custom-control-indicator"></span> <span class="custom-control-description">Cash on delivery</span>
<br> <span>Pay digitally with SMS Pay Link. Cash may not be accepted in COVID restricted areas.</span> </label>
</li>
<li>
<label class="custom-control custom-radio m-b-10">
<input name="mod" type="radio" value="paypal" class="custom-control-input"> <span class="custom-control-indicator"></span> <span class="custom-control-description">Credit Card<img src="images/paypal.jpg" alt="" width="90"></span> </label>
</li>
</ul>
<p class="text-xs-center"> <input type="submit" onclick="return confirm('Are you sure?');" name="submit" class="btn btn-outline-success btn-block" value="Order now"> </p>
</div>
</form>
</div>
</div>
</div>
</div>
</form>
</div>
<!-- start: FOOTER -->
<footer class="footer">
<div class="container">
<!-- top footer statrs -->
<div class="row top-footer">
<div class="col-xs-12 col-sm-3 footer-logo-block color-gray">
<a href="#"> <img src="images/food-picky-logo.png" alt="Footer logo"> </a> <span>Choose it & Enjoy your meals! </span> </div>
<div class="col-xs-12 col-sm-2 about color-gray">
<h5>About Us</h5>
<ul>
<li><a href="#">Our Mission</a></li>
<li><a href="#">Social Media</a></li>
<li><a href="#">Testimonials</a></li>
<li><a href="#">We are hiring</a></li>
<li><a href="#">Join us Today</a></li>
</ul>
</div>
<div class="col-xs-12 col-sm-2 how-it-works-links color-gray">
<h5>How it Works?</h5>
<ul>
<li><a href="#">Enter your location</a></li>
<li><a href="#">Choose the restaurant</a></li>
<li><a href="#">Choose your dishes</a></li>
<li><a href="#">Get delivered</a></li>
<li><a href="#">Pay on delivery</a></li>
<li><a href="#">Enjoy your meals :)</a></li>
</ul>
</div>
<div class="col-xs-12 col-sm-2 pages color-gray">
<h5>Legal</h5>
<ul>
<li><a href="#">Terms & Conditions</a> </li>
<li><a href="#">Refund & Cancellation</a> </li>
<li><a href="#">Privacy Policy</a> </li>
<li><a href="#">Cookie Policy</a> </li>
<li><a href="#">Offer Terms</a> </li>
</ul>
</div>
<div class="col-xs-12 col-sm-3 popular-locations color-gray">
<h5>Locations We Deliver To</h5>
<ul>
<li><a href="#">Guwahati</a> </li>
<li><a href="#">Kolkata</a> </li>
<li><a href="#">Silchar</a> </li>
<li><a href="#">nadia</a> </li>
<li><a href="#">beltola</a> </li>
<li><a href="#">K.Nagar</a> </li>
<li><a href="#">tezpur</a> </li>
<li><a href="#">malda</a> </li>
<li><a href="#">Bongaigaon</a> </li>
<li><a href="#">siliguri</a> </li>
</ul>
</div>
</div>
<!-- top footer ends -->
<!-- bottom footer statrs -->
<div class="bottom-footer">
<div class="row">
<div class="col-xs-12 col-sm-3 payment-options color-gray">
<h5>All Major Credit Cards Accepted</h5>
<ul>
<li>
<a href="#"> <img src="images/paypal.png" alt="Paypal"> </a>
</li>
<li>
<a href="#"> <img src="images/mastercard.png" alt="Mastercard"> </a>
</li>
<li>
<a href="#"> <img src="images/maestro.png" alt="Maestro"> </a>
</li>
<li>
<a href="#"> <img src="images/stripe.png" alt="Stripe"> </a>
</li>
<li>
<a href="#"> <img src="images/bitcoin.png" alt="Bitcoin"> </a>
</li>
</ul>
</div>
<div class="col-xs-12 col-sm-4 address color-gray">
<h5>Address:</h5>
<p>Mahatma Gandhi Salai, Guwahati - 600034.</p>
<h5>Call us at: <a href="tel:+910000000000">+919876543210</a></h5></div>
<div class="col-xs-12 col-sm-5 additional-info color-gray">
<h5>Who are we?</h5>
<p>Launched in 2021, Our technology platform connects customers, restaurant partners and delivery partners, serving their multiple needs. Customers use our platform to search and discover restaurants, read and write customer generated reviews and view and upload photos, order food delivery, book a table and make payments while dining-out at restaurants.</p>
</div>
</div>
</div>
<!-- bottom footer ends -->
</div>
</footer>
<!-- end:Footer -->
</div>
<!-- end:page wrapper -->
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<script src="js/jquery.min.js"></script>
<script src="js/tether.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/animsition.min.js"></script>
<script src="js/bootstrap-slider.min.js"></script>
<script src="js/jquery.isotope.min.js"></script>
<script src="js/headroom.js"></script>
<script src="js/foodpicky.min.js"></script>
</body>
</html>
<?php
}
?>