<?php
/*
		[FuShow.cn] (C) 2013-2014 HXWY Inc.
		FuShow Friend V3.0				Id: uump.php
		Email <service@fushow.cn>		http://fushow.cn/
*/


//通用文件
include_once('./common.php');
include_once(S_ROOT.'./source/function_cp.php');
include_once(S_ROOT.'./source/function_magic.php');

//允许的方法
$acs = array('doing', 'upload', 'comment', 'blog', 'album', 'relatekw', 'common', 'class','swfupload', 'thread', 'mtag', 'poke', 'friend','avatar','avatarDoctor', 'profile', 'import', 'feed', 'privacy', 'pm', 'share', 'advance', 'invite','sendmail', 'task', 'credit', 'password', 'domain', 'event', 'poll','click','magic', 'top', 'videophoto','live','audio','video','xneedhelp','xhelplist','xinline','xvideo');

$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('uump.php?ac='.$ac));
	}
	showmessage('to_login', 'walk.php?ac='.$_SCONFIG['login_action']);
}

//获取空间信息
$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/uump_'.$ac.'.php');
?>