<style>
table img {
  width: 80px;
  height: 80px;
  object-fit: cover; /* Agar gambar tetap proporsional dan tidak terdistorsi */
}
</style>
<section class="content">
  <div class="row">
    <div class="col-xs-12">
      <!-- /.box -->
      <div class="box">
        <div class="box-header">
          <h3 class="box-title">Kelas 10 PPLG</h3>
        </div>
        <!-- /.box-header -->
        <div class="box-body table-responsive">
          <a href="?hal=siswa_tambah2" class="tombol"><b>Tambah</b></a>
          <table id="example2" class="table table-bordered table-striped">
            <thead>
              <tr>
                <th>No</th>
                <th>Foto</th>
                <th>Nama</th>
                <th>NIS</th>
                <th>Tanggal Lahir</th>
                <th>Kelas</th>
                <th>Jurusan</th>
                <th>Gender</th>
                <th>Poin</th>
              </tr>
            </thead>
            <tbody>
              <?php
              $query = "SELECT * FROM siswa where kelas = '10' and jurusan = 'PPLG' ORDER BY kelas, jurusan, id_siswa DESC";
              $result = mysqli_query($con, $query);
              $no = 0;
              $kelas_jurusan = ""; 

              while ($data = mysqli_fetch_array($result)) {

                $no++;
              ?>
              <tr>
                <td><?=$no?></td>
                <td><img src="images/<?=$data['foto']?>" alt="" width="90"></td>
                <td><?=$data['nama_siswa']?></td>
                <td><?=$data['nis']?></td>
                <td><?=$data['tanggal_lahir']?></td>
                <td><?=$data['kelas']?></td>
                <td><?=$data['jurusan']?></td>
                <td><?=$data['gender']?></td>
                <td><?= number_format(intval($data['poin_sis']))?></td>
              </tr>
              <?php
              }
              ?>
            </tbody>
          </table>
        </div>
        <!-- /.box-body -->
      </div>
      <!-- /.box -->

      <div class="box">
        <div class="box-header">
          <h3 class="box-title">Kelas 10 AKL</h3>
        </div>
        <!-- /.box-header -->
        <div class="box-body table-responsive">
          <a href="?hal=siswa_tambah2" class="tombol"><b>Tambah</b></a>
          <table id="example2" class="table table-bordered table-striped">
            <thead>
              <tr>
                <th>No</th>
                <th>Foto</th>
                <th>Nama</th>
                <th>NIS</th>
                <th>Tanggal Lahir</th>
                <th>Kelas</th>
                <th>Jurusan</th>
                <th>Gender</th>
                <th>Poin</th>
              </tr>
            </thead>
            <tbody>
              <?php
              $query = "SELECT * FROM siswa where kelas = '10' and jurusan = 'AKL' ORDER BY kelas, jurusan, id_siswa DESC";
              $result = mysqli_query($con, $query);
              $no = 0;
              $kelas_jurusan = ""; 

              while ($data = mysqli_fetch_array($result)) {
                $no++;
              ?>
              <tr>
                <td><?=$no?></td>
                <td><img src="images/<?=$data['foto']?>" alt="" width="90"></td>
                <td><?=$data['nama_siswa']?></td>
                <td><?=$data['nis']?></td>
                <td><?=$data['tanggal_lahir']?></td>
                <td><?=$data['kelas']?></td>
                <td><?=$data['jurusan']?></td>
                <td><?=$data['gender']?></td>
                <td><?= number_format(intval($data['poin_sis']))?></td>
              </tr>
              <?php
              }
              ?>
            </tbody>
          </table>
        </div>
        <!-- /.box-body -->
      </div>
      <!-- /.box -->

      <div class="box">
        <div class="box-header">
          <h3 class="box-title">Kelas 11 PPLG</h3>
        </div>
        <!-- /.box-header -->
        <div class="box-body table-responsive">
          <a href="?hal=siswa_tambah2" class="tombol"><b>Tambah</b></a>
          <table id="example2" class="table table-bordered table-striped">
            <thead>
              <tr>
                <th>No</th>
                <th>Foto</th>
                <th>Nama</th>
                <th>NIS</th>
                <th>Tanggal Lahir</th>
                <th>Kelas</th>
                <th>Jurusan</th>
                <th>Gender</th>
                <th>Poin</th>
              </tr>
            </thead>
            <tbody>
              <?php
              $query = "SELECT * FROM siswa where kelas = '11' and jurusan = 'PPLG' ORDER BY kelas, jurusan, id_siswa DESC";
              $result = mysqli_query($con, $query);
              $no = 0;
              $kelas_jurusan = ""; 

              while ($data = mysqli_fetch_array($result)) {
                $no++;
              ?>
              <tr>
                <td><?=$no?></td>
                <td><img src="images/<?=$data['foto']?>" alt="" width="90"></td>
                <td><?=$data['nama_siswa']?></td>
                <td><?=$data['nis']?></td>
                <td><?=$data['tanggal_lahir']?></td>
                <td><?=$data['kelas']?></td>
                <td><?=$data['jurusan']?></td>
                <td><?=$data['gender']?></td>
                <td><?= number_format(intval($data['poin_sis']))?></td>
              </tr>
              <?php
              }
              ?>
            </tbody>
          </table>
        </div>
        <!-- /.box-body -->
      </div>

      <div class="box">
        <div class="box-header">
          <h3 class="box-title">Kelas 11 AKL</h3>
        </div>
        <!-- /.box-header -->
        <div class="box-body table-responsive">
          <a href="?hal=siswa_tambah2" class="tombol"><b>Tambah</b></a>
          <table id="example2" class="table table-bordered table-striped">
            <thead>
              <tr>
                <th>No</th>
                <th>Foto</th>
                <th>Nama</th>
                <th>NIS</th>
                <th>Tanggal Lahir</th>
                <th>Kelas</th>
                <th>Jurusan</th>
                <th>Gender</th>
                <th>Poin</th>
              </tr>
            </thead>
            <tbody>
              <?php
              $query = "SELECT * FROM siswa where kelas = '11' and jurusan = 'AKL' ORDER BY kelas, jurusan, id_siswa DESC";
              $result = mysqli_query($con, $query);
              $no = 0;
              $kelas_jurusan = ""; 

              while ($data = mysqli_fetch_array($result)) {
                $no++;
              ?>
              <tr>
                <td><?=$no?></td>
                <td><img src="images/<?=$data['foto']?>" alt="" width="90"></td>
                <td><?=$data['nama_siswa']?></td>
                <td><?=$data['nis']?></td>
                <td><?=$data['tanggal_lahir']?></td>
                <td><?=$data['kelas']?></td>
                <td><?=$data['jurusan']?></td>
                <td><?=$data['gender']?></td>
                <td><?= number_format(intval($data['poin_sis']))?></td>
              </tr>
              <?php
              }
              ?>
            </tbody>
          </table>
        </div>
        <!-- /.box-body -->
      </div>

      <div class="box">
        <div class="box-header">
          <h3 class="box-title">Kelas 12 PPLG</h3>
        </div>
        <!-- /.box-header -->
        <div class="box-body table-responsive">
          <a href="?hal=siswa_tambah2" class="tombol"><b>Tambah</b></a>
          <table id="example2" class="table table-bordered table-striped">
            <thead>
              <tr>
                <th>No</th>
                <th>Foto</th>
                <th>Nama</th>
                <th>NIS</th>
                <th>Tanggal Lahir</th>
                <th>Kelas</th>
                <th>Jurusan</th>
                <th>Gender</th>
                <th>Poin</th>
              </tr>
            </thead>
            <tbody>
              <?php
              $query = "SELECT * FROM siswa where kelas = '12' and jurusan = 'PPLG' ORDER BY kelas, jurusan, id_siswa DESC";
              $result = mysqli_query($con, $query);
              $no = 0;
              $kelas_jurusan = ""; 

              while ($data = mysqli_fetch_array($result)) {
                $no++;
              ?>
              <tr>
                <td><?=$no?></td>
                <td><img src="images/<?=$data['foto']?>" alt="" width="90"></td>
                <td><?=$data['nama_siswa']?></td>
                <td><?=$data['nis']?></td>
                <td><?=$data['tanggal_lahir']?></td>
                <td><?=$data['kelas']?></td>
                <td><?=$data['jurusan']?></td>
                <td><?=$data['gender']?></td>
                <td><?= number_format(intval($data['poin_sis']))?></td>
              </tr>
              <?php
              }
              ?>
            </tbody>
          </table>
        </div>
        <!-- /.box-body -->
      </div>
      
            <div class="box">
        <div class="box-header">
          <h3 class="box-title">Kelas 12 AKL</h3>
        </div>
        <!-- /.box-header -->
        <div class="box-body table-responsive">
          <a href="?hal=siswa_tambah2" class="tombol"><b>Tambah</b></a>
          <table id="example2" class="table table-bordered table-striped">
            <thead>
              <tr>
                <th>No</th>
                <th>Foto</th>
                <th>Nama</th>
                <th>NIS</th>
                <th>Tanggal Lahir</th>
                <th>Kelas</th>
                <th>Jurusan</th>
                <th>Gender</th>
                <th>Poin</th>
              </tr>
            </thead>
            <tbody>
              <?php
              $query = "SELECT * FROM siswa where kelas = '12' and jurusan = 'AKL' ORDER BY kelas, jurusan, id_siswa DESC";
              $result = mysqli_query($con, $query);
              $no = 0;
              $kelas_jurusan = ""; 

              while ($data = mysqli_fetch_array($result)) {
                $no++;
              ?>
              <tr>
                <td><?=$no?></td>
                <td><img src="images/<?=$data['foto']?>" alt="" width="90"></td>
                <td><?=$data['nama_siswa']?></td>
                <td><?=$data['nis']?></td>
                <td><?=$data['tanggal_lahir']?></td>
                <td><?=$data['kelas']?></td>
                <td><?=$data['jurusan']?></td>
                <td><?=$data['gender']?></td>
                <td><?= number_format(intval($data['poin_sis']))?></td>
              </tr>
              <?php
              }
              ?>
            </tbody>
          </table>
        </div>
        <!-- /.box-body -->
      </div>

    </div>
    <!-- /.col -->
  </div>
  <!-- /.row -->
</section>
