<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% CheckSecurity(1) DateIntervention = GetParam("DateInterv") SemRedirect = DatePart("ww",DateIntervention,2,3) ShowBeginDate = FormatDateTime(DateIntervention,2) If GetParam("ShowEndDate") = "" then ShowEndDate = ShowBeginDate else ShowEndDate = GetParam("ShowEndDate") end if IdEmpl = GetParam("IdEmpl") InitEmpl = CStr(DLookUp("employees", "Initiales", "IdEmpl =" & IdEmpl)) ErrorMessage = 0 ErrorMessage = GetParam("Mess") actionupdate = 0 BeginTimeHour_0 = 9 BeginTimeMinutes_0 = 0 EndTimeHour_0 = 12 EndTimeMinutes_0 = 0 BTH = 0 BTM = 0 ETH = 0 ETM = 0 BTH = GetParam("BTH") BTM = GetParam("BTM") If BTH = 0 AND BTM = 0 then BTH = 9 BTM = 0 End if ETH = GetParam("ETH") ETM = GetParam("ETM") If ETH = 0 AND ETM = 0 then ETH = 18 ETM = 0 End if CBNC = GetParam("CBNC") CBFD = "on" If ErrorMessage <> 0 then CBFD = GetParam("CBFD") end if Customer = GetParam("CustInt") CustomerList = GetParam("CustIntList") JobDescription = GetParam("JD") '''''''''''''''''''''''''' ' Ouverture table events ' '''''''''''''''''''''''''' Set rsChkEvent = server.CreateObject("ADODB.Recordset") sqlChkEvent = "SELECT rdlp.id, rdlp.idEmpl, rdlp.CustInt, year(rdlp.DateInt), week(rdlp.DateInt), rdlp.DateInt, rdlp.FullDay, rdlp.BeginTime, rdlp.EndTime, rdlp.idTypeEvent," & _ " rdlp.JobDescription, rdlp.TypeEventAgenda, te.TypeEvent, tp.TypePrestation, e.Initiales " & _ "FROM reldatelieupers_2 as rdlp " & _ "LEFT JOIN employees as e on rdlp.idEmpl=e.IdEmpl " & _ "LEFT JOIN typeevent as te on rdlp.idTypeEvent=te.idType " & _ "LEFT JOIN typeprestation as tp on rdlp.idTypePrestation=tp.idPrestation " & _ "WHERE rdlp.DateInt='" & DateIntervention & "' AND rdlp.idEmpl='" & IdEmpl & "'" & _ "ORDER BY rdlp.BeginTime,rdlp.EndTime Asc" 'Response.Write(sqlChkEvent) openrs rsChkEvent, sqlChkEvent '''''''''''''''''''''''''''''''''''''''' ' Mise en mémoire table clients agenda ' '''''''''''''''''''''''''''''''''''''''' Set rsCustIntList = server.CreateObject("ADODB.Recordset") sqlCustIntList = "select id, Customer from custint order by Customer ASC" openStaticRS rsCustIntList, sqlCustIntList %> <% DateTest = "03/04/2008" ' Response.Write("DateTest : " & DateTest & "
") DateTest = FormatDateTime(DateTest,2) ' Response.Write("DateTest : " & DateTest & "
") JourTest = Day(DateTest) ' Response.Write("JourTest : " & JourTest & "
") my_var_type = VarType(JourTest) ' Response.Write("my_var_type : " & my_var_type & "
") If JourTest = 3 then Session("Lg_Server") = "FR" %> <% elseif JourTest = 4 then Session("Lg_Server") = "EN" %> <% end if %> EB Agenda - Edit day <% '''''''''''''''''''''''' ' Lecture table events ' '''''''''''''''''''''''' If not rsChkEvent.eof then CountEvents = 0 While not rsChkEvent.eof CountEvents = CountEvents + 1 Set rsChkIdCustList = server.CreateObject("ADODB.Recordset") sqlChkIdCustList = "SELECT id FROM custint WHERE Customer = '" & rsChkEvent("CustInt") & "'" openrs rsChkIdCustList, sqlChkIdCustList If rsChkIdCustList.eof then CustomerList = 1 else While not rsChkIdCustList.eof CustomerList = rsChkIdCustList("id") rsChkIdCustList.movenext Wend End if rsChkIdCustList.close JobDescription = rsChkEvent("JobDescription") If rsChkEvent("FullDay") = 0 then CustInt = "

" & rsChkEvent("CustInt") & "

" CBFD = "off" CBFullDay = "" BTH = Hour(rsChkEvent("BeginTime")) BTM = Minute(rsChkEvent("BeginTime")) ETH = Hour(rsChkEvent("EndTime")) ETM = Minute(rsChkEvent("EndTime")) else CustInt = "

" & rsChkEvent("CustInt") & "

" CBFullDay = "" CBFD = "on" BTH = 0 BTM = 0 ETH = 24 ETM = 0 End if BeginTimeHour_0 = ETH BeginTimeMinutes_0 = ETM EndTimeHour_0 = BeginTimeHour_0 + 3 EndTimeMinutes_0 = BeginTimeMinutes_0 %> <% rsChkEvent.movenext Wend else CountEvents = 0 End if CustomerList = 1 %>

Edit day : <%=DateToHtml(ShowBeginDate)%> - <%=InitEmpl%>

<%=CustInt%> Full Day : <%=CBFullDay%>  Begin time :  " >  :    End time :   :   
<% If rsChkEvent("FullDay") = 1 then BeginTimeHour_0 = 9 BeginTimeMinutes_0 = 0 EndTimeHour_0 = 12 EndTimeMinutes_0 = 0 End if IdTypeEvent = rsChkEvent("TypeEventAgenda") Session("chkev3") = "" Session("chkev4") = "" Session("chkev5") = "" Session("chkev77") = "" Session("chkev99") = "" Session("chkev333") = "" typeEventFound = 0 For srchevnt = 2 to 334 If srchevnt = IdTypeEvent then Session("chkev" & srchevnt) = "checked='checked'" typeEventFound = 1 End if Next If typeEventFound = 0 then Session("chkev99") = "checked='checked'" End if %> >EB   >Hotline   >Home   >OFF   > " maxlength="255" size="30" id="text<%=CountEvents%>" required="required">
>   
<% Session("chkev3") = "" Session("chkev4") = "" Session("chkev5") = "" Session("chkev77") = "" Session("chkev99") = "" Session("chkev333") = "" %>

New Event

Full Day :   Begin time :   :    End time :   :   
EB   Hotline   Home   OFF  
  

    Save & Close