<?php
 
session_start();
include("DMMYSQLG.php");
include("DF30000.inc");
?>
<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] . '" type="hidden" value="' . $_POST[$c[$j]] .'">';
}
?>
  <table width="470"  align="center">
      <tr>
        <th>&nbsp;</th>
      </tr>
  </table>
    <table width="470"  align="center">
      <tr>
        <th>&nbsp;</th>
      </tr>
    </table>
    <table width="927"  align="center">
    <tr>
      <th colspan="6" class="titulo"><div align="center">SOLICITUD DE SERVICIOS FINANCIEROS </div></th>
    </tr>
    <tr>
      <td colspan="3"> Informacion Personal </td>
      <td colspan="3">Domicilio Actual </td>
    </tr>
    <tr>
      <td colspan="3">Titulo de la persoa 
        <select name="t2" tabindex="1">
			<?php

			if(isset($_POST['t2'])){ 	
				echo '<option>' . $_POST['t2'] .  '</option>';
			}
			?>
		  <option>-----------</option>	
          <option>Sr</option>
          <option>Sra.</option>
          <option>Lic.</option>
          <option>Arq.</option>
          <option>Ing.</option>
          <option>Dr.</option>
          <option>C.</option>
        </select></td>
      <td colspan="3">Calle:        </td>
    </tr>
    <tr>
      <td width="59"><strong>NOMBRE.</strong></td>
      <td colspan="2"><input name="t3" type="text" id="t3" size="40" tabindex="2"
	  <?php

				if(isset($_POST['t3'])){ 
			echo 'value="' . $_POST['t3'] .  '"';
			}
		?> onBlur="may(this)"/></td>
      <td colspan="2">Numero:
          <input name="t15" type="text" tabindex="14" size="10" maxlength="10"
		  	  <?php

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

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

				if(isset($_POST['t4'])){ 
			echo 'value="' . $_POST['t4'] .  '"';
			}
		?> onBlur="may(this)"/></td>
      <td colspan="3">AGENCIA.
        <select name="t21" tabindex="7" onChange="javascript: document.getElementById('frm1').submit()">
		<option selected>------------------</option>
          
		<?php
 
			echo '<option></option>';
	@$resultado1=mysqli_query($con ,"SELECT * FROM valeryus07");
	while($registro1=mysqli_fetch_array($resultado1)){
		if ($_POST['t21'] == $registro1['agdescrip']){
			echo '<option value="' . $registro1['agdescrip'] . '" selected>' . $registro1['agdescrip'] . '</option>';
		}else {
			echo '<option value="' . $registro1['agdescrip'] . '">' . $registro1['agdescrip'] . '</option>';
		}
	}
?>
        </select></td>
      </tr>
    <tr>
      <td>TELEFONO.</td>
      <td colspan="2"><input name="t5" type="text" id="t5" size="42" tabindex="4"
	  <?php

				if(isset($_POST['t5'])){ 
			echo 'value="' . $_POST['t5'] .  '"';
			}
		?>  onBlur="may(this)"/></td>
      <td colspan="3">EMPRESA.
        <select name="t18"  tabindex="8" onChange="javascript: document.getElementById('frm1').submit()">
		<option>---------------</option>
		<?php
 
	echo '<option></option>';
	@$resultado1=mysqli_query($con ,"SELECT * FROM fcompas");
	while($registro1=mysqli_fetch_array($resultado1)){
	if($_POST['t18'] == $registro1['pdesco']){
		echo '<option value="' . $registro1['pdesco'] . '"selected>' . $registro1['pdesco'] . '</option>';
	}else{
		echo '<option value="' . $registro1['pdesco'] . '">' . $registro1['pdesco'] . '</option>';
	}
}
?>
        </select></td>
    </tr>
    <tr>
      <td>TELEFONO EMPRESA. </td>
      <td colspan="2"><input name="t9" type="text" tabindex="9"
	  <?php

				if(isset($_POST['t9'])){ 
			echo 'value="' . $_POST['t9'] .  '"';
			}
		?> onBlur="may(this)"/></td>
      <td colspan="3">MERCADO.
        <select name="t17" tabindex="9" >
		<option>--------------</option>  
		<?php
 
	if (isset($_POST['t18']) and $_POST['t18'] <> ""){
		@$resultado1=mysqli_query($con ,"SELECT * FROM tipmerca");
		while($registro1=mysqli_fetch_array($resultado1)){
			if($_POST['t17'] == $registro1['tdescrip']){
				echo '<option value="' . $registro1['tdescrip'] . '"selected>' . $registro1['tdescrip'] . '</option>';
			}else{
				echo '<option value="' . $registro1['tdescrip'] . '">' . $registro1['tdescrip'] . '</option>';
			}
	}
}
?>
        </select></td>
      </tr>
    <tr>
      <td>E-MAIL.</td>
      <td colspan="2"><input name="t10" type="text" onBlur="may(this)" size="35" tabindex="10"
	  <?php

				if(isset($_POST['t10'])){ 
			echo 'value="' . $_POST['t10'] .  '"';
			}
		?>/></td>
      <td colspan="2">Ciudad:
        <input name="t20" type="text" tabindex="19"
		<?php

				if(isset($_POST['t20'])){ 
			echo 'value="' . $_POST['t20'] .  '"';
			}
		?> onBlur="may(this)"/>	  </td>
      <td>C.P.
      <input name="t19"  tabindex="10" type="text" onKeyPress="return validar(event)" size="10" maxlength="5"
	  <?php

if(isset($_POST['t17'])){ 
$n=1;
	@$resultado1=mysqli_query($con ,"select * from dxcoloni where cve_col=$_POST['t17']");
	while(@$registro1=mysqli_fetch_array($resultado1)){
		echo ' value="' . $registro1['cod_pos'] . '"';
	}
}
echo $n;
?>/></td>
    </tr>
    <tr>
      <td colspan="3">Fecha de Nacimiento 
	  
        <input name="t7" type="text" class="emplea" id="t7" size="15" readonly
			  <?php
 
				  $axc = date('d/m/Y');
				  if(isset($_POST['t7'])){
					echo 'value="'.$_POST['t7'].'"'; 
				  }else{
						echo 'value="'.$axc.'"'; 
				  }
			  ?>
			  >
        <input name="cal" id="cal" value=" ... " type="image" src="logos/cal4.jpg"/>
        <script type="text/javascript">
				  	Calendar.setup(
    					{
      						inputField  : "t7",        // ID of the input field
      						ifFormat    : "%d/%m/%Y",    // the date format
      						button      : "cal"      // ID of the button
    					}
  					);
				</script></td>
      <td colspan="2">Telefono C/lada:
        
          <input name="t22" type="text" maxlength="10" tabindex="21"
		  <?php

				if(isset($_POST['t22'])){ 
			echo 'value="' . $_POST['t22'] .  '"';
			}
		?> onKeyPress="return soloNumeros(event)"/>      </td>
      <td>Propio:
        <input name="t23" type="text" maxlength="10" tabindex="22"
		<?php

				if(isset($_POST['t23'])){ 
			echo 'value="' . $_POST['t23'] .  '"';
			}
		?> onKeyPress="return soloNumeros(event)"/>	  </td>
    </tr>
    <tr>
      <td height="29" colspan="3">Nacionalidad        </td>
      <td colspan="2">Celular:
      <input name="t24" type="text" size="20" maxlength="20" tabindex="23"
	  <?php

				if(isset($_POST['t24'])){ 
			echo 'value="' . $_POST['t24'] .  '"';
			}
		?> onKeyPress="return soloNumeros(event)"/>	  </td>
      <td>Otro Telefono:
      <input name="t25" type="text" size="15"  maxlength="15" tabindex="24" 
	  <?php

				if(isset($_POST['t25'])){ 
			echo 'value="' . $_POST['t25'] .  '"';
			}
		?> onKeyPress="return soloNumeros(event)"/>	  </td>
    </tr>
    <tr>
      <td height="27">E-MAIL EMPRESA. </td>
      <td height="27" colspan="2"><input name="t13" type="text" size="38" tabindex="12"
	  <?php

				if(isset($_POST['t13'])){ 
			echo 'value="' . $_POST['t13'] .  '"';
			}
		?> onBlur="may(this)"/></td>
      <td colspan="2">Tipo de recidencia: 
        <input name="t26" type="text" id="t26" tabindex="25"
		<?php

				if(isset($_POST['t26'])){ 
			echo 'value="' . $_POST['t26'] .  '"';
			}
		?> onBlur="may(this)"/>	  </td>
      <td>Monto Mensual Renta: 
      <input name="t27" type="text" size="10" maxlength="10" tabindex="26"
	  <?php

				if(isset($_POST['t27'])){ 
			echo 'value="' . $_POST['t27'] .  '"';
			}
		?> onKeyPress="return soloNumeros(event)"/>	  </td>
    </tr>
    <tr>
      <td>CURP   	  </td>
      <td colspan="2"><input name="t14" type="text" size="50" tabindex="13"
		<?php

				if(isset($_POST['t14'])){ 
			echo 'value="' . $_POST['t14'] .  '"';
			}
		?> onBlur="may(this)"/></td>
      <td width="100"> Tiempo de Residencia: </td>
      <td width="118">A&ntilde;os:
      <input name="t28" type="text" size="10" maxlength="10" tabindex="27"
	  <?php

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

				if(isset($_POST['t29'])){ 
			echo 'value="' . $_POST['t29'] .  '"';
			}
		?> onKeyPress="return soloNumeros(event)"/>	  </td>
    </tr>
    <tr>
      <td colspan="2">Estado Civil:        </td>
      <td width="251"> N de dependientes: 
      <input name="t12" type="text"  size="3" maxlength="3" tabindex="11"
		<?php

				if(isset($_POST['t12'])){ 
			echo 'value="' . $_POST['t12'] .  '"';
			}
		?> onBlur="may(this)"/>      </td>
      <td colspan="3">E-Mail:
      <input name="t30" type="text" tabindex="29"
	  <?php

				if(isset($_POST['t30'])){ 
			echo 'value="' . $_POST['t30'] .  '"';
			}
		?> />	  </td>
    </tr>
    <tr>
      <td colspan="3">Nombre del Conjuge:   	  </td>
      <td colspan="3">Nivel de Educacion: 
        <select name="t31" tabindex="30">
		<?php

			if(isset($_POST['t31'])){ 	
				echo '<option>' . $_POST['t31'] .  '</option>';
			}
			?>
          <option>--------------------</option>
          <option>PRIMARIA</option>
          <option>SECUNDARIA</option>
          <option>PREPARATORIA</option>
          <option>BACHILLERATO</option>
          <option>TECNICO PROFESIONAL</option>
          <option>LICENCIATURA</option>
          <option>INGENIERIA</option>
          <option>POSGRADO</option>
          <option>ESPECIALIDAD</option>
          <option>MAESTRIA</option>
          <option>DOCTORADO</option>
        </select></td>
      </tr>
    <tr>
      <td colspan="6">
        <div align="center">
          <input type="button" name="Submit" value="Siguiente" onClick="openpage('HOTEL2.php','_self')">
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <input type="reset" name="Submit2" value="Limpiar Captura">
        </div>      </td>
    </tr>
  </table>
</form>
</body>
</html>
