File "deposit_details.php"
Full Path: /home/quiczmwg/lightspringdigitals.com/__MACOSX/admin/deposit_details.php
File size: 7.36 KB
MIME-type: text/x-php
Charset: utf-8
<?php
include 'head.php';
include 'header.php';
?>
<body class="skin-default fixed-layout">
<div id="main-wrapper">
<?php
include 'sidebar.php';
if (isset($message)) {
foreach ($message as $message) {
echo '<div class="message"><span>' . $message . '</span> <i class="fas fa-times" onclick="this. parentElement.style.display = `none`;"></i> </div>';
};
};
?>
<div class="page-wrapper">
<div class="container-fluid">
<?php include 'nav.php'; ?>
<div class="container">
<!-- DETAILS/DELETE MODAL -->
<div class="">
<?php
if(isset($_GET['deposit_id'])) {
$deposit_id = $_GET['deposit_id'];
$query = "SELECT * FROM deposit WHERE deposit_id=?";
$stmt = $conn->prepare($query);
$stmt->bind_param("s", $deposit_id); // "s" indicates that $deposit_id is a string
$stmt->execute();
$result = $stmt->get_result();
if($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
// Your code to handle each row goes here
?>
<div class=" card">
<div class=" card-header">
</div>
<div class="card-body">
<div class="container row my-4">
<div class="col-md-6 mt-4">
<div class="container">
<img src="img/icon1.jpeg" alt="" height="200">
</div>
</div>
<div class="col-md-6 mt-2">
<h1>Payment Info:</h1>
<hr>
<p>Proof of payment:</p>
<img src="../<?php echo $row['proof_of_payment']; ?>" class="img-fluid" height="700" alt="">
<p><b>Trans ID: <?php echo html_entity_decode($row['deposit_id']); ?></b></p>
<p><b>User ID:<span> <?php echo $row['userid']; ?></span></b> </p>
<p><b>Payment Method: <?php echo html_entity_decode($row['wallet_type']); ?></b></p>
<p><b>Wallet Address: <?php echo html_entity_decode($row['wallet_address']); ?></b></p>
<p><b>Time: <?php echo html_entity_decode($row['created_at']); ?></b></p>
<p><b>Amount Deposited: $<?php echo number_format($row['amount'],2.); ?></b></p><span><a href="#" data-toggle="modal" data-target="#myModalx<?php echo $row['id']; ?>" class="btn btn-info btn-sm">Edit</a></span>
<!-- The Modal -->
<div class="modal fade" id="myModalx<?php echo $row['id']; ?>">
<div class="modal-dialog">
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header">
<h4 class="modal-title">Edit Amount</h4>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<!-- Modal body -->
<div class="modal-body">
<form action="deposit_details_process.php" method="post">
<div class="form-group">
<input name="amount" type="number" value='<?php echo $row['amount']; ?>' class="form-control my-2" placeholder="Amount" required>
<input name="id" value='<?php echo $row['id']; ?>' type='hidden'>
</div>
<input name="deposit_id" value='<?php echo $row['deposit_id']; ?>' type='hidden'>
</div>
<!-- Modal footer -->
<div class="modal-footer">
<button type="submit" name="btnEditAmount" class="btn btn-success bg-warn">Update</button>
<button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
</div>
</form>
</div>
</div>
</div>
<h4><b>Deposit Status: <?php echo html_entity_decode($row['status']); ?></b></h4>
<?php if ($row['status'] == 'pending') : ?>
<a href="deposit-controller.php?id=<?php echo $row['deposit_id']; ?>&status=confirm"
class="btn btn-primary btn-sm my-2">Confirm Deposit</a>
<?php else : ?>
<span class="btn btn-success btn-sm">Deposit Confirmed</span>
<?php endif; ?>
<!-- <a href="deposit-delete-controller?delete=<//?php echo $row['id']; ?>" class="btn btn-danger" onclick="return confirm('are you sure you want to delete this?');">Delete <i class="bi bi-trash3-fill"></i></a> -->
</div>
<?php
}
} else {
echo "<p>No deposit details found for the provided ID.</p>";
}
} else {
echo "<p>No deposit ID provided.</p>";
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
</div>
<?php
include 'footer.php';
?>