<nav class="navbar navbar-expand-lg bg-dark navbar-dark shadow-sm py-3 py-lg-0 px-3 px-lg-0">
        <a href="<?php echo PATH_HOME;?>" class="navbar-brand d-block d-lg-none">
            <h1 class="m-0 text-uppercase text-white">
            <img src="<?php echo PATH_HOME.'img/logo.png';?>" height='50px'> <?php echo AppName;?></h1>
        </a>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarCollapse">
            <div class="navbar-nav ms-auto mx-lg-auto py-0">
            <?php
            switch($ROL){
                case 1: $menu ='<a href="'.PATH_HOME.'admin/ver" class="nav-item nav-link">Inicio</a>
                <a href="'.PATH_HOME.'registros/ver" class="nav-item nav-link"> Registros</a>
                <a href="#" onclick="LogOut()" class="nav-item nav-link"> Cerrar sesión</a>';
                break;
                
                case 2: $menu ='<a href="#" onclick="GenerarComanda();" class="nav-item nav-link">Nueva Comanda</a>
                <a href="'.PATH_HOME.'reservas/nuevo'.'" class="nav-item nav-link">menu </a>
                <a href="'.PATH_HOME.'reservas-carrito/reservados'.'" class="nav-item nav-link">pedidos 
                <sub id="ContPedidos"></sub>
                </a>
                <a href="#" onclick="LogOut()" class="nav-item nav-link"> Cerrar sesión</a>';
                break;

                case 3: $menu ='<a href="'.PATH_HOME.'cajeros/ver" class="nav-item nav-link">Inicio</a>
                <a href="'.PATH_HOME.'registros/ver" class="nav-item nav-link"> Registros</a>
                <a href="#" onclick="LogOut()" class="nav-item nav-link"> Cerrar sesión</a>';
                break;
                               
            }
            echo $menu;
            ?>                
            </div>
        </div><span id="session"></span>
</nav>
<script>   
function GenerarComanda(){
    $.post('<?php echo PATH_HOME.'sesiones/'. sha1(uniqid()); ?>',{
        'MxEncoder': '<?php echo sha1(uniqid()); ?>'
    },function(data){
        $('#session').html(data);
    }); 
}    

function LogOut(){
  $.post('<?php echo PATH_HOME.'indlogout/'.md5(uniqid()); ?>',{
    'coder': '<?php echo sha1(uniqid()); ?>'
  },function(data){
    $('#session').html(data);
  });
}
</script>