<?php session_start(); ?>
<!DOCTYPE html>
<html>
<head>
  <title>Restoran Pondok Edo</title>
  <link rel="shortcut icon" href="picture/favicon.png">
  <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/myStyle.css" rel="stylesheet">
  <script type="text/javascript" src="js/jquery-ui/jquery-ui.js"></script>
    <script src="js/jquery-3.1.1.min.js"></script>
    <script src="js/bootstrap.min.js"></script> 
</head>
<body>
<div class="container">
    <nav class="navbar navbar-inverse">
       <div class="container-fluid">
         <div class="navbar-header">
            <img src="picture/logo1.png">
        </div>
        <ul class="nav navbar-nav">
       <li><a href="index.php"><span class="glyphicon glyphicon-home"></span>Home</a></li>
       
       <?php
      if(isset($_SESSION['admin'])){
        echo'<li><a href="admin_menu.php" ><span class="glyphicon glyphicon-th-list"></span>Olah Menu</a></li>';
      }
      elseif(isset($_SESSION['user'])){
        echo' <li><a href="member_menu.php" ><span class="glyphicon glyphicon-th-list"></span>List Menu</a></li>';
		$username = $_SESSION['username'];
      }
        ?>

       <li><a href="profil_bulbul.php"><span class="glyphicon glyphicon-camera"></span> Profil BulBul</a></li>
       </ul>
       <ul class="nav navbar-nav navbar-right">
      <?php
      if(isset($_SESSION['admin'])){
        echo'<li><a href="daftar_pesanan.php"><span class="glyphicon glyphicon-shopping-cart "></span>&nbsp;Daftar Pesanan</a></li>
        <li><a href="daftar_komen.php"><span class="glyphicon glyphicon-comment"></span>List feedback</a></li>';
      }
      elseif(isset($_SESSION['user'])){
		  if(isset($_SESSION['username'])){
		  $id_member = $_SESSION['id_member'];
}
        echo'<li><a href="cart.php?id_member='.$id_member.'"><span class="glyphicon glyphicon-shopping-cart "></span>&nbsp;Cart</a></li>';
      }
        ?>
      <li><a href="form_comment.php"><span class="glyphicon glyphicon-comment"></span>feedback</a></li>
      
      <?php
      if(isset($_SESSION['user']) || isset($_SESSION['admin'])){
                 echo "<li><a href='form_login.php?logout'><span class='glyphicon glyphicon-log-out'></span>Logout</a></li>";
                }
                else {
                    echo '<li><a href="form_login.php"><span class="glyphicon glyphicon-log-in"></span>&nbsp;login</a></li>';
                }
                if(isset($_GET['logout'])){
                    ob_start();
                    session_start();
                    ob_end_clean();
                    session_destroy();
                    header("location:form_login.php");
        }
      ?>
        </ul>
      </div>
    </nav>
    
  <div class="container-fluid" style="background-color: #c0c0c0;">