Merge branch 'master' of github.com:gnuboard/yc4s
This commit is contained in:
@ -37,7 +37,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="smb_my_od">
|
<section id="smb_my_od">
|
||||||
<h2><a href="<?php echo G4_MSHOP_URL; ?>/orderinquiry.php">최근 주문내역</a></h2>
|
<h2><a href="<?php echo G4_SHOP_URL; ?>/orderinquiry.php">최근 주문내역</a></h2>
|
||||||
<?php
|
<?php
|
||||||
// 최근 주문내역
|
// 최근 주문내역
|
||||||
define("_ORDERINQUIRY_", true);
|
define("_ORDERINQUIRY_", true);
|
||||||
@ -48,7 +48,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="smb_my_wish">
|
<section id="smb_my_wish">
|
||||||
<h2><a href="<?php echo G4_MSHOP_URL; ?>/wishlist.php">최근 위시리스트</a></h2>
|
<h2><a href="<?php echo G4_SHOP_URL; ?>/wishlist.php">최근 위시리스트</a></h2>
|
||||||
|
|
||||||
<table class="basic_tbl">
|
<table class="basic_tbl">
|
||||||
<thead>
|
<thead>
|
||||||
|
|||||||
@ -10,7 +10,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
|
|||||||
|
|
||||||
<div id="sod_ws">
|
<div id="sod_ws">
|
||||||
|
|
||||||
<form name="fwishlist" method="post" action="">
|
<form name="fwishlist" method="post" action="./cartupdate.php">
|
||||||
<input type="hidden" name="act" value="multi">
|
<input type="hidden" name="act" value="multi">
|
||||||
<input type="hidden" name="sw_direct" value="">
|
<input type="hidden" name="sw_direct" value="">
|
||||||
<input type="hidden" name="prog" value="wish">
|
<input type="hidden" name="prog" value="wish">
|
||||||
@ -26,31 +26,25 @@ include_once(G4_MSHOP_PATH.'/_head.php');
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
$sql = " select *
|
$sql = " select a.wi_id, a.wi_time, b.*
|
||||||
from {$g4['shop_wish_table']} a,
|
from {$g4['shop_wish_table']} a left join {$g4['shop_item_table']} b on ( a.it_id = b.it_id )
|
||||||
{$g4['shop_item_table']} b
|
|
||||||
where a.mb_id = '{$member['mb_id']}'
|
where a.mb_id = '{$member['mb_id']}'
|
||||||
and a.it_id = b.it_id
|
|
||||||
order by a.wi_id desc ";
|
order by a.wi_id desc ";
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
for ($i=0; $row = mysql_fetch_array($result); $i++) {
|
for ($i=0; $row = mysql_fetch_array($result); $i++) {
|
||||||
|
|
||||||
$out_cd = '';
|
$out_cd = '';
|
||||||
for($k=1; $k<=6; $k++){
|
$sql = " select count(*) as cnt from {$g4['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' ";
|
||||||
$opt = trim($row['it_opt'.$k]);
|
$tmp = sql_fetch($sql);
|
||||||
if(preg_match("/\n/", $opt)||preg_match("/;/" , $opt)) {
|
if($tmp['cnt'])
|
||||||
$out_cd = 'no';
|
$out_cd = 'no';
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$it_price = get_price($row);
|
$it_price = get_price($row);
|
||||||
|
|
||||||
if ($row['it_tel_inq']) $out_cd = 'tel_inq';
|
if ($row['it_tel_inq']) $out_cd = 'tel_inq';
|
||||||
|
|
||||||
$image = get_it_image($row['it_id'], 70, 70);
|
$image = get_it_image($row['it_id'], 70, 70);
|
||||||
|
$it_point = get_item_point($row);
|
||||||
$s_del = '';
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
@ -73,7 +67,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
<input type="hidden" name="it_name[<?php echo $i; ?>]" value="<?php echo $row['it_name']; ?>">
|
<input type="hidden" name="it_name[<?php echo $i; ?>]" value="<?php echo $row['it_name']; ?>">
|
||||||
<input type="hidden" name="it_price[<?php echo $i; ?>]" value="<?php echo $it_price; ?>">
|
<input type="hidden" name="it_price[<?php echo $i; ?>]" value="<?php echo $it_price; ?>">
|
||||||
<input type="hidden" name="it_point[<?php echo $i; ?>]" value="<?php echo $row['it_point']; ?>">
|
<input type="hidden" name="it_point[<?php echo $i; ?>]" value="<?php echo $it_point; ?>">
|
||||||
<input type="hidden" name="ct_qty[<?php echo $i; ?>]" value="1">
|
<input type="hidden" name="ct_qty[<?php echo $i; ?>]" value="1">
|
||||||
</td>
|
</td>
|
||||||
<td class="td_smallmng"><a href="<?php echo G4_SHOP_URL; ?>/wishupdate.php?w=d&wi_id=<?php echo $row['wi_id']; ?>">삭제</a></td>
|
<td class="td_smallmng"><a href="<?php echo G4_SHOP_URL; ?>/wishupdate.php?w=d&wi_id=<?php echo $row['wi_id']; ?>">삭제</a></td>
|
||||||
@ -86,11 +80,10 @@ include_once(G4_MSHOP_PATH.'/_head.php');
|
|||||||
?>
|
?>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
|
||||||
|
|
||||||
<div id="sod_ws_act">
|
<div id="sod_ws_act">
|
||||||
<a href="javascript:fwishlist_check(document.fwishlist,'');" class="btn01">장바구니 담기</a>
|
<button type="submit" class="btn01" onclick="return fwishlist_check(document.fwishlist,'');">장바구니 담기</button>
|
||||||
<a href="javascript:fwishlist_check(document.fwishlist,'direct_buy');" class="btn02">주문하기</a>
|
<button type="submit" class="btn02" onclick="return fwishlist_check(document.fwishlist,'direct_buy');">주문하기</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -125,7 +118,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
|
|||||||
if(k == 0)
|
if(k == 0)
|
||||||
{
|
{
|
||||||
alert("상품을 하나 이상 체크 하십시오");
|
alert("상품을 하나 이상 체크 하십시오");
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (act == "direct_buy")
|
if (act == "direct_buy")
|
||||||
@ -137,9 +130,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
|
|||||||
f.sw_direct.value = 0;
|
f.sw_direct.value = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
f.action="<?php echo G4_SHOP_URL; ?>/cartupdate.php";
|
return true;
|
||||||
|
|
||||||
f.submit();
|
|
||||||
}
|
}
|
||||||
//-->
|
//-->
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -72,9 +72,8 @@ else if ($act == "seldelete") // 선택삭제
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ($act == "multi") // 온라인견적(등)에서 여러개의 상품이 한꺼번에 들어옴.
|
else if ($act == "multi") // 여러개의 상품이 한꺼번에 들어옴.
|
||||||
{
|
{
|
||||||
// 보관함에서 금액이 제대로 반영되지 않던 오류를 수정
|
|
||||||
$fldcnt = count($_POST['it_name']);
|
$fldcnt = count($_POST['it_name']);
|
||||||
|
|
||||||
// 재고등을 검사
|
// 재고등을 검사
|
||||||
@ -83,6 +82,11 @@ else if ($act == "multi") // 온라인견적(등)에서 여러개의 상품이
|
|||||||
{
|
{
|
||||||
if ($_POST['it_id'][$i] == "" || $_POST['ct_qty'][$i] <= 0) { continue; }
|
if ($_POST['it_id'][$i] == "" || $_POST['ct_qty'][$i] <= 0) { continue; }
|
||||||
|
|
||||||
|
//옵션있는 상품은 건너뜀
|
||||||
|
$sql = " select count(*) as cnt from {$g4['shop_item_option_table']} where it_id = '{$_POST['it_id'][$i]}' and io_type = '0' ";
|
||||||
|
$tmp = sql_fetch($sql);
|
||||||
|
if($tmp['cnt']) continue;
|
||||||
|
|
||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
// 변조 검사
|
// 변조 검사
|
||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
@ -94,7 +98,7 @@ else if ($act == "multi") // 온라인견적(등)에서 여러개의 상품이
|
|||||||
if ((int)$price !== (int)$_POST['it_price'][$i])
|
if ((int)$price !== (int)$_POST['it_price'][$i])
|
||||||
die("Error..");
|
die("Error..");
|
||||||
|
|
||||||
$point = $it['it_point'];
|
$point = get_item_point($it);
|
||||||
// 포인트가 다름
|
// 포인트가 다름
|
||||||
if ((int)$point !== (int)$_POST['it_point'][$i] && $config['cf_use_point'])
|
if ((int)$point !== (int)$_POST['it_point'][$i] && $config['cf_use_point'])
|
||||||
die("Error...");
|
die("Error...");
|
||||||
@ -115,6 +119,15 @@ else if ($act == "multi") // 온라인견적(등)에서 여러개의 상품이
|
|||||||
// 오류가 있다면 오류메세지 출력
|
// 오류가 있다면 오류메세지 출력
|
||||||
if ($error != "") { alert($error); }
|
if ($error != "") { alert($error); }
|
||||||
|
|
||||||
|
$ct_count = 0;
|
||||||
|
$comma = '';
|
||||||
|
$sql = " INSERT INTO {$g4['shop_cart_table']}
|
||||||
|
( uq_id, mb_id, it_id, it_name, ct_status, ct_price, ct_point, ct_point_use, ct_stock_use, ct_option, ct_qty, ct_num, io_id, io_type, io_price, ct_time, ct_ip, ct_send_cost, ct_direct, ct_select )
|
||||||
|
VALUES ";
|
||||||
|
$ct_select = 0;
|
||||||
|
if($sw_direct)
|
||||||
|
$ct_select = 1;
|
||||||
|
|
||||||
for ($i=0; $i<$fldcnt; $i++)
|
for ($i=0; $i<$fldcnt; $i++)
|
||||||
{
|
{
|
||||||
if ($_POST['it_id'][$i] == "" || $_POST['ct_qty'][$i] <= 0) continue;
|
if ($_POST['it_id'][$i] == "" || $_POST['ct_qty'][$i] <= 0) continue;
|
||||||
@ -122,21 +135,29 @@ else if ($act == "multi") // 온라인견적(등)에서 여러개의 상품이
|
|||||||
// 포인트 사용하지 않는다면
|
// 포인트 사용하지 않는다면
|
||||||
if (!$config['cf_use_point']) $_POST['it_point'][$i] = 0;
|
if (!$config['cf_use_point']) $_POST['it_point'][$i] = 0;
|
||||||
|
|
||||||
// 장바구니에 Insert
|
// 동일옵션의 상품이 있으면 수량 더함
|
||||||
$sql = " insert {$g4['shop_cart_table']}
|
$sql2 = " select ct_id
|
||||||
set uq_id = '$tmp_uq_id',
|
from {$g4['shop_cart_table']}
|
||||||
it_id = '{$_POST['it_id'][$i]}',
|
where uq_id = '$tmp_uq_id'
|
||||||
it_name = '{$_POST['it_name'][$i]}',
|
and it_id = '{$_POST['it_id'][$i]}'
|
||||||
ct_status = '쇼핑',
|
and ct_status = '쇼핑' ";
|
||||||
ct_price = '{$_POST['it_price'][$i]}',
|
$row2 = sql_fetch($sql2);
|
||||||
ct_point = '{$_POST['it_point'][$i]}',
|
if($row2['ct_id']) {
|
||||||
ct_point_use = '0',
|
$sql3 = " update {$g4['shop_cart_table']}
|
||||||
ct_stock_use = '0',
|
set ct_qty = ct_qty + {$_POST['ct_qty'][$i]}
|
||||||
ct_qty = '{$_POST['ct_qty'][$i]}',
|
where ct_id = '{$row2['ct_id']}' ";
|
||||||
ct_time = '".G4_TIME_YMDHIS."',
|
sql_query($sql3);
|
||||||
ct_ip = '$REMOTE_ADDR' ";
|
|
||||||
sql_query($sql);
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql .= $comma."( '$tmp_uq_id', '{$member['mb_id']}', '{$_POST['it_id'][$i]}', '{$_POST['it_name'][$i]}', '쇼핑', '{$_POST['it_price'][$i]}', '{$_POST['it_point'][$i]}', '0', '0', '{$_POST['it_name'][$i]}', '{$_POST['ct_qty'][$i]}', '0', '', '0', '0', '".G4_TIME_YMDHIS."', '$REMOTE_ADDR', '$ct_send_cost', '$sw_direct', '$ct_select' )";
|
||||||
|
$comma = ' , ';
|
||||||
|
$ct_count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($ct_count > 0)
|
||||||
|
sql_query($sql);
|
||||||
}
|
}
|
||||||
else if ($act == "optionmod") // 장바구니에서 옵션변경
|
else if ($act == "optionmod") // 장바구니에서 옵션변경
|
||||||
{
|
{
|
||||||
|
|||||||
@ -95,7 +95,6 @@ $thumbnail_width = 500;
|
|||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<?php }
|
<?php }
|
||||||
|
|||||||
@ -15,7 +15,7 @@ include_once('./_head.php');
|
|||||||
|
|
||||||
<div id="sod_ws">
|
<div id="sod_ws">
|
||||||
|
|
||||||
<form name="fwishlist" method="post" action="">
|
<form name="fwishlist" method="post" action="./cartupdate.php">
|
||||||
<input type="hidden" name="act" value="multi">
|
<input type="hidden" name="act" value="multi">
|
||||||
<input type="hidden" name="sw_direct" value="">
|
<input type="hidden" name="sw_direct" value="">
|
||||||
<input type="hidden" name="prog" value="wish">
|
<input type="hidden" name="prog" value="wish">
|
||||||
@ -32,31 +32,25 @@ include_once('./_head.php');
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
$sql = " select *
|
$sql = " select a.wi_id, a.wi_time, b.*
|
||||||
from {$g4['shop_wish_table']} a,
|
from {$g4['shop_wish_table']} a left join {$g4['shop_item_table']} b on ( a.it_id = b.it_id )
|
||||||
{$g4['shop_item_table']} b
|
|
||||||
where a.mb_id = '{$member['mb_id']}'
|
where a.mb_id = '{$member['mb_id']}'
|
||||||
and a.it_id = b.it_id
|
|
||||||
order by a.wi_id desc ";
|
order by a.wi_id desc ";
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
for ($i=0; $row = mysql_fetch_array($result); $i++) {
|
for ($i=0; $row = mysql_fetch_array($result); $i++) {
|
||||||
|
|
||||||
$out_cd = '';
|
$out_cd = '';
|
||||||
for($k=1; $k<=6; $k++){
|
$sql = " select count(*) as cnt from {$g4['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' ";
|
||||||
$opt = trim($row['it_opt'.$k]);
|
$tmp = sql_fetch($sql);
|
||||||
if(preg_match("/\n/", $opt)||preg_match("/;/" , $opt)) {
|
if($tmp['cnt'])
|
||||||
$out_cd = 'no';
|
$out_cd = 'no';
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$it_price = get_price($row);
|
$it_price = get_price($row);
|
||||||
|
|
||||||
if ($row['it_tel_inq']) $out_cd = 'tel_inq';
|
if ($row['it_tel_inq']) $out_cd = 'tel_inq';
|
||||||
|
|
||||||
$image = get_it_image($row['it_id'], 70, 70);
|
$image = get_it_image($row['it_id'], 70, 70);
|
||||||
|
$it_point = get_item_point($row);
|
||||||
$s_del = '';
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
@ -68,13 +62,13 @@ include_once('./_head.php');
|
|||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
품절
|
품절
|
||||||
<input type="hidden" name="it_id[<?php echo $i; ?>]">
|
<input type="hidden" name="it_id[<?php echo $i; ?>]" >
|
||||||
<?php } else { //품절이 아니면 체크할수 있도록한다 ?>
|
<?php } else { //품절이 아니면 체크할수 있도록한다 ?>
|
||||||
<input type="checkbox" name="it_id[<?php echo $i; ?>]" value="<?php echo $row['it_id']; ?>" onclick="out_cd_check(this, '<?php echo $out_cd; ?>');">
|
<input type="checkbox" name="it_id[<?php echo $i; ?>]" value="<?php echo $row['it_id']; ?>" onclick="out_cd_check(this, '<?php echo $out_cd; ?>');">
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<input type="hidden" name="it_name[<?php echo $i; ?>]" value="<?php echo $row['it_name']; ?>">
|
<input type="hidden" name="it_name[<?php echo $i; ?>]" value="<?php echo $row['it_name']; ?>">
|
||||||
<input type="hidden" name="it_price[<?php echo $i; ?>]" value="<?php echo $it_price; ?>">
|
<input type="hidden" name="it_price[<?php echo $i; ?>]" value="<?php echo $it_price; ?>">
|
||||||
<input type="hidden" name="it_point[<?php echo $i; ?>]" value="<?php echo $row['it_point']; ?>">
|
<input type="hidden" name="it_point[<?php echo $i; ?>]" value="<?php echo $it_point; ?>">
|
||||||
<input type="hidden" name="ct_qty[<?php echo $i; ?>]" value="1">
|
<input type="hidden" name="ct_qty[<?php echo $i; ?>]" value="1">
|
||||||
</td>
|
</td>
|
||||||
<td class="sod_ws_img"><?php echo $image; ?></td>
|
<td class="sod_ws_img"><?php echo $image; ?></td>
|
||||||
@ -90,12 +84,12 @@ include_once('./_head.php');
|
|||||||
?>
|
?>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
|
||||||
|
|
||||||
<div id="sod_ws_act">
|
<div id="sod_ws_act">
|
||||||
<a href="javascript:fwishlist_check(document.fwishlist,'');" class="btn01">장바구니 담기</a>
|
<button type="submit" class="btn01" onclick="return fwishlist_check(document.fwishlist,'');">장바구니 담기</button>
|
||||||
<a href="javascript:fwishlist_check(document.fwishlist,'direct_buy');" class="btn02">주문하기</a>
|
<button type="submit" class="btn02" onclick="return fwishlist_check(document.fwishlist,'direct_buy');">주문하기</button>
|
||||||
</div>
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -129,7 +123,7 @@ include_once('./_head.php');
|
|||||||
if(k == 0)
|
if(k == 0)
|
||||||
{
|
{
|
||||||
alert("상품을 하나 이상 체크 하십시오");
|
alert("상품을 하나 이상 체크 하십시오");
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (act == "direct_buy")
|
if (act == "direct_buy")
|
||||||
@ -141,9 +135,7 @@ include_once('./_head.php');
|
|||||||
f.sw_direct.value = 0;
|
f.sw_direct.value = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
f.action="./cartupdate.php";
|
return true;
|
||||||
|
|
||||||
f.submit();
|
|
||||||
}
|
}
|
||||||
//-->
|
//-->
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user