<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> Admin Volley-Ball Club Tihange - Huy

Mailing 09/09/2009 Prochain match
<% Today = Date() JourToday = day(Date()) MoisToday = Month(Date()) AnneeToday = Year(Date()) TodaySql = AnneeToday & "-" & MoisToday & "-" & JourToday NextWeek = DateAdd("d",5,Today) ' NextWeek = DateAdd("d",14,Today) JourNextWeek = Day(NextWeek) MoisNextWeek = Month(NextWeek) AnneeNextWeek = Year(NextWeek) NextWeekSql = AnneeNextWeek & "-" & MoisNextWeek & "-" & JourNextWeek Set rsChkMatch = Server.CreateObject("ADODB.Recordset") sqlChkMatch = "SELECT * from matchs where DateM BETWEEN '" & TodaySql & "' AND '" & NextWeekSql & "'" Openrs rsChkMatch, sqlChkMatch If rsChkMatch.eof then Response.Write("Pas de match
") else While not rsChkMatch.eof CatMatch = rsChkMatch("idCat") dateMatch = rsChkMatch("DateM") dayMatch = day(dateMatch) monthMatch = month(dateMatch) yearMatch = year(dateMatch) dateMatch = dayMatch & "/" & monthMatch & "/" & yearMatch 'Response.Write(rsChkMatch("DateM") & "
") Set rsJoueurs = Server.CreateObject("ADODB.Recordset") sqlJoueurs = "SELECT * FROM joueurs_club WHERE idCat=" & CatMatch & " OR idCat2=" & CatMatch openrs rsJoueurs, sqlJoueurs While not rsJoueurs.eof ContenuMail = "" _ & "" _ & "" _ & "Volley Tihange-Huy - match du " & dateMatch & " contre " & rsChkMatch("Adversaire") & "" _ & "" _ & "" _ & "Salut à tous,

" _ & "Voici le mail précédent le match afin de constituer l'équipe.

" _ & "Toutes les informations sont enregistrées en temps réel et sont donc disponibles pour tous.

" _ & "L'adresse générale du site est la suivante : " _ & "http://lainlain.homeftp.net/tihangehuy

" _ & "Vous recevrez un mail récapitulatif chaque fin de semaine.

" _ & "" _ & "Suivez ce lien afin d'enregistrer votre participation

" _ & "" _ & "Suivez ce lien afin de modifier vos coordonnées

" _ & "A bientôt sur le terrain, au bord ou à la buvette,

" _ & "Lainlain." _ & "" _ & "" Response.Write(ContenuMail & "
") Mail1 = "" Mail1 = rsJoueurs("Mail1") If Mail1 <> "" then If rsJoueurs("Mail2") <> "" then mailsendcc = rsJoueurs("Mail2") End if mailsubject = "Volley Tihange-Huy - match du " & dateMatch & " contre " & rsChkMatch("Adversaire") SendCDOEmail "mail.eurobrevets.be","tihangehuy@eurobrevets.be","eB.1963", mailsubject, ContenuMail,"tihangehuy@eurobrevets.be",Mail1,mailsendcc, 1, "HTML" end if 'Response.Write(rsJoueurs("Mail1") & ", " & rsJoueurs("Mail2") & "
") rsJoueurs.movenext ContenuMail = "" wend rsJoueurs.close set rsJoueurs = nothing rsChkMatch.movenext Wend end if rsChkMatch.close set rsChkMatch = nothing Response.Write("Succeed!") %>