// switch $c_type // verifiy the status of the chatroom $started = $chatroomObj->is_chatroom_startedFN($id_chatroom); $running = $chatroomObj->is_chatroom_activeFN($id_chatroom); //$not_expired = $chatroomObj->is_chatroom_not_expiredFN($id_chatroom); if ($running) { $chatroom_status = translateFN('in corso'); switch ($c_type) { case PUBLIC_CHAT: $enter = "<a href=\"chat.php?id_room={$id_chatroom}&id_course={$id_course}\" target=\"_blank\"><img src=\"img/_chat.png\" alt=\"{$chat_label}\" border=\"0\"></a>"; break; case CLASS_CHAT: $enter = translateFN("- - - "); break; case INVITATION_CHAT: $present = $chatroomObj->get_user_statusFN($sess_id_user, $id_chatroom); if ($present == STATUS_OPERATOR or $present == STATUS_ACTIVE or $present == STATUS_MUTE or $present == STATUS_BAN or $present == STATUS_INVITED or $present == STATUS_EXIT) { $enter = "<a href=\"chat.php?id_room={$id_chatroom}\" target=\"_blank\"><img src=\"img/_chat.png\" alt=\"{$chat_label}\" border=\"0\"></a>"; } else { $enter = translateFN("- - - "); } break; default: } // switch $c_type } elseif (!$started) { $chatroom_status = translateFN('non avviata'); $enter = translateFN("- - - "); } else { $chatroom_status = translateFN('terminata'); $enter = translateFN("- - - ");