-
Notifications
You must be signed in to change notification settings - Fork 1
/
rules.php
71 lines (57 loc) · 1.5 KB
/
rules.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
63
64
65
66
67
68
69
70
71
<?php
/**
* @package phpBB-WAP
* @copyright (c) phpBB Group
* @Оптимизация под WAP: Гутник Игорь ( чел ).
* @简体中文:中文phpBB-WAP团队
* @license http://opensource.org/licenses/gpl-license.php
**/
/**
* 这是一款自由软件, 您可以在 Free Software Foundation 发布的
* GNU General Public License 的条款下重新发布或修改; 您可以
* 选择目前 version 2 这个版本(亦可以选择任何更新的版本,由
* 你喜欢)作为新的牌照.
**/
define('IN_PHPBB', true);
define('ROOT_PATH', './');
require(ROOT_PATH . 'common.php');
$forum_id = get_var('f', 0);
$privmsg = (!$forum_id) ? true : false;
$userdata = $session->start($user_ip, PAGE_RULES);
init_userprefs($userdata);
if ( isset($_GET['mode']) ){
$mode = htmlspecialchars($_GET['mode']);
}else{
$mode = '';
}
if ( isset($_GET['act']) )
{
$action = htmlspecialchars($_GET['act']);
}
else
{
$action = '';
}
$rule_cat_id = ( isset($_GET['crid']) ) ? abs(intval($_GET['crid'])) : '';
$is_rules_auth = ( $userdata['user_level'] == ADMIN ) ? true : false;
switch( $mode )
{
case 'addcat':
case 'editcat':
require ROOT_PATH . 'includes/rules/editcat.php';
break;
case 'addrule':
case 'editrule':
require ROOT_PATH . 'includes/rules/editrule.php';
break;
case 'delcat':
case 'delrule':
require ROOT_PATH . 'includes/rules/delrule.php';
break;
case 'faq':
require ROOT_PATH . 'includes/rules/faq.php';
break;
default:
require ROOT_PATH . 'includes/rules/default.php';
}
?>