help.php 3.8 KB

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