-
-
-
+
+
+
- 추가금액 재고수량 통보수량
- 사용여부
+ 추가금액 재고수량 통보수량
+ 사용여부
선택
Y
N
@@ -45,7 +45,7 @@ if(!$makemode) {
-
+
추가옵션명
추가옵션항목
추가금액
@@ -61,7 +61,7 @@ if($option_count) {
$str .= ' ';
$sp_id = $list[$i]['sp_id'];
- $str .= ' ';
+ $str .= ' ';
if(trim($opt[0]) && trim($opt[1])) {
$str .= '' . $opt[0] . ' ';
@@ -76,10 +76,10 @@ if($option_count) {
$sp_use0 = ' selected="selected"';
}
- $str .= ' ';
- $str .= ' ';
- $str .= ' ';
- $str .= 'Y N ';
+ $str .= ' ';
+ $str .= ' ';
+ $str .= ' ';
+ $str .= 'Y N ';
$str .= ' ';
}
} else {
@@ -94,13 +94,13 @@ if($option_count) {
for($k = 0; $k < $sp_opt_count; $k++) {
$sp_id = $sp_subj . chr(30) . $sp_opt[$k];
- $str .= ' ';
+ $str .= ' ';
$str .= '' . $sp_subj . ' ';
$str .= '' . $sp_opt[$k] . ' ';
- $str .= ' ';
- $str .= ' ';
- $str .= ' ';
- $str .= 'Y N ';
+ $str .= ' ';
+ $str .= ' ';
+ $str .= ' ';
+ $str .= 'Y N ';
$str .= '';
}
}
@@ -119,7 +119,7 @@ echo $str;
\ No newline at end of file
diff --git a/js/common.js b/js/common.js
index bdcf69845..bf3ca0000 100644
--- a/js/common.js
+++ b/js/common.js
@@ -432,6 +432,12 @@ function doc_write(cont)
document.write(cont);
}
+// php chr() 대응
+function chr(code)
+{
+ return String.fromCharCode(code);
+}
+
var win_password_lost = function(href) {
window.open(href, "win_password_lost", "left=50, top=50, width=617, height=330, scrollbars=1");
}
diff --git a/lib/shop.lib.php b/lib/shop.lib.php
index 2493d66d3..c79066e3d 100644
--- a/lib/shop.lib.php
+++ b/lib/shop.lib.php
@@ -143,27 +143,42 @@ function get_image($img, $width=0, $height=0)
}
// 상품 이미지를 얻는다
-function get_it_image($dir, $img, $width, $height, $it_id="", $class="", $thumbnail=true)
+function get_it_image($it_id, $width, $height, $id="", $thumbnail=true)
{
+ global $g4;
+
if($thumbnail && !$width)
return "";
- $src = G4_DATA_URL.'/item/'.$dir.'/'.$img;
+ $sql = " select it_id, it_img1, it_img2, it_img3, it_img4, it_img5, it_img6, it_img7, it_img8, it_img9, it_img10
+ from {$g4['yc4_item_table']}
+ where it_id = '$it_id' ";
+ $row = sql_fetch($sql);
- if($thumbnail) {
- $filepath = G4_DATA_PATH.'/item/'.$dir;
+ if(!$row['it_id'])
+ return "";
- if(file_exists($filepath.'/'.$img) && is_file($filepath.'/'.$img)) {
- $src = G4_DATA_URL.'/item/'.$dir.'/'.it_img_thumb($img, $filepath, $width, $height);
+ $filepath = G4_DATA_PATH.'/item/'.$row['it_id'];
+ $filename = "";
+ for($k=1; $k<=10; $k++) {
+ $idx = 'it_img'.$k;
+ if(file_exists($filepath.'/'.$row[$idx]) && is_file($filepath.'/'.$row[$idx])) {
+ $filename = $row[$idx];
+ break;
}
}
- $str = " ";
+
+ if ($id) {
$str = "$str ";
}
@@ -610,7 +625,7 @@ function get_supplement_subject($it_id)
// 추가옵션명
$subject = array();
for($i = 0; $row = sql_fetch_array($result); $i++) {
- $str = explode('|*|', $row['sp_id']);
+ $str = explode(chr(30), $row['sp_id']);
if(!in_array($str[0], $subject)) {
array_push($subject, $str[0]);
@@ -637,7 +652,7 @@ function get_supplement_option($it_id, $sp_id, $index)
$str = ''."\n";
$str .= '선택 '."\n";
for($i = 0; $row = sql_fetch_array($result); $i++) {
- $opt = str_replace($sp_id.'|*|', '', $row['sp_id']);
+ $opt = str_replace($sp_id.chr(30), '', $row['sp_id']);
if($opt) {
if($row['sp_amount']) {
$info = ' (+'.number_format($row['sp_amount']).'원)';
diff --git a/shop/boxtodayview.inc.php b/shop/boxtodayview.inc.php
index 826fe9880..ffc4dfa6c 100644
--- a/shop/boxtodayview.inc.php
+++ b/shop/boxtodayview.inc.php
@@ -66,7 +66,7 @@ for ($i=1; $i<=$tv_idx; $i++)
if(file_exists($tv_filepath.'/'.$tv_filename) && $tv_filename != "")
break;
}
- $img = get_it_image($tv_it_id, $tv_filename, $tv_div['img_width'], $tv_div['img_height'], $tv_it_id);
+ $img = get_it_image($tv_it_id, $tv_div['img_width'], $tv_div['img_height'], $tv_it_id);
$img = str_replace("\"", "\\\"", $img);
$img = preg_replace("/\".cut_str($it_name,10,"")." \";\n";
diff --git a/shop/cartsub.inc.php b/shop/cartsub.inc.php
index d01a2a55e..f9ae7d8e0 100644
--- a/shop/cartsub.inc.php
+++ b/shop/cartsub.inc.php
@@ -1,5 +1,6 @@
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
+include_once(G4_LIB_PATH.'/thumbnail.lib.php');
/*
$s_page 는 cart.php 일때 수량의 수정, 물품의 삭제를 위한 변수이다.
@@ -88,17 +89,7 @@ $sql = " select a.ct_id,
b.it_option_use,
b.it_supplement_use,
b.it_nocoupon,
- b.it_notax,
- b.it_img1,
- b.it_img2,
- b.it_img3,
- b.it_img4,
- b.it_img5,
- b.it_img6,
- b.it_img7,
- b.it_img8,
- b.it_img9,
- b.it_img10
+ b.it_notax
from {$g4['yc4_cart_table']} as a left join {$g4['yc4_item_table']} as b on ( a.it_id = b.it_id )
where $sql_where
and a.ct_parent = '0'
@@ -156,24 +147,14 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
$continue_ca_id = $row['ca_id'];
}
- // 리스트 썸네일 이미지
- $filepath = G4_DATA_PATH.'/item/'.$row['it_id'];
- for($k=1; $k<=10; $k++) {
- $idx = 'it_img'.$k;
- if(file_exists($filepath.'/'.$row[$idx]) && is_file($filepath.'/'.$row[$idx])) {
- $filename = $row[$idx];
- break;
- }
- }
-
if ($s_page == "cart.php" || $s_page == "orderinquiryview.php") { // 링크를 붙이고
$a1 = "";
$a2 = " ";
- $image = get_it_image($row['it_id'], $filename, 50, 50, $row['it_id']);
+ $image = get_it_image($row['it_id'], 50, 50, $row['it_id']);
} else { // 붙이지 않고
$a1 = "";
$a2 = "";
- $image = get_it_image($row['it_id'], $filename, 50, 50);
+ $image = get_it_image($row['it_id'], 50, 50);
}
$it_name = $a1 . stripslashes($row['it_name']) . $a2 . ' ';
diff --git a/shop/item.php b/shop/item.php
index 41baf541a..73b2339d2 100644
--- a/shop/item.php
+++ b/shop/item.php
@@ -188,7 +188,7 @@ else
- =get_large_image($filename, $it['it_id'], false)?>=get_it_image($it['it_id'], $filename, $default['de_mimg_width'], $default['de_mimg_height']);?>
+ =get_large_image($filename, $it['it_id'], false)?>=get_it_image($it['it_id'], $default['de_mimg_width'], $default['de_mimg_height']);?>
@@ -200,8 +200,8 @@ else
if (file_exists($filepath.'/'.$filename) && $filename != "")
{
echo get_large_image($filename, $it['it_id'], false);
- echo get_it_image($it['it_id'], $filename, 40, 40, "", "item_view_thumbnail");
- echo " ";
+ echo " ";
+ echo " ";
}
}
?>
@@ -944,7 +944,7 @@ function optionDisplay()
optioncontent += " ";
optioncontent += " ";
optioncontent += " ";
- optioncontent += "" + data.qty + " ";
+ optioncontent += "" + data.qty + " ";
optioncontent += "" + option + " ";
optioncontent += " (+" + number_format(String(data.amount)) + "원) ";
optioncontent += " ";
diff --git a/shop/largeimage.php b/shop/largeimage.php
index 253667d11..fd3e756a3 100644
--- a/shop/largeimage.php
+++ b/shop/largeimage.php
@@ -26,9 +26,12 @@ include_once(G4_PATH.'/head.sub.php');
for ($i=1; $i<=10; $i++)
{
+ $filepath = G4_DATA_PATH.'/item/'.$it_id;
$filename = $row['it_img'.$i];
- if (file_exists(G4_DATA_PATH."/item/{$it_id}/{$filename}") && $filename != "")
- echo get_it_image($it_id, $filename, 50, 50, "", "image_thumbnail")." ";
+ if (file_exists($filepath.'/'.$filename) && $filename != "") {
+ echo " ";
+ echo " ";
+ }
}
?>
diff --git a/shop/list.skin.10.php b/shop/list.skin.10.php
index 5b5ca33fc..a6825a733 100644
--- a/shop/list.skin.10.php
+++ b/shop/list.skin.10.php
@@ -14,21 +14,11 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
echo " \n";
}
- // 리스트 썸네일 이미지
- $filepath = G4_DATA_PATH.'/item/'.$row['it_id'];
- for($k=1; $k<=10; $k++) {
- $idx = 'it_img'.$k;
- if(file_exists($filepath.'/'.$row[$idx]) && is_file($filepath.'/'.$row[$idx])) {
- $filename = $row[$idx];
- break;
- }
- }
-
echo "
- ".get_it_image($row['it_id'], $filename, $img_width , $img_height, $row['it_id'])."
+ ".get_it_image($row['it_id'], $img_width , $img_height, $row['it_id'])."
".it_name_icon($row)." ";
if ($row[it_cust_amount] && !$row[it_gallery])
diff --git a/shop/maintype10.inc.php b/shop/maintype10.inc.php
index ce92bc797..ef42540a6 100644
--- a/shop/maintype10.inc.php
+++ b/shop/maintype10.inc.php
@@ -11,21 +11,11 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
}
$href = "";
-
- // 리스트 썸네일 이미지
- $filepath = G4_DATA_PATH.'/item/'.$row['it_id'];
- for($k=1; $k<=10; $k++) {
- $idx = 'it_img'.$k;
- if(file_exists($filepath.'/'.$row[$idx]) && is_file($filepath.'/'.$row[$idx])) {
- $filename = $row[$idx];
- break;
- }
- }
?>
- =$href?>=get_it_image($row['it_id'], $filename, $img_width, $img_height)?>
+ =$href?>=get_it_image($row['it_id'], $img_width, $img_height)?>
=$href?>=stripslashes($row['it_name'])?>
=display_amount(get_amount($row), $row['it_tel_inq'])?>
diff --git a/shop/settle_kcp.inc.php b/shop/settle_kcp.inc.php
index f96e944bb..d6b9d5d80 100644
--- a/shop/settle_kcp.inc.php
+++ b/shop/settle_kcp.inc.php
@@ -3,11 +3,6 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$test = "";
-<<<<<<< HEAD
-$default['de_card_test'] = 1;
-$default['de_escrow_use'] = 1;
-=======
->>>>>>> a811b2f9cff6268823ba4ef76b9e57769cf04bc6
if ($default['de_card_test']) {
if ($default['de_escrow_use'] == 1) {
// 에스크로결제 테스트
diff --git a/shop/settle_kcp_common.php b/shop/settle_kcp_common.php
index e9cabc590..358800857 100644
--- a/shop/settle_kcp_common.php
+++ b/shop/settle_kcp_common.php
@@ -16,25 +16,25 @@ fclose($fp);
REMOTE ADDRESS 체크를 하여, 아래의 IP 이외의 다른 경로를 통해서 전송된
데이터에 대해서는 결과처리를 하지 마시기 바랍니다.
------------------------------------------------------------------------------*/
-/*
-switch ($_SERVER['REMOTE_ADDR']) {
- case '203.238.36.58' :
- case '203.238.36.160' :
- case '203.238.36.161' :
- case '203.238.36.173' :
- case '203.238.36.178' :
- break;
- default :
- $super_admin = get_admin('super');
- $egpcs_str = "ENV[" . serialize($_ENV) . "] "
- . "GET[" . serialize($_GET) . "]"
- . "POST[" . serialize($_POST) . "]"
- . "COOKIE[" . serialize($_COOKIE) . "]"
- . "SESSION[" . serialize($_SESSION) . "]";
- mailer('경고', 'waring', $super_admin['mb_email'], '올바르지 않은 접속 보고', $_SERVER['PHP_SELF'].' 에 '.$_SERVER['REMOTE_ADDR'].' 이 '.$g4['time_ymdhis'].' 에 접속을 시도하였습니다.'."\n\n" . $egpcs_str, 2);
- exit;
+if(!$default['de_card_test']) {
+ switch ($_SERVER['REMOTE_ADDR']) {
+ case '203.238.36.58' :
+ case '203.238.36.160' :
+ case '203.238.36.161' :
+ case '203.238.36.173' :
+ case '203.238.36.178' :
+ break;
+ default :
+ $super_admin = get_admin('super');
+ $egpcs_str = "ENV[" . serialize($_ENV) . "] "
+ . "GET[" . serialize($_GET) . "]"
+ . "POST[" . serialize($_POST) . "]"
+ . "COOKIE[" . serialize($_COOKIE) . "]"
+ . "SESSION[" . serialize($_SESSION) . "]";
+ mailer('경고', 'waring', $super_admin['mb_email'], '올바르지 않은 접속 보고', $_SERVER['PHP_SELF'].' 에 '.$_SERVER['REMOTE_ADDR'].' 이 '.$g4['time_ymdhis'].' 에 접속을 시도하였습니다.'."\n\n" . $egpcs_str, 2);
+ exit;
+ }
}
-*/
/* ============================================================================== */
/* = PAGE : 공통 통보 PAGE = */