<%
' conexion a la base de datos
Dim oConn, RS, id_1, fecha_1, imagen_1_5, titulo_1, subtitulo_1, recorte_1_5, mostrar, pag_totales, pag_actual
existe_2=0
existe_3=0
existe_4=0
existe_5=0
'Conectamos a la BD.
Set oConn = Server.CreateObject("ADODB.Connection")
Set RS = Server.CreateObject("ADODB.RecordSet")
oConn.Open conexion_neo
sql = "SELECT * FROM noticias ORDER BY ID DESC"
RS.Open sql, oConn,1,1
mostrar = 5
rs.PageSize = mostrar
rs.CacheSize = mostrar
if Request.Querystring("pagina")="" then
pag_actual=1
else
pag_actual=CInt(Request.Querystring("pagina"))
end if
pag_totales = rs.PageCount
if pag_actual < 1 then
pag_actual = 1
end if
if pag_actual > pag_totales then
pag_actual = pag_totales
end if
if pag_totales=0 then
Response.Write("No hay datos ")
else
rs.AbsolutePage = pag_actual
cant_registros = 0
'variables producto 9
id_1=RS("Id")
fecha_1=RS("fecha")
imagen_1=RS("Imagen1")
titulo_1=RS("titulo")
subtitulo_1=RS("subtitulo")
contenido_1=Left(RS("contenido"),100)
RS.MoveNext
end if
if not RS.EOF then
existe_2=1
id_2=RS("Id")
fecha_2=RS("fecha")
imagen_2=RS("Imagen1")
titulo_2=RS("titulo")
subtitulo_2=RS("subtitulo")
contenido_2=Left(RS("contenido"),150)
RS.MoveNext
end if
if not RS.EOF then
existe_3=1
id_3=RS("Id")
fecha_3=RS("fecha")
imagen_3=RS("Imagen1")
titulo_3=RS("titulo")
subtitulo_3=RS("subtitulo")
RS.MoveNext
end if
if not RS.EOF then
existe_4=1
id_4=RS("Id")
fecha_4=RS("fecha")
imagen_4=RS("Imagen1")
titulo_4=RS("titulo")
subtitulo_4=RS("subtitulo")
RS.MoveNext
end if
if not RS.EOF then
existe_5=1
id_5=RS("Id")
fecha_5=RS("fecha")
imagen_5=RS("Imagen1")
titulo_5=RS("titulo")
subtitulo_5=RS("subtitulo")
RS.MoveNext
end if
RS.Close
oConn.Close
Set RS = nothing
Set oConn = nothing
%>