diff --git a/adm/shop_admin/couponlist.php b/adm/shop_admin/couponlist.php index 47e02b52a..575a9a93d 100644 --- a/adm/shop_admin/couponlist.php +++ b/adm/shop_admin/couponlist.php @@ -81,7 +81,6 @@ $colspan = 8;
diff --git a/mobile/shop/mypage.php b/mobile/shop/mypage.php index 5d4701b77..51a500a4f 100644 --- a/mobile/shop/mypage.php +++ b/mobile/shop/mypage.php @@ -8,13 +8,18 @@ $g4['title'] = '마이페이지'; include_once(G4_MSHOP_PATH.'/_head.php'); // 쿠폰 -$sql = " select count(*) as cnt +$cp_count = 0; +$sql = " select cp_id from {$g4['shop_coupon_table']} where mb_id = '{$member['mb_id']}' - and cp_used = '0' and cp_start <= '".G4_TIME_YMD."' and cp_end >= '".G4_TIME_YMD."' "; -$cp = sql_fetch($sql); +$res = sql_query($sql); + +for($k=0; $cp=sql_fetch_array($res); $k++) { + if(!is_used_coupon($member['mb_id'], $cp['cp_id'])) + $cp_count++; +} ?>
@@ -26,7 +31,7 @@ $cp = sql_fetch($sql);
보유포인트
점
보유쿠폰
-
+
연락처
E-Mail
diff --git a/mobile/shop/orderformupdate.php b/mobile/shop/orderformupdate.php index 3a388d1e6..825ac0b1d 100644 --- a/mobile/shop/orderformupdate.php +++ b/mobile/shop/orderformupdate.php @@ -151,10 +151,9 @@ if($is_member) { $sql = " select cp_id, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum from {$g4['shop_coupon_table']} where cp_id = '{$_POST['od_cp_id']}' - and mb_id = '{$member['mb_id']}' + and mb_id IN ( '{$member['mb_id']}', '전체회원' ) and cp_start <= '".G4_TIME_YMD."' and cp_end >= '".G4_TIME_YMD."' - and cp_used = '0' and cp_method = '2' "; $cp = sql_fetch($sql); @@ -197,10 +196,9 @@ if($is_member && $send_cost > 0) { $sql = " select cp_id, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum from {$g4['shop_coupon_table']} where cp_id = '{$_POST['sc_cp_id']}' - and mb_id = '{$member['mb_id']}' + and mb_id IN ( '{$member['mb_id']}', '전체회원' ) and cp_start <= '".G4_TIME_YMD."' and cp_end >= '".G4_TIME_YMD."' - and cp_used = '0' and cp_method = '3' "; $cp = sql_fetch($sql); diff --git a/shop/coupon.php b/shop/coupon.php index 0c0267a35..002c32085 100644 --- a/shop/coupon.php +++ b/shop/coupon.php @@ -10,15 +10,10 @@ include_once(G4_PATH.'/head.sub.php'); $sql = " select cp_id, cp_subject, cp_method, cp_target, cp_start, cp_end, cp_type, cp_price from {$g4['shop_coupon_table']} where mb_id = '{$member['mb_id']}' - and cp_used = '0' and cp_start <= '".G4_TIME_YMD."' and cp_end >= '".G4_TIME_YMD."' order by cp_no "; $result = sql_query($sql); - -$count = @mysql_num_rows($result); -if(!$count) - alert_close('보유하신 쿠폰이 없습니다.'); ?> @@ -36,7 +31,11 @@ if(!$count) @@ -64,6 +65,9 @@ if(!$count) 사용할 수 있는 쿠폰이 없습니다.'; ?> diff --git a/shop/mypage.php b/shop/mypage.php index 2bc3f5008..ead01790c 100644 --- a/shop/mypage.php +++ b/shop/mypage.php @@ -12,17 +12,19 @@ if (!$is_member) $g4['title'] = $member['mb_name'].'님 마이페이지'; include_once('./_head.php'); -//$str = $g4[title]; -//include("./navigation2.inc.php"); - // 쿠폰 -$sql = " select count(*) as cnt +$cp_count = 0; +$sql = " select cp_id from {$g4['shop_coupon_table']} where mb_id = '{$member['mb_id']}' - and cp_used = '0' and cp_start <= '".G4_TIME_YMD."' and cp_end >= '".G4_TIME_YMD."' "; -$cp = sql_fetch($sql); +$res = sql_query($sql); + +for($k=0; $cp=sql_fetch_array($res); $k++) { + if(!is_used_coupon($member['mb_id'], $cp['cp_id'])) + $cp_count++; +} ?> @@ -45,7 +47,7 @@ $cp = sql_fetch($sql);
보유포인트
점
보유쿠폰
-
+
연락처
E-Mail