<%
if request.QueryString("det") = "" then
StrSQL = "SELECT * from tbs_editorial where status = 1"
Conecta ObjAdoConnd, StrSQL, oRecSet
if not oRecSet.EOF then
%>
<%
If Session("pSize") = "" Then varPagSize = 50
oRecSet.PageSize = varPagSize
varPagCount = oRecSet.PageCount
If varPag > varPagCount Then
varPag = varPagCount
End If
oRecSet.AbsolutePage = varPag
While Not oRecSet.EOF And varCount <= varPagSize
%>
<%
varCount = varCount + 1
oRecSet.MoveNext()
Wend
End If
if oRecSet.RecordCount > 50 then%>
<%fnPaginacao "index.asp?", 1%>
<%
end if
Desconecta ObjAdoConnd, oRecSet
%>
<%else%>
<%
StrSQL = "SELECT * from tbs_editorial where id="& sBDTratarNumero(request("id")) &" and status = 1"
Conecta ObjAdoConn, StrSQL, RS
if not RS.EOF then
%>
<%dim ObjAdoConn, StrSQL, RS
StrSQL = "SELECT top 2 * from tbs_destaque where status = 1 order by id desc"
Conecta ObjAdoConn, StrSQL, RS
if not RS.EOF then
indx = 0
do Until RS.EOF
%>
<%
RS.MoveNext()
loop
else
end if
Desconecta ObjAdoConn, RS
%>
<%dim ObjAdoConnNot, StrSQLNot, RSNot
StrSQLNot = "SELECT top 2 * from tbs_noticia where Notstatus = 1 order by Notid desc"
Conecta ObjAdoConnNot, StrSQLNot, RSNot
if not RSNot.EOF then
indx = 0
do Until RSNot.EOF
%>