<%
'Dim s
's = request.QueryString("url")
'If ( s = "" ) THEN
' s = "notasdia.asp"
'End If
'response.write("")
%>
<%
Dim rs
Dim conexion
Dim strConexion
Dim consulta
Dim Fecha
Dim numestado
Dim delay
Dim i
Dim j
Dim dia
Dim mes
dim anio
Dim Estados(3)
Estados(1)="Yucatán"
Estados(2)="Quintana Roo"
Estados(3)="Campeche"
Delay=200
Set rs = Server.CreateObject("ADODB.RecordSet")
Set Conexion = Server.CreateObject("ADODB.Connection")
StrConexion ="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.Mappath("database/noticias.mdb")
numestado = request.QueryString("estado")
if( (numestado="") or (numestado>3) ) then
numestado=1
estado="Yucatán"
End If
'response.write("")
Dim AuxFecha
Fecha = request.QueryString("fecha")
Conexion.Open StrConexion
if (Fecha="") then
'Fecha = Date()
Consulta = "Select MAX(Fecha) FROM notas WHERE notas.estado='" & Estados(numestado) & "'"
Rs.Open Consulta, Conexion, 3,3
if (rs.recordcount>0) then
'Fecha = rs.Fields(0).value
Fecha = rs(0)
Fecha = DatePart("yyyy",Fecha) & "-" & DatePart("m",Fecha) & "-" & DatePart("d",Fecha)
'Fecha = DatePart("d",Fecha) & "/" & DatePart("m",Fecha) & "/" & DatePart("yyyy",Fecha)
'Fecha = DatePart("m",Fecha) & "-" & DatePart("d",Fecha) & "-" & DatePart("yyyy",Fecha)
end if
rs.close
' Fecha = Year(Date()) & "-" & Month(Date()) & "-" & Day(Date())
End if
response.write("")
response.write("")
response.write("")
response.write("")
response.write(" NOTICIAS DEL DIA " & UCase(PrintFecha( Fecha )) & "")
response.write(" | ")
response.write(" " )
response.write("")
response.write("| ")
response.write(" | ")
response.write(" ")
Consulta = "Select * from notas where ( notas.estado='" & Estados(numestado) & "' AND notas.fecha=#" & Fecha & "#)"
Rs.Open Consulta, Conexion, 3,3
i=1
IF( rs.RecordCount>0 ) THEN
response.write("")
response.write(" ")
WHILE not rs.Eof
if(uregistrado) then
response.write("" & i & " .- " & RS("encabezado") & "")
else
response.write("" & i & ".- " & RS("encabezado") & "")
end if
response.write(" " & Mid(rs("nota"),1,120)&"..., " & rs("fuente") & ", " & PrintFecha( rs("fecha") ) & " ")
response.write(vbCR & " ")
i=i+1
rs.MoveNext
WEND
response.write(" | ")
response.write(" ")
END IF
response.write("")
response.write(" ")
Rs.Close
Conexion.close
Set RS = nothing
Set Conexion=nothing
%>
|
|