<%
If request("alterar") = empty and request("lst_estado") <> empty then %>
<%
if request("lst_estado") = "0" then
strfieldname = ""
elseif request("lst_estado") <> 0 and request("lst_estado") <> "" then
strfieldname = "where id_estado = "&request("lst_estado")&""
end if
strselest = "select * from tbl_estado " & strfieldname
set Rsest = objconexao.execute(strselest)
while not Rsest.eof
'Response.Write "
"
if request("cidade")<>"" then
ALTU_SQLII = "SELECT COUNT(*) as Total FROM Vw_Clubes where id_estado = "&Rsest("id_estado")&" and txt_cidade like '%"&request("cidade")&"%'"
else
ALTU_SQLII = "SELECT COUNT(*) as Total FROM Vw_Clubes where id_estado = "&Rsest("id_estado")&""
end if
set ALTU_objFunc = objconexao.execute(ALTU_SQLII)
nTotalRegistros=ALTU_objFunc("Total")
'response.Write nTotalRegistros
'response.end
ALTU_objFunc.Close
Set ALTU_objFunc=Nothing
'define o mumero de registros por pagina
nTamanhoPagina=20
'define quantas páginas existe
if (nTotalRegistros mod nTamanhopagina)=0 then
nTotalPaginas=nTotalRegistros/nTamanhoPagina
else
nTotalPaginas=int(nTotalRegistros/nTamanhoPagina)+1
end if
'define a pagina Atual
If Request.QueryString("p") = Empty then
nPaginaAtual=1
Else
nPaginaAtual=request.QueryString("p")
end if
'define o Total de Registros
'que serão ignorados para se
'chegar a página atual
nPular=nTamanhoPagina*(nPaginaAtual-1)
if request("cidade")<>"" then
ALTU_SQL1 = "Select * From Vw_Clubes where id_estado = "&Rsest("id_estado")&" and txt_cidade like '%"&request("cidade")&"%'"
else
ALTU_SQL1 = "Select * From Vw_Clubes where id_estado = "&Rsest("id_estado")&""
end if
set ALTU_objFunc = objconexao.execute(ALTU_SQL1)
'Pular os Registros da Página Anterior
for nContador=1 to nPular
ALTU_objFunc.MoveNext
next
'response.Write Altu_sql1
If not ALTU_objFunc.eof then
%>
CLUBES
DO ESTADO : <%=Rsest("txt_uf")%>
Nome
Email
Cidade
UF
Visualizar
<% End If%>
<%ALTU_ALTU_nContador=0
for nContador=1 to nTamanhoPagina
If not ALTU_objFunc.eof then
If (ALTU_ALTU_nContador mod 2) = 0 then %>
<% End If
ALTU_ALTU_nContador=ALTU_ALTU_nContador+1
%>
<% ALTU_objFunc.MoveNext
End If
Next
Rsest.movenext
wend
ALTU_objFunc.Close
Set ALTU_objFunc = Nothing
%>
<% If nTotalPaginas <> "0" then%>
Página <%=nPaginaAtual%>
de <%=nTotalPaginas%>
Ir para a página :
<% for nContador=1 to nTotalPaginas%>
<% If Int(nContador)=Int(nPaginaAtual) then %>
<%=nContador%>
<% Else %>
&rdnbusca=<%=request("rdnbusca")%>"><%=nContador%>
<% End If %>
<% next
call fecha_conexao%>
<% Else %>
<% 'Response.Write "Nenhum Clube encontrado com o filtro selecionado!"%>
<%
End if
End if
%>
Publicidade
- Portal dos Casais indica os sites abaixo