Scarica il flashplayer
<% do while not query.eof %> " response.write " " x = 1 else x = x + 1 end if query.moveNext loop for i = x to 1 response.write " " next if x < 1 then response.write " " %>
NEWS
<% sql2 = "Select Count(id) as c FROM showtime_news where categoria='news'" Set queryCount=Server.CreateObject("ADODB.Recordset") queryCount.open sql2, dbc, 3 total = clng(queryCount("c")) queryCount.close set queryCount = nothing Const PagesPerBlock = 36 RecordsPerPage = 36 Const RecordsInPage = 36 ' calcolo il numero delle pagine a = total / RecordsPerPage totalePagine = Int(total / RecordsPerPage) if totalePagine - a <> 0 then totalePagine = totalePagine + 1 if request("Opzione") = "" then Session("CorrentePagina") = 1 elseif request("Opzione") = "Successivo" then Session("CorrentePagina") = Session("CorrentePagina") + 10 elseif request("Opzione") = "Precedente" then Session("CorrentePagina") = Session("CorrentePagina") - 10 else Session("CorrentePagina") = request("Opzione") end if if CLng(Session("CorrentePagina")) > totalePagine then Session("CorrentePagina") = Session("CorrentePagina") - 1 end if if CLng(Session("CorrentePagina")) < 1 then Session("CorrentePagina") = 1 end if page = CLng(Session("CorrentePagina")) intStart = CInt((page-1) * RecordsPerPage) ' calcola la riga di partenza per l'opzione LIMIT sql = "Select * FROM showtime_news where categoria='news' order by id DESC" sql = sql & " LIMIT " & intStart & ", " & RecordsInPage ' con l'opzione LIMIT Set query=Server.CreateObject("ADODB.Recordset") query.Open sql, dbc, 3 x=1 %>

" alt="" hspace="3" vspace="3" /> "><%=query("titolo")%>
<%=query("sommario")%>
<% if x = 2 then response.write "
Pagina: <%=Session("CorrentePagina")%> / <%=totalePagine%>
<% If CLng(Session("CorrentePagina")) - 9 > 1 then %> [<< -10] <% End If %> <% If CLng(Session("CorrentePagina")) > 1 then %> ">[< ] <% End If %> <% if (CLng(Session("CorrentePagina")) mod 9 <> 0) and (CLng(Session("CorrentePagina")) - 4 <= 0) and (CLng(Session("CorrentePagina")) + 4 <= totalePagine) then if totalePagine > 9 then inizio = 9 else inizio = totalePagine end if for j=1 to inizio if j=CLng(Session("CorrentePagina")) and (totalePagine>1) then response.write("" & j & " ") elseif j<>CLng(Session("CorrentePagina")) and (totalePagine>1) then response.write("" & j & " ") end if next elseif (CLng(Session("CorrentePagina")) mod 9 <> 0) and (CLng(Session("CorrentePagina")) - 4 > 0 ) and (CLng(Session("CorrentePagina")) + 4 < totalePagine) then for j=CLng(Session("CorrentePagina")) - 4 to CLng(Session("CorrentePagina")) + 4 if j=CLng(Session("CorrentePagina")) and (totalePagine>1) then response.write("" & j & " ") elseif j<>CLng(Session("CorrentePagina")) and (totalePagine>1) then response.write("" & j & " ") end if next elseif (CLng(Session("CorrentePagina")) mod 9 = 0) and (CLng(Session("CorrentePagina")) - 4 > 0 ) and (CLng(Session("CorrentePagina")) + 4 < totalePagine) then for j=CLng(Session("CorrentePagina")) - 4 to CLng(Session("CorrentePagina")) + 4 if j=CLng(Session("CorrentePagina")) and (totalePagine>1) then response.write("" & j & " ") elseif j<>CLng(Session("CorrentePagina")) and (totalePagine>1) then response.write("" & j & " ") end if next elseif (CLng(Session("CorrentePagina")) mod 9 <> 0) and (CLng(Session("CorrentePagina")) + 8 > totalePagine) then if totalePagine - 8 < 1 then inizio = 1 else inizio = totalePagine - 8 end if for j=inizio to totalePagine if j=CLng(Session("CorrentePagina")) and (totalePagine>1) then response.write("" & j & " ") elseif j<>CLng(Session("CorrentePagina")) and (totalePagine>1) then response.write("" & j & " ") end if next elseif (CLng(Session("CorrentePagina")) mod 9 = 0) and (CLng(Session("CorrentePagina")) + 8 > totalePagine) then for j=totalePagine - 8 to totalePagine if j=CLng(Session("CorrentePagina")) and (totalePagine>1) then response.write("" & j & " ") elseif j<>CLng(Session("CorrentePagina")) and (totalePagine>1) then response.write("" & j & " ") end if next else for j=CLng(Session("CorrentePagina")) to CLng(Session("CorrentePagina")) + 8 if j=CLng(Session("CorrentePagina")) and (totalePagine>1) then response.write("" & j & " ") elseif j<>CLng(Session("CorrentePagina")) and (totalePagine>1) then response.write("" & j & " ") end if next end if %> <% If CLng(Session("CorrentePagina")) < totalePagine then %> &categoria=<%=category%>&citta=<%=cit%>&chiave=<%=key%>">[>] <% End If %> <% If CLng(Session("CorrentePagina")) + 9 < totalePagine then %> [+10>>] <% End If %>