From 12b9a4fe052a9a261e99de48d389578c104e830d Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 7 Mar 2014 16:48:41 +0900 Subject: [PATCH] =?UTF-8?q?=EC=82=AC=EC=9A=A9=ED=9B=84=EA=B8=B0=20?= =?UTF-8?q?=EC=A3=BC=EB=AC=B8=EC=99=84=EB=A3=8C=20=EC=B2=B4=ED=81=AC=20?= =?UTF-8?q?=EB=A3=A8=ED=8B=B4=20=EC=98=A4=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 --- lib/shop.lib.php | 4 ++-- mobile/shop/itemuseform.php | 6 +++--- shop/itemuseform.php | 6 +++--- shop/itemuseformupdate.php | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/shop.lib.php b/lib/shop.lib.php index 5e5e7e280..ae935adcf 100644 --- a/lib/shop.lib.php +++ b/lib/shop.lib.php @@ -1873,7 +1873,7 @@ function is_soldout($it_id) } // 상품후기 작성가능한지 체크 -function check_itemuse_write($close=true) +function check_itemuse_write($it_id, $mb_id, $close=true) { global $g5, $default, $is_admin; @@ -1882,7 +1882,7 @@ function check_itemuse_write($close=true) $sql = " select count(*) as cnt from {$g5['g5_shop_cart_table']} where it_id = '$it_id' - and mb_id = '{$member['mb_id']}' + and mb_id = '$mb_id' and ct_status = '완료' "; $row = sql_fetch($sql); diff --git a/mobile/shop/itemuseform.php b/mobile/shop/itemuseform.php index 5a77f01c5..88f88c0be 100644 --- a/mobile/shop/itemuseform.php +++ b/mobile/shop/itemuseform.php @@ -10,11 +10,11 @@ $w = trim($_REQUEST['w']); $it_id = trim($_REQUEST['it_id']); $is_id = trim($_REQUEST['is_id']); -// 사용후기 작성 설정에 따른 체크 -check_itemuse_write(); - if ($w == "") { $is_score = 5; + + // 사용후기 작성 설정에 따른 체크 + check_itemuse_write($it_id, $member['mb_id']); } else if ($w == "u") { $use = sql_fetch(" select * from {$g5['g5_shop_item_use_table']} where is_id = '$is_id' "); if (!$use) { diff --git a/shop/itemuseform.php b/shop/itemuseform.php index d47f7b0d0..ad2366603 100644 --- a/shop/itemuseform.php +++ b/shop/itemuseform.php @@ -16,11 +16,11 @@ $w = trim($_REQUEST['w']); $it_id = trim($_REQUEST['it_id']); $is_id = trim($_REQUEST['is_id']); -// 사용후기 작성 설정에 따른 체크 -check_itemuse_write(); - if ($w == "") { $is_score = 5; + + // 사용후기 작성 설정에 따른 체크 + check_itemuse_write($it_id, $member['mb_id']); } else if ($w == "u") { $use = sql_fetch(" select * from {$g5['g5_shop_item_use_table']} where is_id = '$is_id' "); if (!$use) { diff --git a/shop/itemuseformupdate.php b/shop/itemuseformupdate.php index 0686fe4d1..642330d2a 100644 --- a/shop/itemuseformupdate.php +++ b/shop/itemuseformupdate.php @@ -5,9 +5,6 @@ if (!$is_member) { alert_close("사용후기는 회원만 작성이 가능합니다."); } -// 사용후기 작성 설정에 따른 체크 -check_itemuse_write(); - $it_id = trim($_REQUEST['it_id']); $is_subject = trim($_POST['is_subject']); $is_content = trim($_POST['is_content']); @@ -15,6 +12,9 @@ $is_name = trim($_POST['is_name']); $is_password = trim($_POST['is_password']); $is_score = (int)$_POST['is_score'] > 5 ? 0 : (int)$_POST['is_score']; +// 사용후기 작성 설정에 따른 체크 +check_itemuse_write($it_id, $member['mb_id']); + if ($w == "" || $w == "u") { $is_name = $member['mb_name']; $is_password = $member['mb_password'];