From 05b40efddf00d63736652ae120819c1b0a8b9cb7 Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 25 Sep 2014 16:59:06 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=EA=B4=80=EB=A6=AC=EC=9E=90=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EC=9D=B8=20=EC=95=8C=EB=A6=BC=20=ED=9B=84=20=EC=9D=B4?= =?UTF-8?q?=EB=8F=99=EA=B2=BD=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/admin.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adm/admin.lib.php b/adm/admin.lib.php index 061f7992d..53410238e 100644 --- a/adm/admin.lib.php +++ b/adm/admin.lib.php @@ -192,7 +192,7 @@ function order_select($fld, $sel='') if (!$member['mb_id']) { //alert('로그인 하십시오.', '$g5['bbs_path']/login.php?url=' . urlencode('$_SERVER['PHP_SELF']?w=$w&mb_id=$mb_id')); - alert('로그인 하십시오.', G5_BBS_URL.'/login.php?url=' . urlencode($_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'])); + alert('로그인 하십시오.', G5_BBS_URL.'/login.php?url=' . urlencode(G5_ADMIN_URL)); } else if ($is_admin != 'super') { From 51c3f8a378607a2fd190af64bce05e07254cb691 Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 25 Sep 2014 17:00:32 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=ED=88=AC=EB=AA=85=20gif=20=EC=8D=B8?= =?UTF-8?q?=EB=84=A4=EC=9D=BC=20=EC=83=9D=EC=84=B1=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/thumbnail.lib.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/thumbnail.lib.php b/lib/thumbnail.lib.php index 50d7b0d2f..b9a5c4abf 100644 --- a/lib/thumbnail.lib.php +++ b/lib/thumbnail.lib.php @@ -235,6 +235,7 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h if ($size[2] == 1) { $src = imagecreatefromgif($source_file); + $src_transparency = imagecolortransparent($src); } else if ($size[2] == 2) { $src = imagecreatefromjpeg($source_file); @@ -332,9 +333,15 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h if($size[2] == 3) { imagealphablending($dst, false); imagesavealpha($dst, true); + } else if($size[2] == 1 && $src_transparency != -1) { + $transparent_color = imagecolorsforindex($src, $src_transparency); + $current_transparent = imagecolorallocate($dst, $transparent_color['red'], $transparent_color['green'], $transparent_color['blue']); + imagefill($dst, 0, 0, $current_transparent); + imagecolortransparent($dst, $current_transparent); } } else { $dst = imagecreatetruecolor($dst_w, $dst_h); + $bgcolor = imagecolorallocate($dst, 255, 255, 255); // 배경색 if($src_w < $dst_w) { if($src_h >= $dst_h) { @@ -359,8 +366,16 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h imagefill($dst, 0, 0, $bgcolor); imagealphablending($dst, false); imagesavealpha($dst, true); + } else if($size[2] == 1) { + if($src_transparency != -1) { + $transparent_color = imagecolorsforindex($src, $src_transparency); + $current_transparent = imagecolorallocate($dst, $transparent_color['red'], $transparent_color['green'], $transparent_color['blue']); + imagefill($dst, 0, 0, $current_transparent); + imagecolortransparent($dst, $current_transparent); + } else { + imagefill($dst, 0, 0, $bgcolor); + } } else { - $bgcolor = imagecolorallocate($dst, 255, 255, 255); // 배경색 imagefill($dst, 0, 0, $bgcolor); } }