<HTML>
<HEAD>
<TITLE>SIMULACION DE MINICONSULTA ENTIDAD OTRA VEZ</TITLE>
<?php
include("conex.php");
$link=Conectarse();
$result=mysql_query("select * from gente order by nombre",$link); $provincias=mysql_query("select * from provincias",$link); $categorias=mysql_query("select categoria from categorias order by codigo",$link); ?>
<SCRIPT LANGUAGE="javaScript">
function MostarCajaTexto1(){
if(frmDatos.cmbcif.checked){
frmDatos.txtcif.style.visibility='visible'
}else{
frmDatos.txtcif.style.visibility='hidden'
}
}
function MostarCajaTexto2(){
if(frmDatos.cmbnombre.checked){
frmDatos.txtnombre.style.visibility='visible'
}else{
frmDatos.txtnombre.style.visibility='hidden'
}
}
function MostarCajaTexto3(){
if(frmDatos.cmbtelefono.checked){
frmDatos.txttelefono.style.visibility='visible'
}else{
frmDatos.txttelefono.style.visibility='hidden'
}
}
function MostarCajaTexto4(){
if(frmDatos.cmbfax.checked){
frmDatos.txtfax.style.visibility='visible'
}else{
frmDatos.txtfax.style.visibility='hidden'
}
}
function MostarCajaTexto5(){
if(frmDatos.cmblocalidad.checked){
frmDatos.txtlocalidad.style.visibility='visible'
}else{
frmDatos.txtlocalidad.style.visibility='hidden'
}
}
function MostarCajaTexto6(){
if(frmDatos.cmbprovincia.checked){
frmDatos.txtprovincia.style.visibility='visible'
}else{
frmDatos.txtprovincia.style.visibility='hidden'
}
}
function MostarCajaTexto7(){
if(frmDatos.cmbpostal.checked){
frmDatos.txtpostal.style.visibility='visible'
}else{
frmDatos.txtpostal.style.visibility='hidden'
}
}
function MostarCajaTexto8(){
if(frmDatos.cmbpais.checked){
frmDatos.txtpais.style.visibility='visible'
}else{
frmDatos.txtpais.style.visibility='hidden'
}
}
function MostarCajaTexto9(){
if(frmDatos.cmbdireccion.checked){
frmDatos.via.style.visibility='visible'
frmDatos.txtdireccion.style.visibility='visible'
}else{
frmDatos.via.style.visibility='hidden'
frmDatos.txtdireccion.style.visibility='hidden'
}
}
function MostarCajaTexto10(){
if(frmDatos.cmbemail.checked){
frmDatos.txtemail.style.visibility='visible'
}else{
frmDatos.txtemail.style.visibility='hidden'
}
}
function MostarCajaTexto11(){
if(frmDatos.cmbweb.checked){
frmDatos.txtweb.style.visibility='visible'
}else{
frmDatos.txtweb.style.visibility='hidden'
}
}
function MostrarCajaTexto12(){
if(frmDatos.cmbweb.checked){
}else{
}
}
</SCRIPT>
<HEAD>
<BODY>
<H1>Formulario de Busqueda:</H1>
<FORM NAME=frmDatos>
<TABLE>
<TR><TD>CIF/NIF:</TD><TD>
<INPUT TYPE="CHECKBOX" name=cmbcif onclick="MostarCajaTexto1()">
<INPUT TYPE=text NAME=txtcif style="visibility:hidden" ><BR>
</TD></TR>
<TR><TD>NOMBRE:</TD><TD>
<INPUT TYPE="CHECKBOX" name=cmbnombre onclick="MostarCajaTexto2()">
<INPUT TYPE=text NAME=txtnombre style="visibility:hidden" ><BR>
</TD></TR>
<TR><TD>TELEFONO:</TD><TD>
<INPUT TYPE="CHECKBOX" name=cmbtelefono onclick="MostarCajaTexto3()">
<INPUT TYPE=text NAME=txttelefono style="visibility:hidden" ><BR>
</TD></TR>
<TR><TD>FAX:</TD><TD>
<INPUT TYPE="CHECKBOX" name=cmbfax onclick="MostarCajaTexto4()">
<INPUT TYPE=text NAME=txtfax style="visibility:hidden" >
</TD></TR>
<TR><TD>LOCALIDAD:</TD><TD>
<INPUT TYPE="CHECKBOX" name=cmblocalidad onclick="MostarCajaTexto5()">
<INPUT TYPE=text NAME=txtlocalidad style="visibility:hidden" >
</TD></TR>
<TR><TD>PROVINCIA:</TD><TD>
<INPUT TYPE="CHECKBOX" name=cmbprovincia onclick="MostarCajaTexto6()">
<INPUT TYPE=text NAME=txtprovincia style="visibility:hidden" >
</TD></TR>
<TR><TD>CODIGO POSTAL:</TD><TD>
<INPUT TYPE="CHECKBOX" name=cmbpostal onclick="MostarCajaTexto7()">
<INPUT TYPE=text NAME=txtpostal style="visibility:hidden" >
</TD></TR>
<TR><TD>PAIS:</TD><TD>
<INPUT TYPE="CHECKBOX" name=cmbpais onclick="MostarCajaTexto8()">
<INPUT TYPE=text NAME=txtpais style="visibility:hidden" >
</TD></TR>
<TR><TD>DIRECCION:</TD><TD>
<INPUT TYPE="CHECKBOX" name=cmbdireccion onclick="MostarCajaTexto9()">
<SELECT NAME="via" style="visibility:hidden">
<?php
printf("<OPTION VALUE=%s>%s</OPTION>",$now["codvia"],$now["via"]); }
?>
</SELECT>
<INPUT TYPE=text NAME=txtdireccion style="visibility:hidden" >
</TD></TR>
<TR><TD>EMAIL:</TD><TD>
<INPUT TYPE="CHECKBOX" name=cmbemail onclick="MostarCajaTexto10()">
<INPUT TYPE=text NAME=txtemail style="visibility:hidden" >
</TD></TR>
<TR><TD>WEB:</TD><TD>
<INPUT TYPE="CHECKBOX" name=cmbweb onclick="MostarCajaTexto11()">
<INPUT TYPE=text NAME=txtweb style="visibility:hidden" >
</TD></TR>
<TR><TD>CATEGORIAS:</TD><TD>
<INPUT TYPE="CHECKBOX" NAME=cmbcategoria onclick="MostrarCajaTexto12()">
</TD></TR>
<?php
$number=1;
$linea=0;
if($number>1){
printf("<TD><INPUT TYPE='CHECKBOX' NAME='check[%s]' value=%s onclick='pulsarsi(this)'><hide>%s</ hide></TD>",$number,$number,$now["categoria"]);
$linea++;
}else{
printf("<TD><INPUT TYPE='CHECKBOX' NAME='check[%s]' value=%s onclick='pulsarno(this)'><hide>%s</hide></TD>",$number,$number,$now["categoria"]); $linea++;
}
$number++;
if($linea==4){
$linea=0;
}
}
?>
<TR><TD>
<INPUT TYPE="BUTTON" NAME="llamar" VALUE="Buscar">
</TD></TR>
</TABLE>
</FORM>
</BODY>
</HTML>