<% Maire=request.form("C1") Coll=request.form("C2") If Maire = "Nom des Maires" then If Coll = "Nom des Collectivités" then Response.Redirect "elus.asp" else Sqlq="select * from COLLECTIVITES where NomCollect='"&Coll&"'" end if else Sqlq="select * from COLLECTIVITES where NomResp='"&Maire&"' " end if set fp_rs = Server.CreateObject("ADODB.Recordset") fp_rs.Open Sqlq, "DSN=amf82" if fp_rs.EOF then Response.Write(Cstr(Coll)) if fp_rs.EOF then Response.Redirect "elus.asp" %> Les Resultats de votre Sélection

marianne.gif (3732 octets)

 

. <%if NOT IsNull(fp_rs("NOMRESP")) AND (fp_rs("QUALRESP")="1") then %>
Maire

<% end if if NOT IsNull(fp_rs("NOMRESP")) AND (fp_rs("QUALRESP")<>"1") then %>
Président

<% end if if Not IsNull(fp_rs("NOMRESP")) AND (fp_rs("PREFRESP")="1") then %>
Mme <%=CStr(fp_rs("NOMRESP"))%>
<% end if if Not IsNull(fp_rs("NOMRESP")) AND (fp_rs("PREFRESP")="2") then %>
Mr <%=CStr(fp_rs("NOMRESP"))%>
<% end if if Not IsNull(fp_rs("NOMRESP")) AND (fp_rs("PREFRESP")="3") then %>
Mlle <%=CStr(fp_rs("NOMRESP"))%>
<% end if path="\htdocs\images\photos_maires\" Nom=fp_Rs("NomHtml") If Not IsNull(Nom) then Photo=Replace(CStr(Nom)," ","_") Set FileObject = Server.CreateObject("Scripting.FileSystemObject") pathf = path&Photo&".jpg" PathFichPhoto = Server.MapPath(pathf) If FileObject.FileExists(PathFichPhoto) then img="../images/photos_maires/"&Photo&".jpg" If Not FileObject.FileExists(PathFichPhoto) then img="../images/photos_maires/maria.jpg" %>

<% if NOT IsNull(fp_rs("NOMCOLLECT")) then %>

<%=CStr(fp_rs("NomCollect"))%><% if NOT IsNull(fp_rs("Telephone")) then %>

Téléphone: <% end if if NOT IsNull(fp_rs("Telephone")) then%> <%=CStr(fp_rs("Telephone"))%>

<% end if if NOT IsNull(fp_rs("Fax")) then %>

Télécopie: <% end if if NOT IsNull(fp_rs("Fax")) then%> <%=CStr(fp_rs("Fax"))%>

<% end if htm=fp_rs("LienHt1") file=Replace(CStr(htm)," ","_") Set FileObject = Server.CreateObject("Scripting.FileSystemObject") PathFichhtm = Server.MapPath(file) if FileObject.FileExists(PathFichhtm) then%>

" target="_top">Site Internet

<% end if if NOT IsNull(fp_rs("MAIL")) then%>

"><%=CStr(fp_rs("MAIL"))%> <%end if%>

<%=CStr(fp_rs("COMMENTAIRE"))%>

Autre sélection

<% end if fp_rs.Close %>