From a6023e2979f08a9f565b2b9087e003806ce32ee6 Mon Sep 17 00:00:00 2001 From: Juthatip McDevitt Date: Tue, 18 Jun 2024 12:39:24 -0500 Subject: [PATCH] updated admin dashboard-additional accommodation section --- hotel_booking/admin/accomm.php | 82 +++++++++++++++++++++-- hotel_booking/admin/ajax/accomm.php | 35 ++++++++++ hotel_booking/admin/components/script.php | 6 +- 3 files changed, 116 insertions(+), 7 deletions(-) diff --git a/hotel_booking/admin/accomm.php b/hotel_booking/admin/accomm.php index 3bb94f0..d4d6f38 100644 --- a/hotel_booking/admin/accomm.php +++ b/hotel_booking/admin/accomm.php @@ -34,7 +34,7 @@
- + @@ -57,11 +57,11 @@
# Name
- + - + @@ -101,7 +101,7 @@ + + + + + data; + $i++; + } + } + + if(isset($_POST['remove_addiAccomm'])){ + $frm_data = filteration($_POST); + $values = [$frm_data['remove_addiAccomm']]; + $q = "DELETE FROM `additional_accomm` WHERE `id`=?"; + $res = delete($q, $values, 'i'); + echo $res; + } + ?> \ No newline at end of file diff --git a/hotel_booking/admin/components/script.php b/hotel_booking/admin/components/script.php index 96ac30d..68032e2 100644 --- a/hotel_booking/admin/components/script.php +++ b/hotel_booking/admin/components/script.php @@ -11,9 +11,13 @@ `; - document.body.append(element); + setTimeout(removeAlert, 2000) } + function removeAlert(){ + document.getElementsByClassName('alert')[0].remove(); + } + //navbar-active(admin) function setActive(){ let navbar = document.getElementById('dashboard-menu');
# NameDetailDetail Status
$i$row[name]$row[detail] + +