  <!-- Main Sidebar Container -->
  <aside class="main-sidebar sidebar-dark-primary elevation-4">
    <!-- Brand Logo -->
    <a href="<?php echo base_url() ?>dashboard" class="brand-link">
      <img src="<?php echo base_url() ?>assets/img/logo-w.png"
           alt="Servimos Logo"
           class="brand-image elevation-3"
           style="opacity: .8">
      <span class="brand-text font-weight-light"><br></span>
    </a>

    <!-- Sidebar -->
    <div class="sidebar">
      <!-- Sidebar user (optional) -->
      <div class="user-panel mt-3 pb-3 mb-3 d-flex">
        <div class="image">
          <img src="<?php echo base_url() ?>assets/img/profile.png" class="img-circle elevation-2" alt="User Image">
        </div>
        <div class="info">
          <a href="#" class="d-block"><?php echo $this->session->userdata('nombre')." ".$this->session->userdata('apellido'); ?></a>
        </div>
      </div>

      <!-- Sidebar Menu -->
      <nav class="mt-2">
        <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
          <!-- Add icons to the links using the .nav-icon class
               with font-awesome or any other icon font library -->

          <li class="nav-item">
            <a href="<?php echo base_url() ?>dashboard" class="nav-link">
              <i class="nav-icon fas fa-tachometer-alt"></i>
              <p>
                Dashboard
              </p>
            </a>
          </li>
          <?php if ($this->session->userdata('rol') <= MODULE_USUARIO){?>
          <li class="nav-item">
            <a href="<?=site_url('usuario')?>" class="nav-link">
              <i class="nav-icon fas fa-users"></i>
              <p>
                Usuarios
              </p>
            </a>
          </li>
          
          <li class="nav-item has-treeview">
            <a href="#" class="nav-link">
              <i class="nav-icon fas fa-file-alt"></i>
              <p>
              Importar Datos
                <i class="right fas fa-angle-left"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              
              <li class="nav-item">
                <a href="<?=site_url('importar_usuario')?>" class="nav-link">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Importar Usuarios </p>
                </a>
              </li>
              <li class="nav-item">
                <a href="<?=site_url('importar_contrato')?>" class="nav-link">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Importar Contratos</p>
                </a>
              </li>

            </ul>
          </li>
        <?php } ?>
        <?php if ($this->session->userdata('rol') <= MODULE_EMPRESA){?>
          <li class="nav-item">
            <a href="<?=site_url('empresa')?>" class="nav-link">
              <i class="nav-icon fas fa-building"></i>
              <p>
                Empresas
              </p>
            </a>
          </li>
          <?php } ?>
          <?php if ($this->session->userdata('rol') <= MODULE_CARGO){?>
          <li class="nav-item">
            <a href="<?=site_url('cargo')?>" class="nav-link">
              <i class="nav-icon fas fa-briefcase"></i>
              <p>
                Cargos
              </p>
            </a>
          </li>
          <?php } ?>
          <?php if ($this->session->userdata('rol') <= MODULE_CONTRATO){?>
          <li class="nav-item">
            <a href="<?=site_url('contrato')?>" class="nav-link">
              <i class="nav-icon fas fa-address-book"></i>
              <p>
                Contratos
              </p>
            </a>
          </li>
          <?php } ?>
          <!--
          <li class="nav-item has-treeview">
            <a href="#" class="nav-link">
              <i class="nav-icon fas fa-chart-pie"></i>
              <p>
                Informes
                <i class="right fas fa-angle-left"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              <li class="nav-item">
                <a href="#" class="nav-link">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Usuarios </p>
                </a>
              </li>
              <li class="nav-item">
                <a href="#" class="nav-link">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Documentos Generados</p>
                </a>
              </li>

            </ul>
          </li>
          -->
          <?php if ($this->session->userdata('rol') <= ADMIN){?>
          <li class="nav-item has-treeview">
            <a href="#" class="nav-link">
              <i class="nav-icon fas fa-file-alt"></i>
              <p>
              Certificación Laboral
                <i class="right fas fa-angle-left"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              <?php if ($this->session->userdata('rol') <= MODULE_CONFIGURACION){?>
              <li class="nav-item">
                <a href="<?=site_url('configuracion')?>" class="nav-link">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Parámetros </p>
                </a>
              </li>
              <?php } ?>
              <?php if ($this->session->userdata('rol') <= MODULE_CERTIFICADO){?>
              <li class="nav-item">
                <a href="<?=site_url('certificado_laboral')?>" class="nav-link">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Generar Certificados</p>
                </a>
              </li>
              <?php } ?>

            </ul>
          </li>
          <?php } ?>
          <?php if ($this->session->userdata('rol') <= ADMIN){?>
          <li class="nav-item has-treeview">
            <a href="#" class="nav-link">
              <i class="nav-icon fas fa-file-upload"></i>
              <p>
              Documentos
                <i class="right fas fa-angle-left"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              <?php if ($this->session->userdata('rol') <= MODULE_DOCUMENTO){?>
              <li class="nav-item">
                <a href="<?=site_url('documento')?>" class="nav-link">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Subir Documentos </p>
                </a>
              </li>
              <?php } ?>
              <?php if ($this->session->userdata('rol') <= MODULE_TIPODOC){?>
              <li class="nav-item">
                <a href="<?=site_url('tipo_documento')?>" class="nav-link">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Tipo de Documentos</p>
                </a>
              </li>
              <?php } ?>

            </ul>
          </li>
          <?php } ?>
          <?php if ($this->session->userdata('rol') == USUARIO){?>
          <li class="nav-item">
            <a href="<?=site_url('certificado_laboral')?>" class="nav-link">
              <i class="nav-icon fas fa-file-alt"></i>
              <p>
                Certificados laborales
              </p>
            </a>
          </li>
          <?php } ?>
          <?php if ($this->session->userdata('rol') == USUARIO){?>
          <li class="nav-item">
            <a href="<?=site_url('usuario_documento')?>" class="nav-link">
              <i class="nav-icon fas fa-file-download"></i>
              <p>
                Documentos
              </p>
            </a>
          </li>
          <li class="nav-item">
            <a href="https://www.simple.co/Web/faces/pages/comprobantes/consultadirecta/consultaDirectaLogin.xhtml" target="_blank" class="nav-link">
              <i class="nav-icon fas fa-file-download"></i>
              <p>
                Descargue aqu&iacute;<br> su planilla de aportes
              </p>
            </a>
          </li>
          <li class="nav-item">
            <a href="https://pagosimple.com/comprobantes-de-pago-aplicativo/" target="_blank" class="nav-link">
              <i class="fas fa-question-circle"></i>
              <p>
                Como descargar<br> su planilla de aportes
              </p>
            </a>
          </li>
          <?php } ?>
        </ul>
      </nav>
      <!-- /.sidebar-menu -->
    </div>
    <!-- /.sidebar -->
  </aside>

  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
          <?php if (!empty($title_page)){ echo "<h1>".$title_page."</h1>"; } ?>
          </div>
          <div class="col-sm-6">

          </div>
        </div>
      </div><!-- /.container-fluid -->
    </section>

    <!-- Main content -->
    <section class="content">

      <!-- Default box -->
      <div class="card card-solid">
        <div class="card-body">
