<%'abrir conexion dim cn set cn=server.CreateObject("adodb.connection") cn.open conecta dim com com= Request.QueryString("comunidades") if com="" then com=0 end if dim pro pro= Request.QueryString("Provincias") if pro="" then pro=0 end if 'Response.Write "-" & com & "---" & pro %>


Búsqueda

Seleccióne una "Comunidad Autónoma" o una "Provincia" para ver los asociados disponibles o pulse sobre una letra para ver los asociados que empiezan con esa letra:

Comunidades: <% if com=0 then selC=" selected " end if %> Provincias: <% if pro=0 then selP=" selected " end if %>
A B C D E F G H I J K L M N Ñ O P Q R S T U V W X Y Z
Listado de asociados

<% if Request.QueryString("letra") ="" then if com="0" and pro="0" then sqlP1="select * from provincias order by nombre" end if if com="0" and pro<>"0" then sqlP1="select * from provincias where id=" & pro & " order by nombre" end if if com<>"0" and pro="0" then sqlP1="select * from provincias where CodComunidad=" & com & " order by nombre" end if if com<>"0" and pro<>"0" then sqlP1="select * from provincias where CodComunidad=" & com & " and id=" & pro & " order by nombre" end if end if 'Response.Write "" & sqlp1 & "
" %>

<% if Request.QueryString("letra") ="" then dim i i=-1 dim rsp1 set rsp1=cn.Execute(sqlP1) while not rsp1.eof i=(i+1) mod 2 if i=0 then Response.Write "" end if %> <% if i=2 then Response.Write "" end if rsp1.movenext wend else if Request.QueryString("letra") ="" then sqlT="select id,nombre,direccion, poblacion from tiendas where provincia=" & rsp1("id") & " order by nombre" else sqlT="select id,nombre,direccion, poblacion from tiendas where nombre like '" & Request.QueryString("letra") & "%' order by nombre" end if 'Response.Write sqlT set rsT=cn.Execute(sqlT) %>
<%=rsp1("nombre")%>
<% dim sqlT if Request.QueryString("letra") ="" then sqlT="select id,nombre,direccion, poblacion from tiendas where provincia=" & rsp1("id") & " order by nombre" else sqlT="select id,nombre,direccion, poblacion from tiendas where nombre like '" & Request.QueryString("letra") & "%' order by nombre" end if 'Response.Write sqlT dim rsT set rsT=cn.Execute(sqlT) %> <% if rst.eof then %><% end if while not rsT.eof %> <% rst.movenext wend %>
.No existen asociados en esta provincia
.<%=rst("Nombre")%> <%=rst("direccion")%>   <%=rst("poblacion")%> ','Detalle','width=400,height=400,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes');" > [ Ver ]
<% if rst.eof then %><% end if while not rsT.eof %> <% rst.movenext wend %>
.No existen asociados en la letra <%=Request.QueryString("Letra")%>
.<%=rst("Nombre")%> <%=rst("direccion")%>   <%=rst("poblacion")%> ','Detalle','width=400,height=400,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes');" > [ Ver ]
<% end if %>