require_once 'include/ChatDataHandler.inc.php'; $help = translateFN("Da qui l'utente puo' vedere la lista di tutte le chatrooms a cui puo' accedere."); $status = ''; //translateFN('lista delle chatrooms'); $modulo = translateFN('lista delle chatrooms'); // including the banner $chat_label = translateFN('entra'); $edit_label = translateFN('modifica'); $delete_label = translateFN('cancella'); $add_users_label = translateFN('aggiungi utenti'); switch ($id_profile) { // ADMINISTRATOR case AMA_TYPE_ADMIN: case AMA_TYPE_SWITCHER: // gets an array with all the chatrooms $all_chatrooms_ar = Chatroom::get_all_chatroomsFN(); if (!AMA_DB::isError($all_chatrooms_ar)) { //initialize an array $list_chatrooms = array(); // sort the chatrooms in reverse order, so we can visualize first the most recent chatrooms rsort($all_chatrooms_ar); $tbody_data = array(); foreach ($all_chatrooms_ar as $id_chatroom) { //initialize a chatroom Object $chatroomObj = new ChatRoom($id_chatroom); //get the array with all the current info of the chatoorm $chatroom_ha = $chatroomObj->get_info_chatroomFN($id_chatroom); $id_course_instance = $chatroom_ha['id_istanza_corso']; $id_course = $dh->get_course_id_for_course_instance($chatroom_ha['id_istanza_corso']); $courseObj = read_course($id_course); if (is_object($courseObj) && !AMA_DB::isError($courseObj)) {