<% Response.Expires = -1 ' CONNESSIONE AL DB Attach(server.mappath("/mdb/riflessidarte.mdb")) ' PARAMETRI DELLA QUERYSTRING if instr(request.querystring,"cat=")<>0 then categoria = request.querystring("cat") else categoria = 0 end if if instr(request.querystring,"subcat=")<>0 then subcategoria = request.querystring("subcat") else subcategoria = 0 end if if instr(request.querystring,"pag=")<>0 then pag = request.querystring("pag") else pag = 1 end if schedepagina=7 %> Riflessi D'arte - Prodotti
<% set rec=server.CreateObject("ADODB.recordset") rec.Open "SELECT * FROM categoria " ,db_conn,3,2 while not rec.eof response.write "
CATEGORIA " & rec("titolo") & "
" set recSub=server.CreateObject("ADODB.recordset") recSub.Open "SELECT * FROM subcategoria where categoria=" & rec("codice") & " AND VISUALIZZA='SI' ORDER BY ORDINE",db_conn,3,2 response.write "" recSub.close Set recSub = Nothing rec.movenext wend rec.close Set rec = Nothing %>
<% set rec=server.CreateObject("ADODB.recordset") rec.Open "SELECT A.TITOLO AS TITOLOCAT, B.TITOLO AS TITOLOSUBCAT " & _ "FROM CATEGORIA AS A LEFT JOIN SUBCATEGORIA AS B ON A.CODICE=B.CATEGORIA " & _ "WHERE A.CODICE=" & categoria & " AND B.CODICE=" & subcategoria & ";" ,db_conn,3,2 if not rec.eof then titolocat = rec("titolocat") titolosottocat = rec("titolosubcat") response.write "
Sei nella categoria: " & titolocat & " - Sottocategoria: " & titolosottocat & "
" else response.write "
Selezionare una sottocategoria
" end if rec.close rec.Open "SELECT * " & _ "FROM PRODOTTO " & _ "WHERE CATEGORIA=" & categoria & " AND SUBCATEGORIA=" & subcategoria & " " & _ "ORDER BY ORDINE" ,db_conn,3,2 ' SUDDIVISIONE DEI RECORD TROVATI IN PAGINE if not rec.eof then rec.PageSize = schedepagina rec.AbsolutePage = pag totalPages = rec.pageCount end if if not rec.eof then response.write "
" response.write "
" i=0 while not rec.eof AND i < schedepagina response.write "
" response.write "" response.write "
" response.write "
" & rec("titolo") & "
" response.write "
" response.write "
" response.write "" & rec("sottotitolo") & " - " & rec("codice") & "
" response.write "" & titolocat & " " & titolosottocat & "
" response.write "" & rec("descrbreve") & "" response.write "
" response.write "
€uro
" & rec("prezzo") & "
" response.write "
" response.write "
" response.write "" response.write "" response.write "
" response.write "
" rec.movenext i= i+1 wend if totalPages > 1 then ' SE LE PAGINE SONO PIU' DI UNA, VISUALIZZO I PULSANTI PRECEDENTE,SUCESSIVO %> <% end if else response.write "
" end if rec.close Set rec = Nothing %>
Copyright © 2009 riflesidarte.sm - All Rights Reserved
created by FILLXSDESIGN.COM ®
<% ' CHIUSURA CONNESSIONE DB DeAttach %>