%@LANGUAGE="VBSCRIPT"%> <% Dim iMonth, iYear Dim giorno, archivio Dim data_blog iMonth=Request ("month") iYear=Request ("year") if iMonth = "" then iMonth = Month(Now) sMonth=NameFromMonth(iMonth) if iYear = "" then iYear = Year(Now) giorno=request.querystring("giorno") archivio=request.querystring("archivio") data_blog="#" & iMonth & "/" & giorno & "/" & iYear & "#" Dim rsblog Dim rscommenti Dim vpage Dim page Dim Block Dim Blocks Dim i Dim totale Dim maxpages Dim PagStart Dim PagStop Dim RemainingRecords Dim msg Block = Request.querystring("Block") page = Request.querystring("page") if Block="" then Block=1 if page="" then page=1 %>
![]() |
|
<% = strLangSelectArchivesBlog %> ![]()
<%If giorno <> "" Then
response.write giorno & " " & Ucase(sMonth) & " " & iYear
elseif archivio<>"OK" then
response.write Ucase(sMonth) & " " & iYear
else
response.write strLangSelectArchivesBlogFull
end if %>
|
|
![]() |
<%
Set rsblog = Server.CreateObject("ADODB.Recordset")
' verifico se la scelta è relativa ad un giorno specifico
' nel caso di giorno<>"" visualizzo tutti i blog relativi al giorno specificato
if giorno <> "" then
strSQL = "SELECT blog.* FROM blog WHERE data = " & data_blog & "ORDER BY blog_id DESC;"
msg = ""
' verifico se è stato scelto di visualizzare l'archivio completo ed in caso contrario, archivio <>OK, visualizzo i blog relativi al mese richiamato dal calendario
elseif archivio<>"OK" then
mese=Right(CStr(100+iMonth), 2)
strSQL = "SELECT blog.* FROM blog WHERE mese = '" & mese & "' AND anno = '" & iYear & "' ORDER BY blog_id DESC;"
msg = ""
else
' visualizzo tutto l'archivio blog
strSQL = "SELECT blog.* FROM blog ORDER BY blog_id DESC;"
msg = " " & strLangErrorMessageNoBlog3 &"" end if rsblog.Open strSQL, adoCon, 1, 3 rsblog.PageSize = intRecordsPerPage If NOT rsblog.EOF Then rsblog.AbsolutePage = page Set rscommenti = Server.CreateObject("ADODB.Recordset") If rsblog.EOF Then Response.Write msg Response.End Else totale = rsblog.RecordCount For i=1 to intRecordsPerPage If rsblog.EOF Then Exit For strSQL = "SELECT Count(commenti.blog_id) AS numerocommenti " strSQL = strSQL & "FROM commenti " strSQL = strSQL & "WHERE commenti.blog_id = " & CLng(rsblog("blog_id")) & ";" rscommenti.Open strSQL, adoCon %>
<% rscommenti.Close rsblog.MoveNext Next End If %> <% 'paginazione Response.Write "
<% rsblog.Close Set rsblog = Nothing Set rscommenti = Nothing Set strCon = Nothing Set adoCon = Nothing %> |
||||||||||||