<h1>Orders</h1>
<table class="table table-dark">
    <tr><th>ID</th><th>Username</th><th>Total</th><th>Status</th><th>Date</th></tr>
    <?php foreach($pdo->query("SELECT * FROM orders ORDER BY id DESC LIMIT 50") as $o): ?>
    <tr>
        <td>#<?=$o['id']?></td>
        <td><?=htmlspecialchars($o['mc_username'])?></td>
        <td>$<?=$o['total']?></td>
        <td><span class="badge bg-<?= $o['status']=='paid'?'success':'warning' ?>"><?=ucfirst($o['status'])?></span></td>
        <td><?=$o['created_at']?></td>
    </tr>
    <?php endforeach; ?>
</table>