<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> Volley-Ball Club Tihange - Huy <% CatMatch = Request.QueryString("idCat") NameCat = DLookUp("Categorie", "NomCat", "id=" & CatMatch) If Request.QueryString("idMatch") = "" then Set rsChkMatchCat = Server.CreateObject("ADODB.Recordset") sqlChkMatchCat = "SELECT * FROM Matchs WHERE idCat=" & CatMatch & " ORDER BY DateM Desc" openrs rsChkMatchCat, sqlChkMatchCat If rsChkMatchCat.eof then ChkMatch = 0 else ChkMatch = 1 While not rsChkMatchCat.eof NextMatch = rsChkMatchCat("id") rsChkMatchCat.movenext Wend End if rsChkMatchCat.close set rsChkMatchCat = nothing tosqlYear = year(date()) tosqlmonth = month(date()) tosqlday = day(date()) tosqldate = tosqlYear & "-" & tosqlmonth & "-" & tosqlday Set rsNextMatch = Server.CreateObject("ADODB.Recordset") sqlNextMatch = "SELECT * FROM Matchs WHERE DateM >= '" & tosqldate & "' AND idCat=" & CatMatch & " ORDER BY DateM Desc" openrs rsNextMatch, sqlNextMatch While not rsNextMatch.eof NextMatch = rsNextMatch("id") rsNextMatch.movenext Wend idMatch = NextMatch rsNextMatch.close set rsNextMatch = nothing else idMatch = Request.QueryString("idMatch") ChkMatch = 1 end if If ChkMatch = 1 then Set rsMatch = Server.CreateObject("ADODB.Recordset") sqlMatch = "SELECT * FROM Matchs WHERE id=" & idMatch openrs rsMatch, sqlMatch While not rsMatch.eof dateMatch = rsMatch("DateM") dayMatch = day(dateMatch) monthMatch = Month(dateMatch) yearMatch = Year(dateMatch) nbDayMatch = Weekday(dateMatch,2) jourMatch = DLookUp("jours_semaine", "dayFr", "id=" & nbDayMatch) dateMatch = dayMatch & "/" & monthMatch & "/" & yearMatch adversaire = rsMatch("Adversaire") deplacement = rsMatch("Depl") HeureRDV = Hour(rsMatch("RDV")) If HeureRDV < 10 then HeureRDV = "0" & HeureRDV end if MinuteRDV = Minute(rsMatch("RDV")) If MinuteRDV < 10 then MinuteRDV = "0" & MinuteRDV end if RDV = HeureRDV & "h" & MinuteRDV LieuRDV = rsMatch("LieuRDV") HeureReserve = Hour(rsMatch("Reserve")) If HeureReserve < 10 then HeureReserve = "0" & HeureReserve end if MinuteReserve = Minute(rsMatch("Reserve")) If MinuteReserve < 10 then MinuteReserve = "0" & MinuteReserve end if matchReserve = HeureReserve & "h" & MinuteReserve HeurePremiere = Hour(rsMatch("Premiere")) If HeurePremiere < 10 then HeurePremiere = "0" & HeurePremiere end if MinutePremiere = Minute(rsMatch("Premiere")) If MinutePremiere < 10 then MinutePremiere = "0" & MinutePremiere end if matchPremiere = HeurePremiere & "h" & MinutePremiere coatch = rsMatch("Coatch") LieuMatch = rsMatch("Lieu") GoogleMap = rsMatch("GoogleMap") Resto = rsMatch("Resto") restoName = rsMatch("RestoName") If isnull(rsMatch("AlertMessage")) OR rsMatch("AlertMessage") = "" then AlertChk = 0 else AlertChk = 1 AlertMessage = rsMatch("AlertMessage") end if StreetMatch = rsMatch("Street") CityMatch = rsMatch("City") FeuilleMatch = rsMatch("FeuilleMatch") Coupe = rsMatch("Coupe") rsMatch.movenext Wend rsMatch.close set rsMatch = nothing ChkComment = 0 set rsChkComment = Server.CreateObject("ADODB.Recordset") sqlChkComment = "SELECT * FROM relmatchjoueur_club WHERE IdM=" & idMatch openrs rsChkComment, sqlChkComment While not rsChkComment.eof If rsChkComment("Commentaire") <> "" then ChkComment = 1 end if rsChkComment.movenext Wend rsChkComment.close set rsChkComment = nothing end if %>

<% Set rsListCatClub = Server.CreateObject("ADODB.Recordset") sqlListCatClub = "SELECT * FROM categorie WHERE desactive=0 AND joueurs=1 ORDER BY NomCat" openrs rsListCatClub, sqlListCatClub While not rsListCatClub.eof Response.Write("" & rsListCatClub("NomCat") & "") rsListCatClub.movenext If not rsListCatClub.eof then Response.Write(" - ") end if Wend rsListCatClub.close set rsListCatClub = nothing %>

<% If ChkMatch = 0 then %>

Dates pas encore reçues

<% else If AlertChk = 1 then Response.Write("

" & AlertMessage & "

") end if If deplacement = 2 then Response.Write("

Match du " & jourMatch & " " & dateMatch & " contre " & adversaire & "

") Response.Write("

A " & LieuMatch & "

") else Response.Write("

Match du " & jourMatch & " " & dateMatch & " contre " & adversaire & "

") Response.Write("

A " & LieuMatch) If StreetMatch <> "" then %>  - <%=StreetMatch%> <% End if If CityMatch <> "" then %>  - <%=CityMatch%> <% End if If GoogleMap <> "" then %>  - Voir le plan <% end if Response.Write("

") end if If LieuRDV <> "" OR LieuRDV <> empty then Response.Write("

Lieu Rendez-Vous : " & LieuRDV & "

") End if If FeuilleMatch <> "" then Response.Write("

Feuille match : " & FeuilleMatch & "

") end if If Coupe = 1 then Response.Write("

Match de coupe, pas de match réserve !!!

") end if If Session("UserRights") = 3 then Response.Write("

") Response.Write("Modifier les données du match") Response.Write(" / Supprimer match

") end if %> <% If deplacement = 1 then %> <% end if If Coupe = 0 then %> <% end if %> <% If Resto = 1 then %> <% end if If ChkComment = 1 then %> <% end if %> <% TotalReserve = 0 TotalPremiere = 0 TotalRdv = 0 TotalResto = 0 TotalRestoNb = 0 Set rsJoueurs = Server.CreateObject("ADODB.Recordset") sqlJoueurs = "SELECT * FROM Joueurs_club WHERE (idCat=" & CatMatch & " OR idCat2=" & CatMatch & ") AND desactive=0 ORDER BY Nom, Prenom Asc" openrs rsJoueurs, sqlJoueurs While not rsJoueurs.eof RelCommentaire = "" IDJoueur = rsJoueurs("id") If CLng(Session("UserID")) = CLng(IDJoueur) then NomPrenom = "" & rsJoueurs("Nom") & " " & rsJoueurs("Prenom") & "" else NomPrenom = rsJoueurs("Nom") & " " & rsJoueurs("Prenom") end if If Session("UserRights") = 3 then NomPrenom = "" & rsJoueurs("Nom") & " " & rsJoueurs("Prenom") & "" End if Set rsRelJM = Server.CreateObject("ADODB.Recordset") sqlRelJM = "SELECT * FROM relmatchjoueur_club WHERE idCat=" & CatMatch & " AND IdM = " & idMatch & " AND IdJ = " & IDJoueur & "" openrs rsRelJM, sqlRelJM while not rsRelJM.eof RelReserve = rsRelJM("Reserves") RelMatch = rsRelJM("Matchs") RelRdv = rsRelJM("Rdv") RelResto = rsRelJM("Resto") RelRestoNb = rsRelJM("RestoNb") RelCommentaire = rsRelJM("Commentaire") rsRelJM.movenext wend rsRelJM.close If RelRestoNb = "" then RelRestoNb = "???" end if If RelReserve = 1 OR RelReserve = 2 OR RelReserve = 3 then If RelReserve = 1 then RelJReserve = "" TotalReserve = TotalReserve + 1 end if If RelReserve = 2 then RelJReserve = "" end if If RelReserve = 3 then RelJReserve = "" end if else RelJReserve = "" end if If RelMatch = 1 OR RelMatch = 2 OR RelMatch = 3 then If RelMatch = 1 then RelJMatch = "" TotalPremiere = TotalPremiere + 1 end if If RelMatch = 2 then RelJMatch = "" end if If RelMatch = 3 then RelJMatch = "" end if else RelJMatch = "" end if If deplacement = 1 then If RelRdv = 1 OR RelRdv = 2 OR RelRdv = 3 then If RelRdv = 1 then RelJRdv = "" TotalRdv = TotalRdv + 1 end if If RelRdv = 2 then RelJRdv = "" end if If RelRdv = 3 then RelJRdv = "" end if else RelJRdv = "" end if end if If Resto = 1 then If RelResto = 1 OR RelResto = 2 OR RelResto = 3 then If RelResto = 1 then RelJResto = "" TotalResto = TotalResto + 1 RelJRestoNb = RelRestoNb TotalRestoNb = TotalRestoNb + RelRestoNb end if If RelResto = 2 then RelJResto = "" RelJRestoNb = 0 end if If RelResto = 3 then RelJResto = "" RelJRestoNb = 0 end if else RelJResto = "" RelJRestoNb = "???" end if end if If Isnull(RelCommentaire) OR RelCommentaire = "" then RelCommentaire = " " end if %> <% If deplacement = 1 then %> <%=RelJRdv%> <% end if If Coupe = 0 then %> <%=RelJReserve%> <% end if %> <%=RelJMatch%> <% If Resto = 1 then %> <%=RelJResto%> <% end if If ChkComment = 1 then %> <% End if %> <% rsJoueurs.movenext RelReserve = 0 RelMatch = 0 RelRdv = 0 RelResto = 0 RelRestoNb = 0 wend rsJoueurs.close set rsJoueurs = nothing If TotalReserve <> 0 OR TotalPremiere <> 0 OR TotalRdv <> 0 OR TotalResto <> 0 OR TotalRestoNb <> 0 then %> <% If deplacement = 1 then %> <% end if If Coupe = 0 then %> <% end if %> <% If Resto = 1 then %> <% end if If ChkComment = 1 then %> <% End if %> <% End if %>
JoueurRDV
<%=RDV%>
Réserve
<%=matchReserve%>
1ère
<%=matchPremiere%>
<%=restoName%> Pers.Commentaire
ouinonbô ????ouinonbô ????ouinonbô ????ouinonbô ????
<%=NomPrenom%><%=RelJRestoNb%><%=RelCommentaire%>
Total :<%=TotalRdv%><%=TotalReserve%><%=TotalPremiere%><%=TotalResto%> <%=TotalRestoNb%> 
<% end if %>