⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qqcf.asp

📁 1.40种记数器图片样式自由选择
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<%
'==================================
' 乘风多用户计数器v3.4
' 制 作:乘 风
' 网 站:http://www.qqcf.com
' 系统演示:http://www.qqcf.com/?action=try
' 最新版本下载:http://www.qqcf.com/?action=down
' 声 明:	
' 本软件系免费程序,提供给个人免费使用,但不提供服务和升级。
' 付费版提供升级服务和技术支持。
' 未经作者许可禁止用于任何商业用途。
' 乘风其它作品:乘风多用户计数器MsSql版、乘风多用户记数器php版、乘风免费电影程序、
'        乘风网站推广系统、乘风网址程序,乘风广告管理、系统乘风论坛等。
' 此段版权注释不会影响网页打开速度,请勿删除!
'           2005年11月27日									
'===================================
%>
<!--#include file="qqcf_conn.asp"-->
<!--#include file="qqcf_myfunction.asp"-->
<%Action=Request.QueryString("Action")
Assort=Int(Request.QueryString("Assort"))
Tmp=HttpPath(2)%>	
<%If Action="" And Assort=0 Then%>
var ly=escape(document.referrer)
var currweb=location.href
ly=ly.replace(/\&/g,"|");
currweb=currweb.replace(/\&/g,"|");
document.write("<script src=<%=Tmp%>QQCF.Asp?Action=getcount&User_Name=<%=Request.QueryString("User_Name")%>&Ly="+ly+"&CurrWeb="+currweb+"></script>");
<%End if
If Action="getcount" Or Assort=1 Then
User_Name=ChkStr(Request.QueryString("User_Name"))
If Assort=0 Then
Ly=ChkStr(Server.HtmlEncode(Request.QueryString("Ly")))
Else
Ly=ChkStr(Server.HtmlEncode(Request.ServerVariables("Http_Referer")))
End if
CurrWeb=ChkStr(Server.HtmlEncode(Request.QueryString("CurrWeb")))
If Ly="" Then Ly="-"
If CurrWeb="" Then CurrWeb="-"
Ly=Left(Replace(Ly,"|","&"),255)
CurrWeb=Left(Replace(CurrWeb,"|","&"),255)
If Instr(Ly,"google")>0 Then Ly=UTF2GB(Ly)
Ip=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If Ip= "" Then Ip= Request.ServerVariables("REMOTE_ADDR")
If Request.Cookies("CfCountCookie")="" Then
CfCount=0
Else
CfCount=Int(Request.Cookies("CfCountCookie"))
End if
If Request.Cookies("CfCountVisitTotalCookie")="" Then
CfCountVisitTotal=1
Else
CfCountVisitTotal=Int(Request.Cookies("CfCountVisitTotalCookie"))+1
End if
If IsEmpty(Application("CfCountDo")) Then Application("CfCountDo")=0
If Application("CfCountDo")=0 Then
IsDo=True
Else
Application("CfCountDo")=0
IsDo=True
End If
Response.Expires = 0
If IsDo Then
Application.Lock
Application("CfCountDo") = Application("CfCountDo")+1
Application.UnLock 
Set RsUser=Server.CreateObject("Adodb.RecordSet")
Sql="Select * From WWW_QQCF_COM_CfCount_RegUser Where User_Name='"&User_Name&"'"
RsUser.Open sql,conn,1,1
If RsUser.Eof Then
ShowText="<a href="&Temp&" target=_blank>计数器系统中没有此用户,请先注册!</a>"
Response.Write("document.write("& chr(34) & ShowText & chr(34) &");")
End if
If RsSet("OnlineKeep")=-1 Then
If RsUser("online")=-1 Then
Sql = "Select Count(ID) From WWW_QQCF_COM_CfCount_Online Where Online_Ip = '"& Ip &"' And User_Name='"&User_Name&"'"
Set Rs=Conn.Execute(Sql)
If Rs(0)=0 Then
Sql="Insert Into WWW_QQCF_COM_CfCount_Online (User_Name,Online_Ip,Ly,CurrWeb,VisitTotal) values ('"&User_Name&"','"&Ip&"','"&Ly&"','"&CurrWeb&"',"&CfCountVisitTotal&")"
Conn.ExeCute Sql	 
Sql="Update WWW_QQCF_COM_CfCount_Admin Set Store_Online=Store_Online+1,Store_TotalOnline=Store_TotalOnline+1"
Conn.ExeCute Sql
Else
If CfCount=0 Then
Sql="Update WWW_QQCF_COM_CfCount_Online Set CurrWeb='"&CurrWeb&"',Online_LastTime = #" &Now()&"#,ReadTotal = ReadTotal+1,VisitTotal="&CfCountVisitTotal&" Where Online_Ip = '"&Ip& "' And User_Name='"&User_Name&"'"
Conn.ExeCute Sql
Else
Sql="Update WWW_QQCF_COM_CfCount_Online Set CurrWeb='"&CurrWeb&"',Online_LastTime = #" &Now()&"#,ReadTotal = ReadTotal+1 Where Online_Ip = '"&Ip& "' And User_Name='"&User_Name&"'"
Conn.ExeCute Sql
End if
End If 
Sql="Delete From WWW_QQCF_COM_CfCount_Online Where User_Name='"&User_Name&"' And DateDiff('n',Online_AddTime,Now())>"&RsUser("OnlineTime")
Conn.ExeCute Sql
End if
End If
Sql="Select Count(*) From WWW_QQCF_COM_CfCount_Back Where User_Name='"&User_Name&"'"
Set Rs=Conn.Execute(Sql)
IF Rs(0)=0 Then
Sql="Insert Into WWW_QQCF_COM_CfCount_Back (User_Name,BackNum_1) values('"&User_Name&"',1)"
Conn.ExeCute Sql
Else
If CfCountVisitTotal=1 And Cfcount=0 Then
Sql="Update WWW_QQCF_COM_CfCount_Back Set BackNum_1=BackNum_1+1 Where User_Name='"&User_Name&"'"
Elseif CfCountVisitTotal>1 And CfCountVisitTotal<11 And Cfcount=0 Then
Sql="Update WWW_QQCF_COM_CfCount_Back Set BackNum_"&CfCountVisitTotal&"=BackNum_"&CfCountVisitTotal&"+1,BackNum_"&CfCountVisitTotal-1&"=BackNum_"&CfCountVisitTotal-1&"-1 Where User_Name='"&User_Name&"'"
ElseIf CfCountVisitTotal=11 And Cfcount=0 Then
Sql="Update WWW_QQCF_COM_CfCount_Back Set BackNum_Higher=BackNum_Higher+1,BackNum_10=BackNum_10-1 Where User_Name='"&User_Name&"'"
End if
Conn.ExeCute Sql
End if
If RsSet("AllSearch")<>"-" Then
MyArray=Split(RsSet("AllSearch"),"|")   
For I=0 To Ubound(MyArray)
SiteFlag=Left(MyArray(I),Instr(MyArray(I),",")-1)
KeyWordFlag=Mid(MyArray(I),Instr(MyArray(I),",")+1,1000)  
If Instr(BreakUrl(Ly,1),SiteFlag)>0 Then
Sql = "Select Count(ID) From WWW_QQCF_COM_CfCount_Search_Count Where SiteFlag = '"& SiteFlag &"' And User_Name='"&User_Name&"' And AddDate=#"&Date()&"#"
Set Rs=Conn.Execute(Sql)
If Rs(0)=0 Then
Sql="Insert Into WWW_QQCF_COM_CfCount_Search_Count (User_Name,SiteFlag) values ('"&User_Name&"','"&SiteFlag&"')"
Else
Sql="Update WWW_QQCF_COM_CfCount_Search_Count Set Counter = Counter+1 Where SiteFlag = '"&SiteFlag& "' And User_Name='"&User_Name&"' And AddDate=#"&Date()&"#"
End If   
Conn.ExeCute Sql
If Instr(Lcase(Ly),KeyWordFlag&"=")>0 Then
If SiteFlag="google" Then
KeyWord=GetSearchKeyword(Ly,KeyWordFlag)
Else
KeyWord=URLDecode(GetSearchKeyword(Ly,KeyWordFlag))
End if
Sql = "Select Count(ID) From WWW_QQCF_COM_Cfcount_SearchKeywrod_Count Where KeyWord = '"& KeyWord &"' And User_Name='"&User_Name&"'"
Set Rs=Conn.Execute(Sql)
If Rs(0)=0 Then
Sql="Insert Into WWW_QQCF_COM_Cfcount_SearchKeywrod_Count (User_Name,KeyWord) values ('"&User_Name&"','"&KeyWord&"')"
Else
Sql="Update WWW_QQCF_COM_Cfcount_SearchKeywrod_Count Set Counter = Counter+1,LastDate=#"&Date()&"# Where KeyWord = '"&KeyWord& "' And User_Name='"&User_Name&"'"
End If
Conn.ExeCute Sql
End if
Exit For
End If
Next
Set Rs=Server.CreateObject("Adodb.RecordSet")
Sql="Select Count(ID) From WWW_QQCF_COM_CfCount_Day_Count Where User_Name='"&User_Name&"' And AddDate=#"&Date()&"#"
Rs.Open Sql,Conn,1,1
If Rs(0)=0 Then
Sql="Insert Into WWW_QQCF_COM_CfCount_Day_Count (User_Name) Values ('"&User_Name&"')"
Conn.ExeCute Sql
Else
Sql="Update WWW_QQCF_COM_CfCount_Day_Count Set Counter=Counter+1 Where User_Name='"&User_Name&"' And AddDate=#"&Date()&"#"
Conn.ExeCute Sql
If CfCount=0 Then
Sql="Update WWW_QQCF_COM_CfCount_Day_Count Set IpCounter=IpCounter+1 Where User_Name='"&User_Name&"' And AddDate=#"&Date()&"#"
Conn.ExeCute Sql
End If
End If
Set Rs=Server.CreateObject("Adodb.RecordSet")
Sql="Select Count(ID) From WWW_QQCF_COM_CfCount_Hour_Count Where User_Name='"&User_Name&"' And AddDate=#"&Date()&"# And AddHour="&Hour(Now)
Rs.Open Sql,Conn,1,1
IF Rs(0)=0 Then
Sql="Insert Into WWW_QQCF_COM_CfCount_Hour_Count (User_Name,AddHour) Values ('"&User_Name&"',"&Hour(Now)&")"
Conn.ExeCute Sql
Else
Sql="Update WWW_QQCF_COM_CfCount_Hour_Count Set Counter=Counter+1 Where User_Name='"&User_Name&"' And AddDate=#"&Date()&"# And AddHour="&Hour(Now)
Conn.ExeCute Sql
If CfCount=0 Then
Sql="Update WWW_QQCF_COM_CfCount_Hour_Count Set IpCounter=IpCounter+1 Where User_Name='"&User_Name&"' And AddDate=#"&Date()&"# And AddHour="&Hour(Now)
Conn.ExeCute Sql
End if
End If
If CfCount=0 Then
If RsSet("LyKeep")=-1 Then
If Ly<>"-" Then
LyHead=BreakUrl(Ly,1)
Else
LyHead="-"
End if
Set Rs=Server.CreateObject("Adodb.RecordSet")
Sql="Select Count(ID) From WWW_QQCF_COM_CfCount_Ly Where User_Name='"&User_Name&"' And LyHead='"&LyHead&"' And DateDiff('d',AddDate,Date())=0"
Rs.Open Sql,Conn,3,2
IF Rs(0)=0 Then
Sql="Insert Into WWW_QQCF_COM_CfCount_Ly (User_Name,Ip,LyHead,Ly) Values ('"&User_Name&"','"&Ip&"','"&LyHead&"','"&Ly&"')"
Conn.ExeCute Sql
Sql="Update WWW_QQCF_COM_CfCount_Admin Set Store_Ly=Store_Ly+1,Store_TotalLy=Store_TotalLy+1"
Conn.ExeCute Sql
Else
Sql="Update WWW_QQCF_COM_CfCount_Ly Set Counter=Counter+1,Ip='"&Ip&"',Ly='"&Ly&"',LastTime=#"&Now()&"# Where User_Name='"&User_Name&"' And LyHead='"&LyHead&"' And DateDiff('d',AddDate,Date())=0"
End If
Conn.ExeCute Sql
Set Rs=Server.CreateObject("Adodb.RecordSet")
Sql="Select Count(ID) From WWW_QQCF_COM_CfCount_Site Where User_Name='"&User_Name&"' And Site='"&LyHead&"'"
Rs.Open Sql,Conn,3,2
IF Rs(0)=0 Then
Sql="Insert Into WWW_QQCF_COM_CfCount_Site (User_Name,Site,Ly) Values ('"&User_Name&"','"&LyHead&"','"&Ly&"')"
Else
Sql="Update WWW_QQCF_COM_CfCount_Site Set Counter=Counter+1,Ly='"&Ly&"',LastTime=#"&Now()&"# Where User_Name='"&User_Name&"' And Site='"&LyHead&"'"
End If
Conn.ExeCute Sql
End If
End if
If CfCount=0 Then
Sql="Update WWW_QQCF_COM_CfCount_RegUser Set ShowTotal=ShowTotal+1,RealShowTotal=RealShowTotal+1,RealIpTotal=RealIpTotal+1 Where User_Name='"&User_Name&"'"
Else
Sql="Update WWW_QQCF_COM_CfCount_RegUser Set ShowTotal=ShowTotal+1,RealShowTotal=RealShowTotal+1 Where User_Name='"&User_Name&"'"
End if
Conn.ExeCute Sql
If RsSet("Store_Ly")>6000 Then
Sql="Select Min(id) As MyID From WWW_QQCF_COM_CfCount_Ly Where ID In (Select Top 2000 Id From WWW_QQCF_COM_CfCount_Ly Order By Id Desc)"
Set Rs=Conn.Execute(Sql)
Sql="Delete From WWW_QQCF_COM_CfCount_Ly Where ID<"&Rs("MyID")
Conn.ExeCute Sql
Sql="Update WWW_QQCF_COM_CfCount_Admin Set Store_Ly=0"
Conn.ExeCute Sql
End if
If RsSet("Store_Online")>9000 Then
Sql="Select Min(id) As MyID From WWW_QQCF_COM_CfCount_Online Where ID In (Select Top 2000 Id From WWW_QQCF_COM_CfCount_Online Order By Id Desc)"
Set Rs=Conn.Execute(Sql)
Sql="Delete From WWW_QQCF_COM_CfCount_Online Where ID<"&Rs("MyID")
Conn.ExeCute Sql
Sql="Update WWW_QQCF_COM_CfCount_Admin Set Store_online=0"
Conn.ExeCute Sql
End if
If RsUser("Tjopen") Or RsUser("OnlineShow")=-1 Then
Sql= "Select Count(*) From WWW_QQCF_COM_CfCount_Online Where User_Name='"&User_Name&"'"
Set Rs=Conn.ExeCute(Sql)
OnlineTotal=Rs(0)
End if
If  RsUser("Tjopen") Or RsUser("TodayShow")=-1 Or RsUser("TodayIpShow")=-1 Then
Sql= "Select * From WWW_QQCF_COM_CfCount_Day_Count Where User_Name='"&User_Name&"' And AddDate=#"&Date()&"#"
Set Rs=Conn.ExeCute(Sql)
TodayTotal=Rs("Counter")
TodayIpTotal=Rs("IpCounter")
End If
If CfCount=0 And Request.Cookies("CfCountggCookie")="" Then
GGTitle=Left(RsSet("GGText"),Instr(RsSet("GGText"),"|")-1)
GGLink=Mid(RsSet("GGText"),Instr(RsSet("GGText"),"|")+1,100)
Else
If RsUser("TjOpen")=-1 Then
GGTitle="网站名称:"&Rsuser("PageName")&"&#13;"
GGTitle=GGTitle&"今天浏览:"&TodayTotal&"&#13;"
GGTitle=GGTitle&"今天IP:"&TodayIpTotal&"&#13;"
GGTitle=GGTitle&"在线人数:"&OnlineTotal&"&#13;&#13;"
GGTitle=GGTitle&"计数服务由["&RsSet("Title")&"]免费提供"
GGLink=Tmp&"QQCF_View.Asp?User_Name="&User_Name
Else
GGTitle=GGTitle&"计数服务由["&RsSet("Title")&"]免费提供"
GGLink=Tmp
End if
End if
If CfCount=0 Then
Cookies_Time=DateAdd("h",24,Now())
Response.Cookies("CfCountCookie")=-1
Response.Cookies("CfCountCookie").Expires=Cookies_Time
End If
If CfCountVisitTotal=1 Then
Cookies_Time=DateAdd("d",365,Now())
Response.Cookies("CfCountVisitTotalCookie")=1
Response.Cookies("CfCountVisitTotalCookie").Expires=Cookies_Time
Else
If CfCount=0 Then
Cookies_Time=DateAdd("d",365,Now())
Response.Cookies("CfCountVisitTotalCookie")=CfCountVisitTotal
Response.Cookies("CfCountVisitTotalCookie").Expires=Cookies_Time
End if
End If
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&"QQCF_CounterPic/"&RsUser("Style")&"/0"
CounterHtm=CounterHtm&"<img src="&LinkUrl&".gif border='0'>"
PicText=PicText&"0"
Next
PicText=PicText&Cstr(Counter)
If RsUser("CounterShow")=-1 Then  
For I=1 To CountLen
Pic=Mid(Counter,I,1)
LinkUrl=Tmp&"QQCF_CounterPic/"&RsUser("Style")&"/"&pic
CounterHtm=CounterHtm&"<img src="&LinkUrl&".gif border='0'>"
Next
CounterHtm="<a href="&GGLink&" target=_blank title="&GGTitle&">"&CounterHtm&"</a>"
Else
CounterHtm="<a href="&GGLink&" target=_blank title="&GGTitle&"><img src="&Tmp&"QQCF_Pic/counter.gif border='0'></a>"
End If

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -