Source Code for global.asa



<script language="VBScript" runat=Server>

'Application start

Sub Application_OnStart

'Create app level vars

Dim Users()
Redim Users(1)
Application("Users") = Users
Dim Handle()
Redim Handle(1)
Application("Handle") = Handle
Dim UserInput()
Redim UserInput(1)
Application("UserInput") = UserInput
Dim TimeInput()
ReDim TimeInput(1)
Application("TimeInput") = TimeInput
Dim InputEmail()
ReDim InputEmail(1)
Application("InputEmail") = InputEmail

End Sub

Sub Application_OnStart
Application("RootDir")="D:\inetpub\wwwroot\hotspringsenthusiast.com\html"
End Sub

'Set timeout for session to 2 mins

Sub Session_OnStart
Session.Timeout= 2
End Sub

'Processing for end of a session

Sub Session_OnEnd

Name = Session("Name")

Users = Application("Users")


'Create a variable to hold the array sub for the new list,
'without the user who is ending the session


ArraySub = 1

If IsArray(Users) Then

'How many users are there?
NumOfUsers = UBound(Users)

'If there are none, then empty the app var

If NumOfUsers = 0 Then
Set Application("Users") = Nothing

' otherwise get the app var and go through the users
' update the array, but not with the session user that's ending

Else
Dim UpdatedUsers()
ReDim UpdatedUsers(1)

For I = 0 To NumOfUsers
If Name <> Users(I) Then
ReDim Preserve UpdatedUsers(ArraySub)
UpdatedUsers(ArraySub-1) = Users(I)
ArraySub = ArraySub + 1
End If
Next

Application("Users") = UpdatedUsers

End If
End If
End Sub


</script>


<--Back