<?php
 
session_start();
$com = "C";
include("DMMYSQLG.php");
include("DSA3000.php");
include("DMMYSQLG.php");
include("DF80000.php");
include("JQUERY.inc");
if(!isset($_GET['bot']))$_GET['bot']="";
$bot=$_GET['bot'];
?>
<html>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>
 	
<?php
if(!isset($_REQUEST['bot']))$_REQUEST['bot']="";
if ($_REQUEST['bot']==""){
	echo '<div align="center"><h2>!!! SELECCIONE UN REGISTRO !!!</h2></div>';
	echo '<meta content="1; url=res_miscelaneo_PR.php"  HTTP-EQUIV="REFRESH">';
}else{


include('res_miscelaneo_CL.php');
	$varible_clase = new clase();
        $vbo=(isset($_POST["bot"]))?$_POST["bot"]:"";
	$res=$varible_clase->lista_busqueda($vbo);
	$reg=mysqli_fetch_array($res);
	if(!isset($_POST['fcodtarifa'])){
	$_REQUEST['fcodtarifa']=$reg['fcodtarifa'];
	$_REQUEST['fnumres']=$reg['fnumres'];
	$_REQUEST['fnumcto']=$reg['fnumcto'];
	$_REQUEST['ffecllegada']=chfecha($reg['ffecllegada'],'Y-m-d','d/m/Y');
	$_REQUEST['ffecsalida']=chfecha($reg['ffecsalida'],'Y-m-d','d/m/Y');
	$_REQUEST['fnumadu']=$reg['fnumadu'];
	$_REQUEST['fnummenor']=$reg['fnummenor'];
           //    print_r($reg);
	$_REQUEST['fhorallega']=$reg['fhorallega'];
       
	$_REQUEST['fnumctos']=$reg['fnumctos'];
	$_REQUEST['ffecalt']=chfecha($reg['ffecalt'],'Y-m-d','d/m/Y');
	$_REQUEST['ftipocto']=$reg['ftipocto'];
        $_REQUEST['ffeccam']=$reg['ffeccam'];
	//forma de pago
	$_REQUEST['fformpago']=$reg['fformpago'];
	$_REQUEST['fnumtar']=$reg['fnumtar'];
	$_REQUEST['fsaldo']=$reg['fsaldo'];
	$_REQUEST['flimite']=$reg['flimite'];
	$_REQUEST['fcodseg']=$reg['fcodseg'];
	//datos
	$_REQUEST['fcodgrupo']=$reg['fcodgrupo'];
	$_REQUEST['fcodagen']=$reg['fcodagen'];
	$_REQUEST['fcodmeca']=$reg['fcodmeca'];
	$_REQUEST['fplan']=$reg['fplan'];
	$_REQUEST['smerf']=$reg['smerf'];
	$_REQUEST['fnorasvip']=$reg['fnorasvip'];
	//direccion
	$_REQUEST['fnombre']=$reg['fnombre'];
	$_REQUEST['fapellido']=$reg['fapellido'];
	$_REQUEST['flengua']=$reg['flengua'];
	$_REQUEST['fempresa']=$reg['fempresa'];
	$_REQUEST['ftelefono']=$reg['ftelefono'];
	$_REQUEST['fvip']=$reg['fvip'];
	$_REQUEST['femail']=$reg['femail'];
	$_REQUEST['fmail']=$reg['fmail'];
	$_REQUEST['fdireccion']=$reg['fdireccion'];
	$_REQUEST['tcol']=$reg['fgntd'];
	$_REQUEST['tcp']=$reg['fcp'];
	$_REQUEST['pais']=$reg['fpais'];
	$_REQUEST['estados']=$reg['festado'];
	$_REQUEST['tmun']=$reg['fciudad'];
	$_REQUEST['fvehiculo']=$reg['fvehiculo'];
	$_REQUEST['fplacas']=$reg['fplacas'];
	$_REQUEST['ftelemp']=$reg['ftelemp'];
	$_REQUEST['ftiphuesped']=$reg['ftiphuesped'];
	$_REQUEST['tex']=$reg['tex'];
	$_REQUEST['tex2']=$reg['tex2'];
	$_REQUEST['tex3']=$reg['tex3'];
	$_REQUEST['tex4']=$reg['tex4'];
	$_REQUEST['tex5']=$reg['tex5'];
	$_REQUEST['tex6']=$reg['tex6'];
	$_REQUEST['text1']=$reg['text1'];
	$_REQUEST['text2']=$reg['text2'];
	$_REQUEST['text3']=$reg['text3'];
	$_REQUEST['text4']=$reg['text4'];
	$_REQUEST['text5']=$reg['text5'];
	$_REQUEST['text6']=$reg['text6'];
	$_REQUEST['ftotal']=$reg['ftotal'];
	$_REQUEST['n_reg']=$reg['n_reg'];
	$_REQUEST['codseg']=$reg['codseg'];
}
 ?>
<body 
   <?php
 
if(isset($_POST['bot3'])){
	echo ' onLoad="deshab()"';
}
?> >
<div align="center">
<form name="frm1" method="post" action="">
<input name="bot" type="hidden" value="<?php
 echo $_POST["bot"]?>">
  <table width="943" align="center">
        <tr><th colspan="14" class=\"titulo\"><div align="center"> CONSULTA REGISTRO DE RESERVACIONES INDIVIDUALES </div></th>
		</tr>
		<tr>
      <td  ><span class="Estilo26"><strong>ALTA</strong></span></td>
      <td width="48" style="#A15E8D"><input name="ffecalt" type="text"  class="styTabEspA" id="ffecalt" onKeyPress="return validar(event)" size="7" disabled="disabled" value="<?php
echo (isset($_REQUEST['ffecalt']))?$_REQUEST['ffecalt']:"";?>"></td>
      <td style="#A15E8D"><input name="fusualta" type="text" id="fusualta" size="20" value=" <?php
 echo (isset($_SESSION['usuario']))?$_SESSION['usuario']:"" ;?>"></td>
      <td width="67"  ><span class="Estilo26"><strong>CAMBIO</strong></span></td>
      <td colspan="3" style="#A15E8D"><label><input name="ffeccam" type="text"  class="styTabEspA" id="ffeccam" onKeyPress="return validar(event)" size="7" disabled="disabled" value="<?php
echo (isset($_REQUEST['ffeccam']))?$_REQUEST['ffeccam']:"";?>"></label></td>
      <td width="51"  ><span class="Estilo26"><strong>FOLIO</strong></span></td>
      <td width="58" style="#A15E8D"><input name="ffecalt2" type="text"  class="styTabEspA" id="ffecalt2" onKeyPress="return validar(event)" size="7" disabled="disabled" value="<?php
echo (isset($_REQUEST['n_reg']))?$_REQUEST['n_reg']:"";?>"></td>
      <td colspan="2"  ><div align="right" class="Estilo26"><strong>STATUS</strong></div></td>
      <td colspan="2" style="#A15E8D"><input name="select1" type="text" id="select1" tabindex="20" value="<?php
echo (isset($_REQUEST['select1']))?$_REQUEST['select1']:"";?>" /> </td>	</tr>
    <tr>
      <td colspan="2"  ><span class="Estilo26"><label><strong>FECHA DE LLEGADA</strong></label></span></td>
      <td width="149" style="#A15E8D"><label><input name="ffecllegada" type="text" id="ffecllegada" tabindex="20" onKeyPress="return validar(event)" size="15" value="<?php
echo (isset($_REQUEST['ffecllegada']))?$_REQUEST['ffecllegada']:"";?>"></label></td>
      <td colspan="2"  ><span class="Estilo28">DIAS</span></td>
      <td style="#A15E8D"><input name="fnumctos" type="text" id="fnumctos" tabindex="20" onKeyPress="return validar(event)" size="5" disabled="disabled" value="<?php
echo (isset($_REQUEST['fnumctos']))?$_REQUEST['fnumctos']:"";?>" READONLY></td>
      <td colspan="3" style="#A15E8D">&nbsp;</td>
      <td colspan="3"  ><div align="center" class="Estilo29"><strong>NOTAS</strong></div></td> </tr>
    <tr> <td colspan="2"  ><span class="Estilo26"><strong>FECHA DE SALIDA</strong></span></td>
      <td style="#A15E8D"><input name="ffecsalida" type="text" id="ffecsalida" tabindex="20" onKeyPress="return validar(event)" size="15" disabled="disabled" value="<?php
echo (isset($_REQUEST['ffecsalida']))?$_REQUEST['ffecsalida']:"";?>"></td>
      <td colspan="2"  ><span class="Estilo28">NUMERO DE ADULTOS</span></td>
      <td width="81" style="#A15E8D"><input name="fnumadu" type="text" id="fnumadu" tabindex="20" onKeyPress="return validar(event)" size="5"  value="<?php
echo (isset($_REQUEST['fnumadu']))?$_REQUEST['fnumadu']:"";?>"></td>
      <td width="105"  ><span class="Estilo28">TIPO DE HABITACIONES </span></td>
      <td colspan="2" style="#A15E8D"><label>
      <input name="ftipocto" type="text" id="ftipocto" size="15" value="<?php
echo (isset($_REQUEST['ftipocto']))?$_REQUEST['ftipocto']:"";?>"> </label> </td>
      <td colspan="4" rowspan="2" style="#A15E8D"><div align="center">
      <textarea name="fnorasvip" cols="30" rows="3" id="fnorasvip" tabindex="4"><?php
echo (isset($_REQUEST['fnorasvip']))?$_REQUEST['fnorasvip']:"";?></textarea></div></td></tr>
    <tr>
      <td colspan="2"  ><span class="Estilo26"><strong>HORA DE LLEGADA</strong></span></td>
      <td style="#A15E8D"><input name="fhorallega" type="text" id="fhorallega" tabindex="20" onKeyPress="return validar(event)" disabled="disabled" size="6"  value="<?php
echo (isset($_REQUEST['fhorallega']))?$_REQUEST['fhorallega']:"";?>"></td>
      <td colspan="2"  ><span class="Estilo28">NUMERO DE MENORES</span></td>
      <td style="#A15E8D"><input name="fnummenor" type="text" id="fnummenor" tabindex="20" onKeyPress="return validar(event)" disabled="disabled" size="5"  value="<?php
echo (isset($_REQUEST['fnummenor']))?$_REQUEST['fnummenor']:"";?>"></td>
      <td  ><span class="Estilo28">NUNERO DE HABITACION</span></td>
      <td colspan="2" style="#A15E8D"><input name="fnumcto" type="text" id="fnumcto" tabindex="20" size="5" value="<?php
echo (isset($_REQUEST['fnumcto']))?$_REQUEST['fnumcto']:"";?>"></td> </tr>
	<tr> <th colspan="14" class="titulo"><div align="center" class="Estilo18">CONSULTAR SEGMENTOS </div></th> </tr>
    <tr>
      <td width="60"  ><span class="Estilo29"><strong>GRUPO</strong></span></td>
      <td colspan="3" style="#A15E8D"><span class="Estilo18">
	  <input name="fcodgrupo" type="text" id="fcodgrupo" tabindex="20" value="<?php
echo (isset($_REQUEST['fcodgrupo']))?$_REQUEST['fcodgrupo']:"";?>" /> </span></td>
      <td colspan="2"  ><span class="Estilo29">MERCADO </span></td>
      <td colspan="4" style="#A15E8D"><span class="Estilo18">
	  <input name="fcodmeca" type="text" id="fcodmeca" tabindex="20" value="<?php
echo (isset($_REQUEST['fcodmeca']))?$_REQUEST['fcodmeca']:"";?>" /> </span></td>
      <td  ><span class="Estilo26"><strong>SEGMENTO</strong></span></td>
      <td width="193" style="#A15E8D">
	  <input name="codseg" type="text" id="codseg" tabindex="20" value="<?php
echo (isset($_REQUEST['codseg']))?$_REQUEST['codseg']:"";?>" /> </td> </tr>
    <tr> <td  ><span class="Estilo29"><strong>AGENCIA</strong></span></td>
      <td colspan="3" style="#A15E8D"><span class="Estilo18">
	  <input name="fcodagen" type="text" id="fcodagen" tabindex="20" value="<?php
echo (isset($_REQUEST['fcodagen']))?$_REQUEST['fcodagen']:"";?>" /> </span> </td>
      <td colspan="2"  ><span class="Estilo29"><strong>PLAN</strong></span></td>
      <td colspan="6" style="#A15E8D"><span class="Estilo18">
      <input name="fplan" type="text" id="fplan" tabindex="20" value="<?php
echo (isset($_REQUEST['fplan']))?$_REQUEST['fplan']:"";?>" /> </span> </td> </tr>
    <tr>
      <td  ><span class="Estilo26"><strong>SMERF</strong></span></td>
      <td colspan="3" style="#A15E8D"><span class="Estilo18">
	  <input name="smerf" type="text" id="smerf" tabindex="20" value="<?php
echo (isset($_REQUEST['smerf']))?$_REQUEST['smerf']:"";?>" /> </span> </td>
      <td colspan="2"  ><span class="Estilo26"><strong>EMPRESA</strong></span></td>
      <td colspan="6" style="#A15E8D">
	  <input name="fempresa" type="text" id="fempresa" tabindex="20" value="<?php
echo (isset($_REQUEST['fempresa']))?$_REQUEST['fempresa']:"";?>" /> </td> </tr>
<tr>
      <th colspan="14" class="titulo"><div align="center" class="Estilo18">CONSULTAR FORMA DE PAGO </div></th>
    </tr>
    <tr>
      <td  ><span class="Estilo26"><strong>TARIFA</strong></span></td>
      <td colspan="6" style="#A15E8D"><input name="tex" type="text" id="tex" value="<?php
echo (isset($_REQUEST['tex']))?$_REQUEST['tex']:"";?>" size="6" disabled="disabled">
      <input name="tex2" type="text" id="tex2" value="<?php
echo (isset($_REQUEST['tex2']))?$_REQUEST['tex2']:"";?>" size="20" disabled="disabled">
      <input name="tex3" type="text" id="tex3" value="<?php
echo (isset($_REQUEST['tex3']))?$_REQUEST['tex3']:"";?>" size="3" disabled="disabled">
      <span class="Estilo17"><strong>$</strong></span>
      <input name="tex4" type="text" id="tex4" value="<?php
echo (isset($_REQUEST['tex4']))?$_REQUEST['tex4']:"";?>" size="5" disabled="disabled">
      <input name="tex5" type="text" id="tex5" value="<?php
echo (isset($_REQUEST['tex5']))?$_REQUEST['tex5']:"";?>" size="2" disabled="disabled">
=<strong> </strong><span class="Estilo17"><strong>$</strong></span>
<input name="tex6" type="text" id="tex6" size="10" value="<?php
echo (isset($_REQUEST['tex6']))?$_REQUEST['tex6']:"";?>" disabled="disabled"></td>
      <td  ><span class="Estilo26"><strong>FORMA DE PAGO</strong></span></td>
      <td colspan="4" style="#A15E8D"><span class="Estilo18">
	  <input name="fformpago" type="text" id="fformpago" tabindex="20" value="<?php
echo (isset($_REQUEST['fformpago']))?$_REQUEST['fformpago']:"";?>" /> </span> </td>
    </tr>
    <tr>
      <td  ><span class="Estilo26"><strong>TARIFA BAJA </strong></span></td>
      <td colspan="6" style="#A15E8D"><input name="text6" type="text" id="text6" size="10" value="<?php
echo (isset($_REQUEST['text6']))?$_REQUEST['text6']:"";?>" /> </td>
      <td colspan="3"  ><span class="Estilo26"><strong>NUMERO DE TARJETA</strong></span></td>
      <td colspan="2" style="#A15E8D"><input name="fnumtar" type="text" id="fnumtar" tabindex="20" size="30" disabled="disabled" value="<?php
echo (isset($_REQUEST['fnumtar']))?$_REQUEST['fnumtar']:"";?>"></td> </tr>
    <tr>
      <td  ><span class="Estilo30">TOTAL</span></td>
      <td colspan="2" style="#A15E8D"><span class="Estilo19">$</span>
        <input name="ftotal" type="text" disabled="disabled" id="ftotal" value="<?php
echo (isset($_REQUEST['ftotal']))?$_REQUEST['ftotal']:"";?>" size="15"></td>
      <td  ><span class="Estilo26"><strong>DEPOSITO</strong></span></td>
      <td colspan="2" style="#A15E8D"><span class="Estilo16">$</span>
      <input name="fsaldo" type="text" id="fsaldo" tabindex="20" size="5" disabled="disabled" value="<?php
echo (isset($_REQUEST['fsaldo']))?$_REQUEST['fsaldo']:"";?>"></td>
      <td  ><span class="Estilo26"><strong>CODIGO DE SEGURIDAD</strong></span></td>
      <td colspan="3" style="#A15E8D"><input name="fcodseg" type="text" id="fcodseg" tabindex="20" size="15" disabled="disabled" value="<?php
echo (isset($_REQUEST['fcodseg']))?$_REQUEST['fcodseg']:"";?>"></td>
      <td  ><span class="Estilo26"><strong>LIMITE</strong></span></td>
      <td style="#A15E8D"><input name="flimite" type="text" id="flimite" tabindex="20" size="15" disabled="disabled" value="<?php
echo (isset($_REQUEST['flimite']))?$_REQUEST['flimite']:"";?>"></td>
    </tr>
	<tr>
      <th colspan="14" class="titulo"><div align="center" class="Estilo18">CONSULTAR DATOS</div></th>
    </tr>
    <tr>
      <td  ><span class="Estilo26"><strong>NOMBRE</strong></span></td>
      <td colspan="2" style="#A15E8D">
		<textarea name="fnombre" cols="29" rows="3" id="fnombre" tabindex="4" disabled="disabled"><?php
echo (isset($_REQUEST['fnombre']))?$_REQUEST['fnombre']:"";?> 
		</textarea>		</td>
      <td  ><span class="Estilo26"><strong>APELLIDO</strong></span></td>
      <td colspan="3" style="#A15E8D"> <textarea name="fapellido" cols="25" rows="3" id="fapellido" tabindex="4" disabled="disabled"><?php
echo (isset($_REQUEST['fapellido']))?$_REQUEST['fapellido']:"";?>
		</textarea></td>
      <td  ><span class="Estilo26"><strong>TIPO DE HUESPED</strong> </span></td>
      <td colspan="3" style="#A15E8D">
	  <input name="ftiphuesped" type="text" id="ftiphuesped" tabindex="20" value="<?php
echo (isset($_REQUEST['ftiphuesped']))?$_REQUEST['ftiphuesped']:"";?>" /> </td>
      <td colspan="2" style="#A15E8D"><div align="center" class="Estilo1"><strong><span class="Estilo19">VIP</span></strong>
        <input name="fvip" type="checkbox" id="fvip" value="SI" <?php
if(isset($_REQUEST['fvip']) && $_REQUEST['fvip']=='SI') echo 'checked';?>>
      </div></td>
    </tr>
    <tr>
      <td  ><span class="Estilo29"><strong>TELEFONO</strong></span></td>
      <td colspan="2" style="#A15E8D"><input name="ftelefono" type="text" id="ftelefono" tabindex="20" size="25" disabled="disabled" value="<?php
echo (isset($_REQUEST['ftelefono']))?$_REQUEST['ftelefono']:"";?>"></td>
      <td  ><span class="Estilo26"><strong>TELEFONO EMPRESA</strong></span></td>
      <td colspan="3" style="#A15E8D"><input name="ftelemp" type="text" id="ftelemp" tabindex="20" size="25" value="<?php
echo (isset($_REQUEST['ftelemp']))?$_REQUEST['ftelemp']:"";?>"></td>
      <td  ><span class="Estilo26"><strong>E-MAIL</strong></span></td>
      <td colspan="6" style="#A15E8D"><input name="fmail" type="text" id="fmail" tabindex="20" size="25" value="<?php
echo (isset($_REQUEST['fmail']))?$_REQUEST['fmail']:"";?>"></td>
    </tr>
    <tr>
      <td  ><span class="Estilo26"><strong>E-MAIL EMPRESA</strong></span></td>
      <td colspan="2" style="#A15E8D"><input name="femail" type="text" id="femail" tabindex="20" size="25" disabled="disabled" value="<?php
echo (isset($_REQUEST['femail']))?$_REQUEST['femail']:"";?>"></td>
      <td  ><span class="Estilo26"><strong>DIRECCION</strong></span></td>
      <td colspan="3" style="#A15E8D"><span class="Estilo18">
        <input name="fdireccion" type="text" id="fdireccion" tabindex="20" size="25" value="<?php
echo (isset($_REQUEST['fdireccion']))?$_REQUEST['fdireccion']:"";?>">
      </span></td>
      <td  ><span class="Estilo1 Estilo26"><strong>CODIGO POSTAL</strong></span></td>
      <td colspan="2" style="#A15E8D"><input name="tcp" type="text" disabled="disabled" onKeyPress="return validar(event)" value="<?php
echo (isset($_REQUEST['tcp']))?$_REQUEST['tcp']:"";?>" size="8" maxlength="5"></td>
      <td  ><span class="Estilo26"><strong>COLONIA</strong></span></td>
      <td style="#A15E8D"><span class="Estilo1">
        <input type="hidden" name="tcol1" id="tcve" value="<?php
echo (isset($_REQUEST['tcve']))?$_REQUEST['tcve']:"";?>">
        <input name="tcol" type="text" disabled="disabled" id="tcol"value="<?php
echo (isset($_REQUEST['tcol']))?$_REQUEST['tcol']:"";?>" size="20">
      </span> </td> </tr>
    <tr>
      <td height="29"  ><span class="Estilo26"><strong>PAIS</strong></span></td>
      <td colspan="2" style="#A15E8D"><span class="Estilo1">
	  <input name="pais" type="text" id="pais" tabindex="20" value="<?php
echo (isset($_REQUEST['pais']))?$_REQUEST['pais']:"";?>" /> </span> </td>
      <td  ><span class="Estilo26"><strong>ESTADO</strong></span></td>
      <td colspan="3" style="#A15E8D"><span class="Estilo1">
	  <input name="estados" type="text" id="estados" tabindex="20" value="<?php
echo (isset($_REQUEST['estados']))?$_REQUEST['estados']:"";?>" /> </span> </td>
      <td colspan="2"  ><span class="Estilo26">
        <label><span class="Estilo1"><strong>DELEGACION O MUNICIPIO</strong></span></label>
      </span></td>
      <td colspan="5" style="#A15E8D"><span class="Estilo1">
        <input name="tmun" type="text" id="tmun" tabindex="20" value="<?php
echo (isset($_REQUEST['tmun']))?$_REQUEST['tmun']:"";?>" /> </span> </td>
    </tr>
  </table>
</form>
  <?php
 
	echo '<div align="center">
	<form id="form1" name="form1" action="res_miscelaneo_PR.php" target="_self">
		<input type="submit" name="submit" value="Regresar" class="bot_WsW">
	</form>
	</div>';
?>
</body>
<?php
 
mysqli_close($con);
}
?>
</html>