<?php
include("config.php");
include("header.php");
$role= $_SESSION['role'];
$url_array =  explode('/', $_SERVER['REQUEST_URI']) ;
$active= $url_array[2] ;

?>
<div class="menu">
    <div class="container ">
      <div class="top-header">
        <div class="header-logo col-md-3">
          <a href="<?php echo $website_url; ?>">
            Delivery Verification System
          </a>
        </div>
        <nav class="navbar navbar-inverse col-md-9">
            <ul class="nav navbar-nav">
              <li class="active">
                <a>
                <?php echo $_SESSION['email']; ?>
              </a>
              </li>
			  
        	  <?php if($role=='Admin'){?>
              <li <?php if($active=='users') echo 'class="active"';?>>
                <a href="<?php echo $website_url; ?><?php echo $listusers_url;?> ">Users</a>
              </li>
			  <li <?php if($active=='trucks') echo 'class="active"';?> >
			    <a href="<?php echo $website_url; ?><?php echo $trucks_url;?> ">Trucks</a>
			  </li>
        	  <?php } ?>
        	  
        	  <li <?php if($active=='deliveries') echo 'class="active"';?> >
			    <a href="<?php echo $website_url; ?><?php echo $deliveries_url;?> ">Deliveries</a>
			  </li>
        	 
              <li>
                <a href="<?php echo $website_url; ?>/logout.php">Logout</a>
              </li>
            </ul>
        </nav>
    </div>
  </div>
</div>       
