<!-- +-------------------------------------------------------------------+ --> <!-- | Title: prLogon.asp | --> <!-- | Author: Scott Baker | --> <!-- | Copyright (c) 2000 Elsinore Technologies, Inc | --> <!-- | Date: 1-May-00 | --> <!-- | Contents: VBScript only | --> <!-- +-------------------------------------------------------------------+ --> <!-- | Description: | --> <!-- | This file is responsible for handling the logon efforts of | --> <!-- | solution. When the user presses the logon button, the | --> <!-- | action is handled in this file. Five variables are created, | --> <!-- | some are initialized with data from the posting page. When | --> <!-- | the variables are set, a call is made to the Logon method of | --> <!-- | viEngine object, which returns a long. If the return value | --> <!-- | is zero, then the logon was successful, and the user is sent | --> <!-- | to the next page in the solution. Otherwise, the user is | --> <!-- | redirected to the default.asp page (logon page). | --> <!-- +-------------------------------------------------------------------+ --> <!-- | Change History: | --> <!-- | | --> <!-- | 1-May-00 File was created. | --> <!-- +-------------------------------------------------------------------+ --> <!-- | Software Design comments for this file: | --> <!-- | | --> <!-- | 1. This file is named "prLogon.asp", this naming convention was | --> <!-- | was chosen so that 'pr' represents process followed by the | --> <!-- | name of the form it works for. In this case, this is the | --> <!-- | process page for the Logon page (default.asp). | --> <!-- +-------------------------------------------------------------------+ --> <%@ LANGUAGE=VBSCRIPT ENABLESESSIONSTATE=TRUE%> <% 'Ignore errors without crashing, though you can evaluate them 'as necessary. On Error Resume Next 'Local scope variable declarations Dim sDSN 'As String Dim sUserID 'As String Dim sPassword 'As String Dim lErr 'As Long Dim lVIOptions 'As Long lVIOptions = 45 'viLogonWeb enumeration value sDSN = "Visual Intercept Enterprise" sUserID = TRIM(Request.Form("txtUserID")) SPassword = TRIM(Request.Form("txtPassword")) 'Logon to the specified data source via the Visual Intercept SDK. lErr = viEngine.Logon(sDSN, sUserID, SPassword, lVIOptions, 0) If (0 = lErr) Then 'Logon successful, proceed to the incident page Response.Redirect("fmIncd.asp") Else 'Failed to logon, send the viewer back to the logon page Response.Redirect("default.asp") End If %>