<!--#include file="../../fy_inc/fy.User.asp"-->
<%
	Dim ID,AD_Link,rs,sql
	ID=ChkNumeric(Request.QueryString("id"))
	ConnectionDatabase
	Set rs=server.createobject("adodb.recordset")
		sql = "Select ADLink,ADHits from [ads] where ID=" & ID & ""
		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
		echo "<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
%>