
<?php
/*##########################################
            NAMA MENU ADMIN
############################################
*/
?>

<?php
$id_user = $_SESSION['id_user'];
$sql_u  = $pdo->query("SELECT * FROM users WHERE id_user = '".$id_user."'")or die(print_r($pdo->errorInfo(), true));
$r_u=$sql_u->fetch(PDO::FETCH_OBJ);

?>
            
<?php

//if($_SESSION['level'] == 'admin')
//{
    $menu = 
    [
        'games'
    ];
//}
//asort($menu);// ascending order
?>

<!-- Menu -->
        <aside id="layout-menu" class="layout-menu menu-vertical menu bg-menu-theme border">
          <div class="app-brand demo">
            <!--<a href="<?php echo BASE_URL; ?>" class="app-brand-link" target="_BLANK">-->
              <span class="app-brand-logo demo">
               <img class="rounded" src="<?php echo BASE_URL; ?>/img/logo-admin.png" alt="logo" height="40">
              </span>
              <span style="font-size:20px;"><b>&nbsp; ADMIN</b></span>
              <br><br>
            <!--</a>-->

            <a href="javascript:void(0);" class="layout-menu-toggle menu-link text-large ms-auto d-block d-xl-none">
              <i class="bx bx-chevron-left bx-sm align-middle"></i>
            </a>
          </div>
		  
          <div class="menu-inner-shadow"></div>

          <ul class="menu-inner py-1">
            
            <li class="menu-item  <?php if($_GET['module'] == 'dashboard') { print('active'); } ?>">
              <a href="<?php echo BASE_URL; ?>/dashboard" class="menu-link">
                <i class="menu-icon tf-icons bx bxs-dashboard"></i>
                <div data-i18n="Analytics">Dashboard</div>
              </a>
            </li>
             <li class="menu-item  <?php if($_GET['module'] == 'home') { print('active'); } ?>">
              <a href="<?php echo BASE_URL; ?>" class="menu-link" target="_BLANK">
                <i class="menu-icon tf-icons bx bx-globe"></i>
                <div data-i18n="Analytics">Lihat Web</div>
              </a>
            </li>
            
            <li class="menu-header small text-uppercase" onCLick="$('.x').toggle();" role="button">
              <span class="menu-header-text">Menu</span> <i class="fa fa-plus"></i>
            </li>
			
			<?php foreach($menu as $menu){ ?>
			
			<li  style="display:none-;" class="menu-item x <?php if($_GET['module'] == url_strip(strtolower($menu))) { print('active d-block'); } ?>">
              <a href="index.php?module=<?php echo url_strip($menu); ?>" class="menu-link">
                <i class="menu-icon tf-icons bx bx-circle text-warning"></i>
                <div data-i18n="Analytics"><?php echo ucwords($menu); ?></div>
              </a>
            </li>
			
			<?php } ?>

            <!-- Pengaturan -->
            <li class="menu-header small text-uppercase" onCLick="$('.z').toggle();" role="button">
                <span class="menu-header-text">Pengaturan</span> <i class="fa fa-plus"></i>
            </li>
            
            <li style="display:none-;" class="menu-item z <?php if($_GET['module'] == 'akun') { print('active d-block'); } ?>">
              <a href="index.php?module=akun" class="menu-link">
                <i class="menu-icon tf-icons bx bx-lock text-secondary"></i>
                <div data-i18n="Support">Akun Saya</div>
              </a>
            </li>
            
			<li style="display:none-;" class="menu-item z <?php if($_GET['module'] == 'identitas-web') { print('active d-block'); } ?>">
              <a href="logout.php" class="menu-link">
                <i class="menu-icon tf-icons bx bx-log-out text-danger"></i>
                <div data-i18n="Support">Logout</div>
              </a>
            </li>
           
          </ul>
        </aside>
        <!-- / Menu -->
	