<%
idMatch = CInt(Request.QueryString("IDM"))
idCat = CInt(Request.QueryString("idCat"))
'varidmatch = vartype(idMatch)
IDJoueur = CInt(Request.QueryString("IDJ"))
IDJ = Request.QueryString("IDJ")
RepMatch = CInt(Request.QueryString("RepMatch"))
'Response.Write("Match :" & RepMatch & "(" & varidmatch & ") ")
Set rsMatch = Server.CreateObject("ADODB.Recordset")
sqlMatch = "SELECT * FROM Matchs WHERE id=" & idMatch
openrs rsMatch, sqlMatch
While not rsMatch.eof
deplacement = CInt(rsMatch("Depl"))
Resto = CInt(rsMatch("Resto"))
Coupe = CInt(rsMatch("Coupe"))
rsMatch.movenext
Wend
rsMatch.close
set rsMatch = nothing
If deplacement = 1 then
RepRdv = CInt(Request.QueryString("RepRdv"))
end if
If Resto = 1 then
RepResto = CInt(Request.QueryString("RepResto"))
RepRestoNb = CInt(Request.QueryString("RepRestoNb"))
end if
If Coupe = 0 then
RepReserve = CInt(Request.QueryString("RepReserve"))
End if
RepCommentaire = Request.QueryString("RepCommentaire")
Set rsUpdtRelMJ = Server.CreateObject("ADODB.Recordset")
sqlUpdtRelMJ = "INSERT INTO relmatchjoueur_club ("
sqlUpdtRelMJTables = "IdM,IdJ,Matchs,idCat,"
sqlUpdtRelMJValues = ToSQL(idMatch, "Number") & ", " & _
ToSQL(IDJoueur, "Number") & ", " & _
ToSQL(RepMatch, "Number") & ", " & _
ToSQL(idCat, "Number") & ", "
If Coupe = 0 then
sqlUpdtRelMJTables = sqlUpdtRelMJTables & "Reserves,"
sqlUpdtRelMJValues = sqlUpdtRelMJValues & ToSQL(RepReserve, "Number") & ", "
end if
If deplacement = 1 then
sqlUpdtRelMJTables = sqlUpdtRelMJTables & "Rdv,"
sqlUpdtRelMJValues = sqlUpdtRelMJValues & ToSQL(RepRdv, "Number") & ", "
end if
If Resto = 1 then
sqlUpdtRelMJTables = sqlUpdtRelMJTables & "Resto,RestoNb,"
sqlUpdtRelMJValues = sqlUpdtRelMJValues & ToSQL(RepResto, "Number") & ", " & ToSQL(RepRestoNb, "Number") & ", "
End if
sqlUpdtRelMJTables = sqlUpdtRelMJTables & "Commentaire"
sqlUpdtRelMJValues = sqlUpdtRelMJValues & ToSQL(RepCommentaire, "Text")
sqlUpdtRelMJ = sqlUpdtRelMJ & sqlUpdtRelMJTables & ") VALUES (" & sqlUpdtRelMJValues & ")"
openrs rsUpdtRelMJ, sqlUpdtRelMJ
Response.Write(" Succeed !!!")
If Request.QueryString("location") = "guest" then
Set rsTraceJ = Server.CreateObject("ADODB.Recordset")
LastMovDay = Day(Date())
LastMovMonth = Month(Date())
LastMovYear = Year(Date())
LastMovSql = LastMovYear & "-" & LastMovMonth & "-" & LastMovDay
sqlTraceJ = "UPDATE joueurs_club SET LastMov='" & LastMovSql & "' WHERE Id=" & IDJ
openrs rsTraceJ, sqlTraceJ
Response.Redirect("agendaclub.asp?idMatch=" & idMatch & "&idCat=" & idCat)
else
Response.Redirect("agendaclubadmin.asp?idMatch=" & idMatch & "&idCat=" & idCat)
end if
%>
|