footer.inc.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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 '<div 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. if (count($coachs_email)>1){
  72. $bar='<br />';
  73. echo get_lang('Coachs').' : <ul>';
  74. echo '<li>'.implode("<li>",$email_link);
  75. } elseif(count($coachs_email)==1) {
  76. echo get_lang('Coach').' : ';
  77. echo implode("&nbps;",$email_link);
  78. } elseif(count($coachs_email)==0) {
  79. echo '';
  80. }
  81. }
  82. echo '</ul></div>';
  83. }
  84. echo '<br>';
  85. }
  86. $class='';
  87. if (api_get_setting('show_teacher_data')=='true') {
  88. if (api_get_setting('show_tutor_data')=='false'){
  89. $class='platformmanager';
  90. } else {
  91. $class='coursemanager';
  92. }
  93. // course manager
  94. $id_course=api_get_course_id();
  95. if (isset($id_course) && $id_course!=-1) {
  96. echo '<div id="'.$class.'">';
  97. $mail=CourseManager::get_emails_of_tutors_to_course($id_course);
  98. if (!empty($mail)) {
  99. if (count($mail)>1){
  100. echo get_lang('Teachers').' : <ul>';
  101. foreach ($mail as $value=>$key) {
  102. foreach ($key as $email=>$name){
  103. echo '<li>'.Display::encrypted_mailto_link($email,$name).'</li>';
  104. }
  105. }
  106. echo '</ul>';
  107. } else {
  108. echo get_lang('Teacher').' : ';
  109. foreach ($mail as $value=>$key) {
  110. foreach ($key as $email=>$name){
  111. echo Display::encrypted_mailto_link($email,$name).'<br />';
  112. }
  113. }
  114. }
  115. }
  116. echo '</div>';
  117. }
  118. }
  119. echo '</div>';
  120. ?>&nbsp;
  121. </div> <!-- end of #footer -->
  122. </body>
  123. </html>