reduced_header.inc.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. <?php
  62. $style = api_get_setting('stylesheets');
  63. if($style<>'')
  64. {
  65. ?>
  66. <style type="text/css" media="screen, projection">
  67. /*<![CDATA[*/
  68. @import "<?php echo api_get_path(WEB_CODE_PATH); ?>css/<?php echo $style;?>/default.css";
  69. /*]]>*/
  70. </style>
  71. <?php
  72. }
  73. ?>
  74. <link rel="top" href="<?php echo api_get_path(WEB_PATH); ?>index.php" title="" />
  75. <link rel="courses" href="<?php echo api_get_path(WEB_CODE_PATH) ?>auth/courses.php" title="<?php echo htmlentities(get_lang('OtherCourses')); ?>" />
  76. <link rel="profil" href="<?php echo api_get_path(WEB_CODE_PATH) ?>auth/profile.php" title="<?php echo htmlentities(get_lang('ModifyProfile')); ?>" />
  77. <link href="http://www.dokeos.com/documentation.php" rel="Help" />
  78. <link href="http://www.dokeos.com/team.php" rel="Author" />
  79. <link href="http://www.dokeos.com" rel="Copyright" />
  80. <link rel="shortcut icon" href="<?php echo api_get_path(WEB_PATH); ?>favicon.ico" type="image/x-icon" />
  81. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset ?>" />
  82. <?php
  83. if ( isset($htmlHeadXtra) && $htmlHeadXtra )
  84. {
  85. foreach($htmlHeadXtra as $this_html_head)
  86. {
  87. echo($this_html_head);
  88. }
  89. }
  90. ?>
  91. </head>