forked from torrentpier/torrentpier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile.php
62 lines (51 loc) · 1.39 KB
/
profile.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
/**
* TorrentPier – Bull-powered BitTorrent tracker engine
*
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
*/
define('IN_PROFILE', true);
define('BB_SCRIPT', 'profile');
define('BB_ROOT', './');
require __DIR__ . '/common.php';
// Start session management
$user->session_start();
set_die_append_msg();
$mode = request_var('mode', '');
switch ($mode) {
case 'viewprofile':
require UCP_DIR . '/viewprofile.php';
break;
case 'register':
case 'editprofile':
if (IS_GUEST && $mode == 'editprofile') {
login_redirect();
}
require UCP_DIR . '/register.php';
break;
case 'sendpassword':
require UCP_DIR . '/sendpasswd.php';
break;
case 'activate':
require UCP_DIR . '/activate.php';
break;
case 'email':
require UCP_DIR . '/email.php';
break;
case 'bonus':
if (IS_GUEST) {
login_redirect();
}
require UCP_DIR . '/bonus.php';
break;
case 'watch':
if (IS_GUEST) {
login_redirect();
}
require UCP_DIR . '/topic_watch.php';
break;
default:
bb_die('Invalid mode');
}