<?php


$res = $dba->getAllModules();
$applist ="";

//var_dump( $dba );
for ($i = 0; $i < count($res); $i++) {
$applist .='<li><a href="#" onclick="getPage(\\\'leftmenu_builder.php?moduleId='.$res[$i]['module_id_n'].'\\\', \\\'sidebar-menu\\\');">'.$res[$i]['module_name_v']." ".$res[$i]['version_v'].'</a></li>' ;




}


?>
<header class="main-header">
    <!-- Logo -->
   <a href="main.php" class="logo">
     <!--  mini logo for sidebar mini 50x50 pixels 
      <span class="logo-mini"><b>A</b>LT</span>-->
       <!-- logo for regular state and mobile devices -->
      <span class="logo-lg"><img src="images/logo.png" width="200"  height="54"  /></span> 
    </a>
    
    <!-- Header Navbar: style can be found in header.less -->
    <nav class="navbar navbar-static-top">
    <div class="container-fluid">
    <!--<div class="navbar-header">
      <a href="../../index2.html" class="navbar-brand"><b>Admin</b>LTE</a>
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse">
        <i class="fa fa-bars"></i>
      </button>
    </div>-->

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="navbar-collapse">
      <ul class="nav navbar-nav"> 
        <li ><a href="#" rel="DocumentWelcome" data-url="mainmenu.php" class="lmenu" ></i>Menu Principal</a></li>
        <li class="dropdown user user-menu"> 
            <a href="#" id="appId">
              <span class="hidden-xs">Applications</span> 
            </a>
         
            
          </li>
        
      </ul>
      
  


 
      
      
      
      <div class="navbar-custom-menu">
        <ul class="nav navbar-nav">
         
          <!-- User Account: style can be found in dropdown.less -->
          <li class="dropdown user user-menu">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
              <img src="dist/img/user.png" class="user-image" alt="User Image" height="160" width="160">
              <span class="hidden-xs"><?php  echo $_SESSION['firstName']." ".$_SESSION['lastName'] ; ?></span>
            </a>
            <ul class="dropdown-menu">
              <!-- User image -->
              <li class="user-header">
                <img src="dist/img/user.png" class="img-circle" alt="User Image" height="160" width="160">

                <p>
                  <?php  echo $_SESSION['accntType'] ; ?>
                  <small> </small>
                </p>
              </li>
              <li class="user-footer">
                <div class="pull-left">
                  <a href="#" rel="DocumentProfile" data-url="profile.php"  class="btn btn-default btn-flat lmenu">Profile</a>
                </div>
                <div class="pull-right">
                  <a href="logout.php" class="btn btn-default btn-flat">Quitter</a>
                </div>
              </li>
            </ul>
          </li>
          <!-- Control Sidebar Toggle Button -->
         
        </ul>
      </div>
      
      
    </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
    
  </nav>
  </header>
  
  <div>
  
  </div>
  
  <script>
$(document).ready(function(){
     $('#appId').popover({
                    content: '<span><strong>Liste des applications</strong></span><ul><?php echo $applist; ?></ul>',
                    trigger: 'hover focus',
                    placement:'bottom',
					html : true,
					container : 'body'
                })  
});
</script>
   