From fcce945fc19fb00efcc370e2746d643bf520b87b Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 3 May 2013 09:19:05 +0900 Subject: [PATCH] =?UTF-8?q?img=20=ED=83=9C=EA=B7=B8=EC=97=90=20id=20?= =?UTF-8?q?=EC=86=8D=EC=84=B1=20=EC=B6=94=EA=B0=80=20=EB=A3=A8=ED=8B=B4=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/shop.lib.php | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/lib/shop.lib.php b/lib/shop.lib.php index 4eb5a9c21..ef620e915 100644 --- a/lib/shop.lib.php +++ b/lib/shop.lib.php @@ -14,14 +14,11 @@ function get_cart_count($uq_id) } // 이미지를 얻는다 -function get_image($img, $width=0, $height=0, $type='') +function get_image($img, $width=0, $height=0, $img_id='') { global $g4, $default; $full_img = G4_DATA_PATH.'/item/'.$img; - if($type != '') { - $img_id = 'type'.$type.'_'.$img; - } if (file_exists($full_img) && $img) { @@ -31,7 +28,12 @@ function get_image($img, $width=0, $height=0, $type='') $width = $size[0]; $height = $size[1]; } - $str = ''; + $str = ''; + + if($img_id) + $str .= ' id="'.$img_id.'"'. + $str .= '>'; } return $str; } // 상품 이미지를 얻는다 -function get_it_image($img, $width=0, $height=0, $id="", $type='') +function get_it_image($img, $width=0, $height=0, $id='', $img_id='') { - $str = get_image($img, $width, $height, $type); + $str = get_image($img, $width, $height, $img_id); if ($id) { $str = ''.$str.''; }