forked from devsam/core
아이콘, 게임 이미지 경로를 일괄 지정 가능하도록 변경
This commit is contained in:
@@ -12,16 +12,21 @@ $db = RootDB::db();
|
||||
$member = $db->queryFirstRow('SELECT `id`, `name`, `grade`, `picture` FROM `MEMBER` WHERE `NO` = %i', $userID);
|
||||
|
||||
if(!$member['picture']){
|
||||
$picture = IMAGE.'/default.jpg';
|
||||
$picture = ServConfig::$sharedIconPath.'/default.jpg';
|
||||
}
|
||||
else{
|
||||
$picture = $member['picture'];
|
||||
if(strlen($picture) > 11){
|
||||
$picture = substr($picture, 0, -10);
|
||||
}
|
||||
$picture = '../d_pic/'.$picture;
|
||||
if(!file_exists($picture)){
|
||||
$picture = IMAGE.'/'.$picture;
|
||||
|
||||
$pictureFSPath = AppConf::getUserIconPathFS().'/'.$picture;
|
||||
|
||||
if(file_exists($pictureFSPath)){
|
||||
$picture = AppConf::getUserIconPathWeb().'/'.$picture;
|
||||
}
|
||||
else{
|
||||
$picture = ServConfig::$sharedIconPath.'/'.$picture;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@ foreach($db->query('SELECT member.*, max(member_log.date) as loginDate from memb
|
||||
group by member.no order by member.no asc') as $member){
|
||||
|
||||
if($member['IMGSVR']){
|
||||
$icon = RootDB::getServerBasepath().'/d_pic/'.$member['PICTURE'];
|
||||
$icon = AppConf::getUserIconPathWeb().'/'.$member['PICTURE'];
|
||||
}
|
||||
else{
|
||||
$icon = IMAGE.'/'.$member['PICTURE'];
|
||||
$icon = ServConfig::$sharedIconPath.'/'.$member['PICTURE'];
|
||||
}
|
||||
|
||||
$userList[] = [
|
||||
|
||||
@@ -20,7 +20,7 @@ else{
|
||||
$dt = '00000000';
|
||||
}
|
||||
|
||||
$dest = ROOT.'/d_pic/'.$picName;
|
||||
$dest = AppConf::getUserIconPathFS().'/'.$picName;
|
||||
|
||||
$rf = date('Ymd');
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ if($action == 'scrub_icon'){
|
||||
|
||||
$cnt = 0;
|
||||
|
||||
foreach(glob(__DIR__.'/../d_pic/*.{jpg,png,gif}', GLOB_BRACE) as $filepath){
|
||||
foreach(glob(AppConf::getUserIconPathFS().'/*.{jpg,png,gif}', GLOB_BRACE) as $filepath){
|
||||
$filename = basename($filepath);
|
||||
|
||||
if (array_key_exists($filename, $usedIcon)) {
|
||||
|
||||
Reference in New Issue
Block a user