<?php
 
session_start();
$com = "C";
include("DMMYSQLG.php");
include("DSA3000.php");
include("DF30000.inc");
include("DF80000.php");
include("JQUERY.inc");
?>
<html>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>
<?php

if ($_POST['bot']==""){
	echo '<h2>!!! SELECCIONE UN REGISTRO !!!</h2>';
	echo '<meta content="1; url=rec_miscelaneos_PR.php"  HTTP-EQUIV="REFRESH">';
}else{
	
	include('rec_miscelaneos_CL.php');
	$varible_clase = new clase();
	$res=$varible_clase->lista_busqueda($_POST["bot"]);
	$reg=mysqli_fetch_array($res);
	if(!isset($_POST['fcodtarifa'])){
	$_REQUEST['fcodtarifa']=$reg['fcodtarifa'];
	$_REQUEST['fnumres']=$reg['fnumres'];
	$_REQUEST['fnumcto']=$reg['fnumcto'];
	$_REQUEST['fnumctos']=$reg['fnumctos'];
	$_REQUEST['ffecllegada']=chfecha($reg['ffecllegada'],'Y-m-d','d/m/Y');
	//$_REQUEST['ffecllegada']=$reg['ffecllegada'];
	$_REQUEST['ffecsalida']=chfecha($reg['ffecsalida'],'Y-m-d','d/m/Y');
	//$_REQUEST['ffecsalida']=$reg['ffecsalida'];
	$_REQUEST['ffecalt']=chfecha($reg['ffecalt'],'Y-m-d','d/m/Y');
	$_REQUEST['ffeccam']=chfecha($reg['ffeccam'],'Y-m-d','d/m/Y');
	//$_REQUEST['ffecalt']=$reg['ffecalt'];
	$_REQUEST['select1']=$reg['status'];
	$_REQUEST['select2']=$reg['estact'];
	$_REQUEST['ftipocto']=$reg['ftipocto'];
	
	//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'];
	$_REQUEST['fhorallega']=$reg['fhorallega'];
	$_REQUEST['codseg']=$reg['codseg'];
	//forma de pago
	$_REQUEST['fformpago']=$reg['fformpago'];
	$_REQUEST['fnumtar']=$reg['fnumtar'];
	$_REQUEST['fsaldo']=$reg['fsaldo'];
	$_REQUEST['flimite']=$reg['flimite'];
	$_REQUEST['fcodseg']=$reg['fcodseg'];
	//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['ftelemp']=$reg['ftelemp'];
	$_REQUEST['ftiphuesped']=$reg['ftiphuesped'];
	$_REQUEST['n_reg']=$reg['n_reg'];
	}
?>

<body
<?php
 
if(isset($_POST['bot3'])){
	echo ' onLoad="deshab()"';
}
?>
>
<form  name="frm1" method="post" action="">
<input name="bot" type="hidden" value="<?php
 echo $_POST["bot"]?>">
  <table width="943"  align="center" bordercolor=" " bordercolordark=" ">
        <tr>
          <th colspan="14" class=\"titulo\"><div align="center"> CONSULTAR REGISTRO DE MISCELANEOS</div></th>
        </tr>
		
		<tr>
      <td  ><span class="Estilo21"><strong>ALTA</strong></span></td>
      <td width="47" style="#A15E8D"><input name="ffecalt" type="text"  class="styTabEspA" id="ffecalt" onKeyPress="return validar(event)" size="7" disabled="disabled" value="<?php
echo $_REQUEST['ffecalt'];?>"></td>
      <td style="#A15E8D"><input name="fusualta" type="text" id="fusualta" disabled="disabled" size="20" value=" <?php
 
		echo  $_SESSION['usuario']  ;?>"></td>
      <td colspan="2"  ><span class="Estilo20">CAMBIO
            <label></label>
      </span></td>
      <td style="#A15E8D"><input name="ffeccam" type="text"  class="styTabEspA" id="ffeccam" onKeyPress="return validar(event)" size="7" disabled="disabled" value="<?php
echo $_REQUEST['ffeccam'];?>"></td>
      <td  ><span class="Estilo20">FOLIO</span></td>
      <td width="51" style="#A15E8D"><input name="ffecalt2" type="text"  class="styTabEspA" id="ffecalt2" onKeyPress="return validar(event)" size="7" disabled="disabled" value="<?php
echo $_REQUEST['n_reg'];?>"></td>
      <td width="60" style="#A15E8D">&nbsp;</td>
      <td colspan="4"  ><div align="center" class="Estilo21"><strong>NOTAS</strong></div></td>
      </tr>
    <tr>
      <td colspan="2"  ><span class="Estilo21">
        <label><strong>FECHA DE LLEGADA
          
        </strong></label>
      </span></td>
      <td width="152" style="#A15E8D"><label>
        <input name="ffecllegada" type="text" id="ffecllegada" tabindex="20" onKeyPress="return validar(event)" size="15" disabled="disabled" value="<?php
echo $_REQUEST['ffecllegada'];?>">
      </label></td>
      <td colspan="2"  ><span class="Estilo20">DIAS</span></td>
      <td width="89" style="#A15E8D"><input name="fnumctos" type="text" id="fnumctos" tabindex="20" onKeyPress="return validar(event)" size="5" disabled="disabled" value="<?php
echo $_REQUEST['fnumctos'];?>"></td>
      <td  ><span class="Estilo20">TIPO DE HABITACION</span></td>
      <td colspan="2" style="#A15E8D"><input name="ftipocto" type="text" size="15" id="ftipocto" disabled="disabled" value="<?php
echo $_REQUEST['ftipocto'];?>"></td>
      <td colspan="3" rowspan="2" style="#A15E8D"><div align="center">
        <textarea name="fnorasvip" cols="30" rows="3" id="fnorasvip" tabindex="4"><?php
echo $_REQUEST['fnorasvip'];?>
		</textarea>
      </div></td>
    </tr>
    <tr>
      <td colspan="2"  ><span class="Estilo21"><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 $_REQUEST['ffecsalida'];?>"></td>
      <td colspan="2"  ><span class="Estilo20">HORA DE LLEGADA</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 $_REQUEST['fhorallega'];?>"></td>
      <td width="104"  ><span class="Estilo20">NUMERO DE HABITACION</span></td>
      <td colspan="2" style="#A15E8D"><label>
        <input name="fnumcto" type="text" id="fnumcto" tabindex="20" size="5" disabled="disabled" value="<?php
echo $_REQUEST['fnumcto'];?>">
      </label></td>
    </tr>
    <tr>
      <th colspan="14" class="titulo"><div align="center" class="Estilo18">CONSULTAR SEGMENTOS </div></th>
    </tr>
    <tr>
      <td width="72"  ><span class="Estilo20">MERCADO </span></td>
      <td colspan="2" style="#A15E8D"><span class="Estilo18">
        <input name="fcodmeca" id="fcodmeca" value="<?php
echo $_REQUEST["fcodmeca"];?>" disabled="disabled"/>
      </span></td>
      <td  ><span class="Estilo21"><strong>SEGMENTO</strong></span></td>
      <td colspan="6" style="#A15E8D">
	    <input name="codseg" id="codseg" value="<?php
echo $_REQUEST["codseg"];?>" disabled="disabled"/></td>
      <td width="76"  ><span class="Estilo1 Estilo21">PLAN</span></td>
      <td width="193" style="#A15E8D"><span class="Estilo1">
        <input name="fplan" id="fplan" value="<?php
echo $_REQUEST["fplan"];?>" disabled="disabled"/></span></td></tr>
    <tr>
      <td  ><span class="Estilo20">AGENCIA</span></td>
      <td colspan="2" style="#A15E8D"><span class="Estilo18">
        <select name="fcodagen" id="fcodagen">
        <option value="">--SELECCIONE--</option>
        <?php
 
$sql = mysqli_query($con ,"SELECT * FROM valeryus07");
while($reg=mysqli_fetch_array($sql)){
	if($_REQUEST['fcodagen']==$reg['agdescrip'] ){
		echo '<option value="' . $reg['agdescrip'] . '" selected>' . $reg['agdescrip'] . '</option>';
	}else{
		echo '<option value="' . $reg['agdescrip'] . '">' . $reg['agdescrip'] . '</option>';
	}
}
?>
      </select>
      </span></td>
      <td  ><span class="Estilo1 Estilo21">GRUPO</span></td>
      <td colspan="6" style="#A15E8D"><span class="Estilo1">
        <select name="fcodgrupo" id="fcodgrupo">
          <option value="">----------SELECCIONE----------</option>
          <?php
 
$sql = mysqli_query($con ,"SELECT * FROM valeryus04");
while($reg=mysqli_fetch_array($sql)){
	if($_REQUEST['fcodgrupo']==$reg['gdescrip'] ){
		echo '<option value="' . $reg['gdescrip'] . '" selected>' . $reg['gdescrip'] . '</option>';
	}else{
		echo '<option value="' . $reg['gdescrip'] . '">' . $reg['gdescrip'] . '</option>';
	}
}
?>
        </select>
      </span></td>
      <td  ><span class="Estilo21"><strong>EMPRESA</strong></span></td>
      <td style="#A15E8D"><select name="fempresa" id="fempresa">
        <option value="">-----SELECCIONE-----</option>
        <?php
 
$sql = mysqli_query($con ,"SELECT * FROM fcompas");
while($reg=mysqli_fetch_array($sql)){
	if($_REQUEST['fempresa']==$reg['pdesco'] ){
		echo '<option value="' . $reg['pdesco'] . '" selected>' . $reg['pdesco'] . '</option>';
	}else{
		echo '<option value="' . $reg['pdesco'] . '">' . $reg['pdesco'] . '</option>';
	}
}
?>
      </select></td>
    </tr>
    <tr>
      <td height="26"  ><span class="Estilo21"><strong>SMERF</strong></span></td>
      <td colspan="11" style="#A15E8D"><label></label><label><span class="Estilo1">
        <select name="smerf" id="smerf">
          <option value="">--SELECCIONE--</option>
          <?php
 
$sql = mysqli_query($con ,"SELECT * FROM fsmerf");
while($reg=mysqli_fetch_array($sql)){
	if($_REQUEST['smerf']==$reg['descripcion'] ){
		echo '<option value="' . $reg['descripcion'] . '" selected>' . $reg['descripcion'] . '</option>';
	}else{
		echo '<option value="' . $reg['descripcion'] . '">' . $reg['descripcion'] . '</option>';
	}
}
?></select></span></label></td></tr>
<tr>
      <th colspan="14" class="titulo"><div align="center" class="Estilo18">CONSULTAR FORMA DE PAGO </div></th>
    </tr>
    <tr>
      <td  ><span class="Estilo21"><strong>FORMA DE PAGO</strong></span></td>
      <td colspan="2" style="#A15E8D"><label></label>
        <label></label>
        <span class="Estilo1">
        <select name="fformpago" id="fformpago" onChange="javascript: document.getElementById('frm1').submit()" tabindex="14">
          <option value="">---SELECCIONE---</option>
          <?php
 
$sql = mysqli_query($con ,"SELECT * FROM valeryus09 WHERE pmontomax = 'ABONO' AND ppago = 'SI'");
while($reg=mysqli_fetch_array($sql)){
	if($_REQUEST['fformpago']==$reg['descripcion'] ){
		echo '<option value="' . $reg['descripcion'] . '" selected>' . $reg['descripcion'] . '</option>';
	}else{
		echo '<option value="' . $reg['descripcion'] . '">' . $reg['descripcion'] . '</option>';
	}
}
?>
        </select>
        </span></td>
      <td  ><span class="Estilo21"><strong>NUMERO TARJETA</strong></span></td>
      <td colspan="2"><input name="fnumtar" type="text" id="fnumtar" tabindex="20" size="12" disabled="disabled" value="<?php
echo $_REQUEST['fnumtar'];?>"></td>
      <td  ><span class="Estilo21"><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 $_REQUEST['fcodseg'];?>"></td>
      <td  ><span class="Estilo21"><strong>LIMITE</strong></span></td>
      <td style="#A15E8D"><input name="flimite" type="text" id="flimite" tabindex="20" size="15" disabled="disabled" value="<?php
echo $_REQUEST['flimite'];?>"></td></tr>
    <tr>
      <th colspan="14" class="titulo"><div align="center" class="Estilo18">CONSULTAR DATOS</div></th></tr>
    <tr>
      <td  ><span class="Estilo21"><strong>NOMBRE</strong></span></td>
      <td colspan="2" style="#A15E8D">
        <textarea name="fnombre" cols="25" rows="3" id="fnombre" tabindex="4"><?php
echo $_REQUEST['fnombre'];?>
		</textarea>	  </td>
      <td  ><span class="Estilo21"><strong>APELLIDO</strong></span></td>
      <td colspan="3" style="#A15E8D"><textarea name="fapellido" cols="21" rows="3" id="fapellido" tabindex="4"><?php
echo $_REQUEST['fapellido'];?>
		</textarea></td>
      <td  ><span class="Estilo21"><strong>TIPO DE HUESPED</strong></span></td>
      <td colspan="3" style="#A15E8D">
	  <input name="ftiphuesped" id="ftiphuesped" value="<?php
echo $_REQUEST["ftiphuesped"];?>" disabled="disabled"/></td>
      <th colspan="2"><div align="center" class="Estilo1"><strong><span class="Estilo19">VIP</span></strong>
        <input name="fvip" type="checkbox" id="fvip" disabled="disabled" value="SI" <?php
if($_REQUEST['fvip']=='SI') echo 'checked';?>>
            </div></th></tr>
    <tr>
      <td  ><span class="Estilo20">TELEFONO</span></td>
      <td colspan="2" style="#A15E8D"><input name="ftelefono" type="text" id="ftelefono" tabindex="20" size="25" disabled="disabled" value="<?php
echo $_REQUEST['ftelefono'];?>"></td>
      <td  ><span class="Estilo21"><strong>TELEFONO EMPRESA</strong></span></td>
      <td colspan="3" style="#A15E8D"><input name="ftelemp" type="text" id="ftelemp" tabindex="20" size="25" disabled="disabled" value="<?php
echo $_REQUEST['ftelemp'];?>"></td>
      <td  > <span class="Estilo21"><strong>E-MAIL</strong></span></td>
      <td colspan="2" style="#A15E8D"><input name="fmail" type="text" id="fmail" tabindex="20" size="4" disabled="disabled" value="<?php
echo $_REQUEST['fmail'];?>"></td>
      <td  ><span class="Estilo20">E-MAIL EMPRESA </span></td>
      <td colspan="3" style="#A15E8D"><input name="femail" type="text" id="femail" tabindex="20" size="25" disabled="disabled" value="<?php
echo $_REQUEST['femail'];?>"></td></tr>
    <tr>
      <td  ><span class="Estilo21"><strong>DIRECCION</strong></span></td>
      <td colspan="2" style="#A15E8D"><input name="fdireccion" type="text" id="fdireccion" tabindex="20" size="20" disabled="disabled" value="<?php
echo $_REQUEST['fdireccion'];?>"></td>
	  <td  ><span class="Estilo21"><strong>COLONIA</strong></span></td>
	  <td colspan="3" style="#A15E8D"><span class="Estilo1">
	    <input type="hidden" name="tcol1" id="tcve" value="<?php
echo $_REQUEST['tcve'];?>">
        <input type="text" name="tcol" id="tcol" disabled="disabled"value="<?php
echo $_REQUEST['tcol'];?>">
	  </span></td>
      <td  ><span class="Estilo1 Estilo21">CODIGO POSTAL</span></td>
      <td colspan="4" style="#A15E8D"><input name="tcp" type="text" disabled="disabled" onKeyPress="return validar(event)" value="<?php
echo $_REQUEST['tcp'];?>" maxlength="5"></td></tr>
    <tr>
      <td  ><span class="Estilo21"><strong>PAIS</strong></span></td>
      <td colspan="2" style="#A15E8D"><span class="Estilo1">
        <input name="pais" type="text" id="pais" tabindex="20" size="20" disabled="disabled" value="<?php
echo $_REQUEST['pais'];?>"></span></td>
      <td  ><span class="Estilo21"><strong>ESTADO</strong></span></td>
      <td colspan="3" style="#A15E8D"><span class="Estilo1">
        <input name="estado" type="text" id="estado" tabindex="20" size="20" disabled="disabled" value="<?php
echo $_REQUEST['estados'];?>">
      </span></td>
      <td  ><span class="Estilo1 Estilo21">DELEGACION O MUNICIPIO</span></td>
      <td colspan="4" style="#A15E8D"><span class="Estilo1">
        <input name="municipio" type="text" id="municipio" tabindex="20" size="20" disabled="disabled" value="<?php
echo $_REQUEST['tmun'];?>">
      </span></td>
    </tr>
    </table>
</form>
  <?php
 
if(isset($_POST['bot3'])){
	echo '<div align="center">
	<form id="form1" name="form1" action="rec_miscelaneos_PR.php" target="_self" >
		<input type="submit" name="submit" value="Regresar" class="bot_WsW">
	</form>
	</div>';
	}
?>
</body>
<?php
 
mysqli_close($con);
}
?>
</html>