Beehive PHP Cross Reference Discussion Forums

Source: /user.php - 81 lines - 2675 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 . 'cache.inc.php';
  29  require_once  BH_INCLUDE_PATH . 'constants.inc.php';
  30  require_once  BH_INCLUDE_PATH . 'format.inc.php';
  31  require_once  BH_INCLUDE_PATH . 'html.inc.php';
  32  require_once  BH_INCLUDE_PATH . 'server.inc.php';
  33  require_once  BH_INCLUDE_PATH . 'session.inc.php';
  34  // End Required includes
  35  
  36  // Don't cache this page - fixes problems with Opera.
  37  cache_disable();
  38  
  39  // Check we're logged in correctly
  40  if (!session::logged_in()) {
  41      html_guest_error();
  42  }
  43  
  44  // Get the user's saved left frame width.
  45  if (isset($_SESSION['LEFT_FRAME_WIDTH']) && is_numeric($_SESSION['LEFT_FRAME_WIDTH'])) {
  46      $left_frame_width = max(100, $_SESSION['LEFT_FRAME_WIDTH']);
  47  } else {
  48      $left_frame_width = 280;
  49  }
  50  
  51  // Output starts here
  52  html_draw_top('frame_set_html', 'pm_popup_disabled');
  53  
  54  $frameset = new html_frameset_cols('user', "$left_frame_width,*");
  55  
  56  if (isset($_GET['page']) && strlen(trim($_GET['page'])) > 0) {
  57  
  58      $requested_page = trim($_GET['page']);
  59  
  60      $available_pages_preg = implode("|^", array_map('preg_quote_callback', get_available_user_files()));
  61  
  62      if (preg_match("/^$available_pages_preg/u", basename($requested_page)) > 0) {
  63  
  64          $requested_page = href_cleanup_query_keys($requested_page);
  65  
  66          $frameset->html_frame("user_menu.php?webtag=$webtag", html_get_frame_name('left'));
  67          $frameset->html_frame($requested_page, html_get_frame_name('right'));
  68  
  69          $frameset->output_html();
  70  
  71          html_draw_bottom(true);
  72          exit;
  73      }
  74  }
  75  
  76  $frameset->html_frame("user_menu.php?webtag=$webtag", html_get_frame_name('left'));
  77  $frameset->html_frame("edit_prefs.php?webtag=$webtag", html_get_frame_name('right'));
  78  
  79  $frameset->output_html();
  80  
  81  html_draw_bottom(true);

title

Description

title

Description

title

Description

title

title

Body