scusatemi per il titolo del primo form!!!![]()
Ciao a tutti sul forum ho trovato
questo script, un calendario orizzontale
lo sto adattando alle mie esigenze :
ho due date presenti sul database dal 10/01/2010 al 15/01/2010
ho bisogno di stampare a video in corrispondenza del giorno del calendario
le date comprese tra 10(compreso) e il 15(compreso), cioè 10,11,12,13,14,15
mi funziona ma non in corrispondenza dei giorni del calendario
questa è la parte che io ho adattato
cosa sbaglio?
if not (rsAllUsers.EOF) then
dal = estrapolo la data presente sul database
al = idem come sopra
'Estrapolo il giorno
inizio = Day(dal)
fine = Day(al)
Dim cont
for cont = (inizio) to (fine)
response.write "<td>"&cont&"</td>" & vbCrLf
do while not (rsAllUsers.EOF)
rsAllUsers.moveNext
loop
cmq posto il tutto il codice
<%
session.LCID = 1040
pagina = request.serverVariables("PATH_INFO")
g = request.queryString("g")
m = request.queryString("m")
a = request.queryString("a")
if len(g) > 0 and isNumeric(g) then
g = cLng(g)
else
g = datePart("d",date())
end if
if len(m) > 0 and isNumeric(m) then
m = cLng(m)
else
m = datePart("m",date())
end if
if len(a) > 0 and isNumeric(a) then
a = cLng(a)
else
a = datePart("yyyy",date())
end if
dataCorrente = g & "/" & m & "/" & a
mesePrecedente = dateAdd("m",-1,dataCorrente)
meseSuccessivo = dateAdd("m",1,dataCorrente)
response.write "<table width=""600"" border=""1"">" &vbCrLf
response.write " <tr>" & vbCrLf
response.write " <td colspan=""2""><-- Mese precedente " & monthName(m) & " " & a & " Mese successivo --></td>" & vbCrLf
response.write " </tr>" &vbCrLf
for i = 1 to 31
classe = "spento"
if isDate(i & "/" & m & "/" & a) then
if i = g then classe = "accesso"
response.write " <tr>" & vbCrLf
giornoSettimana = datePart("w",i & "/" & m & "/" & a)
gSettimana = weekDayName(datePart("w",i & "/" & m & "/" & a))
if giornoSettimana = 1 Then
color = "red"
else
color = "gray"
end if
response.write " <td width=""150"" class=""" & classe & """><span style='color:"&color&"' ;>" & i & " " & gSettimana & "</span></td>" & vbCrLf
if not (rsAllUsers.EOF) then
dal = rsAllUsers.Fields.Item("dal").Value
al = rsAllUsers.Fields.Item("al").Value
'Estrapolo il giorno
inizio = Day(dal)
fine = Day(al)
Dim cont
for cont = (inizio) to (fine)
response.write "<td>"&cont&"</td>" & vbCrLf
do while not (rsAllUsers.EOF)
rsAllUsers.moveNext
loop
next
end if
end if
next
response.write "</table>" & vbCrLf
%>
<%
rsAllUsers.Close()
%>