程式修改有關問題

來源:互聯網
上載者:User
程式修改問題
<%
Response.Expires= -1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","no-store"
%>




<%'
'-------此頁面用於推廣串連

' %>
<%
dim nextpage'跳轉頁面
dim vipurl'推廣串連
dim JF_Rule_TimeDiff,JF_Rule_Count,JFValue_Every'間隔時間,間隔時間內的有效點擊次數,每次有效點擊 擷取的積分
dim sql'定義執行的sql語句
dim rs'定義rs
dim userid,validcount'使用者編號,時間段內的有效訪問次數
dim IP,URL '用戶端ip及i來源url
dim logincount'登入次數
dim isvalid'是否有效
dim LoginIPArea,login_Url'用戶端ip所在地區,來源url網址
login_Url=""'初始化網址
LoginIPArea=""'初始化用戶端ip地區
login_Url= Request.ServerVariables("HTTP_REFERER") '擷取用戶端ip來源地址
nextpage=""'定義跳轉的頁面
' response.write login_Url
'response.end
if len(login_Url)>0 then '來源url的處理過程
login_Url= replace(login_Url,"http://","")
login_Url= split(login_Url,"/")
login_Url= login_Url(0)
end if
isvalid=1
validcount=0
logincount=0
vipurl=request("vip")
IP = Request.ServerVariables("HTTP_X_FORWARDED_FOR") '擷取用戶端ip
If IP = "" Then IP = Request.ServerVariables("REMOTE_ADDR") 'ip地址處理
' IP=getIP()
LoginIPArea=GetIpArea(IP)

'response.write("ip:"&IP&"
")
'response.write("vip:"&vipurl)

set rs=server.createobject("adodb.recordset")'建立rs對象
set rsuser=server.createobject("adodb.recordset")'建立rs對象
sql="select JF_Rule_TimeDiff,JF_Rule_Count,JFValue_Every from JF_Rule"
rs.open sql,conn,1,1
'擷取系統參數過程
if not rs.eof then
JF_Rule_TimeDiff=rs("JF_Rule_TimeDiff")'間隔時間
JF_Rule_Count=rs("JF_Rule_Count")'間隔時間內的有效點擊次數
JFValue_Every=rs("JFValue_Every")'每次有效點擊 擷取的積分
end if
rs.close
if(len(vipurl)=0) then '如果不是推廣串連進入的
'跳轉-----此處寫跳轉的頁面
response.write nextpage
response.end
else '是推廣串連 則對使用者進行有效操作
sql="select User_ID, User_Code, User_UserName, User_Login_time, User_Login_IP, User_Login_Count from C_User where User_Code='"&vipurl&"'"
rs.open sql,conn,1,1
if not rs.eof then
userid=rs("User_ID")
', User_FromUser, User_JF, User_ToUserCount,User_ToAllCount

else
'跳轉-----此處寫跳轉的頁面
response.write nextpage
response.end
end if
rs.close
end if
'---------有效點擊次數 ,下面擷取本次點擊是否有效
sql="select isnull(count(1),0) as logincount from User_GetJF where LoginIP='"&IP&"' and datediff(hour,LoginTime,cast('"&now()&"' as datetime))<="&JF_Rule_TimeDiff&""
'response.write sql
' response.end
rs.open sql,conn,1,1
if not rs.eof then
logincount=rs("logincount")'擷取有效點擊次數
end if
if(logincount>=JF_Rule_Count) then'如果點擊次數超過系統參數設定則無效
isvalid=0
end if
rs.close
sql="insert into User_GetJF(User_ID,User_GetJFValue,User_GetMethod,LoginIP,LoginIPArea,IsValid,login_Url) values("&userid&","&JFValue_Every&",'推廣訪問','"&IP&"','"&LoginIPArea&"',"&isvalid&",'"&login_Url&"') "
'寫入使用者推廣明細表
rs.open sql,conn
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.