close_chat_window(); '; } else { api_protect_course_script(); } if (empty($course) || empty($userId)) { exit; } /* Constants and variables */ $tbl_user = Database::get_main_table(TABLE_MAIN_USER); $sent = isset($_REQUEST['sent']) ? $_REQUEST['sent'] : null; require 'header_frame.inc.php'; $chat_size = 0; if ($sent) { saveMessage( $_POST['message'], $userId, $_course, $session_id, $group_id, false ); } ?>