X7ROOT File Manager
Current Path:
/home/u126090504/domains/oceanicabeachresort.com/public_html
home
/
u126090504
/
domains
/
oceanicabeachresort.com
/
public_html
/
📁
..
📄
.htaccess
(0 B)
📁
Version
📄
about.php
(4.19 KB)
📁
admin
📁
assets
📄
booking.php
(4.55 KB)
📄
booking_details.php
(4.43 KB)
📄
booking_process.php
(1.12 KB)
📄
config.php
(914 B)
📄
contact.php
(14.48 KB)
📄
contactdb.php
(796 B)
📄
footer.php
(13.26 KB)
📄
gallery.php
(2.82 KB)
📄
header.php
(19.3 KB)
📁
images
📄
index.php
(2.27 KB)
📄
indexx.php
(75.25 KB)
📁
lib
📄
oce.zip
(106.17 MB)
📄
payment.php
(6.79 KB)
📄
payment_submit.php
(15.1 KB)
📄
payment_verify.php
(2.31 KB)
📁
qrcodes
📄
room-service.php
(8.98 KB)
📄
search_videos.php
(1.76 KB)
📄
services.php
(14.04 KB)
📄
success.php
(2.06 KB)
📄
test_mailer.php
(372 B)
📄
thank-you.php
(1.28 KB)
📁
uploads
📄
videos.php
(6.87 KB)
Editing: booking_process.php
<?php include 'config.php'; function formatDate($d){ $dt = DateTime::createFromFormat('d-m-Y', $d); return $dt ? $dt->format('Y-m-d') : null; } $booking_id = "OC".date("Ymd").rand(1000,9999); $checkin = formatDate($_POST['checkin_date']); $checkout = formatDate($_POST['checkout_date']); $room_id = (int)$_POST['room_id']; $adults = (int)$_POST['adults']; $children = (int)$_POST['children']; /* room fetch */ $room = mysqli_fetch_assoc( mysqli_query($conn,"SELECT room_name, price FROM rooms WHERE id='$room_id'") ); if(!$room){ die("Room not found"); } /* nights */ $in = new DateTime($checkin); $out = new DateTime($checkout); $nights = $in->diff($out)->days; if($nights < 1) $nights = 1; /* amount */ $amount = $nights * $room['price']; /* INSERT (IMPORTANT PART) */ mysqli_query($conn,"INSERT INTO bookings (booking_id, checkin_date, checkout_date, room_type, adults, children, amount, payment_status) VALUES ('$booking_id','$checkin','$checkout','".$room['room_name']."','$adults','$children','$amount','Pending')"); header("Location: booking_details.php?bid=$booking_id"); exit;
Upload File
Create Folder