Copia e incolla paro paro.
Ho sistemato altro cosette.
Il confronto per vedere se è domenica non si fa sul valore stringa ma sul valore numerico del giorno della settimana,
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
response.write " <td></td>" & vbCrLf
response.write " </tr>" & vbCrLf
end if
next
response.write "</table>" & vbCrLf
%>