<%@LCID=2058%> <% function QuotedStr( texto ) QuotedStr = Chr(34) & texto & Chr(34) end function Function PrintFecha(Fecha) 'SetLocale("es-mx") PrintFecha = FormatDateTime(Fecha,1) End Function %> :: Portaleconomico - Noticias Yucatan, Sureste de mexico
<% Dim uregistrado uregistrado = Session("usuario")<>"" Dim rs Dim conexion Dim strConexion Dim consulta Dim Fecha Dim numestado Dim delay Dim i Dim j Dim n Dim dia Dim mes dim anio Dim Estados(3) Dim sectores 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 Dim AuxFecha Dim totalSectores totalSectores = 0 i=0 Fecha = request.QueryString("fecha") Conexion.Open StrConexion 'Consulta = "select Sector from sectores order by Sector" 'Rs.open Consulta, Conexion, 3,3 'IF ( Rs.RecordCount>0 ) THEN 'totalSectores = Rs.RecordCount 'Rs.Movefirst 'WHILE ( not Rs.eof ) 'Redim Preserve sectores(i+1) 'sectores(i) = Rs("Sector") 'i = i+1 'Rs.movenext 'WEND 'END IF 'Rs.Close sectores = Array("Agropecuario", "Comercio", "Cultura", "Ecologia", "Economia", _ "Educación", "Educación y Tecnología", "Editoriales", "Elecciones", "Finanzas", "Gobierno", "Industria", _ "Otras noticias", "OVC", "Pesca","Poder Judicial", "Poder Legislativo", _ "Política","Noticias Nacionales", "Servicios", "Turismo") totalSectores = ubound(sectores) i=0 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("

NOTICIAS DEL DIA " & UCase(PrintFecha( Fecha )) & "

") n=0 i=1 while( n<=totalSectores ) 'Consulta = "Select * from notas where ( notas.estado='" & Estados(numestado) & "' AND notas.fecha=#" & Fecha & "#)" sector = sectores(n) Consulta = "Select * FROM notas WHERE notas.estado='" & Estados(numestado) & "' AND (notas.fecha=#" & Fecha & "#) AND (sector='" & sector & "') " Rs.Open Consulta, Conexion, 3,3 IF ( rs.RecordCount>0 ) THEN 'response.write("" & sector & "
") response.write ("
    ") response.write("
  1. ") response.write("" & sector &"

    ") WHILE not rs.Eof 'response.write("
  2. ") if(uregistrado) then response.write(" " & RS("encabezado") & "
    ") else response.write("" & RS("encabezado") & "
    ") end if response.write("" & Mid(rs("nota"),1,150)&"...,
    " & rs("fuente") & ", " & PrintFecha( rs("fecha") ) & "

    ") response.write("
  3. ") response.write(vbCR & "
    ") i=i+1 rs.MoveNext WEND response.write("
") END IF Rs.close n = n +1 WEND response.write("") Conexion.close Set RS = nothing Set Conexion=nothing %>
 
Recomendar esta pagina a un amigo
Email