경로 및 전체테이블명 변경
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
<?
|
||||
include_once("../common.php");
|
||||
if (!defined('G4_USE_SHOP') || !G4_USE_SHOP)
|
||||
die("현재 쇼핑몰 사용 안함으로 설정되어 있습니다.<br>config.user.php 에 define('G4_USE_SHOP', true); 로 설정해 주세요.");
|
||||
die('<p>현재 쇼핑몰 사용 안함으로 설정되어 있습니다.</p><p>'.G4_EXTEND_DIR.'/shop.config.php 에 define(\'G4_USE_SHOP\', true); 로 설정해 주세요.</p>');
|
||||
?>
|
||||
@ -3,7 +3,7 @@ include_once("./_common.php");
|
||||
|
||||
if ($_COOKIE[ck_bn_id] != $bn_id)
|
||||
{
|
||||
$sql = " update $g4[yc4_banner_table] set bn_hit = bn_hit + 1 where bn_id = '$bn_id' ";
|
||||
$sql = " update $g4[shop_banner_table] set bn_hit = bn_hit + 1 where bn_id = '$bn_id' ";
|
||||
sql_query($sql);
|
||||
// 하루 동안
|
||||
setcookie("ck_bn_id", $bn_id, 60*60*24, $default[de_cookie_dir], $default[de_cookie_domain]);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?
|
||||
// 배너 출력
|
||||
$sql = " select * from $g4[yc4_banner_table]
|
||||
$sql = " select * from $g4[shop_banner_table]
|
||||
where '$g4[time_ymdhis]' between bn_begin_time and bn_end_time
|
||||
and bn_position = '$position'
|
||||
order by bn_order, bn_id desc ";
|
||||
|
||||
@ -15,7 +15,7 @@ if($sw_direct != 1)
|
||||
else
|
||||
$hsw_direct = 1;
|
||||
|
||||
$hsql = " select a.it_id, b.it_name, a.ct_qty from {$g4['yc4_cart_table']} a left join {$g4['yc4_item_table']} b on ( a.it_id = b.it_id )
|
||||
$hsql = " select a.it_id, b.it_name, a.ct_qty from {$g4['shop_cart_table']} a left join {$g4['shop_item_table']} b on ( a.it_id = b.it_id )
|
||||
where $hsql_where
|
||||
and a.it_id = b.it_id
|
||||
and a.ct_direct = '$hsw_direct'
|
||||
|
||||
@ -12,7 +12,7 @@ $sub_menu_left = 100; // 2단계 메뉴 왼쪽 좌표 (1단계 좌표에서 부
|
||||
<tr><td align=center valign=top height=50><img src='<?=G4_SHOP_IMG_URL?>/bar_category.gif'></td></tr>
|
||||
<?
|
||||
// 1단계 분류 판매가능한것만
|
||||
$hsql = " select ca_id, ca_name from $g4[yc4_category_table]
|
||||
$hsql = " select ca_id, ca_name from $g4[shop_category_table]
|
||||
where length(ca_id) = '2'
|
||||
and ca_use = '1'
|
||||
order by ca_id ";
|
||||
@ -24,7 +24,7 @@ for ($i=0; $row=sql_fetch_array($hresult); $i++)
|
||||
$menubody = "";
|
||||
$onmouseover = "";
|
||||
$onmouseout = "";
|
||||
$sql2 = " select ca_id, ca_name from $g4[yc4_category_table]
|
||||
$sql2 = " select ca_id, ca_name from $g4[shop_category_table]
|
||||
where LENGTH(ca_id) = '4'
|
||||
and SUBSTRING(ca_id,1,2) = '$row[ca_id]'
|
||||
and ca_use = '1'
|
||||
|
||||
@ -5,7 +5,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
<table bgcolor=#FFFFFF width=100% cellpadding=0 cellspacing=0>
|
||||
<tr><td align=center valign=top height=50><img src='<?=G4_SHOP_IMG_URL?>/bar_event.gif'></td></tr>
|
||||
<?
|
||||
$hsql = " select ev_id, ev_subject from $g4[yc4_event_table] where ev_use = '1' order by ev_id desc ";
|
||||
$hsql = " select ev_id, ev_subject from $g4[shop_event_table] where ev_use = '1' order by ev_id desc ";
|
||||
$hresult = sql_query($hsql);
|
||||
for ($i=0; $row=sql_fetch_array($hresult); $i++)
|
||||
{
|
||||
|
||||
@ -57,7 +57,7 @@ for ($i=1; $i<=$tv_idx; $i++)
|
||||
{
|
||||
$tv_it_id = get_session("ss_tv[$i]");
|
||||
$sqlx = " select it_name, it_img1, it_img2, it_img3, it_img4, it_img5, it_img6, it_img7, it_img8, it_img9, it_img10
|
||||
from $g4[yc4_item_table] where it_id = '$tv_it_id' ";
|
||||
from $g4[shop_item_table] where it_id = '$tv_it_id' ";
|
||||
$rowx = sql_fetch($sqlx);
|
||||
$it_name = get_text(addslashes($rowx['it_name']));
|
||||
$tv_filepath = G4_DATA_PATH.'/item/'.$tv_it_id;
|
||||
|
||||
@ -5,7 +5,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
<table cellpadding=0 cellspacing=0 bgcolor=#FFFFFF>
|
||||
<tr><td><a href='<?=G4_SHOP_URL?>/wishlist.php'><img src='<?=G4_SHOP_IMG_URL?>/bar_wishlist.gif' border=0></a></td></tr>
|
||||
<?
|
||||
$hsql = " select a.it_id, b.it_name from $g4[yc4_wish_table] a, $g4[yc4_item_table] b
|
||||
$hsql = " select a.it_id, b.it_name 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 ";
|
||||
|
||||
@ -7,7 +7,7 @@ if(!$is_member) {
|
||||
|
||||
// 상품정보
|
||||
$sql = " select it_id, it_nocoupon, ca_id, ca_id2, ca_id3, it_notax
|
||||
from {$g4['yc4_item_table']}
|
||||
from {$g4['shop_item_table']}
|
||||
where it_id = '$it_id' ";
|
||||
$it = sql_fetch($sql);
|
||||
|
||||
@ -27,7 +27,7 @@ for($i=0; $i<3; $i++) {
|
||||
}
|
||||
|
||||
$ca_id = $it["ca_id$no"];
|
||||
$sql = " select ca_nocoupon from {$g4['yc4_category_table']} where ca_id = '$ca_id' ";
|
||||
$sql = " select ca_nocoupon from {$g4['shop_category_table']} where ca_id = '$ca_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if($row['ca_nocoupon']) {
|
||||
@ -41,7 +41,7 @@ $uq_id = get_session('ss_uniqid');
|
||||
if($sw_direct != 1)
|
||||
$sw_direct = 0;
|
||||
|
||||
$sql_common = " from ( select * from {$g4['yc4_cart_table']}
|
||||
$sql_common = " from ( select * from {$g4['shop_cart_table']}
|
||||
where uq_id = '$uq_id'
|
||||
and it_id = '$it_id'
|
||||
and ct_direct = '$sw_direct'
|
||||
@ -63,7 +63,7 @@ if($ct['item_amount']) {
|
||||
|
||||
// 총주문금액
|
||||
$sql = " select SUM((ct_amount + it_amount) * ct_qty) as total_amount
|
||||
from {$g4['yc4_cart_table']}
|
||||
from {$g4['shop_cart_table']}
|
||||
where uq_id = '$uq_id'
|
||||
and ct_direct = '$sw_direct' ";
|
||||
$row = sql_fetch($sql);
|
||||
@ -100,8 +100,8 @@ else if($default['de_send_cost_case'] == "상한") {
|
||||
b.it_sc_type,
|
||||
b.it_sc_basic,
|
||||
b.it_sc_condition
|
||||
from ( select * from {$g4['yc4_cart_table']} where uq_id = '$uq_id' and ct_direct = '$sw_direct' order by ct_id asc ) as a,
|
||||
{$g4['yc4_item_table']} b
|
||||
from ( select * from {$g4['shop_cart_table']} where uq_id = '$uq_id' and ct_direct = '$sw_direct' order by ct_id asc ) as a,
|
||||
{$g4['shop_item_table']} b
|
||||
where a.it_id = b.it_id
|
||||
group by a.it_id
|
||||
order by a.ct_id ";
|
||||
@ -131,7 +131,7 @@ else if($default['de_send_cost_case'] == "상한") {
|
||||
|
||||
// 쿠폰정보
|
||||
$sql = " select *
|
||||
from {$g4['yc4_coupon_table']}
|
||||
from {$g4['shop_coupon_table']}
|
||||
where cp_use = '1'
|
||||
and cp_type = '0'
|
||||
and cp_start <= '{$g4['time_ymd']}'
|
||||
@ -157,7 +157,7 @@ for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
|
||||
// 쿠폰사용내역체크
|
||||
$sql = " select ch_no
|
||||
from {$g4['yc4_coupon_history_table']}
|
||||
from {$g4['shop_coupon_history_table']}
|
||||
where cp_id = '{$row['cp_id']}'
|
||||
and it_id = '$it_id'
|
||||
and mb_id = '{$member['mb_id']}'
|
||||
|
||||
@ -3,7 +3,7 @@ include_once('./_common.php');
|
||||
|
||||
// 상품정보
|
||||
$sql = " select it_id, it_option_use, it_opt1_subject, it_opt2_subject, it_opt3_subject, it_opt1, it_opt2, it_opt3, it_supplement_use
|
||||
from {$g4['yc4_item_table']}
|
||||
from {$g4['shop_item_table']}
|
||||
where it_id = '$it_id' ";
|
||||
$it = sql_fetch($sql);
|
||||
|
||||
@ -17,7 +17,7 @@ if($sw_direct != 1)
|
||||
$s_uq_id = get_session('ss_uniqid');
|
||||
|
||||
$sql = " select ct_id, ct_send_cost_pay
|
||||
from {$g4['yc4_cart_table']}
|
||||
from {$g4['shop_cart_table']}
|
||||
where uq_id = '$s_uq_id' and it_id = '$it_id' and ct_direct = '$sw_direct' and ct_status = '쇼핑'
|
||||
order by ct_id asc
|
||||
limit 0, 1 ";
|
||||
@ -29,7 +29,7 @@ $ct_parent = $temp['ct_id'];
|
||||
$sql_where = " where uq_id = '$s_uq_id' and it_id = '$it_id' and ct_direct = '$sw_direct' ";
|
||||
|
||||
$sql = " select ct_id, ct_parent, is_option, it_id, it_name, opt_id, ct_option, it_amount, ct_amount, ct_qty
|
||||
from {$g4['yc4_cart_table']}
|
||||
from {$g4['shop_cart_table']}
|
||||
$sql_where
|
||||
order by ct_id asc ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
include_once('./_common.php');
|
||||
|
||||
// 상품정보
|
||||
$sql = " select it_id, it_name from {$g4['yc4_item_table']} where it_id = '$it_id' ";
|
||||
$sql = " select it_id, it_name from {$g4['shop_item_table']} where it_id = '$it_id' ";
|
||||
$it = sql_fetch($sql);
|
||||
|
||||
if(!$it['it_id']) {
|
||||
@ -46,11 +46,11 @@ for($i=0; $i<$count; $i++) {
|
||||
$is_delete = $_POST['is_delete'][$i];
|
||||
|
||||
if($is_delete) { // 옵션삭제
|
||||
$sql = " delete from {$g4['yc4_cart_table']} where uq_id = '$s_uq_id' and ct_id = '$ct_id' ";
|
||||
$sql = " delete from {$g4['shop_cart_table']} where uq_id = '$s_uq_id' and ct_id = '$ct_id' ";
|
||||
sql_query($sql);
|
||||
} else { // 옵션수정
|
||||
$ct_qty = $_POST['ct_qty'][$i];
|
||||
$sql = " update {$g4['yc4_cart_table']} set ct_qty = '$ct_qty' where uq_id = '$s_uq_id' and ct_id = '$ct_id' ";
|
||||
$sql = " update {$g4['shop_cart_table']} set ct_qty = '$ct_qty' where uq_id = '$s_uq_id' and ct_id = '$ct_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
} else { // 옵션추가
|
||||
@ -69,7 +69,7 @@ for($i=0; $i<$count; $i++) {
|
||||
$amount = 0;
|
||||
}
|
||||
|
||||
$sql = " insert into {$g4['yc4_cart_table']}
|
||||
$sql = " insert into {$g4['shop_cart_table']}
|
||||
set uq_id = '$s_uq_id',
|
||||
ct_parent = '$ct_parent',
|
||||
mb_id = '{$member['mb_id']}',
|
||||
@ -96,11 +96,11 @@ for($i=0; $i<$count; $i++) {
|
||||
if($ct_parent_check) {
|
||||
$temp_ct_id = mysql_insert_id();
|
||||
|
||||
$sql1 = " select count(*) as cnt from {$g4['yc4_cart_table']} where uq_id = '$s_uq_id' and it_id = '$it_id' and ct_direct = '$sw_direct' ";
|
||||
$sql1 = " select count(*) as cnt from {$g4['shop_cart_table']} where uq_id = '$s_uq_id' and it_id = '$it_id' and ct_direct = '$sw_direct' ";
|
||||
$row1 = sql_fetch($sql1);
|
||||
|
||||
if($row1['cnt'] == 1) {
|
||||
sql_query(" update {$g4['yc4_cart_table']} set ct_parent = '0' where ct_id = '$temp_ct_id' ");
|
||||
sql_query(" update {$g4['shop_cart_table']} set ct_parent = '0' where ct_id = '$temp_ct_id' ");
|
||||
$ct_parent = $temp_ct_id;
|
||||
}
|
||||
|
||||
|
||||
@ -90,7 +90,7 @@ $sql = " select a.ct_id,
|
||||
b.it_supplement_use,
|
||||
b.it_nocoupon,
|
||||
b.it_notax
|
||||
from {$g4['yc4_cart_table']} as a left join {$g4['yc4_item_table']} as b on ( a.it_id = b.it_id )
|
||||
from {$g4['shop_cart_table']} as a left join {$g4['shop_item_table']} as b on ( a.it_id = b.it_id )
|
||||
where $sql_where
|
||||
and a.ct_parent = '0'
|
||||
and a.ct_direct = '$sw_direct' ";
|
||||
@ -114,7 +114,7 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
SUM(cp_amount) as dc_amount,
|
||||
SUM(ct_point * ct_qty) as sum_point,
|
||||
SUM(ct_qty) as sum_qty
|
||||
from {$g4['yc4_cart_table']}
|
||||
from {$g4['shop_cart_table']}
|
||||
where ct_id = '{$row['ct_id']}'
|
||||
or ct_parent = '{$row['ct_id']}' ";
|
||||
$sum = sql_fetch($sql);
|
||||
@ -132,13 +132,13 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
// 선택, 추가 옵션개수
|
||||
$opt_count = $spl_count = 0;
|
||||
if($row['it_option_use']) {
|
||||
$sql2 = " select COUNT(*) as cnt from {$g4['yc4_option_table']} where it_id = '{$row['it_id']}' ";
|
||||
$sql2 = " select COUNT(*) as cnt from {$g4['shop_option_table']} where it_id = '{$row['it_id']}' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
$opt_count = (int)$row2['cnt'];
|
||||
}
|
||||
$spl_count = 0;
|
||||
if($row['it_supplement_use']) {
|
||||
$sql2 = " select COUNT(*) as cnt from {$g4['yc4_supplement_table']} where it_id = '{$row['it_id']}' ";
|
||||
$sql2 = " select COUNT(*) as cnt from {$g4['shop_supplement_table']} where it_id = '{$row['it_id']}' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
$spl_count = (int)$row2['cnt'];
|
||||
}
|
||||
@ -207,7 +207,7 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
if($is_member) {
|
||||
// 상품에 쿠폰 있는지 체크
|
||||
$sql3 = " select cp_id, ca_id
|
||||
from {$g4['yc4_coupon_table']}
|
||||
from {$g4['shop_coupon_table']}
|
||||
where cp_use = '1'
|
||||
and cp_type = '0'
|
||||
and cp_start <= '{$g4['time_ymd']}'
|
||||
@ -221,7 +221,7 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
for($k=0; $row3=sql_fetch_array($result3); $k++) {
|
||||
// 쿠폰제외카테고리체크
|
||||
$sql4 = " select ca_nocoupon
|
||||
from {$g4['yc4_category_table']}
|
||||
from {$g4['shop_category_table']}
|
||||
where ca_id = '{$row3['ca_id']}' ";
|
||||
$row4 = sql_fetch($sql4);
|
||||
if($row4['ca_nocoupon']) {
|
||||
@ -230,7 +230,7 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
|
||||
// 쿠폰사용여부체크
|
||||
$sql4 = " select uq_id
|
||||
from {$g4['yc4_coupon_history_table']}
|
||||
from {$g4['shop_coupon_history_table']}
|
||||
where cp_id = '{$row3['cp_id']}'
|
||||
and it_id = '{$row['it_id']}'
|
||||
and mb_id = '{$member['mb_id']}' ";
|
||||
@ -332,7 +332,7 @@ if ($i == 0) {
|
||||
$send_cost += 0;
|
||||
} else {
|
||||
$sql = " select it_sc_type, it_sc_basic, it_sc_method, it_sc_condition
|
||||
from {$g4['yc4_item_table']}
|
||||
from {$g4['shop_item_table']}
|
||||
where it_id = '{$itemlist[$i]['it_id']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
@ -355,7 +355,7 @@ if ($i == 0) {
|
||||
}
|
||||
|
||||
// 이미 주문된 내역을 보여주는것이므로 주문서에서 얻는다.
|
||||
$sql = "select od_send_cost, od_send_coupon, od_send_cost_area, od_coupon_amount from {$g4['yc4_order_table']} where od_id = '$od_id' ";
|
||||
$sql = "select od_send_cost, od_send_coupon, od_send_cost_area, od_coupon_amount 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'] - $row['od_send_coupon'];
|
||||
|
||||
@ -28,7 +28,7 @@ if($default['de_guest_cart_use']) {
|
||||
|
||||
if ($act == 'alldelete') // 모두 삭제이면
|
||||
{
|
||||
$sql = " delete from {$g4['yc4_cart_table']}
|
||||
$sql = " delete from {$g4['shop_cart_table']}
|
||||
where uq_id = '$uq_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
@ -41,7 +41,7 @@ else if ($act == 'seldelete') // 선택 삭제이면
|
||||
|
||||
for($k=0; $k<$sel_count; $k++) {
|
||||
$ct_id = $_POST['ct_chk'][$k];
|
||||
$sql = " delete from {$g4['yc4_cart_table']} where uq_id = '$uq_id' and ( ct_id = '$ct_id' or ct_parent = '$ct_id' ) ";
|
||||
$sql = " delete from {$g4['shop_cart_table']} where uq_id = '$uq_id' and ( ct_id = '$ct_id' or ct_parent = '$ct_id' ) ";
|
||||
sql_query($sql);
|
||||
}
|
||||
}
|
||||
@ -52,7 +52,7 @@ else if($act == 'selectedbuy') // 선택주문이면
|
||||
alert("주문하실 상품을 1개 이상 선택해 주세요.");
|
||||
|
||||
// 이전 선택주문 상품 초기화
|
||||
$sql = " update {$g4['yc4_cart_table']}
|
||||
$sql = " update {$g4['shop_cart_table']}
|
||||
set ct_selected = '0'
|
||||
where uq_id = '$uq_id' ";
|
||||
sql_query($sql);
|
||||
@ -63,7 +63,7 @@ else if($act == 'selectedbuy') // 선택주문이면
|
||||
if(!$chk_id)
|
||||
continue;
|
||||
|
||||
$sql = " update {$g4['yc4_cart_table']}
|
||||
$sql = " update {$g4['shop_cart_table']}
|
||||
set ct_selected = '1'
|
||||
where ct_id = '$chk_id'
|
||||
or ct_parent = '$chk_id' ";
|
||||
@ -90,7 +90,7 @@ else if ($act == 'allupdate') // 수량 변경이면 : 모두 수정이면
|
||||
$ct_id = $_POST['ct_id'][$i];
|
||||
if($ct_id) {
|
||||
// 상품1개일 때만 수량변경
|
||||
$sql = " select count(ct_id) as cnt from {$g4['yc4_cart_table']} where uq_id = '$uq_id' and it_id = '{$_POST['it_id'][$i]}' ";
|
||||
$sql = " select count(ct_id) as cnt from {$g4['shop_cart_table']} where uq_id = '$uq_id' and it_id = '{$_POST['it_id'][$i]}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if($row['cnt'] > 1) {
|
||||
continue;
|
||||
@ -106,7 +106,7 @@ else if ($act == 'allupdate') // 수량 변경이면 : 모두 수정이면
|
||||
}
|
||||
|
||||
// 수량수정
|
||||
$sql = " update {$g4['yc4_cart_table']}
|
||||
$sql = " update {$g4['shop_cart_table']}
|
||||
set ct_qty = '{$_POST['ct_qty'][$i]}'
|
||||
where ct_id = '$ct_id'
|
||||
and uq_id = '$uq_id' ";
|
||||
@ -126,7 +126,7 @@ else // 장바구니에 담기
|
||||
|
||||
// 상품정보
|
||||
$sql = " select it_id, it_use, it_gallery, it_tel_inq, it_option_use, it_supplement_use
|
||||
from {$g4['yc4_item_table']} where it_id = '{$_POST['it_id']}' ";
|
||||
from {$g4['shop_item_table']} where it_id = '{$_POST['it_id']}' ";
|
||||
$it = sql_fetch($sql);
|
||||
|
||||
// 주문가능한 상품인지
|
||||
@ -137,7 +137,7 @@ else // 장바구니에 담기
|
||||
// 비회원가격과 회원가격이 다르다면
|
||||
if (!$is_member && $default['de_different_msg'])
|
||||
{
|
||||
$sql = " select it_amount, it_amount2 from {$g4['yc4_item_table']} where it_id = '{$_POST['it_id']}' ";
|
||||
$sql = " select it_amount, it_amount2 from {$g4['shop_item_table']} where it_id = '{$_POST['it_id']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['it_amount2'] && $row['it_amount'] != $row['it_amount2']) {
|
||||
echo "<meta http-equiv=\"content-type\" content=\"text/html; charset=".$g4['charset']."\">";
|
||||
@ -185,10 +185,10 @@ else // 장바구니에 담기
|
||||
if($is_option) {
|
||||
// 주문가능한 옵션인지
|
||||
if($is_option == 1) {
|
||||
$sql1 = " select opt_use as option_use from {$g4['yc4_option_table']}
|
||||
$sql1 = " select opt_use as option_use from {$g4['shop_option_table']}
|
||||
where it_id = '{$_POST['it_id']}' and opt_id = '$opt_id' ";
|
||||
} else {
|
||||
$sql1 = " select sp_use as option_use from {$g4['yc4_supplement_table']}
|
||||
$sql1 = " select sp_use as option_use from {$g4['shop_supplement_table']}
|
||||
where it_id = '{$_POST['it_id']}' and sp_id = '$opt_id' ";
|
||||
}
|
||||
$row1 = sql_fetch($sql1);
|
||||
@ -201,14 +201,14 @@ else // 장바구니에 담기
|
||||
}
|
||||
|
||||
// 이미 장바구니에 있는 같은 옵션의 수량합계를 구한다.
|
||||
$sql = " select SUM(ct_qty) as cnt from {$g4['yc4_cart_table']}
|
||||
$sql = " select SUM(ct_qty) as cnt from {$g4['shop_cart_table']}
|
||||
where it_id = '{$_POST['it_id']}' and opt_id = '$opt_id' and uq_id <> '$uq_id' and is_option = '$is_option' and ct_status = '쇼핑' ";
|
||||
$row = sql_fetch($sql);
|
||||
$cart_qty = $row['cnt'];
|
||||
$stock_qty = get_option_stock_qty($_POST['it_id'], $opt_id, $is_option);
|
||||
} else {
|
||||
// 이미 장바구니에 있는 같은 상품의 수량합계를 구한다.
|
||||
$sql = " select SUM(ct_qty) as cnt from {$g4['yc4_cart_table']}
|
||||
$sql = " select SUM(ct_qty) as cnt from {$g4['shop_cart_table']}
|
||||
where it_id = '{$_POST['it_id']}' and uq_id <> '$uq_id' and is_option = '$is_option' and ct_status = '쇼핑' ";
|
||||
$row = sql_fetch($sql);
|
||||
$cart_qty = $row['cnt'];
|
||||
@ -229,10 +229,10 @@ else // 장바구니에 담기
|
||||
//--------------------------------------------------------
|
||||
|
||||
// 바로구매에 있던 장바구니 자료를 지운다.
|
||||
$result = sql_query(" delete from {$g4['yc4_cart_table']} where uq_id = '$uq_id' and ct_direct = 1 ", false);
|
||||
$result = sql_query(" delete from {$g4['shop_cart_table']} where uq_id = '$uq_id' and ct_direct = 1 ", false);
|
||||
if (!$result) {
|
||||
// 삭제중 에러가 발생했다면 필드가 없다는 것이므로 바로구매 필드를 생성한다.
|
||||
sql_query(" ALTER TABLE `{$g4['yc4_cart_table']}` ADD `ct_direct` TINYINT NOT NULL ");
|
||||
sql_query(" ALTER TABLE `{$g4['shop_cart_table']}` ADD `ct_direct` TINYINT NOT NULL ");
|
||||
}
|
||||
|
||||
// 포인트 사용하지 않는다면
|
||||
@ -260,17 +260,17 @@ else // 장바구니에 담기
|
||||
// No옵션 상품이 장바구니에 있는치 체크, 있으면 수량변경
|
||||
$nopt_count = 0;
|
||||
if($is_option == 0 && !$sw_direct) {
|
||||
$sql2 = " select count(*) as cnt from {$g4['yc4_cart_table']}
|
||||
$sql2 = " select count(*) as cnt from {$g4['shop_cart_table']}
|
||||
where uq_id = '$uq_id' and it_id = '{$_POST['it_id']}' and is_option = '0' and ct_direct = '0' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
$nopt_count = (int)$row2['cnt'];
|
||||
}
|
||||
|
||||
if($nopt_count) {
|
||||
$sql = " update {$g4['yc4_cart_table']} set ct_qty = ct_qty + $ct_qty
|
||||
$sql = " update {$g4['shop_cart_table']} set ct_qty = ct_qty + $ct_qty
|
||||
where uq_id = '$uq_id' and it_id = '{$_POST['it_id']}' and is_option = '0' and ct_direct = '0' ";
|
||||
} else {
|
||||
$sql = " insert into {$g4['yc4_cart_table']}
|
||||
$sql = " insert into {$g4['shop_cart_table']}
|
||||
set uq_id = '$uq_id',
|
||||
ct_parent = '$ct_parent',
|
||||
mb_id = '{$member['mb_id']}',
|
||||
|
||||
@ -6,7 +6,7 @@ $ca_number = (int)$_POST['ca_number'];
|
||||
$start = 2 * $ca_number - 1;
|
||||
$end = 2 * $ca_number;
|
||||
|
||||
$sql = " SELECT MAX(SUBSTRING(ca_id,$start,$end)) AS ca_id FROM {$g4['yc4_category_table']} ";
|
||||
$sql = " SELECT MAX(SUBSTRING(ca_id,$start,$end)) AS ca_id FROM {$g4['shop_category_table']} ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['ca_id']) {
|
||||
$ca_id = base_convert($row['ca_id'], 36, 10);
|
||||
@ -16,7 +16,7 @@ if ($row['ca_id']) {
|
||||
$ca_id = "10";
|
||||
}
|
||||
|
||||
$sql = " INSERT INTO {$g4['yc4_category_table']} SET ca_id = '$ca_id', ca_name = '$ca_name' ";
|
||||
$sql = " INSERT INTO {$g4['shop_category_table']} SET ca_id = '$ca_id', ca_name = '$ca_name' ";
|
||||
sql_query($sql);
|
||||
|
||||
die("{\"ca_id\":\"$ca_id\", \"ca_name\":\"$ca_name\"}");
|
||||
|
||||
@ -6,7 +6,7 @@ $ca_number = (int)$_POST['ca_number'];
|
||||
$start = 2 * $ca_number - 1;
|
||||
$end = 2 * $ca_number;
|
||||
|
||||
$sql = " SELECT MAX(SUBSTRING(ca_id,$start,$end)) AS ca_id FROM {$g4['yc4_category_table']} ";
|
||||
$sql = " SELECT MAX(SUBSTRING(ca_id,$start,$end)) AS ca_id FROM {$g4['shop_category_table']} ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['ca_id']) {
|
||||
$ca_id = base_convert($row['ca_id'], 36, 10);
|
||||
@ -16,7 +16,7 @@ if ($row['ca_id']) {
|
||||
$ca_id = "10";
|
||||
}
|
||||
|
||||
$sql = " INSERT INTO {$g4['yc4_category_table']} SET ca_id = '$ca_id', ca_name = '$ca_name' ";
|
||||
$sql = " INSERT INTO {$g4['shop_category_table']} SET ca_id = '$ca_id', ca_name = '$ca_name' ";
|
||||
sql_query($sql);
|
||||
|
||||
die("{\"ca_id\":\"$ca_id\", \"ca_name\":\"$ca_name\"}");
|
||||
|
||||
@ -7,7 +7,7 @@ include_once("{$g4['path']}/head.sub.php");
|
||||
for ($i=1; $i<=5; $i++) {
|
||||
echo '<select id="category-'.$i.'" class="category" size="20" style="width:180px;">';
|
||||
if ($i == 1) {
|
||||
$sql = " select ca_id, ca_name from $g4[yc4_category_table] where length(ca_id) = 2 order by ca_order, ca_id ";
|
||||
$sql = " select ca_id, ca_name from $g4[shop_category_table] where length(ca_id) = 2 order by ca_order, ca_id ";
|
||||
$result = sql_query($sql);
|
||||
while ($row=sql_fetch_array($result)) {
|
||||
echo '<option value="'.$row['ca_id'].'" title="'.$row['ca_id'].'">'.$row['ca_name'].'</option>'.PHP_EOL;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
include_once("./_common.php");
|
||||
|
||||
// 내용
|
||||
$sql = " select * from $g4[yc4_content_table] where co_id = '$co_id' ";
|
||||
$sql = " select * from $g4[shop_content_table] where co_id = '$co_id' ";
|
||||
$co = sql_fetch($sql);
|
||||
if (!$co[co_id])
|
||||
alert("등록된 내용이 없습니다.");
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?
|
||||
include_once("./_common.php");
|
||||
|
||||
$sql = " select * from $g4[yc4_event_table]
|
||||
$sql = " select * from $g4[shop_event_table]
|
||||
where ev_id = '$ev_id'
|
||||
and ev_use = 1 ";
|
||||
$ev = sql_fetch($sql);
|
||||
@ -62,8 +62,8 @@ $sql_list1 = " select a.ca_id,
|
||||
$sql_list1 = " select * ";
|
||||
$sql_list2 = " order by $order_by a.it_order, a.it_id desc ";
|
||||
|
||||
$sql_common = " from $g4[yc4_item_table] a
|
||||
left join $g4[yc4_event_item_table] b on (a.it_id=b.it_id)
|
||||
$sql_common = " from $g4[shop_item_table] a
|
||||
left join $g4[shop_event_item_table] b on (a.it_id=b.it_id)
|
||||
where b.ev_id = '$ev_id'
|
||||
and a.it_use = '1' ";
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ include_once("./_common.php");
|
||||
if (!$fm_id) $fm_id = 1;
|
||||
|
||||
// FAQ MASTER
|
||||
$sql = " select * from $g4[yc4_faq_master_table] where fm_id = '$fm_id' ";
|
||||
$sql = " select * from $g4[shop_faq_master_table] where fm_id = '$fm_id' ";
|
||||
$fm = sql_fetch($sql);
|
||||
if (!$fm[fm_id])
|
||||
alert("등록된 내용이 없습니다.");
|
||||
@ -30,7 +30,7 @@ echo "<br>";
|
||||
echo "<table width=95% align=center cellpadding=1 cellspacing=0>\n";
|
||||
echo "<tr><td class=bg_faq><table width=100% cellpadding=2 cellspacing=1 border=0 bgcolor=#FFFFFF>\n";
|
||||
|
||||
$sql = " select * from $g4[yc4_faq_table]
|
||||
$sql = " select * from $g4[shop_faq_table]
|
||||
where fm_id = '$fm_id'
|
||||
order by fa_order , fa_id ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
@ -32,7 +32,7 @@ if (!$saved) {
|
||||
|
||||
// 조회수 증가
|
||||
if ($_COOKIE['ck_it_id'] != $it_id) {
|
||||
sql_query(" update {$g4['yc4_item_table']} set it_hit = it_hit + 1 where it_id = '$it_id' "); // 1증가
|
||||
sql_query(" update {$g4['shop_item_table']} set it_hit = it_hit + 1 where it_id = '$it_id' "); // 1증가
|
||||
setcookie("ck_it_id", $it_id, time() + 3600, $config['cf_cookie_dir'], $config['cf_cookie_domain']); // 1시간동안 저장
|
||||
}
|
||||
|
||||
@ -40,8 +40,8 @@ if ($_COOKIE['ck_it_id'] != $it_id) {
|
||||
$sql = " select a.*,
|
||||
b.ca_name,
|
||||
b.ca_use
|
||||
from {$g4['yc4_item_table']} a,
|
||||
{$g4['yc4_category_table']} b
|
||||
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);
|
||||
@ -54,7 +54,7 @@ if (!($it['ca_use'] && $it['it_use'])) {
|
||||
|
||||
// 분류 테이블에서 분류 상단, 하단 코드를 얻음
|
||||
$sql = " select ca_include_head, ca_include_tail
|
||||
from {$g4['yc4_category_table']}
|
||||
from {$g4['shop_category_table']}
|
||||
where ca_id = '{$it['ca_id']}' ";
|
||||
$ca = sql_fetch($sql);
|
||||
|
||||
@ -81,7 +81,7 @@ if ($is_admin)
|
||||
include G4_SHOP_PATH.'/listcategory.inc.php';
|
||||
|
||||
// 이전 상품보기
|
||||
$sql = " select it_id, it_name from {$g4['yc4_item_table']}
|
||||
$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'
|
||||
@ -97,7 +97,7 @@ if ($row['it_id']) {
|
||||
}
|
||||
|
||||
// 다음 상품보기
|
||||
$sql = " select it_id, it_name from {$g4['yc4_item_table']}
|
||||
$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'
|
||||
@ -114,8 +114,8 @@ if ($row[it_id]) {
|
||||
|
||||
// 관련상품의 갯수를 얻음
|
||||
$sql = " select count(*) as cnt
|
||||
from {$g4['yc4_item_relation_table']} a
|
||||
left join {$g4['yc4_item_table']} b on (a.it_id2=b.it_id and b.it_use='1')
|
||||
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'];
|
||||
@ -123,7 +123,7 @@ $item_relation_count = $row['cnt'];
|
||||
// 선택옵션 존재하는지 체크
|
||||
$it_option_count = 0;
|
||||
if($it['it_option_use']) {
|
||||
$sql = " select COUNT(*) as cnt from {$g4['yc4_option_table']} where it_id = '{$it['it_id']}' ";
|
||||
$sql = " select COUNT(*) as cnt from {$g4['shop_option_table']} where it_id = '{$it['it_id']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
$it_option_count = (int)$row['cnt'];
|
||||
}
|
||||
@ -131,7 +131,7 @@ if($it['it_option_use']) {
|
||||
// 추가옵션 존재하는지 체크
|
||||
$it_supplement_count = 0;
|
||||
if($it['it_supplement_use']) {
|
||||
$sql = " select COUNT(*) as cnt from {$g4['yc4_supplement_table']} where it_id = '{$it['it_id']}' ";
|
||||
$sql = " select COUNT(*) as cnt from {$g4['shop_supplement_table']} where it_id = '{$it['it_id']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
$it_supplement_count = (int)$row['cnt'];
|
||||
}
|
||||
@ -468,7 +468,7 @@ else
|
||||
<tr><td rowspan=2 width=31 valign=top bgcolor=#CACDE2><img src='<?=G4_SHOP_IMG_URL?>/item_t01.gif'></td><td height=2 bgcolor=#CACDE2></td></tr>
|
||||
<tr><td style='padding:15px'>
|
||||
<?
|
||||
$sql = " select * from {$g4['yc4_item_info_table']} where it_id = '$it_id' order by ii_id ";
|
||||
$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)) {
|
||||
?>
|
||||
@ -557,8 +557,8 @@ include_once('./itemqa.inc.php');
|
||||
$td_width = (int)(100 / $list_mod);
|
||||
|
||||
$sql = " select b.*
|
||||
from {$g4['yc4_item_relation_table']} a
|
||||
left join {$g4['yc4_item_table']} b on (a.it_id2=b.it_id)
|
||||
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);
|
||||
|
||||
@ -3,14 +3,14 @@ include_once('./_common.php');
|
||||
|
||||
// 옵션명
|
||||
$index = $idx + 2;
|
||||
$sql = " select it_opt{$index}_subject as opt_subj from `{$g4['yc4_item_table']}` where it_id = '$it_id' ";
|
||||
$sql = " select it_opt{$index}_subject as opt_subj from `{$g4['shop_item_table']}` where it_id = '$it_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
$opt_subj = $row['opt_subj'];
|
||||
|
||||
$str = '<option value="">' . $opt_subj . '선택</option>'.PHP_EOL;
|
||||
|
||||
// 옵션항목
|
||||
$sql = " select opt_id from `{$g4['yc4_option_table']}` where it_id = '$it_id' and opt_use = '1' and opt_id like '$opt_id%' order by opt_no asc ";
|
||||
$sql = " select opt_id from `{$g4['shop_option_table']}` where it_id = '$it_id' and opt_use = '1' and opt_id like '$opt_id%' order by opt_no asc ";
|
||||
$result = sql_query($sql);
|
||||
$arr_item = array();
|
||||
|
||||
@ -32,7 +32,7 @@ foreach($arr as $value) {
|
||||
$deli = chr(30);
|
||||
}
|
||||
$new_opt_id = $opt_id . $deli . $value;
|
||||
$sql = " select opt_amount, opt_qty from {$g4['yc4_option_table']} where it_id = '$it_id' and opt_id = '$new_opt_id' and opt_use = '1' ";
|
||||
$sql = " select opt_amount, opt_qty from {$g4['shop_option_table']} where it_id = '$it_id' and opt_id = '$new_opt_id' and opt_use = '1' ";
|
||||
$row = sql_fetch($sql);
|
||||
$opt_info = '';
|
||||
if($row['opt_qty']) {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
$sql = " select opt_amount, opt_qty from `{$g4['yc4_option_table']}` where it_id = '$it_id' and opt_id = '$opt_id' and opt_use = '1' ";
|
||||
$sql = " select opt_amount, opt_qty from `{$g4['shop_option_table']}` where it_id = '$it_id' and opt_id = '$opt_id' and opt_use = '1' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if(!$row['opt_amount']) {
|
||||
|
||||
@ -24,7 +24,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
<td width=11><img src='<?=G4_SHOP_IMG_URL?>/corner02.gif'></td>
|
||||
</tr>
|
||||
<?
|
||||
$sql_common = " from $g4[yc4_item_qa_table] where it_id = '$it[it_id]' ";
|
||||
$sql_common = " from $g4[shop_item_qa_table] where it_id = '$it[it_id]' ";
|
||||
|
||||
// 테이블의 전체 레코드수만 얻음
|
||||
$sql = " select COUNT(*) as cnt " . $sql_common;
|
||||
|
||||
@ -47,18 +47,18 @@ $url = "./item.php?it_id=$it_id";
|
||||
|
||||
if ($w == '')
|
||||
{
|
||||
$sql = " select max(iq_id) as max_iq_id from $g4[yc4_item_qa_table] ";
|
||||
$sql = " select max(iq_id) as max_iq_id from $g4[shop_item_qa_table] ";
|
||||
$row = sql_fetch($sql);
|
||||
$max_iq_id = $row[max_iq_id];
|
||||
|
||||
$sql = " select max(iq_id) as max_iq_id from $g4[yc4_item_qa_table]
|
||||
$sql = " select max(iq_id) as max_iq_id from $g4[shop_item_qa_table]
|
||||
where it_id = '$it_id'
|
||||
and mb_id = '$member[mb_id]' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row[max_iq_id] && $row[max_iq_id] == $max_iq_id)
|
||||
alert("같은 상품에 대하여 계속해서 질문 하실 수 없습니다.");
|
||||
|
||||
$sql = "insert $g4[yc4_item_qa_table]
|
||||
$sql = "insert $g4[shop_item_qa_table]
|
||||
set it_id = '$it_id',
|
||||
mb_id = '$member[mb_id]',
|
||||
iq_name = '$iq_name',
|
||||
@ -73,12 +73,12 @@ if ($w == '')
|
||||
}
|
||||
else if ($w == 'u')
|
||||
{
|
||||
$sql = " select iq_password from $g4[yc4_item_qa_table] where iq_id = '$iq_id' ";
|
||||
$sql = " select iq_password from $g4[shop_item_qa_table] where iq_id = '$iq_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row[iq_password] != $iq_password)
|
||||
alert("패스워드가 틀리므로 수정하실 수 없습니다.");
|
||||
|
||||
$sql = " update $g4[yc4_item_qa_table]
|
||||
$sql = " update $g4[shop_item_qa_table]
|
||||
set iq_subject = '$iq_subject',
|
||||
iq_question = '$iq_question'
|
||||
where iq_id = '$iq_id' ";
|
||||
@ -90,7 +90,7 @@ else if ($w == 'd')
|
||||
{
|
||||
if ($is_member)
|
||||
{
|
||||
$sql = " select count(*) as cnt from $g4[yc4_item_qa_table] where mb_id = '$member[mb_id]' and iq_id = '$iq_id' ";
|
||||
$sql = " select count(*) as cnt from $g4[shop_item_qa_table] where mb_id = '$member[mb_id]' and iq_id = '$iq_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if (!$row[cnt])
|
||||
alert("자신의 상품문의만 삭제하실 수 있습니다.");
|
||||
@ -99,13 +99,13 @@ else if ($w == 'd')
|
||||
{
|
||||
$iq_password = sql_password($iq_password);
|
||||
|
||||
$sql = " select iq_password from $g4[yc4_item_qa_table] where iq_id = '$iq_id' ";
|
||||
$sql = " select iq_password from $g4[shop_item_qa_table] where iq_id = '$iq_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row[iq_password] != $iq_password)
|
||||
alert("패스워드가 틀리므로 삭제하실 수 없습니다.");
|
||||
}
|
||||
|
||||
$sql = " delete from $g4[yc4_item_qa_table] where mb_id = '$member[mb_id]' and iq_id = '$iq_id' ";
|
||||
$sql = " delete from $g4[shop_item_qa_table] where mb_id = '$member[mb_id]' and iq_id = '$iq_id' ";
|
||||
sql_query($sql);
|
||||
|
||||
goto_url($url);
|
||||
|
||||
@ -8,7 +8,7 @@ if (!$is_member)
|
||||
$token = md5(uniqid(rand(), true));
|
||||
set_session("ss_token", $token);
|
||||
|
||||
$sql = " select it_name from {$g4['yc4_item_table']} where it_id='$it_id' ";
|
||||
$sql = " select it_name from {$g4['shop_item_table']} where it_id='$it_id' ";
|
||||
$it = sql_fetch($sql);
|
||||
if (!$it['it_name'])
|
||||
alert_close("등록된 상품이 아닙니다.");
|
||||
|
||||
@ -28,7 +28,7 @@ if ($_POST["token"] && get_session("ss_token") == $_POST["token"]) {
|
||||
}
|
||||
|
||||
// 상품
|
||||
$sql = " select * from {$g4['yc4_item_table']} where it_id = '$it_id' ";
|
||||
$sql = " select * from {$g4['shop_item_table']} where it_id = '$it_id' ";
|
||||
$it = sql_fetch($sql);
|
||||
if (!$it['it_id'])
|
||||
alert("등록된 상품이 아닙니다.");
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
$sql = " select sp_amount, sp_qty from `{$g4['yc4_supplement_table']}` where it_id = '$it_id' and sp_id = '$sp_id' and sp_use = '1' ";
|
||||
$sql = " select sp_amount, sp_qty from `{$g4['shop_supplement_table']}` where it_id = '$it_id' and sp_id = '$sp_id' and sp_use = '1' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if(!$row['sp_amount']) {
|
||||
|
||||
@ -25,7 +25,7 @@ include_once(G4_LIB_PATH.'/thumb.lib.php');
|
||||
<td width=11><img src='<?=G4_SHOP_IMG_URL?>/corner02.gif'></td>
|
||||
</tr>
|
||||
<?
|
||||
$sql_common = " from $g4[yc4_item_ps_table] where it_id = '$it[it_id]' and is_confirm = '1' ";
|
||||
$sql_common = " from $g4[shop_item_ps_table] where it_id = '$it[it_id]' and is_confirm = '1' ";
|
||||
|
||||
// 테이블의 전체 레코드수만 얻음
|
||||
$sql = " select COUNT(*) as cnt " . $sql_common;
|
||||
|
||||
@ -5,7 +5,7 @@ include_once("$g4[path]/lib/thumb.lib.php");
|
||||
$g4[title] = "사용후기";
|
||||
include_once("./_head.php");
|
||||
|
||||
$sql_common = " from $g4[yc4_item_ps_table] where is_confirm = '1' ";
|
||||
$sql_common = " from $g4[shop_item_ps_table] where is_confirm = '1' ";
|
||||
$sql_order = " order by is_time desc ";
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
@ -68,7 +68,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
$is_time = substr($row[is_time], 2, 14);
|
||||
$small_image = $row[it_id]."_s";
|
||||
|
||||
$row2 = sql_fetch(" select it_name from $g4[yc4_item_table] where it_id = '$row[it_id]' ");
|
||||
$row2 = sql_fetch(" select it_name from $g4[shop_item_table] where it_id = '$row[it_id]' ");
|
||||
$it_href = "$g4[shop_path]/item.php?it_id=$row[it_id]";
|
||||
|
||||
echo "
|
||||
|
||||
@ -46,18 +46,18 @@ $url = "./item.php?it_id=$it_id";
|
||||
|
||||
if ($w == '')
|
||||
{
|
||||
$sql = " select max(is_id) as max_is_id from $g4[yc4_item_ps_table] ";
|
||||
$sql = " select max(is_id) as max_is_id from $g4[shop_item_ps_table] ";
|
||||
$row = sql_fetch($sql);
|
||||
$max_is_id = $row[max_is_id];
|
||||
|
||||
$sql = " select max(is_id) as max_is_id from $g4[yc4_item_ps_table]
|
||||
$sql = " select max(is_id) as max_is_id from $g4[shop_item_ps_table]
|
||||
where it_id = '$it_id'
|
||||
and mb_id = '$member[mb_id]' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row[max_is_id] && $row[max_is_id] == $max_is_id)
|
||||
alert("같은 상품에 대하여 계속해서 평가하실 수 없습니다.");
|
||||
|
||||
$sql = "insert $g4[yc4_item_ps_table]
|
||||
$sql = "insert $g4[shop_item_ps_table]
|
||||
set it_id = '$it_id',
|
||||
mb_id = '$member[mb_id]',
|
||||
is_score = '$is_score',
|
||||
@ -78,12 +78,12 @@ if ($w == '')
|
||||
}
|
||||
else if ($w == 'u')
|
||||
{
|
||||
$sql = " select is_password from $g4[yc4_item_ps_table] where is_id = '$is_id' ";
|
||||
$sql = " select is_password from $g4[shop_item_ps_table] where is_id = '$is_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row[is_password] != $is_password)
|
||||
alert("패스워드가 틀리므로 수정하실 수 없습니다.");
|
||||
|
||||
$sql = " update $g4[yc4_item_ps_table]
|
||||
$sql = " update $g4[shop_item_ps_table]
|
||||
set is_subject = '$is_subject',
|
||||
is_content = '$is_content',
|
||||
is_score = '$is_score'
|
||||
@ -96,7 +96,7 @@ else if ($w == 'd')
|
||||
{
|
||||
if ($is_member)
|
||||
{
|
||||
$sql = " select count(*) as cnt from $g4[yc4_item_ps_table] where mb_id = '$member[mb_id]' and is_id = '$is_id' ";
|
||||
$sql = " select count(*) as cnt from $g4[shop_item_ps_table] where mb_id = '$member[mb_id]' and is_id = '$is_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if (!$row[cnt])
|
||||
alert("자신의 사용후기만 삭제하실 수 있습니다.");
|
||||
@ -105,13 +105,13 @@ else if ($w == 'd')
|
||||
{
|
||||
$is_password = sql_password($is_password);
|
||||
|
||||
$sql = " select is_password from $g4[yc4_item_ps_table] where is_id = '$is_id' ";
|
||||
$sql = " select is_password from $g4[shop_item_ps_table] where is_id = '$is_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row[is_password] != $is_password)
|
||||
alert("패스워드가 틀리므로 삭제하실 수 없습니다.");
|
||||
}
|
||||
|
||||
$sql = " delete from $g4[yc4_item_ps_table] where mb_id = '$member[mb_id]' and is_id = '$is_id' ";
|
||||
$sql = " delete from $g4[shop_item_ps_table] where mb_id = '$member[mb_id]' and is_id = '$is_id' ";
|
||||
sql_query($sql);
|
||||
|
||||
goto_url($url);
|
||||
|
||||
@ -12,7 +12,7 @@ if (!$is_member) {
|
||||
if ($w == "") {
|
||||
$is_score = 10;
|
||||
} else if ($w == "u") {
|
||||
$ps = sql_fetch(" select * from $g4[yc4_item_ps_table] where is_id = '$is_id' ");
|
||||
$ps = sql_fetch(" select * from $g4[shop_item_ps_table] where is_id = '$is_id' ");
|
||||
if (!$ps) {
|
||||
alert_close("사용후기 정보가 없습니다.");
|
||||
}
|
||||
|
||||
@ -27,16 +27,16 @@ $url = "./item.php?it_id=$it_id";
|
||||
|
||||
if ($w == '')
|
||||
{
|
||||
$sql = " select max(is_id) as max_is_id from $g4[yc4_item_ps_table] ";
|
||||
$sql = " select max(is_id) as max_is_id from $g4[shop_item_ps_table] ";
|
||||
$row = sql_fetch($sql);
|
||||
$max_is_id = $row[max_is_id];
|
||||
|
||||
$sql = " select max(is_id) as max_is_id from $g4[yc4_item_ps_table] where it_id = '$it_id' and mb_id = '$member[mb_id]' ";
|
||||
$sql = " select max(is_id) as max_is_id from $g4[shop_item_ps_table] where it_id = '$it_id' and mb_id = '$member[mb_id]' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row[max_is_id] && $row[max_is_id] == $max_is_id)
|
||||
alert("같은 상품에 대하여 계속해서 평가하실 수 없습니다.");
|
||||
|
||||
$sql = "insert $g4[yc4_item_ps_table]
|
||||
$sql = "insert $g4[shop_item_ps_table]
|
||||
set it_id = '$it_id',
|
||||
mb_id = '$member[mb_id]',
|
||||
is_score = '$is_score',
|
||||
@ -58,12 +58,12 @@ if ($w == '')
|
||||
}
|
||||
else if ($w == 'u')
|
||||
{
|
||||
$sql = " select is_password from $g4[yc4_item_ps_table] where is_id = '$is_id' ";
|
||||
$sql = " select is_password from $g4[shop_item_ps_table] where is_id = '$is_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row[is_password] != $is_password)
|
||||
alert("패스워드가 틀리므로 수정하실 수 없습니다.");
|
||||
|
||||
$sql = " update $g4[yc4_item_ps_table]
|
||||
$sql = " update $g4[shop_item_ps_table]
|
||||
set is_subject = '$is_subject',
|
||||
is_content = '$is_content',
|
||||
is_score = '$is_score'
|
||||
|
||||
@ -3,7 +3,7 @@ include_once("./_common.php");
|
||||
include_once(G4_LIB_PATH.'/thumbnail.lib.php');
|
||||
|
||||
$sql = " select it_name, it_img1, it_img2, it_img3, it_img4, it_img5, it_img6, it_img7, it_img8, it_img9, it_img10
|
||||
from $g4[yc4_item_table]
|
||||
from $g4[shop_item_table]
|
||||
where it_id='$it_id' ";
|
||||
$row = sql_fetch_array(sql_query($sql));
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ include_once("./_common.php");
|
||||
include_once(G4_LIB_PATH.'/thumbnail.lib.php');
|
||||
|
||||
$sql = " select *
|
||||
from $g4[yc4_category_table]
|
||||
from $g4[shop_category_table]
|
||||
where ca_id = '$ca_id'
|
||||
and ca_use = '1' ";
|
||||
$ca = sql_fetch($sql);
|
||||
@ -53,7 +53,7 @@ $sql_list2 = " order by $order_by it_order, it_id desc ";
|
||||
|
||||
// 하위분류 포함
|
||||
// 판매가능한 상품만
|
||||
$sql_common = " from $g4[yc4_item_table]
|
||||
$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}%')
|
||||
|
||||
@ -43,7 +43,7 @@ if (count($arr) > 0)
|
||||
// 임시저장한 분류코드와 다르다면 분류명을 출력
|
||||
if ($save_ca_id != $row[ca_id])
|
||||
{
|
||||
$sql = " select ca_name from $g4[yc4_category_table] where ca_id = '$row[ca_id]' ";
|
||||
$sql = " select ca_name from $g4[shop_category_table] where ca_id = '$row[ca_id]' ";
|
||||
$tmp_ca = sql_fetch($sql);
|
||||
|
||||
echo "<tr height=30>";
|
||||
|
||||
@ -50,7 +50,7 @@ if (count($arr) > 0)
|
||||
|
||||
if ($save_ca_id != $row[ca_id])
|
||||
{
|
||||
$sql = " select ca_name from $g4[yc4_category_table] where ca_id = '$row[ca_id]' ";
|
||||
$sql = " select ca_name from $g4[shop_category_table] where ca_id = '$row[ca_id]' ";
|
||||
$tmp_ca = sql_fetch($sql);
|
||||
|
||||
echo "
|
||||
|
||||
@ -7,7 +7,7 @@ $len2 = $ca_id_len + 2;
|
||||
$len4 = $ca_id_len + 4;
|
||||
|
||||
// 차차기 분류의 건수를 얻음
|
||||
$sql = " select count(*) as cnt from $g4[yc4_category_table]
|
||||
$sql = " select count(*) as cnt from $g4[shop_category_table]
|
||||
where ca_id like '$ca_id%'
|
||||
and length(ca_id) = $len4
|
||||
and ca_use = '1' ";
|
||||
@ -16,7 +16,7 @@ $cnt = $row['cnt'];
|
||||
if (!$cnt)
|
||||
$str .= "<tr><td width=11 background='".G4_SHOP_IMG_URL."/ca_bg02.gif'></td><td>";
|
||||
|
||||
$sql = " select ca_id, ca_name from $g4[yc4_category_table]
|
||||
$sql = " select ca_id, ca_name from $g4[shop_category_table]
|
||||
where ca_id like '$ca_id%'
|
||||
and length(ca_id) = $len2
|
||||
and ca_use = '1'
|
||||
@ -26,8 +26,8 @@ $str .= "<tr><td width=11 background='".G4_SHOP_IMG_URL."/ca_bg02.gif'></td>";
|
||||
$str .= "<td><table width=100% border=0><tr><td>";
|
||||
while ($row=sql_fetch_array($result)) {
|
||||
|
||||
//$row2 = sql_fetch(" select count(*) as cnt from $g4[yc4_category_table] where ca_id like '$row[ca_id]%' ");
|
||||
$row2 = sql_fetch(" select count(*) as cnt from $g4[yc4_item_table] where (ca_id like '$row[ca_id]%' or ca_id2 like '$row[ca_id]%' or ca_id3 like '$row[ca_id]%') and it_use = '1' ");
|
||||
//$row2 = sql_fetch(" select count(*) as cnt from $g4[shop_category_table] where ca_id like '$row[ca_id]%' ");
|
||||
$row2 = sql_fetch(" select count(*) as cnt from $g4[shop_item_table] where (ca_id like '$row[ca_id]%' or ca_id2 like '$row[ca_id]%' or ca_id3 like '$row[ca_id]%') and it_use = '1' ");
|
||||
|
||||
$str .= "<a href='./list.php?ca_id=$row[ca_id]'>$row[ca_name] ($row2[cnt])</a> ";
|
||||
$exists = true;
|
||||
|
||||
@ -16,7 +16,7 @@ if (!$exists) {
|
||||
$len4 = $tmp_ca_id_len + 4;
|
||||
|
||||
// 차차기 분류의 건수를 얻음
|
||||
$sql = " select count(*) as cnt from $g4[yc4_category_table]
|
||||
$sql = " select count(*) as cnt from $g4[shop_category_table]
|
||||
where ca_id like '$tmp_ca_id%'
|
||||
and ca_use = '1'
|
||||
and length(ca_id) = $len4 ";
|
||||
@ -25,7 +25,7 @@ if (!$exists) {
|
||||
if (!$cnt)
|
||||
$str .= "<tr><td width=11 background='".G4_SHOP_IMG_URL."/ca_bg02.gif'></td><td>";
|
||||
|
||||
$sql = " select ca_id, ca_name from $g4[yc4_category_table]
|
||||
$sql = " select ca_id, ca_name from $g4[shop_category_table]
|
||||
where ca_id like '$tmp_ca_id%'
|
||||
and ca_use = '1'
|
||||
and length(ca_id) = $len2 order by ca_id ";
|
||||
@ -38,7 +38,7 @@ if (!$exists) {
|
||||
if ($cnt) {
|
||||
$str .= "<tr><td width=11 background='".G4_SHOP_IMG_URL."/ca_bg02.gif'></td>";
|
||||
$str .= "<td><table width=100% border=0><tr><td width=120><b>· <a href='./list.php?ca_id=$row[ca_id]'><span $style>$row[ca_name]</span></a></b></td>";
|
||||
$sql2 = " select ca_id, ca_name from $g4[yc4_category_table]
|
||||
$sql2 = " select ca_id, ca_name from $g4[shop_category_table]
|
||||
where ca_id like '$row[ca_id]%'
|
||||
and ca_use = '1'
|
||||
and length(ca_id) = $len4 order by ca_id ";
|
||||
|
||||
@ -4,7 +4,7 @@ $exists = false;
|
||||
|
||||
$depth2_ca_id = substr($ca_id, 0, 2);
|
||||
|
||||
$sql = " select ca_id, ca_name from $g4[yc4_category_table]
|
||||
$sql = " select ca_id, ca_name from $g4[shop_category_table]
|
||||
where ca_id like '${depth2_ca_id}%'
|
||||
and length(ca_id) = 4
|
||||
and ca_use = '1'
|
||||
|
||||
@ -34,7 +34,7 @@ if ($sort != "")
|
||||
$sql_list1 = " select * ";
|
||||
$sql_list2 = " order by $order_by it_order, it_id desc ";
|
||||
|
||||
$sql_common = " from $g4[yc4_item_table]
|
||||
$sql_common = " from $g4[shop_item_table]
|
||||
where it_type{$type} = '1'
|
||||
and it_use = '1' ";
|
||||
if ($ca_id) {
|
||||
@ -91,14 +91,14 @@ echo get_paging($config[cf_write_pages], $page, $total_page, "$_SERVER[PHP_SELF]
|
||||
// 분류를 링크하는 코드
|
||||
/*
|
||||
$bar = "";
|
||||
$sql = " select ca_id from $g4[yc4_item_table]
|
||||
$sql = " select ca_id from $g4[shop_item_table]
|
||||
where it_type{$type} = '1'
|
||||
and it_use = '1'
|
||||
group by ca_id
|
||||
order by ca_id ";
|
||||
$result = sql_query($sql);
|
||||
for($i=0;$row=sql_fetch_array($result);$i++) {
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '$row[ca_id]' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '$row[ca_id]' ");
|
||||
echo $bar . "<a href='$g4[shop_path]/list.php?ca_id=$row[ca_id]'>$row2[ca_name]</a>";
|
||||
$bar = " | ";
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
if ($score = get_star_image($row[it_id]))
|
||||
$star = "<img src='$g4[shop_img_path]/star{$score}.gif' border=0>";
|
||||
|
||||
$sql2 = " select * from $g4[yc4_item_table] where it_id = '$row[it_id]' ";
|
||||
$sql2 = " select * from $g4[shop_item_table] where it_id = '$row[it_id]' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
|
||||
// 특정상품아이콘
|
||||
|
||||
@ -90,8 +90,8 @@ include "$g4[shop_path]/orderinquiry.sub.php";
|
||||
<tr><td height=1 colspan=3 class=c1></td></tr>
|
||||
<?
|
||||
$sql = " select *
|
||||
from $g4[yc4_wish_table] a,
|
||||
$g4[yc4_item_table] b
|
||||
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
|
||||
|
||||
@ -9,7 +9,7 @@ if ($ca_id)
|
||||
{
|
||||
$code = substr($ca_id,0,$i*2);
|
||||
|
||||
$sql = " select ca_name from $g4[yc4_category_table] where ca_id = '$code' ";
|
||||
$sql = " select ca_name from $g4[shop_category_table] where ca_id = '$code' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$style = "";
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
$sql = " select * from $g4[yc4_new_win_table]
|
||||
$sql = " select * from $g4[shop_new_win_table]
|
||||
where '$g4[time_ymdhis]' between nw_begin_time and nw_end_time
|
||||
order by nw_id asc ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?
|
||||
include_once("./_common.php");
|
||||
|
||||
$sql = " select * from $g4[yc4_new_win_table] where nw_id = '$nw_id' ";
|
||||
$sql = " select * from $g4[shop_new_win_table] where nw_id = '$nw_id' ";
|
||||
$nw = sql_fetch($sql);
|
||||
|
||||
$g4[title] = $nw[nw_subject];
|
||||
|
||||
@ -9,7 +9,7 @@ if (get_cart_count($uq_id, $sw_direct) == 0)// 장바구니에 담기
|
||||
|
||||
set_session("ss_uq_id_inquiry", $uq_id);
|
||||
|
||||
$sql = " select * from {$g4['yc4_order_table']} where uq_id = '$uq_id' ";
|
||||
$sql = " select * from {$g4['shop_order_table']} where uq_id = '$uq_id' ";
|
||||
$od = sql_fetch($sql);
|
||||
|
||||
//print_r2($od);
|
||||
@ -21,7 +21,7 @@ include_once('./_head.php');
|
||||
// 상품명만들기
|
||||
/*
|
||||
$sql = " select a.it_id, b.it_name
|
||||
from $g4[yc4_cart_table] a, $g4[yc4_item_table] b
|
||||
from $g4[shop_cart_table] a, $g4[shop_item_table] b
|
||||
where a.it_id = b.it_id
|
||||
and a.on_uid = '$tmp_on_uid'
|
||||
order by ct_id
|
||||
|
||||
@ -15,7 +15,7 @@ if ($cart_count == 0)
|
||||
alert("장바구니가 비어 있습니다.", "./cart.php");
|
||||
|
||||
// 포인트 결제 대기 필드 추가
|
||||
//sql_query(" ALTER TABLE `$g4[yc4_order_table]` ADD `od_temp_point` INT NOT NULL AFTER `od_temp_card` ", false);
|
||||
//sql_query(" ALTER TABLE `$g4[shop_order_table]` ADD `od_temp_point` INT NOT NULL AFTER `od_temp_card` ", false);
|
||||
|
||||
$g4['title'] = '주문서 작성';
|
||||
|
||||
@ -440,7 +440,7 @@ if($is_member) {
|
||||
// 배송비할인쿠폰
|
||||
if($send_cost) { // 배송비가 있을 경우만
|
||||
$sql = " select cp_id, cp_subject, cp_amount, cp_minimum
|
||||
from {$g4['yc4_coupon_table']}
|
||||
from {$g4['shop_coupon_table']}
|
||||
where cp_type = '2'
|
||||
and cp_use = '1'
|
||||
and mb_id in ( '{$member['mb_id']}', '전체회원' )
|
||||
@ -455,7 +455,7 @@ if($is_member) {
|
||||
|
||||
// 이미 사용한 쿠폰인지
|
||||
$sql = " select ch_no
|
||||
from {$g4['yc4_coupon_history_table']}
|
||||
from {$g4['shop_coupon_history_table']}
|
||||
where cp_id = '{$row['cp_id']}'
|
||||
and mb_id = '{$member['mb_id']}'
|
||||
and uq_id <> '$uq_id' ";
|
||||
@ -471,7 +471,7 @@ if($is_member) {
|
||||
|
||||
// 결제할인쿠폰
|
||||
$sql = " select cp_id, cp_subject, cp_method, cp_amount, cp_minimum, cp_maximum, cp_trunc
|
||||
from {$g4['yc4_coupon_table']}
|
||||
from {$g4['shop_coupon_table']}
|
||||
where cp_type = '1'
|
||||
and cp_use = '1'
|
||||
and mb_id in ( '{$member['mb_id']}', '전체회원' )
|
||||
@ -502,7 +502,7 @@ if($is_member) {
|
||||
|
||||
// 이미 사용한 쿠폰인지
|
||||
$sql = " select ch_no
|
||||
from {$g4['yc4_coupon_history_table']}
|
||||
from {$g4['shop_coupon_history_table']}
|
||||
where cp_id = '{$row['cp_id']}'
|
||||
and mb_id = '{$member['mb_id']}'
|
||||
and uq_id <> '$uq_id' ";
|
||||
|
||||
@ -51,8 +51,8 @@ $sql = " select a.it_id,
|
||||
b.it_use,
|
||||
b.it_gallery,
|
||||
b.it_tel_inq
|
||||
from {$g4['yc4_cart_table']} a,
|
||||
{$g4['yc4_item_table']} b
|
||||
from {$g4['shop_cart_table']} a,
|
||||
{$g4['shop_item_table']} b
|
||||
where a.uq_id = '$uq_id'
|
||||
and a.ct_direct = '$sw_direct'
|
||||
and a.it_id = b.it_id ";
|
||||
@ -74,10 +74,10 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
if($row['is_option']) {
|
||||
// 주문가능한 옵션인지
|
||||
if($row['is_option'] == 1) {
|
||||
$sql1 = " select opt_use as option_use from {$g4['yc4_option_table']}
|
||||
$sql1 = " select opt_use as option_use from {$g4['shop_option_table']}
|
||||
where it_id = '{$row['it_id']}' and opt_id = '{$row['opt_id']}' ";
|
||||
} else {
|
||||
$sql1 = " select sp_use as option_use from {$g4['yc4_supplement_table']}
|
||||
$sql1 = " select sp_use as option_use from {$g4['shop_supplement_table']}
|
||||
where it_id = '{$row['it_id']}' and sp_id = '{$row['opt_id']}' ";
|
||||
}
|
||||
$row1 = sql_fetch($sql1);
|
||||
@ -90,14 +90,14 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
}
|
||||
|
||||
// 이미 장바구니에 있는 같은 옵션의 수량합계를 구한다.
|
||||
$sql2 = " select SUM(ct_qty) as cnt from {$g4['yc4_cart_table']}
|
||||
$sql2 = " select SUM(ct_qty) as cnt from {$g4['shop_cart_table']}
|
||||
where it_id = '{$row['it_id']}' and opt_id = '{$row['opt_id']}' and uq_id <> '$uq_id' and is_option = '{$row['is_option']}' and ct_status = '쇼핑' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
$cart_qty = $row2['cnt'];
|
||||
$stock_qty = get_option_stock_qty($row['it_id'], $row['opt_id'], $row['is_option']);
|
||||
} else {
|
||||
// 이미 장바구니에 있는 같은 상품의 수량합계를 구한다.
|
||||
$sql2 = " select SUM(ct_qty) as cnt from {$g4['yc4_cart_table']}
|
||||
$sql2 = " select SUM(ct_qty) as cnt from {$g4['shop_cart_table']}
|
||||
where it_id = '{$row['it_id']}' and uq_id <> '$uq_id' and is_option = '{$row['is_option']}' and ct_status = '쇼핑' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
$cart_qty = $row2['cnt'];
|
||||
@ -122,7 +122,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
// 주문총금액
|
||||
/*
|
||||
$sql1 = " select SUM((it_amount + ct_amount) * ct_qty) as od_amount
|
||||
from {$g4['yc4_cart_table']}
|
||||
from {$g4['shop_cart_table']}
|
||||
where uq_id = '$uq_id'
|
||||
and ct_direct = '$sw_direct' ";
|
||||
$row1 = sql_fetch($sql1);
|
||||
@ -153,7 +153,7 @@ else if($default['de_send_cost_case'] == "상한") {
|
||||
b.it_sc_type,
|
||||
b.it_sc_basic,
|
||||
b.it_sc_condition
|
||||
from {$g4['yc4_cart_table']} as a left join {$g4['yc4_item_table']} as b on ( a.it_id = b.it_id )
|
||||
from {$g4['shop_cart_table']} as a left join {$g4['shop_item_table']} as b on ( a.it_id = b.it_id )
|
||||
where a.uq_id = '$uq_id'
|
||||
and a.ct_direct = '$sw_direct'
|
||||
and a.ct_parent = '0' ";
|
||||
@ -172,7 +172,7 @@ else if($default['de_send_cost_case'] == "상한") {
|
||||
// 금액, 수량 계산
|
||||
$sql = " select SUM((ct_amount + it_amount) * ct_qty) as sum_amount,
|
||||
SUM(ct_qty) as sum_qty
|
||||
from {$g4['yc4_cart_table']}
|
||||
from {$g4['shop_cart_table']}
|
||||
where ct_id = '{$row['ct_id']}'
|
||||
or ct_parent = '{$row['ct_id']}' ";
|
||||
$sum = sql_fetch($sql);
|
||||
@ -216,7 +216,7 @@ if($is_member) {
|
||||
|
||||
// 쿠폰정보
|
||||
$sql = " select *
|
||||
from {$g4['yc4_coupon_table']}
|
||||
from {$g4['shop_coupon_table']}
|
||||
where cp_id = '$cp_id'
|
||||
and cp_use = '1'
|
||||
and cp_start <= '{$g4['time_ymd']}'
|
||||
@ -229,7 +229,7 @@ if($is_member) {
|
||||
|
||||
// 상품정보
|
||||
$sql = " select it_id, ca_id, ca_id2, ca_id3, it_nocoupon
|
||||
from {$g4['yc4_item_table']}
|
||||
from {$g4['shop_item_table']}
|
||||
where it_id = '$it_id' ";
|
||||
$it = sql_fetch($sql);
|
||||
if($it['it_nocoupon']) { // 쿠폰제외상품
|
||||
@ -246,7 +246,7 @@ if($is_member) {
|
||||
|
||||
$ca_id = $it["ca_id{$no}"];
|
||||
|
||||
$sql = " select ca_nocoupon from {$g4['yc4_category_table']} where ca_id = '$ca_id' ";
|
||||
$sql = " select ca_nocoupon from {$g4['shop_category_table']} where ca_id = '$ca_id' ";
|
||||
$temp = sql_fetch($sql);
|
||||
|
||||
if($temp['ca_nocoupon']) {
|
||||
@ -289,7 +289,7 @@ if($is_member) {
|
||||
|
||||
// 이미 사용한 쿠폰인지
|
||||
$sql = " select ch_no
|
||||
from {$g4['yc4_coupon_history_table']}
|
||||
from {$g4['shop_coupon_history_table']}
|
||||
where cp_id = '$cp_id'
|
||||
and it_id = '$it_id'
|
||||
and mb_id = '{$member['mb_id']}'
|
||||
@ -305,7 +305,7 @@ if($is_member) {
|
||||
if($cp['cp_method']) {
|
||||
// 해당상품총금액
|
||||
$sql3 = " select SUM((ct_amount + it_amount) * ct_qty) as item_amount
|
||||
from {$g4['yc4_cart_table']}
|
||||
from {$g4['shop_cart_table']}
|
||||
where it_id = '$it_id'
|
||||
and uq_id = '$uq_id'
|
||||
and ct_direct = '$sw_direct' ";
|
||||
@ -335,7 +335,7 @@ if($is_member) {
|
||||
$s_cp_id = $_POST['od_send_coupon'];
|
||||
if($s_cp_id) {
|
||||
$sql4 = " select cp_id, cp_amount, cp_minimum, cp_subject, mb_id
|
||||
from {$g4['yc4_coupon_table']}
|
||||
from {$g4['shop_coupon_table']}
|
||||
where cp_id = '$s_cp_id'
|
||||
and cp_type = '2'
|
||||
and cp_use = '1'
|
||||
@ -349,7 +349,7 @@ if($is_member) {
|
||||
if($row4['cp_id']) {
|
||||
// 사용쿠폰인지체크
|
||||
$sql5 = " select ch_no
|
||||
from {$g4['yc4_coupon_history_table']}
|
||||
from {$g4['shop_coupon_history_table']}
|
||||
where cp_id = '$s_cp_id'
|
||||
and mb_id = '{$member['mb_id']}'
|
||||
and uq_id <> '$uq_id' ";
|
||||
@ -376,7 +376,7 @@ if($is_member) {
|
||||
$o_cp_id = $_POST['od_coupon'];
|
||||
if($o_cp_id) {
|
||||
$sql4 = " select cp_id, cp_method, cp_amount, cp_trunc, cp_minimum, cp_maximum, cp_subject, mb_id
|
||||
from {$g4['yc4_coupon_table']}
|
||||
from {$g4['shop_coupon_table']}
|
||||
where cp_id = '$o_cp_id'
|
||||
and cp_use = '1'
|
||||
and cp_type = '1'
|
||||
@ -390,7 +390,7 @@ if($is_member) {
|
||||
if($row4['cp_id']) {
|
||||
// 사용쿠폰인지체크
|
||||
$sql5 = " select ch_no
|
||||
from {$g4['yc4_coupon_history_table']}
|
||||
from {$g4['shop_coupon_history_table']}
|
||||
where cp_id = '$o_cp_id'
|
||||
and mb_id = '{$member['mb_id']}'
|
||||
and uq_id <> '$uq_id' ";
|
||||
@ -438,7 +438,7 @@ if (((int)$tot_sell_amount - (int)$item_dc_amount - (int)$order_dc_amount) !== (
|
||||
// 배송비가 상이함
|
||||
// 추가배송비
|
||||
$zipcode = $od_b_zip1.$od_b_zip2;
|
||||
$sql = " select sc_amount from {$g4['yc4_sendcost_table']} where sc_zip1 <= '$zipcode' and sc_zip2 >= '$zipcode' ";
|
||||
$sql = " select sc_amount from {$g4['shop_sendcost_table']} where sc_zip1 <= '$zipcode' and sc_zip2 >= '$zipcode' ";
|
||||
$row = sql_fetch($sql);
|
||||
$area_send_cost = (int)$row['sc_amount'];
|
||||
|
||||
@ -550,7 +550,7 @@ else
|
||||
$od_pwd = sql_password($_POST['od_pwd']);
|
||||
|
||||
// 주문서에 입력
|
||||
$sql = " insert {$g4['yc4_order_table']}
|
||||
$sql = " insert {$g4['shop_order_table']}
|
||||
set od_id = '$od_id',
|
||||
mb_id = '{$member['mb_id']}',
|
||||
od_pwd = '$od_pwd',
|
||||
@ -613,7 +613,7 @@ $ct_id_count = count($_POST['od_ct_id']);
|
||||
for($j=0; $j<$ct_id_count; $j++) {
|
||||
$temp_ct_id = $_POST['od_ct_id'][$j];
|
||||
|
||||
$sql = "update {$g4['yc4_cart_table']}
|
||||
$sql = "update {$g4['shop_cart_table']}
|
||||
set uq_id = '$od_id',
|
||||
ct_status = '주문'
|
||||
$sql_card_point
|
||||
@ -625,26 +625,26 @@ for($j=0; $j<$ct_id_count; $j++) {
|
||||
|
||||
// 재고조정
|
||||
$sql = " select it_id, is_option, opt_id, ct_qty
|
||||
from {$g4['yc4_cart_table']}
|
||||
from {$g4['shop_cart_table']}
|
||||
where uq_id = '$od_id'
|
||||
and ct_direct = '$sw_direct' ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for($i=0; $it=sql_fetch_array($result); $i++) {
|
||||
if($it['is_option'] == 1) { // 선택옵션
|
||||
$sql = " update {$g4['yc4_option_table']}
|
||||
$sql = " update {$g4['shop_option_table']}
|
||||
set opt_qty = IF( (opt_qty - {$it['ct_qty']}) > 0, (opt_qty - {$it['ct_qty']}), 0 )
|
||||
where it_id = '{$it['it_id']}'
|
||||
and opt_id = '{$it['opt_id']}' ";
|
||||
sql_query($sql);
|
||||
} else if($it['is_option'] == 2) { // 추가옵션
|
||||
$sql = " update {$g4['yc4_supplement_table']}
|
||||
$sql = " update {$g4['shop_supplement_table']}
|
||||
set sp_qty = IF( (sp_qty - {$it['ct_qty']}) > 0, (sp_qty - {$it['ct_qty']}), 0 )
|
||||
where it_id = '{$it['it_id']}'
|
||||
and sp_id = '{$it['opt_id']}' ";
|
||||
sql_query($sql);
|
||||
} else { // No옵션상품
|
||||
$sql = " update {$g4['yc4_item_table']}
|
||||
$sql = " update {$g4['shop_item_table']}
|
||||
set it_stock_qty = IF( (it_stock_qty - {$it['ct_qty']}) > 0, (it_stock_qty - {$it['ct_qty']}), 0 )
|
||||
where it_id = '{$it['it_id']}' ";
|
||||
sql_query($sql);
|
||||
@ -656,7 +656,7 @@ if($is_member) {
|
||||
$cp_count = count($arr_item_coupon);
|
||||
for($i=0; $i<$cp_count; $i++) {
|
||||
// 쿠폰내역기록
|
||||
$sql = " insert into {$g4['yc4_coupon_history_table']}
|
||||
$sql = " insert into {$g4['shop_coupon_history_table']}
|
||||
set cp_id = '{$arr_item_coupon[$i]['cp_id']}',
|
||||
cp_subject = '{$arr_item_coupon[$i]['cp_subject']}',
|
||||
mb_id = '{$member['mb_id']}',
|
||||
@ -668,7 +668,7 @@ if($is_member) {
|
||||
sql_query($sql);
|
||||
|
||||
// cart 테이블에 쿠폰금액기록
|
||||
$sql = " update {$g4['yc4_cart_table']}
|
||||
$sql = " update {$g4['shop_cart_table']}
|
||||
set cp_amount = '{$arr_item_coupon[$i]['ch_amount']}'
|
||||
where ct_id = '{$arr_item_coupon[$i]['ct_id']}' ";
|
||||
sql_query($sql);
|
||||
@ -676,7 +676,7 @@ if($is_member) {
|
||||
|
||||
// 배송비쿠폰내역
|
||||
if($arr_send_coupon['cp_id']) {
|
||||
$sql = " insert into {$g4['yc4_coupon_history_table']}
|
||||
$sql = " insert into {$g4['shop_coupon_history_table']}
|
||||
set cp_id = '{$arr_send_coupon['cp_id']}',
|
||||
cp_subject = '{$arr_send_coupon['cp_subject']}',
|
||||
mb_id = '{$member['mb_id']}',
|
||||
@ -690,7 +690,7 @@ if($is_member) {
|
||||
|
||||
// 결제할인쿠폰내역
|
||||
if($arr_order_coupon['cp_id']) {
|
||||
$sql = " insert into {$g4['yc4_coupon_history_table']}
|
||||
$sql = " insert into {$g4['shop_coupon_history_table']}
|
||||
set cp_id = '{$arr_order_coupon['cp_id']}',
|
||||
cp_subject = '{$arr_order_coupon['cp_subject']}',
|
||||
mb_id = '{$member['mb_id']}',
|
||||
|
||||
@ -8,11 +8,11 @@ $od_pwd = sql_password($od_pwd);
|
||||
// 회원인 경우
|
||||
if ($is_member)
|
||||
{
|
||||
$sql_common = " from $g4[yc4_order_table] where mb_id = '$member[mb_id]' ";
|
||||
$sql_common = " from $g4[shop_order_table] where mb_id = '$member[mb_id]' ";
|
||||
}
|
||||
else if ($od_id && $od_pwd) // 비회원인 경우 주문서번호와 비밀번호가 넘어왔다면
|
||||
{
|
||||
$sql_common = " from $g4[yc4_order_table] where od_id = '$od_id' and od_pwd = '$od_pwd' ";
|
||||
$sql_common = " from $g4[shop_order_table] where od_id = '$od_id' and od_pwd = '$od_pwd' ";
|
||||
}
|
||||
else // 그렇지 않다면 로그인으로 가기
|
||||
{
|
||||
@ -43,7 +43,7 @@ $from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
// 비회원 주문확인의 경우 바로 주문서 상세조회로 이동
|
||||
if (!$is_member)
|
||||
{
|
||||
$sql = " select od_id, on_uid from $g4[yc4_order_table] where od_id = '$od_id' and od_pwd = '$od_pwd' ";
|
||||
$sql = " select od_id, on_uid from $g4[shop_order_table] where od_id = '$od_id' and od_pwd = '$od_pwd' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row[od_id]) {
|
||||
set_session("ss_on_uid_inquiry", $row[on_uid]);
|
||||
|
||||
@ -25,8 +25,8 @@ if (!defined("_ORDERINQUIRY_")) exit; // 개별 페이지 접근 불가
|
||||
<?
|
||||
$sql = " select a.od_id,
|
||||
a.*, "._MISU_QUERY_."
|
||||
from $g4[yc4_order_table] a
|
||||
left join $g4[yc4_cart_table] b on (b.on_uid=a.on_uid)
|
||||
from $g4[shop_order_table] a
|
||||
left join $g4[shop_cart_table] b on (b.on_uid=a.on_uid)
|
||||
where mb_id = '$member[mb_id]'
|
||||
group by a.od_id
|
||||
order by a.od_id desc
|
||||
|
||||
@ -9,7 +9,7 @@ if ($token && get_session("ss_token") == $token) {
|
||||
alert_close("토큰 에러");
|
||||
}
|
||||
|
||||
$od = sql_fetch(" select * from $g4[yc4_order_table] where od_id = '$od_id' and on_uid = '$on_uid' and mb_id = '$member[mb_id]' ");
|
||||
$od = sql_fetch(" select * from $g4[shop_order_table] where od_id = '$od_id' and on_uid = '$on_uid' and mb_id = '$member[mb_id]' ");
|
||||
|
||||
if (!$od[od_id]) {
|
||||
alert("존재하는 주문이 아닙니다.");
|
||||
@ -23,12 +23,12 @@ if (($od[od_temp_bank] > 0 && $od[od_receipt_bank] == 0) ||
|
||||
}
|
||||
|
||||
// 장바구니 자료 취소
|
||||
sql_query(" update $g4[yc4_cart_table] set ct_status = '취소' where on_uid = '$on_uid' ");
|
||||
sql_query(" update $g4[shop_cart_table] set ct_status = '취소' where on_uid = '$on_uid' ");
|
||||
|
||||
// 주문 취소
|
||||
$cancel_memo = addslashes($cancel_memo);
|
||||
//sql_query(" update $g4[yc4_order_table] set od_temp_point = '0', od_receipt_point = '0', od_shop_memo = concat(od_shop_memo,\"\\n주문자 본인 직접 취소 - {$g4['time_ymdhis']} (취소이유 : {$cancel_memo})\") where on_uid = '$on_uid' ");
|
||||
sql_query(" update $g4[yc4_order_table] set od_send_cost = '0', od_temp_point = '0', od_receipt_point = '0', od_shop_memo = concat(od_shop_memo,\"\\n주문자 본인 직접 취소 - {$g4['time_ymdhis']} (취소이유 : {$cancel_memo})\") where on_uid = '$on_uid' ");
|
||||
//sql_query(" update $g4[shop_order_table] set od_temp_point = '0', od_receipt_point = '0', od_shop_memo = concat(od_shop_memo,\"\\n주문자 본인 직접 취소 - {$g4['time_ymdhis']} (취소이유 : {$cancel_memo})\") where on_uid = '$on_uid' ");
|
||||
sql_query(" update $g4[shop_order_table] set od_send_cost = '0', od_temp_point = '0', od_receipt_point = '0', od_shop_memo = concat(od_shop_memo,\"\\n주문자 본인 직접 취소 - {$g4['time_ymdhis']} (취소이유 : {$cancel_memo})\") where on_uid = '$on_uid' ");
|
||||
|
||||
// 주문취소 회원의 포인트를 되돌려 줌
|
||||
if ($od[od_receipt_point] > 0) {
|
||||
|
||||
@ -10,7 +10,7 @@ if (!$is_member) {
|
||||
alert("직접 링크로는 주문서 조회가 불가합니다.\\n\\n주문조회 화면을 통하여 조회하시기 바랍니다.");
|
||||
}
|
||||
|
||||
$sql = "select * from {$g4['yc4_order_table']} where od_id = '$od_id' ";
|
||||
$sql = "select * from {$g4['shop_order_table']} where od_id = '$od_id' ";
|
||||
$od = sql_fetch($sql);
|
||||
if (!$od['od_id']) {
|
||||
alert('조회하실 주문서가 없습니다.', $g4['path']);
|
||||
@ -90,7 +90,7 @@ if(openwin != null) {
|
||||
|
||||
<?
|
||||
// 배송회사 정보
|
||||
$dl = sql_fetch(" select * from $g4[yc4_delivery_table] where dl_id = '$od[dl_id]' ");
|
||||
$dl = sql_fetch(" select * from $g4[shop_delivery_table] where dl_id = '$od[dl_id]' ");
|
||||
|
||||
if ($od[od_invoice] || !$od[misu])
|
||||
{
|
||||
|
||||
@ -23,7 +23,7 @@ $sql = " select b.it_sell_email,
|
||||
a.ct_qty,
|
||||
a.ct_amount,
|
||||
a.ct_point
|
||||
from $g4[yc4_cart_table] a, $g4[yc4_item_table] b
|
||||
from $g4[shop_cart_table] a, $g4[shop_item_table] b
|
||||
where a.on_uid = '$tmp_on_uid'
|
||||
and a.it_id = b.it_id ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
@ -44,7 +44,7 @@ $sql = " select b.it_sell_email,
|
||||
a.it_opt5,
|
||||
a.it_opt6,
|
||||
a.ct_qty
|
||||
from $g4[yc4_cart_table] a, $g4[yc4_item_table] b
|
||||
from $g4[shop_cart_table] a, $g4[shop_item_table] b
|
||||
where a.on_uid = '$tmp_on_uid'
|
||||
and a.it_id = b.it_id
|
||||
and b.it_sell_email <> '' ";
|
||||
|
||||
@ -5,7 +5,7 @@ $zipcode = preg_replace("/[^0-9]/", "", $zip);
|
||||
|
||||
if(!$zipcode) exit;
|
||||
|
||||
$sql = " select sc_amount from {$g4['yc4_sendcost_table']} where sc_zip1 <= '$zipcode' and sc_zip2 >= '$zipcode' ";
|
||||
$sql = " select sc_amount from {$g4['shop_sendcost_table']} where sc_zip1 <= '$zipcode' and sc_zip2 >= '$zipcode' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if($row['sc_amount']) {
|
||||
|
||||
@ -20,7 +20,7 @@ else
|
||||
$delivery = (int)$tmp[0];
|
||||
}
|
||||
|
||||
$sql =" select * from $g4[yc4_item_table] where it_use = '1' order by ca_id";
|
||||
$sql =" select * from $g4[shop_item_table] where it_use = '1' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
@ -35,24 +35,24 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
$ca_name4 = "";
|
||||
|
||||
$ca_id1 = substr($row[ca_id],0,2);
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '$ca_id1' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '$ca_id1' ");
|
||||
$ca_name1 = $row2[ca_name];
|
||||
|
||||
if (strlen($row[ca_id]) >= 4) {
|
||||
$ca_id2 = substr($row[ca_id],0,4);
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '$ca_id2' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '$ca_id2' ");
|
||||
$ca_name2 = $row2[ca_name];
|
||||
}
|
||||
|
||||
if (strlen($row[ca_id]) >= 6) {
|
||||
$ca_id3 = substr($row[ca_id],0,6);
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '$ca_id3' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '$ca_id3' ");
|
||||
$ca_name3 = $row2[ca_name];
|
||||
}
|
||||
|
||||
if (strlen($row[ca_id]) >= 8) {
|
||||
$ca_id4 = substr($row[ca_id],0,8);
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '$ca_id4' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '$ca_id4' ");
|
||||
$ca_name4 = $row2[ca_name];
|
||||
}
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ else
|
||||
}
|
||||
|
||||
$time = date("Y-m-d 00:00:00", $g4[server_time] - 86400);
|
||||
$sql =" select * from $g4[yc4_item_table] where it_use = '1' and it_time >= '$time' order by ca_id";
|
||||
$sql =" select * from $g4[shop_item_table] where it_use = '1' and it_time >= '$time' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
@ -36,24 +36,24 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
$ca_name4 = "";
|
||||
|
||||
$ca_id1 = substr($row[ca_id],0,2);
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '$ca_id1' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '$ca_id1' ");
|
||||
$ca_name1 = $row2[ca_name];
|
||||
|
||||
if (strlen($row[ca_id]) >= 4) {
|
||||
$ca_id2 = substr($row[ca_id],0,4);
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '$ca_id2' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '$ca_id2' ");
|
||||
$ca_name2 = $row2[ca_name];
|
||||
}
|
||||
|
||||
if (strlen($row[ca_id]) >= 6) {
|
||||
$ca_id3 = substr($row[ca_id],0,6);
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '$ca_id3' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '$ca_id3' ");
|
||||
$ca_name3 = $row2[ca_name];
|
||||
}
|
||||
|
||||
if (strlen($row[ca_id]) >= 8) {
|
||||
$ca_id4 = substr($row[ca_id],0,8);
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '$ca_id4' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '$ca_id4' ");
|
||||
$ca_name4 = $row2[ca_name];
|
||||
}
|
||||
|
||||
|
||||
@ -60,26 +60,26 @@ else
|
||||
$delivery = (int)$tmp[0];
|
||||
}
|
||||
|
||||
$sql =" select * from $g4[yc4_item_table] where it_use = '1' order by ca_id";
|
||||
$sql =" select * from $g4[shop_item_table] where it_use = '1' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,2)."' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,2)."' ");
|
||||
$ca_name1 = $row2[ca_name];
|
||||
|
||||
if (strlen($row[ca_id]) >= 4) {
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,4)."' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,4)."' ");
|
||||
$ca_name2 = $row2[ca_name];
|
||||
}
|
||||
|
||||
if (strlen($row[ca_id]) >= 6) {
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,6)."' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,6)."' ");
|
||||
$ca_name3 = $row2[ca_name];
|
||||
}
|
||||
|
||||
if (strlen($row[ca_id]) >= 8) {
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,8)."' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,8)."' ");
|
||||
$ca_name4 = $row2[ca_name];
|
||||
}
|
||||
|
||||
|
||||
@ -63,26 +63,26 @@ else
|
||||
}
|
||||
|
||||
$time = date("Y-m-d 00:00:00", $g4[server_time] - 86400);
|
||||
$sql =" select * from $g4[yc4_item_table] where it_use = '1' and it_time >= '$time' order by ca_id";
|
||||
$sql =" select * from $g4[shop_item_table] where it_use = '1' and it_time >= '$time' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,2)."' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,2)."' ");
|
||||
$ca_name1 = $row2[ca_name];
|
||||
|
||||
if (strlen($row[ca_id]) >= 4) {
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,4)."' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,4)."' ");
|
||||
$ca_name2 = $row2[ca_name];
|
||||
}
|
||||
|
||||
if (strlen($row[ca_id]) >= 6) {
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,6)."' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,6)."' ");
|
||||
$ca_name3 = $row2[ca_name];
|
||||
}
|
||||
|
||||
if (strlen($row[ca_id]) >= 8) {
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,8)."' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,8)."' ");
|
||||
$ca_name4 = $row2[ca_name];
|
||||
}
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ ob_start();
|
||||
$lt = "[[";
|
||||
$gt = "]]";
|
||||
|
||||
$sql =" select * from $g4[yc4_item_table] where it_use = '1' order by ca_id";
|
||||
$sql =" select * from $g4[shop_item_table] where it_use = '1' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
|
||||
@ -28,7 +28,7 @@ include_once("./_common.php");
|
||||
<?
|
||||
// <p>상품번호^대분류^중분류^소분류^제조사^모델명^상품Url^이미지Url^가격
|
||||
$str = "";
|
||||
$sql = " select * from $g4[yc4_item_table]
|
||||
$sql = " select * from $g4[shop_item_table]
|
||||
where it_use = '1'
|
||||
order by ca_id ";
|
||||
$result = sql_query($sql);
|
||||
@ -36,13 +36,13 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
$image = it_image("$row[it_id]_m");
|
||||
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,2)."' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,2)."' ");
|
||||
|
||||
if (strlen($row[ca_id]) >= 4)
|
||||
$row3 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,4)."' ");
|
||||
$row3 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,4)."' ");
|
||||
|
||||
if (strlen($row[ca_id]) >= 6)
|
||||
$row4 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,6)."' ");
|
||||
$row4 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,6)."' ");
|
||||
|
||||
// 재고검사해서 없으면 상품가격을 0 으로 설정
|
||||
$stock = get_it_stock_qty($row[it_id]);
|
||||
|
||||
@ -9,16 +9,16 @@ echo $_SERVER["HTTP_HOST"];
|
||||
|
||||
// \n상품코드#대분류#소분류#상품명#상품URL#가격
|
||||
$str = "";
|
||||
$sql = " select * from $g4[yc4_item_table]
|
||||
$sql = " select * from $g4[shop_item_table]
|
||||
where it_use = '1'
|
||||
order by ca_id ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,2)."' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,2)."' ");
|
||||
|
||||
if (strlen($row[ca_id]) >= 4)
|
||||
$row3 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,4)."' ");
|
||||
$row3 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,4)."' ");
|
||||
|
||||
$str .= "\n";
|
||||
$str .= "$row[it_id]#$row2[ca_name]#$row3[ca_name]#$row[it_name]#$g4[shop_url]/item.php?it_id=$row[it_id]#$row[it_amount]";
|
||||
|
||||
@ -19,16 +19,16 @@ else
|
||||
<?
|
||||
// 상품ID^카테고리^상품명^제조사^이미지URL^상품URL^가격^적립금^할인쿠폰^무이자할부^사은품^모델명^추가정보^출시일^배송료
|
||||
$str = "";
|
||||
$sql = " select * from $g4[yc4_item_table]
|
||||
$sql = " select * from $g4[shop_item_table]
|
||||
where it_use = '1'
|
||||
order by ca_id ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++) {
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,2)."' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,2)."' ");
|
||||
$ca_name = $row2[ca_name];
|
||||
|
||||
if (strlen($row[ca_id]) >= 4) {
|
||||
$row3 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,4)."' ");
|
||||
$row3 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,4)."' ");
|
||||
$ca_name .= "|" . $row3[ca_name];
|
||||
}
|
||||
|
||||
|
||||
@ -79,31 +79,31 @@ else {
|
||||
$deliv2 = (int)$send_cost_list[0]."원";
|
||||
}
|
||||
|
||||
$sql =" select * from $g4[yc4_item_table] where it_use = '1' order by ca_id";
|
||||
$sql =" select * from $g4[shop_item_table] where it_use = '1' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$cate1 = $cate2 = $cate3 = $cate4 = "";
|
||||
|
||||
$row2 = sql_fetch(" select ca_id, ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,2)."' ");
|
||||
$row2 = sql_fetch(" select ca_id, ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,2)."' ");
|
||||
$cate1 = $row2[ca_id];
|
||||
$catename1 = $row2[ca_name];
|
||||
|
||||
if (strlen($row[ca_id]) >= 8) {
|
||||
$row2 = sql_fetch(" select ca_id, ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,8)."' ");
|
||||
$row2 = sql_fetch(" select ca_id, ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,8)."' ");
|
||||
$cate4 = $row2[ca_id];
|
||||
$catename4 = $row2[ca_name];
|
||||
}
|
||||
|
||||
if (strlen($row[ca_id]) >= 6) {
|
||||
$row2 = sql_fetch(" select ca_id, ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,6)."' ");
|
||||
$row2 = sql_fetch(" select ca_id, ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,6)."' ");
|
||||
$cate3 = $row2[ca_id];
|
||||
$catename3 = $row2[ca_name];
|
||||
}
|
||||
|
||||
if (strlen($row[ca_id]) >= 4) {
|
||||
$row2 = sql_fetch(" select ca_id, ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,4)."' ");
|
||||
$row2 = sql_fetch(" select ca_id, ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,4)."' ");
|
||||
$cate2 = $row2[ca_id];
|
||||
$catename2 = $row2[ca_name];
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ include_once("./_common.php");
|
||||
// 페이지당 행수
|
||||
$page_rows = 1000;
|
||||
|
||||
$sql = " select count(*) as cnt from $g4[yc4_item_table] where it_use = '1' and ca_id LIKE '$ca_id%'";
|
||||
$sql = " select count(*) as cnt from $g4[shop_item_table] where it_use = '1' and ca_id LIKE '$ca_id%'";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row[cnt];
|
||||
?>
|
||||
@ -89,7 +89,7 @@ if ($page == "") $page = 1;
|
||||
$from_record = ($page - 1) * $page_rows;
|
||||
|
||||
$caid = addslashes($ca_id);
|
||||
$sql = " select * from $g4[yc4_item_table]
|
||||
$sql = " select * from $g4[shop_item_table]
|
||||
where it_use = '1'
|
||||
and ca_id LIKE '$caid%'
|
||||
order by ca_id
|
||||
|
||||
@ -48,7 +48,7 @@ include_once("./_common.php");
|
||||
// 페이지당 행수
|
||||
$page_rows = 1000;
|
||||
|
||||
$sql = " select count(*) as cnt from $g4[yc4_item_table] where it_use = '1' and ca_id LIKE '$ca_id%'";
|
||||
$sql = " select count(*) as cnt from $g4[shop_item_table] where it_use = '1' and ca_id LIKE '$ca_id%'";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row[cnt];
|
||||
?>
|
||||
@ -95,7 +95,7 @@ if ($page == "") $page = 1;
|
||||
$from_record = ($page - 1) * $page_rows;
|
||||
|
||||
$caid = addslashes($ca_id);
|
||||
$sql = " select * from $g4[yc4_item_table]
|
||||
$sql = " select * from $g4[shop_item_table]
|
||||
where it_use = '1'
|
||||
and ca_id LIKE '$caid%'
|
||||
order by ca_id
|
||||
|
||||
@ -34,7 +34,7 @@ th,td {font-family:굴림; font-size:10pt ; height:15pt}
|
||||
$url = "http://" . $_SERVER["HTTP_HOST"] . dirname($_SERVER["PHP_SELF"]);
|
||||
|
||||
$sql =" SELECT LENGTH(ca_id)=2 AS cnt, ca_id
|
||||
FROM $g4[yc4_category_table]
|
||||
FROM $g4[shop_category_table]
|
||||
HAVING cnt";
|
||||
$result = @mysql_query($sql);
|
||||
|
||||
@ -42,11 +42,11 @@ $tr = "";
|
||||
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '".$row[ca_id]."'");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '".$row[ca_id]."'");
|
||||
echo $tr;
|
||||
echo " <td align=center><a href='./enuri.php?ca_id=$row[ca_id]'>$row2[ca_name]</a></td>\n";
|
||||
$str = " <td>";
|
||||
$sql3 = "select ca_name,ca_id from $g4[yc4_category_table] where ca_id LIKE '".$row[ca_id]."%' AND LENGTH(ca_id) !=2 AND LENGTH(ca_id) < 5";
|
||||
$sql3 = "select ca_name,ca_id from $g4[shop_category_table] where ca_id LIKE '".$row[ca_id]."%' AND LENGTH(ca_id) !=2 AND LENGTH(ca_id) < 5";
|
||||
$result3 = @mysql_query($sql3);
|
||||
|
||||
$bar = "";
|
||||
|
||||
@ -49,7 +49,7 @@ include_once("./_common.php");
|
||||
// 페이지당 행수
|
||||
$page_rows = 100;
|
||||
|
||||
$sql = " select count(*) as cnt from $g4[yc4_item_table] where it_use = '1' ";
|
||||
$sql = " select count(*) as cnt from $g4[shop_item_table] where it_use = '1' ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row[cnt];
|
||||
?>
|
||||
@ -86,7 +86,7 @@ if ($page == "") $page = 1;
|
||||
// 시작 레코드 구함
|
||||
$from_record = ($page - 1) * $page_rows;
|
||||
|
||||
$sql = " select * from $g4[yc4_item_table]
|
||||
$sql = " select * from $g4[shop_item_table]
|
||||
where it_use = '1'
|
||||
order by ca_id
|
||||
limit $from_record, $page_rows ";
|
||||
@ -103,7 +103,7 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
$code = substr($row[ca_id],0,$k*2);
|
||||
|
||||
$sql3 = " select ca_name from $g4[yc4_category_table] where ca_id = '$code' ";
|
||||
$sql3 = " select ca_name from $g4[shop_category_table] where ca_id = '$code' ";
|
||||
$row3 = sql_fetch($sql3);
|
||||
|
||||
$category .= $bar . $row3[ca_name];
|
||||
|
||||
@ -52,7 +52,7 @@ else {
|
||||
$send_cost = (int)$send_cost_list[0];
|
||||
}
|
||||
|
||||
$sql =" select * from $g4[yc4_item_table] where it_use = '1' order by ca_id";
|
||||
$sql =" select * from $g4[shop_item_table] where it_use = '1' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
@ -61,24 +61,24 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
$caid1 = $caid2 = $caid3 = $caid4 = "";
|
||||
|
||||
$caid1 = substr($row[ca_id],0,2);
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '$caid1' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '$caid1' ");
|
||||
$cate1 = $row2[ca_name];
|
||||
|
||||
if (strlen($row[ca_id]) >= 8) {
|
||||
$caid4 = substr($row[ca_id],0,8);
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '$caid4' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '$caid4' ");
|
||||
$cate4 = $row2[ca_name];
|
||||
}
|
||||
|
||||
if (strlen($row[ca_id]) >= 6) {
|
||||
$caid3 = substr($row[ca_id],0,6);
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '$caid3' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '$caid3' ");
|
||||
$cate3 = $row2[ca_name];
|
||||
}
|
||||
|
||||
if (strlen($row[ca_id]) >= 4) {
|
||||
$caid2 = substr($row[ca_id],0,4);
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '$caid2' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '$caid2' ");
|
||||
$cate2 = $row2[ca_name];
|
||||
}
|
||||
|
||||
|
||||
@ -56,7 +56,7 @@ else {
|
||||
|
||||
// 하루전의 상품
|
||||
$time = date("Y-m-d 00:00:00", $g4[server_time] - 86400);
|
||||
$sql =" select * from $g4[yc4_item_table] where it_use = '1' and it_time >= '$time' order by ca_id";
|
||||
$sql =" select * from $g4[shop_item_table] where it_use = '1' and it_time >= '$time' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
@ -65,24 +65,24 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
$caid1 = $caid2 = $caid3 = $caid4 = "";
|
||||
|
||||
$caid1 = substr($row[ca_id],0,2);
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '$caid1' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '$caid1' ");
|
||||
$cate1 = $row2[ca_name];
|
||||
|
||||
if (strlen($row[ca_id]) >= 8) {
|
||||
$caid4 = substr($row[ca_id],0,8);
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '$caid4' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '$caid4' ");
|
||||
$cate4 = $row2[ca_name];
|
||||
}
|
||||
|
||||
if (strlen($row[ca_id]) >= 6) {
|
||||
$caid3 = substr($row[ca_id],0,6);
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '$caid3' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '$caid3' ");
|
||||
$cate3 = $row2[ca_name];
|
||||
}
|
||||
|
||||
if (strlen($row[ca_id]) >= 4) {
|
||||
$caid2 = substr($row[ca_id],0,4);
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '$caid2' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '$caid2' ");
|
||||
$cate2 = $row2[ca_name];
|
||||
}
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ $lt = "<<<";
|
||||
$gt = ">>>";
|
||||
|
||||
$time = date("Y-m-d 00:00:00", $g4[server_time] - 86400);
|
||||
$sql =" select * from $g4[yc4_item_table] where it_use = '1' and it_time >= '$time' order by ca_id";
|
||||
$sql =" select * from $g4[shop_item_table] where it_use = '1' and it_time >= '$time' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
|
||||
@ -19,7 +19,7 @@ Field Status Notes
|
||||
$lt = "<<<";
|
||||
$gt = ">>>";
|
||||
|
||||
$sql =" select it_id, it_name, it_amount, it_time from $g4[yc4_item_table] where it_use = '1' order by ca_id";
|
||||
$sql =" select it_id, it_name, it_amount, it_time from $g4[shop_item_table] where it_use = '1' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
|
||||
@ -15,19 +15,19 @@ include_once("./_common.php");
|
||||
<?
|
||||
// <p>상품번호^대분류^중분류^소분류^제조사^모델명^상품Url^가격
|
||||
$str = "";
|
||||
$sql = " select * from $g4[yc4_item_table]
|
||||
$sql = " select * from $g4[shop_item_table]
|
||||
where it_use = '1'
|
||||
order by ca_id ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,2)."' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,2)."' ");
|
||||
|
||||
if (strlen($row[ca_id]) >= 4)
|
||||
$row3 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,4)."' ");
|
||||
$row3 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,4)."' ");
|
||||
|
||||
if (strlen($row[ca_id]) >= 6)
|
||||
$row4 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,6)."' ");
|
||||
$row4 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,6)."' ");
|
||||
|
||||
// 재고검사해서 없으면 상품가격을 0 으로 설정
|
||||
$stock = get_it_stock_qty($row[it_id]);
|
||||
|
||||
@ -33,7 +33,7 @@ include_once("./_common.php");
|
||||
// 페이지당 행수
|
||||
$page_rows = 500;
|
||||
|
||||
$sql = " select count(*) as cnt from $g4[yc4_item_table] where it_use = '1' ";
|
||||
$sql = " select count(*) as cnt from $g4[shop_item_table] where it_use = '1' ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row[cnt];
|
||||
?>
|
||||
@ -76,24 +76,24 @@ if ($page == "") $page = 1;
|
||||
// 시작 레코드 구함
|
||||
$from_record = ($page - 1) * $page_rows;
|
||||
|
||||
$sql = " select * from $g4[yc4_item_table] where it_use = '1' order by ca_id limit $from_record, $page_rows ";
|
||||
$sql = " select * from $g4[shop_item_table] where it_use = '1' order by ca_id limit $from_record, $page_rows ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
$row2 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,2)."' ");
|
||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,2)."' ");
|
||||
|
||||
if (strlen($row[ca_id]) >= 4)
|
||||
$row3 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,4)."' ");
|
||||
$row3 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,4)."' ");
|
||||
else
|
||||
$row3[ca_name] = " ";
|
||||
|
||||
if (strlen($row[ca_id]) >= 6)
|
||||
$row4 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,6)."' ");
|
||||
$row4 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,6)."' ");
|
||||
else
|
||||
$row4[ca_name] = " ";
|
||||
|
||||
if (strlen($row[ca_id]) >= 8)
|
||||
$row5 = sql_fetch(" select ca_name from $g4[yc4_category_table] where ca_id = '".substr($row[ca_id],0,8)."' ");
|
||||
$row5 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '".substr($row[ca_id],0,8)."' ");
|
||||
else
|
||||
$row5[ca_name] = " ";
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@ include_once("./_common.php");
|
||||
// 페이지당 행수
|
||||
$page_rows = 100;
|
||||
|
||||
$sql = " select count(*) as cnt from $g4[yc4_item_table] where it_use = '1' ";
|
||||
$sql = " select count(*) as cnt from $g4[shop_item_table] where it_use = '1' ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row[cnt];
|
||||
?>
|
||||
@ -88,7 +88,7 @@ if ($page == "") $page = 1;
|
||||
// 시작 레코드 구함
|
||||
$from_record = ($page - 1) * $page_rows;
|
||||
|
||||
$sql = " select * from $g4[yc4_item_table]
|
||||
$sql = " select * from $g4[shop_item_table]
|
||||
where it_use = '1'
|
||||
order by ca_id
|
||||
limit $from_record, $page_rows ";
|
||||
@ -103,7 +103,7 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
$code = substr($row[ca_id],0,$i*2);
|
||||
|
||||
$sql3 = " select ca_name from $g4[yc4_category_table] where ca_id = '$code' ";
|
||||
$sql3 = " select ca_name from $g4[shop_category_table] where ca_id = '$code' ";
|
||||
$row3 = sql_fetch($sql3);
|
||||
|
||||
$category .= $bar . $row3[ca_name];
|
||||
|
||||
@ -19,8 +19,8 @@ include_once("./_head.php");
|
||||
<?
|
||||
// QUERY 문에 공통적으로 들어가는 내용
|
||||
// 상품명에 검색어가 포한된것과 상품판매가능인것만
|
||||
$sql_common = " from $g4[yc4_item_table] a,
|
||||
$g4[yc4_category_table] b
|
||||
$sql_common = " from $g4[shop_item_table] a,
|
||||
$g4[shop_category_table] b
|
||||
where a.ca_id=b.ca_id
|
||||
and a.it_use = 1
|
||||
and b.ca_use = 1
|
||||
@ -98,7 +98,7 @@ function write_search_save($save)
|
||||
{
|
||||
global $g4, $search_str , $default , $image_rate , $cart_dir;
|
||||
|
||||
$sql = " select ca_name from $g4[yc4_category_table] where ca_id = '$save[ca_id]' ";
|
||||
$sql = " select ca_name from $g4[shop_category_table] where ca_id = '$save[ca_id]' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
/*
|
||||
@ -122,7 +122,7 @@ function write_search_save($save)
|
||||
$ca_temp = "";
|
||||
if(strlen($save['ca_id']) > 2) // 중분류 이하일 경우
|
||||
{
|
||||
$sql2 = " select ca_name from $g4[yc4_category_table] where ca_id='".substr($save[ca_id],0,2)."' ";
|
||||
$sql2 = " select ca_name from $g4[shop_category_table] where ca_id='".substr($save[ca_id],0,2)."' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
$ca_temp = "<b><a href='./list.php?ca_id=".substr($save[ca_id],0,2)."'>$row2[ca_name]</a></b> > ";
|
||||
}
|
||||
@ -153,7 +153,7 @@ function write_search_save($save)
|
||||
it_type3,
|
||||
it_type4,
|
||||
it_type5
|
||||
from $g4[yc4_item_table] where it_id = '{$save[it_id][$i]}' ";
|
||||
from $g4[shop_item_table] where it_id = '{$save[it_id][$i]}' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$image = get_it_image("$row[it_id]_s", (int)($default[de_simg_width] / $image_rate), (int)($default[de_simg_height] / $image_rate), $row[it_id]);
|
||||
|
||||
@ -19,8 +19,8 @@ include_once("./_head.php");
|
||||
<?
|
||||
// QUERY 문에 공통적으로 들어가는 내용
|
||||
// 상품명에 검색어가 포한된것과 상품판매가능인것만
|
||||
$sql_common = " from $g4[yc4_item_table] a,
|
||||
$g4[yc4_category_table] b
|
||||
$sql_common = " from $g4[shop_item_table] a,
|
||||
$g4[shop_category_table] b
|
||||
where a.ca_id = b.ca_id
|
||||
and ( a.it_name like '%$search_str%' or
|
||||
a.it_basic like '%$search_str%' or
|
||||
@ -79,7 +79,7 @@ function write_search_save($save)
|
||||
{
|
||||
global $g4, $search_str , $default , $image_rate , $cart_dir;
|
||||
|
||||
$sql = " select ca_name from $g4[yc4_category_table] where ca_id = '$save[ca_id]' ";
|
||||
$sql = " select ca_name from $g4[shop_category_table] where ca_id = '$save[ca_id]' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
echo "
|
||||
@ -111,7 +111,7 @@ function write_search_save($save)
|
||||
it_type3,
|
||||
it_type4,
|
||||
it_type5
|
||||
from $g4[yc4_item_table] where it_id = '{$save[it_id][$i]}' ";
|
||||
from $g4[shop_item_table] where it_id = '{$save[it_id][$i]}' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$image = get_it_image("$row[it_id]_s", (int)($default[de_simg_width] / $image_rate), (int)($default[de_simg_height] / $image_rate), $row[it_id]);
|
||||
|
||||
@ -19,8 +19,8 @@ include_once("./_head.php");
|
||||
<?
|
||||
// QUERY 문에 공통적으로 들어가는 내용
|
||||
// 상품명에 검색어가 포한된것과 상품판매가능인것만
|
||||
$sql_common = " from $g4[yc4_item_table] a,
|
||||
$g4[yc4_category_table] b
|
||||
$sql_common = " from $g4[shop_item_table] a,
|
||||
$g4[shop_category_table] b
|
||||
where a.ca_id=b.ca_id
|
||||
and a.it_use = 1
|
||||
and b.ca_use = 1
|
||||
@ -83,7 +83,7 @@ function write_search_save($save)
|
||||
{
|
||||
global $g4, $search_str , $default , $image_rate , $cart_dir;
|
||||
|
||||
$sql = " select ca_name from $g4[yc4_category_table] where ca_id = '$save[ca_id]' ";
|
||||
$sql = " select ca_name from $g4[shop_category_table] where ca_id = '$save[ca_id]' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
/*
|
||||
@ -107,7 +107,7 @@ function write_search_save($save)
|
||||
$ca_temp = "";
|
||||
if(strlen($save['ca_id']) > 2) // 중분류 이하일 경우
|
||||
{
|
||||
$sql2 = " select ca_name from $g4[yc4_category_table] where ca_id='".substr($save[ca_id],0,2)."' ";
|
||||
$sql2 = " select ca_name from $g4[shop_category_table] where ca_id='".substr($save[ca_id],0,2)."' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
$ca_temp = "<b><a href='./list.php?ca_id=".substr($save[ca_id],0,2)."'>$row2[ca_name]</a></b> > ";
|
||||
}
|
||||
@ -139,7 +139,7 @@ function write_search_save($save)
|
||||
it_type3,
|
||||
it_type4,
|
||||
it_type5
|
||||
from $g4[yc4_item_table] where it_id = '{$save[it_id][$i]}' ";
|
||||
from $g4[shop_item_table] where it_id = '{$save[it_id][$i]}' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
//$image = get_it_image("$row[it_id]_s", (int)($default[de_simg_width] / $image_rate), (int)($default[de_simg_height] / $image_rate), $row[it_id]);
|
||||
|
||||
@ -152,7 +152,7 @@ if(!$default['de_card_test']) {
|
||||
// 주문서 UPDATE
|
||||
$od_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $tx_tm);
|
||||
|
||||
$sql = " update {$g4['yc4_order_table']}
|
||||
$sql = " update {$g4['shop_order_table']}
|
||||
set od_receipt_amount = '$ipgm_mnyx',
|
||||
od_receipt_time = '$od_receipt_time',
|
||||
od_cash_authno = '$cash_a_no'
|
||||
|
||||
@ -8,23 +8,23 @@ if (get_session('ss_temp_on_uid') != $on_uid)
|
||||
alert("정상적인 방법으로 확인하실 수 있습니다.", $g4[path]);
|
||||
|
||||
|
||||
$sql = " select * from $g4[yc4_card_history_table] where on_uid = '$on_uid' ";
|
||||
$sql = " select * from $g4[shop_card_history_table] where on_uid = '$on_uid' ";
|
||||
$cd = sql_fetch($sql);
|
||||
if ($cd[cd_id] == "")
|
||||
alert("값이 제대로 전달되지 않았습니다.");
|
||||
|
||||
/*
|
||||
// 포인트 결제를 했다면 실제 포인트 결제한 것으로 수정합니다.
|
||||
$sql = " select od_id, on_uid, od_receipt_point, od_temp_point from $g4[yc4_order_table] where on_uid = '$on_uid' ";
|
||||
$sql = " select od_id, on_uid, od_receipt_point, od_temp_point from $g4[shop_order_table] where on_uid = '$on_uid' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row[od_receipt_point] == 0 && $row[od_temp_point] != 0)
|
||||
{
|
||||
sql_query(" update $g4[yc4_order_table] set od_receipt_point = od_temp_point where on_uid = '$on_uid' ");
|
||||
sql_query(" update $g4[shop_order_table] set od_receipt_point = od_temp_point where on_uid = '$on_uid' ");
|
||||
insert_point($member[mb_id], (-1) * $row[od_temp_point], "주문번호:$row[od_id] 결제", "@order", $member[mb_id], "$row[od_id],$row[on_uid]");
|
||||
}
|
||||
*/
|
||||
|
||||
$sql = " select * from $g4[yc4_order_table] where on_uid = '$on_uid' ";
|
||||
$sql = " select * from $g4[shop_order_table] where on_uid = '$on_uid' ";
|
||||
$od = sql_fetch($sql);
|
||||
|
||||
// 이곳에서 정상 결제되었다는 메일도 같이 발송합니다.
|
||||
|
||||
@ -4,7 +4,7 @@ include_once("./_common.php");
|
||||
$g4[title] = "현금영수증 발행";
|
||||
include_once("$g4[path]/head.sub.php");
|
||||
|
||||
$od = sql_fetch(" select * from $g4[yc4_order_table] where od_id = '$od_id' and on_uid = '$on_uid' ");
|
||||
$od = sql_fetch(" select * from $g4[shop_order_table] where od_id = '$od_id' and on_uid = '$on_uid' ");
|
||||
if (!$od)
|
||||
die("주문서가 존재하지 않습니다.");
|
||||
|
||||
|
||||
@ -26,8 +26,8 @@ include_once("./_head.php");
|
||||
<tr><td colspan=6 height=1 class=c1></td></tr>
|
||||
<?
|
||||
$sql = " select *
|
||||
from {$g4['yc4_wish_table']} a,
|
||||
{$g4['yc4_item_table']} b
|
||||
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 ";
|
||||
|
||||
@ -7,14 +7,14 @@ if (!$is_member)
|
||||
if ($w == "d")
|
||||
{
|
||||
$wi_id = trim($_GET[wi_id]);
|
||||
$sql = " delete from $g4[yc4_wish_table]
|
||||
$sql = " delete from $g4[shop_wish_table]
|
||||
where wi_id = '$wi_id'
|
||||
and mb_id = '$member[mb_id]' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
else if ($w == "alldelete")
|
||||
{
|
||||
$sql = " delete from $g4[yc4_wish_table]
|
||||
$sql = " delete from $g4[shop_wish_table]
|
||||
where mb_id = '$member[mb_id]' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
@ -25,15 +25,15 @@ else
|
||||
wi_time = '$g4[time_ymdhis]',
|
||||
wi_ip = '$REMOTE_ADDR' ";
|
||||
|
||||
$sql = " select wi_id from $g4[yc4_wish_table]
|
||||
$sql = " select wi_id from $g4[shop_wish_table]
|
||||
where mb_id = '$member[mb_id]' and it_id = '$it_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row[wi_id]) { // 이미 있다면 삭제함
|
||||
$sql = " delete from $g4[yc4_wish_table] where wi_id = '$row[wi_id]' ";
|
||||
$sql = " delete from $g4[shop_wish_table] where wi_id = '$row[wi_id]' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
$sql = " insert $g4[yc4_wish_table]
|
||||
$sql = " insert $g4[shop_wish_table]
|
||||
set mb_id = '$member[mb_id]',
|
||||
it_id = '$it_id',
|
||||
wi_time = '$g4[time_ymdhis]',
|
||||
|
||||
Reference in New Issue
Block a user