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'; if($_SERVER["REQUEST_METHOD"] == "POST") { if(isset($_POST['commition'])) { $commition=$_POST['commition']; $booking_id=$_POST['pass_id']; $sql="update bookings set admin_commission=$commition,status='vendor_pass' where id=$booking_id"; if($conn->query($sql)===true) { $success=true; } else { $error=true; } } if(isset($_POST['custom_vendor'])) { $custom_vendor=$_POST['custom_vendor']; $booking_id=$_POST['custom_id']; $sql="update bookings set admin_commission=0,vendor_id=$custom_vendor,status='vendor_pass' where id=$booking_id"; if($conn->query($sql)===true) { $success=true; } else { $error=true; echo $conn->error; } } } $sql="select payment_log.txn_amount,bookings.id as bk_id,bookings.*,booking_cancel.*,users.* from bookings,booking_cancel,users,payment_log where users.id=bookings.user_id and bookings.status ='cancelled' and bookings.id=booking_cancel.booking_id and payment_log.booking_id=booking_cancel.booking_id order by bookings.pickup_date desc"; $result = $conn->query($sql); if ($result->num_rows > 0) { // output data of each row while($row = $result->fetch_assoc()) { $table_data[]=$row; } } //print_r($table_data); ?> <style> table.dataTable.dtr-inline.collapsed>tbody>tr[role="row"]>td:first-child:before{ content: ''!important; background-color: transparent!important; box-shadow: none!important; } .badge{ background: #317fae; } .modal-dialog .badge{ display: none; } </style> <head> <meta charset="utf-8"> <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport"> <meta content="Fully Responsive Bootstrap 4 Admin Dashboard Template" name="description"> <meta content="Spruko" name="author"> <!-- Title --> <title> One Way Taxi Services</title> <!-- Favicon --> <link href="assets/img/brand/favicon.png" rel="icon" type="image/png"> <!-- Fonts --> <link href="https://fonts.googleapis.com/css?family=Nunito:300,400,600,700,800" rel="stylesheet"> <!-- Icons --> <link href="assets/css/icons.css" rel="stylesheet"> <!--Bootstrap.min css--> <link rel="stylesheet" href="assets/plugins/bootstrap/css/bootstrap.min.css"> <!-- Adon CSS --> <link href="assets/css/dashboard.css" rel="stylesheet" type="text/css"> <!-- Data table css --> <link href="assets/plugins/datatable/dataTables.bootstrap4.min.css" rel="stylesheet" /> <link href="assets/plugins/datatable/responsivebootstrap4.min.css" rel="stylesheet" /> <link href="assets/plugins/customscroll/jquery.mCustomScrollbar.css" rel="stylesheet" /> <!-- Sidemenu Css --> <link href="assets/plugins/toggle-sidebar/css/sidemenu.css" rel="stylesheet"> </head> <!-- Page content --> <div class="container-fluid pt-8"> <div class="page-header mt-0 p-3"> <h3 class="mb-sm-0">Cancelled Trips</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"></li> </ol> </div> <?php if(isset($success)) { ?> <div class="alert alert-success" id="success">Success! Your Request has been submited.</div> <?php } else if(isset($error)) { ?> <div class="alert alert-danger" id="success">Error! Your Request could not be submited.</div> <?php } ?> <div class="card shadow"> <div class="card-body"> <?php if(isset($table_data)) { ?> <div class="table-responsive"> <table id="example" class="table table-striped table-bordered text-nowrap" > <thead> <tr> <th class="wd-15p">S.No</th> <th class="wd-15p">BookingId</th> <th class="wd-15p">Reason</th> <th class="wd-15p">From </th> <th class="wd-15p">To</th> <th class="wd-15p">Pickup_date</th> <th class="wd-20p">pickup_time</th> <th class="wd-20p">Cab Type</th> <th class="wd-20p">Trip_type</th> <th class="wd-20p">Name</th> <th class="wd-20p">Contact</th> <th class="wd-20p">EMail</th> <th class="wd-20p">Alt Contact</th> <th class="wd-15p">Amount</th> <th class="wd-15p">Booking Amount</th> <th class="wd-15p">Balance Amount</th> <th class="wd-15p">Your Commission</th> <th class="wd-15p">Pickup Address</th> <th class="wd-15p">Vendor id</th> <th class="wd-15p">cab Id</th> <th class="wd-15p">Driver id</th> <th class="wd-10p">action</th> </tr> </thead> <tbody> <?php $x=1; foreach($table_data as $hh) { ?> <tr> <!-- <td style="display:none"></td> --> <td><?=$x;?></td> <td>C4U<?=$hh['bk_id']?></td> <td><?=$hh['reason']?></td> <td><?=$hh['booking_from']?></td> <td><?=$hh['booking_to'];?></td> <td><?=$hh['pickup_date'];?></td> <td><?=$hh['pickup_time'];?></td> <td><?=$hh['cab_type'];?></td> <td><?=$hh['trip_type'];?></td> <td><?=$hh['name'];?></td> <td><?=$hh['contact'];?></td> <td><?=$hh['email'];?></td> <td><?=$hh['alt_contact'];?></td> <td><?=$hh['price'];?></td> <td><?=$hh['txn_amount'];?></td> <td><?=$hh['price']-$hh['txn_amount'];?></td> <td><?=$hh['admin_commission'];?></td> <td><?=$hh['pickup_address'];?></td> <td><a href="edit_vendor?token=<?=$hh['vendor_id'];?>" target="_blank"><?=$hh['vendor_id'];?></a></td> <td><?=$hh['cab_id'];?></td> <td><?=$hh['driver_id'];?></td> <td> <?php if(isset($one)) { ?> <button id="<?=$hh['booking_id'];?>" onclick="confirm_booking(this.value,this.id)" value="pass" class="btn btn-icon btn-pill btn-primary" type="button"> Pass </button> <button id="<?=$hh['booking_id'];?>" onclick="confirm_booking(this.value,this.id);" value="custom" class="btn btn-icon btn-pill btn-warning mt-1 mb-1" type="button"> Custom </button> <?php } ?> </td> </tr> <?php $x++; } ?> </tbody> </table> </div> <?php } else { echo "<h2>No Record Found.</h2>"; } ?> </div> </div> </div> <!--Add Modal To Display--> <div class="modal fade" id="confirm" style="z-index:99999999"> <div class="modal-dialog"> <div class="modal-content"> <div class="card-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> <div class="alert alert-danger" id="error" style="display:none">Error! Your Request could not be submited.</div> <h4 style="text-align: left">Take Your Action</h4><div class="col-md-6 float-right" id="alert"></div> </div> <form method="post" id="add_vendor"> <div class="modal-body"> <div class="row" id="pass" style="display:none"> <form method="post"> <div class="col-md-8"> <label>Enter your commission :</label><input type="text" class="form-control" name="commition" required> <input type="hidden" name="pass_id" id="pass_id" required> </div> <div class="col-md-4"> <button type="submit" name="request" id="pass_id" class="btn btn-primary" >Add</button> </div> </form> </div> <div class="row" id="custom" style="display:none"> <form method="post"> <div class="col-md-8"> <label>Please Select Custom Vendor:</label> <input type="hidden" name="custom_id" id="custom_id" required> <select name="custom_vendor" class="form-control"> <option value="0" >Select Vendor</option> <?php foreach ($vendors as $vendor) { ?> <option value="<?=$vendor['vendor_id'];?>"><?=$vendor['full_name'];?></option> <?php } ?> </select> </div> <div class="col-md-4"> <button type="submit" name="request" id="add" class="btn btn-primary" >Add</button> </div> </form> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default pull-left" data-dismiss="modal">Close</button> </div> </form> </div> <!-- /.modal-content --> </div> <!-- /.modal-dialog --> </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> <!-- 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 --> <script src="assets/js/custom.js"></script> <script src="assets/js/datatable.js"></script> <script> function confirm_booking(str,ee) { if(str=='pass') { $('#pass').show(); $('#custom').hide(); $('#confirm').modal('show'); document.getElementById('pass_id').value=ee; } else if(str=='custom') { $('#custom').show(); $('#pass').hide(); $('#confirm').modal('show'); document.getElementById('custom_id').value=ee; } } </script>