banner.inc.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * This script contains the actual html code to display the "header"
  5. * or "banner" on top of every Chamilo page.
  6. * @todo this should be remove we should only use header.inc.php
  7. *
  8. * @package chamilo.include
  9. */
  10. require_once api_get_path(LIBRARY_PATH).'banner.lib.php';
  11. $session_id = api_get_session_id();
  12. $session_name = api_get_session_name($my_session_id);
  13. echo '<div id="wrapper">';
  14. echo '<ul id="navigation">';
  15. if (!empty($help)) {
  16. $help = Security::remove_XSS($help);
  17. ?>
  18. <li class="help">
  19. <a href="<?php echo api_get_path(WEB_CODE_PATH); ?>help/help.php?open=<?php echo $help; ?>&height=400&width=600" class="thickbox" title="<?php echo get_lang('Help'); ?>">
  20. <img src="<?php echo api_get_path(WEB_IMG_PATH);?>help.large.png" alt="<?php echo get_lang('Help');?>" title="<?php echo get_lang('Help');?>" />
  21. </a>
  22. </li>
  23. <?php } ?>
  24. <?php
  25. if (api_get_setting('show_link_bug_notification') == 'true') {
  26. ?>
  27. <li class="report">
  28. <a href="http://support.chamilo.org/projects/chamilo-18/wiki/How_to_report_bugs" target="_blank">
  29. <img src="<?php echo api_get_path(WEB_IMG_PATH) ?>bug.large.png" style="vertical-align: middle;" alt="<?php echo get_lang('ReportABug') ?>" title="<?php echo get_lang('ReportABug');?>"/></a>
  30. </li>
  31. <?php
  32. }
  33. echo'</ul>';
  34. echo '<div id="header">';
  35. show_header_1($language_file, $nameTools);
  36. show_header_2();
  37. $menu_navigation = show_header_3();
  38. show_header_4($interbreadcrumb, $language_file, $nameTools);
  39. if (isset($database_connection)) {
  40. // connect to the main database.
  41. // if single database, don't pefix table names with the main database name in SQL queries
  42. // (ex. SELECT * FROM table)
  43. // if multiple database, prefix table names with the course database name in SQL queries (or no prefix if the table is in
  44. // the main database)
  45. // (ex. SELECT * FROM table_from_main_db - SELECT * FROM courseDB.table_from_course_db)
  46. Database::select_db($_configuration['main_database'], $database_connection);
  47. }
  48. echo '</div>'; // <!-- end of the whole #header section -->
  49. if (api_get_setting('show_toolshortcuts') == 'true') {
  50. require_once api_get_path(INCLUDE_PATH).'tool_navigation_menu.inc.php';
  51. show_navigation_tool_shortcuts();
  52. }
  53. echo '<div id="main">';
  54. echo '<div id="submain">';
  55. /* "call for chat" module section */
  56. $chat = strpos(api_get_self(), 'chat_banner.php');
  57. if (!$chat) {
  58. include_once api_get_path(LIBRARY_PATH).'online.inc.php';
  59. //echo $accept;
  60. $chatcall = chatcall();
  61. if ($chatcall) {
  62. Display :: display_normal_message($chatcall);
  63. }
  64. }
  65. /* Navigation menu section */
  66. if (api_get_setting('show_navigation_menu') != 'false' && api_get_setting('show_navigation_menu') != 'icons') {
  67. Display::show_course_navigation_menu($_GET['isHidden']);
  68. $course_id = api_get_course_id();
  69. if (!empty($course_id) && ($course_id != -1)) {
  70. echo '<div id="menuButton">';
  71. echo $output_string_menu;
  72. echo '</div>';
  73. if (isset($_SESSION['hideMenu'])) {
  74. if ($_SESSION['hideMenu'] == 'shown') {
  75. if (isset($_cid)) {
  76. echo '<div id="centerwrap">'; // <!-- start of #centerwrap -->
  77. echo '<div id="center">'; // <!-- start of #center -->
  78. }
  79. }
  80. } else {
  81. if (isset($_cid)) {
  82. echo '<div id="centerwrap">'; // <!-- start of #centerwrap -->
  83. echo '<div id="center">'; //<!-- start of #center -->
  84. }
  85. }
  86. }
  87. }