USUÁRIO:      SENHA:        SALVAR LOGIN ?    Adicione o VBWEB na sua lista de favoritos   Fale conosco 

 

  Fórum

  ASP - Active Server Page
Voltar
Autor Assunto:  Contador de Visitas em ASP
Junior Ari
não registrado
Postada em 25/07/2004 20:19 hs   
alguém sabe como faço um contador de visitas em ASP
     
Martini
Pontos: 2843 Pontos: 2843
PAROBÉ
RS - BRASIL
Postada em 26/07/2004 08:49 hs         
  'contador de acessos
 Dim MesAtual, AnoAtual, rst, SQL, rst1, SQL1
  MesAtual = month(now)
 AnoAtual = year(now)
 SQL = "SELECT Contador.Ano, Contador.Mes, Contador.Acessos FROM Contador WHERE (((Contador.Ano)=" & AnoAtual & ") AND ((Contador.Mes)="  & MesAtual &  "));"
  Set rst = server.createobject("adodb.recordset")
  rst.open SQL, vgdb, 2, 2
 if not rst.eof then 
   rst("Acessos") = rst("Acessos") + 1
   rst.update
   rst.close
    set rst = nothing
  else
   rst.close
    set rst = nothing
   SQL1 = "SELECT * FROM Contador"
    Set rst1 = server.createobject("adodb.recordset")
    rst1.open SQL, vgdb, 2, 2
  rst1.addnew
  rst1("Ano") = AnoAtual
  rst1("Mes") = MesAtual
  rst1("Acessos") = 1
  rst1.update
   rst1.close
    set rst1 = nothing
 end if  
%>
     
Página(s): 1/1    


Seu Nome:

Seu eMail:

ALTERAR PARA MODO HTML
Mensagem:

[:)] = 
[:P] = 
[:(] = 
[;)] = 

HTML DESLIGADO

     
 VOLTAR

  



CyberWEB Network Ltda.    © Copyright 2000-2025   -   Todos os direitos reservados.
Powered by HostingZone - A melhor hospedagem para seu site
Topo da página