X7ROOT File Manager
Current Path:
/home/hamdjcne/app.hamdalillahitravel.com/app/Views/service
home
/
hamdjcne
/
app.hamdalillahitravel.com
/
app
/
Views
/
service
/
ðŸ“
..
📄
flight.php
(19.89 KB)
📄
flight_form.php
(9.51 KB)
📄
hotel.php
(22.31 KB)
📄
hotel_form.php
(9.42 KB)
📄
request.php
(22.91 KB)
📄
request_form.php
(9.62 KB)
Editing: hotel.php
<?php use App\Models\Crud; $this->Crud = new Crud(); ?> <?=$this->extend('designs/backend');?> <?=$this->section('title');?> <?=$title;?> <?=$this->endSection();?> <?=$this->section('content');?> <!--begin::Wrapper--> <div class="app-wrapper d-flex " style="margin-left: 1px; "> <!--begin::Wrapper container--> <div class="app-container container-fluid "> <!--begin::Main--> <div class="app-main flex-column flex-row-fluid " id="kt_app_main"> <!--begin::Content wrapper--> <div class="d-flex flex-column flex-column-fluid"> <!--begin::Toolbar--> <div id="kt_app_toolbar" class="app-toolbar "> <!--begin::Toolbar container--> <div class="d-flex flex-stack flex-row-fluid"> <!--begin::Toolbar wrapper--> <div class="d-flex flex-column flex-row-fluid"> <!--begin::Breadcrumb--> <ul class="breadcrumb breadcrumb-separatorless fw-semibold mb-3"> <!--begin::Item--> <li class="breadcrumb-item text-gray-600 fw-bold lh-1"> <a href="<?=site_url(); ?>" class="text-white text-hover-success"> <i class="ki-duotone ki-home text-gray-500 fs-2"></i> </a> </li> <!--end::Item--> <!--begin::Item--> <li class="breadcrumb-item"> <i class="ki-duotone ki-right fs-3 text-gray-500 mx-n1"></i> </li> <!--end::Item--> <!--begin::Item--> <li class="breadcrumb-item text-gray-600 fw-bold lh-1"> Hotel Booking Request </li> </ul> <div class="page-title d-flex align-items-center me-3"> <!--begin::Title--> <h1 class="page-heading d-flex text-gray-900 fw-bolder fs-1 flex-column justify-content-center my-0"> Hotel Booking Request List </h1> <!--end::Title--> </div> <!--end::Page title--> </div> <!--end::Toolbar wrapper--> </div> <!--end::Toolbar container--> </div> <!--end::Toolbar--> <!--begin::Content--> <div id="kt_app_content" class="app-content"> <div class="card my-4" id="table_view"> <!--begin::Card header--> <div class="card-header border-0 pt-6"> <!--begin::Card title--> <div class="card-title"> <!--begin::Search--> <div class="d-flex align-items-center position-relative my-1"> <i class="ki-duotone ki-magnifier fs-3 position-absolute ms-5"><span class="path1"></span><span class="path2"></span></i> <input type="text" data-kt-customer-table-filter="search" id="search" class="form-control form-control-solid w-250px ps-12" placeholder="Search Request" /> </div> <!--end::Search--> </div> <!--begin::Card title--> <!--begin::Card toolbar--> <div class="card-toolbar"> <!--begin::Toolbar--> <div class="d-flex justify-content-end" data-kt-customer-table-toolbar="base"> <!--begin::Filter--> <button type="button" class="btn btn-light-success me-3" data-kt-menu-trigger="click" data-kt-menu-placement="bottom-end"> <i class="ki-duotone ki-filter fs-2"><span class="path1"></span><span class="path2"></span></i> Filter </button> <a href="javascript::" class="btn btn-light-info me-3 pop" pageTitle="Add Request" pageSize="modal-md" pageName="<?=site_url('service/hotel/manage'); ?>"> <i class="ki-duotone ki-plus-circle fs-2"><span class="path1"></span><span class="path2"></span></i>Create Request </a> <!--begin::Menu 1--> <div class="menu menu-sub menu-sub-dropdown w-300px w-md-325px" data-kt-menu="true" id="kt-toolbar-filter"> <!--begin::Header--> <div class="px-7 py-5"> <div class="fs-4 text-gray-900 fw-bold">Filter Options</div> </div> <!--end::Header--> <!--begin::Separator--> <div class="separator border-gray-200"></div> <!--end::Separator--> <!--begin::Content--> <div class="px-7 py-5"> <!--begin::Input group--> <div class="mb-10"> <label class="form-label fs-5 fw-semibold mb-3">Status:</label> <select class="form-select" id="status" data-control="select2" data-placeholder="Select a Status" > <option value="all">All Status</option> <option value="Pending">Pending</option> <option value="Approved">Approved</option> </select> </div> <div class="mb-10"> <!--begin::Label--> <label class="form-label fs-5 fw-semibold mb-3">Date Range:</label> <input class="form-control form-control-solid kt_daterangepicker_4" placeholder="Pick date rage" id="datez" /> </div> </div> <!--end::Content--> </div> <!--end::Menu 1--> <!--end::Filter--> </div> <!--end::Toolbar--> </div> <!--end::Card toolbar--> </div> <!--end::Card header--> <!--begin::Card body--> <div class="card-body pt-0 table-responsive"> <!--begin::Table--> <table class="table align-middle table-row-dashed fs-6 gy-5" id="kt_customers_table"> <thead> <tr class="text-start text-gray-500 fw-bold fs-7 text-uppercase gs-0"> <th class="min-w-125px">Date</th> <th class="min-w-125px">Customer</th> <th class="min-w-125px">Location</th> <th class="min-w-150px">Stay Period</th> <th class="min-w-125px">Status</th> <th></th> </tr> </thead> <tbody class="fw-semibold text-gray-600" id="load_data" > </tbody> <tfoot id="loadmore" ></tfoot> </table> <!--end::Table--> </div> <!--end::Card body--> </div> <div class="card my-4" id="message_view" style="display: none;"> <!--begin::Card body--> <div class="card-body"> <!--begin::Layout--> <div class="d-flex flex-column flex-xl-row p-2"> <!--begin::Content--> <div class="flex-lg-row-fluid me-xl-15 mb-20 mb-xl-0"> <!--begin::Ticket view--> <div class="mb-0"> <!--begin::Heading--> <div class="d-flex align-items-center justify-content-between mb-12"> <!--begin::Icon--> <i class="ki-duotone ki-file-added fs-4qx text-success ms-n2 me-3"><span class="path1"></span><span class="path2"></span></i> <!--end::Icon--> <!--begin::Content--> <div class="d-flex flex-column " id="header_resp"> </div> <div class="d-flex flex-column text-right"> <a href="javascript:;" class="me-2 btn btn-icon btn-danger btn-active-color-light btn-sm" data-bs-toggle="tooltip" title="View Booking" onclick="back_ticket()" > <i class="ki-outline ki-arrow-left fs-2"></i> </a> </div> <!--end::Content--> </div> <!--end::Heading--> <!--begin::Details--> <div class="mb-15" id="body_resp"> <!--begin::Description--> <div class="mb-15 fs-5 fw-normal text-gray-800"> <!--begin::Text--> <div class="mb-5 fs-5">Hello,</div> <!--end::Text--> <!--begin::Text--> <div class="mb-10"> When you’re done bundling, you should decide on the order of the topics your article. In most cases, you can decide to order thematically. For instance, if you want to discuss various aspects or angles of the main topic of your blog post. But you can also order your text chronologically or didactically. </div> <!--end::Text--> <!--begin::Section--> <div class="mb-10"> In the above example we’re discussing, ordering topics thematically makes the most sense. </div> <!--end::Section--> <!--begin::Section--> <div class="m-0"> Than you, <br /> Jerry </div> <!--end::Section--> </div> <!--end::Description--> <!--begin::Input group--> <div class="mb-0"> <textarea class="form-control form-control-solid placeholder-gray-600 fw-bold fs-4 ps-9 pt-7" rows="6" name="message" placeholder="Share Your Knowledge"></textarea> <!--begin::Submit--> <button type="submit" class="btn btn-primary mt-n20 mb-20 position-relative float-end me-7">Send</button> <!--end::Submit--> </div> <!--end::Input group--> </div> <!--end::Details--> <!--begin::Comments--> <div class="mb-15" id="comment_resp"> <!--begin::Comment--> <!--end::Comment--> </div> <!--end::Comments--> </div> <!--end::Ticket view--> </div> <!--end::Content--> </div> <!--end::Layout--> </div> <!--end::Card body--> </div> </div> <!--end::Content--> </div> <!--begin::Footer--> <div id="kt_app_footer" class="app-footer d-flex flex-column flex-md-row align-items-center flex-center flex-md-stack "> <div class="text-gray-900 order-2 order-md-1"> <span class="text-gray-500 fw-semibold me-1"><?=date('Y'); ?>©</span> <a href="javascript:;" target="_blank" class="text-gray-500 text-hover-success"><?=app_name; ?></a> </div> </div> <!--end::Footer--> </div> </div> <!--end::Wrapper container--> </div> <script>var site_url = '<?php echo site_url(); ?>';</script> <script src="<?php echo site_url(); ?>assets/js/jquery.min.js"></script> <script> function ticket(id){ $('#table_view').hide(500); $('#message_view').show(500); $.ajax({ url: site_url + 'service/ticket/load', type: 'POST', data: { type: 'hotel', id: id }, success: function (data) { var dt = JSON.parse(data); $('#header_resp').html(dt.header); $('#body_resp').html(dt.body); loadComments(id, 'hotel'); } }); } function back_ticket(){ $('#table_view').show(500); $('#message_view').hide(500); } $(document).on('click', '.message_btn', function () { let ticketId = $(this).data('id'); let type = $(this).data('type'); let textarea = $('#ticket_message_' + ticketId); let message = textarea.val().trim(); let responseBox = $('#message_response_' + ticketId); if (message === '') { alert("Please type a message."); return; } $.ajax({ url: site_url + 'service/ticket/message', type: 'POST', data: { ticket_id: ticketId, message: message, type: type }, success: function (res) { responseBox.text("Message sent successfully.").show(500); // Clear textarea textarea.val(''); // Refresh comment section (define your reload function here) loadComments(ticketId, type); // You can define this function to reload the messages // Hide message after 3 seconds setTimeout(function () { responseBox.fadeOut(500); }, 3000); }, error: function (xhr) { responseBox.removeClass('text-success').addClass('text-danger'); responseBox.text("Failed to send message. Try again.").show(500); } }); }); function loadComments(ticketId, type) { $.ajax({ url: site_url + 'service/ticket/get_message', type: 'POST', data: { ticket_id: ticketId, type: type }, success: function (res) { var dt = JSON.parse(res); $('#comment_resp').html(dt.item); } }); } $(document).ready(function () { load_order('', ''); // Attach event listeners $("#datez").on("change", load_order); // Date change event $("#search").on("input", load_order); // Search input event $("#status").on("change", load_order); // Status dropdown change event // Load Order Function function load_order(x, y) { var more = 'no'; var methods = ''; if (parseInt(x) > 0 && parseInt(y) > 0) { more = 'yes'; methods = '/' + x + '/' + y; } if (more === 'no') { $('#load_data').html('<tr><td colspan="8"><div class="col-sm-12 fs-2 text-center" data-kt-indicator="on"><span class="indicator-progress">Please wait... <span class="spinner-border spinner-border-sm align-middle ms-2"></span></span></div></td></tr>'); $('#total_id').html('<div class="col-sm-12 text-center"><span class="ni ni-loader fa-spin"></span></div>'); } else { $('#loadmore').html('<tr><td colspan="8"><div class="col-sm-12 fs-2 text-center" data-kt-indicator="on"><span class="indicator-progress">Please wait... <span class="spinner-border spinner-border-sm align-middle ms-2"></span></span></div></td></tr>'); } var search = $('#search').val() || ''; var status = $('#status').val() || ''; const dateRange = $('#datez').val(); let start_date = ''; let end_date = ''; if (dateRange) { const dates = dateRange.split(' - '); // Split by " - " if (dates.length === 2) { start_date = formatToYYYYMMDD(dates[0].trim()); end_date = formatToYYYYMMDD(dates[1].trim()); } } $.ajax({ url: site_url + 'service/hotel/load' + methods, type: 'POST', data: { search: search, status: status, start_date: start_date, end_date: end_date }, success: function (data) { var dt = JSON.parse(data); if (more === 'no') { $('#load_data').html(dt.item); } else { $('#load_data').append(dt.item); } if (dt.offset > 0) { $('#loadmore').html('<tr><td colspan="8"><a href="javascript:;" class="btn btn-dim btn-light btn-block p-30" onclick="load_order(' + dt.limit + ', ' + dt.offset + ', \'' + order_type + '\');"><i class="ki-duotone ki-arrows-loop"><span class="path1"></span><span class="path2"></span></i> Load More</a></td></tr>'); } else { $('#loadmore').html(''); } }, complete: function () { $.getScript(site_url + '/assets/js/jsmodal.js'); } }); } // Format Date to YYYY-MM-DD function formatToYYYYMMDD(dateString) { const date = new Date(dateString); if (isNaN(date.getTime())) return ''; // Return empty string if invalid date const year = date.getFullYear(); const month = String(date.getMonth() + 1).padStart(2, '0'); // Month is zero-based const day = String(date.getDate()).padStart(2, '0'); return `${year}-${month}-${day}`; } }); </script> <?=$this->endSection();?>
Upload File
Create Folder