footer.inc.php 3.9 KB

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