Liturgia Horarum on-line
<%
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
%>
<%
tiempolocal=Request.querystring("tiempo")
if tiempolocal=1 then
directorio="advnav/"
elseif tiempolocal=2 then
directorio="quadpasch/"
elseif tiempolocal=3 then
directorio="perannum/"
elseif tiempolocal=4 then
directorio="completorium/"
end if
destino=Request.querystring("archivo")
if isnull(destino) or len(destino)=0 then
if tiempolocal=1 then
destino="adv-nav"
elseif tiempolocal=2 then
destino="quadr-pasch"
elseif tiempolocal=3 then
destino="perannum"
elseif tiempolocal=4 then
destino="completorium"
end if
if Request.querystring("santos")=1 then
destino=destino & "-sanct"
end if
destino=directorio & destino & ".htm"
end if
%>
<%
Dim objFSO
Dim ObjCarpeta
Dim ObjArchivo
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Redim ArrayImagenes(0)
rootPath = Server.MapPath("/")
imagenespath = rootpath & "\Portals\0\docs\Breviario\fuentes\imagenes\"
Set ObjCarpeta = objFSO.GetFolder(Replace(imagenespath, "\", "/"))
Indice=0
For Each ObjArchivo in ObjCarpeta.Files
Indice=Indice+1
ReDim Preserve ArrayImagenes(Indice)
arrayimagenes(Indice)=Replace(Right(ObjArchivo, Len(ObjArchivo) - Len(rootPath)), "\", "/")
Next
randomize
imagen=arrayimagenes(int(rnd()*Indice)+1)
Set objCarpeta = Nothing
Set objArchivo = Nothing
Set objFSO = Nothing
%>
<%
if (Request.querystring("ponerestampa")="si") then %>
<%
else
set FSO = server.createObject("Scripting.FileSystemObject")
Filepath = Server.MapPath(destino)
Set TextStream = FSO.OpenTextFile(Filepath, ForReading, False, TristateUseDefault)
contenido= TextStream.ReadAll
TextStream.Close
Set TextStream = nothing
contenido=replace(contenido,"
.
","")
contenido=replace(contenido,"A HREF","a href")
contenido=replace(contenido,"a href=""z","a href=""breviario2.asp?tiempo=" & tiempolocal & "&archivo=" & directorio & "z" )
contenido=replace(contenido,""," ")
Response.Write contenido
end if
if tiempolocal<4 then
%>