ciao, devo applicare quello script in java in questa pagina che richiama il file inc_catalogo.asp:
codice:
<%
'VERSIONE FILE 1.4.0
Option Explicit
%>
<%
'---Dichiarazione variabili
Dim QSCategoria, QSPg, QSQuery
'---Recupero le informazioni sulla scategoria, categoria e pagina
QSCategoria = Request.QueryString("cat")
QSSCategoria = Request.QueryString("scat")
QSQuery = Request.QueryString("q")
QSPg = Int(Request.QueryString("pg"))
If QSPg <= 0 Then
QSPg = 1
End If
%>
<html>
<head>
<meta content="index,follow" name="robots">
<meta content="<%=Motori_Keywords%>" name="keywords">
<meta content="<%=Motori_Description%>" name="description">
<meta NAME="copyright" CONTENT="Software Open Source sviluppato dal team Merlin Wizard s.r.l., http://www.merlinwizard.com, info@mwizard.com">
<link rel="stylesheet" href="include/ecommerce.css">
<title><%=NomeSito%></title>
</head>
<body bgcolor="<%=Body_Sfondo%>" topmargin="<%=Body_TopMargin%>" leftmargin="<%=Body_LeftMargin%>" marginwidth="<%=Body_MarginWidth%>" marginheight="<%=Body_MarginHeight%>">
<table width="780" cellspacing="0" cellpadding="0" align="center" border="0">
<tr>
<td colspan="5">
</td>
</tr>
<tr bgcolor="<%=Navigazione_Sfondo%>">
<td colspan="5" width="780">
</td>
</tr>
<tr>
<td width="120" height="0" bgcolor="<%=TabellaBig_Colore_SxDx%>" valign="top" align="center">
</td>
<td width="5" bgcolor="<%=TabellaBig_Colore_Cx%>" >
</td>
<td width="500" bgcolor="<%=TabellaBig_Colore_Cx%>" valign="top" bordercolor="#999999">
</p>
</td>
<td width="5" bgcolor="<%=TabellaBig_Colore_Cx%>">
</td>
<td width="150" height="0" bgcolor="<%=TabellaBig_Colore_SxDx%>" valign="top" align="center">
</td>
</tr>
</table>
</body>
</html>
<%
Conn.Close
Set Conn = Nothing
%>
inc_catalogo.asp:
[CODE]<%
'VERSIONE FILE 1.4.0
%>
<%
'---Dichiarazione variabili
Dim SQL, RS, I, Footer, RStip, Index, ArrQuery
If (QSSCategoria <> "") Or (QSQuery <> "") Then
%>
<p align="justify">
<%=Head_Catalogo%>
</p>
<table border="1" width="500" cellspacing="0" cellpadding="3" align="center" bordercolor="#CCCCCC">
<tr>
<td width="60">
</td>
<td width="75" bgcolor="<%=Tabella_Colore_Titolo%>">
<%=TitoloProdotto%>
</td>
<td bgcolor="<%=Tabella_Colore_Titolo%>">
<%=TitoloPFoto%>
</td>
<td width="130" bgcolor="<%=Tabella_Colore_Titolo%>">
<%=TitoloPDescrizione%>
</td>
<td width="100" bgcolor="<%=Tabella_Colore_Titolo%>">
<%=TitoloCPrezzo%>
</td>
<td width="50" bgcolor="<%=Tabella_Colore_Titolo%>">
<%=TitoloPulsante%>
</td>
</tr>
<%
If (QSSCategoria = "") AND (QSCategoria = "") AND (QSQuery = "") Then
Response.Redirect Request.ServerVariables("HTTP_REFERER")
Else
'---Stampo a video i prodotti delle categorie richieste
Set RS = Server.CreateObject("ADODB.RecordSet")
RS.PageSize = MaxProdottiPerPagina
If QSQuery <> "" Then
QSQuery = Replace(QSQuery, "'", "''")
ArrQuery = Split(QSQuery, " ")
SQL = " SELECT * FROM Prodotti WHERE "
For i = 0 to UBound(ArrQuery, 1)
SQL = SQL & "(Prodotto LIKE '%" & ArrQuery(i) & "%' OR PDescrizione LIKE '%" & ArrQuery(i) & "%' OR GDescrizione LIKE '%" & ArrQuery(i) & "%') AND "
Next
SQL = SQL & "Cancellato = False"
RS.Open SQL, Conn, 1
Else
If (QSCategoria = "") Then
SQL = " SELECT * FROM Prodotti WHERE SCategoria = "& [QSSCategoria] &" AND Categoria = 0 AND Cancellato = False "
RS.Open SQL, Conn, 1
End If
If (QSCategoria <> "") Then
SQL = " SELECT * FROM Prodotti WHERE Categoria = "& [QSCategoria] &" AND Cancellato = False"
RS.Open SQL, Conn, 1
End If
End If
If Not RS.EoF Then
RS.MoveFirst
RS.AbsolutePage = QSPg
If QSPg <> 1 Then
Footer = "" & PrimaPagina & " "
Else
Footer = PrimaPagina & " "
End If
For I = 1 To RS.PageCount
If I = QSPg Then
Footer = Footer & I & " "
Else
Footer = Footer & ""& I &" "
End If
Next
If QSPg <> RS.PageCount Then
Footer = Footer & "" & UltimaPagina & ""
Else
Footer = Footer & UltimaPagina
End If
For I = 1 To RS.PageSize
If RS.EOF Then Exit For
%>
<tr bgcolor="<%=Tabella_Colore_Cella%>">
<form method="get" action="prod_aggiungi.asp">
<td bgcolor="<%=Tabella_Colore_Cella%>" width="60" valign="top">
<%
If RS("Offerta") = True Then
%>
[img]<%=Path_Img%>catalogo_ico_offerta.gif[/img]">
<%
End If
If StrToData(RS("Data")) > (Date - GiorniNovita) Then
%>
[img]<%=Path_Img%>catalogo_ico_nuovo.gif[/img]">
<%
End If
%>
">[img]<%=Path_Img%>catalogo_leggi_commenti.gif[/img]">
">[img]<%=Path_Img%>catalogo_scrivi_commenti.gif[/img]">
</td>
<td width="75" valign="top">
"><%=RS("Prodotto")%>
<%
If RS("Tipologia") = True Then
%>
<p align="center">
<%
Set RStip = Server.CreateObject("ADODB.RecordSet")
SQL = " SELECT * FROM Tipologie WHERE IDProdotto = "& RS("ID")
With RStip
.Open SQL, Conn, 1
If Not (.BOF And .EOF) Then
%>
<select name="Tipologia">
<%
Index = 1
Do While Not .EOF
If Index = 1 Then
%>
<option Selected value='<%=.Collect("ID")%>'><%=.Collect("Tipologia ")%>
<%
Else
%>
<option value='<%=.Collect("ID")%>'><%=.Collect("Tipologia ")%>
<%
End If
Index = Index + 1
.MoveNext
Loop
End If
.Close
End With
Set RStip = Nothing
%>
</select>
</p>
<%
End If
%>
</td>
<td align="center">
<img src="
<%
If RS("PFoto") <> "" Then
Response.Write RS("PFoto")
Else
Response.Write Path_IMG & Img_NonDisponibile_P
End If
%>
" width="<%=PFoto_Larghezza%>" height="<%=PFoto_Altezza%>">
</td>
<td width="130" valign="top">
<%=RS("PDescrizione")%>
<%If UtilizzaPrezzo(RS("PuntiSconto")) > 0 Then%>
<%=PuntiUsabili%>: <%=VisualizzaPrezzo(RS("PuntiSconto"))%><%End If%>
<%=Disponibilita%>:
<%
If ImmagineGiacenza Then
Response.Write "[img][/img]"
Else
If RS("GiacenzaInfinita") Then
Response.Write TestoGiacenzaInfinita
Else
Response.Write RS("Giacenza")
End If
End If
%>
</td>
<td width="100" valign="top">
<%=SimboloValuta%> <font color="red"><%=VisualizzaPrezzo(RS("CPrezzo"))%></font>
<%=Replace(IvaNonCompresa, "[iva]", RS("IVA"))%>
<%
If Session("Rivenditore") = True Then
%>
praticamente dovrei ingrandire questa immagine che si trova in questa parte del codice:
codice:
<img src="
<%
If RS("PFoto") <> "" Then
Response.Write RS("PFoto")
Else
Response.Write Path_IMG & Img_NonDisponibile_P
End If
%>
" width="<%=PFoto_Larghezza%>" height="<%=PFoto_Altezza%>">