OFICINA G3 --- Site Oficial da banda ------------->>>>>
<%
abreDBnot
sqlTemp="SELECT * FROM noticias WHERE idCategoria=1 ORDER BY idNot DESC"
SET busca = conexaoDBnot.Execute(sqlTemp)
If request.querystring("qualpagina") ="" Then ' Abertua inicial
pagina = 1
Else
pagina = CInt(Request.QueryString("qualpagina"))
End If
tamanhopagina=request("pagesize")
If tamanhopagina="" then
tamanhopagina=5
end if
SQL=request("SQLquery")
IF SQL="" THEN
SQL=SQLtemp
END IF
conexaoDBnot.CursorLocation=3
set rstemp=Server.CreateObject("ADODB.Recordset")
Set rsTemp=conexaoDBnot.Execute(SQL,,"&H0001")
contador=0
If RSTemp.EOF=False then
contador = rstemp.recordcount
rstemp.movefirst
rstemp.PageSize=tamanhopagina
maximopagina=cint(rstemp.PageCount)
maximoregistros=cint(rstemp.PageSize)
rstemp.AbsolutePage=pagina
registros=0
campos=rstemp.fields.count -1
%>
<%
Do Until RSTemp.eof OR registros >= maximoregistros
img = RSTemp("img")
texto = RSTemp("texto")
titulo = RSTemp("titulo")
data = RSTemp("data")
%>
<%=titulo%>
|
<%=data%>
<%
if img<>"" then response.write("
") %>
<%=texto%>
<%
RSTemp.movenext
registros=registros+1
Loop
%>
<%
response.write "Páginas:"
scriptname=request.servervariables("script_name")
For counter=1 to maximopagina
if counter = pagina then
response.write "[" & counter & "] "
else
ref=""& counter & ""
Response.Write ref & " "
end if
next
RSTemp.close
busca.close
End If
set busca=Nothing
Set RSTemp=Nothing
fechaDBnot
%>