<% nMaxRows = 25 'Aqui setamos quantos registros serão listados por página cNextLabel = "»" cPreviousLabel = "«" Call AbreConexao() Tabela.CursorLocation = 3 'Definimos o cursor a ser utilizado Tabela.PageSize = nMaxRows Tabela.CacheSize = nMaxRows Tabela.ActiveConnection = Conexao Tabela.Open "SELECT codigo,titulo,inicio,estado,cidade FROM tbl_eventos USE INDEX(fim) WHERE autorizado='S' AND fim > '"&SqlDate(date)&"' ORDER BY inicio" Color = False PageName = Request.ServerVariables("SCRIPT_NAME") SortField = Request.Form("_SortField") MaxPage = Tabela.PageCount nrTotalRows_ = Tabela.RecordCount ActualPage = min( max( int( "0" & Request.Form( "page" ) ), 1 ), MaxPage ) If Request.Form("_SortOrdem") = "DESC" Then SortOrdem = "ASC" Else SortOrdem = "DESC" End IF if len( SortField ) > 0 then Tabela.Sort = SortField cSearchFieldName = Request.form( "_PGC_Fields" ) cSearchOperator = Request.form( "_PGC_Operator" ) cSearchText2Search = Request.form( "_PGC_Text2Search" ) cSearchType = Request.form( "FieldType" ) if len( cSearchText2Search & "" ) > 0 then Text2SearchOk = false select case cSearchType case "D": if IsDate( cSearchText2Search ) then Text2SearchOk = true Criteria = "#" & CDate( cSearchText2Search ) & "#" if cSearchOperator = "like" then cSearchOperator = "=" end if case "N": if IsNumeric( cSearchText2Search ) then Text2SearchOk = true Criteria = CDbl( cSearchText2Search ) if cSearchOperator = "like" then cSearchOperator = "=" end if case "B": if IsNumeric( cSearchText2Search ) then Text2SearchOk = true Criteria = iif( CBool( cSearchText2Search ), "true", "false" ) if cSearchOperator <> "=" and cSearchOperator <> "<>" then cSearchOperator = "=" end if case "C": Text2SearchOk = true if cSearchOperator = "like" then Criteria = "'%" & replace( cSearchText2Search, "'", "''" ) & "%'" else Criteria = "'" & replace( cSearchText2Search, "'", "''" ) & "'" end if end select if Text2SearchOk then Criteria = cSearchFieldName & " " & cSearchOperator & " " & Criteria Tabela.filter=Criteria 'Processa a pesquisa if Tabela.eof then ActualPage = MaxPage else ActualPage = Tabela.AbsolutePage if ( Tabela.AbsolutePosition mod nMaxRows ) > 1 and ActualPage < MaxPage then ActualPage = ActualPage + 1 'Se sobram registros, some uma página end if end if else cSearchText2Search = " não encontrado! " end if end if %> ARLS Libertas 35 - Eventos
 
clocks
Carregando... Por favor espere até que esta página seja carregada por completo.

Eventos

Veja lista de eventos a serem realizados por todo o Brasil.

Resultados 
Total <%=nrTotalRows_%> <% 'Gera a paginação '---------------------- If ActualPage > 1 then response.write " " & _ cPreviousLabel & " " & vbCRLF end if response.write " " & vbCRLF if ActualPage < MaxPage then response.write "  " & _ cNextLabel & "" & vbCRLF end if %>
<% If Tabela.Eof or Tabela.Bof Then Response.Write "Nenhum Evento no momento." Else %> <% Tabela.MoveFirst Tabela.absolutepage = ActualPage contador = 0 Do While Not Tabela.Eof And contador < Tabela.pagesize %> onMouseOver="this.className='highlight'" onmouseout="this.className='<%If Color Then Response.Write "row1" Else Response.Write "row2"%>'" onClick="location='evento_view.asp?cod=<%=Tabela.Fields("codigo")%>'" style="cursor: hand" title="Clique para visualizar este item"> <% contador = contador +1 Color = Not(Color) Tabela.MoveNext Loop Call FechaConexao() End If %>
<%If InStr(SortField,"inicio") Then : Response.Write " " : End If%> Data <%If InStr(SortField,"titulo") Then : Response.Write " " : End If%> Evento <%If InStr(SortField,"cidade") Then : Response.Write " " : End If%> Cidade <%If InStr(SortField,"estado") Then : Response.Write " " : End If%> UF
<%=Tabela.Fields("inicio")%> <%=Tabela.Fields("titulo")%> <%=Tabela.Fields("cidade")%> <%=Tabela.Fields("estado")%>