80 lines
No EOL
2.8 KiB
PHP
80 lines
No EOL
2.8 KiB
PHP
<?php
|
|
require('components/utils.php');
|
|
require('components/db_config.php');
|
|
adminLogin();
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Admin Dashboard-booking records | Midtown Hotel</title>
|
|
<?php require('components/link.php') ?>
|
|
<style>
|
|
.custom-alert-t{
|
|
position:fixed;
|
|
top: 100px;
|
|
right: 25px;
|
|
z-index: 10000;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<?php require('components/sidebar.php')?>
|
|
<div class="container-fluid" id="dashboard-body">
|
|
<div class="row">
|
|
<div class="col-lg-10 ms-auto p-4 overflow-hidden">
|
|
<h4 class="mb-4">Booking Records</h4>
|
|
<div class="card mb-4">
|
|
<div class="card-body">
|
|
<div class="mb-4 text-end">
|
|
<input type="text" oninput="get_booking(this.value)" class="form-control w-25 ms-auto shadow-none" placeholder="Search">
|
|
</div>
|
|
<div class="table-responsive">
|
|
<table class="table table-hover border">
|
|
<thead>
|
|
<tr style="background-color: #D3D3D3;">
|
|
<th scope="col">#</th>
|
|
<th scope="col">User Detail</th>
|
|
<th scope="col">Order Number</th>
|
|
<th scope="col">Room Detail</th>
|
|
<th scope="col">Booking Detail</th>
|
|
<th scope="col">Status</th>
|
|
<th scope="col">Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="table_data">
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php require('components/script.php') ?>
|
|
<script>
|
|
|
|
function get_booking(search=''){
|
|
let xhr = new XMLHttpRequest();
|
|
xhr.open("POST", "ajax/booking_record.php", true);
|
|
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
|
|
|
xhr.onload = function(){
|
|
document.getElementById('table_data').innerHTML = this.responseText;
|
|
}
|
|
xhr.send('get_booking&search='+search);
|
|
}
|
|
|
|
function download_invoice(id){
|
|
window.location.href = 'generate_invoice.php?gen_pdf&id='+id;
|
|
}
|
|
|
|
window.onload = function(){
|
|
get_booking();
|
|
}
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|