%
'---------------------------------------------
'---levantar parámetros ----------------------
'---------------------------------------------
numero = request.querystring("numero")
'---------------------------------------------
'--- Abrir las conexiones db------------------
'---------------------------------------------
%>
<%
set rs = server.createobject("adodb.recordset")
if numero > "" then
condicion = " WHERE NUMERO = " & numero
else
condicion = " WHERE FECHA <= NOW() "
end if
sql = "SELECT * FROM TH_EDICIONES " & condicion & " ORDER BY FECHA DESC"
rs.open sql, cn, 3
if not rs.eof then
numero = rs("NUMERO")
anio = rs("ANIO")
fecha = rs("FECHA")
end if
dim dia(7)
dia(1) = "Domingo"
dia(2) = "Lunes"
dia(3) = "Martes"
dia(4) = "Miércoles"
dia(5) = "Jueves"
dia(6) = "Viernes"
dia(7) = "Sábado"
dim mes(12)
mes(1) = "Enero"
mes(2) = "Febrero"
mes(3) = "Marzo"
mes(4) = "Abril"
mes(5) = "Mayo"
mes(6) = "Junio"
mes(7) = "Julio"
mes(8) = "Agosto"
mes(9) = "Setpiembre"
mes(10) = "Octubre"
mes(11) = "Noviembre"
mes(12) = "Diciembre"
if fecha > "" then
'm_fecha = dia(weekday(fecha)) & " " & day(fecha) & " de " & mes(month(fecha)) & " de " & year(fecha)
m_fecha = mes(month(fecha)) & " de " & year(fecha)
end if
rs.close
'---------------------------------------------
'--- Levantar editoriales --------------------
'---------------------------------------------
'sql = "select * from th_homes inner join th_tipocomentarios on th_homes.id_tipo = th_tipocomentarios.id where numero = " & numero & " and th_tipocomentarios.nombre like '%Editorial%'"
'sql = "SELECT TH_COMENTARIOS.*, TH_COLABORADORES.*, TH_HOMES.*, TH_HOMES.DESCRIPCION HOM_DESCRIPCION, TH_HOMES.EXTRA AS HOM_EXTRA, TH_COMENTARIOS.NOMBRE AS TIP_NOMBRE, TH_COLABORADORES.EMAIL AS COL_EMAIL, TH_COLABORADORES.NOMBRE AS COL_NOMBRE FROM TH_HOMES INNER JOIN TH_COMENTARIOS ON TH_HOMES.ID_TIPO = TH_COMENTARIOS.ID_TIPO LEFT JOIN TH_COLABORADORES ON TH_HOMES.AUTOR = TH_COLABORADORES.ID WHERE TH_HOMES.NUMERO = " & numero & " AND TH_COMENTARIOS.NUMERO = TH_HOMES.NUMERO ORDER BY POSICION, TH_HOMES.PRIORIDAD, TH_HOMES.ID "
sql = "SELECT *, TH_HOMES.DESCRIPCION AS HOM_DESCRIPCION, TH_HOMES.EXTRA AS HOM_EXTRA, TH_TIPOCOMENTARIOS.NOMBRE AS TIP_NOMBRE, TH_COLABORADORES.EMAIL AS COL_EMAIL, TH_COLABORADORES.NOMBRE AS COL_NOMBRE FROM TH_HOMES INNER JOIN TH_TIPOCOMENTARIOS ON TH_HOMES.ID_TIPO = TH_TIPOCOMENTARIOS.ID LEFT JOIN TH_COLABORADORES ON TH_HOMES.AUTOR = TH_COLABORADORES.ID WHERE numero = " & numero & " ORDER BY POSICION, PRIORIDAD, TH_HOMES.ID"
rs.open sql, cn, 3
while not rs.eof
e_nombre = rs("NOMBRE")
if e_nombre > "" then e_nombre = FN_Reemplazar_Caracteres(e_nombre, """, chr(34))
e_sumario = rs("NOMBRE_SUMARIO")
if e_sumario > "" then e_sumario = FN_Reemplazar_Caracteres(e_sumario, """, chr(34))
e_tiponombre = rs("TIP_NOMBRE")
e_descripcion = rs("HOM_DESCRIPCION")
if e_descripcion > "" then e_descripcion = FN_Reemplazar_Caracteres(e_descripcion, """, chr(34))
e_idautor = rs("AUTOR")
e_imagen = rs("IMAGEN")
e_ancho = rs("ANCHO")
e_alto = rs("ALTO")
e_alt = rs("NOMBRE_ALT")
if e_alt > "" then e_alt = FN_Reemplazar_Caracteres(e_alt, """, chr(34))
e_autormail = rs("COL_EMAIL")
e_autornombre = rs("COL_NOMBRE")
e_autorextra = rs("HOM_EXTRA")
e_link = rs("LINK")
e_titulo = rs("TITULO_LINK")
e_fondo = rs("FONDO")
e_letra = rs("LETRA")
e_posicion = rs("POSICION")
select case e_tiponombre
case "Editorial"
editorial = ""
editorial = editorial & "
"
editorial = editorial & " "
editorial = editorial & " "
editorial = editorial & " "
editorial = editorial & " Editorial "
editorial = editorial & " "
editorial = editorial & " "
editorial = editorial & " " & e_nombre & " "
editorial = editorial & " "
editorial = editorial & "
"
editorial = editorial & " "
editorial = editorial & " "
editorial = editorial & " "
editorial = editorial & " "
editorial = editorial & " "
editorial = editorial & " "
editorial = editorial & e_descripcion
editorial = editorial & " "
editorial = editorial & " " & e_titulo & " "
editorial = editorial & " "
editorial = editorial & "
"
editorial = editorial & " "
editorial = editorial & " "
editorial = editorial & " "
editorial = editorial & " "
editorial = editorial & " "
editorial = editorial & "
"
case else
if e_posicion = 1 then
'--- Columna izquierda ----
info = info & ""
info = info & " "
info = info & " "
if e_fondo > "" then
e_estiloUp = "bgcolor='" & e_fondo & "' style='BORDER-RIGHT: #555555 1px solid; BORDER-LEFT: #555555 1px solid; BORDER-TOP: #555555 1px solid'"
e_estiloBot = "bgcolor='" & e_fondo & "' style='BORDER-RIGHT: #555555 1px solid; BORDER-LEFT: #555555 1px solid; BORDER-BOTTOM: #555555 1px solid'"
else
e_estiloUp = ""
e_estiloBot = ""
end if
info = info & " "
info = info & " "
info = info & " "
info = info & " "
info = info & " " & e_tiponombre & " "
info = info & " " & e_nombre & " "
if e_idautor > 0 then
info = info & " por " & e_autornombre & " " & e_autorextra & " "
end if
info = info & "
"
info = info & " "
info = info & " "
if e_estiloBot > "" then
info = info & "
"
info = info & " "
info = info & " "
info = info & "
"
info = info & " "
end if
info = info & " "
info = info & " "
info = info & " "
info = info & " "
info = info & " "
info = info & e_descripcion
info = info & " "
info = info & " " & e_titulo & " "
info = info & " "
info = info & " "
if e_estiloUp = "" then
info = info & " "
end if
info = info & "
"
info = info & " "
info = info & " "
info = info & " "
info = info & "
"
info = info & ""
else
'--- Columna derecha ----
if e_fondo > "" then
e_estiloUp = "bgcolor='" & e_fondo & "' style='BORDER-RIGHT: #555555 1px solid; BORDER-LEFT: #555555 1px solid; BORDER-TOP: #555555 1px solid'"
e_estiloBot = "bgcolor='" & e_fondo & "' style='BORDER-RIGHT: #555555 1px solid; BORDER-LEFT: #555555 1px solid; BORDER-BOTTOM: #555555 1px solid'"
else
e_estiloUp = ""
e_estiloBot = ""
end if
infoD = infoD & ""
infoD = infoD & " "
infoD = infoD & " "
infoD = infoD & " "
infoD = infoD & " " & e_tiponombre & " "
infoD = infoD & " " & e_nombre & " "
infoD = infoD & "
"
infoD = infoD & " "
infoD = infoD & " "
if e_estiloBot > "" then
infoD = infoD & "
"
infoD = infoD & " "
infoD = infoD & " "
infoD = infoD & "
"
infoD = infoD & " "
end if
infoD = infoD & " "
infoD = infoD & " "
infoD = infoD & " "
infoD = infoD & " "
if instr(1,e_imagen,"swf") > 0 then
infoD = infoD & " "
infoD = infoD & " "
infoD = infoD & " "
infoD = infoD & " "
else
if e_link > "" then
infoD = infoD & " "
else
infoD = infoD & " "
end if
end if
infoD = infoD & " "
infoD = infoD & " "
infoD = infoD & " "
infoD = infoD & " "
infoD = infoD & e_descripcion
infoD = infoD & " "
infoD = infoD & " "
infoD = infoD & " "
if e_link > "" then
infoD = infoD & " " & e_titulo & " "
end if
infoD = infoD & "
"
infoD = infoD & " "
infoD = infoD & " "
infoD = infoD & "
"
infoD = infoD & ""
end if
end select
rs.movenext
wend
rs.close
'---------------------------------------------
'--- Cerrar las conexiones a db --------------
'---------------------------------------------
set rs = nothing
cn.close
set cn = nothing
'---------------------------------------------
'--- Funciones auxiliares --------------------
'---------------------------------------------
function FN_Reemplazar_Caracteres(cadena, OldStr, NewStr)
dim Pos1
dim Pos2
Pos1 = InStr(1, cadena, OldStr, 0)
Pos2 = Pos1 + len(OldStr)
do until Pos1 = 0
cadena = Left(cadena, Pos1 - 1) & NewStr & Mid(cadena, Pos2)
Pos1 = InStr(1, cadena, OldStr, Busqueda)
Pos2 = Pos1 + len(OldStr)
loop
FN_Reemplazar_Caracteres = cadena
end function
%>
The Howl
<%=m_fecha%>
Año <%=anio%>, Número <%=numero%>
<%=editorial%>