footer.inc.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <?php
  2. /* For licensing terms, see /chamilo_license.txt */
  3. /**
  4. ==============================================================================
  5. * This script displays the footer that is below (almost)
  6. * every Chamilo web page.
  7. *
  8. * @package dokeos.include
  9. ==============================================================================
  10. */
  11. /**** display of tool_navigation_menu according to admin setting *****/
  12. require_once (api_get_path(LIBRARY_PATH).'course.lib.php');
  13. if (api_get_setting('show_navigation_menu') != 'false') {
  14. $course_id = api_get_course_id();
  15. if (!empty($course_id) && ($course_id != -1)) {
  16. if ( api_get_setting('show_navigation_menu') != 'icons') {
  17. echo '</div> <!-- end #center -->';
  18. echo '</div> <!-- end #centerwrap -->';
  19. }
  20. require_once api_get_path(INCLUDE_PATH).'tool_navigation_menu.inc.php';
  21. show_navigation_menu();
  22. }
  23. }
  24. /***********************************************************************/
  25. ?>
  26. <div class="clear">&nbsp;</div> <!-- 'clearing' div to make sure that footer stays below the main and right column sections -->
  27. </div> <!-- end of #main" started at the end of banner.inc.php -->
  28. <div class="push"></div>
  29. </div> <!-- end of #wrapper section -->
  30. <div id="footer"> <!-- start of #footer section -->
  31. <div id="bottom_corner"></div>
  32. <div class="copyright">
  33. <?php
  34. global $_configuration;
  35. echo get_lang("Platform"), ' <a href="http://www.chamilo.org" target="_blank">Chamilo ', $_configuration['dokeos_version'], '</a> &copy; ', date('Y');
  36. // Server mode indicator.
  37. if (api_is_platform_admin()) {
  38. if (api_get_setting('server_type') == 'test') {
  39. echo ' <a href="'.api_get_path(WEB_CODE_PATH).'admin/settings.php?category=Platform#server_type">';
  40. echo '<span style="background-color: white; color: red; border: 1px solid red;">&nbsp;Test&nbsp;server&nbsp;mode&nbsp;</span></a>';
  41. }
  42. }
  43. ?>
  44. </div>
  45. <?php
  46. /*
  47. -----------------------------------------------------------------------------
  48. Plugins for footer section
  49. -----------------------------------------------------------------------------
  50. */
  51. api_plugin('footer');
  52. echo '<div class="footer_emails">';
  53. if (api_get_setting('show_administrator_data')=='true') {
  54. // Platform manager
  55. echo '<span id="platformmanager">', get_lang('Manager'), ' : ', Display::encrypted_mailto_link(api_get_setting('emailAdministrator'), api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname')));
  56. }
  57. if (api_get_setting('show_tutor_data')=='true') {
  58. // course manager
  59. $id_course=api_get_course_id();
  60. $id_session=api_get_session_id();
  61. if (isset($id_course) && $id_course!=-1) {
  62. echo '<span id="coursemanager">';
  63. if ($id_session!=0){
  64. $coachs_email=CourseManager::get_email_of_tutor_to_session($id_session,$id_course);
  65. $email_link = array();
  66. foreach ($coachs_email as $coach_email) {
  67. foreach ($coach_email as $email=>$username) {
  68. $email_link[] = Display::encrypted_mailto_link($email,$username);
  69. }
  70. }
  71. echo '<br />'.get_lang('Coachs')." : ".implode("<br />",$email_link);
  72. }
  73. echo '</span>';
  74. }
  75. }
  76. if (api_get_setting('show_teacher_data')=='true') {
  77. // course manager
  78. $id_course=api_get_course_id();
  79. if (isset($id_course) && $id_course!=-1) {
  80. echo '<span id="coursemanager">';
  81. $mail=CourseManager::get_emails_of_tutors_to_course($id_course);
  82. if (!empty($mail)) {
  83. if (count($mail)>1){
  84. $bar='<br />';
  85. echo '<br />'.get_lang('Teachers').' : ';
  86. } else {
  87. $bar='';
  88. echo '<br />'.get_lang('Teacher').' : ';
  89. }
  90. foreach ($mail as $value=>$key) {
  91. foreach ($key as $email=>$name){
  92. echo '<il>'.Display::encrypted_mailto_link($email,$name).$bar.'</il>';
  93. }
  94. }
  95. }
  96. echo '<br /></span>';
  97. }
  98. }
  99. echo '</div>';
  100. ?>&nbsp;
  101. </div> <!-- end of #footer -->
  102. </body>
  103. </html>