<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> Agenda Eurobrevets 1.00.02 <% thisnumerosemaine = DatePart("ww",date(),2,3) %> <% an = request.querystring("an") if an = "" then D=date() an=year(D) end if firstjanv = "01/01/" & an & "" posfirstjanv = weekday(firstjanv,2) ' firstlundiyear = firstjanv If posfirstjanv > 1 then diff = posfirstjanv - 1 firstlundiyear = Dateserial(an,01,01-diff) End if dayfirstlundi = day(firstlundiyear) monthfirstlundi = month(firstlundiyear) yearfirstlundi = year(firstlundiyear) lastlundi = firstlundiyear ' numerosemaine = DatePart("ww",firstjanv,2,1) %> This Week <% For Sem = 1 to 52 lastmonth = month(lastlundi) lastday = day(lastlundi) lastyear = year(lastlundi) currentlundi = lastlundi %> <% lastlundi = Dateserial(tmpyear,lastmonth,lastday+7) next %>
<% %> <% For wd = 0 to 6 tmpmonth = month(lastlundi) tmpday = day(lastlundi) tmpyear = year(lastlundi) currentday = Dateserial(tmpyear,tmpmonth,tmpday+wd) dayname = WeekdayName(Weekday(currentday)) %> <% next %> <% IDEmployee = 0 InitEmployee = "" openrs rsidEmpl, "select IdEmpl, Initiales from employees where DisableEmpl=0 order by 2" while not rsidEmpl.EOF IDEmployee = GetValue(rsidEmpl, 0) InitEmployee = GetValue(rsidEmpl, 1) rsidEmpl.MoveNext %> <% For wd = 0 to 6 tmpmonth = month(lastlundi) tmpday = day(lastlundi) tmpyear = year(lastlundi) currentday = Dateserial(tmpyear,tmpmonth,tmpday+wd) tosqlmonth = month(currentday) tosqlday = day(currentday) tosqldate = tmpyear & "-" & tosqlmonth & "-" & tosqlday %> <% next %> <% wend set rsidEmpl = nothing %>

Sem.<%=Sem%>

<%=dayname%>
<%=currentday%>

<%=InitEmployee%>

<% ClientFull = "" nothingtodo = 0 sqlchecknothingtodo = "DateInt='" & tosqldate & "' AND idEmpl=" & IDEmployee & "" nothingtodo = DLookUp("reldatelieupers", "IdTime", sqlchecknothingtodo) if nothingtodo = 0 then If wd = 5 or wd=6 then Response.Write("W-E") else Response.Write("?") end if else sqlcheck = "DateInt='" & tosqldate & "' AND idEmpl=" & IDEmployee & " AND IdTime=3" checkfullday = DLookUp("reldatelieupers", "IdTime", sqlcheck) If checkfullday = 3 then ClientFull = DLookUp("reldatelieupers", "CustInt", sqlcheck) idFull = DLookUp("reldatelieupers", "id", sqlcheck) Response.Write("" & ClientFull & "") else Set rs1 = server.CreateObject("ADODB.Recordset") sql1 = "SELECT * FROM reldatelieupers WHERE DateInt='" & tosqldate & "' AND idEmpl=" & IDEmployee & " ORDER BY IdTime Asc" openrs rs1, sql1 AM = "" PM = "" While not rs1.eof If rs1("IdTime") = 1 then AM = rs1("CustInt") idAM = rs1("id") end if If rs1("IdTime") = 2 then PM = rs1("CustInt") idPM = rs1("id") end if rs1.movenext Wend rs1.close If AM = "" then Response.Write("?
") else Response.Write("" & AM & "
") end if If PM = "" then Response.Write("?") else Response.Write("" & PM & "") end if end if end if %>