Ciao, sono riuscito a costrurie il calendario.
Ora però il problema è che mi duplica i mesi e non mi funziona il cambio di colore
delle celle a secondo del campo record pieno o vuoto.

Codice:
---------------------------------------------------------------
<%mese = Request.Querystring ("mese")
Set Conn= Server.CreateObject("Adodb.connection")
Conn.Open "provider=microsoft.jet.oledb.4.0; data source="& Server.MapPath("/offerte/offerte.mdb")
sql =" select * from disponibilita where disponibile =1 "
set rs = conn.execute(sql)
rif = rs("rif")
mese = rs("mese")
prezzo = rs("prezzo")
settimana = rs("settimana")

%>
<%

function getMese(ByVal mese)
if not isNumeric(mese) then exit function
getMese=arrMesi(mese-1)
end function

function giorniMese(mese,anno)
dim giorni
Select Case cint(mese)
Case 1,3,5,7,8,10,12:
giorni = 31
Case 4,6,9,11:
giorni = 30
Case 2:
if ((cint(anno) mod 4 = 0 and _
cint(anno) mod 100 <> 0) _
or ( cint(anno) mod 400 = 0) ) then
giorni = 29
else
giorni = 28
end if
End Select
giorniMese = giorni
end function

arrMesi=Array("Gennaio","Febbraio","Marzo","Aprile ","Maggio","Giugno","Luglio","Agosto","Settembre", "Ottobre","Novembre","Dicembre")


%>
<table width='100%' cellspacing='2' cellpadding='2'class='tblcalendar'>
<%
dim conta
dim bgcolor
conta = 0
bgcolor = "#FFFFFF"
while NOT RS.EOF
if conta mod 2 <> 0 then
bgcolor = "#CCCCCC"
Else
bgcolor = "#FFFFFF"
End if
%>
<%

mese=month(date())

for i=mese to 12
Response.write "<tr>"
Response.write " <td width='20%'>" & getMese(i) & "</td>"
primo=datePart("W","01/" & i & "/" & year(date()))
if primo=7 then
start=1
else
start=1+(7-primo)
end if
nGiorni=giorniMese(i,year(date()))
for y=start to nGiorni
Response.write "<td collspan='2' bgcolor=" & bgcolor & ">" & y & " </td>"
Response.write "<td collspan='2' bgcolor=" & bgcolor & ">" & prezzo & ".00</td>"
y=y+6
next
Response.Write "</tr>"
next
%>
<%
conta = conta + 1
Rs.movenext
wend
%>

<%
Rs.close
set Rs = nothing%>