%@LCID = 1034%>
<%
'
' Filename: actualidad.asp
' Generated with CodeCharge 2.0.7
' ASP 2.0 & Templates.ccp build 11/30/2001
'
'-------------------------------
' actualidad CustomIncludes begin
%>
<%
' actualidad CustomIncludes end
'-------------------------------
'===============================
' Save Page and File Name available into variables
'-------------------------------
sFileName = "actualidad.asp"
sTemplateFileName = "actualidad3.html"
'===============================
'===============================
' actualidad PageSecurity begin
' actualidad PageSecurity end
'===============================
'===============================
' actualidad Open Event begin
' actualidad Open Event end
'===============================
'===============================
' actualidad OpenAnyPage Event begin
' actualidad OpenAnyPage Event end
'===============================
'===============================
'Save the name of the form and type of action into the variables
'-------------------------------
sAction = GetParam("FormAction")
sForm = GetParam("FormName")
'===============================
' actualidad Show begin
'===============================
' Display page
'-------------------------------
' Load HTML template for this page
'-------------------------------
LoadTemplate sAppPath & sTemplateFileName, "main"
'-------------------------------
' Load HTML template of Header and Footer
'-------------------------------
'-------------------------------
SetVar "FileName", sFileName
'-------------------------------
' Step through each form
'-------------------------------
noticias_Show
columna1_Show
cursos_Show
jornadas_Show
'-------------------------------
' Process page templates
'-------------------------------
Parse "main", False
'-------------------------------
' Output the page to the browser
'-------------------------------
Response.write PrintVar("main")
' actualidad Show end
'-------------------------------
' Destroy all object variables
'-------------------------------
' actualidad Close Event begin
' actualidad Close Event end
cn.Close
Set cn = Nothing
UnloadTemplate
'===============================
'===============================
' Display Grid Form
'-------------------------------
Sub noticias_Show()
'-------------------------------
' Initialize variables
'-------------------------------
Dim rs
Dim sWhere : sWhere = ""
Dim sOrder : sOrder = ""
Dim sSQL : sSQL = ""
Dim sFormTitle: sFormTitle = "noticias"
Dim HasParam : HasParam = false
Dim iRecordsPerPage : iRecordsPerPage = 1
Dim iCounter : iCounter = 0
SetVar "TransitParams", ""
SetVar "FormParams", ""
'-------------------------------
' Build ORDER BY statement
'-------------------------------
sOrder = " order by n.fecha Desc"
'-------------------------------
' Build base SQL statement
'-------------------------------
sSQL = "select n.Id as n_Id, " & _
"n.fecha as n_fecha, " & _
"n.foto as n_foto, " & _
"n.lugar as n_lugar, " & _
"n.parrafo1 as n_parrafo1, " & _
"n.sumario as n_sumario, " & _
"n.titular as n_titular " & _
" from noticias n "
'-------------------------------
'-------------------------------
' noticias Open Event begin
' noticias Open Event end
'-------------------------------
'-------------------------------
' Assemble full SQL statement
'-------------------------------
sSQL = sSQL & sWhere & sOrder
'-------------------------------
SetVar "FormTitle", sFormTitle
'-------------------------------
' Open the recordset
'-------------------------------
openStaticRS rs, sSQL
'-------------------------------
'-------------------------------
' Process empty recordset
'-------------------------------
if rs.eof then
set rs = nothing
SetVar "DListnoticias", ""
Parse "noticiasNoRecords", False
Parse "Formnoticias", False
exit sub
end if
'-------------------------------
'-------------------------------
' Initialize page counter and records per page
'-------------------------------
iRecordsPerPage = 1
iCounter = 0
'-------------------------------
'-------------------------------
' Display grid based on recordset
'-------------------------------
while not rs.EOF and iCounter < iRecordsPerPage
'-------------------------------
' Create field variables based on database fields
'-------------------------------
fldfecha = GetValue(rs, "n_fecha")
fldfoto = GetValue(rs, "n_foto")
fldId = GetValue(rs, "n_Id")
fldlugar = GetValue(rs, "n_lugar")
fldparrafo1 = GetValue(rs, "n_parrafo1")
fldsumario = GetValue(rs, "n_sumario")
fldtitular_URLLink = "vernoticia.asp"
fldtitular_s_Id = GetValue(rs, "n_Id")
fldtitular = GetValue(rs, "n_titular")
'-------------------------------
' noticias Show begin
'-------------------------------
'-------------------------------
' noticias Show Event begin
fldfecha=FormatDateTime(fldfecha,2)
if fldfoto<>"" then
fldfoto="
| |
|
"&fldcomentariofoto&" | |
"
end if
fldparrafo1=Mid(fldparrafo1, 1, 500)&" ... "
' noticias Show Event end
'-------------------------------
'-------------------------------
' Replace Template fields with database values
'-------------------------------
SetVar "Id", ToHTML(fldId)
SetVar "lugar", ToHTML(fldlugar)
SetVar "fecha", ToHTML(fldfecha)
SetVar "titular", fldtitular
SetVar "titular_URLLink", fldtitular_URLLink
SetVar "Prmtitular_s_Id", ToURL(fldtitular_s_Id)
SetVar "sumario", ToHTML(fldsumario)
SetVar "foto", fldfoto
SetVar "parrafo1", fldparrafo1
'-------------------------------
' Process the record separator
'-------------------------------
if rs.EOF or iCounter = iRecordsPerPage-1 then
SetVar "noticiasRecordSeparator", ""
else
Parse "noticiasRecordSeparator", false
end if
'-------------------------------
Parse "DListnoticias", True
'-------------------------------
' noticias Show end
'-------------------------------
'-------------------------------
' Move to the next record and increase record counter
'-------------------------------
rs.MoveNext
iCounter = iCounter + 1
wend
'-------------------------------
'-------------------------------
' Finish form processing
'-------------------------------
set rs = nothing
SetVar "noticiasNoRecords", ""
Parse "Formnoticias", False
'-------------------------------
' noticias Close Event begin
' noticias Close Event end
'-------------------------------
End Sub
'===============================
'===============================
' Display Grid Form
'-------------------------------
Sub columna1_Show()
'-------------------------------
' Initialize variables
'-------------------------------
Dim rs
Dim sWhere : sWhere = ""
Dim sOrder : sOrder = ""
Dim sSQL : sSQL = ""
Dim sFormTitle: sFormTitle = "notis"
Dim HasParam : HasParam = false
Dim iRecordsPerPage : iRecordsPerPage = 2
Dim iCounter : iCounter = 0
SetVar "TransitParams", ""
SetVar "FormParams", ""
'-------------------------------
' Build ORDER BY statement
'-------------------------------
sOrder = " order by n.fecha Desc"
'-------------------------------
' Build base SQL statement
'-------------------------------
sSQL = "select n.Id as n_Id, " & _
"n.fecha as n_fecha, " & _
"n.link as n_link, " & _
"n.sumario as n_sumario, " & _
"n.titular as n_titular " & _
" from noticias n "
'-------------------------------
'-------------------------------
' columna1 Open Event begin
' columna1 Open Event end
'-------------------------------
'-------------------------------
' Assemble full SQL statement
'-------------------------------
sSQL = sSQL & sWhere & sOrder
'-------------------------------
SetVar "FormTitle", sFormTitle
'-------------------------------
' Open the recordset
'-------------------------------
openStaticRS rs, sSQL
'-------------------------------
'-------------------------------
' Process empty recordset
'-------------------------------
if rs.eof then
set rs = nothing
SetVar "DListcolumna1", ""
Parse "columna1NoRecords", False
Parse "Formcolumna1", False
exit sub
end if
'-------------------------------
'-------------------------------
' Initialize page counter and records per page
'-------------------------------
rs.MoveNext
iRecordsPerPage = 2
iCounter = 0
'-------------------------------
'-------------------------------
' Display grid based on recordset
'-------------------------------
while not rs.EOF and iCounter < iRecordsPerPage
'-------------------------------
' Create field variables based on database fields
'-------------------------------
fldfecha = GetValue(rs, "n_fecha")
fldId = GetValue(rs, "n_Id")
fldlink = GetValue(rs, "n_link")
fldsumario = GetValue(rs, "n_sumario")
fldtitular_URLLink = "vernoticia.asp"
fldtitular_s_Id = GetValue(rs, "n_Id")
fldtitular = GetValue(rs, "n_titular")
fldboton= "boton"
'-------------------------------
' columna1 Show begin
'-------------------------------
'-------------------------------
' columna1 Show Event begin
fldfecha=FormatDateTime(fldfecha,2)
fldsumario=Mid(fldsumario, 1, 200)&" ... "
fldboton = ""
' columna1 Show Event end
'-------------------------------
'-------------------------------
' Replace Template fields with database values
'-------------------------------
SetVar "fecha", ToHTML(fldfecha)
SetVar "titular", ToHTML(fldtitular)
SetVar "titular_URLLink", fldtitular_URLLink
SetVar "Prmtitular_s_Id", ToURL(fldtitular_s_Id)
SetVar "sumario", ToHTML(fldsumario)
SetVar "link", ToHTML(fldlink)
SetVar "boton", fldboton
SetVar "Id", ToHTML(fldId)
Parse "DListcolumna1", True
'-------------------------------
' columna1 Show end
'-------------------------------
'-------------------------------
' Move to the next record and increase record counter
'-------------------------------
rs.MoveNext
iCounter = iCounter + 1
wend
'-------------------------------
'-------------------------------
' Finish form processing
'-------------------------------
set rs = nothing
SetVar "columna1NoRecords", ""
Parse "Formcolumna1", False
'-------------------------------
' columna1 Close Event begin
' columna1 Close Event end
'-------------------------------
End Sub
'===============================
'===============================
' Display Grid Form
'-------------------------------
Sub cursos_Show()
'-------------------------------
' Initialize variables
'-------------------------------
Dim rs
Dim sWhere : sWhere = ""
Dim sOrder : sOrder = ""
Dim sSQL : sSQL = ""
Dim sFormTitle: sFormTitle = "cursos"
Dim HasParam : HasParam = false
Dim iRecordsPerPage : iRecordsPerPage = 3
Dim iCounter : iCounter = 0
Dim iTmpI : iTmpI = 0
Dim iTmpJ : iTmpJ = 0
Dim sCountSQL : sCountSQL = ""
SetVar "TransitParams", ""
SetVar "FormParams", "titulo=" & ToURL(GetParam("titulo")) & "&"
'-------------------------------
' Build WHERE statement
'-------------------------------
ptitulo = GetParam("titulo")
if not isEmpty(ptitulo) then
HasParam = true
sWhere = sWhere & "c.titulo like '%" & replace(ptitulo, "'", "''") & "%'"
end if
if HasParam then
sWhere = " WHERE (hecho='0') AND (" & sWhere & ")"
else
sWhere = " WHERE hecho='0'"
end if
'-------------------------------
' Build ORDER BY statement
'-------------------------------
sOrder = " order by c.fecha Asc"
'-------------------------------
' Build base SQL statement
'-------------------------------
sSQL = "select c.cursoid as c_cursoid, " & _
"c.fecha as c_fecha, " & _
"c.fechas as c_fechas, " & _
"c.modalidad as c_modalidad, " & _
"c.titulo as c_titulo " & _
" from cursos c "
'-------------------------------
'-------------------------------
' cursos Open Event begin
' cursos Open Event end
'-------------------------------
'-------------------------------
' Assemble full SQL statement
'-------------------------------
sSQL = sSQL & sWhere & sOrder
if sCountSQL = "" then
iTmpI = instr(lcase(sSQL), "select")
iTmpJ = instr(lcase(sSQL), "from") - 1
sCountSQL = replace(sSQL, mid(sSQL, iTmpI + 6, iTmpJ - 6), " count(*) ")
iTmpI = instr(lcase(sCountSQl), "order by")
if iTmpI > 1 then sCountSQL = left(sCountSQL, iTmpI - 1)
end if
'-------------------------------
SetVar "FormTitle", sFormTitle
'-------------------------------
' Open the recordset
'-------------------------------
openrs rs, sSQL
'-------------------------------
'-------------------------------
' Process empty recordset
'-------------------------------
if rs.eof then
set rs = nothing
SetVar "DListcursos", ""
Parse "cursosNoRecords", False
Parse "Formcursos", False
exit sub
end if
'-------------------------------
'-------------------------------
' Initialize page counter and records per page
'-------------------------------
iRecordsPerPage = 3
iCounter = 0
'-------------------------------
'-------------------------------
' Display grid based on recordset
'-------------------------------
while not rs.EOF and iCounter < iRecordsPerPage
'-------------------------------
' Create field variables based on database fields
'-------------------------------
fldcursoid = GetValue(rs, "c_cursoid")
fldfecha = GetValue(rs, "c_fecha")
fldfechas = GetValue(rs, "c_fechas")
fldmodalidad = GetValue(rs, "c_modalidad")
fldtitulo_URLLink = "cursos.asp"
fldtitulo_cursoid = GetValue(rs, "c_cursoid")
fldtitulo = GetValue(rs, "c_titulo")
'-------------------------------
' cursos Show begin
'-------------------------------
'-------------------------------
' cursos Show Event begin
fldboton = ""
' cursos Show Event end
'-------------------------------
'-------------------------------
' Replace Template fields with database values
'-------------------------------
SetVar "cursoid", ToHTML(fldcursoid)
SetVar "titulo", ToHTML(fldtitulo)
SetVar "titulo_URLLink", fldtitulo_URLLink
SetVar "Prmtitulo_cursoid", ToURL(fldtitulo_cursoid)
SetVar "fecha", ToHTML(fldfecha)
SetVar "boton", fldboton
SetVar "fechas", ToHTML(fldfechas)
SetVar "modalidad", ToHTML(fldmodalidad)
Parse "DListcursos", True
'-------------------------------
' cursos Show end
'-------------------------------
'-------------------------------
' Move to the next record and increase record counter
'-------------------------------
rs.MoveNext
iCounter = iCounter + 1
wend
'-------------------------------
'-------------------------------
' Finish form processing
'-------------------------------
set rs = nothing
SetVar "cursosNoRecords", ""
Parse "Formcursos", False
'-------------------------------
' cursos Close Event begin
' cursos Close Event end
'-------------------------------
End Sub
'===============================
'===============================
' Display Grid Form
'-------------------------------
Sub jornadas_Show()
'-------------------------------
' Initialize variables
'-------------------------------
Dim rs
Dim sWhere : sWhere = ""
Dim sOrder : sOrder = ""
Dim sSQL : sSQL = ""
Dim sFormTitle: sFormTitle = "jornadas"
Dim HasParam : HasParam = false
Dim iRecordsPerPage : iRecordsPerPage = 2
Dim iCounter : iCounter = 0
Dim iTmpI : iTmpI = 0
Dim iTmpJ : iTmpJ = 0
Dim sCountSQL : sCountSQL = ""
SetVar "TransitParams", ""
SetVar "FormParams", ""
sWhere = " WHERE modalidad='JORNADAS' and hecho='0'"
'-------------------------------
' Build ORDER BY statement
'-------------------------------
sOrder = " order by c.fecha Asc"
'-------------------------------
' Build base SQL statement
'-------------------------------
sSQL = "select c.cursoid as c_cursoid, " & _
"c.fecha as c_fecha, " & _
"c.fechas as c_fechas, " & _
"c.titulo as c_titulo " & _
" from cursos c "
'-------------------------------
'-------------------------------
' jornadas Open Event begin
' jornadas Open Event end
'-------------------------------
'-------------------------------
' Assemble full SQL statement
'-------------------------------
sSQL = sSQL & sWhere & sOrder
if sCountSQL = "" then
iTmpI = instr(lcase(sSQL), "select")
iTmpJ = instr(lcase(sSQL), "from") - 1
sCountSQL = replace(sSQL, mid(sSQL, iTmpI + 6, iTmpJ - 6), " count(*) ")
iTmpI = instr(lcase(sCountSQl), "order by")
if iTmpI > 1 then sCountSQL = left(sCountSQL, iTmpI - 1)
end if
'-------------------------------
SetVar "FormTitle", sFormTitle
'-------------------------------
' Open the recordset
'-------------------------------
openrs rs, sSQL
'-------------------------------
'-------------------------------
' Process empty recordset
'-------------------------------
if rs.eof then
set rs = nothing
SetVar "DListjornadas", ""
Parse "jornadasNoRecords", False
Parse "Formjornadas", False
exit sub
end if
'-------------------------------
'-------------------------------
' Initialize page counter and records per page
'-------------------------------
iRecordsPerPage = 2
iCounter = 0
'-------------------------------
'-------------------------------
' Display grid based on recordset
'-------------------------------
while not rs.EOF and iCounter < iRecordsPerPage
'-------------------------------
' Create field variables based on database fields
'-------------------------------
fldcursoid = GetValue(rs, "c_cursoid")
fldfecha = GetValue(rs, "c_fecha")
fldfechas = GetValue(rs, "c_fechas")
fldtitulo_URLLink = "cursos.asp"
fldtitulo_cursoid = GetValue(rs, "c_cursoid")
fldtitulo = GetValue(rs, "c_titulo")
'-------------------------------
' jornadas Show begin
'-------------------------------
'-------------------------------
' jornadas Show Event begin
fldfecha=ucase(FormatDateTime(fldfecha,1))
fldboton = ""
' jornadas Show Event end
'-------------------------------
'-------------------------------
' Replace Template fields with database values
'-------------------------------
SetVar "cursoid", ToHTML(fldcursoid)
SetVar "titulo", ToHTML(fldtitulo)
SetVar "titulo_URLLink", fldtitulo_URLLink
SetVar "Prmtitulo_cursoid", ToURL(fldtitulo_cursoid)
SetVar "fecha", ToHTML(fldfecha)
SetVar "boton", fldboton
SetVar "fechas", ToHTML(fldfechas)
Parse "DListjornadas", True
'-------------------------------
' jornadas Show end
'-------------------------------
'-------------------------------
' Move to the next record and increase record counter
'-------------------------------
rs.MoveNext
iCounter = iCounter + 1
wend
'-------------------------------
'-------------------------------
' Finish form processing
'-------------------------------
set rs = nothing
SetVar "jornadasNoRecords", ""
Parse "Formjornadas", False
'-------------------------------
' jornadas Close Event begin
' jornadas Close Event end
'-------------------------------
End Sub
'===============================
%>