Exemplo n.º 1
0
     switch ($c_type) {
         case PUBLIC_CHAT:
             $chat_type = translateFN('pubblica');
             break;
         case CLASS_CHAT:
             $chat_type = translateFN('classe');
             break;
         case INVITATION_CHAT:
             $chat_type = translateFN('privata');
             break;
         default:
     }
     // switch $c_type
     // verify 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');
         $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>";
     } elseif (!$started) {
         $chatroom_status = translateFN('non avviata');
         $enter = translateFN("- - -");
     } else {
         $chatroom_status = translateFN('terminata');
         $enter = translateFN("- - -");
     }
     // create the entries for the table
     $row = array(translateFN('titolo') => translateFN($chat_title), translateFN('stato') => $chatroom_status, translateFN('tipo') => $chat_type, translateFN('entra') => $enter);
     array_push($list_chatrooms, $row);
 }