<?php
if(!isset($_SESSION)) {
    session_start();
}

require_once($_SERVER['DOCUMENT_ROOT'].'/varios/varios.php');
require_once($_SERVER['DOCUMENT_ROOT'].'/clases/Varios.Class.php');

if( Varios::isActiveSession() 
    && Varios::hasModuleAccess(10)
) {
  $reseIdCod 	= filter_var($_GET['par1'], FILTER_SANITIZE_STRING);
  $reseId 	  = filter_var( Varios::decodifica($reseIdCod), FILTER_SANITIZE_NUMBER_INT);
  
  $titulo     = 'Cerrar la reserva';
  $boton			= 'Cerrar';
  
?>
<script type="text/javascript" src="/js/gestionReservas/gestionReservasCerrarCargar.js"></script>		
<form name="frm_reservaCerrar" id="frm_reservaCerrar" method="post">
<input value="<?php echo Varios::codifica($reseId);?>"   type="hidden" id="txt_reseId" name="txt_reseId">
  <div class="modal-header">
    <h5 class="modal-title" id="md_modal_titulo"><?php echo $titulo;?></h5>
    <button aria-label="Close" class="close" data-dismiss="modal" type="button"><span aria-hidden="true"> &times;</span></button>
  </div>	
  <div class="modal-body" id="md_modal_content">	
    <div id="div_reservaInformacion">

    </div>
    <div class="form-group row">
    <label for="" class="col-form-label col-xs-12 col-xl-12">Observación del cierre:</label>
          <div class="col-xs-12 col-xl-12">
            <textarea name="txt_motivo" id="txt_motivo" rows="2" class="form-control" placeholder="Observación del cierre"
                style="resize:none" ></textarea>
          </div>
    </div> 
    <div class="modal-footer">
      <button class="btn btn-primary" type="submit" id="btn_guardar" name="btn_guardar"><i class="picons-thin-icon-thin-0489_storehouse_storage"></i> <?php echo $boton;?></button>
      <button class="btn btn-secondary" data-dismiss="modal" type="button"><i class="picons-thin-icon-thin-0153_delete_exit_remove_close"></i> Cerrar</button>
    </div>  
  </div>
</form><?php
} else {
  echo 'No: ';
  print_r(getdate());
}
?>

