view_message.php 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php // $Id: view_message.php 20962 2009-05-25 03:15:53Z iflorespaz $
  2. /*
  3. ==============================================================================
  4. Dokeos - elearning and course management software
  5. Copyright (c) 2009 Dokeos SPRL
  6. Copyright (c) 2009 Julio Montoya Armas <gugli100@gmail.com>
  7. Copyright (c) Facultad de Matematicas, UADY (México)
  8. Copyright (c) Evie, Free University of Brussels (Belgium)
  9. Copyright (c) 2009 Isaac Flores Paz <isaac.flores.paz@gmail.com>
  10. For a full list of contributors, see "credits.txt".
  11. The full license can be read in "license.txt".
  12. This program is free software; you can redistribute it and/or
  13. modify it under the terms of the GNU General Public License
  14. as published by the Free Software Foundation; either version 2
  15. of the License, or (at your option) any later version.
  16. See the GNU General Public License for more details.
  17. Contact address: Dokeos, rue du Corbeau, 108, B-1030 Brussels, Belgium
  18. Mail: info@dokeos.com
  19. ==============================================================================
  20. */
  21. /*
  22. ==============================================================================
  23. INIT SECTION
  24. =========================================================================5====
  25. */
  26. // name of the language file that needs to be included
  27. $language_file= 'messages';
  28. $cidReset= true;
  29. require_once '../inc/global.inc.php';
  30. api_block_anonymous_users();
  31. if (api_get_setting('allow_message_tool')!='true'){
  32. api_not_allowed();
  33. }
  34. require_once api_get_path(LIBRARY_PATH).'message.lib.php';
  35. if (isset($_GET['id_send']) || isset($_GET['id'])) {
  36. if (isset($_GET['rs'])) {
  37. $interbreadcrumb[]= array (
  38. 'url' => '#',
  39. 'name' => get_lang('Messages')
  40. );
  41. $interbreadcrumb[]= array (
  42. 'url' => '../social/'.$_SESSION['social_dest'].'?#remote-tab-2',
  43. 'name' => get_lang('SocialNetwork')
  44. );
  45. $interbreadcrumb[]= array (
  46. 'url' => 'inbox.php',
  47. 'name' => get_lang('Inbox')
  48. );
  49. $interbreadcrumb[]= array (
  50. 'url' => 'outbox.php',
  51. 'name' => get_lang('Outbox')
  52. );
  53. } else {
  54. $interbreadcrumb[]= array (
  55. 'url' => '#',
  56. 'name' => get_lang('Messages')
  57. );
  58. $interbreadcrumb[]= array (
  59. 'url' => 'inbox.php',
  60. 'name' => get_lang('Inbox')
  61. );
  62. $interbreadcrumb[]= array (
  63. 'url' => 'outbox.php',
  64. 'name' => get_lang('Outbox')
  65. );
  66. }
  67. }
  68. /*
  69. ==============================================================================
  70. HEADER
  71. ==============================================================================
  72. */
  73. $request=api_is_xml_http_request();
  74. if ($request===false) {
  75. Display::display_header('');
  76. }
  77. //api_display_tool_title(api_xml_http_response_encode(get_lang('ReadMessage')));
  78. if (isset($_GET['id_send'])) {
  79. MessageManager::show_message_box_sent();
  80. } else {
  81. MessageManager::show_message_box();
  82. }
  83. /*
  84. ==============================================================================
  85. FOOTER
  86. ==============================================================================
  87. */
  88. if ($request===false) {
  89. Display::display_footer();
  90. }
  91. ?>