*/ $oggetto = ADAEventProposal::removeEventToken($msg_ha['titolo']); $mittente = $msg_ha['mittente']; $destinatario = str_replace(",", ", ", $msg_ha['destinatari']); // $destinatario = $msg_ha['destinatari']; $dest_encode = urlencode($mittente); if (isset($message_text) && strlen($message_text) > 0) { $testo = urlencode(trim($message_text)); } else { $message_text = ''; $testo = ''; } $oggetto_url = urlencode(trim($oggetto)); // Registrazione variabili per replay $destinatari_replay = $mittente; // $_SESSION['destinatari_replay'] = $destinatari_replay; $testo_replay = trim($message_text); $_SESSION['testo_replay'] = $testo_replay; $titolo_replay = trim($oggetto); $_SESSION['titolo_replay'] = $titolo_replay; $destinatari_replay_all = $mittente . "," . $destinatario; $_SESSION['destinatari_replay_all'] = $destinatari_replay_all; $message_text = ADAEvent::parseMessageText($msg_ha); if (empty($status) or !isset($status)) { $status = translateFN("Lettura appuntamento"); } $node_title = ""; // empty $content_dataAr = array('course_title' => '<a href="../browsing/main_index.php">' . $course_title . '</a>', 'status' => $status, 'user_name' => $user_name, 'user_type' => $user_type, 'level' => $user_level, 'mittente' => $mittente, 'Data_messaggio' => $Data_messaggio, 'oggetto' => $oggetto, 'destinatario' => $destinatario, 'message_text' => $message_text); ARE::render($layout_dataAr, $content_dataAr);
if (ADA_CHAT_EVENT & $practitioner_proposal['flags'] || ADA_VIDEOCHAT_EVENT & $practitioner_proposal['flags']) { if (ADA_CHAT_EVENT & $practitioner_proposal['flags']) { $event_flag = ADA_CHAT_EVENT; $end_time = $data_ora + $service_infoAr[7]; //durata_max_incontro $chatroom_ha = array('id_course_instance' => $course_instance, 'id_chat_owner' => $practitioner_proposal['id_mittente'], 'chat_title' => ADAEventProposal::addEventToken($event_token, $new_subject), 'chat_topic' => '', 'start_time' => $data_ora, 'end_time' => $end_time); require_once 'include/ChatDataHandler.inc.php'; require_once 'include/ChatRoom.inc.php'; $id_chatroom = ChatRoom::add_chatroomFN($chatroom_ha, $tester_dsn); if (AMA_DataHandler::isError($id_chatroom)) { $errObj = new ADA_Error($id_chatroom, translateFN("Si è verificato un errore nella creazione della chatroom. L'appuntamento non è stato creato."), NULL, NULL, NULL, $userObj->getHomePage()); } } else { $event_flag = ADA_VIDEOCHAT_EVENT; } $message_text .= ADAEvent::generateEventMessageAction($event_flag, $id_course, $course_instance); } $message_ha = array('tipo' => ADA_MSG_AGENDA, 'flags' => ADA_EVENT_CONFIRMED | $event_flag, 'mittente' => $user_uname, 'destinatari' => array($user_uname, $practitioner_proposal['mittente']), 'data_ora' => $data_ora, 'titolo' => ADAEventProposal::addEventToken($event_token, $new_subject), 'testo' => $message_text); /* * Here we send an email message as an appointment reminder. * We send it seprately to the user and to the practitioner, since we do not * want the user to know the practitioner's email address. */ $appointment_type = $new_subject; $appointment_title = ADAEventProposal::removeEventToken($subject); $appointment_message = sprintf(translateFN('Provider: "%s".%sService: "%s".%s'), $tester_name, $newline, $service_name, $newline) . ' ' . sprintf(translateFN('This is a reminder for the appointment %s: %s in date %s at time %s'), $appointment_title, $appointment_type, $date, $time); $practitioner_email_message_ha = array('tipo' => ADA_MSG_MAIL, 'mittente' => $adm_uname, 'destinatari' => array($practitioner_proposal['mittente']), 'data_ora' => 'now', 'titolo' => 'ADA: ' . translateFN('appointment reminder'), 'testo' => $appointment_message); $user_email_message_ha = array('tipo' => ADA_MSG_MAIL, 'mittente' => $adm_uname, 'destinatari' => array($user_uname), 'data_ora' => 'now', 'titolo' => 'ADA: ' . translateFN('appointment reminder'), 'testo' => $appointment_message); /* * Send the email message to the practitioner */