<?php $user = current_user(); ?>
<!DOCTYPE html>
  <html lang="en">
    <head>
    <meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1.0" > 
    <title>
      <?php if (!empty($page_title))
      echo remove_junk($page_title);
      elseif(!empty($user))
      echo ucfirst($user['name']);
      else echo "Asistente virtual" ;?>
    </title>
     <link rel="shortcut icon" href="../../img/logo.ico">
  
     <!-- Bootstrap -->

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
    
    <!-- cached version -->
    <link rel="stylesheet" href="../../libs/css/bootstrap.min.css" />
    <link rel="stylesheet" href="../../libs/css/datepicker3.min.css" />

    <script type="text/javascript" src="../../libs/js/jquery-3.5.1.js"></script>

    <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.13.2/themes/smoothness/jquery-ui.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.13.2/jquery-ui.min.js"></script>
    
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.2/jquery-confirm.min.js"></script>
    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.12.1/r-2.3.0/datatables.min.css"/>
    <!-- main -->
    <link rel="stylesheet" href="../../libs/css/main.css" />
        
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
  
    <!--iconos-->
    <link href='https://unpkg.com/boxicons@2.0.7/css/boxicons.min.css' rel='stylesheet'> 
    <!-- https://material.io/resources/icons/?style=baseline -->
    <link href="https://fonts.googleapis.com/css2?family=Material+Icons" rel="stylesheet">
    <!-- https://material.io/resources/icons/?style=outline -->
    <link href="https://fonts.googleapis.com/css2?family=Material+Icons+Outlined" rel="stylesheet">
    <!-- https://material.io/resources/icons/?style=round -->
    <link href="https://fonts.googleapis.com/css2?family=Material+Icons+Round" rel="stylesheet">
    <!-- https://material.io/resources/icons/?style=sharp -->
    <link href="https://fonts.googleapis.com/css2?family=Material+Icons+Sharp" rel="stylesheet">
    <!-- https://material.io/resources/icons/?style=twotone -->
    <link href="https://fonts.googleapis.com/css2?family=Material+Icons+Two+Tone" rel="stylesheet">
    
 
    <link rel='stylesheet' href='https://cdn-uicons.flaticon.com/uicons-solid-rounded/css/uicons-solid-rounded.css'>
    <!--
    <link rel='stylesheet' href='https://cdn-uicons.flaticon.com/uicons-solid-straight/css/uicons-solid-straight.css'>
    <link rel='stylesheet' href='https://cdn-uicons.flaticon.com/uicons-bold-rounded/css/uicons-bold-rounded.css'>
    <link rel='stylesheet' href='https://cdn-uicons.flaticon.com/uicons-bold-straight/css/uicons-bold-straight.css'>
    <link rel='stylesheet' href='https://cdn-uicons.flaticon.com/uicons-regular-rounded/css/uicons-regular-rounded.css'>
     -->
   
  </head>
  <body onload="startTime()">
  <?php if ($session->isUserLoggedIn(true)): ?>
    <div class="sidebar">
      <div class="img-content">
        <img class="logo-details"  src="../../img/head.png">
        <!--<span class="logo_name">SIGOS</span><br>-->
        <span class="logo_name"><?php echo remove_junk($user['name']); ?></span>
      </div>
      <div class="menu-bar">
        <?php if($user['user_level'] === '1'): ?>
        <!-- admin menu -->
        <?php include_once('admin_menu.php');?>

        <?php elseif($user['user_level'] === '2'): ?>
          <!-- asistente_menu -->
        <?php include_once('asistente_menu.php');?>

        <?php elseif($user['user_level'] === '3'): ?>
          <!-- supervisor_lg_mi -->
        <?php include_once('supervisor_lg_mi.php');?>

        <?php elseif($user['user_level'] == '4'): ?>
          <!-- supervisor_lg -->
        <?php include_once('supervisor_lg.php');?>

        <?php elseif($user['user_level'] >= '5'): ?>
          <!-- coordinador -->
        <?php include_once('coordinador.php');?>

        <?php endif;?>
      </div>      
      <div class="profile-details">
      <div class="profile-content dropup">
         <ul class="info-menu list-inline">
          <li class="profile">
            <a href="#" data-toggle="dropdown" class="toggle" aria-expanded="false">
              <img src="../../uploads/users/<?php echo $user['image'];?>" alt="user-image" class="img-circle img-inline">
              <span><?php echo remove_junk(ucfirst($user['username'])); ?> <i class="caret"></i></span>
            </a>
            <ul class="dropdown-menu">
              <li>
                  <a href="../../views/perfil/profile.php?id=<?php echo (int)$user['id'];?>">
                      <i class="glyphicon glyphicon-user"></i>
                      Perfil
                  </a>
              </li>
             <li>
                 <a href="../../views/perfil/edit_account.php" title="edit account">
                     <i class="glyphicon glyphicon-cog"></i>
                     Configuración
                 </a>
             </li>
             <li class="last">
                 <a href="../../logout.php">
                     <i class="glyphicon glyphicon-off"></i>
                     Salir
                 </a>
             </li>
           </ul>
          </li>
        </ul>
      </div>
    </div>
   </div>
   <section class="home-section">
      <div class="home-content">
        <i class='bx bx-menu' ></i>
        <span class="text">      
           <label id="date"></label>
           <label id="clock"></label>
        </span>        
      </div>
    </section>
<?php endif;?>

<div class="page">
  <div class="container-fluid">
