<table cellpadding=5 cellspacing=5 width="600" style='margin-top:30px;' align='center' border=0> <tbody> <TR><TD> <?php $MU = new ManageUsers(); $MCR = new ManageChatRooms(); $MU->userId = $CURRENT_USERID; $MY_ROOMS = $MU->getUser_AllowedChatRooms(); if (!count($MY_ROOMS)) { echo "You dont have access to any rooms."; } else { foreach ($MY_ROOMS as $THIS_ROOM) { $ACTIVE_MEMBER_COUNT = count($MCR->get_ListOfActiveUsersIn_ChatRoom($THIS_ROOM)); if ($MU->isUserCurrently_InRoom($THIS_ROOM)) { $OTHERS = $ACTIVE_MEMBER_COUNT - 1; $me_in_class = "mein"; if ($OTHERS > 0) { $members_string = "You and {$OTHERS} others"; } else { $members_string = "Only You"; } } else { $OTHERS = $ACTIVE_MEMBER_COUNT; $me_in_class = "menotin"; if ($OTHERS > 0) { $members_string = "{$OTHERS} users in chat room"; } else { $members_string = "empty"; }