%
' Constantes
const kAlto = 100
Function Leer_Noticias(anys)
Dim oConn, SQL, rstMenu, strResul
Const kLongitud = 160
Const kNoticias = 30
Dim numero_noticia
Dim noticias_por_pagina
Dim pagina
dim camara
'Creo el objeto Connection
set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open = "DSN=colegiosanroque.org.sanroque"
'oConn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:\Inetpub\wwwroot\cordon.mdb;"
SQL = "Select * From Infantil_Noticia" + cstr(anys) + " Where (Caducidad is null or Caducidad > now()) Order By Fecha Desc"
set rstMenu = Server.CreateObject ("ADODB.Recordset")
rstMenu.Open SQL, oConn, 3, 1 ' Static - ReadOnly
numero_noticia=0
'Inicializamos las noticias por pagina que mostramos Esta definido en noticia.asp
noticias_por_pagina=4
while not rstMenu.eof
pagina= numero_noticia \ noticias_por_pagina
camara = ""
if rstMenu.fields("imagen") <> "" then
camara = "
"
end if
strResul = strResul & "
"
strResul = strResul & " | " & rstMenu.fields("Fecha") & " " & rstMenu.fields("Descripcion") & "" & camara & " | "
strResul = strResul & "
"
rstMenu.movenext
numero_noticia=numero_noticia + 1
wend
if (strResul = "") then
response.write("| No hay noticias |
")
else
response.write(strResul)
end if
rstMenu.close
set rstMenu =nothing
oConn.close
set oConn = nothing
end function
%>
|
Podrá descargar en formato PDF e imprimir
las unidades que
trabajaremos
durante el curso:
|
|
41 KB |
|
|
84 KB |
|
|
83 KB |
|
|
43 KB |
|
|
42 KB |
|
|
42 KB |
|
|
42 KB |
También podrá descargar en formato PDF e imprimir los ejercicios
de
apoyo
recomendados para hacer en casa:
|
|
Espronceda 1 · Tlf. 965 33 15 60 · 03803 Alcoy (Alicante) · infantil@colegiosanroque.org |