add agent panel

This commit is contained in:
ns77@siliconpin.com
2025-09-01 09:57:29 +00:00
parent 6bea50b408
commit 04129226ec
12 changed files with 633 additions and 3 deletions

View File

@@ -0,0 +1,42 @@
<?php
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM `" . $GLOBALS['arif_tran'] . "`WHERE `AT_ADMIN` = '" . $conn->real_escape_string($_SESSION['user_id']) . "'AND DATE(`AT_TIMESTAMP`) = CURDATE()";
$result = $conn->query($sql);
?>
<div class="container" style="margin-top:80px;">
<h3>Transaction Records</h3>
<?php if ($result && $result->num_rows > 0): ?>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Timestamp</th>
<th>ACID</th>
<th>Amount</th>
</tr>
</thead>
<tbody>
<?php while ($row = $result->fetch_assoc()): ?>
<tr>
<td><?= date("d M Y, h:i A", strtotime($row['AT_TIMESTAMP'])) ?></td>
<td><?= htmlspecialchars($row['AT_ACID']) ?></td>
<td><?= htmlspecialchars($row['AT_AMOUNT']) ?></td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
<?php else: ?>
<div class="alert alert-warning">No record found</div>
<?php endif; ?>
<!-- <a class="btn btn-primary" href="/Agent/Receive">Receive Payment</a> -->
</div>
<?php
$conn->close();
?>