<% ' ' $Id: default.asp,v 2003/03/09 22:45:57 peter Exp $ ' ' This page is the main entrace for ConquerChat. It shows a list of currently ' logged in chatusers and makes it possible to log in by entering your user- ' name in the appropriate field. ' ' @author Peter Theill peter@theill.com ' Option Explicit Response.Buffer = True %> <% ' many users does not read the included README.TXT file before trying to ' set up this chat -- in order to help them a bit we check if we have the ' required objects properly initialised On Error Resume Next If (NOT IsObject(conquerChatUsers) OR NOT IsObject(conquerChatRooms)) Then Response.Redirect("errorInSetup.asp") Response.End End If Dim userId ' do not show login screen if a valid session exists If (loggedOn()) Then Response.Redirect "frames.asp" Response.End End If Dim mode, errorMessage mode = Request("mode") If (mode = "userLogin") Then Dim userName userName = Server.HTMLEncode(Request("username")) If (countUsers() >= USERS) Then errorMessage = getMsg("error.maximum_users_reached") ElseIf (Len(userName) = 0) Then errorMessage = getMsg("error.missing_username") ElseIf (Len(userName) > MAX_USERNAME_LENGTH) Then errorMessage = getMsg("error.username_length_exceeded", MAX_USERNAME_LENGTH) ElseIf (userExists(userName)) Then errorMessage = getMsg("error.username_in_use") ElseIf (NOT isValidUsername(userName)) Then errorMessage = getMsg("error.invalid_username") ElseIf (isUserNameBlocked(userName)) Then errorMessage = getMsg("error.username_blocked") Else Dim p Set p = New Person p.id = -1 p.name = userName p.roomId = 0 p.ipAddress = Request.ServerVariables("REMOTE_ADDR") ' we have a new chat user thus we need to create a new ' id for him/her Set p = addUser(p) ' tell all other users about this new user Call addMessage( _ p.id, _ "-1", _ " " & getMsg("user.logged_on", p.name, Now()) & "
" _ ) Session("user") = p.data ' redirect to new frame window and create a new user login Response.Redirect("frames.asp") Response.End End If End If ' > If (mode = "userLogin") Then ' make sure we don't show any inactive users for new chat users kickInactiveUsers() If (conquerChatRooms.Count = 0) Then setupRooms() End If %> MuslimAccess Chat <% If (Len(errorMessage) > 0) Then %>

<%= errorMessage %>
<% End If %>
MuslimAccess Chat

  <%= getMsg("login.username") %>  
  " border=0 tabindex=2 title="<%= getMsg("button.login.title") %>">  

  <% If (countUsers() <> 0) Then %> <% ' display all users and their associated rooms Dim user, room_ For Each userId In conquerChatUsers Set user = getUser(userId) Set room_ = getRoom(user.roomId) If (room_ Is Nothing) Then Set room_ = New Room room_.name = "N/A" End If Response.Write("") Response.Write(" ") Response.Write(" ") Response.Write(" " & vbCrLf) Response.Write("") Next %> <% Else %> <% End If %>
<%= getMsg("login.users_online") %>
  <%= getMsg("login.header.username") %> <%= getMsg("login.header.room") %>
" & user.name & "" & Server.HTMLEncode(room_.name) & "

<%= getMsg("login.users_logged_on", countUsers(), USERS) %>
 <%= getMsg("login.no_users_online") %>

Helpful Tips

1. Don't give out any personal information like telephone numbers, home address , school name or parent's office address.

2. Don't use your real name as your log on name.

3. Sometimes you may meet a friend online and discover that you both live in the same city.

Do NOT start setting up meetings and telephone conversations without your parents' supervision! If you are going to speak by phone, make sure you have caller i.d. blocking so that the other person cannot track you.

4. Stay cool and calm when you think that someone appears to be rude or causing trouble.

Some kids sometimes appear to be ruder than they mean to be. Sometimes this is because you only have the words to read, so you can't hear what the tone of voice is. The other reason people can be ruder online is that they don't have to take the consequences of their rudeness. Don't panic or jump to conclusions.

5. Learn how to use "smileys" to show how you are saying things. Read the smileys sideways - they make a face.

:) or :-) is a smiley face. You are happy and smiling when you speak.

6. Because you can't see or even hear the person you are chatting with , it would be easy for someone to fool you. YOU know that because you can do it too, right?