<!--#include file="../inc/config.asp"-->
<!--#include file="../inc/conn.asp"-->
<%
dim id,li,ip
ip=request.ServerVariables("REMOTE_ADDR")
id=Clng(trim(request.QueryString("id")))
Set rs = Server.CreateObject("Adodb.RecordSet")
rs.open "select linkUrl,hits from ad where id="&id,conn,3,1
li=rs(0)
rs.close
set rs=nothing
conn.execute("update ad set hits=hits+1 where id="&id)
conn.execute("insert into t_ad_hits(AdId,Ip,PubDate,Area) values("&id&",'"&ip&"',getdate(),'')")
call connclose()
response.Redirect(li)
%>
