<%@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 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 blog_id blog_id = Request.QueryString("blog_id") page = Request("page") RecordsInPage = Request("RecordsInPage") Block = Request("Block") if Block="" then Block=1 if RecordsInPage="" then RecordsInPage=intRecordsPerPage if page="" then page=1 SQLCount = "SELECT COUNT(*) as totale FROM commenti WHERE commenti.blog_id =" & blog_id set rsCount = adoCon.Execute(SQLCount) totale = rsCount("totale") rsCount.Close set rsCount=Nothing %> <% = Ublogname %>
<% = strLangSelectEditDeleteComments %> <% = blog_id %>  
 
 
<% = request.querystring("msg") %>

<% intStart = CInt((page-1) * intRecordsPerPage) strSQL = "SELECT commenti.* FROM commenti WHERE commenti.blog_id =" & blog_id strSQL = strSQL & " LIMIT " & intStart & ", " & RecordsInPage set rscommenti = adoCon.Execute(strSQL) If rscommenti.EOF AND rscommenti.BOF Then Response.Write "



" & strLangErrorMessageNoComments & "

" & strLangNavRedirectErrorNoComments & "
" Response.End Else %>
<% = UCase(strLangGlobNumberOfComment) %>: <% = totale %>

<% For i=1 to RecordsInPage if Not rscommenti.EOF then %> <% else exit for end if rscommenti.movenext Next RecordsInPage=intRecordsPerPage %>
<% = strLangGlobTableComment1 %> <% = strLangGlobTableComment2 %> <% = strLangGlobTableComment3 %>
<% = rscommenti("commento_autore")%> <% =rscommenti("data")%> "><% = strLangCheckAltEditCommments %>   &blog_id=<% = blog_id %>" onClick="return confirm('<% = strLangCheckDelComments %>');"><% = strLangCheckAltDelComment %>


<% Response.Write "
" 'maxpages = int(totale / RecordsInPage) 'if (totale mod RecordsInPage) <> 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 Response.Write "" & vpage & " " else NumberLastRecords = intRecordsPerPage+RemainingRecords Response.Write "" & vpage & " " exit for end if if vpage=PagStop AND Blocks>1 and int(Block-1)" & _ "  " exit for end if Next end if end if Response.Write "
" %>

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