add agent panel
This commit is contained in:
42
CONTENT/ROOT_URI/Agent/transaction.php
Normal file
42
CONTENT/ROOT_URI/Agent/transaction.php
Normal 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();
|
||||
?>
|
||||
Reference in New Issue
Block a user