<%
Function ParseBody(strText)
strText = Replace(strText, Chr(13), "")
ParseBody = strText
End Function
Dim myConnString
Dim myConnection
Dim mySQL
Dim objRS
Dim strBody
Dim strBody1
Dim strBody2
Dim strBody3
Dim strBody4
Dim strBody5
Dim strBody6
Dim strBody7
Dim strBody8
Dim strBody9
Dim strBody10
Dim strBody11
Dim strBody12
Dim strBody13
Dim strBody14
Dim strBody15
Dim strBody16
Dim strBody17
Dim strBody18
Dim total
dim xurl
dim compt
dim deb
dim fin
dim objConn
dim TAB1
dim TAB2
dim TAB3
dim TAB31
dim TAB4
dim TAB5
dim TAB50
dim TAB51
dim TAB525
dim TAB515
dim TAB516
dim TAB6
dim TAB7
dim TAB8
dim TABLIEN
dim V_AN
dim V_MOIS
V_AN="2005"
V_MOIS=4
TAB1=""
TAB2=""
TAB3=""
TAB31=" | "
TAB4= " | "
TAB5=""
TAB525=" | "
TAB515=" | "
TAB516=" | "
TAB50=" | "
TAB51=" | "
TAB6= "
"
TAB7="
"
Const adOpenStatic = 3
Const adLockReadOnly = 1
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
strDSN = "DSN=equipyr"
objConn.Open strDSN
strSQL = "SELECT * FROM BDBGET01 ORDER BY JDEP ASC"
objRS.Open strSQL, objConn, adOpenStatic,adLockReadOnly
dim saut2
saut2="
"
theDate=Now
dim M_TODAY
M_TODAY = month(theDate)
Do Until objRS.EOF = True
if objRS("annee").Value=V_AN and objRS("MDEP").Value=V_MOIS and objRS("PAYS").Value<>"Autre" then total=total+1
objRS.Movenext
loop
objRS.close
dim E_MOIS
E_MOIS="Avril"
response.write " Les randonnées en " & E_MOIS & " " & V_AN & " :"
response.write saut2
dim J1
dim J2
dim M1
dim M2
objRS.Open strSQL, objConn, adOpenStatic,adLockReadOnly
vide= " "
vide4= " -> "
vide5= " "
vide6=""
vide2= "/"
Do Until objRS.EOF = True
if objRS("annee").Value=V_AN and objRS("MDEP").Value=V_MOIS and objRS("PAYS").Value<>"Autre" then
compt=compt+1
J1=objRS("JDEP").Value
J2=len(J1)
if J2<2 then J1="0" & J1
M1=objRS("MDEP").Value
M2=len(M1)
if M2<2 then M1="0" & M1
strBody1= TAB1 & TAB2 & TAB3 & J1 & "/" & M1 & TAB31
J1=objRS("JARIV").Value
J2=len(J1)
if J2<2 then J1="0" & J1
M1=objRS("MARIV").Value
M2=len(M1)
if M2<2 then M1="0" & M1
strBody2= TAB4 & TAB5 & J1 & "/" & M1 & TAB51
strBody3= TAB50 & "... " & objRS("CALCULS").Value & " jours" & TAB51
strBody4= TAB525 & objRS("Nom").Value & TAB51
strBody5= TAB525 & objRS("DESTINATIO").Value & TAB51
TABLIEN = "" & "En savoir plus" & ""
strBody6= TAB516 & TABLIEN & TAB51
strBody7= TAB515 & objRS("etranger").Value & TAB51
strBody17= TAB6 & TAB7
strBody18=strBody1 & strBody2 & strBody3 & strBody4 & strBody5 & strBody6 & strBody7 & strBody17
response.write strBody18
end if
objRS.Movenext
Loop
if total>0 then response.write total & " randonnées"
if total=0 then response.write "Pas de randonnées aux dates demandées"
objRS.close
%>