<% Function ParseBody(strText) strText = Replace(strText, Chr(13), "
") ParseBody = strText End Function dim jjdeb Function Julien(strText) dim VY_A dim Jour if strText = " " then exit function JMA = strText JJ0 = Left(JMA, 2) 'JJO=Csng(JJ0) MM0 = Mid(JMA, 4, 2) AA0 = Mid(JMA, 7, 4) Y = AA0 m = MM0 VY_A = AA0 'Mois = MM0 Mois = Csng(MMO) jour = Cdbl(JJ0) If Mois <= 2 Then m = Mois + 12 Y = VY_A - 1 End If A = Fix(VY_A / 100) B = 2 - A + Fix(A / 4) jjdeb = Fix(365.25 * Y) + Fix(30.6001 * (m + 1)) + jour + 1720994.5 + B 'response.write jjdeb 'response.write saut2 End Function Function Kulien(strText) dim VY_A JMA = strText JJ0 = Left(JMA, 2)*2/2 MM0 = Mid(JMA, 4, 2)*2/2 AA0 = Mid(JMA, 7, 4)*2/2 Y = AA0 m = MM0 VY_A = AA0 Mois = MM0 jour = JJ0 If Mois <= 2 Then m = Mois + 12 Y = VY_A - 1 End If A = Fix(VY_A / 100) B = 2 - A + Fix(A / 4) jjdeb = Fix(365.25 * Y) + Fix(30.6001 * (m + 1)) + jour + 1720994.5 + B 'response.write jjdeb 'response.write saut2 End Function Const adOpenStatic = 3 Const adLockReadOnly = 1 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 TAB42 'dim TAB5 'dim TAB50 'dim TAB51 'dim TAB525 'dim TAB515 'dim TAB516 'dim TAB6 'dim TAB7 'dim TAB8 dim strText 'dim TABLIEN 'dim saut2 saut2="
" dim V_AN dim V_MOIS dim M_MONTH dim V_TEMP dim V_MOT V_TEMP= Request("D1") V_MOT=Ucase(V_TEMP) 'response.write V_MOT 'response.write saut2 if V_AN="" then V_AN=CStr(Year(Now)) TAB1="" TAB2="" TAB3="" TAB4= "" TAB42= "" TAB5="" TAB6= "" TAB7="
" TAB31="" TAB525="" TAB515="" TAB516="" TAB50="" TAB51="
" 'Const adOpenStatic = 3 'Const adLockReadOnly = 1 Set objConn = Server.CreateObject("ADODB.Connection") Set objRS = Server.CreateObject("ADODB.Recordset") strDSN = "DSN=equipyr" objConn.Open strDSN 'response.write V_MOT 'response.write saut2 strSQL = "SELECT * FROM bdbget01 order by DEPART asc" 'WHERE DESTINATIO LIKE '" & V_MOT & "' " '" & "Ucase('" & DESTINATIO & "')'" dim theDate theDate=Now dim V_J1 dim J_TODAY J_TODAY = day(theDate) dim M_TODAY M_TODAY = month(theDate) dim Y_TODAY Y_TODAY = year(theDate) if len(J_Today)=1 then J_Today= "0" & J_Today if len(M_Today)=1 then M_Today= "0" & M_Today theDate= J_TODAY & "/" & M_TODAY & "/" & Y_TODAY Julien(theDate) V_J1=jjdeb 'response.write strSQL 'response.write saut2 dim J1 dim J2 dim M1 dim M2 objRS.Open strSQL, objConn, adOpenStatic,adLockReadOnly vide= " " vide4= " -> " vide5= "       " vide6="" vide2= "/" dim drap drap=0 dim L_MOT L_MOT =len(V_MOT) dim lect dim L_DEST if L_MOT > 2 then Do Until objRS.EOF = True drap=0 if Ucase(objRS("LIEN").value)=V_MOT then drap=1 'L_DEST=len(objRS("DESTINATIO").Value) 'for x=1 to L_DEST 'lect=mid(objRS("DESTINATIO").Value, x, L_MOT) 'if ucase(lect)=v_MOT then drap=1 ' next if drap=1 then 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 strText= J1 & "/" & M1 & "/" & objRS("annee").Value kulien(strText) Y=jjdeb - V_J1 if Y >0 then 'response.write Y 'response.write saut2 total=total+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 & "/" & objRS("annee").Value & TAB42 & 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 & strBody5 & strBody4 & strBody6 & strBody17 response.write strBody18 end if end if objRS.Movenext 'if compt=5 then exit Do 'end if Loop end if objRS.close if L_MOT > 2 then if total>1 then response.write total & " randonnées" if total=1 then response.write total & " randonnée" if total=0 then response.write "Pas de randonnées aux dates demandées" end if if L_MOT < 2 then response.write " En attente" %>