torrentpier/upload/profile.php
dimka3210 7ffc9c882d r486
Черновики. ALTER TABLE `bb_topics` ADD COLUMN `is_draft` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `topic_show_first_post`; git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@486 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
2013-01-08 15:50:39 +00:00

64 lines
1.1 KiB
PHP

<?php
define('IN_PHPBB', true);
define('IN_PROFILE', true);
define('BB_SCRIPT', 'profile');
define('BB_ROOT', './');
require(BB_ROOT . "common.php");
// Start session management
$user->session_start();
// session id check
$sid = request_var('sid', '');
$mode = request_var('mode', '');
$mode = htmlspecialchars($mode);
switch ($mode)
{
case 'viewprofile':
require(INC_DIR . 'ucp/usercp_viewprofile.php');
break;
case 'viewdraft':
require(INC_DIR . 'ucp/usercp_viewdraft.php');
break;
case 'register':
case 'editprofile':
if ( !$userdata['session_logged_in'] && $mode == 'editprofile' )
{
login_redirect();
}
require(INC_DIR . 'ucp/usercp_register.php');
break;
case 'sendpassword':
require(INC_DIR .'ucp/usercp_sendpasswd.php');
break;
case 'activate':
require(INC_DIR .'ucp/usercp_activate.php');
break;
case 'email':
require(INC_DIR .'ucp/usercp_email.php');
break;
case 'bonus':
if (IS_GUEST) login_redirect();
require(INC_DIR . 'ucp/usercp_bonus.php');
break;
case 'watch':
if (IS_GUEST) login_redirect();
require(INC_DIR . 'ucp/usercp_topic_watch.php');
break;
default:
bb_die('Invalid mode');
}