<!-- Main Sidebar Container -->
<aside class="main-sidebar sidebar-dark-primary elevation-4">
	<!-- Brand Logo -->
	<a href="<?php echo base_url('dashboard') ?>" class="brand-link">
		<img src="<?php echo base_url() ?>assets/admin/dist/img/LogoMTD.png" alt="AdminLTE Logo"
			class="brand-image img-circle elevation-3" style="opacity: .8">
		<span class="brand-text font-weight-light"><strong>APLIKASI PPDB MTD</strong></span>
	</a>

	<!-- Sidebar -->
	<div class="sidebar">
		<!-- Sidebar user panel (optional) -->
		<div class="user-panel mt-3 pb-3 mb-3 d-flex">
			<div class="image">
				<img src="<?php 
          $user_aktif = $this->user_model->detail($this->session->userdata('id'));

          if($user_aktif->gambar =="") {
          echo $this->website->icon(); }else{ echo base_url('assets/upload/user/thumbs/'.$user_aktif->gambar); } ?>"
					class="img-circle elevation-2" alt="<?php echo $this->session->userdata('nama'); ?>">
			</div>
			<div class="info">
				<a href="<?php echo base_url('akun') ?>" class="d-block"> <?php echo $this->session->userdata('nama'); ?><br>
					<small>[ <?php echo $this->session->userdata('level'); ?> ]</small>
				</a>
			</div>
		</div>

		<!-- Sidebar Menu -->
		<nav class="mt-2">
			<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
				<!-- Add icons to the links using the .nav-icon class
               with font-awesome or any other icon font library -->
				<!--DASHBOARD-->
				<li class="nav-item">
					<a href="<?php echo base_url('dashboard') ?>" class="nav-link">
						<i class="nav-icon fas fa-tachometer-alt"></i>
						<p>
							DASHBOARD
						</p>
					</a>
				</li>

				<?php if($this->session->userdata('level')=="Administrator" or ($this->session->userdata('level')=="Operator")) { ?>
				<!--PESERTA-->
				<li class="nav-item">
					<a href="#" class="nav-link">
						<i class="nav-icon fas fa-users"></i>
						<p>
							PENDAFTARAN
							<i class="fas fa-angle-left right"></i>
						</p>
					</a>
					<ul class="nav nav-treeview">
						<li class="nav-item">
							<a href="<?php echo base_url('form-pendaftaran') ?>" class="nav-link">
								<i class="nav-icon far fa-circle text-info"></i>
								<p>Form Pendaftaran</p>
							</a>
						</li>
						<li class="nav-item">
							<a href="<?php echo base_url('gel1') ?>" class="nav-link">
								<i class="nav-icon far fa-circle text-success"></i>
								<p>Gelombang 1</p>
							</a>
						</li>
						<li class="nav-item">
							<a href="<?php echo base_url('gel2') ?>" class="nav-link">
								<i class="nav-icon far fa-circle text-danger"></i>
								<p>Gelombang 2</p>
							</a>
						</li>
						<li class="nav-item">
							<a href="<?php echo base_url('peserta') ?>" class="nav-link">
								<i class="nav-icon far fa-circle text-blue"></i>
								<p>Keseluruhan</p>
							</a>
						</li>
					</ul>
				</li>
				<?php } ?>

				<?php if($this->session->userdata('level')=="Administrator" or ($this->session->userdata('level')=="Operator")) { ?>
				<!--PENGEMBALIAN BERKAS-->
				<li class="nav-item">
					<a href="<?php echo base_url('biayaformulir') ?>" class="nav-link">
						<i class="nav-icon fas fa-file-invoice-dollar"></i>
						<p>
							BIAYA TES
						</p>
					</a>
				</li>
				<li class="nav-item">
					<a href="<?php echo base_url('formulir') ?>" class="nav-link">
						<i class="nav-icon fas fa-edit"></i>
						<p>
							KUMPUL BERKAS
						</p>
					</a>
				</li>

				<?php if($this->session->userdata('level')=="Administrator" or ($this->session->userdata('level')=="Penguji")) { ?>
				<!--DATA NILAI-->
				<li class="nav-item">
					<a href="#" class="nav-link">
						<i class="nav-icon fas fa-chalkboard-teacher"></i>
						<p>
							BTQ & WAWANCARA
							<i class="fas fa-angle-left right"></i>
						</p>
					</a>
					<ul class="nav nav-treeview">
						<li class="nav-item">
							<a href="<?php echo base_url('form') ?>" class="nav-link">
								<i class="nav-icon far fa-circle text-success"></i>
								<p>Input Nilai Tes</p>
							</a>
						</li>
						<li class="nav-item">
							<a href="<?php echo base_url('nilai') ?>" class="nav-link">
								<i class="nav-icon far fa-circle text-danger"></i>
								<p>Data Nilai Tes</p>
							</a>
						</li>
					</ul>					
				</li>
				<?php } ?>

				<!--PENGUMUMAN-->
				<li class="nav-item">
					<a href="<?php echo base_url('pengumuman_setting') ?>" class="nav-link">
						<i class="nav-icon fas fa-laptop"></i>
						<p>
							PENGUMUMAN
						</p>
					</a>
				</li>
				<!--DATA REGISTRASI-->
				<li class="nav-item">
					<a href="#" class="nav-link">
						<i class="nav-icon far fa-plus-square"></i>
						<p>
							REGISTRASI
							<i class="fas fa-angle-left right"></i>
						</p>
					</a>
					<ul class="nav nav-treeview">
						<li class="nav-item">
							<a href="<?php echo base_url('invoice') ?>" class="nav-link">
								<i class="nav-icon far fa-circle text-success"></i>
								<p>Invoice & Salin Slip BTN</p>
							</a>
						</li>
						<li class="nav-item">
							<a href="<?php echo base_url('registrasi') ?>" class="nav-link">
								<i class="nav-icon far fa-circle text-danger"></i>
								<p>Laporan Salin Slip BTN</p>
							</a>
						</li>
					</ul>
				</li>
				<!-- LAPORAN -->
				<li class="nav-item">
					<a href="#" class="nav-link">
						<i class="nav-icon far fa-plus-square"></i>
						<p>
							LAPORAN
							<i class="fas fa-angle-left right"></i>
						</p>
					</a>
					<ul class="nav nav-treeview">
						<li class="nav-item">
							<a href="<?php echo base_url('laporanbiayaformulir') ?>" class="nav-link">
								<i class="nav-icon far fa-circle text-success"></i>
								<p>Laporan Biaya Tes</p>
							</a>
						</li>
						<li class="nav-item">
							<a href="<?php echo base_url('laporantransaksiregistrasi') ?>" class="nav-link">
								<i class="nav-icon far fa-circle text-danger"></i>
								<p>Laporan Registrasi</p>
							</a>
						</li>
					</ul>
				</li>

				<?php } ?>		

	<!-- ============================================================================================== -->
				<?php if($this->session->userdata('level')=="Administrator") { ?>
				<li class="nav-header">==KHUSUS ADMIN==</li>
				<!--PENGUMUMAN-->
				<!-- <li class="nav-item">
					<a href="<?php echo base_url('pengumuman_setting') ?>" class="nav-link">
						<i class="nav-icon fas fa-laptop"></i>
						<p>
							PENGUMUMAN
						</p>
					</a>
				</li> -->
				<!--PEMBAYARAN TES-->
				<!-- <li class="nav-item">
					<a href="<?php echo base_url('pembayaran') ?>" class="nav-link">
						<i class="nav-icon fas fa-edit"></i>
						<p>
							PEMBAYARAN TES
						</p>
					</a>
				</li> -->
				<!--DATA REGISTRASI-->
				<!-- <li class="nav-item">
					<a href="#" class="nav-link">
						<i class="nav-icon far fa-plus-square"></i>
						<p>
							REGISTRASI
							<i class="fas fa-angle-left right"></i>
						</p>
					</a>
					<ul class="nav nav-treeview">
						<li class="nav-item">
							<a href="<?php echo base_url('invoice') ?>" class="nav-link">
								<i class="nav-icon far fa-circle text-success"></i>
								<p>Invoice</p>
							</a>
						</li>
						<li class="nav-item">
							<a href="<?php echo base_url('registrasi') ?>" class="nav-link">
								<i class="nav-icon far fa-circle text-danger"></i>
								<p>Salin Slip</p>
							</a>
						</li>
					</ul>
				</li> -->

				<!-- LAPORAN -->
				<!-- <li class="nav-item">
					<a href="#" class="nav-link">
						<i class="nav-icon far fa-plus-square"></i>
						<p>
							LAPORAN
							<i class="fas fa-angle-left right"></i>
						</p>
					</a>
					<ul class="nav nav-treeview">
						<li class="nav-item">
							<a href="<?php echo base_url('laporanbiayaformulir') ?>" class="nav-link">
								<i class="nav-icon far fa-circle text-success"></i>
								<p>Laporan Biaya Tes/Formulir</p>
							</a>
						</li>
						<li class="nav-item">
							<a href="<?php echo base_url('laporantransaksiregistrasi') ?>" class="nav-link">
								<i class="nav-icon far fa-circle text-danger"></i>
								<p>Laporan Registrasi PPDB</p>
							</a>
						</li>
					</ul>
				</li> -->

				<!-- DATA SETTING
				<li class="nav-item">
					<a href="<?php echo base_url('pengaturan') ?>" class="nav-link">
						<i class="nav-icon fas fa-cog"></i>
						<p>
							SETTING
						</p>
					</a>
				</li> -->

				<!-- SETTING -->
				<li class="nav-item">
					<a href="#" class="nav-link">
						<i class="nav-icon fas fa-cog"></i>
						<p>
							PENGATURAN
							<i class="fas fa-angle-left right"></i>
						</p>
					</a>
					<ul class="nav nav-treeview">
						<li class="nav-item">
							<a href="<?php echo base_url('pengaturan2') ?>" class="nav-link">
								<i class="nav-icon far fa-circle text-info"></i>
								<p>Panitia & Biaya Tes</p>
							</a>
						</li>
						<li class="nav-item">
							<a href="<?php echo base_url('biayappdb') ?>" class="nav-link">
								<i class="nav-icon far fa-circle text-success"></i>
								<p>Biaya PPDB</p>
							</a>
						</li>
						<li class="nav-item">
							<a href="<?php echo base_url('sosialisasi') ?>" class="nav-link">
								<i class="nav-icon far fa-circle text-blue"></i>
								<p>Sosialisasi Tes</p>
							</a>
						</li>
						<li class="nav-item">
							<a href="<?php echo base_url('pengaturan') ?>" class="nav-link">
								<i class="nav-icon far fa-circle text-danger"></i>
								<p>Tampil di Peserta</p>
							</a>
						</li>
					</ul>
				</li>

				<!--DATA PENGGUNA-->
				<li class="nav-item">
					<a href="<?php echo base_url('user') ?>" class="nav-link">
						<i class="nav-icon fas fa-lock"></i>
						<p>
							PENGGUNA
						</p>
					</a>
				</li>
				<?php } ?>

				<?php if($this->session->userdata('level')=="Peserta") { ?>
				<?php
            $menu = $this->user_model->menu_pengumuman();            
          ?>
				<?php if($menu->pengaturan_value == 1) { ?>
				<!--PENGUMUMAN-->
				<li class="nav-item">
					<a href="<?php echo base_url('pengumuman') ?>" class="nav-link">
						<i class="nav-icon fas fa-laptop"></i>
						<p>
							PENGUMUMAN
						</p>
					</a>
				</li>
				<?php } ?>
				<!--BIODATA-->
				<li class="nav-item">
					<a href="<?php echo base_url('biodata') ?>" class="nav-link">
						<i class="nav-icon fas fa-user"></i>
						<p>
							BIODATA
						</p>
					</a>
				</li>
				<!--BERKAS-->
				<li class="nav-item">
					<a href="<?php echo base_url('berkas') ?>" class="nav-link">
						<i class="nav-icon fas fa-edit"></i>
						<p>
							BERKAS
						</p>
					</a>
				</li>
				<!--LAP. REGIS-->
				<li class="nav-item">
					<a href="<?php echo base_url('lap_registrasi') ?>" class="nav-link">
						<i class="nav-icon fas fa-check-double"></i>
						<p>
							REGISTRASI
						</p>
					</a>
				</li>
				<?php } ?>

				<!--PANDUAN
          <li class="nav-item">
            <a href="<?php echo base_url('panduan') ?>" class="nav-link">
              <i class="nav-icon fas fa-book"></i>
              <p>
                PANDUAN              
              </p>
            </a>
          </li>-->
				<!--LOGOUT-->
				<li class="nav-item">
					<a href="<?php echo base_url('login/logout') ?>" class="nav-link"
						onclick="return confirm('Yakin ingin keluar dari aplikasi ?')">
						<i class="nav-icon fas fa-sign-out-alt text-danger"></i>
						<p>
							LOGOUT
						</p>
					</a>
				</li>
			</ul>
		</nav>
		<!-- /.sidebar-menu -->
	</div>
	<!-- /.sidebar -->
</aside>

<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
	<!-- Content Header (Page header) -->
	<div class="content-header">
		<div class="container-fluid">
			<div class="row mb-2">
				<div class="col-sm-6">

				</div><!-- /.col -->
				<div class="col-sm-6">
					<ol class="breadcrumb float-sm-right">
						<li class="breadcrumb-item active"><a href="<?php echo base_url('dashboard') ?>">Home</a></li>
						<li class="breadcrumb-item active"><?php echo $title ?></li>
					</ol>
				</div><!-- /.col -->
			</div><!-- /.row -->
		</div><!-- /.container-fluid -->
	</div>
	<!-- /.content-header -->

	<!-- Main content -->
	<section class="content">
		<div class="container-fluid">
			<!-- Small boxes (Stat box) -->
			<div class="row">

				<div class="col-md-12">

					<div class="card">
						<div class="card-header">
							<h3 class="card-title"><?php echo $title ?></h3>
						</div>
						<!-- /.card-header -->
						<div class="card-body">

						<?php 
						if($this->session->flashdata('sukses'))  {
						?>

						<div class="alert alert-success alert-dismissible" id="success-alert">
							<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
							<i class="icon fas fa-check"></i><?php echo $this->session->flashdata('sukses'); ?>
						</div>

						<script>
							// Menghilangkan alert setelah 3 detik
							setTimeout(function() {
								document.getElementById('success-alert').style.display = 'none';
							}, 3000);
						</script>

						<?php } ?>


							<!--validasi error-->
							<?php echo validation_errors('<div class="alert alert-warning alert-dismissible">
              <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
              <i class="icon fas fa-check"></i>','</div>') ?>
