<%
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 RS
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 RS=server.createobject("ADODB.recordset")
RS.pagesize=10
RS.open sql,objdbconnection,adopenkeyset
if RS.eof then
%>
Nessun prodotto in vendita al momento.
<%
else
%>
<%
if not RS.eof then
RS.absolutepage=clng(session("curpage")) and contatore = 0
g=0
do while (not g=RS.pagesize) and (not RS.eof)
g=g+1
num=RS("id")
If contatore = 2 Then
contatore = 0
Response.Write " "
End If
%>
|
<%
rs.MoveNext
contatore = contatore + 1
Loop
End if
%>
<% if clng(session("curpage"))>1 then %>
<% end if %>
|
Pagina <%=session("curpage")%>/<%=RS.pagecount%>
|
<% if clng(session("curpage"))
<% end if %>
|
<%end if%>
|
|
|
|
|
|
|
Prodotti in vendita |
|
<%
SQL="SELECT * FROM CatProdotti order by Nome"
Set RS=DBConn.Execute(SQL)
Do While Not RS.EOF
SezMenu=cint(RS("ID"))
CatProdotto=cint(CatProdotto)
%>
|
|
<%
RS.MoveNext
Loop
%>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|