📄 cf.asp
字号:
End If
Next
End If
If SearchExist=-1 Then
Sql = "Select Count(ID) From CFCount_Search_Day Where UserName='"&UserName&"' And SiteFlag = '"& SiteFlag &"' And AddDate=#"&Date()&"#"
Set Rs=Conn.Execute(Sql)
If Rs(0)=0 Then
Sql="Insert Into CFCount_Search_Day (UserName,SiteFlag) values ('"&UserName&"','"&SiteFlag&"')"
Else
If CFCount=0 Then
Sql="Update CFCount_Search_Day Set MyCounter = MyCounter+1,IpCounter = IpCounter+1 Where UserName='"&UserName&"' And SiteFlag = '"&SiteFlag& "' And AddDate=#"&Date()&"#"
Else
Sql="Update CFCount_Search_Day Set MyCounter = MyCounter+1 Where UserName='"&UserName&"' And SiteFlag = '"&SiteFlag& "' And AddDate=#"&Date()&"#"
End If
End If
Conn.ExeCute Sql
End If
If KeywordExist=-1 Then
IndexCode=Md5(UserName&SiteFlag&KeyWord&Date(),1)
Sql = "Select Count(ID) From CFCount_SearchKeywrod_Day Where IndexCode='"&IndexCode&"'"
Set Rs=Conn.Execute(Sql)
If Rs(0)=0 Then
Sql="Insert Into CFCount_SearchKeywrod_Day (UserName,SiteFlag,KeyWord,LastLy,IndexCode) values ('"&UserName&"','"&SiteFlag&"','"&KeyWord&"','"&Ly&"','"&IndexCode&"')"
Else
If CFCount=0 Then
Sql="Update CFCount_SearchKeywrod_Day Set MyCounter = MyCounter+1,IpCounter = IpCounter+1,LastTime=#"&Now()&"#,LastLy='"&Ly&"' Where IndexCode='"&IndexCode&"'"
Else
Sql="Update CFCount_SearchKeywrod_Day Set MyCounter = MyCounter+1,LastTime=#"&Now()&"#,LastLy='"&Ly&"' Where IndexCode='"&IndexCode&"'"
End If
End If
Conn.ExeCute Sql
End if
If Instr(AgentStr,"alexa")>0 And CFCount=0 Then
Sql="Select Count(ID) From CFCount_Alexa_Day Where UserName='"&UserName&"' And AddDate=#"&Date()&"#"
Set Rs=Conn.Execute(Sql)
If Rs(0)=0 Then
Sql="Insert Into CFCount_Alexa_Day (UserName) Values ('"&UserName&"')"
Else
Sql="Update CFCount_Alexa_Day Set MyCounter=MyCounter+1 Where UserName='"&UserName&"' And AddDate=#"&Date()&"#"
End If
Conn.ExeCute Sql
ENd If
If RsSet("WebKeep")=-1 And CurrWeb<>"-" Then
IndexCode=Md5(UserName&CurrWeb&Date(),1)
Sql = "Select Count(ID) From CFCount_Web_Day Where IndexCode='"&IndexCode&"'"
Set Rs=Conn.Execute(Sql)
If Rs(0)=0 Then
Sql="Insert Into CFCount_Web_Day (UserName,WebUrl,IndexCode) values ('"&UserName&"','"&CurrWeb&"','"&IndexCode&"')"
Else
Sql="Update CFCount_Web_Day Set MyCounter = MyCounter+1,LastTime=#"&Now()&"# Where IndexCode='"&IndexCode&"'"
End If
Conn.ExeCute Sql
End If
Sql="Select Count(ID) From CFCount_Count_Day Where UserName='"&UserName&"' And AddDate=#"&Date()&"#"
Set Rs=Conn.Execute(Sql)
If Rs(0)=0 Then
Sql="Insert Into CFCount_Count_Day (UserName) Values ('"&UserName&"')"
Else
If CFCount=0 Then
Sql="Update CFCount_Count_Day Set MyCounter=MyCounter+1,IpCounter=IpCounter+1 Where UserName='"&UserName&"' And AddDate=#"&Date()&"#"
Else
Sql="Update CFCount_Count_Day Set MyCounter=MyCounter+1 Where UserName='"&UserName&"' And AddDate=#"&Date()&"#"
End If
End If
Conn.ExeCute Sql
Sql="Select Count(ID) From CFCount_Count_Hour Where UserName='"&UserName&"' And AddDate=#"&Date()&"# And AddHour="&Hour(Now)
Set Rs=Conn.Execute(Sql)
IF Rs(0)=0 Then
Sql="Insert Into CFCount_Count_Hour (UserName,AddHour) Values ('"&UserName&"',"&Hour(Now)&")"
Else
If CFCount=0 Then
Sql="Update CFCount_Count_Hour Set MyCounter=MyCounter+1,IpCounter=IpCounter+1 Where UserName='"&UserName&"' And AddDate=#"&Date()&"# And AddHour="&Hour(Now)
Else
Sql="Update CFCount_Count_Hour Set MyCounter=MyCounter+1 Where UserName='"&UserName&"' And AddDate=#"&Date()&"# And AddHour="&Hour(Now)
End if
End If
Conn.ExeCute Sql
If RsSet("LyKeep")=-1 Then
If Ly<>"-" Then
LyHead=BreakUrl(Ly,1)
Else
LyHead="-"
End if
Sql="Select Count(ID) From CFCount_Ly_Day Where UserName='"&UserName&"' And LyHead='"&LyHead&"' And DateDiff('d',AddDate,Date())=0"
Set Rs=Conn.Execute(Sql)
IF Rs(0)=0 Then
Sql="Insert Into CFCount_Ly_Day (UserName,Ip,LyHead,Ly) Values ('"&UserName&"','"&Ip&"','"&LyHead&"','"&Ly&"')"
Else
If CFCount=0 Then
Sql="Update CFCount_Ly_Day Set MyCounter=MyCounter+1,IpCounter=IpCounter+1,Ip='"&Ip&"',Ly='"&Ly&"',LastTime=#"&Now()&"# Where UserName='"&UserName&"' And LyHead='"&LyHead&"' And DateDiff('d',AddDate,Date())=0"
Else
Sql="Update CFCount_Ly_Day Set MyCounter=MyCounter+1,Ip='"&Ip&"',Ly='"&Ly&"',LastTime=#"&Now()&"# Where UserName='"&UserName&"' And LyHead='"&LyHead&"' And DateDiff('d',AddDate,Date())=0"
End If
End If
Conn.ExeCute Sql
If CFCount=0 Then
Sql="Update CFCount_Admin Set Store_Ly=Store_Ly+1,Store_TotalLy=Store_TotalLy+1"
Conn.ExeCute Sql
End If
End If
If CFCount=0 Then
Sql="Update CFCount_User Set ShowTotal=ShowTotal+1,RealShowTotal=RealShowTotal+1,RealIpTotal=RealIpTotal+1 Where UserName='"&UserName&"'"
Else
Sql="Update CFCount_User Set ShowTotal=ShowTotal+1,RealShowTotal=RealShowTotal+1 Where UserName='"&UserName&"'"
End if
Conn.ExeCute Sql
If RsSet("Store_Ly")>6000 Then
Sql="Select Min(id) As MyID From CFCount_Ly_Day Where ID In (Select Top 2000 Id From CFCount_Ly Order By Id Desc)"
Set Rs=Conn.Execute(Sql)
Sql="Delete From CFCount_Ly_Day Where ID<"&Rs("MyID")
Conn.ExeCute Sql
Sql="Update CFCount_Admin Set Store_Ly=0"
Conn.ExeCute Sql
End if
If RsUser("Tjopen")=-1 Or RsUser("OnlineShow")=-1 Then
If IsEmpty(Application("CFCountOnline_"&UserName)) Then
OnlineTotal=0
Else
Myarray=Split(Application("CFCountOnline_"&UserName),"|")
OnlineTotal=Ubound(Myarray)
End If
End if
If RsUser("Tjopen")=-1 Or RsUser("TodayShow")=-1 Or RsUser("TodayIpShow")=-1 Then
Sql= "Select * From CFCount_Count_Day Where UserName='"&UserName&"' And AddDate=#"&Date()&"#"
Set Rs=Conn.ExeCute(Sql)
TodayTotal=Rs("MyCounter")
TodayIpTotal=Rs("IpCounter")
End If
If RsUser("TjOpen")=-1 Then
GGTitle=GetUnicode("网站名称:")&GetUnicode(Rsuser("PageName"))&" "
GGTitle=GGTitle&GetUnicode("今天浏览:")&TodayTotal&" "
GGTitle=GGTitle&GetUnicode("今天IP:")&TodayIpTotal&" "
GGTitle=GGTitle&GetUnicode("在线人数:")&OnlineTotal&" "
GGTitle=GGTitle&GetUnicode("统计服务由[")&GetUnicode(RsSet("Title"))&GetUnicode("]免费提供")
GGLink=Tmp&"View.asp?UserName="&UserName
ImgText = "网站名称:"&Rsuser("PageName")&"|"
ImgText = ImgText&"今天浏览:"&TodayTotal&"|"
ImgText = ImgText&"今天IP:"&TodayIpTotal&"|"
ImgText = ImgText&"在线人数:"&OnlineTotal&"|"
ImgText = ImgText&"你的IP:"&IP&"|"
Else
GGTitle=GGTitle&GetUnicode("统计服务由[")&GetUnicode(RsSet("Title"))&GetUnicode("]提供")
GGLink=Tmp&"View.asp?UserName="&UserName
End if
If CFCount=0 And GG=1 And Instr(RsSet("GGText"),"|")>0 Then
GGTitle_2=Left(RsSet("GGText"),Instr(RsSet("GGText"),"|")-1)
GGTitle=GGTitle_2&" "&GGTitle
GGLink=Mid(RsSet("GGText"),Instr(RsSet("GGText"),"|")+1)
End If
If RsUser("ShowType")=1 Then
Counter=RsUser("ShowTotal")
ElseIf RsUser("ShowType")=2 Then
Counter=RsUser("RealShowTotal")
ElseIf RsUser("ShowType")=3 Then
Counter=RsUser("RealIpTotal")
End if
CountLen=Len(Counter)
ZeroNum=RsUser("PicNum")-CountLen
For I=1 To ZeroNum
LinkUrl=Tmp&"CounterPic/"&RsUser("Style")&"/0"
CounterHtm=CounterHtm&"<img src="&LinkUrl&".gif border='0'>"
Next
If RsUser("CounterShow")=-1 Then
For I=1 To CountLen
Pic=Mid(Counter,I,1)
LinkUrl=Tmp&"CounterPic/"&RsUser("Style")&"/"&pic
CounterHtm=CounterHtm&"<img src="&LinkUrl&".gif border='0'>"
Next
CounterHtm="<a href="&GGLink&" target=_blank title="&GGTitle&">"&CounterHtm&"</a>"
Else
If RsUser("CounterHiddenPic")=1 Then
CounterHtm="<a href="&GGLink&" target=_blank title="&GGTitle&"><span style='font-size:12px;text-decoration:none;font-weight:normal;color:#000000;line-height:20px;'>"&GetUnicode(RsSet("TjTextName"))&"</span></a>"
ElseIf RsUser("CounterHiddenPic")=2 Then
CounterHtm="<a href="&GGLink&" target=_blank title="&GGTitle&"><img src="&Tmp&"images/counter_2.gif border='0'></a>"
ElseIf RsUser("CounterHiddenPic")=3 Then
CounterHtm="<a href="&GGLink&" target=_blank title="&GGTitle&"><img src="&Tmp&"images/counter_3.gif border='0'></a>"
End If
End If
If Action="countget_2" Then
If RsUser("OnlineShow")=-1 Then
OnlineHtm="<span style='font-size:12px;text-decoration:none;font-weight:normal;color:#000000;line-height:20px;'>"&GetUnicode("同时在线")&"[<font color='#FF0000'>"&OnlineTotal&"</font>]"&GetUnicode("人")&"</span>"
End If
If RsUser("TodayShow")=-1 Then
TodayHtm="<span style='font-size:12px;text-decoration:none;font-weight:normal;color:#000000;line-height:20px;'>"&GetUnicode("今天浏览")&"[<font color='#FF0000'>"&TodayTotal&"</font>]</span>"
End If
If RsUser("TodayIpShow")=-1 Then
TodayIpHtm="<span style='font-size:12px;text-decoration:none;font-weight:normal;color:#000000;line-height:20px;'>"&GetUnicode("今天IP")&"[<font color='#FF0000'>"&TodayIpTotal&"</font>]</span>"
End If
If RsUser("IpShow")=-1 Then
IPHtm="<span style='font-size:12px;text-decoration:none;font-weight:normal;color:#000000;line-height:20px;'>"&GetUnicode("你的IP")&"[<font color='#FF0000'>"&IP&"</font>]</span>"
End If
If RsUser("VisitShow")=-1 Then
VisitHtm="<span style='font-size:12px;text-decoration:none;font-weight:normal;color:#000000;line-height:20px;'>"&GetUnicode("欢迎你第")&"[<font color='#FF0000'>"&VisitTotal&"</font>]"&GetUnicode("次访问本站")&"</span>"
End If
If RsUser("CounterSite")=1 Or RsUser("CounterSite")=2 Then
If RsUser("OnlineShow")=-1 Then AllHtm=AllHtm&OnlineHtm&"<br>"
If RsUser("TodayShow")=-1 Then AllHtm=AllHtm&TodayHtm&"<br>"
If RsUser("TodayIpShow")=-1 Then AllHtm=AllHtm&TodayIpHtm&"<br>"
If RsUser("IpShow")=-1 Then AllHtm=AllHtm&IpHtm&"<br>"
If RsUser("VisitShow")=-1 Then AllHtm=AllHtm&VisitHtm
ElseIf RsUser("CounterSite")=3 Or RsUser("CounterSite")=4 Then
If RsUser("OnlineShow")=-1 Then AllHtm=AllHtm&" "&OnlineHtm
If RsUser("TodayShow")=-1 Then AllHtm=AllHtm&" "&TodayHtm
If RsUser("TodayIpShow")=-1 Then AllHtm=AllHtm&" "&TodayIpHtm
If RsUser("IpShow")=-1 Then AllHtm=AllHtm&" "&IpHtm
If RsUser("VisitShow")=-1 Then AllHtm=AllHtm&" "&VisitHtm
End if
If RsUser("CounterSite")=1 Then
TableCode="<table border='0' cellpadding='2' cellspacing='1'><tr><td><div align='center'>"&CounterHtm&"</div></td></tr><tr><td><div align='center'><a href="&GGLink&" target=_blank title='"&GGTitle&"' style='font-size:12px;text-decoration:none;font-weight:normal;color:#000000;line-height:20px;'>"&AllHtm&"</a></div></td></tr></table>"
ElseIf RsUser("CounterSite")=2 Then
TableCode="<table border='0' cellpadding='2' cellspacing='1'><tr><td><div align='center'><a href="&GGLink&" target=_blank title='"&GGTitle&"'>"&AllHtm&"</a></div></td></tr><tr><td><div align='center'>"&CounterHtm&"</div></td></tr></table>"
ElseIf RsUser("CounterSite")=3 Then
TableCode=CounterHtm&"<a href="&GGLink&" target=_blank title='"&GGTitle&"'>"&AllHtm&"</a>"
ElseIf RsUser("CounterSite")=4 Then
TableCode="<a href="&GGLink&" target=_blank title='"&GGTitle&"'>"&AllHtm&"</a>"&CounterHtm
End If
If RsUser("OnlineShow")=0 And RsUser("TodayShow")=0 And RsUser("TodayIpShow")=0 And RsUser("IpShow")=0 And RsUser("VisitShow")=0 Then
TableCode=CounterHtm
End If
Response.Write("document.write("& chr(34) & TableCode & chr(34) &");")
End If
If Assort=1 Then
If RsUser("ImgShowType")=1 Then
ImgCounter=RsUser("ShowTotal")
ElseIf RsUser("ImgShowType")=2 Then
ImgCounter=RsUser("RealShowTotal")
ElseIf RsUser("ImgShowType")=3 Then
ImgCounter=RsUser("RealIpTotal")
End if
ImgCountLen=Len(ImgCounter)
ImgZeroNum=RsUser("PicNum")-ImgCountLen
For I=1 To ImgZeroNum
PicText=PicText&"0"
Next
PicText=PicText&Cstr(ImgCounter)
End If
End If
if Assort=1 Then
ImgText="网站名称:"&Rsuser("PageName")&"|"
ImgText=ImgText&"总访问:"&ImgCounter&"|"
If RsUser("OnlineShow")=-1 Then ImgText=ImgText&"在线人数:"&OnlineTotal&"|"
If RsUser("TodayShow")=-1 Then ImgText=ImgText&"今天浏览:"&TodayTotal&"|"
If RsUser("TodayIpShow")=-1 Then ImgText=ImgText&"今天IP:"&TodayIpTotal&"|"
If RsUser("IpShow")=-1 Then ImgText=ImgText&"你的IP:"&Ip&"|"
If RsUser("VisitShow")=-1 Then ImgText=ImgText&"欢迎你第 "&VisitTotal&" 次访问|"
If RsUser("ImgCounterShow")=0 Then ImgText="我的统计"
Set Jpeg = Server.CreateObject("Persits.Jpeg")
FileName="Upload/"&RsUser("ImgFileName")
Jpeg.Open Server.MapPath(FileName)
Jpeg.Canvas.Font.ShadowColor = &Hffffff
Jpeg.Canvas.Font.ShadowXoffset = 2
Jpeg.Canvas.Font.ShadowYoffset = 2
Jpeg.Canvas.Font.Color = &H000000
Jpeg.Canvas.Font.Family = "宋体"
Jpeg.Canvas.Font.Bold = False
Jpeg.Canvas.Font.Quality = 4
Jpeg.Canvas.Font.Size = 12
Jpeg.Canvas.Pen.Color = &Hff0000
MyArray=Split(ImgText,"|")
For I=0 To Ubound(MyArray)
MyHeight=(I+1)*15
Jpeg.Canvas.Print 10, MyHeight, MyArray(I)
Next
Jpeg.SendBinary
Set Jpeg = Nothing
End If
Call ConnClose()
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -