footer.inc.php 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  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. if (api_get_setting('show_navigation_menu') != 'false') {
  11. $course_id = api_get_course_id();
  12. if (!empty($course_id) && ($course_id != -1)) {
  13. if (api_get_setting('show_navigation_menu') != 'icons') {
  14. echo '</div> <!-- end #center -->';
  15. echo '</div> <!-- end #centerwrap -->';
  16. }
  17. require_once api_get_path(INCLUDE_PATH).'tool_navigation_menu.inc.php';
  18. show_navigation_menu();
  19. }
  20. }
  21. ?>
  22. <div class="clear">&nbsp;</div> <!-- 'clearing' div to make sure that footer stays below the main and right column sections -->
  23. </div> <!-- end of #main" started at the end of banner.inc.php -->
  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. <?php
  28. /*
  29. global $used_lang_vars;
  30. if (!empty($used_lang_vars)) {
  31. echo '<div style="float:left"><ul>';
  32. foreach ($used_lang_vars as $var => $value) {
  33. echo '<li><b>'.$var.'</b>: '.$value.'</li>';
  34. }
  35. echo '</ul></div>';
  36. } else {
  37. echo '<p>No translated strings on this page?!</p>';
  38. }*/
  39. ?>
  40. <div id="footer"> <!-- start of #footer section -->
  41. <div id="bottom_corner"></div>
  42. <?php
  43. global $_configuration;
  44. echo '<div class="copyright">';
  45. if (api_get_setting('show_administrator_data') == 'true') {
  46. // Platform manager
  47. 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>';
  48. }
  49. echo '<div align="right">'.get_lang('Platform').' <a href="', $_configuration['software_url'], '" target="_blank">', $_configuration['software_name'], ' ', $_configuration['system_version'], '</a>';
  50. echo '&copy; ', date('Y');
  51. echo '</div>';
  52. echo '</div>'; //copyright div
  53. echo '<div class="footer_emails">';
  54. /* Plugins for footer section */
  55. echo '<div id="plugin-footer">';
  56. api_plugin('footer');
  57. echo '</div>';
  58. if (api_get_setting('show_tutor_data') == 'true') {
  59. // Course manager
  60. $id_course = api_get_course_id();
  61. $id_session = api_get_session_id();
  62. if (isset($id_course) && $id_course != -1) {
  63. echo '<div id="platformmanager">';
  64. if ($id_session != 0){
  65. $coachs_email = CourseManager::get_email_of_tutor_to_session($id_session, $id_course);
  66. $email_link = array();
  67. foreach ($coachs_email as $coach_email) {
  68. foreach ($coach_email as $email => $username) {
  69. $email_link[] = Display::encrypted_mailto_link($email, $username);
  70. }
  71. }
  72. if (count($coachs_email) > 1) {
  73. $bar = '<br />';
  74. echo get_lang('Coachs').' : <ul>';
  75. echo '<li>'.implode("<li>", $email_link);
  76. echo '</ul>';
  77. } elseif (count($coachs_email) == 1) {
  78. echo get_lang('Coach').' : ';
  79. echo implode("&nbps;", $email_link);
  80. } elseif (count($coachs_email) == 0) {
  81. echo '';
  82. }
  83. }
  84. echo '</div>';
  85. }
  86. echo '<br>';
  87. }
  88. echo '<div style="clear:both"></div>';
  89. $class = '';
  90. if (api_get_setting('show_teacher_data') == 'true') {
  91. if (api_get_setting('show_tutor_data') == 'false') {
  92. $class = 'platformmanager';
  93. } else {
  94. $class = 'coursemanager';
  95. }
  96. // course manager
  97. $id_course = api_get_course_id();
  98. if (isset($id_course) && $id_course != -1) {
  99. echo '<div id="'.$class.'">';
  100. $mail = CourseManager::get_emails_of_tutors_to_course($id_course);
  101. if (!empty($mail)) {
  102. if (count($mail) > 1) {
  103. echo get_lang('Teachers').' : <ul>';
  104. foreach ($mail as $value => $key) {
  105. foreach ($key as $email => $name) {
  106. echo '<li>'.Display::encrypted_mailto_link($email, $name).'</li>';
  107. }
  108. }
  109. echo '</ul>';
  110. } else {
  111. echo get_lang('Teacher').' : ';
  112. foreach ($mail as $value => $key) {
  113. foreach ($key as $email => $name) {
  114. echo Display::encrypted_mailto_link($email, $name).'<br />';
  115. }
  116. }
  117. }
  118. }
  119. echo '</div>';
  120. }
  121. }
  122. echo '</div>';
  123. echo '</div> <!-- end of #footer -->';
  124. if (!api_is_platform_admin()) {
  125. $extra_footer = trim(api_get_setting('footer_extra_content'));
  126. if (!empty($extra_footer)) {
  127. echo $extra_footer;
  128. }
  129. }
  130. /*
  131. // Test server mode indicator and information for testing purposes.
  132. if (api_is_platform_admin()) {
  133. if (api_get_setting('server_type') == 'test') {
  134. echo '<br /><a href="'.api_get_path(WEB_CODE_PATH).'admin/settings.php?category=Platform#server_type">';
  135. echo '<span style="background-color: white; color: red; border: 1px solid red;">&nbsp;'.get_lang('TestServerMode').'&nbsp;</span></a>';
  136. // @todo page execution time
  137. $mtime = microtime();
  138. $mtime = explode(" ",$mtime);
  139. $mtime = $mtime[1] + $mtime[0];
  140. $endtime = $mtime;
  141. $starttime = $_SESSION['page_start_time_execution'];
  142. $totaltime = ($endtime - $starttime);
  143. $starttime = null;
  144. unset($_SESSION['page_start_time_execution']);
  145. $totaltime = number_format(($totaltime), 4, '.', '');
  146. echo '<h2>'.get_lang('PageExecutionTimeWas').' '.$totaltime.' '.get_lang('Seconds').'</h2>';
  147. unset($_SESSION['page_start_time_execution']);
  148. // Memory usage
  149. echo get_lang('MemoryUsage').': '.number_format((memory_get_usage()/1048576), 3, '.', '') .' Mb' ;
  150. echo '<br />';
  151. echo get_lang('MemoryUsagePeak').': '.number_format((memory_get_peak_usage()/1048576), 3, '.', '').' Mb';
  152. }
  153. }*/
  154. ?>
  155. <script>
  156. $(document).ready( function() {
  157. $(".chzn-select").chosen();
  158. //highlighting rows
  159. $("form .data_table input:checkbox").click(function() {
  160. if ($(this).is(":checked")) {
  161. $(this).parentsUntil("tr").parent().addClass("row_selected");
  162. } else {
  163. $(this).parentsUntil("tr").parent().removeClass("row_selected");
  164. }
  165. });
  166. });
  167. </script>
  168. </body>
  169. </html>