headerpage.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * @package chamilo.document
  5. */
  6. // Name of the language file that needs to be included
  7. $language_file = 'document';
  8. require_once '../inc/global.inc.php';
  9. $noPHP_SELF = true;
  10. $header_file = Security::remove_XSS($_GET['file']);
  11. $path_array = explode('/', str_replace('\\', '/', $header_file));
  12. $path_array = array_map('urldecode', $path_array);
  13. $header_file = implode('/', $path_array);
  14. $nameTools = $header_file;
  15. if (isset($_SESSION['_gid']) && $_SESSION['_gid'] != '') {
  16. $req_gid = '&amp;gidReq='.$_SESSION['_gid'];
  17. $interbreadcrumb[] = array('url' => '../group/group_space.php?gidReq='.$_SESSION['_gid'], 'name' => get_lang('GroupSpace'));
  18. }
  19. $interbreadcrumb[] = array('url' => './document.php?curdirpath='.dirname($header_file).$req_gid, 'name' => get_lang('Documents'));
  20. $interbreadcrumb[] = array('url' => 'showinframes.php?file='.$header_file, 'name' => $header_file);
  21. $file_url_sys = api_get_path(SYS_COURSE_PATH).'document'.$header_file;
  22. $path_info = pathinfo($file_url_sys);
  23. $this_section = SECTION_COURSES;
  24. Display::display_header(null, 'Doc');
  25. echo '<div align="center">';
  26. $file_url_web = api_get_path('WEB_COURSE_PATH').$_course['path'].'/document'.$header_file.'?'.api_get_cidreq();
  27. echo '<a href="'.$file_url_web.'" target="blank">'.get_lang('_cut_paste_link').'</a></div>';