} else { $data = new CText(translateFN('Errore nella cancellazione della Chat')); } } else { $data = new CText(translateFN('Chatroom non trovata')); } } else { $data = new CText(translateFN('Id chat non valido')); } } else { $chatId = DataValidator::is_uinteger($_GET['id_room']); if ($chatId === false) { $data = new CText(translateFN('Id chat non valido') . '(1)'); } else { // $chatroomObj = new ChatRoom($chatId); $chatRoomHa = ChatRoom::get_info_chatroomFN($chatId); if (!AMA_DataHandler::isError($chatRoomHa)) { $classId = $chatRoomHa['id_istanza_corso']; $chatTitle = $chatRoomHa['titolo_chat']; $formData = array('id_room' => $chatId); $data = new chatRemovalForm(); $data->fillWithArrayData($formData); } else { $data = new CText(translateFN('Chatroom non trovata') . '(1)'); } } } $label = translateFN('Cancellazione chatroom') . ' ' . $chatTitle . ', id: ' . $chatId; $label .= ' - ' . translateFN('Classe') . ': ' . $classId; $help = translateFN('Da qui il provider admin può cancellare una chat esistente'); /*
} // get only the ids of the chatrooms foreach ($class_chatrooms_ar as $value) { foreach ($value as $id) { $chatrooms_class_ids_ar[] = $id; } } //initialize the array of the chatrooms to be displayed on the screen $list_chatrooms = ""; // start the construction of the table contaning all the chatrooms foreach ($chatrooms_class_ids_ar as $id_chatroom) { // vito, 16 mar 2009 if (!is_object($id_chatroom)) { $chatroomObj = new ChatRoom($id_chatroom); //get the array with all the current info of the chatoorm $chatroom_ha = $chatroomObj->get_info_chatroomFN($id_chatroom); } $list_chatrooms .= "<a href=\"report_chat.php?id_chatroom={$id_chatroom}\">{$chatroom_ha['titolo_chat']}</a><br />"; } $tabled_chat_dataHa = $list_chatrooms; break; case 'export': //file as TXT : header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1 header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache");
if ($_SERVER['REQUEST_METHOD'] == "POST") { $form = new ChatManagementForm(); $form->fillWithPostData(); if ($form->isValid()) { switch ($new_chat_type) { case 'Privata': $chatroom_ha['chat_type'] = INVITATION_CHAT; break; case 'Classe': $chatroom_ha['chat_type'] = CLASS_CHAT; break; case 'Pubblica': $chatroom_ha['chat_type'] = PUBLIC_CHAT; break; case '-- select --': $chatroom_old_ha = $chatroomObj->get_info_chatroomFN($id_room); $chatroom_ha['chat_type'] = $chatroom_old_ha['tipo_chat']; break; default: } // switch /* * * transfrom username's into user's_id * */ $id_owner = $common_dh->find_user_from_username($_POST['chat_owner']); if (AMA_DataHandler::isError($id_owner) or $id_owner == '') { $id_owner = $_POST['id_owner']; } // old owner