<?php
  include VIEWPATH.'includes/new_header.php';
  ?>
  
<body class="hold-transition sidebar-mini">
<!-- Site wrapper -->
<div class="wrapper">
 <!-- Navbar -->

  <!-- /.navbar -->

  <!-- Main Sidebar Container -->



  

  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <?php 
    // include 'includes/menu_demande_conge.php';
    ?>

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

      <!-- Default box -->
      <div class="card">
      
      <div class="card card-primary">
              <div class="card-header">
                <h3 class="card-title">Demande de cong&eacute;</h3>
              </div>
              <!-- /.card-header -->
              <!-- form start -->
              
                <div class="card-body row">
                
                <div class="form-group col-lg-12">
                  <h5>Details du conge</h5>
                  <table class="table table-striped">
                    <tr>
                      <td>Exercice</td>
                      <td><?php echo $data['EXERCICE']?></td> 
                      <td>Employ&eacute;</td>
                      <td><?php echo $data['NOM']?> <?php echo $data['PRENOM']?></td> 
                    </tr>
                    
                    <tr>
                      <td>Conge & Nb Jours Restant</td>
                      <td><?php echo $data['TYPE_CONGE']?> restant avec <?php echo $data['NB_JOURS_RESTANT']?> Jours</td> 
                      <td>Periode conge</td>
                      <td><?php echo $data['DATE_DEBUT_CONGE_DEMANDE']?> au <?php echo $data['DATE_FIN_CONGE_DEMANDE']?> (<?php echo $data['NB_JOURS_DEMANDE']?> Jours)</td> 
                    </tr>
                    
                    <tr>
                      <td>Niveau de demande</td>
                      <td><?php echo $data['NIVEAU']?></td> 
                      <td>Affectation</td>
                      <td>
                      <button type="button" class="btn btn-primary btn-xs" data-toggle="modal" data-target="#modal-default">
                  Affectation
                </button>
                  <div class="modal fade" id="modal-default">
                  <div class="modal-dialog">
                    <div class="modal-content">
                      <div class="modal-header">
                        <h4 class="modal-title">Affectation</h4>
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                          <span aria-hidden="true">&times;</span>
                        </button>
                      </div>
                      <div class="modal-body">
                        <table class="table">
                          <tr>
                            <td>Direction</td>
                            <td><?php echo $data['DIRECTION']?></td>
                          </tr>
                          <tr>
                            <td>Depatement</td>
                            <td><?php echo $data['DEPARTEMENT']?></td>
                          </tr>
                          <tr>
                            <td>Status</td>
                            <td><?php echo $data['STATUS_CONGE']?></td>
                          </tr>
                          <tr>
                            <td>Service</td>
                            <td><?php echo $data['SERVICE']?></td>
                          </tr>
                        </table>
                      </div>
                      <div class="modal-footer justify-content-between">
                        <button type="button" class="btn btn-primary" data-dismiss="modal">Fermer</button>
                      </div>
                    </div>
                    <!-- /.modal-content -->
                  </div>
                  <!-- /.modal-dialog -->
                </div>
                      </td> 
                    </tr>
                    <tr>
                      <td colspan="4">
                        <?php echo $data['IP']?>, <?php echo $data['NAVIGATEUR']?>, <?php echo $data['OS']?>, <?php echo $data['DATE_SYSTEME_DEMANDE']?> 
                      </td>
                    </tr>
                    
                  </table>

                  
                </div>
                <div class="form-group col-lg-12 table-responsive">
                  <h5>Historique de traitement</h5>

                  <table class="table">
                    <tr>
                      <td>Date Traitement</td>
                      <td>Direction</td>
                      <td>Service</td>
                      <td>Section</td>
                      <td>Employe</td>
                      <td>Status</td>
                      <td>Commentaire</td>
                      <td>Connection</td>
                    </tr>
                    
                    <?php
                    foreach ($historique as $value) {                    
                    ?>

                    <tr>
                      <td><?php echo $value['DATE_TRAITEMENT']; ?></td>
                      <td><?php echo $value['DIRECTION']; ?></td>
                      <td><?php echo $value['DEPARTEMENT']; ?></td>
                      <td><?php echo $value['ID_SECTION']; ?></td>
                      <td><?php echo $value['NOM']; ?> <?php echo $value['PRENOM']; ?></td>
                      <td><?php echo $value['STATUS_CONGE']; ?></td>
                      <td><?php echo $value['COMMENTAIRE']; ?></td>
                      <td><?php echo $value['IP']; ?>, <?php echo $value['NAVIGATEUR']; ?>, <?php echo $value['OS']; ?></td>
                    </tr>

                    <?php
                    }
                    ?>

                  </table>
                </div>
               
                  
                  
                  
                       
                 
                  
                </div>
                <!-- /.card-body -->

                
            </div>
        
        
        <!-- /.card-body -->
        <!-- <div class="card-footer">
          Footer
        </div> -->
        <!-- /.card-footer-->
      </div>
      <!-- /.card -->

    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->

  <?php
 include VIEWPATH.'includes/new_copy_footer.php';  
  ?>
  <!-- /.control-sidebar -->
</div>
<!-- ./wrapper -->
<?php
  include VIEWPATH.'includes/new_script.php';
  ?>

</body>
</html>
