%@ Language=VBScript %>
<%
Response.Buffer=True
Response.ExpiresAbsolute = #1/1/1980#
Response.Expires=0
raiz = ""
dim numeropag
numpage = 0
numpage = numpage + Request.QueryString("pagina") 'Pagina en la que se encuentra
if numpage = "" then
numpage = 1
end if
if numpage < 1 then
numpage = 1
end if
%>
IBG Industrial Bolsera Granadina, S.A.
<%
SQL = "SELECT * FROM noticias INNER JOIN tiponoticias ON noticias.codnoticia = tiponoticias.codnoticia"
primero = true
'if busqueda <> "" then
' SQL = SQL & " Where (Upper(titulo) like '%"&UCase(busqueda)&"%' or Upper(contenido) like '%"&UCase(busqueda)&"%') "
' primero = false
'end if
'if tema <> "0" then
' if primero then
' SQL = SQL & " Where noticias.codnoticia = " & tema
' primero = false
' else
' SQL = SQL & " and noticias.codnoticia = " & tema
' end if
'end if
if primero then
SQL = SQL & " Where (fechacaducidad IS NULL OR fechacaducidad = '' OR fechacaducidad >= '" & fecha_hoy &"') and activo = 1"
else
SQL = SQL & " and fechacaducidad IS NULL OR fechacaducidad = '' OR fechacaducidad >= '" & fecha_hoy() &"' and activo = 1"
end if
SQL = SQL & " ORDER BY fechacreacion DESC"
'Response.Write(SQL)
set MiRs = Server.CreateObject("ADODB.Recordset")
MiRs.PageSize = 8
MiRs.Open SQL, Session("DBConn"), adOpenKeyset
if not MiRs.EOF then
dim totales
totales = 0
totales = totales + MiRs.PageCount
if numpage > totales then numpage= totales end if
MiRs.AbsolutePage = numpage
end if
SQL1 = "SElect * From tiponoticias Where activa = 1"
set tnoticia = Server.CreateObject("ADODB.Recordset")
tnoticia.Open SQL1, Session("DBConn"), adOpenKeyset
%>