📄 cf.asp
字号:
self.resizeTo(screen.availWidth,screen.availHeight);
var ly=location.href;//把放广告页面的网址传递过去
ly=ly.replace(/\&/g, "|");
ly=ly.replace(/\%26/g,"|");
<%
Else
Ly=Request("Ly_CycleAd")
End If
If Application("AdWidth_"&Ad_ID)="" Or IsEmpty(Application("AdWidth_"&Ad_ID)) Or Application("AdHeight_"&Ad_ID)="" Or IsEmpty(Application("AdHeight_"&Ad_ID)) Or Application("Ad_Class_"&Ad_ID)="" Or IsEmpty(Application("Ad_Class_"&Ad_ID)) Then
Sql="Select * From WWW_QQCF_COM_CfWztg_AD Where ID="&Ad_ID
Set Rs=Conn.ExeCute(Sql)
Application("AdWidth_"&Ad_ID)=Rs("AdWidth")
Application("AdHeight_"&Ad_ID)=Rs("AdHeight")
Application("Ad_Class_"&Ad_ID)=Rs("Ad_Class")
End If
If Application("Ad_Class_"&Ad_ID)=3 Or Application("Ad_Class_"&Ad_ID)=4 Then
AdWidth=Application("AdWidth_"&Ad_ID)
AdHeight=Application("AdHeight_"&Ad_ID)
ElseIf Application("Ad_Class_"&Ad_ID)=5 Or Application("Ad_Class_"&Ad_ID)=6 Then
AdWidth=0
AdHeight=0
End If
If CycleAd=0 Then%>
document.write('<iframe src=<%=Tmp%>cf.asp?action=getad_2&User_Name=<%=User_Name%>&Ad_ID=<%=Ad_ID%>&CycleAd=<%=CycleAd%>&Ly=' + ly + ' frameBorder=0 width=<%=AdWidth%> height=<%=AdHeight%> marginheight=0 marginwidth=0 scrolling=no></iframe>');
<%Else%>
document.write('<iframe src=<%=Tmp%>cf.asp?action=getad_2&User_Name=<%=User_Name%>&Ad_ID=<%=Ad_ID%>&CycleAd=<%=CycleAd%>&Ly=<%=Ly%> frameBorder=0 width=<%=AdWidth%> height=<%=AdHeight%> marginheight=0 marginwidth=0 scrolling=no></iframe>');
<%End If
End If
If Action="getad_2" Then
User_Name=ChkStr(Request("User_Name"))
Ad_ID=ChkStr(Request("Ad_ID"))
CycleAd=Int(Request("CycleAd"))
Ly=Request("Ly")
Sql="Select * From WWW_QQCF_COM_CfWztg_AD Where ID="&Ad_ID
Set Rs=Conn.ExeCute(Sql)
If Rs.Eof And Rs.Bof Then
ErrorMessage="<A href="&Tmp&"Index.asp Target=_blank>此广告不存在或已经删除,请到后台重新获取!</a>"
Response.Write ErrorMessage
Response.End
End If
If Rs("AdState")=4 Then
ErrorMessage="<A href="&Tmp&"Index.asp Target=_blank>广告点数已经完成,请申请新的广告!</a>"
Response.Write ErrorMessage
Response.End
End If
Ip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If Ip = "" Then Ip=Request.ServerVariables("REMOTE_ADDR")
If (Application("StartTime_"&Ad_ID)="" Or IsEmpty(Application("StartTime_"&Ad_ID))) Then Application("StartTime_"&Ad_ID)=Date()
If Application("StartTime_"&Ad_ID)<>Date() Then
Application("StartTime_"&Ad_ID)=Date()
Application.Lock
Application("AllIp_"&Ad_ID) = Empty
Application.UnLock
End If
IpOk=-1
If Instr(Application("AllIp_"&Ad_ID),Ip)=0 Then
Application.Lock
Application("AllIp_"&Ad_ID) = Application("AllIp_"&Ad_ID)&Ip&"|"
Application("AllIpNum_"&Ad_ID) = Application("AllIpNum_"&Ad_ID)+1
Application.UnLock
Else
IpOk=0
End If
If Application("AllIpNum_"&Ad_ID)>1000 Then
Myarray=Split(Application("AllIp_"&Ad_ID),"|")
If Ubound(Myarray)>1000 Then
For I=Ubound(Myarray)-500 To Ubound(Myarray)
AllIp = Application("AllIp_"&Ad_ID)&Myarray(I)&"|"
Next
Application("AllIpNum_"&Ad_ID)=500
Application("AllIp_"&Ad_ID)=AllIp
End If
End If
AdDuct=0
If Rs("AdDeDuct_Rate")>0 Then
Randomize
RanNum=Int(100*Rnd)+1
If RanNum<=Rs("AdDeDuct_Rate") Then AdDuct=-1
End If
Sql="Select DeDuct_Rate From WWW_QQCF_COM_CfWztg_RegUser Where User_Name='"&User_Name&"'"
Set Rs2=Conn.ExeCute(Sql)
If RsSet("UserDeDuctState")=-1 And Rs2("DeDuct_Rate")>0 Then
Randomize
RanNum=Int(100*Rnd)+1
If RanNum<=Rs2("DeDuct_Rate") Then AdDuct=-1
End If
If IpOk=-1 And AdDuct=0 Then
If IsEmpty(Application("AdShowErrorNum")) Then Application("AdShowErrorNum")=1
If Application("AdShowErrorNum") Mod 10 = 0 Then
Application.Lock
Application("AdShowDo") = 0
Application("AdShowErrorNum") = 1
Application.UnLock
End If
If Int(Application("AdShowDo"))=0 Then
Application.Lock
Application("AdShowDo") = 1
Application.UnLock
Sql="Update WWW_QQCF_COM_CfWztg_RegUser Set AdShowNum=AdShowNum+1 Where User_Name='"&User_Name&"'"
Conn.ExeCute Sql
Set Rs2=Server.CreateObject("Adodb.RecordSet")
Sql="Select Count(ID) From WWW_QQCF_COM_CfWztg_AD_Counter_Day Where User_Name='"&User_Name&"' And Ad_ID="&Ad_ID&" And AddDate=#"&Date()&"#"
Rs2.Open Sql,Conn,3,2
IF Rs2(0)=0 Then
Sql="Insert Into WWW_QQCF_COM_CfWztg_AD_Counter_Day (User_Name,Ad_ID,Display_Counter) Values ('"&User_Name&"',"&Ad_ID&",1)"
Else
Sql="Update WWW_QQCF_COM_CfWztg_AD_Counter_Day Set Display_Counter=Display_Counter+1 Where User_Name='"&User_Name&"' And Ad_ID="&Ad_ID&" And AddDate=#"&Date()&"#"
End If
Conn.ExeCute Sql
Set Rs2=Server.CreateObject("Adodb.RecordSet")
Sql="Select Count(ID) From WWW_QQCF_COM_CfWztg_AD_Counter_Hour Where User_Name='"&User_Name&"' And Ad_ID="&Ad_ID&" And AddDate=#"&Date()&"# And AddHour="&hour(now)
Rs2.Open Sql,Conn,3,2
IF Rs2(0)=0 Then
Sql="Insert Into WWW_QQCF_COM_CfWztg_AD_Counter_Hour (User_Name,Ad_ID,Display_Counter,AddHour) Values ('"&User_Name&"',"&Ad_ID&",1,"&hour(now)&")"
Else
Sql="Update WWW_QQCF_COM_CfWztg_AD_Counter_Hour Set Display_Counter=Display_Counter+1 Where User_Name='"&User_Name&"' And Ad_ID="&Ad_ID&" And AddDate=#"&Date()&"# And AddHour="&hour(now)
End If
Conn.ExeCute Sql
Application.Lock
Application("AdShowDo") = 0
Application.UnLock
Else
Application.Lock
Application("AdShowErrorNum") = Int(Application("AdShowErrorNum"))+1
Application.UnLock
End If
End If
CheckCode="QQCF_"&Gen_Key(20)
Application("AllCheckCode_"&Ad_ID)=Application("AllCheckCode_"&Ad_ID)&CheckCode&"|"
Myarray=Split(Application("AllCheckCode_"&Ad_ID),"|")
If Ubound(Myarray)>100 Then
For I=UBound(MyArray)-50 To UBound(MyArray)
AllCheckCode = AllCheckCode&Myarray(I)&"|"
Next
Application("AllCheckCode_"&Ad_ID)=AllCheckCode
End If
CheckIp = Ip
CheckTime=DateDiff("s","2000-1-1 0:0:0",Now())
If Rs("Ad_Class")=6 Then CheckTime=DateDiff("s","2000-1-1 0:0:10",Now())
ClickUrl=Tmp&"CF.asp?Action=gotoad&User_Name="&User_Name&"&Ad_ID="&Ad_ID&"&CheckCode="&CheckCode&"&CheckIP="&CheckIp&"&CheckTime="&CheckTime&"&Ly_"&CheckCode&"="&Ly
If Rs("Ad_Class")=3 Then%>
<a href=<%=ClickUrl%> target=_blank><%=Rs("AD")%></a>
<%ElseIf Rs("Ad_Class")=4 Then
Ad=Rs("AD")
Ad_2=Lcase(Ad)
If Instr(Ad_2,"http://")=0 Then
ImgPath=Tmp&Ad
Else
ImgPath=Ad
End if
If Instr(Ad_2,".swf")=0 Then%>
<a href=<%=ClickUrl%> target=_blank><img src=<%=ImgPath%> border=0></a>
<%Else%>
<DIV id=tome style="POSITION: absolute;cursor:hand;" onclick="window.open('<%=ClickUrl%>','_blank')">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="<%=Rs("AdWidth")%>" height="<%=Rs("AdHeight")%>">
<param name="movie" value="<%=ImgPath%>">
<param name="quality" value="high">
<param name="wmode" value="transparent">
<embed src="<%=ImgPath%>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="<%=Rs("AdWidth")%>" height="<%=Rs("AdHeight")%>"></embed>
</object>
</DIV>
<%End If
ElseIf Rs("Ad_Class")=5 Then%>
<script>window.open ('<%=Tmp%>Cf.asp?Action=adopen&User_Name=<%=User_Name%>&Ad_ID=<%=Ad_ID%>&CheckCode=<%=CheckCode%>&CheckIP=<%=CheckIP%>&CheckTime=<%=CheckTime%>&Ad=<%=Rs("Ad")%>&Ly=<%=Ly%>', 'qqcf', 'width=<%=Rs("AdWidth")%>,height=<%=Rs("AdHeight")%>,top=0,left=0,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no');</script>
<%ElseIf Rs("Ad_Class")=6 Then%>
<script>window.open ('<%=ClickUrl%>', 'qqcf', 'width=' + screen.availWidth + ',height=' + screen.availHeight + ',top=0,left=0,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,location=yes,status=yes');</script>
<%End If
End If
If Action="adopen" Then%>
<body leftmargin="0" topmargin="0">
<%User_Name=Request("User_Name")
Ad_ID=Request("Ad_ID")
CheckCode=Request("CheckCode")
CheckIp=Request("CheckIp")
CheckTime=Request("CheckTime")
Ad=Request("Ad")
Ly=Request("Ly")
ClickUrl="Cf.asp?Action=gotoad&User_Name="&User_Name&"&Ad_ID="&Ad_ID&"&CheckCode="&CheckCode&"&CheckIP="&CheckIp&"&CheckTime="&CheckTime&"&Ly_"&CheckCode&"="&Ly
If Instr(lcase(Ad),"http://")=0 Then
ImgPath=Tmp&Ad
Else
ImgPath=Ad
End if
%>
<a href=<%=ClickUrl%> target=_blank><img src=<%=ImgPath%> border=0></a>
<%End If
If Action="gotoad" Then
If IsEmpty(Application("CfwztgStartTime")) Then Application("CfwztgStartTime")=Date()
If Application("CfwztgStartTime")<>Date() Then
Application("CfwztgStartTime")=Date()
Sql="Delete From WWW_QQCF_COM_CfWztg_AD_Counter_Hour Where DateDiff('d',AddDate,Now())>="&HourKeepDay
Conn.ExeCute Sql
Sql="Delete From WWW_QQCF_COM_CfWztg_AD_Counter_Day Where DateDiff('m',AddDate,Now())>="&DayKeepMonth
Conn.ExeCute Sql
End If
User_Name=Chkstr(Request("User_Name"))
Ad_ID=Chkstr(Request("Ad_ID"))
AdType=Int(Request("AdType"))
LyName="Ly_"&Request("CheckCode")
Ly=Chkstr(Request(LyName))
If Ly="" Then Ly="-"
Ly=Replace(Ly,"|","&")
Ip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If Ip = "" Then Ip=Request.ServerVariables("REMOTE_ADDR")
Sql="Select * From WWW_QQCF_COM_CfWztg_AD Where ID="&Ad_ID
Set RsAd=Conn.ExeCute(Sql)
Sql="Select * From WWW_QQCF_COM_CfWztg_RegUser Where User_Name='"&User_Name&"'"
Set RsUser=Conn.ExeCute(Sql)
If RsAd.Eof Then Call ReturnFlag(User_Name,Ad_ID,Tmp,1)
If RsAd("AdState")=4 Then Call ReturnFlag(User_Name,Ad_ID,Tmp,2)
If RsAD("OverClick")>=RsAD("TotalClick") Then
Sql="Update WWW_QQCF_COM_CfWztg_AD Set AdState=4 Where ID="&Ad_ID
Conn.ExeCute Sql
End If
If RsUser.Eof Then Call ReturnFlag(User_Name,Ad_ID,Tmp,3)
If RsUser("State")=0 Then Call ReturnFlag(User_Name,Ad_ID,Tmp,4)
If RsSet("PutObj")=2 And Ly="-" Then Call ReturnFlag(User_Name,Ad_ID,RsAd("Ad_Url"),5)
If RsSet("AdClickRate")>0 Then
NowClickRate=Int((RsUser("ComVisit")/RsUser("AdShowNum"))*100)
If RsUser("AdShowNum")>100 And (RsAd("Ad_Class")= 3 Or RsAd("Ad_Class")=4) And RsSet("PutObj")=2 And NowClickRate>RsSet("AdClickRate") Then Call ReturnFlag(User_Name,Ad_ID,RsAd("Ad_Url"),6)
End If
If RsSet("PutObj")=1 And (RsSet("PutRange")=2 Or RsSet("PutRange")=3) And Ly="-" Then Call ReturnFlag(User_Name,Ad_ID,RsAd("Ad_Url"),7)
If RsSet("PutObj")=1 And RsSet("PutRange")=3 And Ly<>"-" Then
LyHost=BreakUrl(Ly,1)
If Instr(RsSet("PutSite"),LyHost)=0 Then Call ReturnFlag(User_Name,Ad_ID,RsAd("Ad_Url"),8)
End If
If RsSet("PutObj")=2 And RsSet("PutRange_2")=2 And Ly<>"-" Then
LyHost=BreakUrl(Ly,1)
If Instr(RsUser("UserAllSite"),LyHost)=0 Then Call ReturnFlag(User_Name,Ad_ID,RsAd("Ad_Url"),9)
End If
CheckCode=Request("CheckCode")
If Instr(Application("AllCheckCode_"&Ad_ID),CheckCode)=0 Then Call ReturnFlag(User_Name,Ad_ID,RsAd("Ad_Url"),10)
Application("AllCheckCode_"&Ad_ID)=Replace(Application("AllCheckCode_"&Ad_ID),CheckCode&"|","")
CheckIp=Request("CheckIp")
If CheckIp<>Ip Then Call ReturnFlag(User_Name,Ad_ID,RsAd("Ad_Url"),11)
CheckTime=Int(Request("CheckTime"))
CheckTime_2=DateDiff("s","2000-1-1 0:0:0",Now())
If (CheckTime_2-CheckTime)<2 Then Call ReturnFlag(User_Name,Ad_ID,RsAd("Ad_Url"),12)
If RsAd("AdDeDuct_Rate")>0 Then
Randomize
RanNum=Int(100*Rnd)+1
If RanNum<=RsAd("AdDeDuct_Rate") Then DeDuctClick=1
End If
If RsSet("UserDeDuctState")=-1 And RsUser("DeDuct_Rate")>0 Then
Randomize
RanNum=Int(100*Rnd)+1
If RanNum<=RsUser("DeDuct_Rate") Then DeDuctClick=2
End If
If DeDuctClick>0 Then
If RsAd("ClickState")=-1 Then
Sql="Update WWW_QQCF_COM_CfWztg_AD Set OverClick=OverClick+1 Where ID="&Ad_ID
Conn.ExeCute Sql
End If
Set Rs=Server.CreateObject("Adodb.RecordSet")
Sql="Select Count(ID) From WWW_QQCF_COM_CfWztg_AD_Counter_Day Where User_Name='"&User_Name&"' And Ad_ID="&Ad_ID&" And AddDate=#"&Date()&"#"
Rs.Open Sql,Conn,3,2
IF Rs(0)=0 Then
Sql="Insert Into WWW_QQCF_COM_CfWztg_AD_Counter_Day (User_Name,Ad_ID,Click_2_Counter) Values ('"&User_Name&"',"&Ad_ID&",1)"
Else
Sql="Update WWW_QQCF_COM_CfWztg_AD_Counter_Day Set Click_2_Counter=Click_2_Counter+1 Where User_Name='"&User_Name&"' And Ad_ID="&Ad_ID&" And AddDate=#"&Date()&"#"
End If
Conn.ExeCute Sql
Set Rs=Server.CreateObject("Adodb.RecordSet")
Sql="Select Count(ID) From WWW_QQCF_COM_CfWztg_AD_Counter_Hour Where User_Name='"&User_Name&"' And Ad_ID="&Ad_ID&" And AddDate=#"&Date()&"# And AddHour="&hour(now)
Rs.Open Sql,Conn,3,2
IF Rs(0)=0 Then
Sql="Insert Into WWW_QQCF_COM_CfWztg_AD_Counter_Hour (User_Name,Ad_ID,Click_2_Counter,AddHour) Values ('"&User_Name&"',"&Ad_ID&",1,"&hour(now)&")"
Else
Sql="Update WWW_QQCF_COM_CfWztg_AD_Counter_Hour Set Click_2_Counter=Click_2_Counter+1 Where User_Name='"&User_Name&"' And Ad_ID="&Ad_ID&" And AddDate=#"&Date()&"# And AddHour="&hour(now)
End If
Conn.ExeCute Sql
If DeDuctClick=1 Then
Call ReturnFlag(User_Name,Ad_ID,RsAd("Ad_Url"),15)
ElseIf DeDuctClick=2 Then
Call ReturnFlag(User_Name,Ad_ID,RsAd("Ad_Url"),16)
End If
End If
If AdType=1 And RsAd("Ad_Class")>2 Then Call ReturnFlag(User_Name,Ad_ID,RsAd("Ad_Url"),17)
If IpExist=0 Then
If IsEmpty(Application("AdClickErrorNum")) Then Application("AdClickErrorNum")=1
If Application("AdClickErrorNum") Mod 10 = 0 Then
Application.Lock
Application("AdClickDo") = 0
Application("AdClickErrorNum") = 1
Application.UnLock
End If
If Int(Application("AdClickDo"))=0 Then
Application.Lock
Application("AdClickDo") = 1
Application.UnLock
If IpAreaSwitch=1 Then
IpArea=GetIpArea(Ip)
Else
IpArea="-"
End If
Sql="Insert Into WWW_QQCF_COM_CfWztg_Visit_Ip (User_Name,Ad_ID,Ip,IpArea,Ly) Values ('"&User_Name&"',"&Ad_ID&",'"&Ip&"','"&IpArea&"','"&Ly&"')"
Conn.ExeCute(Sql)
Set Rs=Server.CreateObject("Adodb.RecordSet")
Sql="Select Count(ID) From WWW_QQCF_COM_CfWztg_Visit_Ly Where User_Name='"&User_Name&"' And Ad_ID="&Ad_ID&" And Ly='"&Ly&"' And DateDiff('d',AddDate,Date())=0"
Rs.Open Sql,Conn,3,2
IF Rs(0)=0 Then
Sql="Insert Into WWW_QQCF_COM_CfWztg_Visit_Ly (User_Name,Ad_ID,Ip,Ly) Values ('"&User_Name&"',"&Ad_ID&",'"&Ip&"','"&Ly&"')"
Else
Sql="Update WWW_QQCF_COM_CfWztg_Visit_Ly Set Counter=Counter+1,Ip='"&Ip&"',LastTime=#"&Now()&"# Where User_Name='"&User_Name&"' And Ad_ID="&Ad_ID&" And Ly='"&Ly&"' 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_CfWztg_AD_Counter_Day Where User_Name='"&User_Name&"' And Ad_ID="&Ad_ID&" And AddDate=#"&Date()&"#"
Rs.Open Sql,Conn,3,2
IF Rs(0)=0 Then
Sql="Insert Into WWW_QQCF_COM_CfWztg_AD_Counter_Day (User_Name,Ad_ID,Click_Counter,Click_2_Counter) Values ('"&User_Name&"',"&Ad_ID&",1,1)"
Else
Sql="Update WWW_QQCF_COM_CfWztg_AD_Counter_Day Set Click_Counter=Click_Counter+1,Click_2_Counter=Click_2_Counter+1 Where User_Name='"&User_Name&"' And Ad_ID="&Ad_ID&" And AddDate=#"&Date()&"#"
End If
Conn.ExeCute Sql
Set Rs=Server.CreateObject("Adodb.RecordSet")
Sql="Select Count(ID) From WWW_QQCF_COM_CfWztg_AD_Counter_Hour Where User_Name='"&User_Name&"' And Ad_ID="&Ad_ID&" And AddDate=#"&Date()&"# And AddHour="&hour(now)
Rs.Open Sql,Conn,3,2
IF Rs(0)=0 Then
Sql="Insert Into WWW_QQCF_COM_CfWztg_AD_Counter_Hour (User_Name,Ad_ID,Click_Counter,Click_2_Counter,AddHour) Values ('"&User_Name&"',"&Ad_ID&",1,1,"&hour(now)&")"
Else
Sql="Update WWW_QQCF_COM_CfWztg_AD_Counter_Hour Set Click_Counter=Click_Counter+1,Click_2_Counter=Click_2_Counter+1 Where User_Name='"&User_Name&"' And Ad_ID="&Ad_ID&" And AddDate=#"&Date()&"# And AddHour="&hour(now)
End If
Conn.ExeCute Sql
If Int(DateDiff("n",RsSet("LastDelTime"),Now()))>60 Then
Sql="Select Count(ID) From WWW_QQCF_COM_CfWztg_Visit_Ly "
Set Rs=Conn.ExeCute(Sql)
If Rs(0)>RsSet("LyMaxTotal") Then
Sql="Select Min(id) As MyID From WWW_QQCF_COM_CfWztg_Visit_Ly Where ID In (Select Top "&RsSet("LyMaxTotal")&" Id From WWW_QQCF_COM_CfWztg_Visit_Ly Order By Id Desc)"
Set Rs2=Conn.Execute(Sql)
Sql="Delete From WWW_QQCF_COM_CfWztg_Visit_Ly Where ID<"&Rs2("MyID")
Conn.ExeCute Sql
End If
Sql="Select Count(ID) From WWW_QQCF_COM_CfWztg_Visit_Ip "
Set Rs=Conn.ExeCute(Sql)
If Rs(0)>RsSet("IpMaxTotal") Then
Sql="Select Min(id) As MyID From WWW_QQCF_COM_CfWztg_Visit_Ip Where ID In (Select Top "&RsSet("IpMaxTotal")&" Id From WWW_QQCF_COM_CfWztg_Visit_Ip Order By Id Desc)"
Set Rs2=Conn.Execute(Sql)
Sql="Delete From WWW_QQCF_COM_CfWztg_Visit_Ip Where ID<"&Rs2("MyID")
Conn.ExeCute Sql
End If
Sql="Update WWW_QQCF_COM_CfWztg_Admin Set LastDelTime=Now()"
Conn.ExeCute(Sql)
End If
If RsAd("ClickState")=-1 Then
Sql="Update WWW_QQCF_COM_CfWztg_RegUser Set ComVisit=ComVisit+1,Total_Cent=Total_Cent+"&RsAD("Unit_Cent")&",Spare_Cent=Spare_Cent+"&RsAD("Unit_Cent")&" Where User_Name='"&User_Name&"'"
Conn.ExeCute Sql
End if
If RsAd("ClickState")=-1 Then
Sql="Update WWW_QQCF_COM_CfWztg_AD Set OverClick=OverClick+1 Where ID="&Ad_ID
Conn.ExeCute Sql
End If
Cookies_Time=DateAdd("h",RsSet("EffectTime"),Now())
Response.Cookies("CfWztg"&Ad_ID&"ClickCookie")=Ad_ID
Response.Cookies("CfWztg"&Ad_ID&"ClickCookie").Expires=Cookies_Time
If RsAD("AdRegUserState")=-1 Then
Application("AdUpUser")=Application("AdUpUser")&Ad_ID&","&User_Name&","&Ip&"|"
Myarray=Split(Application("AdUpUser"),"|")
If Ubound(Myarray)>100 Then
Application("AdUpUser")=Empty
For I=50 To 100
Application.Lock
Application("AdUpUser") = Application("AdUpUser")&Myarray(I)&"|"
Application.UnLock
Next
End If
End If
Application.Lock
Application("AdClickDo") = 0
Application.UnLock
Else
Application.Lock
Application("AdClickErrorNum") = Int(Application("AdClickErrorNum"))+1
Application.UnLock
End If
End If
Call ReturnFlag(User_Name,Ad_ID,RsAd("Ad_Url"),0)
End If%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -