Dokeos PHP Cross Reference Learning Management Systems

Source: /main/forum/forumsearch.php - 105 lines - 3169 bytes - Summary - Text - Print

   1  <?php  // $Id: document.php 16494 2008-10-10 22:07:36Z yannoo $
   2  
   3  /* For licensing terms, see /dokeos_license.txt */
   4  
   5  /**
   6  *    @Author Patrick Cool <patrick.cool@UGent.be>, Ghent University
   7  *    @Copyright Ghent University
   8  *    @Copyright Patrick Cool
   9  *
  10  *     @package dokeos.forum
  11  */
  12  
  13  // name of the language file that needs to be included
  14  $language_file = array ( 'forum', 'group');
  15  
  16  // including the global dokeos file
  17  require  ('../inc/global.inc.php');
  18  
  19  // the section (tabs)
  20  $this_section=SECTION_COURSES;
  21  
  22  // notice for unauthorized people.
  23  api_protect_course_script(true);
  24  
  25  // including additional library scripts
  26  require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php');
  27  include_once (api_get_path(LIBRARY_PATH).'groupmanager.lib.php');
  28  include ('forumfunction.inc.php');
  29  include ('forumconfig.inc.php');
  30  
  31  //are we in a lp ?
  32  $origin = '';
  33  if (isset($_GET['origin'])) {
  34      $origin =  Security::remove_XSS($_GET['origin']);
  35  }
  36  
  37  // name of the tool
  38  $nameTools=get_lang('Forum');
  39  
  40  // breadcrumbs
  41  
  42  if (isset($_SESSION['gradebook'])){
  43      $gradebook=    $_SESSION['gradebook'];
  44  }
  45  
  46  if (!empty($gradebook) && $gradebook=='view') {
  47      $interbreadcrumb[]= array (
  48              'url' => '../gradebook/'.$_SESSION['gradebook_dest'],
  49              'name' => get_lang('Gradebook')
  50          );
  51  }
  52  
  53  if (!empty ($_GET['gidReq'])) {
  54      $toolgroup = Database::escape_string($_GET['gidReq']);
  55      api_session_register('toolgroup');
  56  }
  57  
  58  if (!empty($_SESSION['toolgroup'])) {
  59      $_clean['toolgroup']=(int)$_SESSION['toolgroup'];
  60      $group_properties  = GroupManager :: get_group_properties($_clean['toolgroup']);
  61      $interbreadcrumb[] = array ("url" => "../group/group.php", "name" => get_lang('Groups'));
  62      $interbreadcrumb[] = array ("url" => "../group/group_space.php?gidReq=".$_SESSION['toolgroup'], "name"=> get_lang('GroupSpace').' ('.$group_properties['name'].')');
  63      $interbreadcrumb[] = array ("url" => "viewforum.php?origin=".$origin."&amp;gidReq=".$_SESSION['toolgroup']."&amp;forum=".Security::remove_XSS($_GET['forum']),"name" => prepare4display($current_forum['forum_title']));
  64      $interbreadcrumb[]=array('url' => 'forumsearch.php','name' => get_lang('ForumSearch'));
  65  } else {
  66      $interbreadcrumb[]=array('url' => 'index.php?gradebook='.$gradebook.'','name' => $nameTools);
  67      $interbreadcrumb[]=array('url' => 'forumsearch.php','name' => get_lang('ForumSearch'));
  68  }
  69  
  70  // Display the header
  71  if ($origin=='learnpath') {
  72      include(api_get_path(INCLUDE_PATH).'reduced_header.inc.php');
  73  } else {
  74      Display :: display_tool_header($nameTools);
  75  }
  76  
  77  // top actions toolbars
  78  echo '<div class="actions">';
  79      // TODO set link to
  80      $url = 'index.php?curdirpath='.Security::remove_XSS($_GET['dir']);
  81      echo '<a href="'.$url.'">'.Display::return_icon('pixel.gif', get_lang('Groups'), array('class' => 'toolactionplaceholdericon toolactionback')).get_lang('Forum').'</a>';
  82  
  83  echo '</div>';
  84  
  85  // Tool introduction
  86  Display::display_introduction_section(TOOL_FORUM);
  87  
  88  // Start main content
  89  echo '<div id="content">';
  90  
  91  // tracking
  92  event_access_tool(TOOL_FORUM);
  93  
  94  // forum search
  95  forum_search();
  96  
  97  // ending div#content
  98  echo '</div>';
  99  
 100  // bottom actions toolbars
 101  echo '<div class="actions">';
 102  echo '</div>';
 103  
 104  // footer
 105  Display :: display_footer();

title

Description

title

Description

title

Description

title

title

Body