<?php

$page_title = 'List Record Input Etalase Makassar';
require_once('includes/load.php');
page_require_level(7); // Atur level akses sesuai kebutuhan

// Ambil data dari tabel input_makassar_record
$sql = "SELECT id, part_number, quantity, input_date FROM input_makassar_record ORDER BY input_date DESC";
$result = $db->query($sql);

include_once('layouts/header.php');
?>

<div class="row">
    <div class="col-md-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">List Record Input Etalase Makassar</h3>
            </div>
            <div class="panel-body">
                <table class="table table-bordered table-striped">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>Part Number</th>
                            <th>Quantity</th>
                            <th>Input Date</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php while ($row = $result->fetch_assoc()): ?>
                        <tr>
                            <td><?php echo remove_junk($row['id']); ?></td>
                            <td><?php echo remove_junk($row['part_number']); ?></td>
                            <td><?php echo remove_junk($row['quantity']); ?></td>
                            <td><?php echo remove_junk($row['input_date']); ?></td>
                        </tr>
                        <?php endwhile; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>

<?php include_once('layouts/footer.php'); ?>
