<?php 
session_start();
include '../koneksi.php';
include 'layout_header.php'; 
?>
<div class="container-fluid">
    <h3>Data Level / Jenjang</h3>
    <a href="level_form.php" class="btn btn-primary mb-3">+ Tambah Level</a>
    <table class="table table-bordered">
        <tr><th>No</th><th>Nama Level</th><th>Aksi</th></tr>
        <?php
        $q = mysqli_query($koneksi, "SELECT * FROM level");
        $no = 1;
        while($d = mysqli_fetch_array($q)){
            echo "<tr><td>$no</td><td>$d[nama_level]</td>
            <td><a href='level_form.php?id=$d[id_level]' class='btn btn-sm btn-warning'>Edit</a></td></tr>";
            $no++;
        }
        ?>
    </table>
</div>
<?php include 'layout_footer.php'; ?>