headerpage.php 1.4 KB

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