<% 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 %>