보관함에서 상품담기와 주문하기 기능 수정

This commit is contained in:
chicpro
2013-06-26 15:04:20 +09:00
parent 8d8b107b70
commit 9a3691e2b5
3 changed files with 67 additions and 63 deletions

View File

@ -15,7 +15,7 @@ include_once('./_head.php');
<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="sw_direct" value="">
<input type="hidden" name="prog" value="wish">
@ -32,31 +32,25 @@ include_once('./_head.php');
</thead>
<tbody>
<?php
$sql = " select *
from {$g4['shop_wish_table']} a,
{$g4['shop_item_table']} b
$sql = " select a.wi_id, a.wi_time, b.*
from {$g4['shop_wish_table']} a left join {$g4['shop_item_table']} b on ( a.it_id = b.it_id )
where a.mb_id = '{$member['mb_id']}'
and a.it_id = b.it_id
order by a.wi_id desc ";
$result = sql_query($sql);
for ($i=0; $row = mysql_fetch_array($result); $i++) {
$out_cd = '';
for($k=1; $k<=6; $k++){
$opt = trim($row['it_opt'.$k]);
if(preg_match("/\n/", $opt)||preg_match("/;/" , $opt)) {
$out_cd = 'no';
break;
}
}
$sql = " select count(*) as cnt from {$g4['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' ";
$tmp = sql_fetch($sql);
if($tmp['cnt'])
$out_cd = 'no';
$it_price = get_price($row);
if ($row['it_tel_inq']) $out_cd = 'tel_inq';
$image = get_it_image($row['it_id'], 70, 70);
$s_del = '';
$it_point = get_item_point($row);
?>
<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 { //품절이 아니면 체크할수 있도록한다 ?>
<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 } ?>
<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_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">
</td>
<td class="sod_ws_img"><?php echo $image; ?></td>
@ -90,12 +84,12 @@ include_once('./_head.php');
?>
</tr>
</table>
</form>
<div id="sod_ws_act">
<a href="javascript:fwishlist_check(document.fwishlist,'');" class="btn01">장바구니 담기</a>
<a href="javascript:fwishlist_check(document.fwishlist,'direct_buy');" class="btn02">주문하기</a>
<button type="submit" class="btn01" onclick="return fwishlist_check(document.fwishlist,'');">장바구니 담기</button>
<button type="submit" class="btn02" onclick="return fwishlist_check(document.fwishlist,'direct_buy');">주문하기</button>
</div>
</form>
</div>
<script>
@ -129,7 +123,7 @@ include_once('./_head.php');
if(k == 0)
{
alert("상품을 하나 이상 체크 하십시오");
return;
return false;
}
if (act == "direct_buy")
@ -141,9 +135,7 @@ include_once('./_head.php');
f.sw_direct.value = 0;
}
f.action="./cartupdate.php";
f.submit();
return true;
}
//-->
</script>