<?php
$object->query = "SELECT * FROM akun_user WHERE id_user=".$_SESSION['id_akun']." " ;
$result = $object->get_result();
$nama = '';
foreach ($result as $row) {
  $nama = $row["nama"];
}
?>
<aside class="main-sidebar sidebar-dark-primary elevation-4">
    <!-- Brand Logo -->
    <a href="#" class="brand-link">
      <img src="img/logo_bnn.png" alt="AdminLTE Logo" class="brand-image img-circle elevation-3" style="opacity: .8">
      <span class="brand-text font-weight-light">SIDINAR</span>
    </a>

    <!-- Sidebar -->
    <div class="sidebar">
      <!-- Sidebar user (optional) -->
      <div class="user-panel mt-3 pb-3 mb-3 d-flex">
        <div class="image">
          <!--img src="dist/img/user2-160x160.jpg" class="img-circle elevation-2" alt="User Image"-->
        </div>
        <div class="info">
          <a href="#" class="d-block"><?=$nama ?></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 -->
          <li class="nav-header">MENU UTAMA</li>
          <li class="nav-item">
            <a href="#" class="nav-link">
              <i class="nav-icon fas fa-tachometer-alt"></i>
              <p>
                SURAT KELUAR
                <i class="right fas fa-angle-left"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              <li class="nav-item">
                <a href="tables_surat_masuk.php" class="nav-link">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Surat Masuk</p>
                </a>
              </li>
              <li class="nav-item">
                <a href="tables_surat_keluar.php" class="nav-link">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Surat Keluar</p>
                </a>
              </li>
              <li class="nav-item">
                <a href="tables_verifikasi_surat.php" class="nav-link">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Verifikasi</p>
                </a>
              </li>
              <li class="nav-item">
                <a href="tables_ttd_surat.php" class="nav-link">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Tanda Tangan</p>
                </a>
              </li>
              <li class="nav-item">
                <a href="logout.php" class="nav-link">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Logout</p>
                </a>
              </li>
            </ul>
          </li>
          <?php if($_SESSION['id_akun']==1){?>
          <li class="nav-header">PENGATURAN</li>
          <li class="nav-item">
            <a href="#" class="nav-link">
              <i class="nav-icon far fa-envelope"></i>
              <p>
                Pengaturan
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              <li class="nav-item">
                <a href="tanda_tangan.php" class="nav-link">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Tanda Tangan</p>
                </a>
              </li>
              <li class="nav-item">
                <a href="verifikator.php" class="nav-link">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Verifikator</p>
                </a>
              </li>
              
            </ul>
          </li>
          <?php }?>
        </ul>
      </nav>
      <!-- /.sidebar-menu -->
    </div>
    <!-- /.sidebar -->
  </aside>