<% Option Explicit '########################################################### '## COPYRIGHT (C) 2002-2008, Metasun Software Corp. '## '## 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. '########################################################### %> <% Dim strUsername : strUsername = Request.Form("username") Dim strPassword : strPassword = Request.Form("password") Dim blnRemember : blnRemember = Request.Form("remember") Dim strAction : strAction = UCase(Request("action")) Dim strChecked, strError If blnRemember = "ON" Then blnRemember = True strChecked = " checked" Else blnRemember = False End If Select Case strAction Case "LOGIN" If strUsername <> "" Then Response.Cookies("metatraffic")("username") = strUsername Response.Cookies("metatraffic")("password") = strPassword Call CreateDatabaseConnection(1) Dim blnAdmin : blnAdmin = CInt(Authenticate(False, aryMTDB(5))) Call CloseDatabaseConnection() If blnRemember = True Then Response.Cookies("metatraffic").expires = dateadd("d", 365, date()) End If ' REDIRECT Response.Redirect "default.asp" End If Case "LOGOUT" Response.Cookies("metatraffic").expires = DateAdd("d", -1, Now()) strError = "

You have been logged out

" Case "FAILURE" Dim intCode : intCode = CInt(Request.Querystring("code")) If intCode = 0 Then strError = "

Invalid username or password.

" ElseIf intCode = -1 Then strError = "

Insufficient priviledges

" ElseIf intCode = -2 Then strError = "

Please log in

" End If End Select ' RETRIEVE USERNAME / PASSWORD FROM COOKIES strUsername = Request.Cookies("metatraffic")("username") strPassword = Request.Cookies("metatraffic")("password") %> MetaTraffic
<% If strError <> "" Then %> <% End If %>
MetaTraffic
<% Response.Write(strError) %>

Username:

Password:

> Remember login information

© Copyright 2008, Metasun Software