Quand j'actualise ma page mon compteur me compte un visite en plus
Caius_junioricus
Messages postés23Date d'inscriptiondimanche 12 novembre 2000StatutMembreDernière intervention18 novembre 2010
-
27 mai 2005 à 16:50
cs_Nurgle
Messages postés1642Date d'inscriptionsamedi 6 novembre 2004StatutMembreDernière intervention28 avril 2011
-
29 mai 2005 à 16:29
Qu'est ce qui cloche? Voici mon code:
<%
dim cn
dim rc
dim nbre
dim sql
Set cn = CreateObject("ADODB.Connection")
cn.Provider="Microsoft.Jet.OLEDB.4.0"
cn.ConnectionString=Server.MapPath("../..") & \inetpub\wwwroot\compteur\compteur.mdb"
cn.Open()
Set rc=CreateObject("ADODB.Recordset")
sql= " select * from compte"
rc.Open sql,cn
nbre=rc("nbr")
nbre=nbre+1
session("nbre")=nbre
Set rc2=Server.CreateObject("ADODB.Recordset") sql" Update compte set nbr '" & nbre & "'"
rc2.Open sql,cn
cn.Close
Set cn = Nothing
set rc = Nothing
set rc2 = Nothing
%>
<html>
<head>
<title>compteur</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<%
longueur = len(session("nbre"))
SELECT CASE longueur
CASE 1
for i =1 to 5
%>\images\compteur\0.gif" width="10" height="13"><%
next
for i =1 to longueur
numero=mid(session("nbre"),i,1)
%>.gif">\images\compteur\<%=numero%>.gif" width="10" height="13"><%next
CASE 2
for i =1 to 4
%>\images\compteur\0.gif" width="10" height="13"><%
next
for i =1 to longueur
numero=mid(session("nbre"),i,1)
%>.gif">\images\compteur\<%=numero%>.gif" width="10" height="13"><%next
CASE 3
for i =1 to 3
%>\images\compteur\0.gif" width="10" height="13"><%
next
for i =1 to longueur
numero=mid(session("nbre"),i,1)
%>.gif">http://10.78.32.214/images/compteur/<%=numero%>.gif" width="10" height="13"><%next
CASE 4
for i =1 to 2
%>\images\compteur\0.gif" width="10" height="13"><%
next
for i =1 to longueur
numero=mid(session("nbre"),i,1)
%>.gif">\images\compteur\<%=numero%>.gif" width="10" height="13"><%next
CASE 5%>\images\compteur\0.gif" width="10" height="13"><%for i =1 to longueur
numero=mid(session("nbre"),i,1)
%>.gif">\images\compteur\<%=numero%>.gif" width="10" height="13"><%next
CASE 6
for i =1 to longueur
numero=mid(session("nbre"),i,1)
%>.gif">images\compteur\<%=numero%>.gif" width="10" height="13"><%next%><%end select%>
</html>
merci à tous par avance
A voir également:
Quand j'actualise ma page mon compteur me compte un visite en plus