Dokeos PHP Cross Reference Learning Management Systems

Source: /main/inc/reduced_header.inc.php - 218 lines - 5884 bytes - Summary - Text - Print

Description: This script displays the Dokeos header up to the </head> tag IT IS A COPY OF header.inc.php EXCEPT that it doesn't start the body output.

   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  /*----------------------------------------
  13                HEADERS SECTION
  14    --------------------------------------*/
  15  
  16  /*
  17   * HTTP HEADER
  18   */
  19  
  20  //Give a default value to $charset. Should change to UTF-8 some time in the future.
  21  //This parameter should be set in the platform configuration interface in time.
  22  if(empty($charset))
  23  {
  24      $charset = 'ISO-8859-15';
  25  }
  26  
  27  //header('Content-Type: text/html; charset='. $charset)
  28  //    or die ("WARNING : it remains some characters before &lt;?php bracket or after ?&gt end");
  29  
  30  header('Content-Type: text/html; charset='. $charset);
  31  if ( isset($httpHeadXtra) && $httpHeadXtra )
  32  {
  33      foreach($httpHeadXtra as $thisHttpHead)
  34      {
  35          header($thisHttpHead);
  36      }
  37  }
  38  
  39  // Get language iso-code for this page - ignore errors
  40  // The error ignorance is due to the non compatibility of function_exists()
  41  // with the object syntax of Database::get_language_isocode()
  42  @$document_language = Database::get_language_isocode($language_interface);
  43  if(empty($document_language))
  44  {
  45    //if there was no valid iso-code, use the english one
  46    $document_language = 'en';
  47  }
  48  
  49  /*
  50   * HTML HEADER
  51   */
  52  ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  53  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $document_language; ?>" lang="<?php echo $document_language; ?>">
  54  <head>
  55  <title>
  56  <?php
  57  if(!empty($nameTools))
  58  {
  59      echo $nameTools.' - ';
  60  }
  61  
  62  if(!empty($_course['official_code']))
  63  {
  64      echo $_course['official_code'].' - ';
  65  }
  66  
  67  echo api_get_setting('siteName');
  68  ?>
  69  </title>
  70  
  71  <?php
  72  
  73  /*
  74   * Choose CSS style platform's, user's, course's, or Learning path CSS
  75   */
  76  
  77  $platform_theme = api_get_setting('stylesheets');     // plataform's css
  78  $my_style=$platform_theme;
  79  if(api_get_setting('user_selected_theme') == 'true')
  80  {
  81      $useri = api_get_user_info();
  82      $user_theme = $useri['theme'];
  83      if(!empty($user_theme) && $user_theme != $my_style)
  84      {
  85          $my_style = $user_theme;                    // user's css
  86      }
  87  }
  88  $mycourseid = api_get_course_id();
  89  if (!empty($mycourseid) && $mycourseid != -1)
  90  {
  91      if (api_get_setting('allow_course_theme') == 'true')
  92      {
  93          $mycoursetheme=api_get_course_setting('course_theme');
  94          if (!empty($mycoursetheme) && $mycoursetheme!=-1)
  95          {
  96              if(!empty($mycoursetheme) && $mycoursetheme != $my_style)
  97              {
  98                  $my_style = $mycoursetheme;        // course's css
  99              }
 100          }
 101  
 102          $mycourselptheme=api_get_course_setting('allow_learning_path_theme');
 103          if (!empty($mycourselptheme) && $mycourselptheme!=-1 && $mycourselptheme== 1)
 104          {
 105              global $lp_theme_css; //  it comes from the lp_controller.php
 106              global $lp_theme_config; // it comes from the lp_controller.php
 107  
 108              if (!empty($lp_theme_css))
 109                  {
 110                      $theme=$lp_theme_css;
 111                      if(!empty($theme) && $theme != $my_style)
 112                      {
 113                          $my_style = $theme;     // LP's css
 114                      }
 115                  }
 116  
 117          }
 118      }
 119  }
 120  
 121  if (!empty($lp_theme_log)){
 122      $my_style=$platform_theme;
 123  }
 124  
 125  // Sets the css reference it is call from lp_nav.php, lp_toc.php, lp_message, lp_log.php
 126  if (!empty($scorm_css_header))
 127  {
 128      if (!empty($my_style))
 129      {
 130          $scorm_css=api_get_path(WEB_CODE_PATH).'css/'.$my_style.'/scorm.css';
 131          $scormfs_css=api_get_path(WEB_CODE_PATH).'css/'.$my_style.'/scormfs.css';
 132      }
 133      else
 134      {
 135          $scorm_css='scorm.css';
 136          $scormfs_css='scormfs.css';
 137      }
 138  
 139      if(!empty($display_mode) && $display_mode == 'fullscreen')
 140      {
 141          $htmlHeadXtra[] = '<style type="text/css" media="screen, projection">
 142                              /*<![CDATA[*/
 143                              @import "'.$scormfs_css.'";
 144                              /*]]>*/
 145                              </style>';
 146      }
 147      else
 148      {
 149          $htmlHeadXtra[] = '<style type="text/css" media="screen, projection">
 150                              /*<![CDATA[*/
 151                              @import "'.$scorm_css.'";
 152                              /*]]>*/
 153                              </style>';
 154      }
 155  }
 156  
 157  
 158  if($my_style!='')
 159  {
 160  ?>
 161  <style type="text/css" media="screen, projection">
 162  /*<![CDATA[*/
 163  @import "<?php echo api_get_path(WEB_CODE_PATH); ?>css/<?php echo $my_style;?>/default.css";
 164  /*]]>*/
 165  </style>
 166  <?php
 167  }
 168  ?>
 169  
 170  <link rel="top" href="<?php echo api_get_path(WEB_PATH); ?>index.php" title="" />
 171  <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); ?>" />
 172  <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); ?>" />
 173  <link href="http://www.dokeos.com/documentation.php" rel="Help" />
 174  <link href="http://www.dokeos.com/team.php" rel="Author" />
 175  <link href="http://www.dokeos.com" rel="Copyright" />
 176  <link rel="shortcut icon" href="<?php echo api_get_path(WEB_PATH); ?>favicon.ico" type="image/x-icon" />
 177  <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset ?>" />
 178  
 179  <script type="text/javascript">
 180  //<![CDATA[
 181  // This is a patch for the "__flash__removeCallback" bug, see FS#4378.
 182  if ( ( navigator.userAgent.toLowerCase().indexOf('msie') != -1 ) && ( navigator.userAgent.toLowerCase().indexOf( 'opera' ) == -1 ) )
 183  {
 184      window.attachEvent( 'onunload', function()
 185          {
 186              window['__flash__removeCallback'] = function ( instance, name )
 187              { 
 188                  try
 189                  { 
 190                      if ( instance )
 191                      { 
 192                          instance[name] = null ; 
 193                      } 
 194                  }
 195                  catch ( flashEx )
 196                  {
 197  
 198                  } 
 199              } ;
 200          }
 201      ) ;
 202  }
 203  //]]>
 204  </script>
 205  
 206  <?php
 207  if ( isset($htmlHeadXtra) && $htmlHeadXtra )
 208  {
 209      foreach($htmlHeadXtra as $this_html_head)
 210      {
 211          echo($this_html_head);
 212      }
 213  }
 214  ?>
 215  </head>
 216  <body dir="<?php echo  $text_dir ?>" <?php
 217  if(defined('DOKEOS_QUIZGALLERY') && DOKEOS_QUIZGALLERY)
 218  echo 'onload="javascript:if(document.question_admin_form) { document.question_admin_form.questionName.focus(); }"';?>>

title

Description

title

Description

title

Description

title

title

Body