<section class="sidebar"><font face="verdana">
  <!-- Sidebar user panel -->
  <div class="user-panel">
	<div class="pull-left image">
	  <img src="<?php echo $foto; ?>" class="img-circle" alt="User Image">
	</div>
	<div class="pull-left info">
	  <p><?php echo $nama; ?></p>
	  <a href="#"><i class="fa fa-circle text-success"></i>Tahun Ajaran : <?= $ta['nmTahunAjaran']; ?></a>
	</div>
  </div>
	<?php
	switch ($_GET['view']) {
		//menu master data
		case 'admin':
			$judul="<span class='fa fa-users'></span> Manajemen Admin";
			$aktifA='active';
			$aktifA1='active';
			break;
		case 'tahun':
			$judul="<span class='fa fa-calendar'></span> Manajemen Tahun Ajaran";			
			$aktifA='active';
			$aktifA2='active';
			break;
		case 'kelas':
			$judul="<span class='fa fa-tasks'></span> Manajemen Data Kelas";
			$aktifA='active';
			$aktifA3='active';
			break;
		case 'siswa':
			$judul="<span class='fa fa-users'></span> Manajemen Data Siswa";
			$aktifA='active';
			$aktifA4='active';
			break;
		case 'kelulusan':
			$judul="<span class='fa fa-graduation-cap'></span> Kelulusan";
			$aktifA='active';
			$aktifA5='active';
			break;
		case 'kenaikankelas':
			$judul="<span class='fa  fa-cubes'></span> Proses Pindah Kelas dan Kenaikan Kelas";
			$aktifA='active';
			$aktifA6='active';
			break;
		case 'pindahkelas':
			$judul="<span class='fa fa-tasks'></span> Pindah Kelas";
			$aktifA='active';
			$aktifA6='active';
			break;
	  //menu kas
			case 'kasmas':
			$judul="<span class='fa fa-money'></span>Kas Masuk";
			$aktifX='active';
			$aktifX1='active';
			break;
		case 'kaskel':
			$judul="<span class='fa fa-ils'></span> Kas Keluar";
			$aktifX='active';
			$aktifX2='active';
			break;
		//menu keuangan
		case 'posbayar':
			$judul="<span class='fa fa-money'></span> Pos Bayar";
			$aktifB='active';
			$aktifB1='active';
			break;
		case 'jenisbayar':
			$judul="<span class='fa fa-ils'></span> Jenis Pembayaran";
			$aktifB='active';
			$aktifB2='active';
			break;
		case 'tarif':
			$judul="<span class='fa fa-gg-circle'></span> Tarif Pembayaran";
			$aktifB='active';
			$aktifB2='active';
			break;
		case 'jurnalumum':
			$judul="<span class='fa fa-line-chart'></span> Pengeluaran Kas";
			$aktifm='active';
			$aktifm='active';
			break;
			case 'jurnal':
			$judul="<span class='fa fa-line-chart'></span> Saldo Awal";
			$aktifn='active';
			$aktifn='active';
			break;
		//menu backup&restore
		case 'restore':
			$judul="";
			$aktifZ='active';
			break;
		case 'backup':
			$judul="";
			$aktifZ='active';
			break;
			case 'tagihan1':
			$judul="<span class='fa fa-download'></span> Tagihan";
			$aktifZ='active';
			break;
		//menu tabungan
		case 'nasabah':
			$judul="<span class='fa fa-users'></span> Nasabah";
			$aktifK='active';
			$aktifK1='active';
		case 'transaksi1':
			$judul="<span class='fa fa-money'></span> Transaksi";
			$aktifK='active';
			$aktifK2='active';
		case 'laptransaksi':
			$judul="<span class='fa fa-print'></span> Laporan Transaksi";
			$aktifK='active';
			$aktifK4='active';
			
		case 'pengaturan':
			$judul="<span class='fa fa-wrench'></span> Pengaturan";
			$aktifK='active';
			$aktifK5='active';
		
		//menu bhutangpiutang
		
		case 'hutangtoko':
			$judul="<span class='fa fa-money'></span> Hutang ";
			$aktifl='active';
			break;
			
		
		//menu pembayaran
		case 'pembayaran':
			$judul="<span class='fa fa-money'></span> Transaksi Pembayaran";
			$aktifC='active';
			break;
		case 'angsuran':
			$judul="<span class='fa fa-money'></span> Angsuran Pembayaran";
			$aktifC='active';
			break;
		case 'bayarbulanan':
			$judul="<span class='fa fa-money'></span> Pembayaran Bulanan";
			$aktifC='active';
			break;
		//menu laporan
		case 'lapsiswa':
			$judul="<span class='fa fa-tasks'></span> Laporan Siswa Per Kelas";
			$aktifD='active';
			$aktifD1='active';
			break;
		case 'lappembayaran':
			$judul="<span class='fa fa-tasks'></span> Laporan Pembayaran Per Kelas";
			$aktifD='active';
			$aktifD2='active';
			break;
		case 'lappembayaranperbulan':
			$judul="<span class='fa fa-tasks'></span> Laporan Pembayaran Per Bulan";
			$aktifD='active';
			$aktifD3='active';
			break;
		case 'lappembayaranperposbayar':
			$judul="<span class='fa fa-tasks'></span> Laporan Pembayaran Per Pos Bayar";
			$aktifD='active';
			$aktifD5='active';
			break;
		case 'laptagihansiswa':
			$judul="<span class='fa fa-tasks'></span> Laporan Tagihan Siswa";
			$aktifD='active';
			$aktifD6='active';
			break;
			case 'lapkas':
			$judul="<span class='fa fa-tasks'></span> Laporan Kas Kelas";
			$aktifD='active';
			$aktifD7='active';
			break;
		case 'rekapitulasi':
			$judul="<span class='fa fa-tasks'></span> Rekapitulasi Pembayaran";
			$aktifD='active';
			$aktifD4='active';
			break;
		//menu home
		default:
			$judul="<span class='fa fa-dashboard'></span> Dashboard";
			$aktifHome='active';
	}
	?>
  <!-- sidebar menu: : style can be found in sidebar.less -->
  
  <ul class="sidebar-menu">
	  <li class="header"><b>MENU UTAMA ADMIN</li></b>
	  <li class="<?php echo $aktifHome; ?>"><a href="./"><i class="fa fa-tachometer"></i> <span>Dashboard</span></a></li>
	   <?php if ($_SESSION[level]=='admin'){ ?>
	  <li class="treeview <?php echo $aktifA; ?>">
		<a href="#">
			<i class="fa fa-book"></i>
			<span>Master Data</span>
			<i class="fa fa-angle-left pull-right"></i>
		</a>
		
		<ul class="treeview-menu">
		  <li class="<?php echo $aktifA1; ?>"><a href="index.php?view=admin"><i class="fa fa-user"></i> Data Pengguna</a></li>
		  <li class="<?php echo $aktifA2; ?>"><a href="index.php?view=tahun"><i class="fa fa-calendar"></i> Tahun Ajaran</a></li>
		  <li class="<?php echo $aktifA3; ?>"><a href="index.php?view=kelas"><i class="fa fa-bank"></i> Kelas</a></li>
		  <li class="<?php echo $aktifA4; ?>"><a href="index.php?view=siswa"><i class="fa fa-users"></i> Siswa</a></li>		  
		  <li class="<?php echo $aktifA6; ?>"><a href="index.php?view=kenaikankelas"><i class="fa fa-rocket"></i> Kenaikan Kelas</a></li>
		  <li class="<?php echo $aktifA5; ?>"><a href="index.php?view=kelulusan"><i class="fa fa-graduation-cap"></i> Kelulusan</a></li>
		</ul>
	  </li>

	  <li class="treeview <?php echo $aktifB; ?>">
		<a href="#">
		  <i class="fa fa-credit-card"></i> <span>Keuangan</span>
			<i class="fa fa-angle-left pull-right"></i>
		</a>
		<ul class="treeview-menu">
		
		  <li class="<?php echo $aktifB1; ?>"><a href="index.php?view=posbayar"><i class="fa fa-credit-card-alt"></i> Pos Bayar</a></li>
		  <li class="<?php echo $aktifB2; ?>"><a href="index.php?view=jenisbayar"><i class="fa fa-shekel"></i> Jenis Bayar</a></li>
		  
		</ul>
	  </li>
	   
		 
	   <li class="<?php echo $aktifm; ?>"><a href="index.php?view=jurnalumum"><i class="fa fa-bar-chart"></i> <span> Pengeluaran Kas</span></a></li>
	   
	  <?php }?>
	   <!-- <?php if ($_SESSION[level]=='admin'){ ?>
	   <li class="treeview <?php echo $aktifX; ?>">
		<a href="#">
		  <i class="fa fa-credit-card"></i> <span>Kas Kelas</span>
			<i class="fa fa-angle-left pull-right"></i>
		</a>
		<ul class="treeview-menu">
		
		  <li class="<?php echo $aktifB1; ?>"><a href="index.php?view=kasmas"><i class="fa fa-credit-card-alt"></i> Kas Masuk</a></li>
		  <li class="<?php echo $aktifB2; ?>"><a href="index.php?view=kaskel"><i class="fa fa-shekel"></i> Kas Keluar</a></li>
		  
		</ul>
	  </li> -->
	   <li class="<?php echo $aktifC; ?>"><a href="index.php?view=pembayaran"><i class="fa fa-money"></i> <span>Pembayaran Siswa</span></a></li>
	    <?php }?> 
		 <?php if ($_SESSION[level]=='bendahara'){ ?>
	   <li class="<?php echo $aktifC; ?>"><a href="index.php?view=pembayaran"><i class="fa fa-money"></i> <span>Pembayaran Siswa</span></a></li>
	    <?php }?>
	   <?php if ($_SESSION[level]=='admin'){ ?>
	   	 <li class="treeview <?php echo $aktifD; ?>">
	  		<a href="#">
			<i class="fa fa-leanpub"></i>
			<span>Tabungan Siswa</span>
			<i class="fa fa-angle-left pull-right"></i>
		</a>
		<ul class="treeview-menu">

		<li class="<?php echo $aktifv2; ?>"><a href="index.php?view=nasabah"><i class="fa fa-users "></i><span> Nasabah</span></a></li>
		<li class="<?php echo $aktifv2; ?>"><a href="index.php?view=transaksi"><i class="fa fa-money"></i><span> Transaksi</span></a></li>
				<li><a href="index.php?view=laptransaksi"><i class="fa fa-print "></i><span> Lap.Transaksi </span></a></li>
		 </ul>
	  </li>
	 <li class="<?php echo $aktifl; ?>"><a href="index.php?view=hutangtoko"><i class="fa fa-balance-scale "></i> <span> Hutang Piutang</span></a></li>
	    <?php }?>
		  <?php if ($_SESSION[level]=='koperasi'){ ?>
	  <li class="treeview <?php echo $aktifD; ?>">
	  		<a href="#">
			<i class="fa fa-leanpub"></i>
			<span>Tabungan Siswa</span>
			<i class="fa fa-angle-left pull-right"></i>
		</a>
		<ul class="treeview-menu">

		<li class="<?php echo $aktifv2; ?>"><a href="index.php?view=nasabah"><i class="fa fa-users "></i><span> Nasabah</span></a></li>
		<li class="<?php echo $aktifv2; ?>"><a href="index.php?view=transaksi"><i class="fa fa-money"></i><span> Transaksi</span></a></li>
		<li class="<?php echo $aktifv2; ?>"><a href="index.php?view=laptransaksi"><i class="fa fa-print "></i><span> Lap.Transaksi </span></a></li>
		 </ul>
	  </li>
	  <?php }?>
	    <?php if ($_SESSION[level]=='admin'){ ?>
	  <li class="treeview <?php echo $aktifD; ?>">
	  
		<a href="#">
			<i class="fa fa-print"></i>
			<span>Laporan</span>
			<i class="fa fa-angle-left pull-right"></i>
		</a>
		<ul class="treeview-menu">
			<li class="<?php echo $aktifD1; ?>"><a href="index.php?view=lapsiswa"><i class="fa fa-bookmark text-yellow"></i><span> Lap. Data Siswa</span></a></li>
			<li class="<?php echo $aktifD2; ?>"><a href="index.php?view=lappembayaran"><i class="fa fa-bookmark text-green"></i><span> Lap. Pemb. Per Kelas</span></a></li>
			<li class="<?php echo $aktifD3; ?>"><a href="index.php?view=lappembayaranperbulan"><i class="fa fa-bookmark text-green"></i><span> Lap. Pemb. Per Bulan</span></a></li>
			<li class="<?php echo $aktifD5; ?>"><a href="index.php?view=lappembayaranperposbayar"><i class="fa fa-bookmark text-green"></i><span> Lap. Pemb. Per Pos Bayar</span></a></li>
			<li class="<?php echo $aktifD6; ?>"><a href="index.php?view=laptagihansiswa"><i class="fa fa-bookmark text-red"></i><span> Lap. Tagihan Siswa</span></a></li>
			<!-- <li class="<?php echo $aktifD6; ?>"><a href="index.php?view=lapkas"><i class="fa fa-bookmark text-red"></i><span> Lap. Kas Kelas</span></a></li> -->
			<li class="<?php echo $aktifD4; ?>"><a href="index.php?view=rekapitulasi"><i class="fa fa-bookmark "></i> <span>Rekapitulasi Pembayaran</span></a></li>
			<li class="<?php echo $aktifD7; ?>"><a href="index.php?view=rekappengeluaran"><i class="fa fa-bookmark "></i> <span>Rekapitulasi Pengeluaran</span></a></li>
			<li class="<?php echo $aktifD7; ?>"><a href="index.php?view=lappembayaranhari"><i class="fa fa-bookmark "></i> <span>Laporan Keuangan Perhari</span></a></li>
			<li class="<?php echo $aktifD8; ?>"><a href="index.php?view=rekapkondisikeuangan"><i class="fa fa-bookmark text-blue"></i> <span>Kondisi Keuangan</span></a></li>
		</ul>
	  </li>
	   <?php }?>
	     <?php if ($_SESSION[level]=='bendahara'){ ?>
	  <li class="treeview <?php echo $aktifD; ?>">
	  
		<a href="#">
			<i class="fa fa-print"></i>
			<span>Laporan</span>
			<i class="fa fa-angle-left pull-right"></i>
		</a>
		<ul class="treeview-menu">
			<li class="<?php echo $aktifD1; ?>"><a href="index.php?view=lapsiswa"><i class="fa fa-bookmark text-yellow"></i><span> Lap. Data Siswa</span></a></li>
			<li class="<?php echo $aktifD2; ?>"><a href="index.php?view=lappembayaran"><i class="fa fa-bookmark text-green"></i><span> Lap. Pemb. Per Kelas</span></a></li>
			<li class="<?php echo $aktifD3; ?>"><a href="index.php?view=lappembayaranperbulan"><i class="fa fa-bookmark text-green"></i><span> Lap. Pemb. Per Bulan</span></a></li>
			<li class="<?php echo $aktifD5; ?>"><a href="index.php?view=lappembayaranperposbayar"><i class="fa fa-bookmark text-green"></i><span> Lap. Pemb. Per Pos Bayar</span></a></li>
			<li class="<?php echo $aktifD6; ?>"><a href="index.php?view=laptagihansiswa"><i class="fa fa-bookmark text-red"></i><span> Lap. Tagihan Siswa</span></a></li>
			<li class="<?php echo $aktifD4; ?>"><a href="index.php?view=rekapitulasi"><i class="fa fa-bookmark "></i> <span>Rekapitulasi Pembayaran</span></a></li>
			<li class="<?php echo $aktifD7; ?>"><a href="index.php?view=rekappengeluaran"><i class="fa fa-bookmark "></i> <span>Rekapitulasi Pengeluaran</span></a></li>
			<li class="<?php echo $aktifD8; ?>"><a href="index.php?view=rekapkondisikeuangan"><i class="fa fa-bookmark text-blue"></i> <span>Kondisi Keuangan</span></a></li>
		</ul>
	  </li>
	   <?php }?>
	    <?php if ($_SESSION[level]=='admin'){ ?>
<!-- <li class="treeview <?php echo $aktifD; ?>">
	<a href="#">
			<i class="fa fa-database"></i>
			<span>Backup Database </span>
			<i class="fa fa-angle-left pull-right"></i>
		</a>
						<ul class="treeview-menu">
			<li class="<?php echo $aktifZ; ?>"><a href="index.php?view=backup"><i class="fa fa-download"></i><span> Backup Database</span></a></li>
			<li class="<?php echo $aktifZ; ?>"><a href="index.php?view=restore"><i class="fa fa-upload"></i><span> Restore Database</span></a></li>
			
			</ul>
	  </li>-->
	  
	 <li class="<?php echo $aktifK; ?>"><a href="index.php?view=pengaturan"><i class="fa fa-gears"></i> <span>Pengaturan Sekolah</span></a></li>
	   <?php }?>
		 <li><a href="logout.php" ><i class="fa fa-reply-all"></i>Keluar</a></li>       
</section>