%
If (id_nota) <> "" Then
%>
<%
Else
%>
<%
Set con = Server.CreateObject("ADODB.Connection")
con.Open data_source
autor_solo_id = Request.QueryString("aid")
if autor_solo_id <> "" Then
autor_solo_sql = " AND (tabla_autores.id_autor="&autor_solo_id&") "
End If
Function getFilePath()
lsPath = Request.ServerVariables("SCRIPT_NAME")
arPath = Split(lsPath, "/")
arPath(UBound(arPath,1)) = ""
GetFilePath = Join(arPath, "/")
End Function
'Response.Write getFilePath()
Select case getFilePath()
case "/opinion/":
alCateMostrar = " AND (tabla_notas.id_categoria=1) AND (tabla_notas.alcat=0) "
titulo_cate = " Opinión "
case "/derechos-humanos/":
alCateMostrar = " AND (tabla_notas.id_categoria=1) AND (tabla_notas.alcat=2) "
titulo_cate = " Derechos Humanos "
filtrando_autores = "uno"
case "/Dialogo-Latino-Cubano/":
alCateMostrar = " AND (tabla_notas.id_categoria=1) AND (tabla_notas.alcat=4) "
titulo_cate = " Diálogo Latino-Cubano "
case "/cultura/":
alCateMostrar = " AND (tabla_notas.alcat=1) "
agregoResenasAcultura = " or tabla_notas.id_categoria = 28 "
titulo_cate = " Cultura "
case "/rankings/":
alCateMostrar = " AND (tabla_notas.id_categoria=117) "
titulo_cate = " Rankings "
case "/indices/":
alCateMostrar = " AND (tabla_notas.id_categoria=81) "
titulo_cate = " Indices "
indicesEsta = "uno"
case "/ChinaLatam/":
alCateMostrar = " AND (tabla_notas.id_categoria=1) AND (tabla_notas.alcat=6) "
titulo_cate = " Elecciones "
case "/elecciones/":
alCateMostrar = " AND (tabla_notas.id_categoria=1) AND (tabla_notas.alcat=3) "
titulo_cate = " Elecciones "
case "/libros/":
alCateMostrar = " AND (tabla_notas.id_categoria=28) "
titulo_cate = " Libros "
case "/e-books/":
alCateMostrar = " AND (tabla_notas.id_categoria=91) "
titulo_cate = " Libros "
case "/entrevistas/":
alCateMostrar = " AND (tabla_notas.id_categoria=20) "
titulo_cate = " Entrevistas "
case "/internacionales/":
alCateMostrar = " AND (tabla_notas.id_categoria=1) AND (tabla_notas.alcat=5) "
titulo_cate = " Internacionales "
case else:
alCateMostrar = " AND (tabla_notas.id_categoria=1) AND (tabla_notas.alcat=0) "
titulo_cate = " Opinión "
End Select
%>
<%=titulo_cate%>
<%
If autor_solo_id <> "" Then
strSQL = "SELECT tabla_autores.nombre_autor, tabla_notas.id_nota, tabla_notas.id_categoria, tabla_notas.alCat, tabla_notas.titulo, tabla_notas.copete, tabla_notas.volanta, tabla_notas.pdf_file, tabla_notas.fecha, tabla_paises.pais, tabla_autores.id_autor, tabla_autores.tw, tabla_autores.foto, tabla_autores.foto200x200, tabla_paises.id_pais FROM tabla_paises INNER JOIN (tabla_autores INNER JOIN tabla_notas ON tabla_autores.id_autor = tabla_notas.id_autor) ON tabla_paises.id_pais = tabla_notas.id_pais WHERE (tabla_notas.id_categoria=1) AND (tabla_notas.estatu=1) AND (tabla_notas.ana=1) AND (tabla_notas.id_autor<>776) "&autor_solo_sql&" ORDER BY tabla_notas.fecha DESC"
Else
If filtrando_autores = "uno" Then
filtrando_autores_sql = " AND ((tabla_notas.id_autor=346) OR (tabla_notas.id_autor=346) OR (tabla_notas.id_autor=30) OR (tabla_notas.id_autor=900) OR (tabla_notas.id_autor=904) OR (tabla_notas.id_autor=209) OR (tabla_notas.id_autor=156) OR (tabla_notas.id_autor=837) OR (tabla_notas.id_autor=320) OR (tabla_notas.id_autor=553) OR (tabla_notas.id_autor=855) OR (tabla_notas.id_autor=857) OR (tabla_notas.id_autor=623) OR (tabla_notas.id_autor=1038) OR (tabla_notas.id_autor=888) OR (tabla_notas.id_autor=239) OR (tabla_notas.id_autor=1024) OR (tabla_notas.id_autor=1038))"
'346 machin fajardo
'30 librado
'791 mcm ------- ESTE VA PARA CADAL
'900 Marlene azor
'1027 Ivenique ----- ESTE VA PARA CADAL
'209 Navia
'156 Jorge elias
'837 Isola
'320 Andrés Cañizales
'553 Jaime Malamud Goti
'855 Leandro Querido
'857 Dagoberto Valdés Hernández
'623 Haroldo Dilla Alfonso
'1038 Rosalia Viñas Lazo
'888 Reinaldo Cosano Alén
'239 Luis Cino Alvarez
'1024 Rolando Pupo Carralero
'904 Loris Zanatta
strSQL = "SELECT tabla_autores.nombre_autor, tabla_notas.id_nota, tabla_notas.id_categoria, tabla_notas.alCat, tabla_notas.titulo, tabla_notas.copete, tabla_notas.volanta, tabla_notas.pdf_file, tabla_notas.fecha, tabla_paises.pais, tabla_autores.id_autor, tabla_autores.tw, tabla_autores.foto, tabla_autores.foto200x200, tabla_paises.id_pais FROM tabla_paises INNER JOIN (tabla_autores INNER JOIN tabla_notas ON tabla_autores.id_autor = tabla_notas.id_autor) ON tabla_paises.id_pais = tabla_notas.id_pais WHERE (tabla_notas.id_categoria=1 or tabla_notas.id_categoria=117 "&agregoResenasAcultura&") AND (tabla_notas.estatu=1) AND (tabla_notas.ana=1) AND (tabla_notas.id_autor<>776) "&alCateMostrar&" "&filtrando_autores_sql&" ORDER BY tabla_notas.fecha DESC"
Else
If indicesEsta = "uno" Then
strSQL = "SELECT tabla_autores.nombre_autor, tabla_notas.id_nota, tabla_notas.id_categoria, tabla_notas.alCat, tabla_notas.titulo, tabla_notas.copete, tabla_notas.volanta, tabla_notas.pdf_file, tabla_notas.fecha, tabla_paises.pais, tabla_autores.id_autor, tabla_autores.tw, tabla_autores.foto, tabla_autores.foto200x200, tabla_paises.id_pais FROM tabla_paises INNER JOIN (tabla_autores INNER JOIN tabla_notas ON tabla_autores.id_autor = tabla_notas.id_autor) ON tabla_paises.id_pais = tabla_notas.id_pais WHERE ((tabla_notas.estatu=1) AND (tabla_notas.id_categoria=81) AND (tabla_notas.ana=1) AND (tabla_notas.id_autor<>776)) ORDER BY tabla_notas.fecha DESC"
Else
strSQL = "SELECT tabla_autores.nombre_autor, tabla_notas.id_nota, tabla_notas.id_categoria, tabla_notas.alCat, tabla_notas.titulo, tabla_notas.copete, tabla_notas.volanta, tabla_notas.pdf_file, tabla_notas.fecha, tabla_paises.pais, tabla_autores.id_autor, tabla_autores.tw, tabla_autores.foto, tabla_autores.foto200x200, tabla_paises.id_pais FROM tabla_paises INNER JOIN (tabla_autores INNER JOIN tabla_notas ON tabla_autores.id_autor = tabla_notas.id_autor) ON tabla_paises.id_pais = tabla_notas.id_pais WHERE (tabla_notas.id_categoria=1 or tabla_notas.id_categoria=117 "&agregoResenasAcultura&") AND (tabla_notas.estatu=1) AND (tabla_notas.ana=1) AND (tabla_notas.id_autor<>776) "&alCateMostrar&" "&autor_solo_sql&" ORDER BY tabla_notas.fecha DESC"
End If
End If
End If
'Response.Write strSQL
'################################################################################################################## paginacion
Dim mostrar 'cantidad de registros a mostrar por página
Dim cant_paginas 'cantidad de páginas que recibimos
Dim pagina_actual 'La página que mostramos
Dim registro_mostrado 'Contador utilizado para mostrar las páginas
Dim I 'Variable Loop
Dim otras 'variable para pasar numero de pagina
mostrar = 500
pagina_a_mostrar = Request.QueryString("page")
'========================================================================
If len(pagina_a_mostrar) > 2 Then
Response.Redirect "https://www.cadal.org?error=Verificar_Link"
Response.End()
End If
If Not isNumeric(pagina_a_mostrar) Then
Response.Redirect "https://www.cadal.org?error=Verificar_Link"
Response.End()
End If
'========================================================================
If pagina_a_mostrar = "" Then
pagina_actual = 1
Else
pagina_actual = CInt(pagina_a_mostrar)
End If
'========================================================================
Set RS = Server.CreateObject("ADODB.Recordset")
RS.PageSize = mostrar
RS.CacheSize = mostrar
RS.Open strSQL, con,3,1
If Not RS.EOF Then
id_categoria = RS.Fields("id_categoria")
End If
'contamos las páginas que se formaron con la variable mostrar.
cant_paginas = RS.PageCount
total_de_articulos = RS.RecordCount
' Si el pedido de página cae afuera del rango,
' lo modificamos para que caiga adentro
If pagina_actual > cant_paginas Then pagina_actual = cant_paginas
If pagina_actual < 1 Then pagina_actual = 1
' Si la cantidad de páginas da 0 es que no hay registros... por eso este IF
If cant_paginas = 0 Then
Response.Write "No hay registros..."
Else
' Nos movemos a la página elegida
RS.AbsolutePage = pagina_actual
' Mostramos el dato de que página estamos...
variable_para_el_page_title = 1
'Response.Write "
"&total_de_articulos&""
Do While registro_mostrado < mostrar And Not RS.EOF
If not RS.EOF Then
titulo_nota = RS.fields("titulo")
volanta = RS.fields("volanta")
nombre_autor = RS.fields("nombre_autor")
id_nota = RS.fields("id_nota")
id_categoria = RS.fields("id_categoria")
fotoRectangu = RS.fields("foto")
foto200x200 = RS.fields("foto200x200")
copete = RS.fields("copete")
copete = mid(copete,1,500)
dates = RS.fields("fecha")
pdf_file = RS.fields("pdf_file")
id_autor = RS.fields("id_autor")
tw = RS.fields("tw")
End If
'If id_categoria = 1 Then 'PUBLICACIONES
'----------------- la fecha
%><%
'-----------------------------------------------
If id_categoria = 91 Then target_va = "target=""_OpenWindow""" End If
Response.Write "
"
'### -- VOLANTA ---###
Response.Write "
"&volanta&"
"
'### -- TITULO NOTA ---###
Response.Write "
"&titulo_nota&"
"
If id_categoria = 20 Then ' .. bien, esto está comentado... pero no puede quedar así, hay que agregar las fotitos....
FotoEvenPD = "SELECT id_nota, file_name, foto_title FROM listado_140w WHERE listado_140w.id_nota = "& id_nota
Set rsFotPD = Server.CreateObject("ADODB.Recordset")
rsFotPD.Open FotoEvenPD, con,3,1
If Not rsFotPD.EOF Then
file_name = rsFotPD.Fields("file_name")
foto_title = rsFotPD.Fields("foto_title")
End If
rsFotPD.Close
Set rsFotPD = Nothing
'Response.Write "
"
file_name = ""
foto_title = ""
Else
'### -- FOTO AUTOR ---###
' If id_categoria <> 91 Then 'Saco por ahora la foto del autor del E-BOOK, pero hay que agregar la tapa!
'
'
' If foto200x200 <> "" Then
'
' Response.Write "
"
' Else
'
' If id_autor <> 133 Then
' If fotoRectangu <> "" Then
' Response.Write "
"
' Else
' Response.Write "
"&nombre_autor&"
"
' End If
'
' End If
'
' End If
' End If
End If
'### -- FECHA ---###
Response.Write "
"&la_fecha&"
"
'### -- FUENTE //// COPETE ---###
If copete <> "" Then
Response.Write "
"& copete & "
"
End If
If id_autor <> 478 And id_autor <> 133 Then '478 es Analat
Response.Write "
"&nombre_autor&"
"
End If
'### -- AUTOR ---###
If id_categoria <> 20 And id_categoria <> 91 Then
If id_autor <> 478 Then
sql="SELECT Count(tabla_notas.id_autor) AS SumOfid_autor FROM tabla_autores INNER JOIN tabla_notas ON tabla_autores.id_autor = tabla_notas.id_autor where (tabla_notas.id_autor="&id_autor&")"
Set rsAut = Server.CreateObject("ADODB.Recordset")
rsAut.Open sql, con,3,1
SumOfid_autore = rsAut.fields("SumOfid_autor")
rsAut.Close
Set rsAut=Nothing
If SumOfid_autore > 1 Then
Response.Write "
Ver todos los artículos del autor
"
End If
End If
Response.Write "
"
Response.Write "
"
Response.Write "
"
If tw <> "" Then PorTuitero = tw Else PorTuitero = "" End If
Response.Write "
"
Response.Write "
"
Response.Write "
"
End If
Response.Write "
"'cierro cajaArtics
'End If
registro_mostrado = registro_mostrado + 1
RS.MoveNext
Loop
RS.Close
Set RS = Nothing
End If
%>