<%@Language="VBScript"%> <% Option Explicit %> <% Response.Expires = -1500 %> <% Dim Tmp1,Tmp2,Login,Indice,password Dim Argomenti Dim Pagina Dim NumPagine Dim Contatore Tmp1 = Request("p") Tmp2 = "" For Indice = 1 To Len(Tmp1) If Asc(Mid(Tmp1,Indice,1)) >= Asc("0") And Asc(Mid(Tmp1,Indice,1)) <= Asc("9") Then Tmp2 = Tmp2 & Mid(Tmp1,Indice,1) End If Next Pagina = Left(Tmp2, 5) If Pagina = "" Then Pagina = 1 Set rs = Server.CreateObject("ADODB.Recordset") rs.CursorType = adOpenStatic rs.PageSize = 3 'righe x Pagina %> <% rs.Open "SELECT * FROM news ORDER BY evidenzia desc,datacreazione desc", conn, 3, 3 If Not rs.EOF Then rs.AbsolutePage = Pagina NumPagine = CLng(rs.PageCount) Contatore = 1 Do While Not rs.EOF And Contatore <= rs.PageSize And Response.IsClientConnected %> <% Contatore = Contatore + 1 if not rs.eof then rs.MoveNext Loop %>
<%=rs("datacreazione")%> <%=rs("titolo")%>
<% if len(rs("testo")) > 70 then response.write left(rs("testo"),70) & "..." else response.write rs("testo") end if %>
'">
<% For Indice = 1 To NumPagine %> <% next %>
<% if Pagina > 1 then %> « <% else %>   <% end if %>   <% If Indice <> Pagina Then %> <%=indice%>  <% Else %> <%=indice%>  <% End If %><% if Pagina < NumPagine then %> » <% else %>   <% end if %>