%@ LANGUAGE="VBSCRIPT" TRANSACTION=REQUIRED %>
<% Option Explicit %>
<%
Dim m_LogonUser, m_ErrorMessage, m_NewEmployeeQualifier
' Set m_NewEmployeeQualifier to value for adding employee
m_NewEmployeeQualifier = CInt(Application("NewEmployeeQualifier"))
' First time thru page in this session...
If Session("EmployeeId") = "" Then
m_LogonUser = Request.ServerVariables("LOGON_USER")
' Security in Benefits uses NTLM, and requires that the web directory for Benefits
' be set to require "Windows NT Challenge/Response", and NOT allow anonymous login.
' However, just to make it easy on those who don't have the security settings right,
' we plug in a value for m_LogonUser as needed.
' Remove the code following between If and End If in production systems!!
If m_LogonUser = "" Then
m_LogonUser = "cynthiar"
' Present error message to tell user they did not come in under NTLM
m_ErrorMessage = " You cannot be validated using Windows NT Challenge/Response " & _
"Security, so you are logged on for demonstration purposes as 'cynthiar'. " & _
"Uncheck 'Allow Anonymous' on the Authentication Methods for the Benefits " & _
"directory to logon under your own account."
End If
LookupEmployee
' If we did not have any errors in creating component or opening database
If m_ErrorMessage = "" Then
If Session("EmployeeId") = "" Then
SetupEmployee
End If
End If
End If
%>
Exploration Air Employee Benefits Program
|
|
|
|
|
Category Explanations
Review or Change Current Benefits
View your current benefit selections, and make benefit
changes following qualifying changes in family or employment status.
Open Enrollment
Make your benefit selections for next year.
Employee Record Maintenance
Change your Employee Record information on address, dependents, and so on.
|
©1997 Microsoft Corporation. All rights reserved. Terms of Use.
|
|
<%
Sub LookupEmployee
On Error Resume Next
Dim Employee, rstLookupEmployee
Set Employee = Server.CreateObject("Benefit.Employee")
' Handle error with component
If Err.Number <> 0 Then
m_ErrorMessage = " An error occurred (" & Hex(Err.Number) & ": " & Err.Description & _
") while trying to create an instance of the Benefit component. Please try " & _
"again later."
Exit Sub
End If
Set rstLookupEmployee = Employee.LookupEmployee(Application("DSNBenefits"), m_LogonUser)
' Handle error with database
If Err.Number <> 0 Then
m_ErrorMessage = "An error occurred (" & Hex(Err.Number) & ": " & Err.Description & _
") while opening the database (" & Application("DSNBenefits") & "). Please try " & _
"again later."
Exit Sub
End If
If Not rstLookupEmployee.EOF Then
Session("EmployeeId") = rstLookupEmployee("EmployeeId")
End If
End Sub
Sub SetupEmployee
Dim Employee
Set Employee = Server.CreateObject("Benefit.Employee")
Employee.AddNew Application("DSNBenefits"), m_LogonUser, Year(Date), _
m_NewEmployeeQualifier, Date
LookupEmployee
End Sub
%>