<%if allowtracking="" then response.end '/// user settings referer=replace(request.servervariables("http_referer")&"","'","''") ip=request.ServerVariables("REMOTE_ADDR") paramstart=instr(referer,"?") '/// Cookies (if any) name=replace(request.cookies("xlaALSuser")("name")&"","'","''") isrep=request.cookies("xlaALSadmin")("lvl")&"" totalrequests=request.cookies("xlaALSuser")("totalrequests") if totalrequests="" or not(isnumeric(totalrequests)) then totalrequests=0 sessionid=getsessionid() thisdate=getlogin(now) '/// Get Full URL ? if getfullurl="" and paramstart>0 then referer=left(referer,paramstart-1) '/// Track User if isrep="" or (isrep<>"" and trackreps<>"") and referer<>"" then set conn=server.createobject("ADODB.Connection") conn.open connection conn.execute "update xlaALSVisitors set referer='"&referer&"', lastdate='"&thisdate&"', name='"&name&"',totalrequests="&totalrequests&" where ip='"&ip&"' and sessionid='"&sessionid&"'",affected if affected=0 then conn.execute "insert into xlaALSVisitors (ip,sessionid,lastdate,actionid,actionnote,name,totalrequests,referer) values ('"&ip&"','"&sessionid&"','"&thisdate&"',0,'Browsing','"&name&"',"&totalrequests&",'"&referer&"')" call deletevisitors() conn.close set conn=nothing end if response.redirect "i.gif" %>