 <?php include_once PUBLIC_PATH. '/files_to_include/header_content.php'; ?>
<!-- =============================================== -->
  <div class="modal fade" id="connexion">
          <div class="modal-dialog">
          <form id="connexionSession">    
            <div class="modal-content">
              <div class="modal-header">
                  <button type="button" id="fermerConnexion" class="close" data-dismiss="modal" aria-label="Close">
                  <span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">Connexion session</h4>
              </div>
              <div class="modal-body">
                <div class='form-group'>
                                   <label>  Mot de passe : </label> <label style=' color : Red;'>&nbsp; *&nbsp; </label>
                                   <input type='password' class='form-control' id='password' name='pwdCaisse' value='' required>
                </div>
              </div>
            <div class="modal-footer">
              <div class='col-sm-12'>
                  <div class="col-sm-6">
                        <button type='button' id='submit' class='btn btn-microsoft'>Valider</button>
                        <button type='reset' name='reset' id='resetcompte' class='btn btn-microsoft'>Annuler</button>
                </div>
                <div class="col-sm-6">
               <button type="button" id="creer" data-toggle="modal" data-target="#creation" class="btn btn-microsoft">Créer une session</button>
             </div>
             </div>
            </div>
            </div>
          </form>
            <!-- /.modal-content -->
          </div>
          <!-- /.modal-dialog -->
        </div> 

 <div class="modal fade" id="creation">
          <div class="modal-dialog">
              <form id="CreationSession">  
            <div class="modal-content">
              <div class="modal-header">
                <button type='button' class='close' data-dismiss='modal'>&times;</button>
                <h4 class="modal-title">Creation d'une session</h4>
              </div>
              <div class="modal-body">
                  <div class="form-group">
                            <label>Mot de passe</label><label style="color:blue;">&nbsp; *&nbsp;</label>
                            <input type="password" id="nouveau" placeholder="mot de passe" class="form-control" required=""/>
                        </div>
                        <div class="form-group">
                            <label>Confirmer mot de passe</label><label style="color:blue;">&nbsp; *&nbsp;</label>
                            <input type="password" id="confimation" placeholder="confirmer mot de passe" class="form-control" required=""/>
                        </div>

                           
              </div>
              <div class="modal-footer">
                 <div class='col-sm-12'>
                  <button type='button' id='submit' class='btn btn-microsoft'>Valider</button>
                 <button type='reset' name='reset' id='resetcompte' class='btn btn-microsoft'>Annuler</button>
               </div>
              </div>
            </div>
              </form>
            <!-- /.modal-content -->
          </div>
          <!-- /.modal-dialog -->
        </div>

  <!-- Left side column. contains the sidebar -->
  <aside class="main-sidebar" id="aside_menu" >
      <section class="sidebar">
          <ul class="sidebar-menu">
            <?php include_once PUBLIC_PATH. '/files_to_include/menu.php'; ?>
          </ul>
      </section>
  </aside>
   <!-- Content Wrapper. Contains page content -->
   <div class="content-wrapper " style="background-color: white; td{border: solid  2px #000; }">
   

    <!-- Main content -->
    <section class="content">
        <div class="row">
         <div class="col-lg-12">
              
              <div id="connectheader">
                <div class="page-header">                    
                  <h3><span class="glyphicon glyphicon-th-list"></span> Liste des reservations</h3>
                </div>
                
<!--                <div class="col-lg-10 form-group">
                    <div class=" form-group col-lg-6">
                        <input placeholder="Date de consultation" type="text" class="form-control" id="date">
                        <input id="dateS" type="hidden"/>
                    </div>
                    <div class="form-group col-lg-4">
                        <button id="prec" type="button" class="btn btn-microsoft"><span class="glyphicon glyphicon-chevron-left"></span></button>
                        <button id="suiv" type="button" class="btn btn-microsoft"><span class="glyphicon glyphicon-chevron-right"></span></button>
                    </div>
                   
                   
                </div>-->
                  <div class="clearfix"></div>
                  <div class="col-lg-12" style="position: relative;top: -20px;">
                  <a class="pull-right" data-toggle="modal" data-target="#connexion" ><button type="button" class="btn btn-microsoft"><i class="fa fa-plus-circle fa-3x"></i></button></a><br/><br/>
              </div>
              </div>
            
              
               <table id="mytable" class="table table-striped table-bordered" cellspacing="0" width="100%">
            <thead>
                <tr>
                    <th>LOGEMENT</th>
                    <th>CLIENT</th>
                    <th>DATE ENTREE</th>
                    <th>DATE SORTIE</th>
                    <th>STATUT</th>
                    <th>ACTIONS</th>
                </tr>
            </thead>
            <tfoot>
                <tr>
                     <th>LOGEMENT</th>
                    <th>CLIENT</th>
                    <th>DATE ENTREE</th>
                    <th>DATE SORTIE</th>
                    <th>STATUT</th>
                    <th>ACTIONS</th>
                </tr>
            </tfoot>
            <tbody>
            </tbody>
        </table>
          </div>
      </div>
     

    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
 <?php include_once PUBLIC_PATH. '/files_to_include/footer_content.php'; ?>
  
   <script src="<?php echo $this->baseUrl('script/jquery.min.js');?>"></script>
    <script src="<?php echo $this->baseUrl('script/bootstrap.min.js');?>"></script>
    <script src="<?php echo $this->baseUrl('script/sb-admin-2.js');?>"></script>
    <script src="<?php echo $this->baseUrl("script/jquery.dataTables.min.js");?>"></script>
    <script src="<?php echo $this->baseUrl("script/dataTables.bootstrap.min.js");?>"></script>
    <script src="<?php echo $this->baseUrl("script/dataTables.buttons.min.js");?>"></script>
    <script src="<?php echo $this->baseUrl("script/jszip.min.js");?>"></script>
    <script src="<?php echo $this->baseUrl("script/pdfmake.min.js");?>"></script>
    <script src="<?php echo $this->baseUrl("script/vfs_fonts.js");?>"></script>
    <script src="<?php echo $this->baseUrl("script/buttons.html5.min.js");?>"></script>
    <script src="<?php echo $this->baseUrl("script/buttons.print.min.js");?>"></script>
    <script src="<?php echo $this->baseUrl('script/loadingoverlay.min.js');?>"></script>
     <script src="<?php echo $this->baseUrl('script/jquery.slimscroll.min.js');?>"></script>
      <script src="<?php echo $this->baseUrl("script/jquery-confirm.min.js");?>"></script>
      <script src="<?php echo $this->baseUrl('script/jquery.toast.min.js');?>"></script> 
      <script src="<?php echo $this->baseUrl("script/jquery.datetimepicker.full.js");?>"></script>
      <script src="<?php echo $this->baseUrl("script/moment.js");?>"></script>
<!-- FastClick -->
<script src="<?php echo $this->baseUrl('script/fastclick.js');?>"></script>
<!-- AdminLTE App -->
<script src="<?php echo $this->baseUrl('script/adminlte.min.js');?>"></script>
<script src="<?php echo $this->baseUrl('script/demo.js');?>"></script>
    <script type="text/javascript">
          $(document).ajaxSend(function(event, jqxhr, settings){
            $.LoadingOverlay("show");
        });
        
        $(document).ajaxComplete(function(event, jqxhr, settings){
            $.LoadingOverlay("hide");
        });
        $("#creer").click(function(){
            $("#fermerConnexion").click();
        });
         $("#confimation").on("keyup",function(){
         if ( $(this).val() !== $("#nouveau").val()){
             $(this).parent().addClass("alert");
             $(this).parent().addClass("alert-danger");
         }else{
             $(this).parent().removeClass("alert-danger");
             $(this).parent().removeClass("alert");
            
         } 
      });
     $('.sidebar-menu').tree();
  var $mytable=     $("#mytable").DataTable({
                                "language": {
                                    "zeroRecords": " aucune donnée disponible ",
                                    "infoEmpty": "Aucune donnée disponible",
                                    "search": "recherche",
                                    "infoFiltered": ""
                                },
                                "bLengthChange": false,
                                "destroy" : true,
                                dom: 'Bfrtip',
                                buttons: [
                                  'copy', 'csv', 'excel', 'pdf', 'print'
                                ],
                                "processing" : true,
                                "serverSide" : true,
                                "ajax" : {
                                         url : "<?php echo $this->url(array('controller' => 'Reservation', 'action' => 'datatable')); ?>",
                                         type : "POST"
                                }
                              });
      
     
    
     
    </script>

</body>

</html>