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

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

    <!-- Main content -->
    <section class="content">
      <div class="container-fluid">
        <div class="row">
          <div class="col-12">
            
            <!-- /.card -->

            <div class="card card-primary">
              <div class="card-header">
                <h3 class="card-title">Liste de conges accepte (Pour Reactivations)</h3>
              </div>
              <!-- /.card-header -->
              <div class="card-body">

                               <!-- FILTRE -->

             


                <table id="example1" class="table table-bordered table-striped table-hover">


                  <thead>
                  <tr>
                    <th>Nom</th>
                    <th>Date Depart</th>
                    <th>Direction</th>
                    <th>Departement</th>
                    <th>Service</th>
                    <th>Action</th>
                  </tr>
                  </thead>
                  <tbody>

                  <?php
                  
                  
                    foreach ($debut_conge as $key) 
                    {
                     echo "<tr>
                     <td>".$key['NOM']." ".$key['PRENOM']."</td>
                     <td>".$key['DATE_DEBUT_CONGE_ACCORDE']."</td>
                     <td>".$key['DIRECTION']."</td>
                     <td>".$key['DEPARTEMENT']."</td>
                     <td>".$key['SERVICE']."</td>
                     <td>";
                     if ($key['STATUS'] == 1) {
                       echo "<div class='modal fade' id='modaldetails0_".$key['ID_DEMANDE_CONGE']."'>
        <div class='modal-dialog modal-lg'>
          <div class='modal-content'>
            <div class='modal-header'>
              <h4 class='modal-title'>Details</h4>
              <button type='button' class='close' data-dismiss='modal' aria-label='Close'>
                <span aria-hidden='true'>&times;</span>
              </button>
            </div>
            <div class='modal-body'>
            
            <div class='form-group col-lg-12'>

            Voulez vous signale que l'employe ".$key['NOM']." ".$key['PRENOM']." a ete reactiver dans le systeme de la banque?
              
              </div>
              
            </div>
            
            <div class='modal-footer justify-content-between'>
              <button type='button' class='btn btn-default' data-dismiss='modal'>Fermer</button>

              <a href='".base_url("conge/Conge_IT_Activation/reactiver/".$key['ID_DEMANDE_CONGE'])."' class='btn btn-primary'>Confirmer la Reactivation</a>

            </div>
          </div>
        </div>
      </div>
                     <div class='dropdown '>
                                       <a class='btn btn-primary btn-sm dropdown-toggle' data-toggle='dropdown'>Actions
                                       <span class='caret'></span></a>
                                       <ul class='dropdown-menu dropdown-menu-right'>";
                                       echo'<li><a class="dropdown-item" data-toggle="modal" data-target="#modaldetails0_'.$key['ID_DEMANDE_CONGE'].'" href="#"> Traiter </a> </li>';
                                       echo "</ul>
                                     </div>";
                     }
                     else{
                      echo "Reactivation le ".$key['DATE_REACTIVATION'];
                     }

                     echo "</td>
                   </tr>";
           
                     
                                     
                  // $tabledata[]=$chambr;
                }
                  ?>
                  
                  </tfoot>
                </table>
              </div>
              <!-- /.card-body -->
            </div>
            <!-- /.card -->
          </div>
          <!-- /.col -->
        </div>
        <!-- /.row -->
      </div>
      <!-- /.container-fluid -->
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->

  <?php
 include VIEWPATH.'includes/new_copy_footer.php';  
  ?>
  

  <!-- Control Sidebar -->
  <aside class="control-sidebar control-sidebar-dark">
    <!-- Control sidebar content goes here -->
  </aside>
  <!-- /.control-sidebar -->
</div>

<!-- ./wrapper -->
<?php
  include VIEWPATH.'includes/new_script.php';
  ?>

<!-- Page specific script -->
<script>
  $(function () {
    $("#example1").DataTable({
      "responsive": true, "lengthChange": false, "autoWidth": false,"ordering": false,
      "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
    }).buttons().container().appendTo('#example1_wrapper  .col-md-6:eq(0)');
   
  });
</script>
</body>
</html>

<script>


         function get_info() {
       
       myform.action= myform.action;
        myform.submit();
      } 
  

</script>
