📄 openad.asp
字号:
<!--#Include File="conn.asp"-->
<!--#Include File="mdb.asp"-->
<%
'****************************************************
' Hxcms_JS广告插件V1.0 Power by Hx66.net
' Web: http://www.Hx66.net,http://www.Hx66.net/home
' Copyright (C) 2006 Hx66.net All Rights Reserved.
'****************************************************
Dim userid,youip
Dim ADID,AD_Link,rs
ADID=trim(replace(Request.QueryString("adid"),"'",""))
userid=CLng(request.Cookies("HX_USER")("uid"))
youip=Request.servervariables("REMOTE_ADDR")
Set rs=server.createobject("adodb.recordset")
sql = "Select ADLink,ADHits from [ad] where ADID='" & ADID & "'"
rs.open sql,conn,1,3
If not (rs.bof or rs.eof) Then
AD_Link=rs("ADLink")
rs("ADHits")=rs("ADHits") + 1
rs.Update
else
Response.write "<font size=2 color=red>没有找到您要浏览的广告</font>"
Response.End
End If
rs.Close
if userid>0 and pointsyes=1 then
sql="select hx66_date from hx66online"
set rs=conn.execute(sql)
while not rs.eof
if datediff("h",rs("hx66_date"),now())>=duration then
sql="delete * from hx66online where hx66_date=#"&rs("hx66_date")&"#"
conn.execute(sql)
end if
rs.movenext
wend
rs.close
set rs=server.createobject("adodb.recordset")
yousql="select * from hx66online where hx66_uid=" & userid & " and hx66_ips='" & youip & "' and hx66_adid='" & ADID & "'"
set onlineip=conn.execute(yousql)
rs.open yousql,conn,1,3
if onlineip.eof then
rs.addnew
rs("hx66_uid")=userid
rs("hx66_ips")=youip
rs("hx66_date")=now()
rs("hx66_adid")=ADID
rs.update
rs.close
if userid>0 and pointsyes=1 then
usersql="UPDATE [user] SET points = points + "&adpoints&" where userid="&userid
conn1.execute (usersql)
end if
end if
conn1.Close
set conn1=nothing
end if
set rs=nothing
conn.Close
set conn=nothing
If AD_Link="" Then AD_Link="http://"&Request.Servervariables("server_name")
Response.redirect AD_Link
'****************************************************
' Hxcms_JS广告插件V1.0 Power by Hx66.net
' Web: http://www.Hx66.net,http://www.Hx66.net/home
' Copyright (C) 2006 Hx66.net All Rights Reserved.
'****************************************************
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -