<div class="app-menu">
                <ul class="accordion-menu">
                  
                    <li>
                        <a href="index.php"><i class="fa fa-home"></i>Home</a>
                    </li>
                  <li>
                        <a href="?"><i class="fa fa-tachometer-alt"></i>Beranda</a>
                    </li>
					 <li>
                        <a href="?pg=updatesiswa"><i class="fa fa-graduation-cap"></i>Update Data Siswa</a>
                    </li>
                   <li>
                        <a href="?pg=settingrapor"><i class="fa fa-tools"></i>Pengaturan Rapor</a>
                    </li>
				 <li>
                   <a href="?pg=urutmapel"><i class="fa fa-calendar"></i>Urutan Mapel</a>
                    </li>
				 <li>
                   <a href="?pg=kkm"><i class="fa fa-edit"></i>Setting KKM (K-13)</a>
                    </li>
					 <li>
                        <a href=""><i class="fas fa-users-cog"></i>Nilai Sikap <span class="badge rounded-pill badge-light float-end"><i class="fa fa-chevron-down"></i></span></a>
                        <ul class="sub-menu">
			     <?php $query = mysqli_query($koneksi, "select * from kelas WHERE model_rapor='1' GROUP BY model_rapor"); ?>
						   <?php  while ($mapel = mysqli_fetch_array($query)) { ?>
						<li>
                   <a href="?pg=spiritual&m=<?= $mapel['model_rapor'] ?>">Mapel Sikap Spiritual</a>
                    </li>   
					<li>
                   <a href="?pg=sosial&m=<?= $mapel['model_rapor'] ?>">Mapel Sikap Sosial</a>
                    </li> 	   
					 <?php } ?>	
                    <?php $query = mysqli_query($koneksi, "select * from kelas WHERE model_rapor='2' GROUP BY model_rapor"); ?>
						   <?php  while ($mapelQ = mysqli_fetch_array($query)) { ?>
                      <li>
                   <a href="?pg=sikap&m=<?= $mapelQ['model_rapor'] ?>">Mapel Nilai Sikap</a>
                    </li> 	
						 <?php } ?>	   
				   </ul>
                    </li>
					<li>
                   <a href="?pg=mastereskul"><i class="fa fa-th"></i>Master Eskul</a>
                    </li>
					 <li>
                        <a href=""><i class="fas fa-print"></i>Cetak Nilai Rapor <span class="badge rounded-pill badge-light float-end"><i class="fa fa-chevron-down"></i></span></a>
                        <ul class="sub-menu">
						<li>
                        <a href="?pg=cetakpts">Rapor PTS</a>
						 </li>
						 <li>
						 <?php if($setting['semester']=='1'){ ?>
                        <a href="?pg=cetakrapor">Rapor PAS</a>
						 <?php }else{ ?>
						 <a href="?pg=cetakrapor">Rapor PAT</a>
						  <?php } ?>
						 </li>
						</ul>
						 <?php $query = mysqli_query($koneksi, "select * from kelas WHERE model_rapor='3' GROUP BY model_rapor"); ?>
						   <?php  while ($mapel = mysqli_fetch_array($query)) { ?>
						   <li>
                   <a href="?pg=cetakraporproyek"><i class="fa fa-flag"></i>Cetak Rapor Proyek </a>
                    </li>
					<?php } ?>
					<hr style="margin:0px">
					 <li>
                        <a href="logout"><i class="fa fa-sign-in-alt"></i>Logout</a>
                    </li>
					<hr style="margin:0px">
					
                 </ul>
            </div>
        </div>