모바일 쇼핑몰 파일 추가
This commit is contained in:
20
mobile/shop/cart.php
Normal file
20
mobile/shop/cart.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
$g4['title'] = '장바구니';
|
||||
include_once('./_head.php');
|
||||
?>
|
||||
|
||||
<div id="sod_bsk">
|
||||
|
||||
<?php
|
||||
$s_page = 'cart.php';
|
||||
$s_uq_id = get_session('ss_uq_id');
|
||||
include G4_MSHOP_PATH.'/cartsub.inc.php';
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include_once('./_tail.php');
|
||||
?>
|
||||
306
mobile/shop/cartsub.inc.php
Normal file
306
mobile/shop/cartsub.inc.php
Normal file
@ -0,0 +1,306 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
/*
|
||||
$s_page 는 cart.php 일때 수량의 수정, 물품의 삭제를 위한 변수이다.
|
||||
orderinquiryview.php 일때 배송상태등을 나타내는 변수이다.
|
||||
|
||||
$s_uq_id 는 유일한 키
|
||||
*/
|
||||
|
||||
if ($s_page == 'cart.php' || $s_page == 'orderinquiryview.php')
|
||||
$colspan = 7;
|
||||
else
|
||||
$colspan = 6;
|
||||
?>
|
||||
|
||||
<form name="frmcartlist" method="post">
|
||||
<table class="basic_tbl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">상품이미지</th>
|
||||
<th scope="col">상품명</th>
|
||||
<th scope="col">수량</th>
|
||||
<th scope="col">판매가</th>
|
||||
<th scope="col">소계</th>
|
||||
<th scope="col">포인트</th>
|
||||
<?php
|
||||
if ($s_page == 'cart.php')
|
||||
echo '<th scope="col">삭제</th>';
|
||||
else if ($s_page == 'orderinquiryview.php')
|
||||
echo '<th scope="col">상태</th>';
|
||||
?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$tot_point = 0;
|
||||
$tot_sell_amount = 0;
|
||||
$tot_cancel_amount = 0;
|
||||
|
||||
$goods = $goods_it_id = "";
|
||||
$goods_count = -1;
|
||||
|
||||
// $s_uq_id 로 현재 장바구니 자료 쿼리
|
||||
$sql = " select a.ct_id,
|
||||
a.it_opt1,
|
||||
a.it_opt2,
|
||||
a.it_opt3,
|
||||
a.it_opt4,
|
||||
a.it_opt5,
|
||||
a.it_opt6,
|
||||
a.ct_amount,
|
||||
a.ct_point,
|
||||
a.ct_qty,
|
||||
a.ct_status,
|
||||
b.it_id,
|
||||
b.it_name,
|
||||
b.ca_id
|
||||
from {$g4['shop_cart_table']} a,
|
||||
{$g4['shop_item_table']} b
|
||||
where a.uq_id = '$s_uq_id'
|
||||
and a.it_id = b.it_id
|
||||
order by a.ct_id ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$good_info = '';
|
||||
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
if (!$goods)
|
||||
{
|
||||
//$goods = addslashes($row[it_name]);
|
||||
//$goods = get_text($row[it_name]);
|
||||
$goods = preg_replace("/\'|\"|\||\,|\&|\;/", "", $row['it_name']);
|
||||
$goods_it_id = $row['it_id'];
|
||||
}
|
||||
$goods_count++;
|
||||
|
||||
// 에스크로 상품정보
|
||||
if($s_page == 'orderform.php' && $default['de_escrow_use']) {
|
||||
if ($i>0)
|
||||
$good_info .= chr(30);
|
||||
$good_info .= "seq=".($i+1).chr(31);
|
||||
$good_info .= "ordr_numb={$od_id}_".sprintf("%04d", $i).chr(31);
|
||||
$good_info .= "good_name=".addslashes($row['it_name']).chr(31);
|
||||
$good_info .= "good_cntx=".$row['ct_qty'].chr(31);
|
||||
$good_info .= "good_amtx=".$row['ct_amount'].chr(31);
|
||||
}
|
||||
|
||||
if ($i==0) { // 계속쇼핑
|
||||
$continue_ca_id = $row['ca_id'];
|
||||
}
|
||||
|
||||
if ($s_page == 'cart.php' || $s_page == 'orderinquiryview.php') { // 링크를 붙이고
|
||||
$a1 = '<a href="./item.php?it_id='.$row[it_id].'"><b>';
|
||||
$a2 = '</b></a>';
|
||||
$image = get_it_image($row['it_id'].'_s', 70, 70, '');
|
||||
} else { // 붙이지 않고
|
||||
$a1 = '<b>';
|
||||
$a2 = '</b>';
|
||||
$image = get_it_image($row['it_id'].'_s', 50, 50);
|
||||
}
|
||||
|
||||
$it_name = $a1 . stripslashes($row['it_name']) . $a2 . '<br>';
|
||||
if ($row['it_opt1'] || $row['it_opt2'] || $row['it_opt3'] || $row['it_opt4'] || $row['it_opt5'] || $row['it_opt6']) { // 상품에 옵션이 있다면
|
||||
$it_name .= '<div class="sod_bsk_itopt">'.print_item_options($row['it_id'], $row['it_opt1'], $row['it_opt2'], $row['it_opt3'], $row['it_opt4'], $row['it_opt5'], $row['it_opt6']).'</div>';
|
||||
}
|
||||
|
||||
$point = $row['ct_point'] * $row['ct_qty'];
|
||||
$sell_amount = $row['ct_amount'] * $row['ct_qty'];
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="sod_bsk_img"><?php echo $image; ?></td>
|
||||
<td>
|
||||
<input type="hidden" name="ct_id[<?php echo $i; ?>]" value="<?php echo $row['ct_id']; ?>">
|
||||
<input type="hidden" name="it_id[<?php echo $i; ?>]" value="<?php echo $row['it_id']; ?>">
|
||||
<input type="hidden" name="ap_id[<?php echo $i; ?>]" value="<?php echo $row['ap_id']; ?>">
|
||||
<input type="hidden" name="bi_id[<?php echo $i; ?>]" value="<?php echo $row['bi_id']; ?>">
|
||||
<input type="hidden" name="it_name[<?php echo $i; ?>]" value="<?php echo get_text($row['it_name']); ?>">
|
||||
<input type="hidden" name="act" value="">
|
||||
<input type="hidden" name="records" value="<?php echo $i; ?>">
|
||||
<?php echo $it_name; ?>
|
||||
</td>
|
||||
|
||||
<?php
|
||||
// 수량, 입력(수량)
|
||||
if ($s_page == "cart.php")
|
||||
echo '<td class="td_num"><input type="text" name="ct_qty['.$i.']" value="'.$row['ct_qty'].'" id="ct_qty_'.$i.'" class="frm_input" size="4" maxlength="6" autocomplete="off"></td>';
|
||||
else
|
||||
echo '<td class="td_num">'.$row['ct_qty'].'</td>';
|
||||
?>
|
||||
|
||||
<td class="td_bignum"><?php echo number_format($row['ct_amount']); ?></td>
|
||||
<td class="td_bignum"><?php echo number_format($sell_amount); ?></td>
|
||||
<td class="td_bignum"><?php echo number_format($point); ?></td>
|
||||
|
||||
<?php
|
||||
if ($s_page == 'cart.php')
|
||||
echo '<td class="td_smallmng"><a href="./cartupdate.php?act=d&ct_id='.$row['ct_id'].'">삭제</a></td>';
|
||||
else if ($s_page == 'orderinquiryview.php')
|
||||
echo '<td class="td_smallmng">'.$row['ct_status'].'</td>';
|
||||
?>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
//$tot_point += $point;
|
||||
//$tot_sell_amount += $sell_amount;
|
||||
|
||||
if ($row['ct_status'] == '취소' || $row['ct_status'] == '반품' || $row['ct_status'] == '품절') {
|
||||
$tot_cancel_amount += $sell_amount;
|
||||
}
|
||||
else {
|
||||
$tot_point += $point;
|
||||
$tot_sell_amount += $sell_amount;
|
||||
}
|
||||
|
||||
// 배송비가 넘어왔다면
|
||||
if ($_POST['od_send_cost']) {
|
||||
$send_cost = (int)$_POST['od_send_cost'];
|
||||
} else {
|
||||
// 배송비 계산
|
||||
if ($default['de_send_cost_case'] == '없음')
|
||||
$send_cost = 0;
|
||||
else {
|
||||
// 배송비 상한 : 여러단계의 배송비 적용 가능
|
||||
$send_cost_limit = explode(";", $default['de_send_cost_limit']);
|
||||
$send_cost_list = explode(";", $default['de_send_cost_list']);
|
||||
$send_cost = 0;
|
||||
for ($k=0; $k<count($send_cost_limit); $k++) {
|
||||
// 총판매금액이 배송비 상한가 보다 작다면
|
||||
if ($tot_sell_amount < $send_cost_limit[$k]) {
|
||||
$send_cost = $send_cost_list[$k];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 이미 주문된 내역을 보여주는것이므로 배송비를 주문서에서 얻는다.
|
||||
$sql = "select od_send_cost from {$g4['shop_order_table']} where od_id = '$od_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['od_send_cost'] > 0)
|
||||
$send_cost = $row['od_send_cost'];
|
||||
}
|
||||
} // for 끝
|
||||
|
||||
if ($i == 0) echo '<tr><td colspan="'.$colspan.'" class="empty_table">장바구니에 담긴 상품이 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php if ($goods_count) $goods .= '<div> 외 '.$goods_count.'건</div>'; ?>
|
||||
|
||||
<?php
|
||||
// 배송비가 0 보다 크다면 (있다면)
|
||||
if ($send_cost > 0)
|
||||
{
|
||||
?>
|
||||
|
||||
<div id="sod_bsk_dvr" class="sod_bsk_tot">
|
||||
<span>배송비</span>
|
||||
<strong><?php echo number_format($send_cost); ?> 원</strong>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
// 총계 = 주문상품금액합계 + 배송비
|
||||
$tot_amount = $tot_sell_amount + $send_cost;
|
||||
if ($tot_amount > 0) {
|
||||
?>
|
||||
|
||||
<div id="sod_bsk_cnt" class="sod_bsk_tot">
|
||||
<span>총계</span>
|
||||
<strong><?php echo number_format($tot_amount); ?> 원 <?php echo number_format($tot_point); ?> 점</strong>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($s_page == 'cart.php') { ?>
|
||||
<div id="sod_bsk_act">
|
||||
<?php if ($i == 0) { ?>
|
||||
<a href="<?php echo G4_SHOP_URL; ?>" class="btn01">쇼핑 계속하기</a>
|
||||
<?php } else { ?>
|
||||
<input type="hidden" name="url" value="./orderform.php">
|
||||
<p>장바구니의 상품을 주문하시려면 <strong>주문하기</strong>를 클릭하세요. <strong>비우기</strong>는 장바구니의 상품을 모두 비웁니다.</p>
|
||||
<a href="<?php echo G4_SHOP_URL; ?>/list.php?ca_id=<?php echo $continue_ca_id; ?>" class="btn01">쇼핑 계속하기</a>
|
||||
<a href="javascript:form_check('buy');" class="btn02">주문하기</a>
|
||||
<a href="javascript:form_check('allupdate');" class="btn01">수량변경</a>
|
||||
<a href="javascript:form_check('alldelete');" class="btn01">비우기</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</form>
|
||||
|
||||
<?php
|
||||
if ($s_page == 'cart.php') {
|
||||
if ($i != 0) {
|
||||
?>
|
||||
<script>
|
||||
function form_check(act) {
|
||||
var f = document.frmcartlist;
|
||||
var cnt = f.records.value;
|
||||
|
||||
if (act == "buy")
|
||||
{
|
||||
f.act.value = act;
|
||||
|
||||
<?php
|
||||
if (get_session('ss_mb_id')) // 회원인 겨우
|
||||
{
|
||||
echo "f.action = './orderform.php';";
|
||||
echo "f.submit();";
|
||||
}
|
||||
else
|
||||
echo "document.location.href = '".G4_BBS_URL."/login.php?url=".urlencode(G4_SHOP_URL."/orderform.php")."';";
|
||||
?>
|
||||
}
|
||||
else if (act == "alldelete")
|
||||
{
|
||||
f.act.value = act;
|
||||
f.action = "./cartupdate.php";
|
||||
f.submit();
|
||||
}
|
||||
else if (act == "allupdate")
|
||||
{
|
||||
for (i=0; i<cnt; i++)
|
||||
{
|
||||
//if (f.elements("ct_qty[" + i + "]").value == "")
|
||||
if (document.getElementById('ct_qty_'+i).value == '')
|
||||
{
|
||||
alert("수량을 입력해 주십시오.");
|
||||
//f.elements("ct_qty[" + i + "]").focus();
|
||||
document.getElementById('ct_qty_'+i).focus();
|
||||
return;
|
||||
}
|
||||
//else if (isNaN(f.elements("ct_qty[" + i + "]").value))
|
||||
else if (isNaN(document.getElementById('ct_qty_'+i).value))
|
||||
{
|
||||
alert("수량을 숫자로 입력해 주십시오.");
|
||||
//f.elements("ct_qty[" + i + "]").focus();
|
||||
document.getElementById('ct_qty_'+i).focus();
|
||||
return;
|
||||
}
|
||||
//else if (f.elements("ct_qty[" + i + "]").value < 1)
|
||||
else if (document.getElementById('ct_qty_'+i).value < 1)
|
||||
{
|
||||
alert("수량은 1 이상 입력해 주십시오.");
|
||||
//f.elements("ct_qty[" + i + "]").focus();
|
||||
document.getElementById('ct_qty_'+i).focus();
|
||||
return;
|
||||
}
|
||||
}
|
||||
f.act.value = act;
|
||||
f.action = "./cartupdate.php";
|
||||
f.submit();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
737
mobile/shop/item.php
Normal file
737
mobile/shop/item.php
Normal file
@ -0,0 +1,737 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
include_once(G4_LIB_PATH.'/iteminfo.lib.php');
|
||||
include_once(G4_GCAPTCHA_PATH.'/gcaptcha.lib.php');
|
||||
|
||||
$captcha_html = captcha_html();
|
||||
|
||||
// 불법접속을 할 수 없도록 세션에 아무값이나 저장하여 hidden 으로 넘겨서 다음 페이지에서 비교함
|
||||
$token = md5(uniqid(rand(), true));
|
||||
set_session("ss_token", $token);
|
||||
|
||||
$rand = rand(4, 6);
|
||||
$norobot_key = substr($token, 0, $rand);
|
||||
set_session('ss_norobot_key', $norobot_key);
|
||||
|
||||
// 분류사용, 상품사용하는 상품의 정보를 얻음
|
||||
$sql = " select a.*,
|
||||
b.ca_name,
|
||||
b.ca_use
|
||||
from {$g4['shop_item_table']} a,
|
||||
{$g4['shop_category_table']} b
|
||||
where a.it_id = '$it_id'
|
||||
and a.ca_id = b.ca_id ";
|
||||
$it = sql_fetch($sql);
|
||||
if (!$it['it_id'])
|
||||
alert('자료가 없습니다.');
|
||||
if (!($it['ca_use'] && $it['it_use'])) {
|
||||
if (!$is_admin)
|
||||
alert('판매가능한 상품이 아닙니다.');
|
||||
}
|
||||
|
||||
// 분류 테이블에서 분류 상단, 하단 코드를 얻음
|
||||
$sql = " select ca_include_head, ca_include_tail
|
||||
from {$g4['shop_category_table']}
|
||||
where ca_id = '{$it['ca_id']}' ";
|
||||
$ca = sql_fetch($sql);
|
||||
|
||||
// 오늘 본 상품 저장 시작
|
||||
// tv 는 today view 약자
|
||||
$saved = false;
|
||||
$tv_idx = (int)get_session("ss_tv_idx");
|
||||
if ($tv_idx > 0) {
|
||||
for ($i=1; $i<=$tv_idx; $i++) {
|
||||
if (get_session("ss_tv[$i]") == $it_id) {
|
||||
$saved = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$saved) {
|
||||
$tv_idx++;
|
||||
set_session("ss_tv_idx", $tv_idx);
|
||||
set_session("ss_tv[$tv_idx]", $it_id);
|
||||
}
|
||||
// 오늘 본 상품 저장 끝
|
||||
|
||||
// 조회수 증가
|
||||
if ($_COOKIE['ck_it_id'] != $it_id) {
|
||||
sql_query(" update {$g4['shop_item_table']} set it_hit = it_hit + 1 where it_id = '$it_id' "); // 1증가
|
||||
set_cookie("ck_it_id", $it_id, time() + 3600); // 1시간동안 저장
|
||||
}
|
||||
|
||||
$g4['title'] = $it['it_name'].' > '.$it['ca_name'];
|
||||
|
||||
include_once('./_head.php');
|
||||
|
||||
// 분류 위치
|
||||
// HOME > 1단계 > 2단계 ... > 6단계 분류
|
||||
$ca_id = $it['ca_id'];
|
||||
include G4_SHOP_PATH.'/navigation1.inc.php';
|
||||
|
||||
// 이 분류에 속한 하위분류 출력
|
||||
include G4_SHOP_PATH.'/listcategory.inc.php';
|
||||
|
||||
if ($is_admin)
|
||||
echo '<div class="sit_admin"><a href="'.G4_ADMIN_URL.'/shop_admin/itemform.php?w=u&it_id='.$it_id.'" class="btn_admin">상품 관리</a></div>';
|
||||
|
||||
$himg = G4_DATA_PATH.'/item/'.$it_id.'_h';
|
||||
if (file_exists($himg))
|
||||
echo '<div id="sit_himg" class="sit_img"><img src="'.G4_DATA_URL.'/item/'.$it_id.'_h" alt=""></div>';
|
||||
|
||||
// 상단 HTML
|
||||
echo '<div id="sit_hhtml">'.stripslashes($it['it_mobile_head_html']).'</div>';
|
||||
|
||||
// 이전 상품보기
|
||||
$sql = " select it_id, it_name from {$g4['shop_item_table']}
|
||||
where it_id > '$it_id'
|
||||
and SUBSTRING(ca_id,1,4) = '".substr($it['ca_id'],0,4)."'
|
||||
and it_use = '1'
|
||||
order by it_id asc
|
||||
limit 1 ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['it_id']) {
|
||||
$prev_title = '이전상품보기 '.$row['it_name'];
|
||||
$prev_href = '<a href="./item.php?it_id='.$row['it_id'].'">';
|
||||
$prev_href = '</a>';
|
||||
} else {
|
||||
$prev_title = '';
|
||||
$prev_href = '';
|
||||
$prev_href2 = '';
|
||||
}
|
||||
|
||||
// 다음 상품보기
|
||||
$sql = " select it_id, it_name from {$g4['shop_item_table']}
|
||||
where it_id < '$it_id'
|
||||
and SUBSTRING(ca_id,1,4) = '".substr($it['ca_id'],0,4)."'
|
||||
and it_use = '1'
|
||||
order by it_id desc
|
||||
limit 1 ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['it_id']) {
|
||||
$next_title = '다음 상품 '.$row['it_name'];
|
||||
$next_href = '<a href="./item.php?it_id='.$row['it_id'].'">';
|
||||
$next_href2 = '</a>';
|
||||
} else {
|
||||
$next_title = '';
|
||||
$next_href = '';
|
||||
$next_href2 = '';
|
||||
}
|
||||
|
||||
// 관련상품의 갯수를 얻음
|
||||
$sql = " select count(*) as cnt
|
||||
from {$g4['shop_item_relation_table']} a
|
||||
left join {$g4['shop_item_table']} b on (a.it_id2=b.it_id and b.it_use='1')
|
||||
where a.it_id = '{$it['it_id']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
$item_relation_count = $row['cnt'];
|
||||
?>
|
||||
|
||||
<?php
|
||||
function pg_anchor($anc_id) {
|
||||
global $default;
|
||||
?>
|
||||
<ul class="sanchor">
|
||||
<li><a href="#sit_inf" <?php if ($anc_id == 'inf') echo 'class="sanchor_on"'; ?>>상품정보</a></li>
|
||||
<li><a href="#sit_ps" <?php if ($anc_id == 'ps') echo 'class="sanchor_on"'; ?>>사용후기 <span class="item_use_count"></span></a></li>
|
||||
<li><a href="#sit_qna" <?php if ($anc_id == 'qna') echo 'class="sanchor_on"'; ?>>상품문의 <span class="item_qa_count"></span></a></li>
|
||||
<?php if ($default['de_baesong_content']) { ?><li><a href="#sit_dvr" <?php if ($anc_id == 'dvr') echo 'class="sanchor_on"'; ?>>배송정보</a></li><?php } ?>
|
||||
<?php if ($default['de_change_content']) { ?><li><a href="#sit_ex" <?php if ($anc_id == 'ex') echo 'class="sanchor_on"'; ?>>교환정보</a></li><?php } ?>
|
||||
<li><a href="#sit_rel" <?php if ($anc_id == 'rel') echo 'class="sanchor_on"'; ?>>관련상품 <span class="item_relation_count"></span></a></li>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
|
||||
<script src="<?php echo G4_JS_URL; ?>/md5.js"></script>
|
||||
|
||||
<?php
|
||||
if (G4_HTTPS_DOMAIN)
|
||||
$action_url = G4_HTTPS_DOMAIN.'/'.G4_SHOP_DIR.'/cartupdate.php';
|
||||
else
|
||||
$action_url = './cartupdate.php';
|
||||
?>
|
||||
|
||||
<div id="sit">
|
||||
|
||||
<form name="fitem" action="<?php echo $action_url; ?>" method="post">
|
||||
<input type="hidden" name="it_id" value="<?php echo $it['it_id']; ?>">
|
||||
<input type="hidden" name="it_name" value="<?php echo $it['it_name']; ?>">
|
||||
<input type="hidden" name="sw_direct">
|
||||
<input type="hidden" name="url">
|
||||
|
||||
<div id="sit_ov_wrap">
|
||||
<div id="sit_pvi">
|
||||
<?php
|
||||
$img_big = $it['it_id'].'_l1'; // 기본이미지(대)
|
||||
?>
|
||||
<div id="sit_pvi_big">
|
||||
<a href="<?php echo G4_SHOP_URL; ?>/largeimage.php?it_id=<?php echo $it['it_id']; ?>&img=<?php echo $img_big; ?>" id="<?php echo $img_big; ?>" class="popup_item_image" target="_blank"><img src="<?php echo G4_DATA_URL; ?>/item/<?php echo $img_big; ?>" alt=""></a>
|
||||
</div>
|
||||
<?php
|
||||
// 이미지(중) 썸네일
|
||||
for ($i=1; $i<=5; $i++)
|
||||
{
|
||||
if ($i == 1) echo '<ul id="sit_pvi_thumb">';
|
||||
if ($i == 5) $sit_pvi_last = 'class="li_last"';
|
||||
echo '<li '.$sit_pvi_last.'>';
|
||||
if (file_exists(G4_DATA_PATH.'/item/'.$it_id.'_l'.$i))
|
||||
{
|
||||
echo get_large_image($it_id.'_'.$i, $it['it_id'], false);
|
||||
if ($i==1 && file_exists(G4_DATA_PATH.'/item/'.$it_id.'_s'))
|
||||
echo '<a href="#sit_pvi_big" id="'.$it_id.'_s" class="img_thumb"><img src="'.G4_DATA_URL.'/item/'.$it_id.'_s" alt="" id="sit_pvi_t'.$i.'" ';
|
||||
else
|
||||
echo '<a href="#sit_pvi_big" id="'.$it_id.'_l'.$i.'" class="img_thumb"><img src="'.G4_DATA_URL.'/item/'.$it_id.'_l'.$i.'" alt="" id="sit_pvi_t'.$i.'" ';
|
||||
//echo ' onmouseover="document.getElementById(\''.$middle_image.'\').src=document.getElementById(\'middle'.$i.'\').src;">';
|
||||
echo '></a>';
|
||||
}
|
||||
echo '</li>';
|
||||
}
|
||||
if ($i > 1) echo '</ul>';
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php //echo it_name_icon($it, false, 0); ?>
|
||||
|
||||
<section id="sit_ov">
|
||||
<h2>상품간략정보 및 구매기능</h2>
|
||||
<strong id="sit_title"><?php echo stripslashes($it['it_name']); ?></strong><br>
|
||||
<span id="sit_desc"><?php echo $it['it_basic']; ?></span>
|
||||
<?php if ($score = get_star_image($it['it_id'])) { ?>
|
||||
<div id="sit_star_sns">
|
||||
<?php
|
||||
$sns_title = get_text($it['it_name']).' | '.get_text($config['cf_title']);
|
||||
$sns_send = G4_SHOP_URL.'/sns_send.php?url='.urlencode(G4_SHOP_URL.'/item.php?it_id='.$it['it_id']);
|
||||
$sns_send .= '&title='.urlencode(cut_str($sns_title, 100));
|
||||
?>
|
||||
고객선호도 <span>별<?php echo $score?>개</span>
|
||||
<img src="<?php echo G4_URL; ?>/img/shop/s_star<?php echo $score?>.png" alt="" class="sit_star">
|
||||
<a href="<?php echo $sns_send; ?>&sns=facebook" target="_blank"><img src="<?php echo G4_URL; ?>/img/shop/sns_fb2.png" alt="페이스북에 공유"></a>
|
||||
<a href="<?php echo $sns_send; ?>&sns=twitter" target="_blank"><img src="<?php echo G4_URL; ?>/img/shop/sns_twt2.png" alt="트위터에 공유"></a>
|
||||
<a href="<?php echo $sns_send; ?>&sns=google" target="_blank"><img src="<?php echo G4_URL; ?>/img/shop/sns_goo2.png" alt="구글플러스에 공유"></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<table id="sit_ov_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<?php if ($it['it_maker']) { ?>
|
||||
<tr>
|
||||
<th scope="row">제조사</th>
|
||||
<td><?php echo $it['it_maker']; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($it['it_origin']) { ?>
|
||||
<tr>
|
||||
<th scope="row">원산지</th>
|
||||
<td><?php echo $it['it_origin']; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
// 선택옵션 출력
|
||||
for ($i=1; $i<=6; $i++)
|
||||
{
|
||||
// 옵션에 문자가 존재한다면
|
||||
$str = get_item_options(trim($it['it_opt'.$i.'_subject']), trim($it['it_opt'.$i]), $i);
|
||||
if ($str)
|
||||
{
|
||||
echo '<tr>'.PHP_EOL;
|
||||
echo '<th scope="row"><label for="sit_opt_'.$i.'">'.$it['it_opt'.$i.'_subject'].'</label></th>'.PHP_EOL;
|
||||
echo '<td style="word-break:break-all;">'.$str.'</td>'.PHP_EOL;
|
||||
echo '</tr>'.PHP_EOL;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if (!$it['it_gallery']) { // 갤러리 형식이라면 가격, 구매하기 출력하지 않음 ?>
|
||||
<?php if ($it['it_tel_inq']) { // 전화문의일 경우 ?>
|
||||
|
||||
<tr>
|
||||
<th scope="row">판매가격</th>
|
||||
<td>전화문의</td>
|
||||
</tr>
|
||||
|
||||
<?php } else { // 전화문의가 아닐 경우?>
|
||||
<?php if ($it['it_cust_amount']) { // 1.00.03?>
|
||||
<tr>
|
||||
<th scope="row"><label for="disp_cust_amount">시중가격</label></th>
|
||||
<td>
|
||||
<input type="text" name="disp_cust_amount" value="<?php echo number_format($it['it_cust_amount']); ?>" id="disp_cust_amount" readonly class="sit_ov_ro" size="8"> 원
|
||||
</td>
|
||||
</tr>
|
||||
<?php } // 전화문의 끝?>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="disp_sell_amount">판매가격</label></th>
|
||||
<td>
|
||||
<input type="text" name="disp_sell_amount" id="disp_sell_amount" readonly class="sit_ov_ro" size="8"> 원
|
||||
<input type="hidden" name="it_amount" value="0">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
/* 재고 표시하는 경우 주석 해제
|
||||
<tr>
|
||||
<th scope="row">재고수량</th>
|
||||
<td><?php echo number_format(get_it_stock_qty($it_id)); ?> 개</td>
|
||||
</tr>
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php if ($config['cf_use_point']) { // 포인트 사용한다면 ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="disp_point">포인트</label></th>
|
||||
<td>
|
||||
<input type="text" name="disp_point" id="disp_point" readonly class="sit_ov_ro" size="8"> 점
|
||||
<input type="hidden" name="it_point" value="0">
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<tr>
|
||||
<th scope="row">수량</th>
|
||||
<td>
|
||||
<input type="text" name="ct_qty" value="1" class="sit_ov_input" size="4" maxlength="4" autocomplete="off" onkeyup="amount_change()">
|
||||
<button type="button" onclick="javascript:qty_add(+1);" class="btn_frmline"><span class="sound_only">수량 1개 </span>증가</button>
|
||||
<button type="button" onclick="javascript:qty_add(-1);" class="btn_frmline"><span class="sound_only">수량 1개 </span>감소</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ul id="sit_ov_btn">
|
||||
<?php if (!$it['it_tel_inq'] && !$it['it_gallery']) { ?>
|
||||
<li><a href="javascript:fitemcheck(document.fitem, 'direct_buy');" id="sit_btn_buy">바로구매</a></li>
|
||||
<li><a href="javascript:fitemcheck(document.fitem, 'cart_update');" id="sit_btn_cart">장바구니</a></li>
|
||||
<?php } ?>
|
||||
<?php if (!$it['it_gallery']) { ?>
|
||||
<li><a href="javascript:item_wish(document.fitem, '<?php echo $it['it_id']; ?>');" id="sit_btn_wish">위시리스트</a></li>
|
||||
<li><a href="javascript:popup_item_recommend('<?php echo $it['it_id']; ?>');" id="sit_btn_rec">추천하기</a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
|
||||
<script>
|
||||
// 상품보관
|
||||
function item_wish(f, it_id)
|
||||
{
|
||||
f.url.value = "<?php echo G4_SHOP_URL; ?>/wishupdate.php?it_id="+it_id;
|
||||
f.action = "<?php echo G4_SHOP_URL; ?>/wishupdate.php";
|
||||
f.submit();
|
||||
}
|
||||
|
||||
// 추천메일
|
||||
function popup_item_recommend(it_id)
|
||||
{
|
||||
if (!g4_is_member)
|
||||
{
|
||||
if (confirm("회원만 추천하실 수 있습니다."))
|
||||
document.location.href = "<?php echo G4_BBS_URL; ?>/login.php?url=<?php echo urlencode(G4_SHOP_URL."/item.php?it_id=$it_id"); ?>";
|
||||
}
|
||||
else
|
||||
{
|
||||
url = "./itemrecommend.php?it_id=" + it_id;
|
||||
opt = "scrollbars=yes,width=616,height=420,top=10,left=10";
|
||||
popup_window(url, "itemrecommend", opt);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<aside id="sit_siblings">
|
||||
<h2>다른 상품 보기</h2>
|
||||
<?php
|
||||
if ($prev_href || $next_href) {
|
||||
echo $prev_href.$prev_title.$prev_href2;
|
||||
echo $next_href.$next_title.$next_href2;
|
||||
} else {
|
||||
echo '<span class="sound_only">이 분류에 등록된 다른 상품이 없습니다.</span>';
|
||||
}
|
||||
?>
|
||||
</aside>
|
||||
|
||||
<script>
|
||||
function click_item(id)
|
||||
{
|
||||
<?php
|
||||
echo "var str = 'item_explan,item_use,item_qa";
|
||||
if ($default['de_baesong_content']) echo ",item_baesong";
|
||||
if ($default['de_change_content']) echo ",item_change";
|
||||
echo ",item_relation';";
|
||||
?>
|
||||
|
||||
var s = str.split(',');
|
||||
|
||||
for (i=0; i<s.length; i++)
|
||||
{
|
||||
if (id=='*')
|
||||
document.getElementById(s[i]).style.display = 'block';
|
||||
else
|
||||
document.getElementById(s[i]).style.display = 'none';
|
||||
}
|
||||
|
||||
if (id!='*')
|
||||
document.getElementById(id).style.display = 'block';
|
||||
}
|
||||
</script>
|
||||
|
||||
<section id="sit_inf">
|
||||
<h2>상품 정보</h2>
|
||||
<?php echo pg_anchor('inf'); ?>
|
||||
|
||||
<?php if ($it['it_basic']) { // 상품 기본설명 ?>
|
||||
<div id="sit_inf_basic">
|
||||
<?php echo $it['it_basic']; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($it['it_explan']) { // 상품 상세설명 ?>
|
||||
<div id="sit_inf_explan">
|
||||
<?php echo conv_content($it['it_explan'], 1); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<h3>상품 정보 고시</h3>
|
||||
<?php
|
||||
$sql = " select * from {$g4['shop_item_info_table']} where it_id = '$it_id' order by ii_id ";
|
||||
$result = sql_query($sql, false);
|
||||
if (@mysql_num_rows($result)) {
|
||||
?>
|
||||
<!-- 상품정보고시 -->
|
||||
<table id="sit_inf_open">
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
?>
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php echo $row['ii_title']; ?></th>
|
||||
<td><?php echo $row['ii_value']; ?></th>
|
||||
</tr>
|
||||
<?php } //for?>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- 상품정보고시 end -->
|
||||
<?php } //if?>
|
||||
|
||||
</section>
|
||||
<!-- 상품설명 end -->
|
||||
|
||||
<section id="sit_ps">
|
||||
<h2>사용후기</h2>
|
||||
<?php echo pg_anchor('ps'); ?>
|
||||
|
||||
<?php
|
||||
$use_page_rows = 10; // 페이지당 목록수
|
||||
include_once('./itemuse.inc.php');
|
||||
?>
|
||||
</section>
|
||||
|
||||
<section id="sit_qna">
|
||||
<h2>상품문의</h2>
|
||||
<?php echo pg_anchor('qna'); ?>
|
||||
|
||||
<?php
|
||||
$qa_page_rows = 10; // 페이지당 목록수
|
||||
include_once('./itemqa.inc.php');
|
||||
?>
|
||||
</section>
|
||||
|
||||
|
||||
<?php if ($default['de_baesong_content']) { // 배송정보 내용이 있다면 ?>
|
||||
<section id="sit_dvr">
|
||||
<h2>배송정보</h2>
|
||||
<?php echo pg_anchor('dvr'); ?>
|
||||
|
||||
<?php echo conv_content($default['de_baesong_content'], 1); ?>
|
||||
</section>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php if ($default['de_change_content']) { // 교환/반품 내용이 있다면 ?>
|
||||
<section id="sit_ex">
|
||||
<h2>교환/반품</h2>
|
||||
<?php echo pg_anchor('ex'); ?>
|
||||
|
||||
<?php echo conv_content($default['de_change_content'], 1); ?>
|
||||
</section>
|
||||
<?php } ?>
|
||||
|
||||
<section id="sit_rel">
|
||||
<h2>관련상품</h2>
|
||||
<?php echo pg_anchor('rel'); ?>
|
||||
|
||||
<div class="sct_wrap">
|
||||
<?php
|
||||
$list_mod = $default['de_rel_list_mod'];
|
||||
$img_width = $default['de_rel_img_width'];
|
||||
$img_height = $default['de_rel_img_height'];
|
||||
$td_width = (int)(100 / $list_mod);
|
||||
|
||||
$sql = " select b.*
|
||||
from {$g4['shop_item_relation_table']} a
|
||||
left join {$g4['shop_item_table']} b on (a.it_id2=b.it_id)
|
||||
where a.it_id = '{$it['it_id']}'
|
||||
and b.it_use='1' ";
|
||||
$result = sql_query($sql);
|
||||
$num = @mysql_num_rows($result);
|
||||
if ($num)
|
||||
include G4_SHOP_PATH.'/maintype10.inc.php';
|
||||
else
|
||||
echo '<p class="sit_empty">이 상품과 관련된 상품이 없습니다.</p>';
|
||||
?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
// 이미지 미리보기
|
||||
$("#sit_pvi .img_thumb").bind("hover focus", function(){
|
||||
var img_src = $(this).attr("id").replace("_s", "_l1");
|
||||
$("#sit_pvi_big img").attr("src","<?php echo G4_DATA_URL; ?>/item/"+img_src); // 이미지 소스 교체
|
||||
$("#sit_pvi_big a").attr("id", img_src);
|
||||
});
|
||||
|
||||
// 상품이미지 크게보기
|
||||
$(".popup_item_image").click(function() {
|
||||
var it_id = "<?php echo $it['it_id']; ?>";
|
||||
var img = $(this).attr("id");
|
||||
|
||||
var top = 10;
|
||||
var left = 10;
|
||||
var url = "<?php echo G4_SHOP_URL; ?>/largeimage.php?it_id=" + it_id + "&img=" + img;
|
||||
var opt = 'scrollbars=yes,top='+top+',left='+left;
|
||||
popup_window(url, "largeimage", opt);
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$(".item_use_count").text("<?php echo $use_total_count; ?>");
|
||||
$(".item_qa_count").text("<?php echo $qa_total_count; ?>");
|
||||
$(".item_relation_count").text("<?php echo $item_relation_count; ?>");
|
||||
});
|
||||
|
||||
function qty_add(num)
|
||||
{
|
||||
var f = document.fitem;
|
||||
var qty = parseInt(f.ct_qty.value);
|
||||
if (num < 0 && qty <= 1)
|
||||
{
|
||||
alert("수량은 1 이상만 가능합니다.");
|
||||
qty = 1;
|
||||
}
|
||||
else if (num > 0 && qty >= 9999)
|
||||
{
|
||||
alert("수량은 9999 이하만 가능합니다.");
|
||||
qty = 9999;
|
||||
}
|
||||
else
|
||||
{
|
||||
qty = qty + num;
|
||||
}
|
||||
|
||||
f.ct_qty.value = qty;
|
||||
|
||||
amount_change();
|
||||
}
|
||||
|
||||
function get_amount(data)
|
||||
{
|
||||
var str = data.split(";");
|
||||
var num = parseInt(str[1]);
|
||||
if (isNaN(num)) {
|
||||
return 0;
|
||||
} else {
|
||||
return num;
|
||||
}
|
||||
}
|
||||
|
||||
function amount_change()
|
||||
{
|
||||
var basic_amount = parseInt("<?php echo get_amount($it); ?>");
|
||||
var basic_point = parseFloat("<?php echo $it['it_point']; ?>");
|
||||
var cust_amount = parseFloat("<?php echo $it['it_cust_amount']; ?>");
|
||||
|
||||
var f = document.fitem;
|
||||
var opt1 = 0;
|
||||
var opt2 = 0;
|
||||
var opt3 = 0;
|
||||
var opt4 = 0;
|
||||
var opt5 = 0;
|
||||
var opt6 = 0;
|
||||
var ct_qty = 0;
|
||||
|
||||
if (typeof(f.ct_qty) != 'undefined')
|
||||
ct_qty = parseInt(f.ct_qty.value);
|
||||
|
||||
if (typeof(f.it_opt1) != 'undefined') opt1 = get_amount(f.it_opt1.value);
|
||||
if (typeof(f.it_opt2) != 'undefined') opt2 = get_amount(f.it_opt2.value);
|
||||
if (typeof(f.it_opt3) != 'undefined') opt3 = get_amount(f.it_opt3.value);
|
||||
if (typeof(f.it_opt4) != 'undefined') opt4 = get_amount(f.it_opt4.value);
|
||||
if (typeof(f.it_opt5) != 'undefined') opt5 = get_amount(f.it_opt5.value);
|
||||
if (typeof(f.it_opt6) != 'undefined') opt6 = get_amount(f.it_opt6.value);
|
||||
|
||||
var amount = basic_amount + opt1 + opt2 + opt3 + opt4 + opt5 + opt6;
|
||||
var point = parseInt(basic_point);
|
||||
|
||||
if (typeof(f.it_amount) != 'undefined')
|
||||
f.it_amount.value = amount;
|
||||
|
||||
if (typeof(f.disp_sell_amount) != 'undefined')
|
||||
f.disp_sell_amount.value = number_format(String(amount * ct_qty));
|
||||
|
||||
if (typeof(f.disp_cust_amount) != 'undefined')
|
||||
f.disp_cust_amount.value = number_format(String(cust_amount * ct_qty));
|
||||
|
||||
if (typeof(f.it_point) != 'undefined') {
|
||||
f.it_point.value = point;
|
||||
f.disp_point.value = number_format(String(point * ct_qty));
|
||||
}
|
||||
}
|
||||
|
||||
<?php if (!$it['it_gallery']) { echo "amount_change();"; } // 처음시작시 한번 실행 ?>
|
||||
|
||||
// 바로구매 또는 장바구니 담기
|
||||
function fitemcheck(f, act)
|
||||
{
|
||||
// 판매가격이 0 보다 작다면
|
||||
if (f.it_amount.value < 0)
|
||||
{
|
||||
alert("전화로 문의해 주시면 감사하겠습니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
for (i=1; i<=6; i++)
|
||||
{
|
||||
if (typeof(f.elements["it_opt"+i]) != 'undefined')
|
||||
{
|
||||
if (f.elements["it_opt"+i].value == '선택') {
|
||||
alert(f.elements["it_opt"+i+"_subject"].value + '을(를) 선택하여 주십시오.');
|
||||
f.elements["it_opt"+i].focus();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (act == "direct_buy") {
|
||||
f.sw_direct.value = 1;
|
||||
} else {
|
||||
f.sw_direct.value = 0;
|
||||
}
|
||||
|
||||
if (!f.ct_qty.value) {
|
||||
alert("수량을 입력해 주십시오.");
|
||||
f.ct_qty.focus();
|
||||
return;
|
||||
} else if (isNaN(f.ct_qty.value)) {
|
||||
alert("수량을 숫자로 입력해 주십시오.");
|
||||
f.ct_qty.select();
|
||||
f.ct_qty.focus();
|
||||
return;
|
||||
} else if (parseInt(f.ct_qty.value) < 1) {
|
||||
alert("수량은 1 이상 입력해 주십시오.");
|
||||
f.ct_qty.focus();
|
||||
return;
|
||||
}
|
||||
|
||||
amount_change();
|
||||
|
||||
f.submit();
|
||||
}
|
||||
|
||||
function addition_write(element_id)
|
||||
{
|
||||
if (element_id.style.display == 'none') { // 안보이면 보이게 하고
|
||||
element_id.style.display = 'block';
|
||||
} else { // 보이면 안보이게 하고
|
||||
element_id.style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
var save_use_id = null;
|
||||
function use_menu(id)
|
||||
{
|
||||
if (save_use_id != null)
|
||||
document.getElementById(save_use_id).style.display = "none";
|
||||
menu(id);
|
||||
save_use_id = id;
|
||||
}
|
||||
|
||||
var save_qa_id = null;
|
||||
function qa_menu(id)
|
||||
{
|
||||
if (save_qa_id != null)
|
||||
document.getElementById(save_qa_id).style.display = "none";
|
||||
menu(id);
|
||||
save_qa_id = id;
|
||||
}
|
||||
|
||||
// 상품상세설명에 있는 이미지의 사이즈를 줄임
|
||||
// 삭제 대상 - 지운아빠 2013-05-03
|
||||
function explan_resize_image()
|
||||
{
|
||||
var image_width = 600;
|
||||
var div_explan = document.getElementById('div_explan');
|
||||
if (div_explan) {
|
||||
var explan_img = div_explan.getElementsByTagName('img');
|
||||
for(i=0;i<explan_img.length;i++)
|
||||
{
|
||||
//document.write(explan_img[i].src+"<br>");
|
||||
img = explan_img[i];
|
||||
if (img.width) {
|
||||
imgx = parseInt(img.width);
|
||||
imgy = parseInt(img.height);
|
||||
}
|
||||
else {
|
||||
imgx = parseInt(img.style.width);
|
||||
imgy = parseInt(img.style.height);
|
||||
}
|
||||
if (imgx > image_width)
|
||||
{
|
||||
image_height = parseFloat(imgx / imgy)
|
||||
if (img.width) {
|
||||
img.width = image_width;
|
||||
img.height = parseInt(image_width / image_height);
|
||||
}
|
||||
else {
|
||||
img.style.width = image_width;
|
||||
img.style.height = parseInt(image_width / image_height);
|
||||
}
|
||||
}
|
||||
/*
|
||||
// 이미지를 가운데로 정렬하는 경우에 주석을 풀어줌
|
||||
img.style.position = 'relative';
|
||||
img.style.left = '50%';
|
||||
img.style.marginLeft = '-300px'; // image_width 의 절반
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- 삭제 대상 -지운아빠 2013-05-03 -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
explan_resize_image();
|
||||
});
|
||||
</script>
|
||||
|
||||
</div><!-- #sit 끝 -->
|
||||
|
||||
<?php
|
||||
// 하단 HTML
|
||||
echo stripslashes($it['it_mobiletail_html']);
|
||||
|
||||
include_once('./_tail.php');
|
||||
?>
|
||||
102
mobile/shop/list.php
Normal file
102
mobile/shop/list.php
Normal file
@ -0,0 +1,102 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
$sql = " select *
|
||||
from {$g4['shop_category_table']}
|
||||
where ca_id = '$ca_id'
|
||||
and ca_use = '1' ";
|
||||
$ca = sql_fetch($sql);
|
||||
if (!$ca['ca_id'])
|
||||
alert('등록된 분류가 없습니다.');
|
||||
|
||||
$g4['title'] = $ca['ca_name'].' 상품리스트';
|
||||
|
||||
include_once('./_head.php');
|
||||
|
||||
// 스킨을 지정했다면 지정한 스킨을 사용함 (스킨의 다양화)
|
||||
//if ($skin) $ca[ca_skin] = $skin;
|
||||
|
||||
if ($is_admin)
|
||||
echo '<div class="sct_admin"><a href="'.G4_ADMIN_URL.'/shop_admin/categoryform.php?w=u&ca_id='.$ca_id.'" class="btn_admin">분류 관리</a></div>';
|
||||
?>
|
||||
|
||||
<div id="sct">
|
||||
|
||||
<?
|
||||
$nav_ca_id = $ca_id;
|
||||
include G4_SHOP_PATH.'/navigation1.inc.php';
|
||||
|
||||
// 상단 HTML
|
||||
echo '<div id="sct_hhtml">'.stripslashes($ca['ca_mobile_head_html']).'</div>';
|
||||
|
||||
include G4_MSHOP_PATH.'/listcategory3.inc.php';
|
||||
|
||||
// 상품 출력순서가 있다면
|
||||
if ($sort != "") {
|
||||
$order_by = $sort . ' '.$sortodr. ' , ';
|
||||
}
|
||||
|
||||
// 상품 (하위 분류의 상품을 모두 포함한다.)
|
||||
$sql_list1 = " select * ";
|
||||
$sql_list2 = " order by $order_by it_order, it_id desc ";
|
||||
|
||||
// 하위분류 포함
|
||||
// 판매가능한 상품만
|
||||
$sql_common = " from {$g4['shop_item_table']}
|
||||
where (ca_id like '{$ca_id}%'
|
||||
or ca_id2 like '{$ca_id}%'
|
||||
or ca_id3 like '{$ca_id}%')
|
||||
and it_use = '1' ";
|
||||
|
||||
$error = '<p class="sct_noitem">등록된 상품이 없습니다.</p>';
|
||||
|
||||
// 리스트 유형별로 출력
|
||||
$list_file = G4_SHOP_PATH.'/'.$ca['ca_mobile_skin'];
|
||||
if (file_exists($list_file)) {
|
||||
$list_mod = $ca['ca_mobile_list_mod'];
|
||||
$list_row = $ca['ca_mobile_list_row'];
|
||||
$img_width = $ca['ca_mobile_img_width'];
|
||||
$img_height = $ca['ca_mobile_img_height'];
|
||||
|
||||
include G4_MSHOP_PATH.'/list.sub.php';
|
||||
include G4_MSHOP_PATH.'/list.sort.php';
|
||||
|
||||
$sql = $sql_list1 . $sql_common . $sql_list2 . " limit $from_record, $items ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
echo '<div class="sct_wrap">';
|
||||
include $list_file;
|
||||
echo '</div>';
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$i = 0;
|
||||
$error = '<p class="sct_nofile">'.$ca['ca_mobile_skin'].' 파일을 찾을 수 없습니다.<br>관리자에게 알려주시면 감사하겠습니다.</p>';
|
||||
}
|
||||
|
||||
if ($i==0)
|
||||
{
|
||||
echo '<div>'.$error.'</div>';
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
// 하단 HTML
|
||||
echo '<div id="sct_thtml">'.stripslashes($ca['ca_mobile_tail_html']).'</div>';
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$qstr1 .= 'ca_id='.$ca_id;
|
||||
if($skin)
|
||||
$qstr1 .= '&skin='.$skin;
|
||||
$qstr1 .='&ev_id='.$ev_id.'&sort='.$sort.'&sortodr='.$sortodr;
|
||||
echo get_paging($config['cf_write_pages'], $page, $total_page, $_SERVER['PHP_SELF'].'?'.$qstr1.'&page=');
|
||||
?>
|
||||
|
||||
<?php
|
||||
include_once('./_tail.php');
|
||||
|
||||
echo "\n<!-- {$ca['ca_skin']} -->\n";
|
||||
?>
|
||||
47
mobile/shop/list.skin.10.php
Normal file
47
mobile/shop/list.skin.10.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
// $list_mod 가로 나열 수
|
||||
|
||||
for ($i=1; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$href = G4_SHOP_URL.'/item.php?it_id='.$row['it_id'];
|
||||
if ($list_mod >= 2) { // 1줄 이미지 : 2개 이상
|
||||
if ($i%$list_mod == 0) $sct_last = 'sct_last'; // 줄 마지막
|
||||
else if ($i%$list_mod == 1) $sct_last = 'sct_clear'; // 줄 첫번째
|
||||
else $sct_last = '';
|
||||
} else { // 1줄 이미지 : 1개
|
||||
$sct_last = 'sct_clear';
|
||||
}
|
||||
|
||||
$sns_title = get_text($row['it_name']).' | '.get_text($config['cf_title']);
|
||||
$sns_send = G4_SHOP_URL.'/sns_send.php?url='.urlencode(G4_SHOP_URL.'/item.php?it_id='.$row['it_id']);
|
||||
$sns_send .= '&title='.urlencode(cut_str($sns_title, 100));
|
||||
|
||||
if ($i == 1) echo '<ul class="sct sct_10">';
|
||||
?>
|
||||
<li class="sct_li <?php echo $sct_last; ?>">
|
||||
<a href="<?php echo $href; ?>" class="sct_a">
|
||||
<span class="sct_img"><?php echo get_it_image($row['it_id'].'_m', $img_width, $img_height); ?></span>
|
||||
<b><?php echo stripslashes($row['it_name']); ?></b>
|
||||
<?php if ($row['it_cust_amount'] && !$row['it_gallery']) { ?>
|
||||
<s><?php echo display_amount($row['it_cust_amount']); ?></s>
|
||||
<?php } ?>
|
||||
<?php if (!$row['it_gallery']) { // 전시 상품이 아닐 때 ?>
|
||||
<span class="sct_cost"><?php echo display_amount(get_amount($row), $row['it_tel_inq']); ?></span>
|
||||
<?php } ?>
|
||||
<span class="sct_icon">
|
||||
<?php echo display_item_icon($row); // 이미지 아이콘?>
|
||||
</span>
|
||||
</a>
|
||||
<div class="sct_sns">
|
||||
<a href="<?php echo $sns_send; ?>&sns=facebook" target="_blank"><img src="<?php echo G4_URL; ?>/img/shop/sns_fb.png" alt="페이스북에 공유"></a>
|
||||
<a href="<?php echo $sns_send; ?>&sns=twitter" target="_blank"><img src="<?php echo G4_URL; ?>/img/shop/sns_twt.png" alt="트위터에 공유"></a>
|
||||
<a href="<?php echo $sns_send; ?>&sns=google" target="_blank"><img src="<?php echo G4_URL; ?>/img/shop/sns_goo.png" alt="구글플러스에 공유"></a>
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
if ($i > 1) echo '</ul>';
|
||||
|
||||
if($i == 1) echo '<p class="sct_noitem">등록된 상품이 없습니다.</p>';
|
||||
?>
|
||||
26
mobile/shop/list.sort.php
Normal file
26
mobile/shop/list.sort.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
$sct_sort_href = $_SERVER['PHP_SELF'].'?ca_id='.$ca_id;
|
||||
if($skin)
|
||||
$sct_sort_href .= '&skin='.$skin;
|
||||
$sct_sort_href .= '&ev_id='.$ev_id.'&sort=';
|
||||
?>
|
||||
|
||||
<section id="sct_sort">
|
||||
<h2>상품 정렬</h2>
|
||||
<div>
|
||||
상품 <b><?php echo number_format($total_count); ?></b>개
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
<li><a href="<?php echo $sct_sort_href; ?>it_amount&sortodr=asc" class="btn01">낮은가격순</a></li>
|
||||
<li><a href="<?php echo $sct_sort_href; ?>it_amount&sortodr=desc" class="btn01">높은가격순</a></li>
|
||||
<li><a href="<?php echo $sct_sort_href; ?>it_name&sortodr=asc" class="btn01">상품명순</a></li>
|
||||
<li><a href="<?php echo $sct_sort_href; ?>it_type1&sortodr=desc" class="btn01">히트상품</a></li>
|
||||
<li><a href="<?php echo $sct_sort_href; ?>it_type2&sortodr=desc" class="btn01">추천상품</a></li>
|
||||
<li><a href="<?php echo $sct_sort_href; ?>it_type3&sortodr=desc" class="btn01">최신상품</a></li>
|
||||
<li><a href="<?php echo $sct_sort_href; ?>it_type4&sortodr=desc" class="btn01">인기상품</a></li>
|
||||
<li><a href="<?php echo $sct_sort_href; ?>it_type5&sortodr=desc" class="btn01">할인상품</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
19
mobile/shop/list.sub.php
Normal file
19
mobile/shop/list.sub.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 총몇개 = 한줄에 몇개 * 몇줄
|
||||
$items = $list_mod * $list_row;
|
||||
// <TD> 태그 폭
|
||||
$td_width = (int)(100 / $list_mod);
|
||||
|
||||
$sql = "select COUNT(*) as cnt $sql_common ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
// 전체 페이지 계산
|
||||
$total_page = ceil($total_count / $items);
|
||||
// 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
if ($page == "") $page = 1;
|
||||
// 시작 레코드 구함
|
||||
$from_record = ($page - 1) * $items;
|
||||
?>
|
||||
41
mobile/shop/maintype10.inc.php
Normal file
41
mobile/shop/maintype10.inc.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
// $list_mod 가로 나열 수
|
||||
|
||||
for ($i=1; $row=sql_fetch_array($result); $i++) {
|
||||
$href = G4_SHOP_URL.'/item.php?it_id='.$row['it_id'];
|
||||
if ($list_mod >= 2) { // 1줄 이미지 : 2개 이상
|
||||
if ($i%$list_mod == 0) $sct_last = 'sct_last'; // 줄 마지막
|
||||
else if ($i%$list_mod == 1) $sct_last = 'sct_clear'; // 줄 첫번째
|
||||
else $sct_last = '';
|
||||
} else { // 1줄 이미지 : 1개
|
||||
$sct_last = 'sct_clear';
|
||||
}
|
||||
|
||||
$sns_title = get_text($row['it_name']).' | '.get_text($config['cf_title']);
|
||||
$sns_send = G4_SHOP_URL.'/sns_send.php?url='.urlencode(G4_SHOP_URL.'/item.php?it_id='.$row['it_id']);
|
||||
$sns_send .= '&title='.urlencode(cut_str($sns_title, 100));
|
||||
|
||||
if ($i == 1) echo '<ul class="sct sct_10">';
|
||||
?>
|
||||
<li class="sct_li <?php echo $sct_last; ?>">
|
||||
<a href="<?php echo $href; ?>" class="sct_a">
|
||||
<span class="sct_img"><?php echo get_it_image($row['it_id'].'_m', $img_width, $img_height); ?></span>
|
||||
<b><?php echo stripslashes($row['it_name']); ?></b>
|
||||
<span class="sct_cost"><?php echo display_amount(get_amount($row), $row['it_tel_inq']); ?></span>
|
||||
<span class="sct_icon">
|
||||
<?php echo display_item_icon($row); // 이미지 아이콘?>
|
||||
</span>
|
||||
</a>
|
||||
<div class="sct_sns">
|
||||
<a href="<?php echo $sns_send; ?>&sns=facebook" target="_blank"><img src="<?php echo G4_URL; ?>/img/shop/sns_fb.png" alt="페이스북에 공유"></a>
|
||||
<a href="<?php echo $sns_send; ?>&sns=twitter" target="_blank"><img src="<?php echo G4_URL; ?>/img/shop/sns_twt.png" alt="트위터에 공유"></a>
|
||||
<a href="<?php echo $sns_send; ?>&sns=google" target="_blank"><img src="<?php echo G4_URL; ?>/img/shop/sns_goo.png" alt="구글플러스에 공유"></a>
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
if ($i > 1) echo '</ul>';
|
||||
|
||||
if($i == 1) echo '<p class="sct_noitem">등록된 상품이 없습니다.</p>';
|
||||
?>
|
||||
119
mobile/shop/mypage.php
Normal file
119
mobile/shop/mypage.php
Normal file
@ -0,0 +1,119 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
if (!$is_member)
|
||||
goto_url(G4_BBS_URL."/login.php?url=".urlencode(G4_SHOP_URL."/mypage.php"));
|
||||
|
||||
$g4['title'] = '마이페이지';
|
||||
include_once('./_head.php');
|
||||
?>
|
||||
|
||||
<img src="<?php echo G4_SHOP_URL; ?>/img/top_mypage.gif" border=0><p>
|
||||
|
||||
<table align=center width=100%>
|
||||
<tr>
|
||||
<td><B><?php echo $member['mb_name']; ?></B> 님의 마이페이지입니다.</td>
|
||||
<td align=right>
|
||||
<?php if ($is_admin == 'super') { echo "<a href='".G4_ADMIN_URL."/'><img src='".G4_SHOP_URL."/img/btn_admin.gif' border=0 align='absmiddle'></a>"; } ?>
|
||||
<a href='<?php echo G4_BBS_URL; ?>/member_confirm.php?url=register_form.php'><img src='<?php echo G4_SHOP_URL; ?>/img/my_modify.gif' border=0 align='absmiddle'></a>
|
||||
<a href="<?php echo G4_BBS_URL; ?>/member_confirm.php?url=member_leave.php" onclick="return member_leave();"><img src='<?php echo G4_SHOP_URL; ?>/img/my_leave.gif' border=0 align='absmiddle'></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script>
|
||||
function member_leave()
|
||||
{
|
||||
return confirm('정말 회원에서 탈퇴 하시겠습니까?')
|
||||
}
|
||||
</script>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 align=center background='<?php echo G4_SHOP_URL; ?>/img/my_bg.gif'>
|
||||
<tr><td colspan=4><img src='<?php echo G4_SHOP_URL; ?>/img/my_box01.gif'></td></tr>
|
||||
<tr>
|
||||
<td height=25> 보유포인트 </td>
|
||||
<td>: <a href="<?php echo G4_BBS_URL; ?>/point.php" target="_blank" class="win_point"><?php echo number_format($member['mb_point']); ?>점</a></td>
|
||||
<td>쪽지함</td>
|
||||
<td>: <a href="<?php echo G4_BBS_URL; ?>/memo.php" target="_blank" class="win_memo">쪽지보기</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height=25> 주소</td>
|
||||
<td>: <?php echo sprintf("(%s-%s) %s %s", $member['mb_zip1'], $member['mb_zip2'], $member['mb_addr1'], $member['mb_addr2']); ?></td>
|
||||
<td>회원권한</td>
|
||||
<td>: <?php echo $member['mb_level']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height=25> 연락처</td>
|
||||
<td>: <?php echo $member['mb_tel']; ?></td>
|
||||
<td>최종접속일시</td>
|
||||
<td>: <?php echo $member['mb_today_login']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height=25> E-mail</td>
|
||||
<td>: <?php echo $member['mb_email']; ?></td>
|
||||
<td>회원가입일시</td>
|
||||
<td>: <?php echo $member['mb_datetime']; ?></td>
|
||||
</tr>
|
||||
<tr><td colspan=4><img src='<?php echo G4_SHOP_URL; ?>/img/my_box02.gif'></td></tr>
|
||||
</table><BR><BR>
|
||||
|
||||
|
||||
<table width=98% cellpadding=0 cellspacing=0 align=center>
|
||||
<tr>
|
||||
<td height=35><img src='<?php echo G4_SHOP_URL; ?>/img/my_title01.gif'></td>
|
||||
<td align=right><a href='./orderinquiry.php'><img src='<?php echo G4_SHOP_URL; ?>/img/icon_more.gif' border=0></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
// 최근 주문내역
|
||||
define("_ORDERINQUIRY_", true);
|
||||
|
||||
$limit = " limit 0, 5 ";
|
||||
include G4_MSHOP_PATH.'/orderinquiry.sub.php';
|
||||
?>
|
||||
<br>
|
||||
|
||||
<table width=98% cellpadding=0 cellspacing=0 align=center>
|
||||
<tr>
|
||||
<td height=35 colspan=2><img src='<?php echo G4_SHOP_URL; ?>/img/my_title02.gif'></td>
|
||||
<td align=right><a href='./wishlist.php'><img src='<?php echo G4_SHOP_URL; ?>/img/icon_more.gif' border=0></a></td>
|
||||
</tr>
|
||||
<tr><td height=2 colspan=3 class=c1></td></tr>
|
||||
<tr align=center height=25 class=c2>
|
||||
<td colspan=2>상품명</td>
|
||||
<td>보관일시</td>
|
||||
</tr>
|
||||
<tr><td height=1 colspan=3 class=c1></td></tr>
|
||||
<?php
|
||||
$sql = " select *
|
||||
from {$g4['shop_wish_table']} a,
|
||||
{$g4['shop_item_table']} b
|
||||
where a.mb_id = '{$member['mb_id']}'
|
||||
and a.it_id = b.it_id
|
||||
order by a.wi_id desc
|
||||
limit 0, 3 ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row = sql_fetch_array($result); $i++)
|
||||
{
|
||||
if ($i>0)
|
||||
echo "<tr><td colspan=3 height=1 background='".G4_SHOP_URL."/img/dot_line.gif'></td></tr>";
|
||||
|
||||
$image = get_it_image($row['it_id']."_s", 50, 50, $row['it_id']);
|
||||
|
||||
echo "<tr align=center height=60>";
|
||||
echo "<td width=100>$image</td>";
|
||||
echo "<td align=left><a href='./item.php?it_id={$row['it_id']}'>".stripslashes($row['it_name'])."</a></td>";
|
||||
echo "<td>$row[wi_time]</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
if ($i == 0)
|
||||
echo "<tr><td colspan=3 height=100 align=center><span class=point>보관 내역이 없습니다.</span></td></tr>";
|
||||
?>
|
||||
<tr><td height=1 colspan=3 bgcolor=#94D7E7></td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
<?php
|
||||
include_once("./_tail.php");
|
||||
?>
|
||||
29
mobile/shop/settle_kcp.inc.php
Normal file
29
mobile/shop/settle_kcp.inc.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
$test = "";
|
||||
|
||||
if ($default['de_card_test']) {
|
||||
if ($default['de_escrow_use'] == 1) {
|
||||
// 에스크로결제 테스트
|
||||
$default['de_kcp_mid'] = "T0007";
|
||||
$default['de_kcp_site_key'] = '2.mDT7R4lUIfHlHq4byhYjf__';
|
||||
}
|
||||
else {
|
||||
// 일반결제 테스트
|
||||
$default['de_kcp_mid'] = "T0000";
|
||||
$default['de_kcp_site_key'] = '3grptw1.zW0GSo4PQdaGvsF__';
|
||||
}
|
||||
|
||||
$test = "_test";
|
||||
}
|
||||
else {
|
||||
$default['de_kcp_mid'] = "SR".$default['de_kcp_mid'];
|
||||
}
|
||||
|
||||
|
||||
$g_conf_js_url = "https://pay.kcp.co.kr/plugin/payplus{$test}_un.js";
|
||||
|
||||
$g_conf_log_level = "3"; // 변경불가
|
||||
$g_conf_gw_port = "8090"; // 포트번호(변경불가)
|
||||
?>
|
||||
148
mobile/shop/wishlist.php
Normal file
148
mobile/shop/wishlist.php
Normal file
@ -0,0 +1,148 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
if (!$is_member)
|
||||
goto_url(G4_BBS_URL."/login.php?url=".urlencode(G4_SHOP_URL.'/mypage.php'));
|
||||
|
||||
$g4['title'] = "보관함";
|
||||
include_once('./_head.php');
|
||||
?>
|
||||
|
||||
<div id="sod_ws">
|
||||
|
||||
<form name="fwishlist" method="post" action="">
|
||||
<input type="hidden" name="act" value="multi">
|
||||
<input type="hidden" name="sw_direct" value="">
|
||||
<input type="hidden" name="prog" value="wish">
|
||||
|
||||
<table class="basic_tbl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">선택</th>
|
||||
<th scope="col">이미지</th>
|
||||
<th scope="col">상품명</th>
|
||||
<th scope="col">보관일시</th>
|
||||
<th scope="col">삭제</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$sql = " select *
|
||||
from {$g4['shop_wish_table']} a,
|
||||
{$g4['shop_item_table']} b
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
$it_amount = get_amount($row);
|
||||
|
||||
if ($row['it_tel_inq']) $out_cd = 'tel_inq';
|
||||
|
||||
$image = get_it_image($row['it_id'].'_s', 70, 70, '');
|
||||
|
||||
$s_del = '';
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="td_chk">
|
||||
<?php
|
||||
// 품절검사
|
||||
$it_stock_qty = get_it_stock_qty($row['it_id']);
|
||||
if($it_stock_qty <= 0)
|
||||
{
|
||||
?>
|
||||
품절
|
||||
<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; ?>');">
|
||||
<?php } ?>
|
||||
<input type="hidden" name="it_name[<?php echo $i; ?>]" value="<?php echo $row['it_name']; ?>">
|
||||
<input type="hidden" name="it_amount[<?php echo $i; ?>]" value="<?php echo $it_amount; ?>">
|
||||
<input type="hidden" name="it_point[<?php echo $i; ?>]" value="<?php echo $row['it_point']; ?>">
|
||||
<input type="hidden" name="ct_qty[<?php echo $i; ?>]" value="1">
|
||||
</td>
|
||||
<td class="sod_ws_img"><?php echo $image; ?></td>
|
||||
<td><a href="./item.php?it_id=<?php echo $row['it_id']; ?>"><?php echo stripslashes($row['it_name']); ?></a></td>
|
||||
<td class="td_datetime"><?php echo $row['wi_time']; ?></td>
|
||||
<td class="td_smallmng"><a href="./wishupdate.php?w=d&wi_id=<?php echo $row['wi_id']; ?>">삭제</a></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="5" class="empty_table">보관함이 비었습니다.</td></tr>';
|
||||
?>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script language="JavaScript">
|
||||
<!--
|
||||
function out_cd_check(fld, out_cd)
|
||||
{
|
||||
if (out_cd == 'no'){
|
||||
alert("옵션이 있는 상품입니다.\n\n상품을 클릭하여 상품페이지에서 옵션을 선택한 후 주문하십시오.");
|
||||
fld.checked = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (out_cd == 'tel_inq'){
|
||||
alert("이 상품은 전화로 문의해 주십시오.\n\n장바구니에 담아 구입하실 수 없습니다.");
|
||||
fld.checked = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function fwishlist_check(f, act)
|
||||
{
|
||||
var k = 0;
|
||||
var length = f.elements.length;
|
||||
|
||||
for(i=0; i<length; i++) {
|
||||
if (f.elements[i].checked) {
|
||||
k++;
|
||||
}
|
||||
}
|
||||
|
||||
if(k == 0)
|
||||
{
|
||||
alert("상품을 하나 이상 체크 하십시오");
|
||||
return;
|
||||
}
|
||||
|
||||
if (act == "direct_buy")
|
||||
{
|
||||
f.sw_direct.value = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
f.sw_direct.value = 0;
|
||||
}
|
||||
|
||||
f.action="./cartupdate.php";
|
||||
|
||||
f.submit();
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./_tail.php');
|
||||
?>
|
||||
Reference in New Issue
Block a user