Originariamente inviato da Shagrat
si, posta tutto così vediamo che si può fare, magari evdenzia anch quello che non vuoi che venga visualizzato
allora, il fatto è piuttosto complesso: mi hanno detto di modificare il file inc_catalogo.asp , che è questo
codice:
<%
'---Dichiarazione variabili
Dim SQL, RS, I, Footer, RStip, Index, ArrQuery, cIVA
If (QSSCategoria <> "") Or (QSQuery <> "") Then
' inizio modifiche by Supermax
' per visualizzare il percorso in cui ci si trova nel catalogo prodotti
Dim smSQLCat, smRSCat, smscat, smcat, smdovesei
if QSSCategoria <>"" then
smSQLCat = " SELECT ID, SCategoria FROM SCategorie where ID="&Cint(QSSCategoria)
smscat=""
Set smRScat = Conn.Execute(smSQLCat)
If Not smRSCat.EOF Then
smscat=smRScat("Scategoria")
end if
smRSCat.close
end if
if QSCategoria <>"" then
smSQLCat = " SELECT * FROM Categorie where ID="&Cint(QSCategoria)
smcat=""
Set smRScat = Conn.Execute(smSQLCat)
If Not smRSCat.EOF Then
smcat=smRScat("Categoria")
end if
smRSCat.close
end if
smdovesei="Sei in:"
if smscat<>"" then
smdovesei=smdovesei&" "&smscat&""
end if
if smcat<>"" then
smdovesei=smdovesei&"-> "&smcat&""
end if
response.write(smdovesei)
' fine modifiche by Supermax
%>
<p align="justify">
<%=Head_Catalogo%>
</p>
<table width="100%" border="0" cellspacing="0" cellpadding="3" border="0">
<tr>
<td colspan="2" bgcolor="<%=Tabella_Colore_Titolo%>" valign="middle">
</td>
</tr>
<td valign="top" bgcolor="<%=Tabella_Colore_Cella%>">
<%
SQLCat = " SELECT ID, SCategoria FROM SCategorie "
Set RScat = Conn.Execute(SQLCat)
If Not RSCat.EOF Then
SCatArr = RScat.GetRows
'---Stampo a video le scategorie ed eventuali categorie
If QSSCategoria <> "" Then
SQLCat = " SELECT ID, Categoria FROM Categorie WHERE SCategoria = " & QSSCategoria
Set RSCat = Conn.Execute(SQLCat)
If Not RSCat.EOF Then
CatArr = RSCat.GetRows
BoolCategorie = True
Else
BoolCategorie = False
End If
RSCat.Close
End If
For Icat = 0 to UBound(SCatArr, 2)
%>
<%
If CStr(SCatArr(0,ICat)) = QSSCategoria Then
If boolCategorie Then
For K = 0 To UBound(CatArr,2)
%>
[img]<%=Path_Img%>catalogo_frecciadx.gif[/img]
<%=CatArr(1,k)%>
<%
Next
End If
End If
Next
Else
%>
<%=NoCategoria%>
<%
End If
%>
</table>
<div align="center"> </div>
<table border="1" width="500" cellspacing="0" cellpadding="3" align="center" bordercolor="#FFFFFF">
<tr>
<td width="190" bgcolor="<%=Tabella_Colore_Titolo%>">
<color=#3A51A8><%=TitoloProdotto%>
</td>
<td width="126" bgcolor="<%=Tabella_Colore_Titolo%>">
<%=TitoloPFoto%>
</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 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 " & " ORDER BY Clng(CPrezzo)"
RS.Open SQL, Conn, 1
End If
If (QSCategoria <> "") Then
SQL = " SELECT * FROM Prodotti WHERE Categoria = "& [QSCategoria] &" AND Cancellato = False" & " ORDER BY Clng(CPrezzo)"
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 width="190" 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>
<%
cIVA = RS("CPrezzo") / 100 * 20
%>
<td width="100" valign="top">
<%=SimboloValuta%> <font color="red"><%=VisualizzaPrezzo(RS("CPrezzo") + cIVA)%></font>
<%=Replace(IvaNonCompresa, "[iva]", RS("IVA"))%>
<%
If Session("Rivenditore") = True Then
%>
<%=TitoloRPrezzo%>:
<%=SimboloValuta%> <font color="red"><%=VisualizzaPrezzo(RS("RPrezzo"))%></font>
<%=Replace(IvaNonCompresa, "[iva]", RS("IVA"))%>
<%
End If
%>
</td>
<td width="50" align="center">
<input type="text" name="quantita" size="2" maxlength="5" value="1">
<input type="hidden" name="ID" value="<%=RS("ID")%>">
<%
If (RS("Giacenza") > 0) OR RS("GiacenzaInfinita") Then
%>
<input type="image" src="<%=Path_Img%>catalogo_aggiungi.gif" name="Go" value="<%=AltPulsante%>" alt="<%=AltPulsante%>" border="0">
<%
Else
%>
[img]<%=Path_Img%>catalogo_stop.gif[/img]" border="0">
<%
End If
%>
</td>
</form>
</tr>
<%
RS.MoveNext
Next
End If
End If
RS.Close
%>
</table>
<%
End If
%>
<div align="center">
<%=Footer%>
</div>
</p>
quello che non vorrei far visualizzare è l'intero catalogo (se non si è registrati o loggati), questo file basta o devo agire su qualche altro? :master: