 <?php
defined('APK') or exit('Anda tidak dizinkan mengakses langsung script ini!');
?>
<?php if ($ac == '') { ?>
   
	<div class='row'>
        <div class='col-md-12'>
            <div class="card">
             <div class="card-header">	
                  <h5 class='card-title'><i class="fas fa-calendar"></i> Rekapitulasi Absensi Kelas</h5></div>    
			  
                   <div class="card-body">
                    <div class='table-responsive'>
                        <table style="font-size: 12px" id='example1' class='table'>
                            <thead>
                                <tr>
                                    <th width='5%'>No</th>
									<th width="5%">Tingkat</th>
									  <th width="15%">Rombel</th>
                                    <th>Kurikulum</th>  
                                     <th>Wali Kelas</th> 	
									
									  <th width="5%">Cetak</th>
                                </tr>
                            </thead>
							
							<tbody>
							
                                <?php
								$no = 0;
				
								 $query = mysqli_query($koneksi, "select * from kelas ORDER BY level ASC");
                            while ($kelas = mysqli_fetch_array($query)) {
							$wali=fetch($koneksi,'users',['jabatan' =>$kelas['id_kelas']]);
							
							 $no++;
                            ?>
							 <tr>
                                    <td><?= $no; ?></td>
									 <td><?= $kelas['level'] ?></td>
									 <td><?= $kelas['id_kelas'] ?></td>
							        <td><?= $kelas['kurikulum'] ?></td>
									<td><?= $wali['nama'] ?></td>
									
								  <td>
								   <a href="sandik_absen/cetakabsenkelas.php?kelas=<?= $kelas['id_kelas'] ?>" target="_blank" class="btn btn-sm btn-outline-danger" ><i class='fa fa-print'></i> </a>
										
								  </td>
							       </tr>
                            <?php } ?>
                        </tbody>
                        </table>
						
                    </div>
                    </div>
					</div>
	<?php } ?>
  
  