Source Code for exit.asp



<%	Name = Session("Name")
NewUserInput= "[Has left the room]"
NewInputEmail = Session("Email")

MaxLength = 100

If Not IsEmpty(Application("UserInput")) Then

If IsArray(Application("UserInput")) Then
UserInput = Application("UserInput")
Handle = Application("Handle")
InputEmail = Application("InputEmail")
TimeInput = Application("TimeInput")
NumofEntries = UBound(UserInput)

If NumofEntries > MaxLength then

'Move all the entries up one, deleting the first
For I = 0 to (NumofEntries - 2)
UserInput(I) = UserInput(I+1)
Handle(I) = Handle(I+1)
TimeInput(I) = TimeInput(I+1)
InputEmail(I) = InputEmail(I+1)
Next

'Assign values and put the new arrays to App level
UserInput(MaxLength) = NewUserInput
Handle(MaxLength) = Name
TimeInput(MaxLength) = Now
InputEmail(MaxLength)= NewInputEmail
Application("UserInput") = UserInput
Application("Handle") = Handle
Application("InputEmail") = InputEmail
Application("TimeInput")= TimeInput
Else
'ReDimension the array to include new input and return to App level
'Note: Removed the "-1" from value assignments
'CHANGED

NumofEntries = NumofEntries + 1

ReDim Preserve UserInput(NumofEntries)
ReDim Preserve Handle(NumofEntries)
ReDim Preserve TimeInput(NumofEntries)
ReDim Preserve InputEmail(NumofEntries)
UserInput(NumofEntries -1) = NewUserInput
Handle(NumofEntries -1) = Name
InputEmail(NumofEntries -1) = NewInputEmail
TimeInput(NumofEntries -1)=Now
Application("UserInput") = UserInput
Application("Handle") = Handle
Application("TimeInput")= TimeInput
Application("InputEmail") = InputEmail
End If

Else
'ReDimension the variable to an array and put back to App level
ReDim UserInput(1)
ReDim Handle(1)
ReDim TimeInput(1)
ReDim InputEmail(1)
Handle(0) = Name
UserInput(0) = NewUserInput
TimeInput(0) = Now
InputEmail(0) = NewInputEmail
Application("Handle") = Handle
Application("UserInput") = UserInput
Application("TimeInput") = TimeInput
Application("InputEmail") = InputEmail

End If

Else
'Initialize Users Variable and give to the App
Dim NwUserInput()
ReDim NwUserInput(1)
Dim NwHandle()
ReDim NwHandle(1)
Dim NwTimeInput()
ReDim NwTimeInput(1)
Dim NwInputEmail()
ReDim NwInputEmail(1)
NwUserInput(0) = NewUserInput
NwHandle(0) = Name
NwInputEmail(0) = NewInputEmail
TimeInput(0)= Now
Application("UserInput") = NwUserInput
Application("Handle") = NwHandle
Application("TimeInput") = NwTimeInput
Application("InputEmail") = NwInputEmail


End If

'Abandon the session
session.abandon%>

<html>
<head>

<script language="javascript">
function closeWin(){
top.close();
}
</script>
</head>
<body onLoad = "closeWin()">
<div align="center" style="margin:35px 0px 20px 0px">
<script type="text/javascript"><!--
amazon_ad_tag = "httpwwwhotspr-20"; amazon_ad_width = "728"; amazon_ad_height = "90"; amazon_ad_logo = "hide"; amazon_ad_link_target = "new"; amazon_color_border = "B8CD6F"; amazon_color_background = "F1F7DA"; amazon_color_link = "334141"; amazon_color_price = "232A23"; amazon_color_logo = "080808";//--></script>
<script type="text/javascript" src="http://www.assoc-amazon.com/s/ads.js"></script>
</div>

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-11415514-1");
pageTracker._trackPageview();
} catch(err) {}</script>

</body>
</html>

<--Back