header.inc.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <?php
  2. /**
  3. ==============================================================================
  4. * This script displays the Dokeos header.
  5. *
  6. * @package dokeos.include
  7. ==============================================================================
  8. */
  9. /*----------------------------------------
  10. HEADERS SECTION
  11. --------------------------------------*/
  12. /*
  13. * HTTP HEADER
  14. */
  15. //Give a default value to $charset. Should change to UTF-8 some time in the future.
  16. //This parameter should be set in the platform configuration interface in time.
  17. if(empty($charset))
  18. {
  19. $charset = 'ISO-8859-15';
  20. }
  21. //header('Content-Type: text/html; charset='. $charset)
  22. // or die ("WARNING : it remains some characters before &lt;?php bracket or after ?&gt end");
  23. header('Content-Type: text/html; charset='. $charset);
  24. if ( isset($httpHeadXtra) && $httpHeadXtra )
  25. {
  26. foreach($httpHeadXtra as $thisHttpHead)
  27. {
  28. header($thisHttpHead);
  29. }
  30. }
  31. // Get language iso-code for this page - ignore errors
  32. // The error ignorance is due to the non compatibility of function_exists()
  33. // with the object syntax of Database::get_language_isocode()
  34. @$document_language = Database::get_language_isocode($language_interface);
  35. if(empty($document_language))
  36. {
  37. //if there was no valid iso-code, use the english one
  38. $document_language = 'en';
  39. }
  40. /*
  41. * HTML HEADER
  42. */
  43. ?>
  44. <!DOCTYPE html
  45. PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  46. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  47. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $document_language; ?>" lang="<?php echo $document_language; ?>">
  48. <head>
  49. <title>
  50. <?php
  51. if(!empty($nameTools))
  52. {
  53. echo $nameTools.' - ';
  54. }
  55. if(!empty($_course['official_code']))
  56. {
  57. echo $_course['official_code'].' - ';
  58. }
  59. echo get_setting('siteName');
  60. ?>
  61. </title>
  62. <style type="text/css" media="screen, projection">
  63. /*<![CDATA[*/
  64. @import "<?php echo api_get_path(WEB_CODE_PATH); ?>css/default/default.css";
  65. @import "<?php echo api_get_path(WEB_CODE_PATH); ?>course_home/css/dokeos_corporate.css";
  66. /*]]>*/
  67. </style>
  68. <style type="text/css" media="print">
  69. /*<![CDATA[*/
  70. @import "<?php echo api_get_path(WEB_CODE_PATH); ?>css/default/print.css";
  71. /*]]>*/
  72. </style>
  73. <?php
  74. if(api_get_setting('stylesheets')<>'')
  75. {
  76. ?>
  77. <style type="text/css" media="screen, projection">
  78. /*<![CDATA[*/
  79. @import "<?php echo api_get_path(WEB_CODE_PATH); ?>css/<?php echo api_get_setting('stylesheets');?>/default.css";
  80. /*]]>*/
  81. </style>
  82. <?php
  83. }
  84. ?>
  85. <link rel="top" href="<?php echo api_get_path(WEB_PATH); ?>index.php" title="" />
  86. <link rel="courses" href="<?php echo api_get_path(WEB_CODE_PATH) ?>auth/courses.php" title="<?php echo htmlentities(get_lang('OtherCourses')); ?>" />
  87. <link rel="profil" href="<?php echo api_get_path(WEB_CODE_PATH) ?>auth/profile.php" title="<?php echo htmlentities(get_lang('ModifyProfile')); ?>" />
  88. <link href="http://www.dokeos.com/documentation.php" rel="Help" />
  89. <link href="http://www.dokeos.com/team.php" rel="Author" />
  90. <link href="http://www.dokeos.com" rel="Copyright" />
  91. <link rel="shortcut icon" href="<?php echo api_get_path(WEB_PATH); ?>favicon.ico" type="image/x-icon" />
  92. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset ?>" />
  93. <?php
  94. if ( isset($htmlHeadXtra) && $htmlHeadXtra )
  95. {
  96. foreach($htmlHeadXtra as $this_html_head)
  97. {
  98. echo($this_html_head);
  99. }
  100. }
  101. if ( isset($htmlIncHeadXtra) && $htmlIncHeadXtra )
  102. {
  103. foreach($htmlIncHeadXtra as $this_html_head)
  104. {
  105. include($this_html_head);
  106. }
  107. }
  108. //the following include might be subject to a setting proper to the course or platform
  109. include(api_get_path(LIBRARY_PATH).'/javascript/email_links.lib.js.php');
  110. ?>
  111. </head>
  112. <body dir="<?php echo $text_dir ?>" <?php
  113. if(defined('DOKEOS_HOMEPAGE') && DOKEOS_HOMEPAGE)
  114. echo 'onload="javascript:if(document.formLogin) { document.formLogin.login.focus(); }"'; ?>>
  115. <!-- #outerframe container to control some general layout of all pages -->
  116. <div id="outerframe">
  117. <?php
  118. // Banner
  119. include(api_get_path(INCLUDE_PATH)."banner.inc.php");
  120. ?>