<?php require 'includes/auth.php'; ?>
<?php require_once '../app/db.php'; ?>

<?php
$payments = $pdo->query("
SELECT b.booking_code, b.payment_method, b.payment_status, b.estimated_price
FROM bookings b
ORDER BY b.created_at DESC
");
?>

<table class="table">
<tr>
<th>Booking</th>
<th>Method</th>
<th>Status</th>
<th>Amount</th>
</tr>

<?php foreach($payments as $p): ?>
<tr>
<td><?= $p['booking_code'] ?></td>
<td><?= $p['payment_method'] ?></td>
<td><?= $p['payment_status'] ?></td>
<td>$<?= $p['estimated_price'] ?></td>
</tr>
<?php endforeach; ?>
</table>
