Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

Commit

Permalink
쇼핑몰 관리권한도 체크하도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
chicpro committed Dec 10, 2015
1 parent afcfea1 commit e07d52a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/common.lib.php
Expand Up @@ -779,13 +779,21 @@ function get_admin($admin='super', $fields='*')
// 관리자인가?
function is_admin($mb_id)
{
global $config, $group, $board;
global $g5, $config, $group, $board;

if (!$mb_id) return;

if ($config['cf_admin'] == $mb_id) return 'super';
if (isset($group['gr_admin']) && ($group['gr_admin'] == $mb_id)) return 'group';
if (isset($board['bo_admin']) && ($board['bo_admin'] == $mb_id)) return 'board';

// 쇼핑몰 관리자인지
if(defined('G5_USE_SHOP') && G5_USE_SHOP) {
$sql = " select count(*) as cnt from {$g5['auth_table']} where mb_id = '$mb_id' and substring(au_menu, 1, 3) IN ('400', '500') ";
$row = sql_fetch($sql);
if($row['cnt'] > 0) return 'shop';
}

return '';
}

Expand Down

0 comments on commit e07d52a

Please sign in to comment.