Está en la página 1de 5

<?php session_start(); include ("Conexion.php"); $obj=new Conexion(); $op=$obj->ConexDb(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.

0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Documento sin t&iacute;tulo</title> <script type="text/javascript"> function desactivarLista(lis){ lis.disabled=true; } function limpiar(form){ form.submit(); } function validarLista(l){ if (l==0){ alert ("Debe seleccionar una opcion de la lista"); return false; } else return true; } function validarSup(s){ bandera = isNaN(s); if (bandera){ alert ("Debe ingresar solo numeros en la superficie"); return false; } if (s.length==0){ alert ("Debe ingresar la superficie en mts2"); return false; } else return true; } function validarSup(s){ bandera = isNaN(s); if (bandera){ alert("El valor de los campos numericos es incorrecto"); return false; } if (s.length==0){ alert("Por Favor debe llenar todos los campo"); return false; } else return true; } function validarDes(s){ if (s.length==0){ alert("Por Favor debe llenar todos los campo"); return false; } else return true; } function validardatos(form){ var validar = false; if (validarLista(document.forms.frmAvaluo.lstZonas.value)) if (validarLista(document.forms.frmAvaluo.estatus.value)) if (validarSup(document.forms.frmAvaluo.metros.value)) if (validarSup(document.forms.frmAvaluo.noHab.value))

if (validarSup(document.forms.frmAvaluo.precio.value)) if (validarSup(document.forms.frmAvaluo.nobanos.value)) if (validarDes(document.forms.frmAvaluo.descripcion.value)) validar = true; if (validar){ return true; }else{return false;} } function ComponerListaZonas(list){ document.forms.frmAvaluo.lstZonas.length = 0; var o; <?php $sql ="SELECT * FROM zona ORDER BY NombreZona ASC"; $resul=$obj->cargaSql($sql); while ($zon = mysql_fetch_array($resul)) { ?> if (list == "<?php echo $zon['codCiudad']; ?>") { o = document.createElement("OPTION"); o.text = "<?php echo $zon['NombreZona']; ?>"; o.value = "<?php echo $zon['codZona']; ?>"; document.forms.frmAvaluo.lstZonas.options.add(o); } <?php } mysql_free_result($resul); ?> } function ComponerListaCiudades(list){ document.forms.frmAvaluo.lstCiudades.length = 0; var o; <?php $sql ="SELECT * FROM ciudad ORDER BY NombreCiudad ASC"; $resul=$obj->cargaSql($sql); while ($ciu = mysql_fetch_array($resul)) { ?> if (list == "<?php echo $ciu['codEstado']; ?>") { o = document.createElement("OPTION"); o.text = "<?php echo $ciu['NombreCiudad']; ?>"; o.value = "<?php echo $ciu['codCiudad']; ?>"; document.forms.frmAvaluo.lstCiudades.options.add(o); } <?php } mysql_free_result($resul); ?> } function ComponerListaEstados(list) { document.forms.frmAvaluo.lstEstados.length = 0; var o; <?php $sql="SELECT * FROM estado ORDER BY NombreEstado ASC"; $resul=$obj->cargaSql($sql); while ($edo = mysql_fetch_array($resul)) { ?> if (list == "<?php echo $edo['codPais']; ?>") { o = document.createElement("OPTION"); o.text = "<?php echo $edo['NombreEstado']; ?>"; o.value = "<?php echo $edo['codEstado']; ?>"; document.forms.frmAvaluo.lstEstados.options.add(o); } <?php } mysql_free_result($resul); ?>

} </script> </head> <body> <div align="left"></div> <table align="left" border="0" width="74%"> <tbody> <tr> <td><strong>Usted se encuentra en:</strong> <strong>Principal</strong> <strong>&raquo;</strong><font color=\"#3366FF\"><strong>Solicitar Afiliacion</strong></font></td> </tr> </tbody> </table> <p>&nbsp;</p> <table align="left" border="0" width="896"> <tbody> <tr> <td height="688" width="315"><img src="images/demoimage.jpg" alt="dsd" width="338" height="320" border="0" /></td> <td width="571"><table align="center" background="images/superior.jpg" cellpadding="0" cellspacing="0" width="97%"> <tbody> <tr align="right"> <td width="528" height="33" align="center" background="images/busque.jpg"></td> </tr> </tbody> </table> <table align="center" cellpadding="0" cellspacing="0" height="375" width="97%"> <tbody> <tr > <td background="images/cajacentralc.jpg" height="373" width="531"><table width="487"> <tbody> <tr> <td height="322" width="27"><!--A2B--></td> <td align="center" width="448"><form enctype="multipart/form-data" name="frmAvaluo" id="frmAvaluo" onsubmit="return validardatos(this.form);" action="Afiliacion.php" method="post"> <table align="center" width="410"> <tbody> <tr> <td colspan="2" align="center"></td> </tr> <tr> <td height="62" width="164">Tipo de Negociacion :</td> <td width="218"><select name="tipoNegocio[]" size="2" multiple="multiple"> <option value="Alquiler">Alquiler</option> <option value="Venta">Venta</option> </select></td> </tr> <tr> <td height="67">Tipo de Inmueble </td> <td align="left"><select name="inmueble[]" size="8" multiple="multiple"> <option value="Apartamentos">Apartamentos</option> <option value="Town Houses" selected="selected">Town Houses</option> <option value="Fincas">Fincas</option> <option value="Granjas">Granjas</option> <option value="Galpones">Galpones</option> <option value="Locales Comerciales">Locales Comerciales</option> <option value="Casas">Casas</option> <option value="Oficinas">Oficinas</option> <option value="Terrenos Urbanos">Terrenos Urbanos</option> </select></td> <background="images/busque.JPG"/tr> <tr> <td height="31" class="searchpage_field_caption">Pais</td>

<td align="left"><select name="lstPaises" size="1" onChange = "ComponerListaEstados(this.value)"> <option value="" selected>...</option> <?php $sql = "SELECT * FROM pais ORDER BY NombrePais ASC"; $resul=$obj->cargaSql($sql); while($edo = mysql_fetch_array($resul)) { ?> <option value = "<?php echo $edo['codPais'];?>"><?php echo $edo['NombrePais']; ? ></option> <?php } mysql_free_result($resul); ?> </select></td> </tr> <tr> <td class="searchpage_field_caption">Estado</td> <td align="left"><select name="lstEstados" size="1" onChange = "ComponerListaCiudades(this.value)"> <option selected value="">...</option> </select></td> </tr> <tr> <td class="searchpage_field_caption">Ciudad</td> <td align="left"><select name="lstCiudades" size="1" onChange = "ComponerListaZonas(this.value)"> <option selected value="">...</option> </select></td> </tr> <tr> <td class="searchpage_field_caption">Zona</td> <td align="left"><select name="lstZonas"> <option selected value="">...</option> </select></td></tr> <tr> <tr> <td colspan="2" height="15" valign="top">&nbsp;</td> </tr> <tr> <td colspan="2" align="center" valign="top"> <input name="af" type="hidden" value="si"> <input name="submit" value="Enviar" type="submit" /> <input name="Reset" id="Reset" value="Limpiar" type="reset" /> </td> </tr> </tbody> </table> </form></td> </tr> </tbody> </table></td> </tr> </tbody> </table> <table align="center" cellpadding="0" cellspacing="0" height="25" width="97%"> <tbody> <tr> <td align="center" background="images/cajacentralb.jpg" height="23" valign="top" width="529"></td> </tr> </tbody> </table></td> </tr> </tbody>

</table> </body> </html>