dokeos-help
[ class tree: dokeos-help ] [ index: dokeos-help ] [ all elements ]

Source for file help.php

Documentation is available at help.php

  1. <?php
  2. /*
  3. ==============================================================================
  4.     Dokeos - elearning and course management software
  5.  
  6.     Copyright (c) 2004-2005 Dokeos S.A.
  7.     Copyright (c) 2003-2005 Ghent University (UGent)
  8.     Copyright (c) 2001 Universite catholique de Louvain (UCL)
  9.  
  10.     Copyright (c) Sally "Example" Programmer (sally@somewhere.net)
  11.  
  12.     For a full list of contributors, see "credits.txt".
  13.     The full license can be read in "license.txt".
  14.  
  15.     This program is free software; you can redistribute it and/or
  16.     modify it under the terms of the GNU General Public License
  17.     as published by the Free Software Foundation; either version 2
  18.     of the License, or (at your option) any later version.
  19.  
  20.     See the GNU General Public License for more details.
  21.  
  22.     Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
  23.     Mail: info@dokeos.com
  24. ==============================================================================
  25. */
  26. /**
  27. ==============================================================================
  28. *    This script displays a help window.
  29. *
  30. *    @package dokeos.help
  31. ==============================================================================
  32. */
  33. // name of the language file that needs to be included 
  34. $language_file='help';
  35. $helpName=$_GET['open'];
  36. include('../inc/global.inc.php');
  37. $language_code Database::get_language_isocode($language_interface);
  38. header('Content-Type: text/html; charset='$charset);
  39.  
  40.  
  41. /*
  42.  * Choose CSS style platform's, user's, course's, or Learning path CSS 
  43.  */
  44.  
  45. $platform_theme api_get_setting('stylesheets');     // plataform's css
  46. $my_style=$platform_theme;
  47. if(api_get_setting('user_selected_theme'== 'true'
  48. {        
  49.     $useri api_get_user_info();
  50.     $user_theme $useri['theme'];
  51.     if(!empty($user_theme&& $user_theme != $my_style)
  52.     {
  53.         $my_style $user_theme;                    // user's css
  54.     }
  55. }
  56. $mycourseid api_get_course_id();
  57. if (!empty($mycourseid&& $mycourseid != -1
  58. {    
  59.     if (api_get_setting('allow_course_theme'== 'true'
  60.     {    
  61.         $mycoursetheme=api_get_course_setting('course_theme');            
  62.         if (!empty($mycoursetheme&& $mycoursetheme!=-1)         
  63.         {                            
  64.             if(!empty($mycoursetheme&& $mycoursetheme != $my_style)
  65.             {                
  66.                 $my_style $mycoursetheme;        // course's css
  67.             }            
  68.         }
  69.                 
  70.         $mycourselptheme=api_get_course_setting('allow_learning_path_theme');
  71.         if (!empty($mycourselptheme&& $mycourselptheme!=-&& $mycourselptheme== 1)         
  72.         {                
  73.             global $lp_theme_css//  it comes from the lp_controller.php 
  74.             global $lp_theme_config// it comes from the lp_controller.php
  75.                             
  76.             if (!empty($lp_theme_css)) 
  77.                 {
  78.                     $theme=$lp_theme_css;                        
  79.                     if(!empty($theme&& $theme != $my_style)
  80.                     {                                
  81.                         $my_style $theme;     // LP's css
  82.                     }
  83.                 }                
  84.             
  85.         }
  86.     }
  87. }
  88.  
  89. if ($lp_theme_log){
  90.     $my_style=$platform_theme;
  91. }
  92.  
  93. ?>
  94. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  95. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $language_code?>" lang="<?php echo $language_code?>">
  96. <head>
  97. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset ?>" />
  98. <title>
  99. <?php echo get_lang('H'.$helpName)?>
  100. </title>
  101. <?php
  102. if(api_get_setting('stylesheets')<>'')
  103. {
  104.     ?>
  105.     <style type="text/css" media="screen, projection">
  106.     /*<![CDATA[*/
  107.     @import "<?php echo api_get_path(WEB_CODE_PATH)?>css/<?php echo $my_style;?>/default.css";
  108.     /*]]>*/
  109.     </style>
  110.     <?php
  111. }
  112. ?>
  113. </head>
  114. <body>
  115. <div style="margin:10px;">
  116. <div style="text-align:right;"><a href="javascript:window.close();"><?php echo get_lang('Close')?></a></div>
  117. <a href="faq.php"><?php echo get_lang('AccessToFaq'?></a>
  118. <h4>
  119. <?php echo get_lang('H'.$helpName)?>
  120. </h4>
  121. <?php echo get_lang($helpName.'Content')?>
  122. <br /><br />
  123. <a href="faq.php"><?php echo get_lang('AccessToFaq'?></a>
  124. <div style="text-align:right;"><a href="javascript:window.close();"><?php echo get_lang('Close')?></a></div>
  125. </div>
  126. </body>
  127. </html>

Documentation generated on Thu, 12 Jun 2008 13:38:41 -0500 by phpDocumentor 1.4.1