-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfirm.html
67 lines (58 loc) · 1.5 KB
/
confirm.html
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
<?php
session_start();
require_once("registration/config.php");
require_once("cart.php");
$num_items = cart_num();
if($num_items == 0){
header("location: home.html");
}
/* Get current city */
$city = "";
if(!isset($_SESSION['city'])){
/* default to Atlanta */
$city = "atlanta";
} else {
$city = $_SESSION['city'];
}
/* Get post information */
$cart = cart_get();
$car_id = $cart[0]['id'];
$order_id = cart_place_order($city);
order_update_stock($city, $car_id);
cart_clear();
$price = intval($_POST['parking']) +intval($_POST['cost']);
?>
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<title>Rental Confirmation</title>
<link href="checkout.css" type="text/css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="checkout-card">
<div class="title">
<p><span>Rental Confirmation!</span> <br> Order #
<?php echo $order_id; ?>
</p>
</div>
<div class="price-container">
<div class="price-card">
<img src="images/checkmark.svg" alt="checkmark" height="320">
</div>
</div>
<div class="detail-info">
<div class="info">
<h3>Total Cost $
<?php echo $price; ?>!</h3>
<small>*Subject to additional taxes and fees</small>
</div>
<form action="home.html" id="return">
<button class="btn">Home</button>
</form>
</div>
</div>
</div>
</body>
</html>