%
nivel = 1
session("idi_error") = "en"
IdSeccion = 2
Acceso = 2
IdTipo = ValidaId(Request("IdTipo"))
IdProducto = ValidaId(Request("IdProducto"))
set cnn = AbrirConexionMDB()
CodigoEncabezado "Matadero de Pamplona", true, nivel
EncabezadoMenu IdSeccion, Acceso, IdTipo
if cint(IdProducto) = 0 then
if cint(IdTipo) = 0 then
'tipos superiores%>
<%else
strWhere = "SELECT * FROM TiposE WHERE IdPadre=" & IdTipo & " AND Activo=1 ORDER BY Prioridad, TipoEN"
set rs=server.createObject("adodb.recordset")
rs.Open strWhere, cnn, 1, 1
if not rs.eof then
'subtipos de un tipo
while not rs.eof%>
<%rs.movenext
wend%>
<%else
strWhere = "SELECT * FROM ProductosE WHERE IdTipo=" & IdTipo & " AND Activo=1 ORDER BY Prioridad, TituloEN"
set rs2=server.createObject("adodb.recordset")
rs2.Open strWhere, cnn, 1, 1
if not rs2.eof then
'productos de un tipo
if rs2.recordcount > 1 then
while not rs2.eof%>
<%rs2.movenext
wend%>
<%else
'solo hay un producto dentro de un tipo
response.redirect "productosE.asp?IdTipo=" & IdTipo & "&IdProducto=" & rs2("IdProducto")
end if
else%>
No products available.
<%end if
end if
end if
else
'ficha producto
strWhere = "SELECT * FROM ProductosE WHERE IdProducto=" & IdProducto
set rs=server.createObject("adodb.recordset")
rs.Open strWhere, cnn, 1, 1%>
<%=ucase(rs("TituloEN"))%>
<%if rs("TextoEN") <> "" then%>
DESCRIPTION<%=rs("TextoEN")%>
<%end if
if rs("PresentacionEN") <> "" then%>
PRESENTATION<%=rs("PresentacionEN")%>
<%end if
if rs("FichaEN") <> "" then%>
" target="_blank" class="boton">Download card
<%end if%>
"" then%>style="background-image:url('../Argazkiak/<%=rs("Imagen")%>');"<%end if%>>
<%end if%>
<%Creditos%>