Beehive PHP Cross Reference Discussion Forums

Source: /nav.php - 97 lines - 4044 bytes - Summary - Text - Print

   1  <?php
   2  
   3  /*======================================================================
   4  Copyright Project Beehive Forum 2002
   5  
   6  This file is part of Beehive Forum.
   7  
   8  Beehive Forum is free software; you can redistribute it and/or modify
   9  it under the terms of the GNU General Public License as published by
  10  the Free Software Foundation; either version 3 of the License, or
  11  (at your option) any later version.
  12  
  13  Beehive Forum is distributed in the hope that it will be useful,
  14  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16  GNU General Public License for more details.
  17  
  18  You should have received a copy of the GNU General Public License
  19  along with Beehive; if not, write to the Free Software
  20  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  21  USA
  22  ======================================================================*/
  23  
  24  // Bootstrap
  25  require_once  'boot.php';
  26  
  27  // Required includes
  28  require_once  BH_INCLUDE_PATH . 'ajax_chat.inc.php';
  29  require_once  BH_INCLUDE_PATH . 'cache.inc.php';
  30  require_once  BH_INCLUDE_PATH . 'constants.inc.php';
  31  require_once  BH_INCLUDE_PATH . 'forum.inc.php';
  32  require_once  BH_INCLUDE_PATH . 'forum_links.inc.php';
  33  require_once  BH_INCLUDE_PATH . 'html.inc.php';
  34  require_once  BH_INCLUDE_PATH . 'session.inc.php';
  35  require_once  BH_INCLUDE_PATH . 'user.inc.php';
  36  // End Required includes
  37  
  38  cache_disable();
  39  
  40  html_draw_top("class=navpage", "js/forumlinks.js");
  41  
  42  echo "<div class=\"navleft\">\n";
  43  
  44  if (forum_check_webtag_available($webtag)) {
  45  
  46      echo "<a href=\"start.php?webtag=$webtag\" target=\"", html_get_frame_name('main'), "\">", gettext("Start"), "</a>&nbsp;|&nbsp;\n";
  47      echo "<a href=\"discussion.php?webtag=$webtag\" target=\"", html_get_frame_name('main'), "\">", gettext("Messages"), "</a>&nbsp;|&nbsp;\n";
  48  
  49      if (forum_get_setting('ajax_chat_enabled', 'Y')) {
  50  
  51          if (($ajax_chat_online_user_count = ajax_chat_online_user_count())) {
  52              echo "<a href=\"chat/index.php\" target=\"", html_get_frame_name('main'), "\">", gettext("Chat"), "&nbsp;(", $ajax_chat_online_user_count, ")</a>&nbsp;|&nbsp;\n";
  53          } else {
  54              echo "<a href=\"chat/index.php\" target=\"", html_get_frame_name('main'), "\">", gettext("Chat"), "&nbsp;(0)</a>&nbsp;|&nbsp;\n";
  55          }
  56      }
  57  
  58      if (forum_get_setting('show_links', 'Y')) {
  59          echo "<a href=\"links.php?webtag=$webtag\" target=\"", html_get_frame_name('main'), "\">", gettext("Links"), "</a>&nbsp;|&nbsp;\n";
  60      }
  61  }
  62  
  63  if (forum_get_setting('show_pms', 'Y')) {
  64      echo "<a href=\"pm.php\" target=\"", html_get_frame_name('main'), "\">", gettext("Inbox"), "</a>&nbsp;|&nbsp;\n";
  65  }
  66  
  67  if (forum_check_webtag_available($webtag)) {
  68      echo "<a href=\"user.php?webtag=$webtag\" target=\"", html_get_frame_name('main'), "\">", gettext("My Controls"), "</a>&nbsp;|&nbsp;\n";
  69  }
  70  
  71  if (forums_get_available_count() > 1 || !forum_get_default()) {
  72      echo "<a href=\"forums.php?webtag=$webtag\" target=\"", html_get_frame_name('main'), "\">", gettext("My Forums"), "</a>&nbsp;|&nbsp;\n";
  73  }
  74  
  75  if (session::check_perm(USER_PERM_FORUM_TOOLS, 0) || session::check_perm(USER_PERM_ADMIN_TOOLS, 0) || session::get_folders_by_perm(USER_PERM_FOLDER_MODERATE)) {
  76      echo "<a href=\"admin.php?webtag=$webtag\" target=\"", html_get_frame_name('main'), "\">", gettext("Admin"), "</a>&nbsp;|&nbsp;\n";
  77  }
  78  
  79  if (!session::logged_in()) {
  80  
  81      echo "<a href=\"index.php?webtag=$webtag&amp;final_uri=logon.php%3Fwebtag%3D$webtag\" target=\"", html_get_top_frame_name(), "\">", gettext("Login"), "</a>&nbsp;|&nbsp;\n";
  82      echo "<a href=\"register.php?webtag=$webtag\" target=\"", html_get_frame_name('main'), "\">", gettext("Register"), "</a>\n";
  83  
  84  } else {
  85  
  86      echo "<a href=\"logout.php?webtag=$webtag\" target=\"", html_get_top_frame_name(), "\">", gettext("Logout"), " : ", $_SESSION['LOGON'], "</a>\n";
  87  }
  88  
  89  echo "</div>\n";
  90  echo "<div class=\"navright\">\n";
  91  
  92  echo forum_links_draw_dropdown('openForumLink');
  93  
  94  echo "</div>\n";
  95  echo "<div style=\"clear: both\"></div>\n";
  96  
  97  html_draw_bottom();

title

Description

title

Description

title

Description

title

title

Body