<?php
 
session_start();
include("DMMYSQLG.php");
?>
<html>
<head>
<title>CENTRO COSTOS</title>
</head>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>
<body>
<form name="frm1" method="post" action="">
<?php
 
for($j=0;$j<=119;$j++)
{
	$c[]= "t" . $j;
	echo '<input name="' . $c[$j-1] . '" type="hidden" value="' . $_POST[$c[$j-1]] .'">';
}
?>
  <table width="971"  align="center">

    <tr>
      <th colspan="5" class="titulo"><div align="center">DOMICILIO FISCAL O POSTAL </div></th>
    </tr>
    <tr>
      <td width="162">Estado:</td>
      <td width="161"><select name="t39" id="t39" tabindex="7" onChange="javascript: document.getElementById('frm1').submit()">
        <option selected>------------------</option>
        <?php
 
			echo '<option></option>';
	@$resultado1=mysqli_query($con ,"select * from geoyos_jc.dxestado where cve_pais=1 order by des_estado");
	while($registro1=mysqli_fetch_array($resultado1)){
		if ($_POST['t39'] == $registro1['cve_estado']){
			echo '<option value="' . $registro1['cve_estado'] . '" selected>' . $registro1['des_estado'] . '</option>';
		}else {
			echo '<option value="' . $registro1['cve_estado'] . '">' . $registro1['des_estado'] . '</option>';
		}
	}
?>
      </select></td>
      <td colspan="2">Delegacion o Municipio: </td>
      <td width="295"><select name="t38" id="t38"  tabindex="8" onChange="javascript: document.getElementById('frm1').submit()">
        <option>---------------</option>
        <?php
 
	echo '<option></option>';
	@$resultado1=mysqli_query($con ,"select * from geoyos_jc.dxdelmun where cve_estado=$_POST['t39'] order by des_delmun");
	while($registro1=mysqli_fetch_array($resultado1)){
	if($_POST['t38'] == $registro1['cve_delmun']){
		echo '<option value="' . $registro1['cve_delmun'] . '"selected>' . $registro1['des_delmun'] . '</option>';
	}else{
		echo '<option value="' . $registro1['cve_delmun'] . '">' . $registro1['des_delmun'] . '</option>';
	}
}
?>
      </select></td>
    </tr>
    <tr>
      <td>Colonia:</td>
      <td><select name="t33" id="t33" tabindex="9" >
        <option>--------------</option>
        <?php
 
	if (isset($_POST['t38']) and $_POST['t38'] <> ""){
		@$resultado1=mysqli_query($con ,"select * from geoyos_jc.dxcoloni where cve_delmun = '".$_POST['t38']."' ");
		while($registro1=mysqli_fetch_array($resultado1)){
			if($_POST['t33'] == $registro1['cve_col']){
				echo '<option value="' . $registro1['cve_col'] . '"selected>' . $registro1['des_colonia'] . '</option>';
			}else{
				echo '<option value="' . $registro1['cve_col'] . '">' . $registro1['des_colonia'] . '</option>';
			}
	}
}
?>
      </select></td>
      <td colspan="2">Codigo Postal:</td>
      <td><input name="t35" type="text" onKeyPress="return validar(event)" size="10" maxlength="5"
<?php

if(isset($_POST['t33'])){ 
	@$resultado1=mysqli_query($con ,"select * from dxcoloni where cve_col=$_POST['t33']");
	while(@$registro1=mysqli_fetch_array($resultado1)){
		echo ' value="' . $registro1['cod_pos'] . '"';
	}
}
?>/></td>
    </tr>
    <tr>
      <td>Calle:</td>
      <td><input name="t32" type="text"  tabindex="1"
	  <?php

				if(isset($_POST['t32'])){ 
			echo 'value="' . $_POST['t32'] .  '"';
			}
		?> onBlur="may(this)"/></td>
      <td colspan="2">Numero</td>
      <td><input name="t36" type="text" tabindex="5"
	  <?php

				if(isset($_POST['t36'])){ 
			echo 'value="' . $_POST['t36'] .  '"';
			}
		?> onKeyPress="return soloNumeros(event)"/></td>
    </tr>
    <tr>
      <td> Interior</td>
      <td><input name="t37" type="text" tabindex="6"
	  <?php

				if(isset($_POST['t37'])){ 
			echo 'value="' . $_POST['t37'] .  '"';
			}
		?> onKeyPress="return soloNumeros(event)"/></td>
      <td colspan="2">Ciudad:</td>
      <td><input name="t34" type="text" tabindex="3"
	  	  <?php

				if(isset($_POST['t34'])){ 
			echo 'value="' . $_POST['t34'] .  '"';
			}
		?> onBlur="may(this)"/></td>
    </tr>
    <tr>
      <th colspan="5" class="titulo"><div align="center">INFORMACION DEL EMPLEO DEL SOLICITANTE </div></th>
    </tr>
    <tr>
      <td>Puesto:</td>
      <td><input name="t40" type="text" tabindex="9"
	  <?php

				if(isset($_POST['t40'])){ 
			echo 'value="' . $_POST['t40'] .  '"';
			}
		?> onBlur="may(this)"/>	  </td>
      <td colspan="3">Nombre de la Empresa: 
      <input name="t48" type="text" tabindex="18" size="50" 
	  <?php

				if(isset($_POST['t48'])){ 
			echo 'value="' . $_POST['t48'] .  '"';
			}
		?> onBlur="may(this)"/>	  </td>
    </tr>
    
    <tr>
      <td>Giro de la Empresa: </td>
      <td><input name="t41" type="text" tabindex="11"
	  <?php

				if(isset($_POST['t41'])){ 
			echo 'value="' . $_POST['t41'] .  '"';
			}
		?> onBlur="may(this)"/>	  </td>
      <td colspan="2">Estado:      
        <select name="t56" id="t56" tabindex="7" onChange="javascript: document.getElementById('frm1').submit()">
          <option selected>------------------</option>
          <?php
 
			echo '<option></option>';
	@$resultado1=mysqli_query($con ,"select * from geoyos_jc.dxestado where cve_pais=1 order by des_estado");
	while($registro1=mysqli_fetch_array($resultado1)){
		if ($_POST['t56'] == $registro1['cve_estado']){
			echo '<option value="' . $registro1['cve_estado'] . '" selected>' . $registro1['des_estado'] . '</option>';
		}else {
			echo '<option value="' . $registro1['cve_estado'] . '">' . $registro1['des_estado'] . '</option>';
		}
	}
?>
        </select></td>
      <td>Delegacion o Municipio:
        <select name="t53" id="t53"  tabindex="8" onChange="javascript: document.getElementById('frm1').submit()">
          <option>---------------</option>
          <?php
 
	echo '<option></option>';
	@$resultado1=mysqli_query($con ,"select * from geoyos_jc.dxdelmun where cve_estado=$_POST['t56'] order by des_delmun");
	while($registro1=mysqli_fetch_array($resultado1)){
	if($_POST['t53'] == $registro1['cve_delmun']){
		echo '<option value="' . $registro1['cve_delmun'] . '"selected>' . $registro1['des_delmun'] . '</option>';
	}else{
		echo '<option value="' . $registro1['cve_delmun'] . '">' . $registro1['des_delmun'] . '</option>';
	}
}
?>
        </select></td>
    </tr>
    <tr>
      <td>Tipo de empleo:</td>
      <td><input name="t42" type="text" tabindex="12"
	  <?php

				if(isset($_POST['t42'])){ 
			echo 'value="' . $_POST['t42'] .  '"';
			}
		?> onBlur="may(this)"/>	  </td>
      <td colspan="2"> 
        
        Colonia:
            <select name="t52" id="t52" tabindex="9" >
              <option>--------------</option>
              <?php
 
	if (isset($_POST['t53']) and $_POST['t53'] <> ""){
		@$resultado1=mysqli_query($con ,"select * from geoyos_jc.dxcoloni where cve_delmun = '".$_POST['t53']."' ");
		while($registro1=mysqli_fetch_array($resultado1)){
			if($_POST['t52'] == $registro1['cve_col']){
				echo '<option value="' . $registro1['cve_col'] . '"selected>' . $registro1['des_colonia'] . '</option>';
			}else{
				echo '<option value="' . $registro1['cve_col'] . '">' . $registro1['des_colonia'] . '</option>';
			}
	}
}
?>
            </select>
      </td>
      <td>C.P.
      <input name="t54" type="text" onKeyPress="return validar(event)" size="10" maxlength="5"
<?php

if(isset($_POST['t52'])){ 
	@$resultado1=mysqli_query($con ,"select * from dxcoloni where cve_col=$_POST['t52']");
	while(@$registro1=mysqli_fetch_array($resultado1)){
		echo ' value="' . $registro1['cod_pos'] . '"';
	}
}
?>/></td>
    </tr>
    <tr>
      <td>Ingreso Bruto: ($): </td>
      <td><input name="t43" type="text" tabindex="13"
	  <?php

				if(isset($_POST['t43'])){ 
			echo 'value="' . $_POST['t43'] .  '"';
			}
		?> onKeyPress="return soloNumeros(event)"/>	  </td>
      <td colspan="3"> Calle
      <input name="t49" type="text" tabindex="19" size="40"
	  <?php

				if(isset($_POST['t49'])){ 
			echo 'value="' . $_POST['t49'] .  '"';
			}
		?> onBlur="may(this)"/></td>
    </tr>
    <tr>
      <td>Ingreso Neto ($):</td>
      <td><input name="t44" type="text" tabindex="14"
	  <?php

				if(isset($_POST['t44'])){ 
			echo 'value="' . $_POST['t44'] .  '"';
			}
		?> onKeyPress="return soloNumeros(event)"/>	  </td>
      <td colspan="2">Numeo:
      <input name="t50" type="text" tabindex="20" size="10" maxlength="10"
		<?php

				if(isset($_POST['t50'])){ 
			echo 'value="' . $_POST['t50'] .  '"';
			}
		?> onKeyPress="return soloNumeros(event)"/></td>
      <td>
      Interior:
      <input name="t51" type="text" tabindex="21" size="10" maxlength="10"
	  <?php

				if(isset($_POST['t51'])){ 
			echo 'value="' . $_POST['t51'] .  '"';
			}
		?> onKeyPress="return soloNumeros(event)"/></td>
    </tr>
    <tr>
      <td>Ingreso Bruto del Conjuge ($): </td>
      <td><input name="t45" type="text" tabindex="15"
	  <?php

				if(isset($_POST['t45'])){ 
			echo 'value="' . $_POST['t45'] .  '"';
			}
		?> onBlur="may(this)"/>	  </td>
      <td colspan="2">Ciudad:
      <input name="t55" type="text" tabindex="25"
	  <?php

				if(isset($_POST['t55'])){ 
			echo 'value="' . $_POST['t55'] .  '"';
			}
		?> onBlur="may(this)"/>	  </td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td><span class="style3">Otros Ingresos Comprobables ($):</span></td>
      <td><input name="t46" type="text" tabindex="16"
	  <?php

				if(isset($_POST['t46'])){ 
			echo 'value="' . $_POST['t46'] .  '"';
			}
		?> onKeyPress="return soloNumeros(event)"/>	  </td>
      <td colspan="2">Telefono C/lada:
        <input name="t57" type="text" tabindex="27"
		
		<?php

				if(isset($_POST['t57'])){ 
			echo 'value="' . $_POST['t57'] .  '"';
			}
		?> onKeyPress="return soloNumeros(event)"/>              </td>
      <td>Extension:
      <input name="t58" type="text" tabindex="28" size="10" maxlength="10"
	  <?php

				if(isset($_POST['t58'])){ 
			echo 'value="' . $_POST['t58'] .  '"';
			}
		?> onKeyPress="return soloNumeros(event)"/>	  </td>
    </tr>
    <tr>
      <td>Fuente de otros ingresos:</td>
      <td><input name="t47" type="text" tabindex="17"
	  <?php

				if(isset($_POST['t47'])){ 
			echo 'value="' . $_POST['t47'] .  '"';
			}
		?> onBlur="may(this)"/>	  </td>
      <td width="185"> Tiempo de Empleo Actual </td>
      <td width="134">A&ntilde;os: 
      <input name="t59" type="text" tabindex="29" size="10" maxlength="10"
	  <?php

				if(isset($_POST['t59'])){ 
			echo 'value="' . $_POST['t59'] .  '"';
			}
		?> onKeyPress="return soloNumeros(event)"/>	  </td>
      <td>Meses: 
        <input name="t60" type="text" tabindex="30" size="10" maxlength="10"
		<?php

				if(isset($_POST['t60'])){ 
			echo 'value="' . $_POST['t60'] .  '"';
			}
		?> onKeyPress="return soloNumeros(event)"/>		</td>
    </tr>
    <tr>
      <td colspan="2"><input name="fnombre" type="text" id="fnombre" tabindex="20"	
		 size="30"
			<?php

				if(isset($_POST['fnombre'])){ //este es el truco
					echo 'value="' . $_POST['fnombre'] .  '"';
				}
			?> onBlur="may(this)"/>
        NOMBRE</td>
      <td colspan="3">E - Mail:
<input name="t61" type="text" id="t61"
<?php

				if(isset($_POST['t61'])){ 
			echo 'value="' . $_POST['t61'] .  '"';
			}
		?> /></td>
    </tr>
    <tr>
      <td colspan="5"><div align="center">
           
          <input type="button" name="Submit3" value="Regresar" onClick="openpage('HOTEL.php','_self')">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
          <input type="button" name="Submit" value="Siguiente" onClick="openpage('DRA11113.php','_self')">
		  <input name="Submit22" type="submit" value="Guardar Habitaciones" onClick="openpage('HOTEL4.php','_self')"/>
      </div></td>
    </tr>
  </table>
</form>
</body>
</html>
