chat_banner.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Chamilo banner
  5. *
  6. * @author Olivier Brouckaert
  7. * @chamilo chamilo.chat
  8. */
  9. $language_file = array ('chat');
  10. require_once '../inc/global.inc.php';
  11. require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
  12. $this_section = SECTION_COURSES;
  13. //$interbreadcrumb[] = array ('url' => 'chat.php', 'name' => get_lang('Chat'));
  14. //$noPHP_SELF = true;
  15. //$shortBanner = false;
  16. //Display::display_header(null, 'Chat');
  17. $tool_name = get_lang('ToolChat');
  18. // If it is a group chat then the breadcrumbs.
  19. if ($_SESSION['_gid'] OR $_GET['group_id']) {
  20. if (isset($_SESSION['_gid'])) {
  21. $_clean['group_id'] = (int)$_SESSION['_gid'];
  22. }
  23. if (isset($_GET['group_id'])) {
  24. $_clean['group_id'] = (int)Database::escape_string($_GET['group_id']);
  25. }
  26. $group_properties = GroupManager :: get_group_properties($_clean['group_id']);
  27. $interbreadcrumb[] = array('url' => '../group/group.php', 'name' => get_lang('Groups'));
  28. $interbreadcrumb[] = array('url' => '../group/group_space.php?gidReq='.$_SESSION['_gid'], 'name' => get_lang('GroupSpace').' ('.$group_properties['name'].')');
  29. $noPHP_SELF = true;
  30. $shortBanner = false;
  31. $add_group_to_title = ' ('.$group_properties['name'].')';
  32. $groupfilter = 'group_id="'.$_clean['group_id'].'"';
  33. // Ensure this tool in groups whe it's private or deactivated
  34. /*if ($group_properties['chat_state'] == 0) {
  35. echo api_not_allowed();
  36. } elseif ($group_properties['chat_state'] == 2) {
  37. if (!api_is_allowed_to_edit(false,true) and !GroupManager :: is_user_in_group($_user['user_id'], $_SESSION['_gid'])) {
  38. echo api_not_allowed();
  39. }
  40. }*/
  41. } else {
  42. $groupfilter = 'group_id=0';
  43. }
  44. Display::display_header($tool_name, 'Chat');
  45. //$is_allowed_to_edit = api_is_allowed_to_edit(false, true);
  46. ?>
  47. </body>
  48. </html>