|
|
@ -2472,7 +2472,7 @@ function getAvailableBalance($promote_id=0,$game_id=0,$server_id='') {
|
|
|
|
|
|
|
|
|
|
|
|
function getMarketGroupIds()
|
|
|
|
function getMarketGroupIds()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return ['11', '12'];
|
|
|
|
return M('auth_group', 'sys_')->where(['title' => ['like', '%市场专员%']])->getField('id', true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function getAdmins()
|
|
|
|
function getAdmins()
|
|
|
@ -2483,6 +2483,9 @@ function getAdmins()
|
|
|
|
function getMarketAdmins()
|
|
|
|
function getMarketAdmins()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$ids = getMarketGroupIds();
|
|
|
|
$ids = getMarketGroupIds();
|
|
|
|
|
|
|
|
if (count($ids) == 0) {
|
|
|
|
|
|
|
|
return [];
|
|
|
|
|
|
|
|
}
|
|
|
|
$adminIds = M('auth_group_access', 'sys_')->where(['group_id' => ['in', $ids]])->getField('uid', true);
|
|
|
|
$adminIds = M('auth_group_access', 'sys_')->where(['group_id' => ['in', $ids]])->getField('uid', true);
|
|
|
|
return M('ucenter_member', 'sys_')->where(['id' => ['in', $adminIds]])->select();
|
|
|
|
return M('ucenter_member', 'sys_')->where(['id' => ['in', $adminIds]])->select();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -2547,6 +2550,9 @@ function isMarketLeader()
|
|
|
|
function isMarketAdmin()
|
|
|
|
function isMarketAdmin()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$ids = getMarketGroupIds();
|
|
|
|
$ids = getMarketGroupIds();
|
|
|
|
|
|
|
|
if (count($ids) == 0) {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
$userAuth = session('user_auth');
|
|
|
|
$userAuth = session('user_auth');
|
|
|
|
$adminIds = M('auth_group_access', 'sys_')->where(['group_id' => ['in', $ids]])->getField('uid', true);
|
|
|
|
$adminIds = M('auth_group_access', 'sys_')->where(['group_id' => ['in', $ids]])->getField('uid', true);
|
|
|
|
return in_array($userAuth['uid'], $adminIds);
|
|
|
|
return in_array($userAuth['uid'], $adminIds);
|
|
|
|