<?php 
session_start();
if($_SESSION["sistema"]!= "1"){ header("location: ../login/index.php"); exit();}
?>
<style type="text/css">
select{
	cursor:pointer;
}
</style>
<div class="content-header" >
      <div class="container-fluid">
        <div class="row mb-2">
		 <div class="col-sm-6">
			<h1>
			Reservas
			<small>modulo</small>
			</h1>
		</div>	
		
		<div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
				<li class="breadcrumb-item" >Inicio</li>
				<li class="breadcrumb-item" >Operaciónes</li>
				<li class="breadcrumb-item active">Reservas</li>
            </ol>
          </div>
		</div>
	</div>
</div>

<!-- formulario de mensaje -->
			<div class="modal" id="div_mensaje_dialog" role="dialog" data-keyboard="false" data-backdrop="static" tabindex="-1"  
			style="padding:0px; overflow-y:scroll;z-index:9999;">
			<div class="modal-dialog modal-md"  role="document" >
			<div class="modal-content" style="padding:0px;">
			<div class="modal-body div_mensaje"  >
			
		
			
			</div>
			<br />
			<br />
			</div>
			</div>
			</div>		
			
			
	<!-- formulario de registro -->
			<div class="modal fade" id="div_reserva_form_dialog" role="dialog" data-keyboard="false" data-backdrop="static" tabindex="-1"  style="padding:0px; overflow-y:scroll;">
			<div class="modal-dialog modal-lg "   style="width: 95% !important;" role="document" >
			<div class="modal-content">
			<div class="modal-body div_reserva_form" style="padding:0%;" >
			</div>
			<br />
			<br />
			</div>
			</div>
			</div>
			
			
			<!-- formulario de pago venta -->
			<div class="modal fade" id="div_venta_form_dialog" role="dialog" data-keyboard="false" data-backdrop="static" tabindex="-1"  style="padding:0px; overflow-y:scroll;">
			<div class="modal-dialog "  role="document" >
			<div class="modal-content">
			<div class="modal-body div_venta_form" style="padding:0%;" >
			</div>
			<br />
			<br />
			</div>
			</div>
			</div>
			
			<div class="modal fade" id="div_reserva_correo_form" role="dialog" data-keyboard="false" data-backdrop="static" style="padding:0px; overflow-y:scroll ">
			<div class="modal-dialog modal-lg"  >
			<div class="modal-content">
			<div class="modal-body div_reserva_correo_conten" style="padding:0px;"   >
			</div>
			<br />
			<br />
			</div>
			</div>
			</div>
			
			
			<!-- formulario de nuevo cliente -->
			<div class="modal fade" id="div_cliente_form_dialog" role="dialog" data-keyboard="false" data-backdrop="static" tabindex="-1"  style="padding:0px; overflow-y:scroll;">
			<div class="modal-dialog modal-lg"  role="document" >
			<div class="modal-content">
			<div class="modal-body div_cliente_form"  >
			</div>
			<br />
			<br />
			</div>
			</div>
			</div>
			
			
			<div class="modal fade" id="div_reserva_formitem_dialog" role="dialog" data-keyboard="false" data-backdrop="static" tabindex="-1"  style="padding:0px; overflow-y:scroll;">
			<div class="modal-dialog modal-md" role="document" >

			<div class="modal-content">

			<div class="modal-body div_reserva_formitem" style="padding:0%;" >

			</div>
			<br />
			<br />
			</div>
			</div>
			</div>
			
			
			
				<!-- formulario de registro -->
			<div class="modal fade" id="div_productomarca_form_dialog" role="dialog" data-keyboard="false" data-backdrop="static" tabindex="-1"  style="padding:0px;overflow-y:scroll;">
			<div class="modal-dialog modal-xl" style="width: 90% !important;"   role="document" >
			<div class="modal-content">
			<div class="modal-body div_productomarca_form" >
			</div>
			<br />
			<br />
			</div>
			</div>
			</div>
			
			
			<div class="modal fade" id="div_stock_form_dialog" role="dialog" data-keyboard="true"  data-backdrop="static" tabindex="-1"  style="padding:0px; overflow-y:scroll;">
			<div class="modal-dialog modal-lg"  role="document" >

			<div class="modal-content"  >

			<div class="modal-body div_stock_form" >

			</div>
			<br />
			<br />
			</div>
			</div>
			</div>
			
				<div class="modal fade" id="div_productomarcacantidad_form_dialog" role="dialog" data-keyboard="false" data-backdrop="static"  style="padding:0px;overflow-y:scroll;z-index:99999;">
			<div class="modal-dialog modal-lg" style=""   role="document" >

			<div class="modal-content">

			<div class="modal-body div_productomarcacantidad_form"  >

			</div>
			<br />
			<br />
			</div>
			</div>
			</div>
			
			
				
<!-- Filter content -->
<div id="div_reserva_filtro"></div>
<!-- Table content -->
<div id="div_reserva_tabla"></div>
	<script type="text/javascript">
		
		
	
	
		function reserva_filtro(){
			$.ajax({
				type: "POST",
				url: "../reserva/reserva_filtro.php",
				dataType: "html",
				beforeSend: function() {
					$('#div_reserva_filtro').addClass("ui-state-disabled");
				},
				success: function(html){
					$('#div_reserva_filtro').html(html);
				},
				complete: function(){			
					$('#div_reserva_filtro').removeClass("ui-state-disabled");
				}
			}); 
		}
		
		function reserva_tabla(){
		$('#div_mensaje_dialog').modal('show');
			$.ajax({
				type: "POST",
				url: "../reserva/reserva_tabla.php",
				dataType: "html",
				data:  $("#for_fil_cot").serialize(),
				beforeSend: function() {
					var divmen = "<center> <br> <span class='spinner-border spinner-border-lg mr-2'></span> <span style='font-size:1.5rem;'>PROCESANDO PETICIÓN</span></center>";	
							
					$('.div_mensaje').html(divmen);
					$('#div_reserva_tabla').addClass("ui-state-disabled");
				},
				success: function(html){
					$('#div_reserva_tabla').html(html);
				},
				complete: function(){					
					$('#div_mensaje_dialog').modal('hide');				
					
					$('#div_reserva_tabla').removeClass("ui-state-disabled");
					
				}
			}); 
		}
		
	
$(function() {
			reserva_filtro();
			
			$('#btn_actualizar').click(function() {
				$("#contenido").load("../reserva/reserva_vista.php");
			});
			
			$("#div_cliente_form_dialog").on('hidden.bs.modal', function () {
		   	$('body').css('overflow-y','hidden');
			});
			
			
			$("#div_venta_form_dialog").on('hidden.bs.modal', function () {
		   	$('body').css('overflow-y','scroll');
			
			});
			
			$("#div_reserva_form_dialog").on('hidden.bs.modal', function () {
		   	$('body').css('overflow-y','scroll');
			});
	
	
			$("#div_mensaje_dialog").on('hidden.bs.modal', function () {
			$('body').css('padding-right','0px');
			});
	
	
			setTitle("RESERVAS - "+nombreEmpresa);
		});
	</script>