<%@LANGUAGE="VBSCRIPT"%> <% If Session("admin") = False or IsNull(Session("admin")) = True then response.Redirect("login.asp?strmode=edit") End If %> <% Response.Buffer = True Dim iMonth, iYear iMonth=Request ("month") iYear=Request ("year") if iMonth = "" then iMonth = Month(Now) sMonth=NameFromMonth(iMonth) if iYear = "" then iYear = Year(Now) Dim rsblog Dim rscommenti Dim vpage Dim page Dim Block Dim Blocks Dim i Dim totale Dim maxpages Dim PagStart Dim PagStop Dim RemainingRecords Block = Request.querystring("Block") page = Request.querystring("page") if Block="" then Block=1 if page="" then page=1 %> <% = Ublogname %>
<% = strLangSelectEditDeleteBlog %>  
 
 
<% = request.querystring("msg") %>

<% Set rsblog = Server.CreateObject("ADODB.Recordset") strSQL = "SELECT blog.* FROM blog ORDER BY blog_id DESC;" rsblog.Open strSQL, adoCon, 1, 1 rsblog.PageSize = intRecordsPerPage If NOT rsblog.EOF Then rsblog.AbsolutePage = page Set rscommenti = Server.CreateObject("ADODB.Recordset") If rsblog.EOF Then Response.Write "



" & strLangErrorMessageNoBlog3 & "
" Response.End Else totale = rsblog.RecordCount %>
<% = UCase(strLangGlobBlogInDb) %> : <% = totale %>

<% 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 %>
<% = strLangGlobTableBlog1 %> <% = strLangGlobTableBlog2 %> <% = strLangGlobTableBlog3 %> <% = strLangGlobTableBlog4 %> <% = strLangGlobTableBlog5 %>
<% strText = rsblog("blog_titolo") Response.write anteprima(strText, 3) %> <%If rsblog("blog_email") <> "" Then Response.Write("" & rsblog("blog_autore") & "") Else Response.Write(rsblog("blog_autore")) %> <% If CBool(rsblog("commenti")) = True Then If NOT rscommenti.EOF Then Response.Write rscommenti("numerocommenti") Else Response.Write "0" End If Else Response.Write strLangGlobNoComment End If %> <% If rscommenti("numerocommenti") <>"0" Then %> "><% = strLangCheckAltEditCommentsBlog %> '<% = rsblog('" border="0"> <% else %>   <%end if%> &page=<% =page %>&Block=<% = Block %>"><% = LCase(strLangNavEditBlog) %>   &page=<% =page %>&Block=<% = Block %>" onClick="return confirm('<% = strLangCheckDelBlog %>');"><% = strLangCheckAltDelBlog %>


<% 'paginazione Response.Write "" 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 Response.Write "" & strLangGlobPage & " " & page & " " & strLangGlobOf & " " & maxpages & "" 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 "
" %>

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