<!--#Include File="conn.asp"-->
<%
	Dim ADID,AD_Link,rs
		ADID=Request.QueryString("adid")
	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>"
	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
%>