From e6a11517595ae89f2f929c077a7f25ce94955838 Mon Sep 17 00:00:00 2001 From: Juthatip McDevitt Date: Mon, 24 Jun 2024 11:57:40 -0500 Subject: [PATCH] setup shutdown booking functionality for client side --- hotel_booking/booking.php | 6 +++- hotel_booking/components/header.php | 56 +++++++++++++++++++++-------- hotel_booking/index.php | 6 ++-- 3 files changed, 49 insertions(+), 19 deletions(-) diff --git a/hotel_booking/booking.php b/hotel_booking/booking.php index df2c320..3dbdd20 100644 --- a/hotel_booking/booking.php +++ b/hotel_booking/booking.php @@ -126,6 +126,10 @@ $cover_res = mysqli_fetch_assoc($cover_q); $room_cover = ROOM_IMG_PATH.$cover_res['image']; } + $booking = ""; + if(!$settings_r['shutdown']){ + $booking = "Book"; + } //display room (---**accommodation section did not use from database**---) echo <<< data
@@ -154,7 +158,7 @@

$$room_data[price]/night

- Book + $booking
diff --git a/hotel_booking/components/header.php b/hotel_booking/components/header.php index b25d389..4710662 100644 --- a/hotel_booking/components/header.php +++ b/hotel_booking/components/header.php @@ -1,7 +1,20 @@ + Bookings are temporarily closed! + + data; + } ?> +
@@ -93,12 +106,32 @@ -
  • - Login -
  • -
  • - Register -
  • + + + +
    + data; + } else{ + echo << + + +
    + data; + } + ?> @@ -119,13 +152,10 @@ -
    +
    -
    @@ -189,7 +219,6 @@
    - \ No newline at end of file diff --git a/hotel_booking/index.php b/hotel_booking/index.php index b2e098c..48aad33 100644 --- a/hotel_booking/index.php +++ b/hotel_booking/index.php @@ -56,7 +56,7 @@
    - +
    @@ -159,7 +159,6 @@ data; } ?> -
    Booking
    @@ -226,8 +225,7 @@ - - +