Beehive PHP Cross Reference Discussion Forums

Source: /user_stats.php - 64 lines - 2069 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 . 'constants.inc.php';
  29  require_once  BH_INCLUDE_PATH . 'header.inc.php';
  30  require_once  BH_INCLUDE_PATH . 'html.inc.php';
  31  require_once  BH_INCLUDE_PATH . 'messages.inc.php';
  32  require_once  BH_INCLUDE_PATH . 'session.inc.php';
  33  require_once  BH_INCLUDE_PATH . 'user.inc.php';
  34  // End Required includes
  35  
  36  // Check we're logged in correctly
  37  if (!session::logged_in()) {
  38      html_guest_error();
  39  }
  40  
  41  if (isset($_GET['msg']) && validate_msg($_GET['msg'])) {
  42  
  43      $msg = $_GET['msg'];
  44  
  45      if (isset($_GET['forum_stats_toggle']) && $_GET['forum_stats_toggle'] == "show") {
  46          $user_prefs['SHOW_STATS'] = "Y";
  47      } else {
  48          $user_prefs['SHOW_STATS'] = "N";
  49      }
  50  
  51      if (user_update_prefs($_SESSION['UID'], $user_prefs)) {
  52  
  53          header_redirect("messages.php?webtag=$webtag&msg=$msg&setstats=1", gettext("Stats Display Changed"));
  54          exit;
  55  
  56      } else {
  57  
  58          html_draw_error(gettext("Some or all of your user account details could not be updated. Please try again later."));
  59      }
  60  
  61  } else {
  62  
  63      html_draw_error(gettext("Invalid Message ID or no Message ID specified."));
  64  }

title

Description

title

Description

title

Description

title

title

Body