<%@ LANGUAGE="VBSCRIPT"%> <% Dim AzClient Dim Results Dim Names(5) Dim Values(5) Dim Scopes(5) Dim Operations(10) Dim Roles Dim Role Dim Submitter Dim Approver Dim Admin Dim AccountName Dim SamName Initialize SamName = GetClientSamName() AccountName = Right( SamName, Len( SamName ) - InStr( SamName, "\" )) Response.Write "

Hello " & AccountName & "

" '--------------- Determine Role for User -------------- Set AzClient = GetAzCleintContext() Roles = AzClient.GetRoles() Approver = False Admin = FALSE If UBound(Roles) < 0 Then response.write "Sorry " & AccountName & " you have no Roles
" response.write "Please contact your manager
" Else For each Role in Roles If ( StrComp( Role, "Approver", 1 ) = 0 ) Then Approver = True Elseif ( StrComp( Role, "Administrator", 1 ) = 0 ) Then Admin = True Elseif ( StrComp( Role, "Submitter", 1 ) = 0 ) Then Submitter = True End If Next End If Set AzClient = Nothing %> <% If ( Submitter = True ) Then ' display submit page %>

Submitter

Submit Expense

Check Status
<% End If %> <% If ( Approver = True ) Then ' Allow only managers to approve expenses %>

Approver

View Pending
<% End If %> <% %>