<% '########################################################### '## COPYRIGHT (C) 2003, Metasun Software '## '## For licensing details, lease read the license.txt file '## included with MetaTraffic or located at: '## http://www.metasun.com/products/metatraffic/license.asp '## '## All copyright notices regarding MetaTraffic '## must remain intact in the scripts and in the '## outputted HTML. All text and logos with '## references to Metasun or MetaTraffic must '## remain visible when the pages are viewed on '## the internet or intranet. '## '## For support, please visit http://www.metasun.com '## and use the support forum. '########################################################### %> <% 'Option Explicit %> <% ' DEFINE VARIABLES Dim objTrack, strUrl, intType, strScreenarea ' GET URL FOR LOGGING / REDIRECTION OR REFERRER strUrl = Request.Querystring("r") ' CHECK WHAT TYPE OF LOGGING METHOD IS BEING USED ' 0 - ASP EXECUTE METHOD (DEFAULT IF NO URL SPECIFIED) ' 1 - REDIRECT FILE METHOD -- FOR .EXE, .ZIP, ETC. (DEFAULT IF URL SPECIFIED) ' 2 - JAVASCRIPT METHOD -- FOR .HTML AND OTHER NON-ASP BASED FILES ' SET LOGGING TYPE IN CASE UNSPECIFIED If strUrl <> "" Then intType = 1 Else intType = 0 End If ' GET LOGGING TYPE IF SPECIFIED If Request.Querystring("tpe") <> "" Then intType = Request.Querystring("tpe") End If If Request.Querystring("s") <> "x" Then strScreenArea = Request.Querystring("s") End If ' LOG REQUEST IF LOGGING IS ENABLED If blnLog = True Or blnLog = "" Then ' INSTANTIATE OBJECT FROM CLASS.ASP FILE Set objTrack = New clsMetaTraffic ' SET SOME PROPERTIES With ObjTrack .DatabaseType = strDatabaseType .DatabaseLocation = strDatabaseLocation .DatabaseName = strDatabaseName .DatabaseUsername = strDatabaseUsername .DatabasePassword = strDatabasePassword .analyzeData = intAnalyzeData .Instance = strInstance .DeleteAfterDays = intDeleteAfterDays .SiteAliases = strSiteAliases End With ' CHECK TO SEE IF IP MATCHES LOG EXCLUSION LIST If Not objTrack.MatchIPAddress(strExcludeIPFromLog) Then ' PERFORM LOGGING OPERATION Call objTrack.LogFile(strUrl, intType, strScreenArea) End If Set objTrack = Nothing End If ' REDIRECT TO PAGE IF USING REDIRECT FILE METHOD (intType = 1) If CInt(intType) = 1 Then Response.Redirect strUrl End If %>