%@LANGUAGE="VBSCRIPT"%> <% Dim iMonth, iYear Dim giorno, archivio, mese 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") category=request("category") mese=Right(CStr(100+iMonth), 2) Dim rsblog Dim rscommenti Dim vpage Dim page Dim Block Dim Blocks Dim RecordsInPage Dim intstart Dim i Dim totale Dim maxpages Dim PagStart Dim PagStop Dim RemainingRecords Dim NumberLastRecords Dim SQLCount Dim rsCount Dim msg page = Request("page") RecordsInPage = Request("RecordsInPage") Block = Request("Block") if Block="" then Block=1 if RecordsInPage="" then RecordsInPage=intRecordsPerPage if page="" then page=1 if giorno <> "" or category <> "" then SQLCount = "SELECT COUNT(*) as totale FROM blog WHERE giorno = '" & giorno & "' AND mese = '" & mese & "' AND anno = '" & iYear & "'" elseif archivio<>"OK" then SQLCount = "SELECT COUNT(*) as totale FROM blog WHERE mese = '" & mese & "' AND anno = '" & iYear & "'" else SQLCount = "SELECT COUNT(*) as totale FROM blog" end if If category<>"" then SQLCount = "SELECT COUNT(*) as totale FROM blog WHERE blogCategory = " & category SQLCategory = "SELECT CatText FROM tblcategory WHERE CatID = " & category End if set rsCount = adoCon.Execute(SQLCount) totale = rsCount("totale") rsCount.Close set rsCount=Nothing If category<>"" and category<>0 then set rsCategoryName = adoCon.Execute(SQLCategory) strCatName = rsCategoryName("CatText") rsCategoryName.Close set rsCategoryName=Nothing End if %>
![]() |
|||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||
|
<%
intStart = CInt((page-1) * intRecordsPerPage)
' 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 giorno = '" & giorno & "' AND mese = '" & mese & "' AND anno = '" & iYear & "' ORDER BY blog_id DESC"
strSQL = strSQL & " LIMIT " & intStart & ", " & RecordsInPage
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
strSQL = "SELECT blog.* FROM blog WHERE mese = '" & mese & "' AND anno = '" & iYear & "' ORDER BY blog_id DESC"
strSQL = strSQL & " LIMIT " & intStart & ", " & RecordsInPage
msg = ""
elseif category<>"" then
' visualizzo tutto l'archivio blog
strSQL = "SELECT blog.* FROM blog WHERE blogCategory = " & category & " ORDER BY blog_id DESC"
strSQL = strSQL & " LIMIT " & intStart & ", " & RecordsInPage
msg = strLangErrorMessageNoBlog3 &" " & strCatName
else
' visualizzo tutto l'archivio blog
strSQL = "SELECT blog.* FROM blog ORDER BY blog_id DESC"
strSQL = strSQL & " LIMIT " & intStart & ", " & RecordsInPage
msg = " " & strLangErrorMessageNoBlog3 &"" end if set rsblog = adoCon.Execute(strSQL) Set rscommenti = Server.CreateObject("ADODB.Recordset") If rsblog.EOF AND rsblog.BOF Then %>
<% rscommenti.Close else exit for end if rsblog.movenext Next RecordsInPage=intRecordsPerPage rsblog.Close end if %> <%Set rsblog = Nothing Set rscommenti = Nothing Set strCon = Nothing Set adoCon = Nothing %> |
|||||||||||||||||||||||||||||||
| About Us Support Us Blog What We Do ©All Rights Reserved. Property of New Democracy Coalition Site Design: Ideology Technology by: Wozzaworks |
|||||||||||||||||||||||||||||||