Verzeichnisstruktur phpBB-2.0.0


Veröffentlicht
03.04.2002

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

      (Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

profile.php

Zuletzt modifiziert: 09.10.2024, 12:50 - Dateigröße: 3.29 KiB


 001  <?php
 002  /***************************************************************************
 003   *                                profile.php
 004   *                            -------------------
 005   *   begin                : Saturday, Feb 13, 2001
 006   *   copyright            : (C) 2001 The phpBB Group
 007   *   email                : support@phpbb.com
 008   *
 009   *   $Id$
 010   *
 011   *
 012   ***************************************************************************/
 013   
 014  /***************************************************************************
 015   *
 016   *   This program is free software; you can redistribute it and/or modify
 017   *   it under the terms of the GNU General Public License as published by
 018   *   the Free Software Foundation; either version 2 of the License, or
 019   *   (at your option) any later version.
 020   *
 021   ***************************************************************************/
 022   
 023  define('IN_PHPBB', true);
 024  $phpbb_root_path = './';
 025  include($phpbb_root_path . 'extension.inc');
 026  include($phpbb_root_path . 'common.'.$phpEx);
 027   
 028  //
 029  // Start session management
 030  //
 031  $userdata = session_pagestart($user_ip, PAGE_PROFILE);
 032  init_userprefs($userdata);
 033  //
 034  // End session management
 035  //
 036   
 037  // session id check
 038  if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid']))
 039  {
 040      $sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid'];
 041  }
 042  else
 043  {
 044      $sid = '';
 045  }
 046   
 047  //
 048  // Set default email variables
 049  //
 050  $script_name = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path']));
 051  $script_name = ( $script_name != '' ) ? $script_name . '/profile.'.$phpEx : 'profile.'.$phpEx;
 052  $server_name = trim($board_config['server_name']);
 053  $server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://';
 054  $server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/';
 055   
 056  $server_url = $server_protocol . $server_name . $server_port . $script_name;
 057   
 058  // -----------------------
 059  // Page specific functions
 060  //
 061  function gen_rand_string($hash)
 062  {
 063      $rand_str = dss_rand();
 064   
 065      return ( $hash ) ? md5($rand_str) : substr($rand_str, 0, 8);
 066  }
 067  //
 068  // End page specific functions
 069  // ---------------------------
 070   
 071  //
 072  // Start of program proper
 073  //
 074  if ( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
 075  {
 076      $mode = ( isset($HTTP_GET_VARS['mode']) ) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
 077      $mode = htmlspecialchars($mode);
 078   
 079      if ( $mode == 'viewprofile' )
 080      {
 081          include($phpbb_root_path . 'includes/usercp_viewprofile.'.$phpEx);
 082          exit;
 083      }
 084      else if ( $mode == 'editprofile' || $mode == 'register' )
 085      {
 086          if ( !$userdata['session_logged_in'] && $mode == 'editprofile' )
 087          {
 088              redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=editprofile", true));
 089          }
 090   
 091          include($phpbb_root_path . 'includes/usercp_register.'.$phpEx);
 092          exit;
 093      }
 094      else if ( $mode == 'confirm' )
 095      {
 096          // Visual Confirmation
 097          if ( $userdata['session_logged_in'] )
 098          {
 099              exit;
 100          }
 101   
 102          include($phpbb_root_path . 'includes/usercp_confirm.'.$phpEx);
 103          exit;
 104      }
 105      else if ( $mode == 'sendpassword' )
 106      {
 107          include($phpbb_root_path . 'includes/usercp_sendpasswd.'.$phpEx);
 108          exit;
 109      }
 110      else if ( $mode == 'activate' )
 111      {
 112          include($phpbb_root_path . 'includes/usercp_activate.'.$phpEx);
 113          exit;
 114      }
 115      else if ( $mode == 'email' )
 116      {
 117          include($phpbb_root_path . 'includes/usercp_email.'.$phpEx);
 118          exit;
 119      }
 120  }
 121   
 122  redirect(append_sid("index.$phpEx", true));
 123   
 124  ?>