<!-- data table start -->
<div class="col-12 mt-5">
  <div class="card">
    <div class="card-body">
      <h4 class="header-title">Data Kelas</h4>
      <div class="data-tables">
        <a href="?page=Tambah-Kelas" target="_self"><button type="button" class="btn btn-primary mb-3">Tambah Data</button></a>
        <table id="dataTable2" class="text-center">
          <thead class="bg-light text-capitalize">
            <tr>
              <th width="5%">No</th>
              <th width="15%">Kode Kelas</th>
              <th width="20%">Tahun Pelajaran</th>
              <th width="10%">Kelas</th>
              <th width="30%">Nama Kelas</th>
              <th width="20%">Aksi</th>
            </tr>
          </thead>
          <tbody>
            <?php
            include_once "../library/inc.sesadmin.php";
            include_once "../library/inc.library.php";

            $userSql = "SELECT * FROM kelas ORDER BY tp ASC";
            $userQry = mysql_query($userSql, $koneksidb) or die ("error paging: ".mysql_error());
            $nomor  = 0; 
            while ($userRow = mysql_fetch_array($userQry)) {
              $nomor++;
              ?>
              <tr>
                <td><b><?php echo $nomor; ?></b></td>
                <td><?php echo $userRow['kdkelas']; ?></td>
                <td><?php echo $userRow['tp'] ?></td>
                <td><?php echo $userRow['kelas'] ?></td>
                <td><?php echo $userRow['namakelas'] ?></td>
                <td align="center">
                  <!-- <a href="?page=Edit-Kelas&amp;Kode="><button type="button" class="btn btn-warning btn-xs">Ubah</button></a> &nbsp -->
                  <a href="?page=Delete-Kelas&amp;Kode=<?php echo $userRow['kdkelas']; ?>" target="_self" alt="Delete Data" onclick="return confirm('ANDA YAKIN INGIN MENGHAPUS DATA PENTING INI ... ?')"><button type="button" class="btn btn-danger btn-xs">Hapus</button></a>
                </td>
              </tr>
              <?php } ?>
            </tbody>
          </table>
        </div>
      </div>
    </div>
  </div>
<!-- data table end -->