'_blank')); $json['type'] = api_htmlentities($file['type']); $json['size'] = Text::format_file_size($file['size']); if (!empty($result) && is_array($result)) { $json['result'] = Display::return_icon('accept.png', get_lang('Uploaded')); } else { $json['result'] = Display::return_icon('exclamation.png', get_lang('Error')); } echo json_encode($json); } break; case 'document_preview': $course_info = api_get_course_info_by_id($_REQUEST['course_id']); if (!empty($course_info) && is_array($course_info)) { echo DocumentManager::get_document_preview($course_info, false, '_blank', $_REQUEST['session_id']); } break; } exit;