<% Option Explicit %>
<!--#include file="../Inc/Const.asp" -->
<!--#include file="../Inc/Cls_DB.asp" -->
<%
Dim DBC,Conn
Set DBC = New DataBaseClass
Set Conn = DBC.OpenConnection()
Set DBC = Nothing
 if request("Location")<>"" and isnull(request("Location"))=false then
	Conn.Execute("update Ads set ShowNum=ShowNum+1 where Location="&clng(request("Location"))&"")

    dim Getip,AdsRsObj,AdsRsSql
 	Getip=request.ServerVariables("REMOTE_ADDR")
	set AdsRsObj=server.createobject("adodb.recordset")
	AdsRsSql="select * from AdsVisitList"
	AdsRsObj.open AdsRsSql,conn,1,3
	AdsRsObj.AddNew
	AdsRsObj("AdsLocation") = clng(request("Location"))
	AdsRsObj("VisitTime") = now()
	AdsRsObj("VisitIP") = Getip
	AdsRsObj("VisitType") = 2
	AdsRsObj.update
	AdsRsObj.close
	set AdsRsObj=nothing
 end if
Set Conn=nothing
%>