edit_document.php 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * This file allows editing documents.
  5. *
  6. * Based on create_document, this file allows
  7. * - edit name
  8. * - edit comments
  9. * - edit metadata (requires a document table entry)
  10. * - edit html content (only for htm/html files)
  11. *
  12. * For all files
  13. * - show editable name field
  14. * - show editable comments field
  15. * Additionally, for html and text files
  16. * - show RTE
  17. *
  18. * Remember, all files and folders must always have an entry in the
  19. * database, regardless of wether they are visible/invisible, have
  20. * comments or not.
  21. *
  22. * @package chamilo.document
  23. * @todo improve script structure (FormValidator is used to display form, but
  24. * not for validation at the moment)
  25. */
  26. require_once '../inc/global.inc.php';
  27. // Template's javascript
  28. $htmlHeadXtra[] = '
  29. <script>
  30. var hide_bar = function() {
  31. $("#template_col").hide();
  32. $("#doc_form").removeClass("col-md-9");
  33. $("#doc_form").addClass("col-md-11");
  34. $("#hide_bar_template").css({"background-image" : \'url("../img/hide2.png")\'})
  35. }
  36. $(document).ready(function() {
  37. if ($(window).width() <= 785 ) {
  38. hide_bar();
  39. }
  40. $("#hide_bar_template").click(function() {
  41. $("#template_col").toggleClass("hide");
  42. $("#hide_bar_template").toggleClass("hide_bar_template_not_hide");
  43. });
  44. CKEDITOR.on("instanceReady", function (e) {
  45. showTemplates();
  46. });
  47. });
  48. </script>';
  49. $_SESSION['whereami'] = 'document/create';
  50. $this_section = SECTION_COURSES;
  51. $lib_path = api_get_path(LIBRARY_PATH);
  52. $course_info = api_get_course_info();
  53. $group_id = api_get_group_id();
  54. $sessionId = api_get_session_id();
  55. if (api_is_in_group()) {
  56. $group_properties = GroupManager::get_group_properties($group_id);
  57. }
  58. $dir = '/';
  59. $currentDirPath = isset($_GET['curdirpath']) ? Security::remove_XSS($_GET['curdirpath']) : null;
  60. $readonly = false;
  61. if (isset($_GET['id'])) {
  62. $document_data = DocumentManager::get_document_data_by_id(
  63. $_GET['id'],
  64. api_get_course_id(),
  65. true,
  66. 0
  67. );
  68. if (!empty($sessionId) && empty($document_data)) {
  69. $document_data = DocumentManager::get_document_data_by_id(
  70. $_REQUEST['id'],
  71. api_get_course_id(),
  72. true,
  73. $sessionId
  74. );
  75. }
  76. $document_id = $document_data['id'];
  77. $file = $document_data['path'];
  78. $parent_id = DocumentManager::get_document_id($course_info, dirname($file));
  79. $dir = dirname($document_data['path']);
  80. $dir_original = $dir;
  81. $doc = basename($file);
  82. $readonly = $document_data['readonly'];
  83. }
  84. if (empty($document_data)) {
  85. api_not_allowed();
  86. }
  87. $is_certificate_mode = DocumentManager::is_certificate_mode($dir);
  88. //Call from
  89. $call_from_tool = isset($_GET['origin']) ? Security::remove_XSS($_GET['origin']) : null;
  90. $slide_id = isset($_GET['origin_opt']) ? Security::remove_XSS($_GET['origin_opt']) : null;
  91. $file_name = $doc;
  92. $group_document = false;
  93. $sessionId = api_get_session_id();
  94. $user_id = api_get_user_id();
  95. $doc_tree = explode('/', $file);
  96. $count_dir = count($doc_tree) - 2; // "2" because at the begin and end there are 2 "/"
  97. // Level correction for group documents.
  98. if (!empty($group_properties['directory'])) {
  99. $count_dir = $count_dir > 0 ? $count_dir - 1 : 0;
  100. }
  101. $relative_url = '';
  102. for ($i = 0; $i < ($count_dir); $i++) {
  103. $relative_url .= '../';
  104. }
  105. $editorConfig = array(
  106. 'ToolbarSet' => (api_is_allowed_to_edit(null, true) ? 'Documents' :'DocumentsStudent'),
  107. 'Width' => '100%',
  108. 'Height' => '600',
  109. 'FullPage' => true,
  110. 'InDocument' => true,
  111. 'CreateDocumentDir' => $relative_url,
  112. 'CreateDocumentWebDir' => (empty($group_properties['directory']))
  113. ? api_get_path(WEB_COURSE_PATH).$_course['path'].'/document/'
  114. : api_get_path(WEB_COURSE_PATH).api_get_course_path().'/document'.$group_properties['directory'].'/',
  115. 'BaseHref' => api_get_path(WEB_COURSE_PATH).$_course['path'].'/document'.$dir
  116. );
  117. if ($is_certificate_mode) {
  118. $editorConfig['CreateDocumentDir'] = api_get_path(WEB_COURSE_PATH).$_course['path'].'/document/';
  119. $editorConfig['CreateDocumentWebDir'] = api_get_path(WEB_COURSE_PATH).$_course['path'].'/document/';
  120. $editorConfig['BaseHref'] = api_get_path(WEB_COURSE_PATH).$_course['path'].'/document'.$dir;
  121. }
  122. $is_allowed_to_edit = api_is_allowed_to_edit(null, true) || $_SESSION['group_member_with_upload_rights']||
  123. DocumentManager::is_my_shared_folder(api_get_user_id(), $dir, $sessionId);
  124. $noPHP_SELF = true;
  125. /* Other initialization code */
  126. $dbTable = Database::get_course_table(TABLE_DOCUMENT);
  127. $course_id = api_get_course_int_id();
  128. if (!empty($group_id)) {
  129. $interbreadcrumb[] = array(
  130. 'url' => '../group/group_space.php?'.api_get_cidreq(),
  131. 'name' => get_lang('GroupSpace'),
  132. );
  133. $group_document = true;
  134. $noPHP_SELF = true;
  135. }
  136. if (!$is_certificate_mode) {
  137. $interbreadcrumb[]=array("url"=>"./document.php?curdirpath=".urlencode($currentDirPath).'&'.api_get_cidreq(), "name"=> get_lang('Documents'));
  138. } else {
  139. $interbreadcrumb[]= array('url' => '../gradebook/'.$_SESSION['gradebook_dest'], 'name' => get_lang('Gradebook'));
  140. }
  141. // Interbreadcrumb for the current directory root path
  142. if (empty($document_data['parents'])) {
  143. $interbreadcrumb[] = array('url' => '#', 'name' => $document_data['title']);
  144. } else {
  145. foreach($document_data['parents'] as $document_sub_data) {
  146. if ($document_data['title'] == $document_sub_data['title']) {
  147. continue;
  148. }
  149. $interbreadcrumb[] = array('url' => $document_sub_data['document_url'], 'name' => $document_sub_data['title']);
  150. }
  151. }
  152. if (!api_is_allowed_to_edit()) {
  153. api_not_allowed(true);
  154. }
  155. Event::event_access_tool(TOOL_DOCUMENT);
  156. //TODO:check the below code and his funcionality
  157. if (!api_is_allowed_to_edit()) {
  158. if (DocumentManager::check_readonly($course_info, $user_id, $file)) {
  159. api_not_allowed();
  160. }
  161. }
  162. /* MAIN TOOL CODE */
  163. /* Code to change the comment */
  164. if (isset($_POST['comment'])) {
  165. // Fixing the path if it is wrong
  166. $comment = trim($_POST['comment']);
  167. $title = trim($_POST['title']);
  168. // Just in case see BT#3525
  169. if (empty($title)) {
  170. $title = $document_data['title'];
  171. }
  172. if (empty($title)) {
  173. $title = get_document_title($_POST['filename']);
  174. }
  175. if (!empty($document_id)) {
  176. $params = [
  177. 'comment' => $comment,
  178. 'title' => $title,
  179. ];
  180. Database::update(
  181. $dbTable,
  182. $params,
  183. ['c_id = ? AND id = ?' => [$course_id, $document_id]]
  184. );
  185. Display::addFlash(Display::return_message(get_lang('fileModified')));
  186. }
  187. }
  188. /* WYSIWYG HTML EDITOR - Program Logic */
  189. if ($is_allowed_to_edit) {
  190. if (isset($_POST['formSent']) && $_POST['formSent'] == 1) {
  191. $filename = stripslashes($_POST['filename']);
  192. $extension = $_POST['extension'];
  193. $content = isset($_POST['content']) ? trim(str_replace(array("\r", "\n"), '', stripslashes($_POST['content']))) : null;
  194. $content = Security::remove_XSS($content, COURSEMANAGERLOWSECURITY);
  195. if ($dir == '/') {
  196. $dir = '';
  197. }
  198. $file = $dir.'/'.$filename.'.'.$extension;
  199. $read_only_flag = isset($_POST['readonly']) ? $_POST['readonly'] : null;
  200. $read_only_flag = empty($read_only_flag) ? 0 : 1;
  201. if (empty($filename)) {
  202. Display::addFlash(Display::return_message(get_lang('NoFileName'), 'warning'));
  203. } else {
  204. $file_size = filesize($document_data['absolute_path']);
  205. if ($read_only_flag == 0) {
  206. if (!empty($content)) {
  207. if ($fp = @fopen($document_data['absolute_path'], 'w')) {
  208. // For flv player, change absolute path temporarily to prevent from erasing it in the following lines
  209. $content = str_replace(array('flv=h', 'flv=/'), array('flv=h|', 'flv=/|'), $content);
  210. fputs($fp, $content);
  211. fclose($fp);
  212. $filepath = $document_data['absolute_parent_path'];
  213. /*
  214. if (!is_dir($filepath.'css')) {
  215. mkdir($filepath.'css', api_get_permissions_for_new_directories());
  216. $doc_id = add_document($_course, $dir.'css', 'folder', 0, 'css');
  217. api_item_property_update(
  218. $_course,
  219. TOOL_DOCUMENT,
  220. $doc_id,
  221. 'FolderCreated',
  222. api_get_user_id(),
  223. null,
  224. null,
  225. null,
  226. null,
  227. $sessionId
  228. );
  229. api_item_property_update(
  230. $_course,
  231. TOOL_DOCUMENT,
  232. $doc_id,
  233. 'invisible',
  234. api_get_user_id(),
  235. null,
  236. null,
  237. null,
  238. null,
  239. $sessionId
  240. );
  241. }*/
  242. /*if (!is_file($filepath.'css/frames.css')) {
  243. $platform_theme = api_get_setting('stylesheets');
  244. if (file_exists(api_get_path(SYS_CODE_PATH).'css/'.$platform_theme.'/frames.css')) {
  245. copy(api_get_path(SYS_CODE_PATH).'css/'.$platform_theme.'/frames.css', $filepath.'css/frames.css');
  246. $doc_id = add_document(
  247. $_course,
  248. $dir . 'css/frames.css',
  249. 'file',
  250. filesize($filepath . 'css/frames.css'),
  251. 'frames.css'
  252. );
  253. api_item_property_update(
  254. $_course,
  255. TOOL_DOCUMENT,
  256. $doc_id,
  257. 'DocumentAdded',
  258. api_get_user_id(),
  259. null,
  260. null,
  261. null,
  262. null,
  263. $sessionId
  264. );
  265. api_item_property_update(
  266. $_course,
  267. TOOL_DOCUMENT,
  268. $doc_id,
  269. 'invisible',
  270. api_get_user_id(),
  271. null,
  272. null,
  273. null,
  274. null,
  275. $sessionId
  276. );
  277. }
  278. }*/
  279. // "WHAT'S NEW" notification: update table item_property
  280. $document_id = DocumentManager::get_document_id($_course, $file);
  281. if ($document_id) {
  282. update_existing_document(
  283. $_course,
  284. $document_id,
  285. $file_size,
  286. $read_only_flag
  287. );
  288. api_item_property_update(
  289. $_course,
  290. TOOL_DOCUMENT,
  291. $document_id,
  292. 'DocumentUpdated',
  293. api_get_user_id(),
  294. null,
  295. null,
  296. null,
  297. null,
  298. $sessionId
  299. );
  300. // Update parent folders
  301. item_property_update_on_folder(
  302. $_course,
  303. $dir,
  304. api_get_user_id()
  305. );
  306. header('Location: document.php?id=' . $document_data['parent_id'] . '&' . api_get_cidreq() . ($is_certificate_mode?'&curdirpath=/certificates&selectcat=1':''));
  307. exit;
  308. } else {
  309. Display::addFlash(Display::return_message(get_lang('Impossible'), 'warning'));
  310. }
  311. } else {
  312. Display::addFlash(Display::return_message(get_lang('Impossible'), 'warning'));
  313. }
  314. } else {
  315. if ($document_id) {
  316. update_existing_document($_course, $document_id, $file_size, $read_only_flag);
  317. }
  318. }
  319. } else {
  320. if ($document_id) {
  321. update_existing_document($_course, $document_id, $file_size, $read_only_flag);
  322. }
  323. }
  324. }
  325. }
  326. }
  327. // Replace relative paths by absolute web paths (e.g. './' => 'http://www.chamilo.org/courses/ABC/document/')
  328. $content = null;
  329. $extension = null;
  330. $filename = null;
  331. if (file_exists($document_data['absolute_path'])) {
  332. $path_info = pathinfo($document_data['absolute_path']);
  333. $filename = $path_info['filename'];
  334. if (is_file($document_data['absolute_path'])) {
  335. $extension = $path_info['extension'];
  336. if (in_array($extension, array('html', 'htm'))) {
  337. $content = file($document_data['absolute_path']);
  338. $content = implode('', $content);
  339. }
  340. }
  341. }
  342. /* Display user interface */
  343. // Display the header
  344. $nameTools = get_lang('EditDocument') . ': '.Security::remove_XSS($document_data['title']);
  345. Display::display_header($nameTools, 'Doc');
  346. $document_info = api_get_item_property_info(
  347. api_get_course_int_id(),
  348. 'document',
  349. $document_id,
  350. 0
  351. );
  352. // Try to find this document in the session
  353. if (!empty($sessionId)) {
  354. $document_info = api_get_item_property_info(
  355. api_get_course_int_id(),
  356. 'document',
  357. $document_id,
  358. $sessionId
  359. );
  360. }
  361. $owner_id = $document_info['insert_user_id'];
  362. $last_edit_date = $document_info['lastedit_date'];
  363. if ($owner_id == api_get_user_id() ||
  364. api_is_platform_admin() ||
  365. $is_allowed_to_edit || GroupManager:: is_user_in_group(
  366. api_get_user_id(),
  367. api_get_group_id()
  368. )
  369. ) {
  370. $action = api_get_self().'?id='.$document_data['id'].'&'.api_get_cidreq();
  371. if ($is_certificate_mode) {
  372. $action .= '&curdirpath=/certificates&selectcat=1';
  373. }
  374. $form = new FormValidator('formEdit', 'post', $action, null, array('class' => 'form-vertical'));
  375. // Form title
  376. $form->addElement('header', $nameTools);
  377. $form->addElement('hidden', 'filename');
  378. $form->addElement('hidden', 'extension');
  379. $form->addElement('hidden', 'file_path');
  380. $form->addElement('hidden', 'commentPath');
  381. $form->addElement('hidden', 'showedit');
  382. $form->addElement('hidden', 'origin');
  383. $form->addElement('hidden', 'origin_opt');
  384. $form->addText('title', get_lang('Title'));
  385. $defaults['title'] = $document_data['title'];
  386. $form->addElement('hidden', 'formSent');
  387. $defaults['formSent'] = 1;
  388. $read_only_flag = isset($_POST['readonly']) ? $_POST['readonly'] : null;
  389. // Desactivation of IE proprietary commenting tags inside the text before loading it on the online editor.
  390. // This fix has been proposed by Hubert Borderiou, see Bug #573, http://support.chamilo.org/issues/573
  391. $defaults['content'] = str_replace('<!--[', '<!-- [', $content);
  392. // HotPotatoes tests are html files, but they should not be edited in order their functionality to be preserved.
  393. $showSystemFolders = api_get_course_setting('show_system_folders');
  394. $condition = stripos($dir, '/HotPotatoes_files') === false;
  395. if ($showSystemFolders == 1) {
  396. $condition = true;
  397. }
  398. if (($extension == 'htm' || $extension == 'html') && $condition) {
  399. if (empty($readonly) && $readonly == 0) {
  400. $form->addHtmlEditor('content', '', true, true, $editorConfig);
  401. }
  402. }
  403. if (!$group_document && !DocumentManager::is_my_shared_folder(api_get_user_id(), $currentDirPath, $sessionId)) {
  404. // Updated on field
  405. $last_edit_date = api_get_local_time($last_edit_date);
  406. $display_date = date_to_str_ago($last_edit_date).' <span class="dropbox_date">'.api_format_date($last_edit_date).'</span>';
  407. $form->addElement('static', null, get_lang('UpdatedOn'), $display_date);
  408. }
  409. $form->addElement('textarea', 'comment', get_lang('Comment'));
  410. if ($owner_id == api_get_user_id() || api_is_platform_admin()) {
  411. $checked =& $form->addElement('checkbox', 'readonly', null, get_lang('ReadOnly'));
  412. if ($readonly == 1) {
  413. $checked->setChecked(true);
  414. }
  415. }
  416. if ($is_certificate_mode) {
  417. $form->addButtonUpdate(get_lang('SaveCertificate'));
  418. } else {
  419. $form->addButtonUpdate(get_lang('SaveDocument'));
  420. }
  421. $defaults['filename'] = $filename;
  422. $defaults['extension'] = $extension;
  423. $defaults['file_path'] = isset($_GET['file']) ? Security::remove_XSS($_GET['file']) : null;
  424. $defaults['commentPath'] = $file;
  425. $defaults['renameTo'] = $file_name;
  426. $defaults['comment'] = $document_data['comment'];
  427. $defaults['origin'] = isset($_GET['origin']) ? Security::remove_XSS($_GET['origin']) : null;
  428. $defaults['origin_opt'] = isset($_GET['origin_opt']) ? Security::remove_XSS($_GET['origin_opt']) : null;
  429. $form->setDefaults($defaults);
  430. show_return(
  431. $parent_id,
  432. $dir_original,
  433. $call_from_tool,
  434. $slide_id,
  435. $is_certificate_mode
  436. );
  437. if ($is_certificate_mode) {
  438. $all_information_by_create_certificate = DocumentManager::get_all_info_to_certificate(
  439. api_get_user_id(),
  440. api_get_course_id()
  441. );
  442. $str_info = '';
  443. foreach ($all_information_by_create_certificate[0] as $info_value) {
  444. $str_info .= $info_value.'<br/>';
  445. }
  446. $create_certificate=get_lang('CreateCertificateWithTags');
  447. Display::display_normal_message(
  448. $create_certificate.': <br /><br />'.$str_info,
  449. false
  450. );
  451. }
  452. if ($extension=='svg' && !api_browser_support('svg') && api_get_setting('enabled_support_svg') == 'true'){
  453. Display::display_warning_message(get_lang('BrowserDontSupportsSVG'));
  454. }
  455. echo '<div class="row-fluid" style="overflow:hidden">
  456. <div id="template_col" class="col-md-2">
  457. <div id="frmModel"></div>
  458. </div>
  459. <div class="col-md-1">
  460. <div id="hide_bar_template"></div>
  461. </div>
  462. <div id="doc_form" class="col-md-8">
  463. '.$form->returnForm().'
  464. </div>
  465. </div>';
  466. }
  467. Display::display_footer();
  468. /**
  469. This function changes the name of a certain file.
  470. It needs no global variables, it takes all info from parameters.
  471. It returns nothing.
  472. @todo check if this function is used
  473. */
  474. function change_name($base_work_dir, $source_file, $rename_to, $dir, $doc)
  475. {
  476. $file_name_for_change = $base_work_dir.$dir.$source_file;
  477. $rename_to = disable_dangerous_file($rename_to); // Avoid renaming to .htaccess file
  478. $rename_to = my_rename($file_name_for_change, stripslashes($rename_to)); // fileManage API
  479. if ($rename_to) {
  480. if (isset($dir) && $dir != '') {
  481. $source_file = $dir.$source_file;
  482. $new_full_file_name = dirname($source_file).'/'.$rename_to;
  483. } else {
  484. $source_file = '/'.$source_file;
  485. $new_full_file_name = '/'.$rename_to;
  486. }
  487. update_db_info('update', $source_file, $new_full_file_name); // fileManage API
  488. Display::addFlash(Display::return_message(get_lang('fileModified')));
  489. $GLOBALS['file_name'] = $rename_to;
  490. $GLOBALS['doc'] = $rename_to;
  491. return true;
  492. } else {
  493. Display::addFlash(Display::return_message(get_lang('FileExists')));
  494. }
  495. }
  496. //return button back to
  497. function show_return($document_id, $path, $call_from_tool='', $slide_id=0, $is_certificate_mode=false)
  498. {
  499. global $parent_id;
  500. echo '<div class="actions">';
  501. $url = api_get_path(WEB_CODE_PATH).'document/document.php?'.api_get_cidreq().'&id='.$parent_id;
  502. if ($is_certificate_mode) {
  503. echo '<a href="document.php?curdirpath='.Security::remove_XSS($_GET['curdirpath']).'&selectcat=' . Security::remove_XSS($_GET['selectcat']).'">'.
  504. Display::return_icon('back.png',get_lang('Back').' '.get_lang('To').' '.get_lang('CertificateOverview'),'',ICON_SIZE_MEDIUM).'</a>';
  505. } elseif($call_from_tool=='slideshow') {
  506. echo '<a href="'.api_get_path(WEB_PATH).'main/document/slideshow.php?slide_id='.$slide_id.'&curdirpath='.Security::remove_XSS(urlencode($_GET['curdirpath'])).'">'.
  507. Display::return_icon('slideshow.png', get_lang('BackTo').' '.get_lang('ViewSlideshow'),'',ICON_SIZE_MEDIUM).'</a>';
  508. } elseif($call_from_tool=='editdraw') {
  509. echo '<a href="'.$url.'">'.
  510. Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
  511. echo '<a href="javascript:history.back(1)">'.Display::return_icon('draw.png', get_lang('BackTo').' '.get_lang('Draw'), array(), 32).'</a>';
  512. } elseif($call_from_tool=='editodf') {
  513. echo '<a href="'.$url.'">'.
  514. Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
  515. echo '<a href="javascript:history.back(1)">'.Display::return_icon('draw.png', get_lang('BackTo').' '.get_lang('Write'), array(), 32).'</a>';
  516. } elseif($call_from_tool=='editpaint'){
  517. echo '<a href="'.$url.'">'.
  518. Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), array(), ICON_SIZE_MEDIUM).'</a>';
  519. echo '<a href="javascript:history.back(1)">'.Display::return_icon('paint.png', get_lang('BackTo').' '.get_lang('Paint'), array(), 32).'</a>';
  520. } else {
  521. echo '<a href="'.$url.'">'.
  522. Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
  523. }
  524. echo '</div>';
  525. }