<% data_path="../" 'ACC连接数据库路径，对SQL无效 %>
<!--#include file="../conn/conn.asp"-->
<!--#include file="../inc/safe.asp"-->
<%
 	Dim ADID,AD_Link,rs
		ADID=Replace_Text(Request.QueryString("adid"))
	Set rs=server.createobject("adodb.recordset")
		sql = "Select ADLink,ADHits,ADViews from [yixiang_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
		conn.Close
	set conn=nothing
	 
	If AD_Link="" Then AD_Link="http://"&Request.Servervariables("server_name")
		response.redirect AD_Link
%>