-
Notifications
You must be signed in to change notification settings - Fork 0
/
cp.php
executable file
·61 lines (53 loc) · 1.79 KB
/
cp.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
<?php
/*
[UCenter Home] (C) 2007-2008 Comsenz Inc.
$Id: cp.php 13003 2009-08-05 06:46:06Z liguode $
*/
//通用文件
include_once('./common.php');
include_once(S_ROOT.'./source/function_cp.php');
include_once(S_ROOT.'./source/function_magic.php');
//允许的方法
$acs = array('space', 'doing', 'upload', 'comment', 'blog', 'album', 'relatekw', 'common', 'class',
'swfupload', 'thread', 'mtag', 'poke', 'friend',
'avatar', 'profile', 'theme', 'import', 'feed', 'privacy', 'pm', 'share', 'advance', 'invite','sendmail',
'userapp', 'task', 'credit', 'password', 'domain', 'event', 'poll', 'topic',
'click','magic', 'top', 'videophoto');
$ac = (empty($_GET['ac']) || !in_array($_GET['ac'], $acs))?'profile':$_GET['ac'];
$op = empty($_GET['op'])?'':$_GET['op'];
//权限判断
if(empty($_SGLOBAL['supe_uid'])) {
if($_SERVER['REQUEST_METHOD'] == 'GET') {
ssetcookie('_refer', rawurlencode($_SERVER['REQUEST_URI']));
} else {
ssetcookie('_refer', rawurlencode('cp.php?ac='.$ac));
}
// showmessage('to_login', 'do.php?ac='.$_SCONFIG['login_action']); //原始版
showmessage('to_login', 'OpenID.call.php');//OpenID登陆
}
//获取空间信息
$space = getspace($_SGLOBAL['supe_uid']);
if(empty($space)) {
showmessage('space_does_not_exist');
}
//是否关闭站点
if(!in_array($ac, array('common', 'pm'))) {
checkclose();
//空间被锁定
if($space['flag'] == -1) {
showmessage('space_has_been_locked');
}
//禁止访问
if(checkperm('banvisit')) {
ckspacelog();
showmessage('you_do_not_have_permission_to_visit');
}
//验证是否有权限玩应用
if($ac =='userapp' && !checkperm('allowmyop')) {
showmessage('no_privilege');
}
}
//菜单
$actives = array($ac => ' class="active"');
include_once(S_ROOT.'./source/cp_'.$ac.'.php');
?>