")
If Currsem = thisnumerosemaine and year(Date()) = year(currentlundi) then
Response.Write("")
else
Response.Write("")
end if
Response.Write(" | ")
''''''''''''''''''''''''''''''''''''''''''''''
' Boucle d'affichage des jours de la semaine '
''''''''''''''''''''''''''''''''''''''''''''''
For wd = 0 to 6
tmpmonth = month(firstlundi)
tmpday = day(firstlundi)
tmpyear = year(firstlundi)
currentday = Dateserial(tmpyear,tmpmonth,tmpday+wd)
dayname = WeekdayName(Weekday(currentday))
currentday = DateToHtml(currentday)
If currentday = TodayBE then
Response.Write("" & dayname & " " & currentday & " | ")
else
Response.Write("" & dayname & " " & currentday & " | ")
end if
next
Response.Write(" ")
IDEmployee = 0
ChangeColor = 0
InitEmployee = ""
openrs rsidEmpl, "select IdEmpl, Initiales from employees where DisableEmpl=0 order by 2"
while not rsidEmpl.EOF
ChangeColor = ChangeColor + 1
If Round(ChangeColor/2) = ChangeColor/2 then
trcolor = "CCCCCC"
else
trcolor = "99CCFF"
end if
IDEmployee = GetValue(rsidEmpl, 0)
InitEmployee = GetValue(rsidEmpl, 1)
rsidEmpl.MoveNext
If Session("Empl" & IDEmployee) = "on" and IDEmployee <> 0 then
Response.Write("" & InitEmployee & " | ")
For wd = 0 to 6
tmpmonth = month(firstlundi)
tmpday = day(firstlundi)
tmpyear = year(firstlundi)
currentday = Dateserial(tmpyear,tmpmonth,tmpday+wd)
tosqlmonth = month(currentday)
tosqlday = day(currentday)
tosqlyear = year(currentday)
tosqldate = tosqlyear & "-" & tosqlmonth & "-" & tosqlday
ShowToday = ""
If tosqldate = TodayBEsql then
ShowToday = " bordercolor='#0000FF' bgcolor='#CCFFFF'"
End if
Response.Write("")
ClientFull = ""
AddEvent = "Add Event"
If wd = 5 or wd=6 then
AddEvent = "W-E"
end if
Set rs_search_event = server.CreateObject("ADODB.Recordset")
sql_search_event = "SELECT * FROM reldatelieupers_2 WHERE DateInt='" & tosqldate & "' AND (idEmpl=" & IDEmployee & " OR idEmpl=0) ORDER BY BeginTime Asc"
openrs rs_search_event, sql_search_event
If not rs_search_event.eof then
while not rs_search_event.eof
If rs_search_event("FullDay") = 1 then
ClientFull = rs_search_event("CustInt")
idFull = rs_search_event("id")
Response.Write("" & ClientFull & "")
else
EventBeginTime = rs_search_event("BeginTime")
EventEndTime = rs_search_event("EndTime")
EventBeginHour = Hour(EventBeginTime)
If EventBeginHour < 10 then
EventBeginHour = "0" & EventBeginHour
end if
EventBeginMinute = Minute(EventBeginTime)
If EventBeginMinute < 10 then
EventBeginMinute = "0" & EventBeginMinute
end if
EventBeginHour = EventBeginHour & ":" & EventBeginMinute
EventEndHour = Hour(EventEndTime)
If EventEndHour < 10 then
EventEndHour = "0" & EventEndHour
end if
EventEndMinute = Minute(EventEndTime)
If EventEndMinute < 10 then
EventEndMinute = "0" & EventEndMinute
end if
EventEndHour = EventEndHour & ":" & EventEndMinute
If EventEndHour = "23:59" then
EventEndHour = "24:00"
end if
ClientFull = rs_search_event("CustInt")
idFull = rs_search_event("id")
Response.Write("" & _
EventBeginHour & " - " & EventEndHour & " - " & ClientFull & "")
end if
rs_search_event.movenext
Response.Write(" ")
wend
end if
rs_search_event.close
set rs_search_event = nothing
Response.Write("" & AddEvent & " | ")
next
Response.Write(" ")
end if
wend
set rsidEmpl = nothing
Response.Write(" ")
firstlundi = Dateserial(tmpyear,lastmonth,lastday+7)
next
Response.Write(" ")
EndCode = Now()
TimeCode = DateDiff("s",BeginCode,EndCode)
Response.Write(TimeCode)
%>
|