<?php 
	
	$pen = $xcode;
	if ($link != 'add-pesankesan'){
		if ($pen == ''){
?>
<div class="sidebar-menu">
        <div class="logo"> <a href="#" class="sidebar-icon"> <span class="fa fa-bars"></span> </a> <a href="#"> <span id="logo" ></span> 
            <!--<img id="logo" src="" alt="Logo"/>--> 
        </a> </div>     
        <div class="menu">
          <ul id="menu" >

            <li><a href="#"><i class="fa fa-list"></i><span>Master Data</span><span class="fa fa-angle-right" style="float: right"></span></a>
              <ul>
                <li><a href="<?php echo $base?>data-anggota">Data Anggota</a></li>
                <li><a href="<?php echo $base?>data-kategori">Data Kategori</a></li> 
                <li><a href="<?php echo $base?>data-buku">Data Buku</a></li>    
                <li><a href="<?php echo $base?>data-ebook">Data Ebook</a></li>              
              </ul>
            </li>
            <li><a href="#"><i class="fa fa-shopping-cart"></i><span>Transaksi</span><span class="fa fa-angle-right" style="float: right"></span></a>
              <ul>
                <li><a href="<?php echo $base?>add-transaksi-peminjaman">Transaksi Peminjaman</a></li>
                <li><a href="<?php echo $base?>data-peminjaman">Transaksi Pengembalian</a></li> 
                <li><a href="<?php echo $base?>data-peminjaman">Data Peminjaman</a></li>  
                <li><a href="<?php echo $base?>data-pengembalian">Data Pengembalian</a></li>              
              </ul>
            </li>
            <li><a href="#"><i class="fa fa-shopping-cart"></i><span>Katalog</span><span class="fa fa-angle-right" style="float: right"></span></a>
              <ul>
                <li><a href="<?php echo $base?>data-katalog">Katalog Ebook</a></li>
                <li><a href="<?php echo $base?>data-katalogbuku">Katalog Buku</a></li>               
              </ul>
            </li>
              <li><a href="<?php echo $base?>data-kunjungan"><i class="fa fa-calendar-check-o"></i><span>Data Kunjungan</span></a></li>
            <li id="menu-academico" ><a href="#"><i class="fa fa-file-text"></i><span>Laporan</span><span class="fa fa-angle-right" style="float: right"></span></a>
              <ul id="menu-academico-sub">
                 <li id="menu-academico-boletim" ><a href="<?php echo $base?>data-laporanpeminjaman">Laporan Peminjaman</a></li>
                <li id="menu-academico-avaliacoes" ><a href="<?php echo $base?>data-laporanpengembalian">Laporan Pengembalian</a></li>  
                 <li id="menu-academico-avaliacoes" ><a href="<?php echo $base?>data-laporankunjungan">Laporan Kunjungan</a></li>
                 <li id="menu-academico-avaliacoes" ><a href="<?php echo $base?>add-cetak-kartu-anggota">Kartu Anggota</a></li>             
              </ul>
            </li>
            
            <li><a href="<?php echo $base?>data-chart"><i class="fa fa-bar-chart"></i><span>Charts</span></a></li>
            
             
          </ul>
        </div>
   </div>
  <div class="clearfix"> </div>
</div>
<?php }elseif ($pen != '' and $link != ('data-katalog' or 'data-katalogbuku')){?>
<div class="sidebar-menu">
        <div class="logo"> <a href="#" class="sidebar-icon"> <span class="fa fa-bars"></span> </a> <a href="#"> <span id="logo" ></span> 
            <!--<img id="logo" src="" alt="Logo"/>--> 
        </a> </div>     
        <div class="menu">
          <ul id="menu" >

            <li><a href="#"><i class="fa fa-list"></i><span>Master Data</span><span class="fa fa-angle-right" style="float: right"></span></a>
              <ul>
                <li><a href="<?php echo $base?>data-anggota">Data Anggota</a></li>
                <li><a href="<?php echo $base?>data-kategori">Data Kategori</a></li> 
                <li><a href="<?php echo $base?>data-buku">Data Buku</a></li>    
                <li><a href="<?php echo $base?>data-ebook">Data Ebook</a></li>              
              </ul>
            </li>
            <li><a href="#"><i class="fa fa-shopping-cart"></i><span>Transaksi</span><span class="fa fa-angle-right" style="float: right"></span></a>
              <ul>
                <li><a href="<?php echo $base?>add-transaksi-peminjaman">Transaksi Peminjaman</a></li>
                <li><a href="<?php echo $base?>data-peminjaman">Transaksi Pengembalian</a></li> 
                <li><a href="<?php echo $base?>data-peminjaman">Data Peminjaman</a></li>  
                <li><a href="<?php echo $base?>data-pengembalian">Data Pengembalian</a></li>              
              </ul>
            </li>
            <li><a href="#"><i class="fa fa-shopping-cart"></i><span>Katalog</span><span class="fa fa-angle-right" style="float: right"></span></a>
              <ul>
                <li><a href="<?php echo $base?>data-katalog">Katalog Ebook</a></li>
                <li><a href="<?php echo $base?>data-katalogbuku">Katalog Buku</a></li>               
              </ul>
            </li>
              <li><a href="<?php echo $base?>data-katalog"><i class="fa fa-calendar-check-o"></i><span>Data Kunjungan</span></a></li>
            <li id="menu-academico" ><a href="#"><i class="fa fa-file-text"></i><span>Laporan</span><span class="fa fa-angle-right" style="float: right"></span></a>
              <ul id="menu-academico-sub">
                 <li id="menu-academico-boletim" ><a href="<?php echo $base?>data-laporanpeminjaman">Laporan Peminjaman</a></li>
                <li id="menu-academico-avaliacoes" ><a href="<?php echo $base?>data-laporanpengembalian">Laporan Pengembalian</a></li>  
                 <li id="menu-academico-avaliacoes" ><a href="<?php echo $base?>data-laporankunjungan">Laporan Kunjungan</a></li>             
              </ul>
            </li>
            
            <li><a href="<?php echo $base?>data-chart"><i class="fa fa-bar-chart"></i><span>Charts</span></a></li>
            
             
          </ul>
        </div>
   </div>
  <div class="clearfix"> </div>
</div>

<?php } elseif($pen == 'x' and $link == ('data-katalog' or 'data-katalogbuku')){?>
<div class="sidebar-menu">
        <div class="logo"> <a href="#" class="sidebar-icon"> <span class="fa fa-bars"></span> </a> <a href="#"> <span id="logo" ></span> 
            <!--<img id="logo" src="" alt="Logo"/>--> 
        </a> </div>     
        <div class="menu">
          <ul id="menu" >
            <li><a href="#"><i class="fa fa-shopping-cart"></i><span>Katalog</span><span class="fa fa-angle-right" style="float: right"></span></a>
              <ul>
                <li><a href="<?php echo $base?>data-katalog/x">Katalog Ebook</a></li>
                <li><a href="<?php echo $base?>data-katalogbuku/x">Katalog Buku</a></li>               
              </ul>
            </li>
            <li><a href="<?php echo $base?>add-pesankesan/x"><i class="fa fa-sign-out "></i><span>Keluar</span></a></li>
          </ul>
        </div>
   </div>
  <div class="clearfix"> </div>
</div>
<?php } }else{
	?>
<div class="sidebar-menu">
        <div class="menu">
          <ul id="menu" >
          </ul>
        </div>
   </div>
  <div class="clearfix"> </div>
</div>
<?php }?>
<script>
var toggle = true;
            
$(".sidebar-icon").click(function() {                
  if (toggle)
  {
    $(".page-container").addClass("sidebar-collapsed").removeClass("sidebar-collapsed-back");
    $("#menu span").css({"position":"absolute"});
  }
  else
  {
    $(".page-container").removeClass("sidebar-collapsed").addClass("sidebar-collapsed-back");
    setTimeout(function() {
      $("#menu span").css({"position":"relative"});
    }, 400);
  }               
                toggle = !toggle;
            });
</script>

<script src="js/jquery.nicescroll.js"></script>
    <script src="js/scripts.js"></script>
    <!--//scrolling js-->
<script src="js/bootstrap.js"> </script>



   