<!--#include file="Inc.asp"-->
<!--#include file="ydzq1.asp"-->
<%call head()

'删除过期数据
conn.Execute("delete from bbsads where ttmm<>date()")
'============
dim id,url,downjb
id=request.querystring("id")
Set rs = Server.CreateObject("ADODB.Recordset")
sql="Select url,tid,cent from [gogo] where id="&id
rs.open sql,conn,1,2
if not rs.eof then
rs("tid")=rs("tid")+1
rs.update()
url=rs("url")
adnum=rs("cent")
adname=rs("name")
Else
Call saycarda("ID错误")
 Response.Write "广告ID错误!"
 Response.Write "<a href='Adwiew.asp?saytk="&saytk&"&amp;sid="&sid&"'>广告首页</a><br/>"
Call head1()
 response.end
 End if  
rs.close
set rs=nothing


if myid<>0 then
set rs=server.createobject("adodb.recordset")
rs.open "select * from bbsads where UsID="&myid&" and adid="&id,conn,1,2
if rs.eof then
  adsgg="您今天首次点击了"&adname&"社区广告,为了感谢您的支持,系统奖励您"&adnum&"金币<br/>"
rs.addnew
rs("adid")=id
rs("UsID")=myid
rs("name")=myni
rs("ttmm")=date()
rs.update()
adsttmm=rs("ttmm")
end if
rs.close
set rs=Nothing
sql="update Users set myjb=myjb+"&adnum&" Where id="&myid&""
  conn.Execute(sql)
If adsgg<>"" then
dim rsl,rspll
set rsl=Server.CreateObject("ADODB.Recordset")
rspll="select * from guest"
rsl.open rspll,conn,1,2
rsl.addnew
rsl("fnr")="您今天首次点击了社区广告"&adname&",为了感谢您的支持,系统奖励您"&adnum&"金币"
rsl("sid")=myid
rsl("fid")="0"
rsl.update
rsl.close
set rsl=Nothing
End if
end if

if myid<>0 then
mz="[url=/bbs/uinfo.asp?id="&myid&"&amp;saytk="&saytk&"&sid=[sid]]"&myni&"[/url]"
else
mz="游客"
end if


conn.close
set conn=Nothing
Call cardz3("正在跳转...",ubb(url))
%>
<%=adsgg%>正在进入,请稍后，谢谢您的支持!如果转向页面出错请通知管理员...<br/>
如不能自动跳转,请<a href='<%=ubb(url)%>'>点击进入</a><br/>

<%
call headsay()
%>