MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 18.188.93.255
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home1/a1673wkz/propstonerealty.com/Admin/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home1/a1673wkz/propstonerealty.com/Admin/booking.php
 <?php
    session_start();
    if (empty($_SESSION['username'])) {
        echo '<script>window.location.href="login.php"</script>';
    }
    ?>
 <!DOCTYPE html>
 <html>

 <body>
     <?php
        //header link
        include("header_link.php");
        //database file link
        include("config.php");
        ?>
     <!-- Main Wrapper -->
     <div class="main-wrapper">
         <!-- Page Wrapper -->
         <div class="page-wrapper">
             <!-- Page Content -->
             <div class="content container-fluid">
                 <!-- Page Header -->
                 <div class="page-header">
                     <div class="row align-items-center">
                         <div class="col">
                             <h3 class="page-title">Booking Request</h3>
                             <ul class="breadcrumb">
                                 <li class="breadcrumb-item"><a href="index.php">Dashboard</a></li>
                                 <li class="breadcrumb-item active">Booking Request</li>
                             </ul>
                         </div>
                     </div>
                 </div>
                 <!-- /Page Header -->
                 <script src="js/jquery-3.2.1.min.js"></script>
                 <div class="row">
                     <div class="col-md-12">
                         <div class="table-responsive">
                             <table class="table table-striped datatable custom-table mb-0" id="banner-load">
                                 <thead>
                                     <tr>
                                         <th>#</th>
                                         <th>Product Name</th>
                                         <th>Price</th>
                                         <th>Customer Name</th>
                                         <th>Email</th>
                                         <th>Mobile</th>
                                         <th>Arrival Date</th>
                                         <th>Deprature Date</th>
                                         <th>Qty</th>
                                         <th>Date</th>
                                         <th>Status</th>
                                     </tr>
                                 </thead>
                                 <tbody>
                                     <?php
                                        $cnt = '0';
                                        $selct = $obj->fetch("SELECT * FROM hotel_book ORDER BY id DESC");
                                        foreach ($selct as $val) {
                                            $email = $val['email'];
                                            $pro_id = $val['prod_id'];
                                            $data = $obj->arr("SELECT * FROM client_details WHERE email='$email' ORDER BY id DESC");
                                            $data1 = $obj->arr("SELECT * FROM products WHERE id='$pro_id'");
                                            $cnt++; ?>
                                         <tr class="holiday-upcoming">
                                             <td style="cursor:pointer;" data-toggle="modal" data-target=".edit-mod<?php echo $cnt; ?>"><?php echo $cnt; ?></td>
                                             <td style="cursor:pointer;" data-toggle="modal" data-target=".edit-mod<?php echo $cnt; ?>"><?php echo $data1['title']; ?></td>
                                             <td style="cursor:pointer;" data-toggle="modal" data-target=".edit-mod<?php echo $cnt; ?>"><?php echo $data1['description']; ?></td>
                                             <td style="cursor:pointer;" data-toggle="modal" data-target=".edit-mod<?php echo $cnt; ?>"><?php echo $data['f_name']; ?> <?php echo $data['l_name']; ?></td>
                                             <td style="cursor:pointer;" data-toggle="modal" data-target=".edit-mod<?php echo $cnt; ?>"><?php echo $data['email']; ?></td>
                                             <td style="cursor:pointer;" data-toggle="modal" data-target=".edit-mod<?php echo $cnt; ?>"><?php echo $data['phone']; ?></td>
                                             <td style="cursor:pointer;" data-toggle="modal" data-target=".edit-mod<?php echo $cnt; ?>"><?php echo $val['a_date']; ?></td>
                                             <td style="cursor:pointer;" data-toggle="modal" data-target=".edit-mod<?php echo $cnt; ?>"><?php echo $val['d_date'] ?></td>
                                             <td style="cursor:pointer;" data-toggle="modal" data-target=".edit-mod<?php echo $cnt; ?>"><?php echo $val['qty']; ?></td>
                                             <td style="cursor:pointer;" data-toggle="modal" data-target=".edit-mod<?php echo $cnt; ?>"><?php echo $val['date']; ?></td>


                                             <td class="text-right">
                                                 <div class="dropdown dropdown-action">
                                                     <?php if ($val['status'] == 'Pending Payment' || $val['status'] == '') { ?>
                                                         <a href="#" class="btn btn-warning" id="pd<?php echo $val['id']; ?>"><?php echo $val['status']; ?></a>
                                                     <?php } else if ($val['status'] == 'Payment Successfull') { ?>
                                                         <a href="#" class="btn btn-success" id="sp<?php echo $val['id']; ?>"><?php echo $val['status']; ?></a>
                                                     <?php } ?>

                                                 </div>
                                             </td>

                                         </tr>
                                         <!-- Edit banner Modal -->
                                         <div class="modal custom-modal fade edit-mod<?php echo $cnt; ?>" irole="dialog">
                                             <div class="modal-dialog modal-dialog-centered" role="document">
                                                 <div class="modal-content">
                                                     <div class="modal-header">
                                                         <h5 class="modal-title">Booking Request</h5>
                                                         <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                                             <span aria-hidden="true">&times;</span>
                                                         </button>
                                                     </div>
                                                     <div class="modal-body">
                                                         <div class="row">
                                                             <div class="col-sm-6">
                                                                 <h4>Room Details</h4>
                                                                 <p></p>
                                                                 <p>Room Name : <?php echo $data1['title']; ?></p>
                                                                 <p>Room capacity : <?php echo $data1['capacity']; ?></p>
                                                                 <p>Room Price : <?php echo $data1['description']; ?></p>
                                                                 <p>Room Max Qty : <?php echo $data1['qty']; ?></p>
                                                             </div>
                                                             <div class="col-sm-6">
                                                                 <img src="<?php echo $data1['image']; ?>" style="width:100px;">
                                                             </div>
                                                             <div class="col-sm-6">
                                                                 <h4>Customer Details</h4>
                                                                 <p>Customer Name : <?php echo $data['f_name']; ?> <?php echo $data['l_name']; ?></p>
                                                                 <p>Customer Email : <?php echo $data['email']; ?></p>
                                                                 <p>Customer Mobile : <?php echo $data['phone']; ?></p>
                                                             </div>
                                                             <div class="col-sm-6">
                                                                 <br>
                                                                 <br>
                                                                 <p>Customer Country : <?php echo $data['country']; ?></p>
                                                                 <p>Customer State : <?php echo $data['state']; ?></p>
                                                                 <p>Customer City : <?php echo $data['city']; ?></p>
                                                                 <p>Customer Pin : <?php echo $data['pin']; ?></p>
                                                             </div>
                                                         </div>
                                                     </div>
                                                 </div>
                                             </div>
                                         </div>
                                         <!-- / End Edit banner Modal -->
                                         <!-- Delete banner Modal -->
                                         <div class="modal custom-modal fade" id="delete_holiday<?php echo $cnt; ?>" role="dialog">
                                             <div class="modal-dialog modal-dialog-centered">
                                                 <div class="modal-content">
                                                     <div class="modal-body">
                                                         <div class="form-header">
                                                             <h3>Reject Booking</h3>
                                                             <p>Are you sure want to Reject?</p>
                                                         </div>
                                                         <div class="modal-btn delete-action">
                                                             <div class="row">
                                                                 <div class="col-6">
                                                                     <input type="hidden" id="old_image1<?php echo $val['id']; ?>" value="<?php echo $old; ?>" />
                                                                     <button class="btn btn-primary continue-btn" value="<?php echo $val['id']; ?>" id="dlt_btn<?php echo $val['id']; ?>" style="width: 100%;">Delete</button>
                                                                 </div>
                                                                 <div class="col-6">
                                                                     <a href="javascript:void(0);" data-dismiss="modal" class="btn btn-primary cancel-btn">Cancel</a>
                                                                 </div>
                                                             </div>
                                                             <div class="row">
                                                                 <div class="col-12" align="center" style="padding-top: 15px;"><span id="preview2"></span></div>
                                                             </div>
                                                         </div>
                                                     </div>
                                                 </div>
                                             </div>
                                         </div>
                                         <!-- / End Delete banner Modal -->

                                         <!-- Delete Script Modal -->
                                         <script>
                                             $("#dlt_btn<?php echo $val['id']; ?>").click("submit", function() {
                                                 var dlt_btn = $(this).val();
                                                 var flag = true;
                                                 var old_image1 = $("#old_image1<?php echo $val['id']; ?>").val();
                                                 //alert(old_image1);

                                                 /********validate all our form fields***********/
                                                 if (dlt_btn == "") {
                                                     $("#dlt_btn").css("border-color", "red");
                                                     flag = false;
                                                 }
                                                 if (old_image1 == "") {
                                                     flag = false;
                                                 }

                                                 if (flag) {
                                                     $.ajax({
                                                         url: "delete_banner.php",
                                                         method: "POST",
                                                         data: {
                                                             dlt_btn: dlt_btn,
                                                             old_image1: old_image1
                                                         },
                                                         success: function(data) {
                                                             //var result=JSON.parse(data);
                                                             //alert(data);
                                                             $("#preview2").html(data);
                                                             //alert("success");
                                                             //location.reload();
                                                             setTimeout(location.reload.bind(location), 1500);
                                                         },
                                                     });
                                                 }
                                             });
                                         </script>
                                         <!-- End Delete Script Modal -->
                                         <!-- End Delete Script Modal -->

                                         <script>
                                             $("#pd<?php echo $val['id']; ?>").on("click", function() {
                                                 var ap = <?php echo $val['id'] ?>;

                                                 $.ajax({
                                                     url: "add-status.php",
                                                     method: "POST",
                                                     data: {
                                                         ap: ap
                                                     },
                                                     success: function(data) {
                                                         //alert(data);
                                                         setTimeout(location.reload.bind(location), 1500);

                                                     },
                                                 });
                                             });
                                         </script>
                                         <script>
                                             $("#sp<?php echo $val['id']; ?>").on("click", function() {
                                                 var sp = <?php echo $val['id'] ?>;

                                                 $.ajax({
                                                     url: "add-status.php",
                                                     method: "POST",
                                                     data: {
                                                         sp: sp
                                                     },
                                                     success: function(data) {
                                                         //alert(data);
                                                         setTimeout(location.reload.bind(location), 1500);

                                                     },
                                                 });
                                             });
                                         </script>
                                         <script>
                                             $("#ap<?php echo $val['id']; ?>").on("click", function() {
                                                 var pd = <?php echo $val['id'] ?>;

                                                 $.ajax({
                                                     url: "add-status.php",
                                                     method: "POST",
                                                     data: {
                                                         pd: pd
                                                     },
                                                     success: function(data) {
                                                         // alert(data);
                                                         setTimeout(location.reload.bind(location), 1500);
                                                     },
                                                 });
                                             });
                                         </script>

                                     <?php } ?>
                                 </tbody>
                             </table>
                         </div>
                     </div>
                 </div>
             </div>
             <!-- /Page Content -->



             <?php
                // header
                include("header.php");
                ?>
         </div>
     </div>
     <?php
        //footer link
        include("footer_link.php");

        //footer
        include("footer.php");

        ?>
 </body>

 </html>

MMCT - 2023