%
Function giorni (nummese)
Select case nummese
Case 1
c=31
Case 2
c=28
Case 3
c=31
Case 4
c=30
Case 5
c=31
Case 6
c=30
Case 7
c=31
Case 8
c=31
Case 9
c=30
Case 10
c=31
Case 11
c=30
Case 12
c=31
end Select
giorni=c
end Function
Function converti (nummese)
Select case nummese
Case 1
c="GENNAIO"
Case 2
c="FEBBRAIO"
Case 3
c="MARZO"
Case 4
c="APRILE"
Case 5
c="MAGGIO"
Case 6
c="GIUGNO"
Case 7
c="LUGLIO"
Case 8
c="AGOSTO"
Case 9
c="SETTEMBRE"
Case 10
c="OTTOBRE"
Case 11
c="NOVEMBRE"
Case 12
c="DICEMBRE"
end Select
converti=c
end Function
%>
<%
if request("anno")="" then
sql_news= "SELECT * from news ORDER BY data desc"
set rs = connessione.execute(sql_news)
if not rs.eof then
anno=Year(rs("data"))
else
anno=Year(now())
end if
else
anno=request("anno")
end if
if request("mese")="" then
sql_news= "SELECT * from news where data>=#"&anno&"-1-1# and data<=#"&anno&"-12-31# ORDER BY data desc"
set rs = connessione.execute(sql_news)
if not rs.eof then
response.write(mese)
mese=Month(rs("data"))
else
mese=Month(now())
end if
else
mese=request("mese")
end if
if request("id")="" then
sql_news= "SELECT * from news where data>=#"&anno&"-"&mese&"-1# and data<=#"&anno&"-"&mese&"-"&giorni(mese)&"# ORDER BY data desc"
set rs = connessione.execute(sql_news)
if not rs.eof then
id=rs("id_news")
end if
else
id=request("id")
end if
%>
Formula Medicine | Official web site