<% else %> <% end if %> <% pari=pari+1 j = j + 1 rs.MOVEnext LOOP TotalHits = RS.RecordCount %>

Ricerca
I NOSTRI LIBRI:
Libri Italiani
Libri Inglesi
ARGOMENTI:
<% %>
<% if request("bic")<>"" then %> Home <% totbic=len(request("bic")) startbic=1 DO WHILE not startbic = totbic SQL="SELECT categoria FROM struttura_bic where bic = '" & left(request("bic"),startbic) & "'" set RS=conn.execute(SQL) cat=rs("categoria") %> > "><%=cat%> <% startbic = startbic + 1 %> <% loop %> <% SQL="SELECT categoria FROM struttura_bic where bic = '" & request("bic") & "'" set RS=conn.execute(SQL) cat=rs("categoria") %> > <%=cat%> <% end if %>

Vetrina Libri

<% NumItems = 8 Error = false 'RS Pageing RSPage = TRIM(Request.QueryString("page")) IF Len(RSPage)=0 THEN RSPage = 1 'Collect form bic = Request("bic") editore = Request("editore") Max = TRIM(Request.Form("max")) ELSE bic = Request("bic") editore = Request("editore") Max = TRIM(Request.QueryString("max")) END IF 'Check IF Len(bic)<1 THEN Error = true IF Len(editore)<4 THEN editore = items IF Len(Max)<2 OR NOT IsNumeric(max) THEN Max = NumItems %> <% OpenConn 'SQL="SELECT LIBRI.IDLibro, LIBRI.Titolo, LIBRI.Autori, LIBRI.Editore, isnull(LIBRI.Prezzo_euro/100,0) as prezzo_euro, prezzo_sterlina as prezzo_sterlina, prezzo_dollaro as prezzo_dollar, isnull(LIBRI.Immagine,'') as immagine FROM LIBRI where attivo = 1 " SQL="SELECT LIBRI.IDLibro, LIBRI.Titolo, LIBRI.Autori, LIBRI.Editore, isnull(LIBRI.Prezzo_euro/100,0) as prezzo_euro, prezzo_sterlina as prezzo_sterlina, prezzo_dollaro as prezzo_dollar, isnull(LIBRI.Immagine,'') as immagine FROM LIBRI " ' if request("bic") <> "" then ' sql = sql & " and ( bic like '" & request("bic") & "%'" ' sql = sql & " or bic2 like '" & request("bic") & "%'" ' sql = sql & " or bic3 like '" & request("bic") & "%'" ' sql = sql & " or bic4 like '" & request("bic") & "%'" ' sql = sql & " or bic5 like '" & request("bic") & "%'" ' sql = sql & " or bic6 like '" & request("bic") & "%'" ' sql = sql & ")" ' end if if request("bic") <> "" then sql = sql & " where attivo = 1 and ( bic like '" & request("bic") & "%'" sql = sql & " or bic2 like '" & request("bic") & "%'" sql = sql & " or bic3 like '" & request("bic") & "%'" sql = sql & " or bic4 like '" & request("bic") & "%'" sql = sql & " or bic5 like '" & request("bic") & "%'" sql = sql & " or bic6 like '" & request("bic") & "%'" sql = sql & ")" else sql = sql & " where order_home > 0" end if if request("editore") <> "" then sql = sql & " and editore = '" & request("editore") & "'" end if if request("bic") <> "" then SQL = SQL & " order by precedence DESC, titolo" else SQL = SQL & " order by isnull(order_home,9999), titolo" end if Set RS = Server.CreateObject("ADODB.RecordSet") RS.CursorLocation = 3 ' adUseClient RS.Open sql, Conn, 3 %> <% if rs.eof then %>
Nessun titolo disponibile
<% else %> <% RS.PageSize = NumItems TotalPages = RS.PageCount RS.AbsolutePage = RSPage i=0 j=1 pari=0 DO WHILE not rs.eof AND NOT i > CInt(Max)-1 i=i+1 'titolo = rs("titolo") %> <% if pari mod 2=0 then %>
&bic=<%=request("bic")%>"> <% if rs("immagine") = "" then %> <% 'set fso = createobject("scripting.filesystemobject") 'editor_picture = server.mappath("./img/editors/" & rs("editore") & ".jpg") 'if fso.FileExists (editor_picture) then if ExistsEditorImage(rs("editore")) then %> " width="90" height="115"> <% else %> <% end if %> <% else %> " width="90" height="115"> <% end if %>

<%=rs("titolo")%>

<%=rs("autori")%>

Editore: <%=rs("editore")%>

Prezzo: <% '=formatnumber(rs("prezzo_euro"),2) prezzo_euro = GetPrezzoEuro( rs("prezzo_euro"), rs("prezzo_sterlina"), rs("prezzo_dollar")) response.write(formatnumber(prezzo_euro,2)) 'if(rs("prezzo_euro") = 0) then 'response.write(formatnumber(rs("prezzo_sterlina")*sterlin_to_euro,2)) ' response.write(0) 'else ' response.write(formatnumber(rs("prezzo_euro"),2)) 'end if %> €

&bic=<%=request("bic")%>"> <% if rs("immagine") = "" then %> <% if ExistsEditorImage(rs("editore")) then %> " width="90" height="115"> <% else %> <% end if %> <% else %> " width="90" height="115"> <% end if %>

<%=rs("titolo")%>

<%=rs("autori")%>

Editore: <%=rs("editore")%>

Prezzo: <% prezzo_euro = GetPrezzoEuro( rs("prezzo_euro"), rs("prezzo_sterlina"), rs("prezzo_dollar")) response.write(formatnumber(prezzo_euro,2)) 'if(rs("prezzo_euro") = 0) then 'response.write(formatnumber(rs("prezzo_sterlina")*sterlin_to_euro,2)) ' response.write(0) 'else ' response.write(formatnumber(rs("prezzo_euro"),2)) 'end if %> €

<%IF NOT RSPage = 1 THEN%> <<<  <%END IF%> <%IF RSPage = 1 THEN%> Risultati 1 - <%=i%> di <%=TotalHits%> <%ELSE%> Risultati <%=CInt(max*(RSPage-1)+1)%> - <%=CInt(max*(RSPage-1)+i)%> di <%=TotalHits%> <%END IF%> <% IF NOT (TotalPages) = CInt(RSPage) THEN%>  >>> <%END IF%>
<% end if %>

<% CloseConn %> <% 'if(InStr("aab","b") = -1) then ' Response.write(".")'editor_picture = server.mappath("./img/editors/" & name & ".jpg") 'else ' Response.write(InStr("aaab","a")) 'end if %>