<!--#include file="../Include/conn.asp" -->
<!--#include file="../Include/ConnDatabase.asp" -->
<%
'=====================================
'天天企业网站管理系统  TianTianCMS
'天天网络科技工作室版权所有
'官方客服中心 http://www.ip126.com
'微信公众号 ip126com
'QQ:530051328 mail:bbfhq@163.com
'=====================================
%>
<%
	Dim ADID,AD_Link
		ADID=Request.QueryString("adid")
	Set rs=server.createobject("adodb.recordset")
		sql = "Select ADLink,ADHits from [TianTianCMS_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>"
	End If
		rs.Close
	set rs=nothing
Call CloseDB(conn)
	If AD_Link="" Then AD_Link="http://"&Request.Servervariables("server_name")
		response.redirect AD_Link
%>