<% zone_geo = Request.Querystring("zone_geo") if zone_geo = "" then envoi_requete = false else envoi_requete = true end if if zone_geo = "toutes zones" then sql = "" end if if zone_geo = "aquitaine" then sql = " AND (departements LIKE '%"& "24" &"%' OR departements LIKE '%"& "33" &"%' OR departements LIKE '%"& "40" &"%' OR departements LIKE '%"& "47" &"%' OR departements LIKE '%"& "64" &"%') " end if if zone_geo = "auvergne" then sql = " AND (departements LIKE '%"& "03" &"%' OR departements LIKE '%"& "15" &"%' OR departements LIKE '%"& "43" &"%' OR departements LIKE '%"& "63" &"%') " end if if zone_geo = "guyane" then sql = " AND (departements LIKE '%"& "973" &"%') " end if if zone_geo = "iledefrance" then sql = " AND (departements LIKE '%"& "75" &"%' OR departements LIKE '%"& "77" &"%' OR departements LIKE '%"& "78" &"%' OR departements LIKE '%"& "91" &"%' OR departements LIKE '%"& "92" &"%' OR departements LIKE '%"& "93" &"%' OR departements LIKE '%"& "94" &"%' OR departements LIKE '%"& "95" &"%') AND (departements NOT LIKE '%"& "975" &"%' OR departements NOT LIKE '%"& "977" &"%' OR departements NOT LIKE '%"& "978" &"%') " end if if zone_geo = "paris" then sql = " AND (departements LIKE '%"& "75" &"%') AND (departements NOT LIKE '%"& "975" &"%') " end if if zone_geo = "seine-et-marne" then sql = " AND (departements LIKE '%"& "77" &"%') AND (departements NOT LIKE '%"& "977" &"%') " end if if zone_geo = "yvelines" then sql = " AND (departements LIKE '%"& "78" &"%') AND (departements NOT LIKE '%"& "978" &"%') " end if if zone_geo = "essonne" then sql = " AND (departements LIKE '%"& "91" &"%') " end if if zone_geo = "hauts-de-seine" then sql = " AND (departements LIKE '%"& "92" &"%') " end if if zone_geo = "seine-saint-denis" then sql = " AND (departements LIKE '%"& "93" &"%') " end if if zone_geo = "val-de-marne" then sql = " AND (departements LIKE '%"& "94" &"%') " end if if zone_geo = "val-doise" then sql = " AND (departements LIKE '%"& "95" &"%') " end if if zone_geo = "nordpasdecalais" then sql = " AND (departements LIKE '%"& "59" &"%' OR departements LIKE '%"& "62" &"%') " end if if zone_geo = "paca" then sql = " AND (departements LIKE '%"& "04" &"%' OR departements LIKE '%"& "05" &"%' OR departements LIKE '%"& "06" &"%' OR departements LIKE '%"& "13" &"%' OR departements LIKE '%"& "83" &"%' OR departements LIKE '%"& "84" &"%') " end if if zone_geo = "paysdelaloire" then sql = " AND (departements LIKE '%"& "44" &"%' OR departements LIKE '%"& "49" &"%' OR departements LIKE '%"& "53" &"%' OR departements LIKE '%"& "72" &"%' OR departements LIKE '%"& "85" &"%') AND (departements NOT LIKE '%"& "972" &"%')" end if if zone_geo = "picardie" then sql = " AND (departements LIKE '%"& "02" &"%' OR departements LIKE '%"& "60" &"%' OR departements LIKE '%"& "80" &"%') " end if if zone_geo = "rhonealpes" then sql = " AND (departements LIKE '%"& "01" &"%' OR departements LIKE '%"& "07" &"%' OR departements LIKE '%"& "26" &"%' OR departements LIKE '%"& "38" &"%' OR departements LIKE '%"& "42" &"%' OR departements LIKE '%"& "69" &"%' OR departements LIKE '%"& "73" &"%' OR departements LIKE '%"& "74" &"%') AND (departements NOT LIKE '%"& "973" &"%' OR departements NOT LIKE '%"& "974" &"%')" end if if zone_geo = "autres_regions" then sql = " AND (departements LIKE '%"& "67" &"%' OR departements LIKE '%"& "68" &"%' OR departements LIKE '%"& "14" &"%' OR departements LIKE '%"& "50" &"%' OR departements LIKE '%"& "61" &"%' OR departements LIKE '%"& "21" &"%' OR departements LIKE '%"& "58" &"%' OR departements LIKE '%"& "71" &"%' OR departements LIKE '%"& "89" &"%' OR departements LIKE '%"& "22" &"%' OR departements LIKE '%"& "29" &"%' OR departements LIKE '%"& "35" &"%' OR departements LIKE '%"& "56" &"%' OR departements LIKE '%"& "18" &"%' OR departements LIKE '%"& "28" &"%' OR departements LIKE '%"& "36" &"%' OR departements LIKE '%"& "37" &"%' OR departements LIKE '%"& "41" &"%' OR departements LIKE '%"& "45" &"%' OR departements LIKE '%"& "08" &"%' OR departements LIKE '%"& "10" &"%' OR departements LIKE '%"& "51" &"%' OR departements LIKE '%"& "52" &"%' OR departements LIKE '%"& "2A" &"%' OR departements LIKE '%"& "2B" &"%' OR departements LIKE '%"& "25" &"%' OR departements LIKE '%"& "39" &"%' OR departements LIKE '%"& "70" &"%' OR departements LIKE '%"& "90" &"%' OR departements LIKE '%"& "27" &"%' OR departements LIKE '%"& "76" &"%' OR departements LIKE '%"& "09" &"%' OR departements LIKE '%"& "12" &"%' OR departements LIKE '%"& "31" &"%' OR departements LIKE '%"& "32" &"%' OR departements LIKE '%"& "46" &"%' OR departements LIKE '%"& "65" &"%' OR departements LIKE '%"& "81" &"%' OR departements LIKE '%"& "82" &"%' OR departements LIKE '%"& "11" &"%' OR departements LIKE '%"& "30" &"%' OR departements LIKE '%"& "34" &"%' OR departements LIKE '%"& "48" &"%' OR departements LIKE '%"& "66" &"%' OR departements LIKE '%"& "19" &"%' OR departements LIKE '%"& "23" &"%' OR departements LIKE '%"& "87" &"%' OR departements LIKE '%"& "54" &"%' OR departements LIKE '%"& "55" &"%' OR departements LIKE '%"& "57" &"%' OR departements LIKE '%"& "88" &"%' OR departements LIKE '%"& "16" &"%' OR departements LIKE '%"& "17" &"%' OR departements LIKE '%"& "79" &"%' OR departements LIKE '%"& "86" &"%' OR departements LIKE '%"& "977" &"%' OR departements LIKE '%"& "978" &"%') " end if if zone_geo = "national" then sql = " AND (departements LIKE '%"& "action nationale" &"%') " end if if zone_geo = "dom" then sql = " AND (departements LIKE '%"& "971" &"%' OR departements LIKE '%"& "972" &"%' OR departements LIKE '%"& "973" &"%' OR departements LIKE '%"& "974" &"%' OR departements LIKE '%"& "975" &"%' OR departements LIKE '%"& "976" &"%' ) " end if type_action = Request.Querystring("type_action") if (envoi_requete = false AND type_action = "") then envoi_requete = false else envoi_requete = true end if if type_action = "tous types d'action" then sql = sql else sql = sql & " AND (type_action LIKE '%"& type_action &"%') " end if ladate = Request.Querystring("ladate") if (envoi_requete = false AND ladate = "") then envoi_requete = false else envoi_requete = true end if if ladate <> "" then lejour = Day(ladate) lemois = Month(ladate) lannee = Year(ladate) labonnedate = lemois & "/" & lejour & "/" & lannee sql = sql & " AND (date_debut = #"&labonnedate&"# OR (date_debut < #"&labonnedate&"# AND date_fin >= #"&labonnedate&"#))" end if organisateur = Request.Querystring("organisateur") if (envoi_requete = false AND organisateur = "") then envoi_requete = false else envoi_requete = true end if organisateur = Replace(organisateur,"'","''") if organisateur <> "" then organis = Replace(organisateur,"à","a") organis = Replace(organis,"â","a") organis = Replace(organis,"ä","a") organis = Replace(organis,"é","e") organis = Replace(organis,"è","e") organis = Replace(organis,"ê","e") organis = Replace(organis,"ë","e") organis = Replace(organis,"ù","u") organis = Replace(organis,"û","u") organis = Replace(organis,"ü","u") organis = Replace(organis,"î","i") organis = Replace(organis,"ï","i") organis = Replace(organis,"ô","o") organis = Replace(organis,"ö","o") organis = Replace(organis,"ç","c") organis = UCase(organis) sql = sql & " AND (organisateurs LIKE '%"& organis &"%')" end if conditions = Request.Querystring("conditions") if (envoi_requete = false AND conditions = "") then envoi_requete = false else envoi_requete = true end if if type_action = "toutes" then sql = sql else sql = sql & " AND (conditions LIKE '%"& conditions &"%') " end if motcle = Request.Querystring("motcle") if (envoi_requete = false AND motcle = "") then envoi_requete = false else envoi_requete = true end if motcle = Trim(motcle) motcle = Replace (motcle,"'","''") if motcle <> "" AND InStr(motcle," ") = 0 then sql = sql & " AND ((titre LIKE '%"& motcle &"%') OR (description LIKE '%"& motcle &"%') OR (organisateurs LIKE '%"& motcle &"%') OR (villes LIKE '%"& motcle &"%') OR (lieu LIKE '%"& motcle &"%') OR (type_action LIKE '%"& motcle &"%')) " end if if motcle <> "" AND InStr(motcle," ") > 0 then tabl_motcle = split(motcle," ",-1,1) for each tabl_motcleb in tabl_motcle sql = sql & " AND ((titre LIKE '%"& tabl_motcleb &"%') OR (description LIKE '%"& tabl_motcleb &"%') OR (organisateurs LIKE '%"& tabl_motcleb &"%') OR (villes LIKE '%"& tabl_motcleb &"%') OR (lieu LIKE '%"& tabl_motcleb &"%') OR (type_action LIKE '%"& tabl_motcleb &"%')) " next end if if envoi_requete = true then Set conn = Server.CreateObject("ADODB.Connection") conn.Open "1dec2010" requete = "SELECT * FROM manifestations WHERE (validation = true) " & sql & " ORDER BY date_debut, departements, villes;" 'response.write requete Set rs = Server.CreateObject ("ADODB.Recordset") rs.Open requete, conn, 3, 3 end if organisateur = Replace(organisateur,"''","'") motcle = Replace(motcle,"''","'") %>



1er décembre 2010:
agenda des actions et manifestations









date "> (JJ/MM/AAAA)


conditions de participation
>manifestation ouverte à tout public
>manifestation réservée


organisateur
">

recherche libre
">



<% if envoi_requete = true then %> <% response.write "nombre de manifestations: " & rs.RecordCount & "


" if rs.RecordCount < 1 then response.write "Relancez une recherche avec d'autres critères.



" else do while not rs.EOF %> <% response.write rs("date_debut").value %> <% if rs("date_fin").value <> rs("date_debut").value then response.write "-" & rs("date_fin").value end if %>
<% response.write rs("titre").value %>
département(s): <% response.write rs("departements").value %> <% if rs("villes").value <> "" then response.write " (" & Server.htmlEncode(rs("villes").value) & ")" end if %>
<% organisateurs = Server.htmlEncode(rs("organisateurs").value) organisateurs = Replace(organisateurs,chr(13)," / ")%> organisateur(s): <% response.write organisateurs %>
type(s) d'action: <% response.write Server.htmlEncode(rs("type_action").value) %> <% if rs("detail_action").value <> "" then response.write " (" & Server.htmlEncode(rs("detail_action").value) & ")" end if %>


<% rs.Movenext Loop end if end if%>


retour Journée mondiale de lutte contre le sida

<% if envoi_requete = true then rs.close set rs = nothing conn.close set conn = nothing end if %>