Merge branch 'master' of github.com:gnuboard/yc4s

This commit is contained in:
gnuboard
2013-09-12 14:27:05 +09:00
19 changed files with 154 additions and 70 deletions

View File

@ -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)
</thead>
<tbody>
<?php
$cp_count = 0;
for($i=0; $row=sql_fetch_array($result); $i++) {
if(is_used_coupon($member['mb_id'], $row['cp_id']))
continue;
if($row['cp_method'] == 1) {
$sql = " select ca_name from {$g4['shop_category_table']} where ca_id = '{$row['cp_target']}' ";
$ca = sql_fetch($sql);
@ -55,6 +54,8 @@ if(!$count)
$cp_price = $row['cp_price'].'%';
else
$cp_price = number_format($row['cp_price']).'원';
$cp_count++;
?>
<tr>
<td><?php echo $row['cp_subject']; ?></td>
@ -64,6 +65,9 @@ if(!$count)
</tr>
<?php
}
if(!$cp_count)
echo '<tr><td colspan="4" class="empty_table">사용할 수 있는 쿠폰이 없습니다.</td></tr>';
?>
</tbody>
</table>

View File

@ -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);
<dt>보유포인트</dt>
<dd><a href="<?php echo G4_BBS_URL; ?>/point.php" target="_blank" class="win_point"><?php echo number_format($member['mb_point']); ?>점</a></dd>
<dt>보유쿠폰</dt>
<dd><a href="<?php echo G4_SHOP_URL; ?>/coupon.php" target="_blank" class="win_coupon"><?php echo number_format($cp['cnt']); ?></a></dd>
<dd><a href="<?php echo G4_SHOP_URL; ?>/coupon.php" target="_blank" class="win_coupon"><?php echo number_format($cp_count); ?></a></dd>
<dt>연락처</dt>
<dd><?php echo ($member['mb_tel'] ? $member['mb_tel'] : '미등록'); ?></dd>
<dt>E-Mail</dt>

View File

@ -41,7 +41,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
</td>
<td><?php echo substr($row['od_time'],0,16); ?> (<?php echo get_yoil($row['od_time']); ?>)</td>
<td class="td_num"><?php echo $row['od_cart_count']; ?></td>
<td class="td_bignum"><?php echo display_price($row['od_cart_price'] + $od['od_send_cost'] + $od['od_send_cost2']); ?></td>
<td class="td_bignum"><?php echo display_price($row['od_cart_price'] + $row['od_send_cost'] + $row['od_send_cost2']); ?></td>
<td class="td_bignum"><?php echo display_price($row['couponprice']); ?></td>
<td class="td_bignum"><?php echo display_price($row['od_receipt_price']); ?></td>
<td class="td_bignum"><?php echo display_price($row['od_misu']); ?></td>