|
<%
idCat = Request.Form("idCat")
DayEntr = Request.Form("DayEntr")
MonthEntr = Request.Form("MonthEntr")
YearEntr = Request.Form("YearEntr")
DateEntrSql = YearEntr & "-" & MonthEntr & "-" & DayEntr
DateEntr = YearEntr & "/" & MonthEntr & "/" & DayEntr
LieuEntr = Request.Form("LieuEntr")
HourEntr = Request.Form("HourEntr")
MinuteEntr = Request.Form("MinuteEntr")
HeureEntr = HourEntr & ":" & MinuteEntr & ":00"
HourEntrFin = Request.Form("HourEntrFin")
MinuteEntrFin = Request.Form("MinuteEntrFin")
HeureEntrFin = HourEntrFin & ":" & MinuteEntrFin & ":00"
Comment = Request.Form("Comment")
RepeterPoste = Request.Form("RepeterPoste")
While RepeterPoste > 0
set rsInsertEntr = Server.CreateObject("ADODB.Recordset")
sqlInsertEntr = "INSERT INTO entrainements_club (idCat, DateEntr, LieuEntr, HeureEntr, FinEntr, Comment)" & _
" VALUES (" & _
idCat & ", " & _
"'" & DateEntrSql & "', " & _
ToSQL(LieuEntr, "Text") & ", " & _
"'" & HeureEntr & "', " & _
"'" & HeureEntrFin & "', " & _
ToSQL(Comment, "Text") & ")"
Response.Write(sqlInsertEntr)
openrs rsInsertEntr, sqlInsertEntr
DateEntr = DateAdd("d",7,DateEntr)
DayEntr = Day(DateEntr)
MonthEntr = Month(DateEntr)
YearEntr = Year(DateEntr)
DateEntrSql = YearEntr & "-" & MonthEntr & "-" & DayEntr
RepeterPoste = RepeterPoste -1
Wend
Response.Redirect("entrainementsclub.asp?idCat=" & idCat)
%>
|