<%
CatProdotto=Request("CatProdotto")
select case request.querystring("dir")
case ""
session("curpage")=1
case "Next"
session("curpage")=session("curpage")+1
case "Prev"
session("curpage")=session("curpage")-1
end select
const adopenkeyset=3
dim objconnection
dim RSPROD
if request.querystring("dir")="Next" or request.querystring("dir")="Prev" then
sql=request.form("sq")
else
dimmiquali=request("dimmiquali")
SQL="SELECT * from tbl_prodotti where IDCategoria like '" & CatProdotto & "' order by Nome"
end if
Set OBJdbConnection = Server.CreateObject("ADODB.Connection")
OBJdbConnection.Open (strCon)
set RSPROD=server.createobject("ADODB.recordset")
RSPROD.pagesize=6
RSPROD.open sql,objdbconnection,adopenkeyset
if RSPROD.eof then
%>
<%if CatProdotto="0" then%>
Questa sezione è dedicata a tutti
coloro che, buongustai ed amanti della vera salumeria tradizionale, vogliono
acquistare i nostri prodotti.
Potrete scegliere tra una selezione di prodotti freschi e stagionati. Inoltre
consultando la scheda informativa ("Dettagli") avrete la possibilità di sapere
come ogni singolo prodotto è lavorato e con quali ingredienti.
<%else%>
Nessun prodotto disponibile per la categoria scelta.
<%end if%>
<%
else
if not RSPROD.eof then
RSPROD.absolutepage=clng(session("curpage"))
g=0
do while (not g=RSPROD.pagesize) and (not RSPROD.eof)
g=g+1
num=RSPROD("id")
TxtProdotto="
" & RSPROD("Nome") & "
" & RSPROD("Descrizione")
%>
" width="128" height="85" style="border:1px solid #444444"> |
<%if RSPROD("AltreNote")<>"" then%>
<%=Left(TxtProdotto, 180)%>... |
<%=Left(RSPROD("AltreNote"),26)%>... |
"> |
<%else%>
<%=Left(TxtProdotto, 240)%>... |
"> |
<%end if%>
|
|
|
<%
RSPROD.MoveNext
LOOP
end if
%>
<% if clng(session("curpage"))>1 then %>
<% end if %>
|
Pagina <%=session("curpage")%>/<%=RSPROD.pagecount%>
|
<% if clng(session("curpage"))
<% end if %>
|
<% end if %>