<% Dim Db1 Set Db1 = CreateObject("ADODB.Connection") Db1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath (".\dades\web.mdb") 'Db1.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & server.MapPath(".\dades\web.mdb") Db1.Open ' Recordset per fer els menus laterals Set RsLlista = Server.CreateObject("ADODB.Recordset") RsLlista.open "SELECT * FROM tauCategoria ORDER BY Ordre ", Db1,0,1 idCategoria = 1 if isnumeric(trim(request("idCategoria"))) then idCategoria = request("idCategoria") idLink = 0 if isnumeric(trim(request("idLink"))) then idLink = request("idLink") ' Recordset per escriure els enllaços Set RsLinks = Server.CreateObject("ADODB.Recordset") RsLinks.open "SELECT * FROM tauLinks WHERE idCategoria = " & idCategoria & " ORDER BY Ordre", Db1,0,1 ' Recordset per escriure els enllaços Set RsDetallLink = Server.CreateObject("ADODB.Recordset") if idLink = 0 then RsDetallLink.open "SELECT TOP 1 * FROM tauLinks WHERE idCategoria = " & idCategoria & " ORDER BY Ordre ", Db1,0,1 else RsDetallLink.open "SELECT * FROM tauLinks WHERE idCategoria = " & idCategoria & " AND idLink = " & idLink & " ", Db1,0,1 end if ' Recordset per dades de la categoria Set RsCategoria = Server.CreateObject("ADODB.Recordset") RsCategoria.open "SELECT * FROM tauCategoria WHERE idCategoria = " & idCategoria & " ", Db1,0,1 %> Òptica Suprem







Productes

<% while not RsLlista.eof %>" class="menu;"><%=RsLlista("NomCategoria")%>

<% RsLlista.movenext wend %>
<% if not RsDetallLink.eof then if trim(RsDetallLink("FotoLink")) <> "" then %> <% else %> <% end if end if%>
<%if not rsCategoria.eof then response.write RsCategoria("NomCategoria")%> / <%if not RsDetallLink.eof then response.write RsDetallLink("NomLink")%>
" width="300" height="150"><%=RsDetallLink("NomLink")%>
<%if not RsDetallLink.eof then response.write RsDetallLink("TexteLink")%>

<% if not RsDetallLink.eof then if trim(RsDetallLink("DireccioLink")) <> "" then %>"><% end if end if%>
— <% if not RsCategoria.eof then while not RsLinks.eof %>&idLink=<%=RsLinks("idLink")%>" class="menu;"><%=replace(trim(RsLinks("NomLink"))," "," ")%> —<% RsLinks.movenext wend end if %>

Rambla del Passeig, 24. 08500 Vic • Tel. 93 886 33 71 • correu-e: optica@opticasuprem.com
<% RsLlista.close RsCategoria.close RsLinks.close RsDetallLink.close Db1.Close Set Db1=Nothing %>