Noticias
<%
sql = "SELECT Noticias.idNoticia, Noticias.Fecha, Noticias.Titular, Noticias.Noticia, Noticias.Fuente, NoticiasCategorias.NoticiaCategoria, Noticias.Foto FROM Noticias INNER JOIN NoticiasCategorias ON NoticiasCategorias.idNoticiaCategoria = Noticias.idNoticiaCategoria WHERE Noticias.OK = 1 ORDER BY Noticias.Fecha DESC"
idNoticia = 0
Fecha = 1
Titular = 2
Noticia = 3
Fuente = 4
NoticiaCategoria = 5
Foto = 6
connOpen conn
set rsProductos = conn.Execute(sql)
if not rsProductos.EOF then
ArrNoticias = rsProductos.GetRows
consulta = true
else
consulta = false
end if
rsProductos.close
set rsProductos = nothing
connClose conn
if consulta = true then
if Ubound(ArrNoticias,2) > 1 then
max_noticias = 1
else
max_noticias = Ubound(ArrNoticias,2)
end if
for i = 0 to max_noticias%>
<%if ArrNoticias(Foto,i) <> "" then%>
<%end if%>
<%=ArrNoticias(Titular,i)%>
<%=UCase(ArrNoticias(NoticiaCategoria,i))%> - <%=ArrNoticias(Fecha,i)%>
<%=CortarStr(FormatStr(ArrNoticias(Noticia,i)),350)%>
...leer más
<%next%>
<%if max_noticias < Ubound(ArrNoticias,2) then %>
Otros titulares:
<% for i = i to Ubound(ArrNoticias,2)%>
<%if i mod 2 = 0 then%>
<%end if%>
|
<%if ArrNoticias(Foto,i) <> "" then%>
<%end if%>
<%=UCase(ArrNoticias(NoticiaCategoria,i))%>
<%=ArrNoticias(Titular,i)%>
...leer más
|
<%if i+1 mod 2 = 0 then%>
<%end if%>
<%next%>
<%end if%>
<%end if%>