<%@LANGUAGE="VBSCRIPT"%> <% Dim iDay, iMonth, iYear, iCalendarDate iDay = removeAllTags(Request.Querystring("d")) If Not IsNumeric(iDay) Then iDay = 1 iMonth = removeAllTags(Request.QueryString("m")) If Not IsNumeric(iMonth) Then iMonth = "" iYear = removeAllTags(Request.QueryString("y")) If Not IsNumeric(iYear) Then iYear = "" iCalendarDate = DateAdd("s",Time_difference,Now()) If iMonth = "" Then iMonth = Month(iCalendarDate) sMonth = NameFromMonth(iMonth) If iYear = "" Then iYear = Year(iCalendarDate) Dim rsblog Dim rscommenti Dim rstrack Dim rscats Dim vpage Dim page Dim Block Dim Blocks Dim i, iCount Dim totale Dim maxpages Dim PagStart Dim PagStop Dim RemainingRecords Dim msg Dim rc Dim sel Dim ci Dim ui Dim btxt Dim ArrCat rc = removeAllTags(Trim(Request.QueryString("rc"))) sel = removeAllTags(Request.QueryString("s")) ci = removeAllTags(Request.QueryString("ci")) If Not IsNumeric(ci) Then ci = 1 Else ci = CInt(ci) End If ui = removeAllTags(Request.QueryString("ui")) Block = removeAllTags(Request.QueryString("Block")) page = removeAllTags(Request.QueryString("page")) If Not IsNumeric(Block) Then Block = "" If Not IsNumeric(page) Then page = "" If Block = "" Then Block = 1 If page = "" Then page = 1 %>
<% Set rsblog = Server.CreateObject("ADODB.Recordset") Select Case sel Case "day" strSQL = "SELECT * FROM " & Table_Prefix & "blog WHERE Day(data) = " & iDay & " AND Month(data) = " & iMonth & " AND Year(data) = " & iYear & " " _ & "ORDER BY data DESC;" msg = "


" & strLangErrorMessageNoBlog1 & "" msg = msg & "

" & strLangNavRedirectErrorNoBlog & "" Case "month" strSQL = "SELECT * FROM " & Table_Prefix & "blog WHERE Month(data) = " & iMonth & " AND Year(data) = " & iYear & " ORDER BY data DESC;" msg = "


" & strLangErrorMessageNoBlog2 & "" msg = msg & "

" & strLangNavRedirectErrorNoBlog & "" Case "search" strSQL = "SELECT * FROM " & Table_Prefix & "blog WHERE blog_testo like '%" & rc & "%' " _ & "OR blog_titolo like '%" & rc & "%' ORDER BY data DESC;" msg = "


" & strLangErrorMessageNoBlog4 & "" msg = msg & "

" & strLangNavRedirectErrorNoBlog & "" Case "category" strSQL = "SELECT * FROM " & Table_Prefix & "blog LEFT JOIN " & Table_Prefix & "blog2cat ON " & Table_Prefix & "blog.blog_id = " & Table_Prefix & "blog2cat.blog_id " _ & "WHERE " & Table_Prefix & "blog2cat.cat_id = " & ci & " ORDER BY data DESC;" msg = "


" & strLangErrorMessageNoBlog5 & "" msg = msg & "

" & strLangNavRedirectErrorNoBlog & "" Case "bloggers" strSQL = "SELECT * FROM " & Table_Prefix & "blog WHERE blog_autore = '" & ui & "' ORDER BY data DESC;" msg = "


" & strLangErrorMessageNoBlog4 & "" msg = msg & "

" & strLangNavRedirectErrorNoBlog & "" Case "archive" strSQL = "SELECT * FROM " & Table_Prefix & "blog ORDER BY data DESC;" msg = "


" & strLangErrorMessageNoBlog3 Case Else strSQL = "SELECT TOP 20 * FROM " & Table_Prefix & "blog ORDER BY data DESC;" msg = "


" & strLangErrorMessageNoBlog3 End Select rsblog.Open strSQL, adoCon, 1, 3 rsblog.PageSize = intRecordsPerPage If NOT rsblog.EOF Then rsblog.AbsolutePage = page If rsblog.EOF Then Response.Write msg Else totale = rsblog.RecordCount For i=1 to intRecordsPerPage If rsblog.EOF Then Exit For strSQL = "SELECT Count(blog_id) AS numerocommenti " _ & "FROM " & Table_Prefix & "commenti " _ & "WHERE blog_id = " & CLng(rsblog("blog_id")) & ";" Set rscommenti = adoCon.Execute(strSQL) strSQL = "SELECT Count(blog_id) AS numerotrack " _ & "FROM " & Table_Prefix & "trackback " _ & "WHERE status = 'r' AND blog_id = " & CLng(rsblog("blog_id")) & ";" Set rstrack = adoCon.Execute(strSQL) strSQL = "SELECT " & Table_Prefix & "category.cat_id,cat_name,cat_des FROM " & Table_Prefix & "category, " & Table_Prefix & "blog2cat " _ & "WHERE " & Table_Prefix & "category.cat_id = " & Table_Prefix & "blog2cat.cat_id AND " & Table_Prefix & "blog2cat.blog_id = " & CLng(rsblog("blog_id")) & " " _ & "ORDER BY cat_name;" Set rscats = adoCon.Execute(strSQL) ArrCat = rscats.GetRows() rscats.Close : Set rscats = Nothing %>
<% = FormatDateView(UblogDate,rsblog("data")) %>
<% If bLoggedIn Then If Session(Cookie_Name & "UblogLevel") > 1 Then %> &referr=<% = Request.ServerVariables("SCRIPT_NAME") %>&page=<% = page %>&Block=<% = Block %>&m=<% = iMonth %>&y=<% = iYear %>&d=<% = iDay %>&rc=<% = rc %>&s=<% = sel %>&ci=<% = ci %>&ui=<% = ui %>" title="<% = strLangAltEditThisBlog %>"><% = strLangFormEditCat %> | &referr=<% = Request.ServerVariables("SCRIPT_NAME") %>&page=<% = page %>&Block=<% = Block %>&m=<% = iMonth %>&y=<% = iYear %>&d=<% = iDay %>&rc=<% = rc %>&s=<% = sel %>&ci=<% = ci %>&ui=<% = ui %>" onClick="return confirm('<% = strLangCheckDelBlog %>');" title="<% = strLangAltDelThisBlog %>"><% = strLangFormDeleteCat %> <% End If End If %>
<% = ValidateHTML(rsblog("blog_titolo")) %>
<% If sel = "search" Then Dim highlighttext highlighttext = HighLight(rc,rsblog("blog_testo")) Response.Write ValidateHTML(highlighttext) Else Response.Write ValidateHTML(rsblog("blog_testo")) End If %>
 
<% For iCount = 0 To UBound(ArrCat, 2) Response.Write " "" Then Response.Write ValidateHTML(ArrCat(2, iCount)) Else Response.Write strLangALTCategoryListView & ValidateHTML(ArrCat(1, iCount)) End If Response.Write """>" & ValidateHTML(ArrCat(1, iCount)) & "" If iCount <> UBound(ArrCat, 2) Then Response.Write " , " Next %>
<% = strLangGlobPostedBy %>  <%If rsblog("blog_email") <> "" Then Response.Write("" & ValidateHTML(rsblog("blog_autore")) & "") Else Response.Write(ValidateHTML(rsblog("blog_autore"))) %> <% = strLangGlobAt %>  <% = FormatDateView(UblogHour,rsblog("data")) %> | <% Response.Write "" & strLangGlobReadAll & "" If CBool(rsblog("commenti")) = True Then If NOT rscommenti.EOF Then Response.Write " | " & strLangGlobNumberOfComment & " [" & rscommenti("numerocommenti") & "]" Else Response.Write " | " & strLangGlobNumberOfComment & " [0]" End If End If If blntrack = True Then If NOT rstrack.EOF Then Response.Write " | " & LCase(strLangFormTrack) & " [" & rstrack("numerotrack") & "]" & VbCrlf Else Response.Write " | " & LCase(strLangFormTrack) & " [0]" & VbCrlf End If Response.Write "" End If %>



<% rscommenti.Close rstrack.Close rsblog.MoveNext Next %>

<% 'paginazione Response.Write "
" maxpages = int(totale / intRecordsPerPage) if (totale mod intRecordsPerPage) <> 0 then maxpages = maxpages + 1 end if Blocks=0 Blocks = int(maxpages / PagesPerBlock) if (maxpages mod PagesPerBlock) <> 0 then Blocks = Blocks + 1 end if if maxpages>1 then Response.Write "" & strLangGlobPage & " " & page & " " & strLangGlobOf & " " & maxpages & "" end if Response.Write "" PagStop=Block*PagesPerBlock PagStart=(PagStop-PagesPerBlock)+1 i=0 if maxpages>1 then For vpage=PagStart to PagStop i=i+1 if Block=1 then i=0 if i=1 and Block>1 then Response.Write "" & _ "   " end if RemainingRecords = totale-(vpage*intRecordsPerPage) if RemainingRecords > 0 then if vpage=CInt(page) then Response.Write"" & vpage & " " else Response.Write "" & vpage & " " end if else if vpage=CInt(page) then Response.Write"" & vpage & " " else Response.Write "" & vpage & " " end if exit for end if if vpage=PagStop AND Blocks>1 and int(Block-1)" & _ "" end if Next end if Response.Write "
" End If %>

<% rsblog.Close : Set rsblog = Nothing Set rscommenti = Nothing Set rstrack = Nothing Set strCon = Nothing Set adoCon = Nothing %>