Source Code for Enter.asp


'Check to see that they've filled out the form

If Request("Name") = "" Then
End If

'Local Variables:

Name = Request("Name")
Email = Request("Email")
Refresh = Request("Refresh")

'Assigning Session Variables:

Session("RefreshRate") = Refresh
Session("Name") = Name

If Request("Email")="" then
Session("Email") = Email
End If

'Add the user to the App level array of users:

If Not IsEmpty(Application("Users")) Then
If IsArray(Application("Users")) Then
uLen = UBound(Application("Users"))

'Check to see if someone already has the name, if so redirect w/ querystring bln var

For I = 0 To uLen
If Application("Users")(I) = Name Then
Name = Name & "_1"
Session("Name") = Name
Exit For
End If

'Get App level array variable, add current user info and put back

Users = Application("Users")
NumOfUsers = UBound(Users)+1
ReDim Preserve Users(NumOfUsers)
Users(NumOfUsers-1) = Name
Application("Users") = Users


'If not array, dimension the variables as array

Users = Application("Users")
ReDim Preserve Users(1)
Users(0) = Name
Application("Users") = Users

End If

'If it's empty, then initialize Users Variable
Dim NewUsers()
Redim NewUsers(1)
NewUsers(0) = Name
Application("Users") = NewUsers

End If

'User added to App level array of users, now send their first message:
'Variables to be passed to app level:

Name = Session("Name")
NewUserInput= "[Has entered 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)

'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

'ReDimension the array to include new input and return to App level

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

'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


'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
'CHANGED 8/8/01
NwTimeInput(0)= Now()
Application("UserInput") = NwUserInput
Application("Handle") = NwHandle
Application("TimeInput") = NwTimeInput
Application("InputEmail") = NwInputEmail

End If

<script language="JavaScript">
function Redirect(){
chatWin ="HS_Chat.asp","chatWin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,WIDTH=617,HEIGHT=475");
chatWin.location.href = "HS_Chat.asp"
if(navigator.appVersion.indexOf("4") != -1){

<body onLoad="Redirect()">
<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=""></script>

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