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. if (api_get_setting('show_administrator_data')=='true') {
  36. // Platform manager
  37. 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>';
  38. }
  39. echo get_lang("Platform"), ' <a href="http://www.chamilo.org" target="_blank">Chamilo ', $_configuration['dokeos_version'], '</a> &copy; ', date('Y');
  40. // Server mode indicator.
  41. if (api_is_platform_admin()) {
  42. if (api_get_setting('server_type') == 'test') {
  43. echo ' <a href="'.api_get_path(WEB_CODE_PATH).'admin/settings.php?category=Platform#server_type">';
  44. echo '<span style="background-color: white; color: red; border: 1px solid red;">&nbsp;Test&nbsp;server&nbsp;mode&nbsp;</span></a>';
  45. }
  46. }
  47. ?>
  48. </div>
  49. <?php
  50. /*
  51. -----------------------------------------------------------------------------
  52. Plugins for footer section
  53. -----------------------------------------------------------------------------
  54. */
  55. api_plugin('footer');
  56. echo '<div class="footer_emails">';
  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="platformmanager">';
  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 get_lang('Coachs')." : <ul>".implode("<br /><il>",$email_link);
  72. }
  73. echo '</ul></span>';
  74. }
  75. echo '<br>';
  76. }
  77. if (api_get_setting('show_teacher_data')=='true') {
  78. // course manager
  79. $id_course=api_get_course_id();
  80. if (isset($id_course) && $id_course!=-1) {
  81. echo '<span id="coursemanager">';
  82. $mail=CourseManager::get_emails_of_tutors_to_course($id_course);
  83. if (!empty($mail)) {
  84. if (count($mail)>1){
  85. $bar='<br />';
  86. echo get_lang('Teachers').' : <ul>';
  87. } else {
  88. $bar='';
  89. echo get_lang('Teacher').' : ';
  90. }
  91. foreach ($mail as $value=>$key) {
  92. foreach ($key as $email=>$name){
  93. echo '<il>'.Display::encrypted_mailto_link($email,$name).$bar.'</il>';
  94. }
  95. }
  96. }
  97. echo '<br /></span>';
  98. }
  99. }
  100. echo '</ul></div>';
  101. ?>&nbsp;
  102. </div> <!-- end of #footer -->
  103. </body>
  104. </html>