<!DOCTYPE html>
<html lang="th">
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <link rel="apple-touch-icon" sizes="76x76" href="https://www.cdn.niendsitekungz.com/finance/assets/img/apple-icon.png">
  <link rel="icon" type="image/png" href="https://www.cdn.niendsitekungz.com/finance/assets/img/favicon556.png">
  <title>คำนวณเงินเรทล่าสุด SPX Express | NiendsiteKunGz</title>
  <script src="https://code.jquery.com/jquery-3.6.1.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert-dev.min.js"></script>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css">
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700" rel="stylesheet" />
  <link href='https://fonts.googleapis.com/css?family=Kanit' rel='stylesheet'>
  <link href="https://www.cdn.niendsitekungz.com/finance/assets/css/nucleo-icons.css" rel="stylesheet" />
  <link href="https://www.cdn.niendsitekungz.com/finance/assets/css/nucleo-svg.css" rel="stylesheet" />
  <script src="https://kit.fontawesome.com/42d5adcbca.js" crossorigin="anonymous"></script>
  <link href="https://www.cdn.niendsitekungz.com/finance/assets/css/nucleo-svg.css" rel="stylesheet" />
  <link id="pagestyle" href="https://www.cdn.niendsitekungz.com/finance/assets/css/soft-ui-dashboard.css?v=1.0.6" rel="stylesheet" />
<style>



body {

    font-family: 'Kanit';font-size: 22px;

}



li {

   font-family: 'Kanit';font-size: 22px;

}



label {

    font-family: 'Kanit';font-size: 15px;

}



html {

   font-family: 'Kanit';font-size: 17px;

}



</style>



</head>
    <div class="container my-4">
        <h1>Order List</h1>

        <!-- ตารางแสดงข้อมูล -->
        <table class="table table-bordered table-striped">
            <thead>
                <tr>
                    <th>ID</th>
                    <th>Quantity</th>
                    <th>Total Price</th>
                    <th>Create At</th>
                </tr>
            </thead>
            <tbody>
                <?php if (!empty($orders) && is_array($orders)): ?>
                    <?php foreach ($orders as $order): ?>
                        <tr>
                            <td><?= esc($order['id']) ?></td>
                            <td><?= esc($order['quantity']) ?></td>
                            <td><?= esc($order['total_price']) ?></td>
                            <td><?= esc($order['save_at']) ?></td>
                        </tr>
                    <?php endforeach; ?>
                <?php else: ?>
                    <tr>
                        <td colspan="3" class="text-center">No orders found</td>
                    </tr>
                <?php endif; ?>
            </tbody>
        </table>

        <!-- Pagination -->
        <div class="d-flex justify-content-center">
    <?= $pager->links('orders') ?>

</div>

    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
