<?php
 
session_start();
$com = "C";
include("DMMYSQLG.php");
include("DSA3000.php");
include("DMMYSQLG.php");
include("DF30000.inc");
include("DF80000.php");

?>
<html>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>
<?php

$sos = $_GET['n_reg'];
	
	include('rec_checkin_CL.php');
	$varible_clase = new clase();
	$res=$varible_clase->lista_busqueda($sos);
	$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['fnumadu']=$reg['fnumadu'];
	$_REQUEST['fnummenor']=$reg['fnummenor'];
	$_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'];
	$_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'];
	//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['fvehiculo']=$reg['fvehiculo'];
	$_REQUEST['fplacas']=$reg['fplacas'];
	$_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">
        <tr>
          <th colspan="14" class=\"titulo\"><div align="center"> CONSULTAR REGISTRO DE HUESPEDES </div></th>
        </tr>
		
		<tr>
      <td><strong>ALTA:        </strong></td>
      <td width="47"><input name="ffecalt" type="text"  class="styTabEspA" id="ffecalt" onKeyPress="return validar(event)" size="7" disabled="disabled" value="<?php
echo $_REQUEST['ffecalt'];?>"></td>
      <td><input name="fusualta" type="text" id="fusualta" disabled="disabled" size="20" value=" <?php
 
		echo  $_SESSION['usuario']  ;?>"></td>
      <td colspan="2"><strong>CAMBIO:
          <label></label>
      </strong></td>
      <td><input name="ffeccam" type="text"  class="styTabEspA" id="ffeccam" onKeyPress="return validar(event)" size="7" disabled="disabled" value="<?php
echo $_REQUEST['ffeccam'];?>"></td>
      <td><strong>FOLIO:</strong></td>
      <td width="51"><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">&nbsp;</td>
      <td colspan="2"><div align="right">STATUS:</div></td>
      <td colspan="2"><select name="select1">
        <option value="RESERVACION"<?php
if($_REQUEST['select1']=="RESERVACION") echo 'selected';?>>RESERVACION</option>
        <option value="HUESPED"<?php
if($_REQUEST['select1']=="HUESPED") echo 'selected';?>>HUESPED</option>
        <option value="HISTORICO"<?php
if($_REQUEST['select1']=="HISTORICO") echo 'selected';?>>HISTORICO</option>
      </select></td>
		</tr>
    <tr>
      <td colspan="2"><label><strong>FECHA DE LLEGADA:
          
      </strong></label></td>
      <td width="152"><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"><strong>DIAS:</strong></td>
      <td width="89"><input name="fnumctos" type="text" id="fnumctos" tabindex="20" onKeyPress="return validar(event)" size="5" disabled="disabled" value="<?php
echo $_REQUEST['fnumctos'];?>"></td>
      <td colspan="3">&nbsp;</td>
      <td colspan="3"><div align="center"><strong>NOTAS:</strong></div></td>
    </tr>
    <tr>
      <td colspan="2"><strong>FECHA DE SALIDA</strong>: </td>
      <td><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"><strong>NUMERO DE ADULTOS: </strong></td>
      <td><input name="fnumadu" type="text" id="fnumadu" tabindex="20" onKeyPress="return validar(event)" disabled="disabled" size="5"  value="<?php
echo $_REQUEST['fnumadu'];?>"></td>
      <td width="104"><strong>TIPO DE HABITACION:</strong></td>
      <td colspan="2"><label>
        <input name="ftipocto" type="text" size="15" id="ftipocto" disabled="disabled" value="<?php
echo $_REQUEST['ftipocto'];?>">
      </label></td>
      <td colspan="4" rowspan="2"><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"><strong>HORA DE LLEGADA:</strong> </td>
      <td><input name="fhorallega" type="text" id="fhorallega" tabindex="20" onKeyPress="return validar(event)" disabled="disabled" size="6"  value="<?php
echo $_REQUEST['fhorallega'];?>"></td>
      <td colspan="2"><strong>NUMERO DE MENORES: </strong></td>
      <td><input name="fnummenor" type="text" id="fnummenor" tabindex="20" onKeyPress="return validar(event)" disabled="disabled" size="5"  value="<?php
echo $_REQUEST['fnummenor'];?>"></td>
      <td><strong>NUMERO DE HABITACION.</strong></td>
      <td colspan="2"><input name="fnumcto" type="text" id="fnumcto" tabindex="20" size="5" disabled="disabled" value="<?php
echo $_REQUEST['fnumcto'];?>"></td>
    </tr>
	
	
	<tr>
      <th colspan="14" class="titulo"><div align="center" class="Estilo18">CONSULTAR SEGMENTOS </div></th>
    </tr>
    <tr>
      <td width="72"><span class="Estilo18">GRUPO:</span></td>
      <td colspan="3"><span class="Estilo18">
        <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 colspan="2"><span class="Estilo18">MERCADO: </span></td>
      <td colspan="4"><span class="Estilo18">
        <select name="fcodmeca" id="fcodmeca">
        <option value="">-----SELECCIONE-----</option>
        <?php
 
$sql = mysqli_query($con ,"SELECT * FROM tipmerca");
while($reg=mysqli_fetch_array($sql)){
	if($_REQUEST['fcodmeca']==$reg['tdescrip'] ){
		echo '<option value="' . $reg['tdescrip'] . '" selected>' . $reg['tdescrip'] . '</option>';
	}else{
		echo '<option value="' . $reg['tdescrip'] . '">' . $reg['tdescrip'] . '</option>';
	}
}
?>
      </select>
      </span></td>
      <td width="76"><strong>EMPRESA:</strong></td>
      <td width="193"><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><span class="Estilo18">AGENCIA</span></td>
      <td colspan="3"><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 colspan="2"><span class="Estilo18">PLAN:</span></td>
      <td colspan="4"><span class="Estilo18">
        <select name="fplan" id="fplan">
        <option value="">--SELECCIONE--</option>
        <?php
 
$sql = mysqli_query($con ,"SELECT * FROM pplan");
while($reg=mysqli_fetch_array($sql)){
	if($_REQUEST['fplan']==$reg['pdescrip'] ){
		echo '<option value="' . $reg['pdescrip'] . '" selected>' . $reg['pdescrip'] . '</option>';
	}else{
		echo '<option value="' . $reg['pdescrip'] . '">' . $reg['pdescrip'] . '</option>';
	}
}
?>
      </select>
      </span></td>
      <td><strong>SEGMENTO:</strong></td>
      <td><select name="codseg" id="codseg">
          <option value="">--SELECCIONE--</option>
          <?php
 
$sql = mysqli_query($con ,"SELECT * FROM valeryus06");
while($reg=mysqli_fetch_array($sql)){
	if($_REQUEST['codseg']==$reg['descripcion'] ){
		echo '<option value="' . $reg['descripcion'] . '" selected>' . $reg['descripcion'] . '</option>';
	}else{
		echo '<option value="' . $reg['descripcion'] . '">' . $reg['descripcion'] . '</option>';
	}
}
?>
      </select></td>
    </tr>
    <tr>
      <td height="26"><strong>SMERF:</strong></td>
      <td colspan="3"><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>
      <td colspan="8">&nbsp;</td>
    </tr>

<tr>
      <th colspan="14" class="titulo"><div align="center" class="Estilo18">CONSULTAR FORMA DE PAGO </div></th>
    </tr>
    <tr>
      <td><span class="Estilo1">TARIFA ALTA:</span></td>
      <td colspan="6"><label>
        <input name="tex" type="text" id="tex" tabindex="20" size="5" disabled="disabled" value="<?php
echo $_REQUEST['tex'];?>">
</label>
        <label>
        <input name="tex2" type="text" id="tex2" tabindex="20" size="20" disabled="disabled" value="<?php
echo $_REQUEST['tex2'];?>">
        <input name="tex3" type="text" id="tex3" tabindex="20" size="3" disabled="disabled" value="<?php
echo $_REQUEST['tex3'];?>">
        <span class="Estilo17"><strong>$</strong></span>
        <input name="tex42" type="text" id="tex42" value="<?php
echo $_REQUEST['tex4'];?>" size="5" disabled="disabled">
        <input name="tex5" type="text" id="tex5" value="<?php
echo $_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 $_REQUEST['tex6'];?>" disabled="disabled">
      </label></td>
      <td colspan="3"><strong>FORMA DE PAGO: </strong></td>
      <td colspan="2"><span class="Estilo18">
        <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>
    </tr>
    <tr>
      <td><span class="Estilo1">TARIFA BAJA: </span></td>
      <td colspan="6"><label>
        <input name="text1" type="text" id="text1" value="<?php
echo $_REQUEST['text1'];?>" size="5" disabled="disabled">
      </label>
        <label>
        <input name="text2" type="text" id="text2" value="<?php
echo $_REQUEST['text2'];?>" size="20" disabled="disabled">
        </label>
        <label>
        <input name="text3" type="text" id="text3" value="<?php
echo $_REQUEST['text3'];?>" size="3" disabled="disabled">
        <span class="Estilo17"><strong>$</strong></span>
        <input name="text4" type="text" id="text4" value="<?php
echo $_REQUEST['text4'];?>" size="5" disabled="disabled">
        <input name="text5" type="text" id="text5" value="<?php
echo $_REQUEST['text5'];?>" size="2" disabled="disabled">
=<strong> </strong><span class="Estilo17"><strong>$</strong></span>
<input name="text6" type="text" id="text6" size="10" value="<?php
echo $_REQUEST['text6'];?>" disabled="disabled">
      </label></td>
      <td colspan="3"><strong>NUMERO DE TARJETA:</strong> </td>
      <td colspan="2"><input name="fnumtar" type="text" id="fnumtar" tabindex="20" size="15" disabled="disabled" value="<?php
echo $_REQUEST['fnumtar'];?>"></td>
    </tr>
    <tr>
      <td><span class="Estilo16">TOTAL:</span></td>
      <td colspan="2"><span class="Estilo19">$</span>
        <input name="tex4" type="text" id="tex4" tabindex="20" size="15" disabled="disabled" value="<?php
echo $_REQUEST['ftotal'];?>"></td>
      <td width="64"><strong>SALDO:</strong></td>
      <td colspan="2"><input name="fsaldo" type="text" id="fsaldo" tabindex="20" size="15" disabled="disabled" value="<?php
echo $_REQUEST['fsaldo'];?>"></td>
      <td><strong>CODIGO DE SEGURIDAD.</strong> </td>
      <td colspan="3"><input name="fcodseg" type="text" id="fcodseg" tabindex="20" size="15" disabled="disabled" value="<?php
echo $_REQUEST['fcodseg'];?>"></td>
      <td><strong>LIMITE:</strong></td>
      <td><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><strong>NOMBRE:</strong></td>
      <td colspan="2">
        <textarea name="fnombre" cols="25" rows="3" id="fnombre" tabindex="4"><?php
echo $_REQUEST['fnombre'];?>
		</textarea>	  </td>
      <td><strong>APELLIDO:</strong></td>
      <td colspan="3"><textarea name="fapellido" cols="21" rows="3" id="fapellido" tabindex="4"><?php
echo $_REQUEST['fapellido'];?>
		</textarea></td>
      <td><strong>TIPO DE HUESPED:</strong> </td>
      <td colspan="3"><select name="ftiphuesped" id="ftiphuesped" onChange="javascript: document.getElementById('frm1').submit()" tabindex="21">
        <option value="">--SELECCIONE--</option>
        <?php
 
$sql = mysqli_query($con ,"SELECT * FROM tiphuesped");
while($reg=mysqli_fetch_array($sql)){
	if($_REQUEST['ftiphuesped']==$reg['tpdescrip'] ){
		echo '<option value="' . $reg['tpdescrip'] . '" selected>' . $reg['tpdescrip'] . '</option>';
	}else{
		echo '<option value="' . $reg['tpdescrip'] . '">' . $reg['tpdescrip'] . '</option>';
	}
}
?>
      </select></td>
      <td 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></td>
    </tr>
    <tr>
      <td><span class="Estilo18">TELEFONO:</span></td>
      <td colspan="2"><input name="ftelefono" type="text" id="ftelefono" tabindex="20" size="25" disabled="disabled" value="<?php
echo $_REQUEST['ftelefono'];?>"></td>
      <td><strong>TELEFONO EMPRESA: </strong></td>
      <td colspan="3"><input name="ftelemp" type="text" id="ftelemp" tabindex="20" size="25" disabled="disabled" value="<?php
echo $_REQUEST['ftelemp'];?>"></td>
      <td> <strong>E-MAIL:</strong></td>
      <td colspan="6"><input name="fmail" type="text" id="fmail" tabindex="20" size="25" disabled="disabled" value="<?php
echo $_REQUEST['fmail'];?>"></td>
    </tr>
    <tr>
      <td><span class="Estilo18">E-MAIL EMPRESA: </span></td>
      <td colspan="2"><input name="femail" type="text" id="femail" tabindex="20" size="25" disabled="disabled" value="<?php
echo $_REQUEST['femail'];?>"></td>
	  
	  <td><strong>DIRECCION:</strong></td>
	  <td colspan="3"><input name="fdireccion" type="text" id="fdireccion" tabindex="20" size="20" disabled="disabled" value="<?php
echo $_REQUEST['fdireccion'];?>"></td>
      <td><strong>COLONIA:</strong></td>
      <td colspan="4"><span class="Estilo18">
        <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>
    </tr>
    <tr>
      <td><span class="Estilo18">CODIGO POSTAL:</span></td>
      <td colspan="2"><input name="tcp" type="text" disabled="disabled" onKeyPress="return validar(event)" value="<?php
echo $_REQUEST['tcp'];?>" maxlength="5"></td>
      <td><strong>PAIS: </strong></td>
      <td colspan="3"><span class="Estilo18">
        <select name="pais" id="pais" onChange="javascript: document.getElementById('frm1').submit()">
          <option value="">-----Selecciona-----</option>
          <?php
   
		  include("DMMYSQLG.php");
			@$resultado=mysqli_query($con ,"select * from dxpaises");
			if(!isset($_REQUEST['pais'])){
				$dt_paises=mysqli_fetch_array($resultado);
				$selPais=$dt_paises['cve_pais'];
				if(mysqli_num_rows($resultado)>0)
					mysqli_data_seek($resultado,0);		
			}
			else{
				$selPais=$_REQUEST['pais'];
			}
			while($registro=mysqli_fetch_array($resultado)){
				if($selPais==$registro['cve_pais']){
					echo '<option value="' . $registro['cve_pais'] . '" selected>' . $registro['des_pais'] . '</option>';
				}else{
					echo '<option value="' . $registro['cve_pais'] . '">' . $registro['des_pais'] . '</option>';
				}
				
			}			
		?>
        </select>
      </span></td>
      <td><strong>ESTADO:</strong></td>
      <td colspan="4"><span class="Estilo18">
        <select name="estados" onChange="javascript: document.getElementById('frm1').submit()">
          <option  value="">-----Selecciona-----</option>
          <?php
  
		@$resultado=mysqli_query($con ,"select * from dxestado where cve_pais='$selPais'");
		if(!isset($_REQUEST['estados'])){
			$dt_estado=mysqli_fetch_array($resultado);
			$selEnt=$dt_estado['cve_estado'];
			if(mysqli_num_rows($resultado)>0)
				mysqli_data_seek($resultado,0);		
		}
		else{
			$selEnt=$_REQUEST['estados'];
		}
		while($registro=mysqli_fetch_array($resultado)){
			if($selEnt==$registro['cve_estado'] ){ 
				echo '<option value="' . $registro['cve_estado'] . '" selected>' . $registro['des_estado'] . '</option>';
			}else{
				echo '<option value="' . $registro['cve_estado'] . '">' . $registro['des_estado'] . '</option>';
			}
			
		}
?>
        </select>
      </span></td>
    </tr>
    <tr>
      <td height="29"><span class="Estilo18">DELEGACION O MUNICIPIO </span></td>
      <td colspan="2"><span class="Estilo18">
        <select name="tmun" id="tmun" >
          <option  value="">-----Selecciona-----</option>
          <?php
 
		@$resultado=mysqli_query($con ,"select * from dxdelmun where cve_estado='$selEnt' and cve_pais='$selPais'");
		if(!isset($_REQUEST['tmun'])){
			$dt_delmun=mysqli_fetch_array($resultado);
			$selDelMun=$dt_delmun['cve_delmun'];
			if(mysqli_num_rows($resultado)>0)
				mysqli_data_seek($resultado,0);		
		}
		else{
			$selDelMun=$_REQUEST['tmun'];
		}
		while(@$registro=mysqli_fetch_array($resultado)){
			if($selDelMun==$registro['cve_delmun']){ 
				echo '<option value="' . $registro['cve_delmun'] . '" selected>' .$registro['des_delmun'] . '</option>';
			}else{
				echo '<option value="' . $registro['cve_delmun'] . '">' . $registro['des_delmun'] . '</option>';
			}
		}
?>
        </select>
      </span></td>
      <td><strong>VEHICULO: </strong></td>
      <td colspan="3"><input name="fvehiculo" type="text" id="fvehiculo" tabindex="20" size="25" disabled="disabled" value="<?php
echo $_REQUEST['fvehiculo'];?>"></td>
      <td><strong>PLACAS:</strong></td>
      <td colspan="6"><label>
        <input name="fplacas" type="text" id="fplacas" tabindex="20" size="25" disabled="disabled" value="<?php
echo $_REQUEST['fplacas'];?>">
      </label></td>
    </tr>
    <tr>
      <td height="29" colspan="14"><div align="center">
        <input name="Submit" type="button" class="pp" tabindex="30" onClick="openpage('valeryus66000_CDH.php','_self')" value="Regresar"/>
      </div></td>
    </tr>
  </table>
</form>
  <?php
 
if(isset($_POST['bot3'])){
	echo '<div align="center">
	<form id="form1" name="form1" action="rec_checkin_PR.php" target="_self">
		<input type="submit" name="submit" value="Regresar" class="pp">
	</form>
	</div>';
	
}
?>
</body>
<?php
 
mysqli_close($con);

?>
</html>