reduced_header.inc.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  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[] = api_get_js('asciimath/ASCIIMathML.js');
  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. //Default CSS
  82. echo '@import "'.api_get_path(WEB_CSS_PATH).$my_style.'/default.css";';
  83. ?>
  84. /*]]>*/
  85. </style>
  86. <?php
  87. }
  88. ?>
  89. <script src="<?php echo api_get_path(WEB_LIBRARY_PATH);?>javascript/jquery.min.js" type="text/javascript" ></script>
  90. <script src="<?php echo api_get_path(WEB_LIBRARY_PATH);?>javascript/thickbox.js" type="text/javascript" ></script>
  91. <link rel="stylesheet" href="<?php echo api_get_path(WEB_LIBRARY_PATH);?>javascript/thickbox.css" type="text/css" media="projection, screen" />
  92. <link rel="top" href="<?php echo api_get_path(WEB_PATH); ?>index.php" title="" />
  93. <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); ?>" />
  94. <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); ?>" />
  95. <link href="http://www.chamilo.org/documentation.php" rel="Help" />
  96. <link href="http://www.chamilo.org/team.php" rel="Author" />
  97. <link href="http://www.chamilo.org" rel="Copyright" />
  98. <link rel="shortcut icon" href="<?php echo api_get_path(WEB_PATH); ?>favicon.ico" type="image/x-icon" />
  99. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo api_get_system_encoding(); ?>" />
  100. <script type="text/javascript">
  101. //<![CDATA[
  102. // This is a patch for the "__flash__removeCallback" bug, see FS#4378.
  103. if ( ( navigator.userAgent.toLowerCase().indexOf('msie') != -1 ) && ( navigator.userAgent.toLowerCase().indexOf( 'opera' ) == -1 ) )
  104. {
  105. window.attachEvent( 'onunload', function()
  106. {
  107. window['__flash__removeCallback'] = function ( instance, name )
  108. {
  109. try
  110. {
  111. if ( instance )
  112. {
  113. instance[name] = null ;
  114. }
  115. }
  116. catch ( flashEx )
  117. {
  118. }
  119. } ;
  120. }
  121. ) ;
  122. }
  123. //]]>
  124. </script>
  125. <?php
  126. if (isset($htmlHeadXtra) && $htmlHeadXtra) {
  127. foreach ($htmlHeadXtra as & $this_html_head) {
  128. echo $this_html_head;
  129. }
  130. }
  131. if (!api_is_platform_admin()) {
  132. $extra_header = trim(api_get_setting('header_extra_content'));
  133. if (!empty($extra_header)) {
  134. echo $extra_header;
  135. }
  136. }
  137. ?>
  138. </head>