<!-- Main Sidebar Container -->
<aside class="main-sidebar sidebar-dark-primary elevation-4">
    <!-- Brand Logo -->
    <div class="text-center">
      <img src="<?php echo $nouveau_url?>dist/logo.png" alt="AdminLTE Logo" class="text-center" width="180">
    </div>
    
    <div class="text-center" style="color: #fff;">
      Document System Management
    </div>
    <!-- brand-text font-weight-light brand-link -->
    
    <!-- <a href="#" class="brand-link">
      
      <span class="brand-text font-weight-light"></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 $nouveau_url?>dist/icons.png" class="img-circle elevation-2" alt="User Image">
        </div>
        <div class="" style="color:#fff">
          &nbsp;&nbsp;&nbsp;<?=$this->session->userdata('SOCAR_NOM')?> <?=$this->session->userdata('SOCAR_PRENOM')?>
        </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="<?=base_url('Acceuil')?>" class="nav-link <?php if($this->router->class == 'Acceuil' ){ echo 'active';} else{ echo '';}  ?>">
              <i class="nav-icon far fa-calendar-alt"></i>
              <p> Home - Calendrier </p>
            </a>
          </li>

          <li class="nav-item">
            <a href="<?=base_url('organigramme/Organigramme')?>" class="nav-link <?php if($this->router->class == 'Organigramme' ){ echo 'active';} else{ echo '';}  ?>">
              <i class="nav-icon fa fa-sitemap"></i>
              <p> Organigramme </p>
            </a>
          </li>

          

          <li class="nav-item <?php if($this->router->class == 'Dashboard_Conge' || $this->router->class == 'Dashboard_Employe'){ echo 'menu-open';} else{ echo '';}  ?>">
            <a href="#" class="nav-link <?php if($this->router->class == 'Dashboard_Conge' || $this->router->class == 'Dashboard_Employe'){ echo 'active';} else{ echo '';}  ?>">
              <i class="nav-icon fas fa-tachometer-alt"></i>
              <p>
                Dashboard
                <i class="right fas fa-angle-left"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">



            <li class="nav-item">
              <a href="<?=base_url('dashboard/Dashboard_Employe')?>" class="nav-link <?php if($this->router->class == 'Dashboard_Employe' ){ echo 'active';} else{ echo '';}  ?>">
              <i class="far fa-circle nav-icon"></i>
              <p> Dashboard Employé </p>
            </a>
              </li>




              <li class="nav-item">
           
                  <a href="<?=base_url('dashboard/Dashboard_Conge')?>" class="nav-link <?php if($this->router->class == 'Dashboard_Conge' ){ echo 'active';} else{ echo '';}  ?>">
              <i class="far fa-circle nav-icon"></i>
              <p> Dashboard congé </p>
            </a>



              </li>

  
            </ul>
          </li>

          <li class="nav-item <?php if($this->router->class == 'Exercice' || $this->router->class == 'Type_Conge' || $this->router->class == 'Jours_Ferrier' || $this->router->class == 'Profil_Droit' || $this->router->class == 'User' || $this->router->class == 'Etape'){ echo 'menu-open';} else{ echo '';}  ?>">
          
            <a href="#" class="nav-link <?php if($this->router->class == 'Exercice' || $this->router->class == 'Type_Conge' || $this->router->class == 'Jours_Ferrier' || $this->router->class == 'Profil_Droit' || $this->router->class == 'User' || $this->router->class == 'Etape'){ echo 'active';} else{ echo '';}  ?>">
              <i class="nav-icon fas fa-cog"></i>
              <p>
                Configuration
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              <li class="nav-item">
                <a href="<?=base_url('configuration/Profil_Droit/listing')?>" class="nav-link <?php if($this->router->class == 'Profil_Droit' ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Droits & Profil</p>
                </a>
              </li>
              <li class="nav-item">
                <a href="<?=base_url('configuration/User/listing')?>" class="nav-link <?php if($this->router->class == 'User' ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Utilisateurs</p>
                </a>
              </li>
              
              <li class="nav-item">
                <a href="<?=base_url('configuration/Exercice/listing')?>" class="nav-link <?php if($this->router->class == 'Exercice' ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Exercices</p>
                </a>
              </li> 
              <li class="nav-item">
                <a href="<?=base_url('configuration/Jours_Ferrier/listing')?>" class="nav-link <?php if($this->router->class == 'Jours_Ferrier' ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Jours Ferriers</p>
                </a>
              </li>
              <li class="nav-item">
                <a href="<?=base_url('configuration/Type_Conge/listing')?>" class="nav-link <?php if($this->router->class == 'Type_Conge' ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Type de Conger</p>
                </a>
              </li>

              
              <li class="nav-item">
                <a href="<?=base_url('configuration/Type_Doc')?>" class="nav-link <?php if($this->router->class == 'Type_Doc' ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Type document</p>
                </a>
              </li>
              <li class="nav-item">
                <a href="<?=base_url('configuration/Etape')?>" class="nav-link <?php if($this->router->class == 'Etape' ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Etapes</p>
                </a>
              </li>
            
              
            </ul>
          </li>
          <li class="nav-item <?php if($this->router->class == 'Direction' || $this->router->class == 'Section' || $this->router->class == 'Service'){ echo 'menu-open';} else{ echo '';}  ?>">

            <a href="#" class="nav-link <?php if($this->router->class == 'Direction' || $this->router->class == 'Section' || $this->router->class == 'Service'){ echo 'active';} else{ echo '';}  ?>">
              <i class="nav-icon fa fa-building"></i>
              <p>
                Organnigrammes
                <i class="right fas fa-angle-left"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              <li class="nav-item">
                <a href="<?=base_url('organigramme/Direction/listing')?>" class="nav-link <?php if($this->router->class == 'Direction' ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Direction</p>
                </a>
              </li>
              <li class="nav-item">
                <a href="<?=base_url('organigramme/Service/listing')?>" class="nav-link <?php if($this->router->class == 'Service' ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Service</p>
                </a>
              </li>
              <li class="nav-item">
                <a href="<?=base_url('organigramme/Section/listing')?>" class="nav-link <?php if($this->router->class == 'Section' ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Section</p>
                </a>
              </li>
              
              
            </ul>
          </li>
          <li class="nav-item <?php if($this->router->class == 'Employe' || $this->router->class == 'Affectation_Employe' || $this->router->class == 'Servicess'){ echo 'menu-open';} else{ echo '';}  ?>">
            <a href="#" class="nav-link <?php if($this->router->class == 'Employe' || $this->router->class == 'Affectation_Employe' || $this->router->class == 'Servicess'){ echo 'active';} else{ echo '';}  ?>">
              <i class="nav-icon fas fa-users"></i>
              <p>
                RH
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              
              <li class="nav-item ">
                <a href="<?=base_url('rh/Employe/listing')?>" class="nav-link <?php if($this->router->class == 'Employe' ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Employes</p>
                </a>
              </li>
              <li class="nav-item">
                <a href="<?=base_url('rh/Affectation_Employe')?>" class="nav-link <?php if($this->router->class == 'Affectation_Employe' ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Affectations Employe</p>
                </a>
              </li>
              
            </ul>
          </li>
          
          <li class="nav-item <?php if($this->router->class == 'Demande_Conge' || $this->router->class == 'Mes_Conge' || $this->router->class == 'Demande_Congess'){ echo 'menu-open';} else{ echo '';}  ?>">
            <a href="#" class="nav-link <?php if($this->router->class == 'Demande_Conge' || $this->router->class == 'Mes_Conge' || $this->router->class == 'Demande_Congess'){ echo 'active';} else{ echo '';}  ?>">
              <i class="nav-icon fas fa-holly-berry"></i>
              <p>
                Cong&eacute;
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              
              <li class="nav-item">
                <a href="<?=base_url('conge/Demande_Conge/listing')?>" class="nav-link <?php if($this->router->class == 'Demande_Conge' ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Demande de cong&eacute;</p>
                </a>
              </li>
              <li class="nav-item">
                <a href="<?=base_url('conge/Mes_Conge')?>" class="nav-link <?php if($this->router->class == 'Mes_Conge' ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Mes cong&eacute;s</p>
                </a>
              </li>
              <!-- <li class="nav-item">
                <a href="<?=base_url('conge/Conge_IT_Activation')?>" class="nav-link <?php if($this->router->class == 'Conge_IT_Activation' && $this->router->method == 'index' ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Desactivation RH</p>
                </a>
              </li> -->
              <!-- <li class="nav-item">
                <a href="<?=base_url('conge/Conge_IT_Activation/listing')?>" class="nav-link <?php if($this->router->class == 'Conge_IT_Activation' && $this->router->method == 'listing' ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Reactivation RH</p>
                </a>
              </li> -->
              
            </ul>
          </li>
         

           <?php
              
          // if ($this->session->userdata('SOCAR_PROFIL_ID') == 0) {

            $nbmessagenon=$this->Model->getRequeteOne('SELECT COUNT(ID_MESSAGE_CONGE) AS NB_MESSAGE_UNREAD FROM `conge_message_conge` LEFT JOIN rh_employe AS receiver ON receiver.ID_EMPLOYE = conge_message_conge.ID_EMPLOYE_DESTINATAIRE WHERE 1 AND conge_message_conge.ID_STATUS_MESSAGE = 1  AND receiver.ID_EMPLOYE = '.$this->session->userdata('SOCAR_ID_USER').' ');

          ?>
         

          <!-- <li class="nav-item">
            <a href="<?=base_url('conge/Messages')?>" class="nav-link <?php if($this->router->class == 'Messages' ){ echo 'active';} else{ echo '';}  ?>">
              <i class="nav-icon far fa-envelope"></i>
              <p> Messages <span class="badge bg-primary float-right"><?php echo $nbmessagenon['NB_MESSAGE_UNREAD']?></span></p>
            </a>
          </li> -->
          <?php
          // }
          ?>
          


          <li class="nav-item <?php if($this->router->class == 'Mettre_Carburant' || $this->router->class == 'Vidange' || $this->router->class == 'Reparation' || $this->router->class == 'Vehicule' || $this->router->class == 'Assurance' || $this->router->class == 'Controle_Technique'){ echo 'menu-open';} else{ echo '';}  ?>">
            <a href="#" class="nav-link <?php if($this->router->class == 'Mettre_Carburant' || $this->router->class == 'Vidange' || $this->router->class == 'Reparation' || $this->router->class == 'Vehicule' || $this->router->class == 'Assurance' || $this->router->class == 'Controle_Technique' ){ echo 'active';} else{ echo '';}  ?>">
              <i class="nav-icon fas fa-car"></i>
              <p>
                Voitures
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              
              <li class="nav-item">
                <a href="<?=base_url('voiture/Vehicule/listing')?>" class="nav-link <?php if($this->router->class == 'Vehicule' ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Vehicule</p>
                </a>
              </li>
              <li class="nav-item">
                <a href="<?=base_url('voiture/Assurance/listing')?>" class="nav-link <?php if($this->router->class == 'Assurance' ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Assurance</p>
                </a>
              </li>
              <li class="nav-item">
                <a href="<?=base_url('voiture/Controle_Technique/listing')?>" class="nav-link <?php if($this->router->class == 'Controle_Technique' ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Controle Technique</p>
                </a>
              </li>
              <li class="nav-item">
                <a href="<?=base_url('voiture/Mettre_Carburant/listing')?>" class="nav-link <?php if($this->router->class == 'Mettre_Carburant' ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Carburant</p>
                </a>
              </li>
              <li class="nav-item">
                <a href="<?=base_url('voiture/Vidange/listing')?>" class="nav-link <?php if($this->router->class == 'Vidange' ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Vidanges</p>
                </a>
              </li>
              <li class="nav-item">
                <a href="<?=base_url('voiture/Reparation/listing')?>" class="nav-link <?php if($this->router->class == 'Reparation' ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Réparation</p>
                </a>
              </li>
            </ul>
          </li>


          <li class="nav-item <?php if($this->router->class == 'Requisition' || $this->router->class == 'Articles'){ echo 'menu-open';} else{ echo '';}  ?>">
            <a href="#" class="nav-link <?php if($this->router->class == 'Requisition' || $this->router->class == 'Articles'){ echo 'active';} else{ echo '';}  ?>">
              <i class="nav-icon fas fa-gifts"></i>
              <p>
                Demande Interne
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              <li class="nav-item">
                <a href="<?=base_url('document_interne/Requisition')?>" class="nav-link <?php if($this->router->class == 'Requisition' && $this->router->method == 'index'  ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Demande</p>
                </a>
              </li>
              <li class="nav-item">
                <a href="<?=base_url('document_interne/Requisition/listing')?>" class="nav-link <?php if($this->router->class == 'Requisition' && $this->router->method == 'listing' ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Traitement demandes</p>
                </a>
              </li>
            </ul>
          </li>


         

          <li class="nav-item <?php if($this->router->class == 'Demande_Document' || $this->router->class == 'Demande_Document'){ echo 'menu-open';} else{ echo '';}  ?>">
            <a href="#" class="nav-link <?php if($this->router->class == 'Demande_Document' || $this->router->class == 'Demande_Document'){ echo 'active';} else{ echo '';}  ?>">
              <i class="nav-icon fas fa-file-signature"></i>

              <p>
                Documents externe
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              <li class="nav-item">
           
              <a href="<?=base_url('gestion_document/Demande_Document/req_list')?>" class="nav-link <?php if($this->router->method == 'req_list' ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Liste des requérants</p>
                </a>

                <a href="<?=base_url('gestion_document/Demande_Document/demande_list')?>" class="nav-link <?php if($this->router->method == 'demande_list' ){ echo 'active';} else{ echo '';}  ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Liste des demandes</p>
                </a>


                
              </li>

            </ul>
          </li>



          
          
          
         
        </ul>
      </nav>
      <!-- /.sidebar-menu -->
    </div>
    <!-- /.sidebar -->
  </aside>
