From 01bcac7f0af9e8baee215031f26a4b272ed4b07c Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 29 Nov 2013 14:57:32 +0900 Subject: [PATCH 1/7] =?UTF-8?q?=EC=8D=B8=EB=84=A4=EC=9D=BC=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=EC=8B=9C=20exif=20=EC=A0=95=EB=B3=B4=EB=A5=BC=20?= =?UTF-8?q?=EB=B0=98=EC=98=81=ED=95=B4=20=ED=9A=8C=EC=A0=84=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/thumbnail.lib.php | 57 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/lib/thumbnail.lib.php b/lib/thumbnail.lib.php index 337b92d42..2884b3aee 100644 --- a/lib/thumbnail.lib.php +++ b/lib/thumbnail.lib.php @@ -103,11 +103,36 @@ function get_view_thumbnail($contents, $thumb_width=0) $srcfile = G5_PATH.$data_path; if(is_file($srcfile)) { - // 썸네일 높이 $size = @getimagesize($srcfile); if(empty($size)) continue; + // jpg 이면 exif 체크 + if($size[2] == 2) { + $degree = 0; + $exif = exif_read_data($srcfile); + if(!empty($exif['Orientation'])) { + switch($exif['Orientation']) { + case 8: + $degree = 90; + break; + case 3: + $degree = 180; + break; + case 6: + $degree = -90; + break; + } + + // 세로사진의 경우 가로, 세로 값 바꿈 + if($degree == 90 || $degree == -90) { + $tmp = $size; + $size[0] = $tmp[1]; + $size[1] = $tmp[0]; + } + } + } + // 원본 width가 thumb_width보다 작다면 if($size[0] <= $thumb_width) continue; @@ -118,6 +143,7 @@ function get_view_thumbnail($contents, $thumb_width=0) $is_animated = is_animated_gif($srcfile); } + // 썸네일 높이 $thumb_height = round(($thumb_width * $size[1]) / $size[0]); $filename = basename($srcfile); $filepath = dirname($srcfile); @@ -186,10 +212,39 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h // 원본파일의 GD 이미지 생성 $src = null; + $degree = 0; + if ($size[2] == 1) { $src = imagecreatefromgif($source_file); } else if ($size[2] == 2) { $src = imagecreatefromjpeg($source_file); + // exif 정보를 기준으로 회전각도 구함 + $exif = exif_read_data($source_file); + if(!empty($exif['Orientation'])) { + switch($exif['Orientation']) { + case 8: + $degree = 90; + break; + case 3: + $degree = 180; + break; + case 6: + $degree = -90; + break; + } + + // 회전각도 있으면 이미지 회전 + if($degree) { + $src = imagerotate($src, $degree, 0); + + // 세로사진의 경우 가로, 세로 값 바꿈 + if($degree == 90 || $degree == -90) { + $tmp = $size; + $size[0] = $tmp[1]; + $size[1] = $tmp[0]; + } + } + } } else if ($size[2] == 3) { $src = imagecreatefrompng($source_file); } else { From 616d27ea302ad39b5db5e142b63f237799a353b4 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 29 Nov 2013 16:33:12 +0900 Subject: [PATCH 2/7] =?UTF-8?q?=EA=B2=80=EC=83=89=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EA=B8=B0=EA=B0=84=EC=84=A4=EC=A0=95=EC=97=90=20datepicker=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/itemsellrank.php | 48 ++++++++++++++++++++++----------- adm/shop_admin/orderprint.php | 13 ++++++--- adm/shop_admin/sale1.php | 28 ++++++++++++++----- adm/shop_admin/wishlist.php | 20 +++++++++++--- 4 files changed, 79 insertions(+), 30 deletions(-) diff --git a/adm/shop_admin/itemsellrank.php b/adm/shop_admin/itemsellrank.php index 3daf151cb..a4cebc984 100644 --- a/adm/shop_admin/itemsellrank.php +++ b/adm/shop_admin/itemsellrank.php @@ -1,6 +1,7 @@ 전체목록시작일 - 에서 + 에서 - 까지 + 까지 @@ -109,12 +111,13 @@ $listall = '전체목록상품평 ">쇼핑 ">주문 - ">준비 - ">배송 - ">완료 - ">취소 - ">반품 - ">품절 + ">입금 + ">준비 + ">배송 + ">완료 + ">취소 + ">반품 + ">품절 ">합계 @@ -130,7 +133,7 @@ $listall = '전체목록 - + @@ -139,13 +142,14 @@ $listall = '전체목록 + 자료가 없습니다.'; + echo '자료가 없습니다.'; } ?> @@ -154,6 +158,18 @@ $listall = '전체목록 + 전체 - " id="fr_date" class="frm_input" size="10" maxlength="8"> + " id="fr_date" required class="required frm_input" size="10" maxlength="8"> ~ - " id="to_date" class="frm_input" size="10" maxlength="8"> + " id="to_date" required class="required frm_input" size="10" maxlength="8"> @@ -64,10 +65,10 @@ include_once (G5_ADMIN_PATH.'/admin.head.php'); - + ~ - + @@ -84,6 +85,10 @@ include_once (G5_ADMIN_PATH.'/admin.head.php'); + diff --git a/adm/shop_admin/wishlist.php b/adm/shop_admin/wishlist.php index 8a978ee94..0fce73b0a 100644 --- a/adm/shop_admin/wishlist.php +++ b/adm/shop_admin/wishlist.php @@ -1,6 +1,7 @@ 전체목록 - + ~ - + @@ -108,7 +109,7 @@ $listall = '전체목록"> - + @@ -129,6 +130,19 @@ $listall = '전체목록고객님들이 보관함에 가장 많이 넣은 순으로 순위를 출력합니다.

+ + From 213752955559d7a3090957ed58e71bbe7809dd18 Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 2 Dec 2013 08:51:52 +0900 Subject: [PATCH 3/7] =?UTF-8?q?exif=20=EC=A0=95=EB=B3=B4=EB=A5=BC=20?= =?UTF-8?q?=EB=B0=94=ED=83=95=EC=9C=BC=EB=A1=9C=20=ED=95=9C=20=EC=9D=B4?= =?UTF-8?q?=EB=AF=B8=EC=A7=80=20=ED=9A=8C=EC=A0=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/thumbnail.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/thumbnail.lib.php b/lib/thumbnail.lib.php index 2884b3aee..3b4b97fd9 100644 --- a/lib/thumbnail.lib.php +++ b/lib/thumbnail.lib.php @@ -110,7 +110,7 @@ function get_view_thumbnail($contents, $thumb_width=0) // jpg 이면 exif 체크 if($size[2] == 2) { $degree = 0; - $exif = exif_read_data($srcfile); + $exif = @exif_read_data($srcfile); if(!empty($exif['Orientation'])) { switch($exif['Orientation']) { case 8: @@ -219,7 +219,7 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h } else if ($size[2] == 2) { $src = imagecreatefromjpeg($source_file); // exif 정보를 기준으로 회전각도 구함 - $exif = exif_read_data($source_file); + $exif = @exif_read_data($source_file); if(!empty($exif['Orientation'])) { switch($exif['Orientation']) { case 8: From 417fbba65b10dc95d751536eafcc14a71443d06f Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 2 Dec 2013 10:26:46 +0900 Subject: [PATCH 4/7] =?UTF-8?q?=EA=B4=80=EB=A6=AC=EC=9E=90=20=EC=83=81?= =?UTF-8?q?=ED=92=88=EC=88=98=EC=A0=95=EC=97=90=EC=84=9C=20=EC=83=81?= =?UTF-8?q?=ED=92=88=EB=AC=B8=EC=9D=98=20=EB=A7=81=ED=81=AC=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/itemform.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adm/shop_admin/itemform.php b/adm/shop_admin/itemform.php index 94aa3990e..b66c61f0c 100644 --- a/adm/shop_admin/itemform.php +++ b/adm/shop_admin/itemform.php @@ -195,7 +195,7 @@ $pg_anchor ='