<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% CheckSecurity(1) IDInt = GetParam("idInt") %> Delete Event <% Response.Write(IDInt) ' SemRedirect = GetParam("SemRedirect") ' ' Set rs_curr_int = Server.CreateObject("ADODB.Recordset") ' sql_curr_int = "SELECT * FROM reldatelieupers_2 WHERE id=" & IDInt ' openrs rs_curr_int, sql_curr_int ' while not rs_curr_int.eof ' CustInt = rs_curr_int("CustInt") ' idEmpl = rs_curr_int("idEmpl") ' FlagDebut = rs_curr_int("FlagDebut") ' FlagFin = rs_curr_int("FlagFin") ' rs_curr_int.movenext ' wend ' rs_curr_int.close ' set rs_curr_int = nothing ' If CStr(FlagDebut) = CStr(FlagFin) then ' Set rs1 = Server.CreateObject("ADODB.Recordset") ' sSQL = "delete from reldatelieupers_2 where id=" & IDInt & "" ' openrs rs1, sSQL ' else ' dayFlagDebut = day(FlagDebut) ' If dayFlagDebut < 10 then ' dayFlagDebut = "0" & dayFlagDebut ' end if ' monthFlagDebut = month(FlagDebut) ' If monthFlagDebut < 10 then ' monthFlagDebut = "0" & monthFlagDebut ' end if ' yearFlagDebut = year(FlagDebut) ' FlagDebut = yearFlagDebut & "-" & monthFlagDebut & "-" & dayFlagDebut ' ' dayFlagFin = day(FlagFin) ' If dayFlagFin < 10 then ' dayFlagFin = "0" & dayFlagFin ' end if ' monthFlagFin = month(FlagFin) ' If monthFlagFin < 10 then ' monthFlagFin = "0" & monthFlagFin ' end if ' yearFlagFin = year(FlagFin) ' FlagFin = yearFlagFin & "-" & monthFlagFin & "-" & dayFlagFin ' Set rs_list_event = Server.CreateObject("ADODB.Recordset") ' sql_list_event = "SELECT * FROM reldatelieupers_2 where CustInt='" & CustInt & "' AND idEmpl=" & idEmpl & " AND FlagDebut='" & FlagDebut & "' AND FlagFin='" & FlagFin & "'" ' openrs rs_list_event, sql_list_event ' While not rs_list_event.eof ' id_rs_list_event = rs_list_event("id") ' Set rs1 = Server.CreateObject("ADODB.Recordset") ' sSQL = "delete from reldatelieupers_2 where id=" & id_rs_list_event & "" ' openrs rs1, sSQL ' rs_list_event.movenext ' wend ' rs_list_event.close ' set rs_list_event = nothing ' end if ' Response.Redirect("EBAgenda.asp?Semaine=" & SemRedirect & "") %>