reduced_header.inc.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * This script displays the Dokeos header up to the </head> tag
  5. * IT IS A COPY OF header.inc.php EXCEPT that it doesn't start the body
  6. * output.
  7. *
  8. * @package chamilo.include
  9. */
  10. /* HEADERS SECTION */
  11. /*
  12. * HTTP HEADER
  13. */
  14. header('Content-Type: text/html; charset='.api_get_system_encoding());
  15. // Include here the script ASCIIMathML.js if you want to show mathematical formulas and graphics
  16. // not only in the "Documents" tool, but elsewhere in the system. This setting is related to the
  17. // online editor's plugins 'asciimath' and 'asciisvg'.
  18. if (api_get_setting('include_asciimathml_script') == 'true') {
  19. $htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'asciimath/ASCIIMathML.js" type="text/javascript"></script>';
  20. }
  21. if (isset($httpHeadXtra) && $httpHeadXtra) {
  22. foreach ($httpHeadXtra as & $thisHttpHead) {
  23. header($thisHttpHead);
  24. }
  25. }
  26. // Get language iso-code for this page - ignore errors
  27. $document_language = api_get_language_isocode();
  28. /*
  29. * HTML HEADER
  30. */
  31. ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  32. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $document_language; ?>" lang="<?php echo $document_language; ?>">
  33. <head>
  34. <title>
  35. <?php
  36. if (!empty($nameTools)) {
  37. echo $nameTools.' - ';
  38. }
  39. if (!empty($_course['official_code'])) {
  40. echo $_course['official_code'].' - ';
  41. }
  42. echo api_get_setting('siteName');
  43. ?>
  44. </title>
  45. <?php
  46. /*
  47. * Choose CSS style platform's, user's, course's, or Learning path CSS
  48. */
  49. $platform_theme = api_get_setting('stylesheets');
  50. $my_style = api_get_visual_theme();
  51. // Sets the css reference it is call from lp_nav.php, lp_toc.php, lp_message, lp_log.php
  52. if (!empty($scorm_css_header)) {
  53. if (!empty($my_style)) {
  54. $scorm_css = api_get_path(WEB_CSS_PATH).$my_style.'/scorm.css';
  55. $scormfs_css = api_get_path(WEB_CSS_PATH).$my_style.'/scormfs.css';
  56. } else {
  57. $scorm_css = 'scorm.css';
  58. $scormfs_css = 'scormfs.css';
  59. }
  60. if (!empty($display_mode) && $display_mode == 'fullscreen') {
  61. $htmlHeadXtra[] = '<style type="text/css" media="screen, projection">
  62. /*<![CDATA[*/
  63. @import "'.$scormfs_css.'";
  64. /*]]>*/
  65. </style>';
  66. } else {
  67. $htmlHeadXtra[] = '<style type="text/css" media="screen, projection">
  68. /*<![CDATA[*/
  69. @import "'.$scorm_css.'";
  70. /*]]>*/
  71. </style>';
  72. }
  73. }
  74. if ($my_style != '') {
  75. ?>
  76. <style type="text/css" media="screen, projection">
  77. /*<![CDATA[*/
  78. <?php
  79. //Base CSS
  80. echo '@import "'.api_get_path(WEB_CSS_PATH).'base.css";';
  81. //Global chamilo CSS
  82. if (in_array(api_get_visual_theme(), array('chamilo','chamilo_red','chamilo_blue','chamilo_orange','chamilo_green','chamilo_electric_blue'))) {
  83. echo '@import "'.api_get_path(WEB_CSS_PATH).'base_chamilo.css";';
  84. } else {
  85. echo '@import "'.api_get_path(WEB_CSS_PATH).'base_classic.css";';
  86. }
  87. //Default CSS
  88. echo '@import "'.api_get_path(WEB_CSS_PATH).$my_style.'/default.css";';
  89. //Fix CSS
  90. echo '@import "'.api_get_path(WEB_CSS_PATH).'fix.css";';
  91. //Fix chamilo CSS
  92. if (in_array(api_get_visual_theme(), array('chamilo','chamilo_red','chamilo_blue','chamilo_orange','chamilo_green','chamilo_electric_blue'))) {
  93. echo '@import "'.api_get_path(WEB_CSS_PATH).'fix_chamilo.css";';
  94. } else {
  95. echo '@import "'.api_get_path(WEB_CSS_PATH).'fix_classic.css";';
  96. }
  97. ?>
  98. /*]]>*/
  99. </style>
  100. <?php
  101. }
  102. ?>
  103. <link rel="top" href="<?php echo api_get_path(WEB_PATH); ?>index.php" title="" />
  104. <link rel="courses" href="<?php echo api_get_path(WEB_CODE_PATH) ?>auth/courses.php" title="<?php echo api_htmlentities(get_lang('OtherCourses'),ENT_QUOTES,$charset); ?>" />
  105. <link rel="profil" href="<?php echo api_get_path(WEB_CODE_PATH) ?>auth/profile.php" title="<?php echo api_htmlentities(get_lang('ModifyProfile'),ENT_QUOTES,$charset); ?>" />
  106. <link href="http://www.chamilo.org/documentation.php" rel="Help" />
  107. <link href="http://www.chamilo.org/team.php" rel="Author" />
  108. <link href="http://www.chamilo.org" rel="Copyright" />
  109. <link rel="shortcut icon" href="<?php echo api_get_path(WEB_PATH); ?>favicon.ico" type="image/x-icon" />
  110. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo api_get_system_encoding(); ?>" />
  111. <script type="text/javascript">
  112. //<![CDATA[
  113. // This is a patch for the "__flash__removeCallback" bug, see FS#4378.
  114. if ( ( navigator.userAgent.toLowerCase().indexOf('msie') != -1 ) && ( navigator.userAgent.toLowerCase().indexOf( 'opera' ) == -1 ) )
  115. {
  116. window.attachEvent( 'onunload', function()
  117. {
  118. window['__flash__removeCallback'] = function ( instance, name )
  119. {
  120. try
  121. {
  122. if ( instance )
  123. {
  124. instance[name] = null ;
  125. }
  126. }
  127. catch ( flashEx )
  128. {
  129. }
  130. } ;
  131. }
  132. ) ;
  133. }
  134. //]]>
  135. </script>
  136. <?php
  137. if (isset($htmlHeadXtra) && $htmlHeadXtra) {
  138. foreach ($htmlHeadXtra as & $this_html_head) {
  139. echo $this_html_head;
  140. }
  141. }
  142. ?>
  143. </head>