
<?php if ($ac == '') { ?>

    <div class='row'>
	<div class='col-md-12'>
             <div class='panel panel-default'>
               <div class="panel-heading" style="height:45px">
                    <div class='box-tools pull-right '>
					 
                    </div>
					<h4 class='box-title'><i class="fas fa-graduation-cap"></i> Cetak Rapor</h4>
                </div>
				<div class='box-header with-border '>
			   <div class='box-tools pull-right '>
			   <table>
			   <tr>
			   <td>
			   <div class="form-group-sm">
			  <select name='jenjang' class='form-control' >
              <option value=""><?= $setting['sekolah'] ?></option>
               </select>
			   </div>
				</td>
			   <td>
			   <div class="form-group-sm">
			  <select name='jenjang' class='form-control' >
              <option value=""><?= $setting['jenjang'] ?></option>
               </select>
			   </div>
				</td>
				<td>
				<div class="form-group-sm">
			  <select name='jenjang' class='form-control'>
               <option value=""><?= $setting['kota'] ?></option>
               </select>
			   </div>
				</td>
				<td>
				<div class="form-group-sm">
			  <select name='jenjang' class='form-control' >
               <option value=""><?= $setting['kecamatan'] ?></option>
               </select>
			   </div>
				</td>
				</tr>					
			</table>
			</div>
			 <h4 class='box-title'></h4>
			  </div>
			  <div class="box-body">
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#tab_1" data-toggle="tab" aria-expanded="true" >E-Rapor</a></li>
                    </ul>
					<div class="tab-content">
                    <div class="tab-pane active" id="tab_1" >
				<div class="panel panel-default">
				 <div class='box-body'>
				 <div class='row'>
        <div class='col-md-12'>
           <div class='box box-solid '>
                
            <div class='box-body'>
                   <div class='table-responsive'>
                        <table style="font-size: 11px" id='tabelekstra' class='table'>
                            <thead>
                            <tr>
                             <th width="5%" class="text-center">
                                    #
                                </th>
                                <th width="25%">Kelas</th>
                                <th>Wali Kelas</th>
								
							
							<th width="5%" style="text-align:center">Cetak Rapor</th>
							
                            </tr>
                        </thead>
                        <tbody>
                            <?php
							if($pengawas['level']=='admin'){
                            $query = mysqli_query($koneksi, "select * FROM siswa GROUP BY id_kelas");
							}else{
						    $query = mysqli_query($koneksi, "select * FROM siswa WHERE id_kelas='$pengawas[jabatan]' GROUP BY id_kelas");
							}
                            $no = 0;
                            while ($walas = mysqli_fetch_array($query)) {
							$user=fetch($koneksi,'users',['jabatan' =>$walas['id_kelas']]);
                                $no++;
                            ?>
                                <tr>
                                    <td><?= $no; ?></td>
									<td><?= $walas['id_kelas'] ?></td>
									<td><?= $user['nama'] ?></td>
									
									                         
										   
										   <td style="text-align:center">
                                       <a href="?pg=raporproyek&ac=siswa&kelas=<?= $walas['id_kelas'] ?>" class="btn btn-xs btn-info btn-rounded">
                                          <i class="fas fa-print"></i></button></a>                                        
										   </td>
										   
							   </tr>
								
                            <?php }
                            ?>

                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

	
<?php } elseif ($ac == 'siswa') { ?>
    <?php $kelas = $_GET['kelas']; ?>
	 <div class='row'>
	<div class='col-md-12'>
             <div class='panel panel-default'>
               <div class="panel-heading" style="height:45px">
                    <div class='box-tools pull-right '>
					 
                    </div>
					<h4 class='box-title'><i class="fas fa-graduation-cap"></i> Cetak Rapor</h4>
                </div>
				<div class='box-header with-border '>
			   <div class='box-tools pull-right '>
			   <table>
			   <tr>
			   <td>
			   <div class="form-group-sm">
			  <select name='jenjang' class='form-control' >
              <option value=""><?= $setting['sekolah'] ?></option>
               </select>
			   </div>
				</td>
			   <td>
			   <div class="form-group-sm">
			  <select name='jenjang' class='form-control' >
              <option value=""><?= $setting['jenjang'] ?></option>
               </select>
			   </div>
				</td>
				<td>
				<div class="form-group-sm">
			  <select name='jenjang' class='form-control'>
               <option value=""><?= $setting['kota'] ?></option>
               </select>
			   </div>
				</td>
				<td>
				<div class="form-group-sm">
			  <select name='jenjang' class='form-control' >
               <option value=""><?= $setting['kecamatan'] ?></option>
               </select>
			   </div>
				</td>
				</tr>					
			</table>
			</div>
			 <h4 class='box-title'></h4>
			  </div>
			  <div class="box-body">
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#tab_1" data-toggle="tab" aria-expanded="true" >E-Rapor</a></li>
                    </ul>
					<div class="tab-content">
                    <div class="tab-pane active" id="tab_1" >
				<div class="panel panel-default">
				 
				 <div class='row'>
        <div class='col-md-12'>
          
            <div class='box-body'>
                   <div class='table-responsive'>
                        <table style="font-size: 11px" id='tabelekstra' class='table'>
                            <thead>
                            <tr>
                             <th width="5%" class="text-center">
                                    #
                                </th>
                                <th width="5%">Kelas</th>
                                <th>Nama Siswa</th>
							<th width="5%" style="text-align:center">Cover</th>
							<th width="5%" style="text-align:center">Biodata</th>
							<th width="5%" style="text-align:center">Rapor</th>
							
                            </tr>
                        </thead>
                        <tbody>
                            <?php
                            $query = mysqli_query($koneksi, "select * FROM siswa WHERE id_kelas='$_GET[kelas]'");
                            $no = 0;
                            while ($siswa = mysqli_fetch_array($query)) {
							
                                $no++;
                            ?>
                                <tr>
                                    <td><?= $no; ?></td>
									<td><?= $siswa['id_kelas'] ?></td>
									<td><?= $siswa['nama'] ?></td>
									<td>
									<a href="sandik_rapor/print_cover.php?ids=<?= $siswa['id_siswa'] ?>" target="_blank" class="btn btn-sm btn-primary"><i class="fas fa-graduation-cap"></i></a>
									</td>
									<td>
									<a href="sandik_rapor/print_biodata.php?ids=<?= $siswa['id_siswa'] ?>" target="_blank" class="btn btn-sm btn-warning"><i class="fas fa-user-cog"></i></a>
									</td>
									<td>
									<a href="sandik_proyek/print_raport.php?ids=<?= $siswa['id_siswa'] ?>" target="_blank" class="btn btn-sm btn-success"><i class="fas fa-print"></i></a>
									</td>
									</tr>
								
                            <?php }
                            ?>

                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

	<?php } ?>