created invoice page after make a reservation
This commit is contained in:
parent
0e4d903b5b
commit
265bdd411a
1 changed files with 148 additions and 0 deletions
148
hotel_booking/reserved.php
Normal file
148
hotel_booking/reserved.php
Normal file
|
@ -0,0 +1,148 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require('admin/components/utils.php');
|
||||||
|
require('admin/components/db_config.php');
|
||||||
|
|
||||||
|
date_default_timezone_set("America/Chicago");
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
if(!(isset($_SESSION['login']) && $_SESSION['login'] == true)){
|
||||||
|
redirect('index.php');
|
||||||
|
}
|
||||||
|
if(isset($_POST['reserve_now'])){
|
||||||
|
$orderId = 'ORDS_'.$_SESSION['uerID'].random_int(11111, 9999999999);
|
||||||
|
$customerId = $_SESSION['uerID'];
|
||||||
|
$amount = $_SESSION['room']['payment'];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
///insert data into database
|
||||||
|
$frm_data = filteration($_POST);
|
||||||
|
$query1 = "INSERT INTO `booking_order`(`user_id`, `room_id`, `check_in`, `check_out`, `order_id`) VALUES (?, ?, ?, ?, ?)";
|
||||||
|
insert($query1, [$customerId, $_SESSION['room']['id'], $frm_data['checkin'], $frm_data['checkout'], $orderId], 'issss');
|
||||||
|
|
||||||
|
$booking_id = mysqli_insert_id($con);
|
||||||
|
|
||||||
|
$query2 = "INSERT INTO `booking_detail`(`booking_id`, `room_name`, `price`, `total_pay`, `user_name`, `user_lastname`, `phone`, `address`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)";
|
||||||
|
insert($query2, [$booking_id, $_SESSION['room']['name'], $_SESSION['room']['price'], $amount, $frm_data['firstname'], $frm_data['lastname'], $frm_data['phone'], $frm_data['address']], 'isiissss');
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Reserved Room confirmation | Midtown Hotel</title>
|
||||||
|
<?php require('./components/link.php') ?>
|
||||||
|
<style>
|
||||||
|
.card-header-top, .card-header-bottom{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.card-header-top-left img{
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
.card-header-top-right p{
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 10px;
|
||||||
|
}
|
||||||
|
.card-footer p{
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.card-header-bottom-left p, .card-header-right p{
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 12px;
|
||||||
|
}
|
||||||
|
.text-title{
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
@media (max-width: 550px){
|
||||||
|
.card-header-top-left img{
|
||||||
|
width: 80px;
|
||||||
|
}
|
||||||
|
.card-header-top-right p{
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 5px;
|
||||||
|
}
|
||||||
|
.card-footer p{
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
.card-header-bottom{
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.card-header-bottom-left p, .card-header-right p{
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 10px;
|
||||||
|
}
|
||||||
|
.text-title, .text-subtitle, .card-summary p{
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<div class="card" style="margin: auto; max-width: 650px; margin-top: 50px; margin-bottom: 50px;">
|
||||||
|
<div class="card-header">
|
||||||
|
<div class="card-header-top" style="margin-top: 25px;">
|
||||||
|
<div class="card-header-top-left">
|
||||||
|
<img src="./images/logo.png"/>
|
||||||
|
</div>
|
||||||
|
<div class="card-header-top-right text-end">
|
||||||
|
<p style="font-size: 16px; text-transform: uppercase; font-weight: 600;">Midtown Hotel</p>
|
||||||
|
<p>36381 Trantow Hill,</p>
|
||||||
|
<p>New Port, FL 57941</p>
|
||||||
|
<p>(123) 456-7891</p>
|
||||||
|
<p>accombooking@midtownhotel.com</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-header-bottom" style="margin-top: 25px;">
|
||||||
|
<div class="card-header-bottom-left text-start">
|
||||||
|
<p style="font-weight: 600;">Bill to:</p>
|
||||||
|
<p>First name <span>Last name</span></p>
|
||||||
|
<p>Address</p>
|
||||||
|
<p>Phone</p>
|
||||||
|
</div>
|
||||||
|
<div class="card-header-right text-start">
|
||||||
|
<p>Order ID: </p>
|
||||||
|
<p>Invoice date: </p>
|
||||||
|
<p>Due date: </p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<table class="table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr class="text-start text-title">
|
||||||
|
<th scope="col">Details</th>
|
||||||
|
<th scope="col">Check in</th>
|
||||||
|
<th scope="col">Check out</th>
|
||||||
|
<th scope="col">Price</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr class="text-start text-subtitle">
|
||||||
|
<td>room detail room detail room detail room detail</td>
|
||||||
|
<td>Check-in</td>
|
||||||
|
<td>Check-out</td>
|
||||||
|
<td>price</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="card-summary text-end" style="margin: 20px;">
|
||||||
|
<p>Total: $</p>
|
||||||
|
</div>
|
||||||
|
<div class="card-footer">
|
||||||
|
<p><span style="color: red;">*</span> Please pay the invoice before checking-in to the room. You can pay the invoice by bringing this invoice to make a payment at the hotel reception desk. <span style="color: red;">*</span></p>
|
||||||
|
<p><span style="color: red;">**</span> Check-in time starts at 3:00 pm, but not later than 10:00 pm. Check-out time is until 11:00 am.<span style="color: red;">**</span></p>
|
||||||
|
<p><span style="color: red;">***</span> Please contact accombooking@midtownhotel.com or call (123) 456-7891 if you arrive later than 10:00 pm. Your reservation will be determinated if you do not make a payment or contact the hotel reception desk before 10:00 pm.<span style="color: red;">***</span></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<?php require('./components/script.php') ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Add table
Reference in a new issue