<%@ LANGUAGE = VBScript.Encode %> <% Response.Buffer = true %> <% primav="" if primav <> "" and session("primav")="" then session("primav")="N" response.redirect(primav) end if %> <% ' -------------- FINE IperTesta ----------------------------- npp="npp" xx=variabile(npp) npp=npp*1 m_alto="m_alto" xx=variabile(m_alto) m_alto=m_alto*1 %> <% if variabile2("menudisinistra")="S" then %>
<% ' ---------------- IperSX ----------------------------- %> <% ' ---------------- Fine IperSX ---------------------------- end if %> <% indice=request("indice") 'if indice="" then ' randomize() ' sql="select * from products" ' set rs=db.execute(sql) ' caso=int(rnd(2515)*(rs.Fields.Count - 2))+1 ' caso2=rnd()*100 ' if caso2>50 then ' indice=rs(caso).Name ' else ' indice=rs(caso).Name & " desc" ' end if ' set rs=nothing 'end if 'if caso<1 or caso >35 then ' indice="catcode" 'end if if indice="" then indice="prod_nome" end if spot_ID=request("spot")*1 if spot_ID > 0 then %>
<% sql="select * from spot where spot_attivo and spot_ID=" & spot_ID set rs=db.execute(sql) if not rs.eof then kspot=0 for rr= 1 to 10 mspot="spot" & rr if rs(mspot) <> "" then kspot=kspot+1 end if next if kspot > 0 then %> <% for rr = 1 to 10 mspot="spot" & rr %> value="<%=rs(mspot)%>"> value="5"> value="18"> value="<% colore_testo(col_medio1)%>"> <% next %>
<% end if end if %>
<% end if %>
color="<% colore_testo(col_chiaro)%>"> <% if request("cat_ID") <>"" then sql="select * from categorie where catcode=" & request("cat_ID") set rstemp=db.execute(sql) if variabile2("menudisinistra")="S" then response.write("" & rstemp("cat_nome") & "   ") end if %> <% END if if request("cat_id") <>"" then %>
<% response.write(rstemp("cat_descr")) %>
<% set rstemp=nothing END if %>
<% ' -------------- Prodotti reparto ----------------------- ricerca=ctrl(request("ricerca")) if ricerca<>"" then sql = "SELECT * " &_ "FROM Products " &_ "WHERE prod_attivo " &_ "AND ( prod_nome LIKE '%" & ricerca & "%' " &_ "OR prod_codice LIKE '%" & ricerca & "%') " &_ "ORDER BY " & indice end if if request("cat_id")*1>1 then sql="select * from categorie where catcode=" & request("cat_ID")*1 set rscat = db.execute(sql) cat_id=request("cat_id")*1 categoria=trim(request("cat")) categoria=rscat("cat_nome") set rscat=nothing end if if categoria<>"" then solocategoria="solocategoria" xx=variabile(solocategoria) if solocategoria<>"si" then if session("scat")="all" or session("scat")="" then sql="select * FROM products INNER JOIN categorie ON products.catcode=categorie.catcode" &_ " WHERE prod_attivo " &_ "AND ( cat_nome LIKE '" & categoria & "%') " &_ "ORDER BY " & indice else sql="select * FROM products INNER JOIN categorie ON products.catcode=categorie.catcode" &_ " WHERE prod_attivo " &_ "AND ( cat_nome LIKE '%" & categoria & "%') " &_ "AND supercat='" & session("scat") &"' " &_ "ORDER BY " & indice end if end if if solocategoria="si" then if session("scat")="all" or session("scat")="" then sql="select * from products WHERE prod_attivo AND catcode=" & cat_id else sql="select * from products WHERE prod_attivo AND supercat='" & session("scat") & "' AND catcode=" & cat_id end if end if end if catcode=request("catcode") if catcode="" AND ricerca="" AND categoria="" and azione="" then if session("scat")="all" or session("scat")="" then sql="select * from products where prima_pagina order by " & indice else sql="select * from products where prima_pagina AND supercat='" & session("scat") & "' order by " & indice end if end if if catcode <>"" then sql="select * from products where prod_attivo= true AND catcode= " & catcode & " order by " & indice end if if request("azione")="new" then if session("scat")="all" or session("scat")="" then sql="select * from products where prod_attivo= true AND prod_new order by " & indice else sql="select * from products where prod_attivo= true AND prod_new AND supercat='" & session("scat") & "' order by " & indice end if end if if request("azione")="affare" then if session("scat")="all" or session("scat")="" then sql="select * from products where prod_attivo= true AND prod_affare order by " & indice else sql="select * from products where prod_attivo= true AND prod_affare AND supercat='" & session("scat") & "' order by " & indice end if end if set rsprod=db.execute(sql) campo_Lfoto=0 For i = 0 to rsprod.Fields.Count - 1 if rsprod(i).Name="L_foto" then campo_Lfoto=1 end if next pagina=request("pag") c=0 np=0 if not rsprod.eof then while not rsprod.eof np=np+1 rsprod.movenext wend rsprod.movefirst if np>npp then npag=np/npp if npag>int(npag) then npag=int(npag)+1 end if end if if pagina="" then pagina=1 end if fc=pagina*npp ic=(pagina-1)*npp c=0 host = Request.ServerVariables("HTTP_HOST") page = Request.ServerVariables("SCRIPT_NAME") qryStr = Request.QueryString url = "http://" & host url = url & page if len (qryStr) >0 then url = url & "?" & qryStr end if url=replace(url,"?pag="&pagina,"") url=replace(url,"&pag="&pagina,"") response.write("") while not rsprod.eof for conta4=1 to 2 c=c+1 if (not rsprod.eof) and c > ic and c <=fc then if campo_Lfoto=1 then alto="" largo="" if rsprod("L_foto")>0 then alto=" height="&rsprod("L_foto")&" " end if if rsprod("W_foto")>0 then largo=" width=" &rsprod("W_foto")&" " end if if alto="" and largo="" and m_alto>0 then alto=" height="&m_alto&" " end if end if %> <% end if %> <% if not rsprod.eof then rsprod.movenext end if next response.write("") wend ' ------------ ------------------------------------------------- %>
 
<% ' --------------- Inizio prodotto ------- %>
<% browser = Request.ServerVariables("HTTP_USER_AGENT") if mdr <> "S" then %>

?prodotto=<%=rsprod("productid")%>&catcode=<%=rsprod("catcode")&"&testa=n"%>&cat_id=<%=rsprod("catcode")%>">" border=0 <%=alto%><%=largo%> alt="<%=ctrl3(rsprod("prod_nome"))%> ">

<% else %>

?prodotto=<%=rsprod("productid")%>">" border=0 <%=alto%><%=largo%> alt="<%=ctrl3(rsprod("prod_nome"))%> ">

<% end if %>
<% prezzo_prod=rsprod("prezzoE" & nlistino) %> <%=rsprod("prod_nome") %>
<% if prezzo_prod > 0 then %> <%=formprezzo(prezzo_prod,"1")%>
<%=formprezzo(prezzo_prod,"2")%>
<% end if %>

" method="get" action="<%=trim(rsprod("template"))%>"> > > > <% if instr(xdettagli,".gif")=0 and instr(xdettagli,".jpg")=0 then %>
<% else %> border=0 >
<% end if %>
<% barra_orizzontale %>
<% ' ----------------- Fine prodotto %>
<% if npag>0 then %>
color="#<%=testobody%>"> <%=xpagina%> n. <%=pagina%>        <% if pagina*1>1 then url=replace(url,"?pag="&pagina,"") url=replace(url,"&pag="&pagina,"") if instr(url,"?")=0 then %> <<< <% else %> <<< <% end if end if for ttt=1 to npag url=replace(url,"?pag="&pagina,"") url=replace(url,"&pag="&pagina,"") if instr(url,"?")=0 then %> <%=ttt%>  <% else if instr(url,"indice")=0 then %> <%=ttt%>  <% else %> <%=ttt%>  <% end if end if next %> <% if pagina*1 >>> <% else %> >>> <% end if end if %>
<% end if end if %> <% '---------------- Fine dettaglio prodotto ------------------- %> <% ' ---------------- Fine Prodotto ----------------------------- if variabile2("menudisinistra")<>"S" then %> <% end if %>
<% sql="select * from base" set rs=db.execute(sql) %> <%=rs("base")%> <% set rs=nothing %>
<% db.close set db=nothing %>