reduced_header.inc.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <?php
  2. /**
  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 dokeos.include
  9. ==============================================================================
  10. */
  11. /*----------------------------------------
  12. HEADERS SECTION
  13. --------------------------------------*/
  14. /*
  15. * HTTP HEADER
  16. */
  17. //Give a default value to $charset. Should change to UTF-8 some time in the future.
  18. //This parameter should be set in the platform configuration interface in time.
  19. if(empty($charset))
  20. {
  21. $charset = 'ISO-8859-15';
  22. }
  23. //header('Content-Type: text/html; charset='. $charset)
  24. // or die ("WARNING : it remains some characters before &lt;?php bracket or after ?&gt end");
  25. header('Content-Type: text/html; charset='. $charset);
  26. if ( isset($httpHeadXtra) && $httpHeadXtra )
  27. {
  28. foreach($httpHeadXtra as $thisHttpHead)
  29. {
  30. header($thisHttpHead);
  31. }
  32. }
  33. // Get language iso-code for this page - ignore errors
  34. // The error ignorance is due to the non compatibility of function_exists()
  35. // with the object syntax of Database::get_language_isocode()
  36. @$document_language = Database::get_language_isocode($language_interface);
  37. if(empty($document_language))
  38. {
  39. //if there was no valid iso-code, use the english one
  40. $document_language = 'en';
  41. }
  42. /*
  43. * HTML HEADER
  44. */
  45. ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  46. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $document_language; ?>" lang="<?php echo $document_language; ?>">
  47. <head>
  48. <title>
  49. <?php
  50. if(!empty($nameTools))
  51. {
  52. echo $nameTools.' - ';
  53. }
  54. if(!empty($_course['official_code']))
  55. {
  56. echo $_course['official_code'].' - ';
  57. }
  58. echo get_setting('siteName');
  59. ?>
  60. </title>
  61. <style type="text/css" media="screen, projection">
  62. /*<![CDATA[*/
  63. @import "<?php echo api_get_path(WEB_CODE_PATH); ?>css/default/default.css";
  64. /*]]>*/
  65. </style>
  66. <?php
  67. if(api_get_setting('stylesheets')<>'')
  68. {
  69. ?>
  70. <style type="text/css" media="screen, projection">
  71. /*<![CDATA[*/
  72. @import "<?php echo api_get_path(WEB_CODE_PATH); ?>css/<?php echo api_get_setting('stylesheets');?>/default.css";
  73. /*]]>*/
  74. </style>
  75. <?php
  76. }
  77. ?>
  78. <link rel="top" href="<?php echo api_get_path(WEB_PATH); ?>index.php" title="" />
  79. <link rel="courses" href="<?php echo api_get_path(WEB_CODE_PATH) ?>auth/courses.php" title="<?php echo htmlentities(get_lang('OtherCourses')); ?>" />
  80. <link rel="profil" href="<?php echo api_get_path(WEB_CODE_PATH) ?>auth/profile.php" title="<?php echo htmlentities(get_lang('ModifyProfile')); ?>" />
  81. <link href="http://www.dokeos.com/documentation.php" rel="Help" />
  82. <link href="http://www.dokeos.com/team.php" rel="Author" />
  83. <link href="http://www.dokeos.com" rel="Copyright" />
  84. <link rel="shortcut icon" href="<?php echo api_get_path(WEB_PATH); ?>favicon.ico" type="image/x-icon" />
  85. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset ?>" />
  86. <?php
  87. if ( isset($htmlHeadXtra) && $htmlHeadXtra )
  88. {
  89. foreach($htmlHeadXtra as $this_html_head)
  90. {
  91. echo($this_html_head);
  92. }
  93. }
  94. ?>
  95. </head>