Vi posto il codice perchè ho fatto varie prove come da voi suggerito ma mi ritorna sempre un errore una volta di variabile non definita, risolto quello della variabile mi da un'altro errore, sicuramente c'è qualcosa che non va nell'accoppiare i suggerimenti con il codice esistente.Grazie
codice:
codice:
<%
'VERSIONE FILE 1.4.0
Option Explicit
%>
<%
'---Dichiarazione variabili
Dim QSCategoria, QSPg, I, Index, Codice, SQL, SQLScheda, DLink, RSScheda, QSID, ID, Prodotto, sLink, GDescrizione, GFoto, CPrezzo, Mfoto, Tipologia, RStip, RPrezzo, Giacenza, Iva, PuntiSconto, ProdottoGiacenzaInfinita
QSCategoria = Request.QueryString("cat")
QSSCategoria = Request.QueryString("scat")
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>
<% '###############################AGGIUNTO DA SBP PER IMMAGINE IN POPUP 1/10/03 ########## %>
<script language="javascript" type="text/javascript">
<!--
// Creo lo script per l'apertura del popup
function ApriImmagini(file)
{
var prop = "top=100, left=100,scrollbars=yes, resizable=yes"; // Altre proprietà... eccetto width ed height!
window.open(file, null, prop);
}
//-->
</script>
<% '##########################FINE AGGIUNTA SBP PER IMMAGINE IN POPUP 1/10/03 ########## %>
</head>
<body bgcolor="<%=Body_Sfondo%>" topmargin="<%=Body_TopMargin%>" leftmargin="<%=Body_LeftMargin%>" marginwidth="<%=Body_MarginWidth%>" marginheight="<%=Body_MarginHeight%>" link="#FFFFFF" vlink="#FFFFFF" alink="#000000">
<table width="780" cellspacing="0" cellpadding="0" align="center" border="0">
<tr>
<td colspan="5">
</td>
</tr>
<tr bgcolor="">
<td colspan="5" width="780">
</td>
</tr>
<tr>
<td width="120" height="0" bgcolor="<%=TabellaBig_Colore_SxDx%>" valign="top" align="center" rowspan="2">
[img]../SANPAOLOIMI.gif[/img]
[img]../BANKPASS.gif[/img]
[img]../carteCredito.gif[/img]
Transazioni sicure
al 100%
</td>
<td width="5" bgcolor="<%=TabellaBig_Colore_Cx%>" rowspan="2">
</td>
<td width="500" bgcolor="<%=TabellaBig_Colore_Cx%>" valign="top" bordercolor="#999999" rowspan="2">
</p>
<%
QSID = Request.QueryString("ID")
'---Recupero le informazioni sul prodotto dal database
SQLScheda = " SELECT * FROM Prodotti WHERE ID = "& QSID & " AND Cancellato = False "
Set RSScheda = Conn.Execute(SQLScheda)
'---Assegno e stampo a video
If Not RSScheda.EOF Then
ID = RSScheda("ID")
sLink = RSScheda("sLink")
Codice = RSScheda("Codice")
Prodotto = RSScheda("Prodotto")
GDescrizione = RSScheda("GDescrizione")
GFoto=RSScheda("GFoto")
MFoto=RSScheda("MFoto")
DLink=RSScheda("DLink")
CPrezzo = RSScheda("CPrezzo")
RPrezzo = RSScheda("RPrezzo")
Giacenza = RSScheda("Giacenza")
ProdottoGiacenzaInfinita = RSScheda("GiacenzaInfinita")
Iva = RSScheda("Iva")
PuntiSconto = RSScheda("PuntiSconto")
Tipologia = RSScheda("Tipologia")
'#################AGGIUNTO DA SBP PER MODIFICA POPUP 1/10/03
dim PFoto2, GFoto2
PFoto2=RSScheda("PFoto")
GFoto2 = GFoto
'#################FINE AGGIUNTA SBP PER MODIFICA POPUP 1/10/03
RSScheda.Close
%>
<p align="center">
<%=Titolo_Pagina_Prodotto%>
</p>
<form method="get" action="prod_aggiungi.asp">
<input type="hidden" name="ID" value="<%=ID%>">
<table border="0" width="450" align="center" height="1">
<tr>
<td width="450" valign="top" align="center" height="1">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="100%">
<p align="center">
<%
if GFoto2 = "" then GFoto2 = Path_IMG & Img_NonDisponibile_G
%>
<a href="javascript:ApriImmagini('immagine.html?id=<%=GFoto2%>')">[img]<% If MFoto <> [/img]"></p>
<p align="center"></p>
<p align="center">Clicka sull'immagine per ingrandirla!</a>
<%=DLink%>
</p>
<p align="center"></td>
</tr>
</table>
<div align="center">
<center>
<table border="0" width="445" cellspacing="0" cellpadding="3" bordercolordark="#E5E5E5" bordercolorlight="#000000" height="1" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td bgcolor="<%=Tabella_Colore_Cella%>" height="55" width="439">
> <%=Prodotto%> (<%=Codice%>)
<p align="justify">
<%=GDescrizione%>
</p>
<%
If Tipologia = True Then
Set RStip = Server.CreateObject("ADODB.RecordSet")
SQL = " SELECT * FROM Tipologie WHERE IDProdotto = "& 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>
<%
End If
%>
<p align="right">
<%=Disponibilita%>:
<%
If ImmagineGiacenza Then
Response.Write "[img][/img]"
Else
If (ProdottoGiacenzaInfinita) Then
Response.Write TestoGiacenzaInfinita
Else
Response.Write Giacenza
End If
End If
%>
<p align="right">
<%=TitoloCPrezzo%>: <%=SimboloValuta%> <font color="red"><%=VisualizzaPrezzo(CPrezzo)%></font> iva inclusa
<%
If Session("Rivenditore") = True Then
%>
<%=TitoloRPrezzo%>: <%=SimboloValuta%> <font color="red"><%=VisualizzaPrezzo(RPrezzo)%></font> iva inclusa
<%
End If
%>
<%
End If
%>
<%
SQLScheda = " SELECT Quantita, Sconto FROM Sconti WHERE IDProdotto = " & QSID
Set RSScheda = Conn.Execute(SQLScheda)
If Not RSScheda.EOF Then
%>
<%=Sconti_Quantita%>:
<%
Do While Not RSScheda.EOF
%>
<%=Replace(Replace(Sconti_Quantita_Riga, "[pezzi]", RSScheda("Quantita")), "[sconto]", RSScheda("Sconto"))%>
<%
RSScheda.MoveNext
Loop
End If
%> </p>
</td>
</tr>
<tr>
<td width="439" valign="top" height="1" align="right">
<%=Titolo_Aggiungi_Carrello%>:
<input type="text" name="quantita" size="2" maxlength="5" value="1">
<%
If (Giacenza <= 0) AND (NOT ProdottoGiacenzaInfinita) Then
%>
[img]<%=Path_Img%>catalogo_aggiungi.gif[/img]" border="0">
<%
Else
%>
<input type="image" src="<%=Path_Img%>catalogo_aggiungi.gif" name="I1" value="<%=AltPulsante%>" alt="<%=AltPulsante%>" border="0">
<p align="right">
"><%=TestoIndietro%>[img]<%=Path_Img%>catalogo_indietro.gif[/img]
<%
End If
%>
</p>
</td>
</tr>
<tr>
<td bgcolor="<%=Tabella_Colore_Cella%>" height="13" width="439"></td>
</tr>
</table>
</center>
</div>
</td>
</tr>
</table>
</form>
<p align="right">
</td>
<td width="5" bgcolor="<%=TabellaBig_Colore_Cx%>" rowspan="2">
</td>
<td width="150" height="0" bgcolor="<%=TabellaBig_Colore_SxDx%>" valign="top" align="center">
<p align="center">
</p>
</td>
</tr>
<tr>
<td width="150" height="0" bgcolor="<%=TabellaBig_Colore_SxDx%>" valign="top" align="center">
</td>
</tr>
<p align="right">
</table>
</a>
</body>
</html>
<%
Conn.Close
Set Conn = Nothing
%>