<% Option Explicit %> <% ' ' :@users.asp ' ' Shows a list of all active chat users in the current users room. The ' current user will be bolded in the list in order to separate him from ' other users and all other users will have a link for opening their ' profile, e.g. if you want to send a private mssage to him/her. ' ' @author Peter Theill peter@theill.com ' Response.Buffer = True Dim userId, roomId userId = CStr(Request("chatId")) If (NOT isLoggedIn(userId)) Then Response.Write("Please Wait ...") Response.End End If Dim user Dim changeRoom If (Request("action") = "switch") Then ' user clicked on a new room and thus we need to put the user into the ' selected room and refresh list of messages, users and rooms changeRoom = True ' get room destination roomId = Request("roomId") If (roomId = "") Then ' this ought not to happen, but ... roomId = u.roomId End If ' switch to new room Call enterRoom(CStr(userId), CStr(roomId)) Else ' user has not requested to change to a new room so we just refresh ' his current room changeRoom = False Set user = getUser(userId) roomId = user.roomId End If %> <%= APPLICATION_NAME %> - Users <% ' we need to show all users available in this room Dim userId_, rowIdx For Each userId_ In conquerChatUsers Set user = getUser(userId_) If (user.roomId = roomId) Then If (rowIdx MOD 2) Then Response.Write "" Else Response.Write "" End If Response.Write " " If (user.id = userId) Then ' print users own name in bold Response.Write " " Else ' users are able to send private messages to all other users ' but themselves Response.Write " " End If Response.Write "" rowIdx = rowIdx + 1 End If Next ' // > For Each userId_ In conquerChatUsers %>
Users Refresh
user" & user.name & " " & user.name & " 
<% If (changeRoom) Then %> <% End If %>