shop 테이블명 g5_shop 으로 변경

This commit is contained in:
chicpro
2013-09-13 16:23:29 +09:00
parent fbe71caa80
commit 90ee89b4f5
217 changed files with 933 additions and 1624 deletions

View File

@ -3,7 +3,7 @@ include_once("./_common.php");
if ($_COOKIE['ck_bn_id'] != $bn_id)
{
$sql = " update {$g5['shop_banner_table']} set bn_hit = bn_hit + 1 where bn_id = '$bn_id' ";
$sql = " update {$g5['g5_shop_banner_table']} set bn_hit = bn_hit + 1 where bn_id = '$bn_id' ";
sql_query($sql);
// 하루 동안
set_cookie("ck_bn_id", $bn_id, 60*60*24);

View File

@ -1,6 +1,6 @@
<?php
// 배너 출력
$sql = " select * from {$g5['shop_banner_table']} where '".G5_TIME_YMDHIS."' between bn_begin_time and bn_end_time and bn_position = '$position' order by bn_order, bn_id desc ";
$sql = " select * from {$g5['g5_shop_banner_table']} where '".G5_TIME_YMDHIS."' between bn_begin_time and bn_end_time and bn_position = '$position' order by bn_order, bn_id desc ";
$result = sql_query($sql);
?>

View File

@ -8,7 +8,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<ul>
<?php
$hsql = " select it_id, it_name from {$g5['shop_cart_table']} ";
$hsql = " select it_id, it_name from {$g5['g5_shop_cart_table']} ";
$hsql .= " where od_id = '".get_session('ss_cart_id')."' group by it_id ";
$hresult = sql_query($hsql);
for ($i=0; $row=sql_fetch_array($hresult); $i++)

View File

@ -8,7 +8,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<ul id="gnb_1dul">
<?php
// 1단계 분류 판매 가능한 것만
$hsql = " select ca_id, ca_name from {$g5['shop_category_table']} where length(ca_id) = '2' and ca_use = '1' order by ca_id ";
$hsql = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where length(ca_id) = '2' and ca_use = '1' order by ca_id ";
$hresult = sql_query($hsql);
$gnb_zindex = 999; // gnb_1dli z-index 값 설정용
$count = count($hresult);
@ -20,7 +20,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<a href="<?php echo G5_SHOP_URL.'/list.php?ca_id='.$row['ca_id']; ?>" class="gnb_1da"><?php echo $row['ca_name']; ?></a>
<?php
// 2단계 분류 판매 가능한 것만
$sql2 = " select ca_id, ca_name from {$g5['shop_category_table']} where LENGTH(ca_id) = '4' and SUBSTRING(ca_id,1,2) = '{$row['ca_id']}' and ca_use = '1' order by ca_id ";
$sql2 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where LENGTH(ca_id) = '4' and SUBSTRING(ca_id,1,2) = '{$row['ca_id']}' and ca_use = '1' order by ca_id ";
$result2 = sql_query($sql2);
for ($j=0; $row2=sql_fetch_array($result2); $j++)
{

View File

@ -8,7 +8,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<ul>
<?php
$hsql = " select ev_id, ev_subject, ev_subject_strong from {$g5['shop_event_table']} where ev_use = '1' order by ev_id desc ";
$hsql = " select ev_id, ev_subject, ev_subject_strong from {$g5['g5_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++)
{

View File

@ -8,7 +8,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<ul>
<?php
$hsql = " select a.it_id, b.it_name from {$g5['shop_wish_table']} a, {$g5['shop_item_table']} b ";
$hsql = " select a.it_id, b.it_name from {$g5['g5_shop_wish_table']} a, {$g5['g5_shop_item_table']} b ";
$hsql .= " where a.mb_id = '{$member['mb_id']}' and a.it_id = b.it_id order by a.wi_id desc ";
$hresult = sql_query($hsql);
for ($i=0; $row=sql_fetch_array($hresult); $i++)

View File

@ -6,7 +6,7 @@ set_cart_id($sw_direct);
$s_cart_id = get_session('ss_cart_id');
// 선택필드 초기화
$sql = " update {$g5['shop_cart_table']} set ct_select = '0' where od_id = '$s_cart_id' ";
$sql = " update {$g5['g5_shop_cart_table']} set ct_select = '0' where od_id = '$s_cart_id' ";
sql_query($sql);
$cart_action_url = G5_SHOP_URL.'/cartupdate.php';
@ -58,7 +58,7 @@ include_once('./_head.php');
b.ca_id,
b.ca_id2,
b.ca_id3
from {$g5['shop_cart_table']} a left join {$g5['shop_item_table']} b on ( a.it_id = b.it_id )
from {$g5['g5_shop_cart_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id )
where a.od_id = '$s_cart_id' ";
if($default['de_cart_keep_term']) {
$ctime = date('Y-m-d H:i:s', G5_SERVER_TIME - ($default['de_cart_keep_term'] * 86400));
@ -76,7 +76,7 @@ include_once('./_head.php');
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,
SUM(ct_point * ct_qty) as point,
SUM(ct_qty) as qty
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where it_id = '{$row['it_id']}'
and od_id = '$s_cart_id' ";
$sum = sql_fetch($sql);

View File

@ -3,7 +3,7 @@ include_once('./_common.php');
$it_id = $_POST['it_id'];
$sql = " select it_id, it_option_subject, it_supply_subject, it_price, it_point, it_point_type from {$g5['shop_item_table']} where it_id = '$it_id' and it_use = '1' ";
$sql = " select it_id, it_option_subject, it_supply_subject, it_price, it_point, it_point_type from {$g5['g5_shop_item_table']} where it_id = '$it_id' and it_use = '1' ";
$it = sql_fetch($sql);
$it_point = get_item_point($it);
@ -12,11 +12,11 @@ if(!$it['it_id'])
// 장바구니 자료
$cart_id = get_session('ss_cart_id');
$sql = " select * from {$g5['shop_cart_table']} where od_id = '$cart_id' and it_id = '$it_id' order by io_type asc, ct_id asc ";
$sql = " select * from {$g5['g5_shop_cart_table']} where od_id = '$cart_id' and it_id = '$it_id' order by io_type asc, ct_id asc ";
$result = sql_query($sql);
// 판매가격
$sql2 = " select ct_price, it_name, ct_send_cost from {$g5['shop_cart_table']} where od_id = '$cart_id' and it_id = '$it_id' order by ct_id asc limit 1 ";
$sql2 = " select ct_price, it_name, ct_send_cost from {$g5['g5_shop_cart_table']} where od_id = '$cart_id' and it_id = '$it_id' order by ct_id asc limit 1 ";
$row2 = sql_fetch($sql2);
if(!mysql_num_rows($result))

View File

@ -34,7 +34,7 @@ if($act == "buy")
$ct_chk = $_POST['ct_chk'][$i];
if($ct_chk) {
$it_id = $_POST['it_id'][$i];
$sql = " update {$g5['shop_cart_table']}
$sql = " update {$g5['g5_shop_cart_table']}
set ct_select = '1'
where it_id = '$it_id' and od_id = '$tmp_cart_id' ";
sql_query($sql);
@ -48,7 +48,7 @@ if($act == "buy")
}
else if ($act == "alldelete") // 모두 삭제이면
{
$sql = " delete from {$g5['shop_cart_table']}
$sql = " delete from {$g5['g5_shop_cart_table']}
where od_id = '$tmp_cart_id' ";
sql_query($sql);
}
@ -62,7 +62,7 @@ else if ($act == "seldelete") // 선택삭제
$ct_chk = $_POST['ct_chk'][$i];
if($ct_chk) {
$it_id = $_POST['it_id'][$i];
$sql = " delete from {$g5['shop_cart_table']} where it_id = '$it_id' and od_id = '$tmp_cart_id' ";
$sql = " delete from {$g5['g5_shop_cart_table']} where it_id = '$it_id' and od_id = '$tmp_cart_id' ";
sql_query($sql);
}
}
@ -91,14 +91,14 @@ else // 장바구니에 담기
}
// 상품정보
$sql = " select * from {$g5['shop_item_table']} where it_id = '$it_id' ";
$sql = " select * from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$it = sql_fetch($sql);
if(!$it['it_id'])
alert('상품정보가 존재하지 않습니다.');
// 옵션정보를 얻어서 배열에 저장
$opt_list = array();
$sql = " select * from {$g5['shop_item_option_table']} where it_id = '$it_id' order by io_no asc ";
$sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '$it_id' order by io_no asc ";
$result = sql_query($sql);
$lst_count = 0;
for($k=0; $row=sql_fetch_array($result); $k++) {
@ -123,7 +123,7 @@ else // 장바구니에 담기
$io_type = $_POST['io_type'][$it_id][$k];
$io_value = $_POST['io_value'][$it_id][$k];
$sql = " select SUM(ct_qty) as cnt from {$g5['shop_cart_table']}
$sql = " select SUM(ct_qty) as cnt from {$g5['g5_shop_cart_table']}
where it_id = '$it_id'
and od_id = '$tmp_cart_id'
and io_id = '$io_id' ";
@ -146,11 +146,11 @@ else // 장바구니에 담기
// 바로구매에 있던 장바구니 자료를 지운다.
if($i == 0)
sql_query(" delete from {$g5['shop_cart_table']} where od_id = '$tmp_cart_id' and ct_direct = 1 ", false);
sql_query(" delete from {$g5['g5_shop_cart_table']} where od_id = '$tmp_cart_id' and ct_direct = 1 ", false);
// 옵션수정일 때 기존 장바구니 자료를 먼저 삭제
if($act == 'optionmod')
sql_query(" delete from {$g5['shop_cart_table']} where od_id = '$tmp_cart_id' and it_id = '$it_id' ");
sql_query(" delete from {$g5['g5_shop_cart_table']} where od_id = '$tmp_cart_id' and it_id = '$it_id' ");
// 장바구니에 Insert
// 바로구매일 경우 장바구니가 체크된것으로 강제 설정
@ -161,7 +161,7 @@ else // 장바구니에 담기
// 장바구니에 Insert
$comma = '';
$sql = " INSERT INTO {$g5['shop_cart_table']}
$sql = " INSERT INTO {$g5['g5_shop_cart_table']}
( od_id, mb_id, it_id, it_name, ct_status, ct_price, ct_point, ct_point_use, ct_stock_use, ct_option, ct_qty, ct_notax, io_id, io_type, io_price, ct_time, ct_ip, ct_send_cost, ct_direct, ct_select )
VALUES ";
@ -183,14 +183,14 @@ else // 장바구니에 담기
// 동일옵션의 상품이 있으면 수량 더함
$sql2 = " select ct_id
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where od_id = '$tmp_cart_id'
and it_id = '$it_id'
and io_id = '$io_id'
and ct_status = '쇼핑' ";
$row2 = sql_fetch($sql2);
if($row2['ct_id']) {
$sql3 = " update {$g5['shop_cart_table']}
$sql3 = " update {$g5['g5_shop_cart_table']}
set ct_qty = ct_qty + '$ct_qty'
where ct_id = '{$row2['ct_id']}' ";
sql_query($sql3);

View File

@ -2,7 +2,7 @@
include_once('./_common.php');
// 내용
$sql = " select * from {$g5['shop_content_table']} where co_id = '$co_id' ";
$sql = " select * from {$g5['g5_shop_content_table']} where co_id = '$co_id' ";
$co = sql_fetch($sql);
if (!$co['co_id'])
alert('등록된 내용이 없습니다.');

View File

@ -8,7 +8,7 @@ $g5['title'] = $member['mb_nick'].' 님의 쿠폰 내역';
include_once(G5_PATH.'/head.sub.php');
$sql = " select cp_id, cp_subject, cp_method, cp_target, cp_start, cp_end, cp_type, cp_price
from {$g5['shop_coupon_table']}
from {$g5['g5_shop_coupon_table']}
where mb_id = '{$member['mb_id']}'
and cp_start <= '".G5_TIME_YMD."'
and cp_end >= '".G5_TIME_YMD."'
@ -37,7 +37,7 @@ $result = sql_query($sql);
continue;
if($row['cp_method'] == 1) {
$sql = " select ca_name from {$g5['shop_category_table']} where ca_id = '{$row['cp_target']}' ";
$sql = " select ca_name from {$g5['g5_shop_category_table']} where ca_id = '{$row['cp_target']}' ";
$ca = sql_fetch($sql);
$cp_target = $ca['ca_name'].'의 상품할인';
} else if($row['cp_method'] == 2) {
@ -45,7 +45,7 @@ $result = sql_query($sql);
} else if($row['cp_method'] == 3) {
$cp_target = '배송비 할인';
} else {
$sql = " select it_name from {$g5['shop_item_table']} where it_id = '{$row['cp_target']}' ";
$sql = " select it_name from {$g5['g5_shop_item_table']} where it_id = '{$row['cp_target']}' ";
$it = sql_fetch($sql);
$cp_target = $it['it_name'].' 상품할인';
}

View File

@ -1,7 +1,7 @@
<?php
include_once('./_common.php');
$sql = " select * from {$g5['shop_event_table']}
$sql = " select * from {$g5['g5_shop_event_table']}
where ev_id = '$ev_id'
and ev_use = 1 ";
$ev = sql_fetch($sql);

View File

@ -4,7 +4,7 @@ include_once('./_common.php');
if (!$fm_id) $fm_id = 1;
// FAQ MASTER
$sql = " select * from {$g5['shop_faq_master_table']} where fm_id = '$fm_id' ";
$sql = " select * from {$g5['g5_shop_faq_master_table']} where fm_id = '$fm_id' ";
$fm = sql_fetch($sql);
if (!$fm['fm_id'])
alert('등록된 내용이 없습니다.');
@ -30,7 +30,7 @@ echo '<div id="sfaq_hhtml">'.stripslashes($fm['fm_head_html']).'</div>';
<div id="sfaq_wrap" class="sfaq_<?php echo $fm_id; ?>">
<?php // FAQ 목차
$sql = " select * from {$g5['shop_faq_table']}
$sql = " select * from {$g5['g5_shop_faq_table']}
where fm_id = '$fm_id'
order by fa_order , fa_id ";
$result = sql_query($sql);

View File

@ -11,7 +11,7 @@ $it_id = escape_trim($_GET['it_id']);
include_once(G5_LIB_PATH.'/iteminfo.lib.php');
// 분류사용, 상품사용하는 상품의 정보를 얻음
$sql = " select a.*, b.ca_name, b.ca_use from {$g5['shop_item_table']} a, {$g5['shop_category_table']} b where a.it_id = '$it_id' and a.ca_id = b.ca_id ";
$sql = " select a.*, b.ca_name, b.ca_use from {$g5['g5_shop_item_table']} a, {$g5['g5_shop_category_table']} b where a.it_id = '$it_id' and a.ca_id = b.ca_id ";
$it = sql_fetch($sql);
if (!$it['it_id'])
alert('자료가 없습니다.');
@ -21,7 +21,7 @@ if (!($it['ca_use'] && $it['it_use'])) {
}
// 분류 테이블에서 분류 상단, 하단 코드를 얻음
$sql = " select ca_include_head, ca_include_tail, ca_hp_cert_use, ca_adult_cert_use from {$g5['shop_category_table']} where ca_id = '{$it['ca_id']}' ";
$sql = " select ca_include_head, ca_include_tail, ca_hp_cert_use, ca_adult_cert_use from {$g5['g5_shop_category_table']} where ca_id = '{$it['ca_id']}' ";
$ca = sql_fetch($sql);
if(!$is_admin) {
@ -64,7 +64,7 @@ if (!$saved) {
// 조회수 증가
if ($_COOKIE['ck_it_id'] != $it_id) {
sql_query(" update {$g5['shop_item_table']} set it_hit = it_hit + 1 where it_id = '$it_id' "); // 1증가
sql_query(" update {$g5['g5_shop_item_table']} set it_hit = it_hit + 1 where it_id = '$it_id' "); // 1증가
set_cookie("ck_it_id", $it_id, time() + 3600); // 1시간동안 저장
}
@ -95,7 +95,7 @@ if ($is_admin) {
echo '<div id="sit_hhtml">'.stripslashes($it['it_head_html']).'</div>';
// 이전 상품보기
$sql = " select it_id, it_name from {$g5['shop_item_table']} where it_id > '$it_id' and SUBSTRING(ca_id,1,4) = '".substr($it['ca_id'],0,4)."' and it_use = '1' order by it_id asc limit 1 ";
$sql = " select it_id, it_name from {$g5['g5_shop_item_table']} where it_id > '$it_id' and SUBSTRING(ca_id,1,4) = '".substr($it['ca_id'],0,4)."' and it_use = '1' order by it_id asc limit 1 ";
$row = sql_fetch($sql);
if ($row['it_id']) {
$prev_title = '이전상품<span class="sound_only"> '.$row['it_name'].'</span>';
@ -108,7 +108,7 @@ if ($row['it_id']) {
}
// 다음 상품보기
$sql = " select it_id, it_name from {$g5['shop_item_table']} where it_id < '$it_id' and SUBSTRING(ca_id,1,4) = '".substr($it['ca_id'],0,4)."' and it_use = '1' order by it_id desc limit 1 ";
$sql = " select it_id, it_name from {$g5['g5_shop_item_table']} where it_id < '$it_id' and SUBSTRING(ca_id,1,4) = '".substr($it['ca_id'],0,4)."' and it_use = '1' order by it_id desc limit 1 ";
$row = sql_fetch($sql);
if ($row['it_id']) {
$next_title = '다음 상품<span class="sound_only"> '.$row['it_name'].'</span>';
@ -121,27 +121,27 @@ if ($row['it_id']) {
}
// 관리자가 확인한 사용후기의 갯수를 얻음
$sql = " select count(*) as cnt from `{$g5['shop_item_use_table']}` where it_id = '{$it_id}' and is_confirm = '1' ";
$sql = " select count(*) as cnt from `{$g5['g5_shop_item_use_table']}` where it_id = '{$it_id}' and is_confirm = '1' ";
$row = sql_fetch($sql);
$item_use_count = $row['cnt'];
// 상품문의의 갯수를 얻음
$sql = " select count(*) as cnt from `{$g5['shop_item_qa_table']}` where it_id = '{$it_id}' ";
$sql = " select count(*) as cnt from `{$g5['g5_shop_item_qa_table']}` where it_id = '{$it_id}' ";
$row = sql_fetch($sql);
$item_qa_count = $row['cnt'];
// 관련상품의 갯수를 얻음
$sql = " select count(*) as cnt from {$g5['shop_item_relation_table']} a left join {$g5['shop_item_table']} b on (a.it_id2=b.it_id and b.it_use='1') where a.it_id = '{$it['it_id']}' ";
$sql = " select count(*) as cnt from {$g5['g5_shop_item_relation_table']} a left join {$g5['g5_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'];
// 상품 선택옵션 갯수
$sql = " select count(*) as cnt from {$g5['shop_item_option_table']} where it_id = '{$it['it_id']}' and io_type = '0' and io_use = '1' ";
$sql = " select count(*) as cnt from {$g5['g5_shop_item_option_table']} where it_id = '{$it['it_id']}' and io_type = '0' and io_use = '1' ";
$row = sql_fetch($sql);
$opt_count = $row['cnt'];
// 상품 추가옵션 갯수
$sql = " select count(*) as cnt from {$g5['shop_item_option_table']} where it_id = '{$it['it_id']}' and io_type = '1' and io_use = '1' ";
$sql = " select count(*) as cnt from {$g5['g5_shop_item_option_table']} where it_id = '{$it['it_id']}' and io_type = '1' and io_use = '1' ";
$row = sql_fetch($sql);
$spl_count = $row['cnt'];

View File

@ -5,11 +5,11 @@ $it_id = $_GET['it_id'];
$io_id = $_GET['opt'];
// 상품정보
$sql = " select * from {$g5['shop_item_table']} where it_id = '$it_id' ";
$sql = " select * from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$it = sql_fetch($sql);
// 상품옵션체크
$sql = " select count(*) as cnt from {$g5['shop_item_option_table']} where it_id = '$it_id' and io_type = '0' and io_use = '1' ";
$sql = " select count(*) as cnt from {$g5['g5_shop_item_option_table']} where it_id = '$it_id' and io_type = '0' and io_use = '1' ";
$cnt = sql_fetch($sql);
if(($io_id && !$cnt['cnt']) || (!$io_id && $cnt['cnt']))
@ -17,7 +17,7 @@ if(($io_id && !$cnt['cnt']) || (!$io_id && $cnt['cnt']))
// 옵션정보
if($io_id && $it['it_option_subject']) {
$sql = " select * from {$g5['shop_item_option_table']} where it_id = '$it_id' and io_id = '$io_id' ";
$sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '$it_id' and io_id = '$io_id' ";
$opt = sql_fetch($sql);
$subj = explode(',', $it['it_option_subject']);

View File

@ -6,7 +6,7 @@ $opt_id = $_POST['opt_id'];
$idx = $_POST['idx'];
$sel_count = $_POST['sel_count'];
$sql = " select * from {$g5['shop_item_option_table']}
$sql = " select * from {$g5['g5_shop_item_option_table']}
where io_type = '0'
and it_id = '$it_id'
and io_use = '1'

View File

@ -20,7 +20,7 @@ $thumbnail_width = 500;
<h3>등록된 상품문의</h3>
<?php
$sql_common = " from `{$g5['shop_item_qa_table']}` where it_id = '{$it_id}' ";
$sql_common = " from `{$g5['g5_shop_item_qa_table']}` where it_id = '{$it_id}' ";
// 테이블의 전체 레코드수만 얻음
$sql = " select COUNT(*) as cnt " . $sql_common;

View File

@ -21,7 +21,7 @@ if (!$is_member) {
if ($w == "u")
{
$qa = sql_fetch(" select * from {$g5['shop_item_qa_table']} where iq_id = '$iq_id' ");
$qa = sql_fetch(" select * from {$g5['g5_shop_item_qa_table']} where iq_id = '$iq_id' ");
if (!$qa) {
alert_close("상품문의 정보가 없습니다.");
}

View File

@ -23,7 +23,7 @@ $url = "./item.php?it_id=$it_id&amp;_=".get_token()."#sit_qa";
if ($w == "")
{
$sql = "insert {$g5['shop_item_qa_table']}
$sql = "insert {$g5['g5_shop_item_qa_table']}
set it_id = '$it_id',
mb_id = '{$member['mb_id']}',
iq_name = '$iq_name',
@ -38,15 +38,15 @@ if ($w == "")
}
else if ($w == "u")
{
if (!$is_amdin)
if (!$is_amdin)
{
$sql = " select count(*) as cnt from {$g5['shop_item_qa_table']} where mb_id = '{$member['mb_id']}' and iq_id = '$iq_id' ";
$sql = " select count(*) as cnt from {$g5['g5_shop_item_qa_table']} where mb_id = '{$member['mb_id']}' and iq_id = '$iq_id' ";
$row = sql_fetch($sql);
if (!$row['cnt'])
alert("자신의 상품문의만 수정하실 수 있습니다.");
}
$sql = " update {$g5['shop_item_qa_table']}
$sql = " update {$g5['g5_shop_item_qa_table']}
set iq_subject = '$iq_subject',
iq_question = '$iq_question'
where iq_id = '$iq_id' ";
@ -56,9 +56,9 @@ else if ($w == "u")
}
else if ($w == "d")
{
if (!$is_admin)
if (!$is_admin)
{
$sql = " select iq_answer from {$g5['shop_item_qa_table']} where mb_id = '{$member['mb_id']}' and iq_id = '$iq_id' ";
$sql = " select iq_answer from {$g5['g5_shop_item_qa_table']} where mb_id = '{$member['mb_id']}' and iq_id = '$iq_id' ";
$row = sql_fetch($sql);
if (!$row)
alert("자신의 상품문의만 삭제하실 수 있습니다.");
@ -67,8 +67,8 @@ else if ($w == "d")
alert("답변이 있는 상품문의는 삭제하실 수 없습니다.");
}
//$sql = " delete from {$g5['shop_item_qa_table']} where mb_id = '{$member['mb_id']}' and iq_id = '$iq_id' ";
$sql = " delete from {$g5['shop_item_qa_table']} where iq_id = '$iq_id' and md5(concat(iq_id,iq_time,iq_ip)) = '{$hash}' ";
//$sql = " delete from {$g5['g5_shop_item_qa_table']} where mb_id = '{$member['mb_id']}' and iq_id = '$iq_id' ";
$sql = " delete from {$g5['g5_shop_item_qa_table']} where iq_id = '$iq_id' and md5(concat(iq_id,iq_time,iq_ip)) = '{$hash}' ";
sql_query($sql);
alert("상품문의가 삭제 되었습니다.", $url);

View File

@ -14,7 +14,7 @@ $stx = escape_trim($_REQUEST['stx']);
$g5['title'] = '상품문의';
include_once('./_head.php');
$sql_common = " from `{$g5['shop_item_qa_table']}` a join `{$g5['shop_item_table']}` b on (a.it_id=b.it_id) ";
$sql_common = " from `{$g5['g5_shop_item_qa_table']}` a join `{$g5['g5_shop_item_table']}` b on (a.it_id=b.it_id) ";
$sql_search = " where (1) ";
if(!$sfl)

View File

@ -8,7 +8,7 @@ if (!$is_member)
$token = md5(uniqid(rand(), true));
set_session("ss_token", $token);
$sql = " select it_name from {$g5['shop_item_table']} where it_id='$it_id' ";
$sql = " select it_name from {$g5['g5_shop_item_table']} where it_id='$it_id' ";
$it = sql_fetch($sql);
if (!$it['it_name'])
alert_close("등록된 상품이 아닙니다.");

View File

@ -28,7 +28,7 @@ if ($_POST["token"] && get_session("ss_token") == $_POST["token"]) {
}
// 상품
$sql = " select * from {$g5['shop_item_table']} where it_id = '$it_id' ";
$sql = " select * from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$it = sql_fetch($sql);
if (!$it['it_id'])
alert("등록된 상품이 아닙니다.");

View File

@ -18,7 +18,7 @@ $itemuse_formupdate = "./itemuseformupdate.php?it_id=".$it_id;
<h3>등록된 사용후기</h3>
<?php
$sql_common = " from `{$g5['shop_item_use_table']}` where it_id = '{$it_id}' and is_confirm = '1' ";
$sql_common = " from `{$g5['g5_shop_item_use_table']}` where it_id = '{$it_id}' and is_confirm = '1' ";
// 테이블의 전체 레코드수만 얻음
$sql = " select COUNT(*) as cnt " . $sql_common;

View File

@ -22,7 +22,7 @@ if (!$is_member) {
if ($w == "") {
$is_score = 10;
} else if ($w == "u") {
$use = sql_fetch(" select * from {$g5['shop_item_use_table']} where is_id = '$is_id' ");
$use = sql_fetch(" select * from {$g5['g5_shop_item_use_table']} where is_id = '$is_id' ");
if (!$use) {
alert_close("사용후기 정보가 없습니다.");
}

View File

@ -18,20 +18,20 @@ if ($w == "" || $w == "u") {
$url = "./item.php?it_id=$it_id&amp;_=".get_token()."#sit_use";
if ($w == "")
if ($w == "")
{
/*
$sql = " select max(is_id) as max_is_id from {$g5['shop_item_use_table']} ";
$sql = " select max(is_id) as max_is_id from {$g5['g5_shop_item_use_table']} ";
$row = sql_fetch($sql);
$max_is_id = $row['max_is_id'];
$sql = " select max(is_id) as max_is_id from {$g5['shop_item_use_table']} where it_id = '$it_id' and mb_id = '{$member['mb_id']}' ";
$sql = " select max(is_id) as max_is_id from {$g5['g5_shop_item_use_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 {$g5['shop_item_use_table']}
$sql = "insert {$g5['g5_shop_item_use_table']}
set it_id = '$it_id',
mb_id = '{$member['mb_id']}',
is_score = '$is_score',
@ -50,15 +50,15 @@ if ($w == "")
} else {
alert_opener("사용후기가 등록 되었습니다.", $url);
}
}
else if ($w == "u")
}
else if ($w == "u")
{
$sql = " select is_password from {$g5['shop_item_use_table']} where is_id = '$is_id' ";
$sql = " select is_password from {$g5['g5_shop_item_use_table']} where is_id = '$is_id' ";
$row = sql_fetch($sql);
if ($row['is_password'] != $is_password)
alert("패스워드가 틀리므로 수정하실 수 없습니다.");
$sql = " update {$g5['shop_item_use_table']}
$sql = " update {$g5['g5_shop_item_use_table']}
set is_subject = '$is_subject',
is_content = '$is_content',
is_score = '$is_score'
@ -67,19 +67,19 @@ else if ($w == "u")
alert_opener("사용후기가 수정 되었습니다.", $url);
}
else if ($w == "d")
else if ($w == "d")
{
if (!$is_admin)
if (!$is_admin)
{
$sql = " select count(*) as cnt from {$g5['shop_item_use_table']} where mb_id = '{$member['mb_id']}' and is_id = '$is_id' ";
$sql = " select count(*) as cnt from {$g5['g5_shop_item_use_table']} where mb_id = '{$member['mb_id']}' and is_id = '$is_id' ";
$row = sql_fetch($sql);
if (!$row['cnt'])
alert("자신의 사용후기만 삭제하실 수 있습니다.");
}
$sql = " delete from {$g5['shop_item_use_table']} where is_id = '$is_id' and md5(concat(is_id,is_time,is_ip)) = '{$hash}' ";
$sql = " delete from {$g5['g5_shop_item_use_table']} where is_id = '$is_id' and md5(concat(is_id,is_time,is_ip)) = '{$hash}' ";
sql_query($sql);
alert("사용후기를 삭제 하였습니다.", $url);
}
}
?>

View File

@ -14,7 +14,7 @@ $stx = escape_trim($_REQUEST['stx']);
$g5['title'] = '사용후기';
include_once('./_head.php');
$sql_common = " from `{$g5['shop_item_use_table']}` a join `{$g5['shop_item_table']}` b on (a.it_id=b.it_id) ";
$sql_common = " from `{$g5['g5_shop_item_use_table']}` a join `{$g5['g5_shop_item_table']}` b on (a.it_id=b.it_id) ";
$sql_search = " where a.is_confirm = '1' ";
if(!$sfl)
@ -95,7 +95,7 @@ $from_record = ($page - 1) * $rows; // 시작 열을 구함
$is_content = get_view_thumbnail($row['is_content'], 500);
$small_image = $row['it_id'];
$row2 = sql_fetch(" select it_name from {$g5['shop_item_table']} where it_id = '{$row['it_id']}' ");
$row2 = sql_fetch(" select it_name from {$g5['g5_shop_item_table']} where it_id = '{$row['it_id']}' ");
$it_href = G5_SHOP_URL."/item.php?it_id={$row['it_id']}";
if ($i == 0) echo '<ol>';

View File

@ -3,7 +3,7 @@ include './_common.php';
include G5_LIB_PATH.'/etc.lib.php';
// 현금영수증 필드생성
$sql = " ALTER TABLE `{$g5['shop_order_table']}` ADD `od_cash_no` VARCHAR( 255 ) NOT NULL ,
$sql = " ALTER TABLE `{$g5['g5_shop_order_table']}` ADD `od_cash_no` VARCHAR( 255 ) NOT NULL ,
ADD `od_cash_receipt_no` VARCHAR( 255 ) NOT NULL ,
ADD `od_cash_app_time` VARCHAR( 255 ) NOT NULL ,
ADD `od_cash_reg_stat` VARCHAR( 255 ) NOT NULL ,
@ -13,10 +13,10 @@ $sql = " ALTER TABLE `{$g5['shop_order_table']}` ADD `od_cash_no` VARCHAR( 255 )
sql_query($sql, false);
// 현금영수증 사용, 미사용 구분
$sql = " ALTER TABLE `{$g5['shop_order_table']}` ADD `od_cash` TINYINT NOT NULL ";
$sql = " ALTER TABLE `{$g5['g5_shop_order_table']}` ADD `od_cash` TINYINT NOT NULL ";
sql_query($sql, false);
$sql = " select count(*) as cnt from {$g5['shop_order_table']} where od_id = '{$_POST['ordr_idxx']}' and od_cash = 1 ";
$sql = " select count(*) as cnt from {$g5['g5_shop_order_table']} where od_id = '{$_POST['ordr_idxx']}' and od_cash = 1 ";
$row = sql_fetch($sql);
if ($row['cnt']) {
alert('이미 등록된 현금영수증 입니다.');
@ -241,7 +241,7 @@ if ($row['cnt']) {
/* = -------------------------------------------------------------------------- = */
$bSucc = ""; // DB 작업 실패일 경우 "false" 로 세팅
$sql = " update {$g5['shop_order_table']}
$sql = " update {$g5['g5_shop_order_table']}
set od_cash_no = '$cash_no',
od_cash_receipt_no = '$receipt_no',
od_cash_app_time = '$app_time',

View File

@ -10,7 +10,7 @@ $it_id = $_GET['it_id'];
$no = $_GET['no'];
$sql = " select it_id, it_name, it_img1, it_img2, it_img3, it_img4, it_img5, it_img6, it_img7, it_img8, it_img9, it_img10
from {$g5['shop_item_table']} where it_id='$it_id' ";
from {$g5['g5_shop_item_table']} where it_id='$it_id' ";
$row = sql_fetch_array(sql_query($sql));
if(!$row['it_id'])

View File

@ -7,7 +7,7 @@ if (G5_IS_MOBILE) {
}
$sql = " select *
from {$g5['shop_category_table']}
from {$g5['g5_shop_category_table']}
where ca_id = '$ca_id'
and ca_use = '1' ";
$ca = sql_fetch($sql);

View File

@ -6,12 +6,12 @@ $ca_id_len = strlen($ca_id);
$len2 = $ca_id_len + 2;
$len4 = $ca_id_len + 4;
$sql = " select ca_id, ca_name from {$g5['shop_category_table']} where ca_id like '$ca_id%' and length(ca_id) = $len2 and ca_use = '1' order by ca_id ";
$sql = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id like '$ca_id%' and length(ca_id) = $len2 and ca_use = '1' order by ca_id ";
$result = sql_query($sql);
while ($row=sql_fetch_array($result)) {
//$row2 = sql_fetch(" select count(*) as cnt from $g5[shop_category_table] where ca_id like '$row[ca_id]%' ");
$row2 = sql_fetch(" select count(*) as cnt from {$g5['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' ");
$row2 = sql_fetch(" select count(*) as cnt from {$g5['g5_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 .= '<li><a href="./list.php?ca_id='.$row['ca_id'].'">'.$row['ca_name'].' ('.$row2['cnt'].')</a></li>';
$exists = true;

View File

@ -16,11 +16,11 @@ if (!$exists) {
$len4 = $tmp_ca_id_len + 4;
// 차차기 분류의 건수를 얻음
$sql = " select count(*) as cnt from {$g5['shop_category_table']} where ca_id like '$tmp_ca_id%' and ca_use = '1' and length(ca_id) = $len4 ";
$sql = " select count(*) as cnt from {$g5['g5_shop_category_table']} where ca_id like '$tmp_ca_id%' and ca_use = '1' and length(ca_id) = $len4 ";
$row = sql_fetch($sql);
$cnt = $row['cnt'];
$sql = " select ca_id, ca_name from {$g5['shop_category_table']} where ca_id like '$tmp_ca_id%' and ca_use = '1' and length(ca_id) = $len2 order by ca_id ";
$sql = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id like '$tmp_ca_id%' and ca_use = '1' and length(ca_id) = $len2 order by ca_id ";
$result = sql_query($sql);
while ($row=sql_fetch_array($result)) {
$sct_ct_here = '';
@ -30,7 +30,7 @@ if (!$exists) {
$str .= '<li>';
if ($cnt) {
$str .= '<a href="./list.php?ca_id='.$row['ca_id'].'" class="sct_ct_parent '.$sct_ct_here.'">'.$row['ca_name'].'</a>';
$sql2 = " select ca_id, ca_name from {$g5['shop_category_table']} where ca_id like '{$row['ca_id']}%' and ca_use = '1' and length(ca_id) = $len4 order by ca_id ";
$sql2 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id like '{$row['ca_id']}%' and ca_use = '1' and length(ca_id) = $len4 order by ca_id ";
$result2 = sql_query($sql2);
$k=0;
while ($row2=sql_fetch_array($result2)) {

View File

@ -4,7 +4,7 @@ $exists = false;
$depth2_ca_id = substr($ca_id, 0, 2);
$sql = " select ca_id, ca_name from {$g5['shop_category_table']} where ca_id like '${depth2_ca_id}%' and length(ca_id) = 4 and ca_use = '1' order by ca_id ";
$sql = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id like '${depth2_ca_id}%' and length(ca_id) = 4 and ca_use = '1' order by ca_id ";
$result = sql_query($sql);
while ($row=sql_fetch_array($result)) {
if (preg_match("/^{$row['ca_id']}/", $ca_id))

View File

@ -15,7 +15,7 @@ include_once('./_head.php');
// 쿠폰
$cp_count = 0;
$sql = " select cp_id
from {$g5['shop_coupon_table']}
from {$g5['g5_shop_coupon_table']}
where mb_id = '{$member['mb_id']}'
and cp_start <= '".G5_TIME_YMD."'
and cp_end >= '".G5_TIME_YMD."' ";
@ -94,8 +94,8 @@ for($k=0; $cp=sql_fetch_array($res); $k++) {
<tbody>
<?php
$sql = " select *
from {$g5['shop_wish_table']} a,
{$g5['shop_item_table']} b
from {$g5['g5_shop_wish_table']} a,
{$g5['g5_shop_item_table']} b
where a.mb_id = '{$member['mb_id']}'
and a.it_id = b.it_id
order by a.wi_id desc

View File

@ -9,7 +9,7 @@ if ($ca_id)
{
$code = substr($ca_id,0,$i*2);
$sql = " select ca_name from {$g5['shop_category_table']} where ca_id = '$code' ";
$sql = " select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$code' ";
$row = sql_fetch($sql);
$sct_here = '';

View File

@ -1,7 +1,7 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$sql = " select * from {$g5['shop_new_win_table']}
$sql = " select * from {$g5['g5_shop_new_win_table']}
where '".G5_TIME_YMDHIS."' between nw_begin_time and nw_end_time
order by nw_id asc ";
$result = sql_query($sql);
@ -11,7 +11,7 @@ for ($i=0; $row_nw=sql_fetch_array($result); $i++)
if ($_COOKIE["hd_pops_{$row_nw['nw_id']}"])
continue;
$sql = " select * from {$g5['shop_new_win_table']} where nw_id = '{$row_nw['nw_id']}' ";
$sql = " select * from {$g5['g5_shop_new_win_table']} where nw_id = '{$row_nw['nw_id']}' ";
$nw = sql_fetch($sql);
?>

View File

@ -5,13 +5,13 @@ if(!$is_member)
alert_close('회원이시라면 회원로그인 후 이용해 주십시오.');
if($w == 'd') {
$sql = " delete from {$g5['shop_order_address_table']} where mb_id = '{$member['mb_id']}' and ad_id = '$ad_id' ";
$sql = " delete from {$g5['g5_shop_order_address_table']} where mb_id = '{$member['mb_id']}' and ad_id = '$ad_id' ";
sql_query($sql);
goto_url($_SERVER['PHP_SELF']);
}
$sql = " select *
from {$g5['shop_order_address_table']}
from {$g5['g5_shop_order_address_table']}
where mb_id = '{$member['mb_id']}'
order by ad_default, ad_id desc ";
$result = sql_query($sql);

View File

@ -8,7 +8,7 @@ $price = $_POST['price'];
// 쿠폰정보
$sql = " select *
from {$g5['shop_coupon_table']}
from {$g5['g5_shop_coupon_table']}
where mb_id IN ( '{$member['mb_id']}', '전체회원' )
and cp_method = '2'
and cp_start <= '".G5_TIME_YMD."'

View File

@ -160,7 +160,7 @@ function get_intall_file()
b.ca_id2,
b.ca_id3,
b.it_notax
from {$g5['shop_cart_table']} a left join {$g5['shop_item_table']} b on ( a.it_id = b.it_id )
from {$g5['g5_shop_cart_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id )
where a.od_id = '$s_cart_id'
and a.ct_select = '1' ";
if($default['de_cart_keep_term']) {
@ -185,7 +185,7 @@ function get_intall_file()
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,
SUM(ct_point * ct_qty) as point,
SUM(ct_qty) as qty
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where it_id = '{$row['it_id']}'
and od_id = '$s_cart_id' ";
$sum = sql_fetch($sql);
@ -236,7 +236,7 @@ function get_intall_file()
$cp_count = 0;
$sql = " select cp_id
from {$g5['shop_coupon_table']}
from {$g5['g5_shop_coupon_table']}
where mb_id IN ( '{$member['mb_id']}', '전체회원' )
and cp_start <= '".G5_TIME_YMD."'
and cp_end >= '".G5_TIME_YMD."'
@ -664,7 +664,7 @@ function get_intall_file()
$sep = chr(30);
// 기본배송지
$sql = " select *
from {$g5['shop_order_address_table']}
from {$g5['g5_shop_order_address_table']}
where mb_id = '{$member['mb_id']}'
and ad_default = '1' ";
$row = sql_fetch($sql);
@ -676,7 +676,7 @@ function get_intall_file()
// 최근배송지
$sql = " select *
from {$g5['shop_order_address_table']}
from {$g5['g5_shop_order_address_table']}
where mb_id = '{$member['mb_id']}'
order by ad_id desc
limit 2 ";
@ -763,7 +763,7 @@ function get_intall_file()
if($is_member) {
// 주문쿠폰
$sql = " select cp_id
from {$g5['shop_coupon_table']}
from {$g5['g5_shop_coupon_table']}
where mb_id IN ( '{$member['mb_id']}', '전체회원' )
and cp_method = '2'
and cp_start <= '".G5_TIM_YMD."'
@ -780,7 +780,7 @@ function get_intall_file()
if($send_cost > 0) {
// 배송비쿠폰
$sql = " select cp_id
from {$g5['shop_coupon_table']}
from {$g5['g5_shop_coupon_table']}
where mb_id IN ( '{$member['mb_id']}', '전체회원' )
and cp_method = '3'
and cp_start <= '".G5_TIM_YMD."'

View File

@ -27,7 +27,7 @@ $sql = " select it_id,
io_id,
io_type,
ct_option
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where od_id = '$tmp_cart_id'
and ct_select = '1' ";
$result = sql_query($sql);
@ -63,7 +63,7 @@ $i_temp_point = (int)$_POST['od_temp_point'];
// 주문금액이 상이함
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as od_price,
COUNT(distinct it_id) as cart_count
from {$g5['shop_cart_table']} where od_id = '$tmp_cart_id' and ct_select = '1' ";
from {$g5['g5_shop_cart_table']} where od_id = '$tmp_cart_id' and ct_select = '1' ";
$row = sql_fetch($sql);
$tot_ct_price = $row['od_price'];
$cart_count = $row['cart_count'];
@ -79,7 +79,7 @@ if($is_member) {
$cid = $_POST['cp_id'][$i];
$it_id = $_POST['it_id'][$i];
$sql = " select cp_id, cp_method, cp_target, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum
from {$g5['shop_coupon_table']}
from {$g5['g5_shop_coupon_table']}
where cp_id = '$cid'
and mb_id IN ( '{$member['mb_id']}', '전체회원' )
and cp_start <= '".G5_TIME_YMD."'
@ -96,7 +96,7 @@ if($is_member) {
// 분류할인인지
if($cp['cp_method']) {
$sql2 = " select it_id, ca_id, ca_id2, ca_id3
from {$g5['shop_item_table']}
from {$g5['g5_shop_item_table']}
where it_id = '$it_id' ";
$row2 = sql_fetch($sql2);
@ -112,7 +112,7 @@ if($is_member) {
// 상품금액
$sql = " select SUM( IF(io_type = '1', io_price * ct_qty, (ct_price + io_price) * ct_qty)) as sum_price
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where od_id = '$tmp_cart_id'
and it_id = '$it_id'
and ct_select = '1' ";
@ -144,7 +144,7 @@ if($is_member) {
// 주문쿠폰
if($_POST['od_cp_id']) {
$sql = " select cp_id, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum
from {$g5['shop_coupon_table']}
from {$g5['g5_shop_coupon_table']}
where cp_id = '{$_POST['od_cp_id']}'
and mb_id IN ( '{$member['mb_id']}', '전체회원' )
and cp_start <= '".G5_TIME_YMD."'
@ -189,7 +189,7 @@ if($is_member && $send_cost > 0) {
// 배송쿠폰
if($_POST['sc_cp_id']) {
$sql = " select cp_id, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum
from {$g5['shop_coupon_table']}
from {$g5['g5_shop_coupon_table']}
where cp_id = '{$_POST['sc_cp_id']}'
and mb_id IN ( '{$member['mb_id']}', '전체회원' )
and cp_start <= '".G5_TIME_YMD."'
@ -225,7 +225,7 @@ if ((int)($send_cost - $tot_sc_cp_price) !== (int)($i_send_cost - $i_send_coupon
// 추가배송비가 상이함
$zipcode = $od_b_zip1 . $od_b_zip2;
$sql = " select sc_id, sc_price from {$g5['shop_sendcost_table']} where sc_zip1 <= '$zipcode' and sc_zip2 >= '$zipcode' ";
$sql = " select sc_id, sc_price from {$g5['g5_shop_sendcost_table']} where sc_zip1 <= '$zipcode' and sc_zip2 >= '$zipcode' ";
$tmp = sql_fetch($sql);
if(!$tmp['sc_id'])
$send_cost2 = 0;
@ -368,7 +368,7 @@ if($default['de_tax_flag_use']) {
}
// 주문서에 입력
$sql = " insert {$g5['shop_order_table']}
$sql = " insert {$g5['g5_shop_order_table']}
set od_id = '$od_id',
mb_id = '{$member['mb_id']}',
od_pwd = '$od_pwd',
@ -437,7 +437,7 @@ $sql_card_point = "";
if ($od_receipt_price > 0 && !$default['de_card_point']) {
$sql_card_point = " , ct_point = '0' ";
}
$sql = "update {$g5['shop_cart_table']}
$sql = "update {$g5['g5_shop_cart_table']}
set od_id = '$od_id',
ct_status = '주문'
$sql_card_point
@ -457,7 +457,7 @@ if(!$result) {
include G5_SHOP_PATH.'/ordererrormail.php';
// 주문삭제
sql_query(" delete from {$g5['shop_order_table']} where od_id = '$od_id' ");
sql_query(" delete from {$g5['g5_shop_order_table']} where od_id = '$od_id' ");
die_utf8('<p>고객님의 주문 정보를 처리하는 중 오류가 발생해서 주문이 완료되지 않았습니다.</p><p>KCP를 이용한 전자결제(신용카드, 계좌이체, 가상계좌 등)은 자동 취소되었습니다.');
}
@ -478,7 +478,7 @@ if($is_member) {
$cp_prc = (int)$arr_it_cp_prc[$cp_it_id];
if(trim($cid)) {
$sql = " insert into {$g5['shop_coupon_log_table']}
$sql = " insert into {$g5['g5_shop_coupon_log_table']}
set cp_id = '$cid',
mb_id = '{$member['mb_id']}',
od_id = '$od_id',
@ -489,7 +489,7 @@ if($is_member) {
// 쿠폰사용금액 cart에 기록
$cp_prc = (int)$arr_it_cp_prc[$cp_it_id];
$sql = " update {$g5['shop_cart_table']}
$sql = " update {$g5['g5_shop_cart_table']}
set cp_price = '$cp_prc'
where od_id = '$od_id'
and it_id = '$cp_it_id'
@ -500,7 +500,7 @@ if($is_member) {
}
if($_POST['od_cp_id']) {
$sql = " insert into {$g5['shop_coupon_log_table']}
$sql = " insert into {$g5['g5_shop_coupon_log_table']}
set cp_id = '{$_POST['od_cp_id']}',
mb_id = '{$member['mb_id']}',
od_id = '$od_id',
@ -510,7 +510,7 @@ if($is_member) {
}
if($_POST['sc_cp_id']) {
$sql = " insert into {$g5['shop_coupon_log_table']}
$sql = " insert into {$g5['g5_shop_coupon_log_table']}
set cp_id = '{$_POST['sc_cp_id']}',
mb_id = '{$member['mb_id']}',
od_id = '$od_id',
@ -583,7 +583,7 @@ if($is_member && ($add_address || $ad_default)) {
$ad_addr2 = $od_b_addr2;
$sql = " select ad_id
from {$g5['shop_order_address_table']}
from {$g5['g5_shop_order_address_table']}
where mb_id = '{$member['mb_id']}'
and ad_zip1 = '$ad_zip1'
and ad_zip2 = '$ad_zip2'
@ -592,14 +592,14 @@ if($is_member && ($add_address || $ad_default)) {
$row = sql_fetch($sql);
if($ad_default) {
$sql = " update {$g5['shop_order_address_table']}
$sql = " update {$g5['g5_shop_order_address_table']}
set ad_default = '0'
where mb_id = '{$member['mb_id']}' ";
sql_query($sql);
}
if($row['ad_id']) {
$sql = " update {$g5['shop_order_address_table']}
$sql = " update {$g5['g5_shop_order_address_table']}
set ad_zip1 = '$ad_zip1',
ad_zip2 = '$ad_zip2',
ad_addr1 = '$ad_addr1',
@ -614,7 +614,7 @@ if($is_member && ($add_address || $ad_default)) {
}
if(!$row['ad_id'] && $add_address) {
$sql = " insert into {$g5['shop_order_address_table']}
$sql = " insert into {$g5['g5_shop_order_address_table']}
set mb_id = '{$member['mb_id']}',
ad_subject = '$ad_subject',
ad_default = '$ad_default',

View File

@ -13,11 +13,11 @@ $od_pwd = sql_password($od_pwd);
// 회원인 경우
if ($is_member)
{
$sql_common = " from {$g5['shop_order_table']} where mb_id = '{$member['mb_id']}' ";
$sql_common = " from {$g5['g5_shop_order_table']} where mb_id = '{$member['mb_id']}' ";
}
else if ($od_id && $od_pwd) // 비회원인 경우 주문서번호와 비밀번호가 넘어왔다면
{
$sql_common = " from {$g5['shop_order_table']} where od_id = '$od_id' and od_pwd = '$od_pwd' ";
$sql_common = " from {$g5['g5_shop_order_table']} where od_id = '$od_id' and od_pwd = '$od_pwd' ";
}
else // 그렇지 않다면 로그인으로 가기
{
@ -48,7 +48,7 @@ $from_record = ($page - 1) * $rows; // 시작 열을 구함
// 비회원 주문확인의 경우 바로 주문서 상세조회로 이동
if (!$is_member)
{
$sql = " select od_id, od_time, od_ip from {$g5['shop_order_table']} where od_id = '$od_id' and od_pwd = '$od_pwd' ";
$sql = " select od_id, od_time, od_ip from {$g5['g5_shop_order_table']} where od_id = '$od_id' and od_pwd = '$od_pwd' ";
$row = sql_fetch($sql);
if ($row['od_id']) {
$uid = md5($row['od_id'].$row['od_time'].$row['od_ip']);

View File

@ -23,7 +23,7 @@ if (!defined("_ORDERINQUIRY_")) exit; // 개별 페이지 접근 불가
<?php
$sql = " select *,
(od_cart_coupon + od_coupon + od_send_coupon) as couponprice
from {$g5['shop_order_table']}
from {$g5['g5_shop_order_table']}
where mb_id = '{$member['mb_id']}'
group by od_id
order by od_id desc

View File

@ -9,7 +9,7 @@ if ($token && get_session("ss_token") == $token) {
alert_close("토큰 에러");
}
$od = sql_fetch(" select * from {$g5['shop_order_table']} where od_id = '$od_id' and mb_id = '{$member['mb_id']}' ");
$od = sql_fetch(" select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' and mb_id = '{$member['mb_id']}' ");
if (!$od['od_id']) {
alert("존재하는 주문이 아닙니다.");
@ -18,7 +18,7 @@ if (!$od['od_id']) {
// 주문상품의 상태가 주문인지 체크
$sql = " select SUM(IF(ct_status = '주문', 1, 0)) as od_count2,
COUNT(*) as od_count1
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where od_id = '$od_id' ";
$ct = sql_fetch($sql);
@ -60,13 +60,13 @@ if($od['od_tno']) {
}
// 장바구니 자료 취소
sql_query(" update {$g5['shop_cart_table']} set ct_status = '취소' where od_id = '$od_id' ");
sql_query(" update {$g5['g5_shop_cart_table']} set ct_status = '취소' where od_id = '$od_id' ");
// 주문 취소
$cancel_memo = addslashes($cancel_memo);
$cancel_price = $od['od_misu'];
$sql = " update {$g5['shop_order_table']}
$sql = " update {$g5['g5_shop_order_table']}
set od_send_cost = '0',
od_send_cost2 = '0',
od_receipt_price = '0',

View File

@ -15,7 +15,7 @@ if (!$is_member) {
alert("직접 링크로는 주문서 조회가 불가합니다.\\n\\n주문조회 화면을 통하여 조회하시기 바랍니다.", G5_SHOP_URL);
}
$sql = "select * from {$g5['shop_order_table']} where od_id = '$od_id' ";
$sql = "select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' ";
$od = sql_fetch($sql);
if (!$od['od_id'] || (!$is_member && md5($od['od_id'].$od['od_time'].$od['od_ip']) != get_session('ss_orderview_uid'))) {
alert("조회하실 주문서가 없습니다.", G5_SHOP_URL);
@ -55,7 +55,7 @@ if(openwin != null) {
</dl>
<?php
$sql = " select it_id, it_name
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where od_id = '$od_id'
group by it_id
order by ct_id ";
@ -85,7 +85,7 @@ if(openwin != null) {
<tbody>
<?php
$sql = " select ct_id, it_name, ct_option, ct_qty, ct_price, ct_point, ct_status, io_type, io_price
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where od_id = '$od_id'
and it_id = '{$row['it_id']}'
order by io_type asc, ct_id asc ";
@ -438,7 +438,7 @@ if(openwin != null) {
<tbody>
<?php
// 배송회사 정보
$dl = sql_fetch(" select * from {$g5['shop_delivery_table']} where dl_id = '{$od['dl_id']}' ");
$dl = sql_fetch(" select * from {$g5['g5_shop_delivery_table']} where dl_id = '{$od['dl_id']}' ");
if ($od['od_invoice'] || !$od['misu'])
{

View File

@ -7,7 +7,7 @@ if($is_guest)
// 상품정보
$it_id = $_POST['it_id'];
$sw_direct = $_POST['sw_direct'];
$sql = " select it_id, ca_id, ca_id2, ca_id3 from {$g5['shop_item_table']} where it_id = '$it_id' ";
$sql = " select it_id, ca_id, ca_id2, ca_id3 from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$it = sql_fetch($sql);
// 상품 총 금액
@ -17,7 +17,7 @@ else
$cart_id = get_session('ss_cart_id');
$sql = " select SUM( IF(io_type = '1', io_price * ct_qty, (ct_price + io_price) * ct_qty)) as sum_price
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where od_id = '$cart_id'
and it_id = '$it_id' ";
$ct = sql_fetch($sql);
@ -25,7 +25,7 @@ $item_price = $ct['sum_price'];
// 쿠폰정보
$sql = " select *
from {$g5['shop_coupon_table']}
from {$g5['g5_shop_coupon_table']}
where mb_id IN ( '{$member['mb_id']}', '전체회원' )
and cp_start <= '".G5_TIME_YMD."'
and cp_end >= '".G5_TIME_YMD."'

View File

@ -17,7 +17,7 @@ $sql = " select a.it_id,
a.ct_point,
b.it_sell_email,
b.it_origin
from {$g5['shop_cart_table']} a left join {$g5['shop_item_table']} b on ( a.it_id = b.it_id )
from {$g5['g5_shop_cart_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id )
where a.od_id = '$od_id'
and a.ct_select = '1'
group by a.it_id
@ -29,7 +29,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,
SUM(ct_point * ct_qty) as point,
SUM(ct_qty) as qty
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where it_id = '{$row['it_id']}'
and od_id = '$od_id'
and ct_select = '1' ";
@ -37,7 +37,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
// 옵션정보
$sql2 = " select ct_option, ct_qty
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where it_id = '{$row['it_id']}' and od_id = '$od_id' and ct_select = '1'
order by io_type asc, ct_id asc ";
$result2 = sql_query($sql2);

View File

@ -38,7 +38,7 @@ unset($list);
$sql = " select b.it_sell_email,
a.it_id,
a.it_name
from {$g5['shop_cart_table']} a left join {$g5['shop_item_table']} b on ( a.it_id = b.it_id )
from {$g5['g5_shop_cart_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id )
where a.od_id = '$od_id'
and a.ct_select = '1'
and b.it_sell_email <> ''
@ -50,7 +50,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,
SUM(ct_point * ct_qty) as point,
SUM(ct_qty) as qty
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where it_id = '{$row['it_id']}'
and od_id = '$od_id'
and ct_select = '1' ";
@ -58,7 +58,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
// 옵션정보
$sql2 = " select ct_option, ct_qty
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where it_id = '{$row['it_id']}' and od_id = '$od_id' and ct_select = '1'
order by io_type asc, ct_id asc ";
$result2 = sql_query($sql2);

View File

@ -7,7 +7,7 @@ if(!$code)
die('0');
$sql = " select sc_id, sc_price
from {$g5['shop_sendcost_table']}
from {$g5['g5_shop_sendcost_table']}
where sc_zip1 <= $code
and sc_zip2 >= $code ";
$row = sql_fetch($sql);

View File

@ -9,7 +9,7 @@ $send_cost = $_POST['send_cost'];
// 쿠폰정보
$sql = " select *
from {$g5['shop_coupon_table']}
from {$g5['g5_shop_coupon_table']}
where mb_id IN ( '{$member['mb_id']}', '전체회원' )
and cp_method = '3'
and cp_start <= '".G5_TIME_YMD."'

View File

@ -23,7 +23,7 @@ include_once('./_head.php');
$img_width = 230;
$img_height = 230;
$sql_common = " from {$g5['shop_personalpay_table']}
$sql_common = " from {$g5['g5_shop_personalpay_table']}
where pp_use = '1'
and pp_tno = '' ";

View File

@ -6,7 +6,7 @@ if (G5_IS_MOBILE) {
return;
}
$sql = " select * from {$g5['shop_personalpay_table']} where pp_id = '$pp_id' and pp_use = '1' and pp_price > 0 ";
$sql = " select * from {$g5['g5_shop_personalpay_table']} where pp_id = '$pp_id' and pp_use = '1' and pp_price > 0 ";
$pp = sql_fetch($sql);
if(!$pp['pp_id'])

View File

@ -11,7 +11,7 @@ $_POST = array_add_callback("mysql_real_escape_string", $_POST);
// 개인결제 정보
$pp_check = false;
$sql = " select * from {$g5['shop_personalpay_table']} where pp_id = '{$_POST['pp_id']}' and pp_use = '1' ";
$sql = " select * from {$g5['g5_shop_personalpay_table']} where pp_id = '{$_POST['pp_id']}' and pp_use = '1' ";
$pp = sql_fetch($sql);
if(!$pp['pp_id'])
alert('개인결제 정보가 존재하지 않습니다.');
@ -83,7 +83,7 @@ if((int)$pp['pp_price'] !== (int)$pg_price) {
}
// 결제정보 입력
$sql = " update {$g5['shop_personalpay_table']}
$sql = " update {$g5['g5_shop_personalpay_table']}
set pp_tno = '$pp_tno',
pp_app_no = '$app_no',
pp_receipt_price = '$pp_receipt_price',
@ -111,7 +111,7 @@ if($pp_receipt_price > 0 && $pp['pp_id'] && $pp['od_id']) {
if($escw_yn == 'Y')
$od_escrow = 1;
$sql = " update {$g5['shop_order_table']}
$sql = " update {$g5['g5_shop_order_table']}
set od_receipt_price = od_receipt_price + '$pp_receipt_price',
od_receipt_time = '$pp_receipt_time',
od_tno = '$pp_tno',

View File

@ -6,7 +6,7 @@ if (G5_IS_MOBILE) {
return;
}
$sql = "select * from {$g5['shop_personalpay_table']} where pp_id = '$pp_id' ";
$sql = "select * from {$g5['g5_shop_personalpay_table']} where pp_id = '$pp_id' ";
$pp = sql_fetch($sql);
if (!$pp['pp_id'] || (md5($pp['pp_id'].$pp['pp_time'].$_SERVER['REMOTE_ADDR']) != get_session('ss_personalpay_uid'))) {
alert("조회하실 개인결제 내역이 없습니다.", G5_SHOP_URL);

View File

@ -20,7 +20,7 @@ else if($default['de_send_cost_case'] == '상한')
$delivery = (int)$tmp[0];
}
$sql =" select * from {$g5['shop_item_table']} where it_use = '1' order by ca_id";
$sql =" select * from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$ca_id1' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$ca_id2' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$ca_id3' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$ca_id4' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$ca_id4' ");
$ca_name4 = $row2['ca_name'];
}

View File

@ -21,7 +21,7 @@ else if($default['de_send_cost_case'] == '상한')
}
$time = date("Y-m-d 00:00:00", G5_SERVER_TIME - 86400);
$sql =" select * from {$g5['shop_item_table']} where it_use = '1' and it_time >= '$time' order by ca_id";
$sql =" select * from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$ca_id1' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$ca_id2' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$ca_id3' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$ca_id4' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$ca_id4' ");
$ca_name4 = $row2['ca_name'];
}

View File

@ -62,26 +62,26 @@ else if($default['de_send_cost_case'] == '상한')
$delivery = (int)$tmp[0];
}
$sql =" select * from {$g5['shop_item_table']} where it_use = '1' order by ca_id";
$sql =" select * from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,6)."' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,8)."' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,8)."' ");
$ca_name4 = $row2['ca_name'];
}

View File

@ -65,26 +65,26 @@ else if($default['de_send_cost_case'] == '상한')
}
$time = date("Y-m-d 00:00:00", G5_SERVER_TIME - 86400);
$sql =" select * from {$g5['shop_item_table']} where it_use = '1' and it_time >= '$time' order by ca_id";
$sql =" select * from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,6)."' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,8)."' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,8)."' ");
$ca_name4 = $row2['ca_name'];
}

View File

@ -20,7 +20,7 @@ ob_start();
$lt = "[[";
$gt = "]]";
$sql =" select * from {$g5['shop_item_table']} where it_use = '1' order by ca_id";
$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' order by ca_id";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)

View File

@ -28,7 +28,7 @@ include_once('./_common.php');
<?php
// <p>상품번호^대분류^중분류^소분류^제조사^모델명^상품Url^이미지Url^가격
$str = "";
$sql = " select * from {$g5['shop_item_table']}
$sql = " select * from {$g5['g5_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 = get_it_imageurl($row['it_id']);
$row2 = sql_fetch(" select ca_name from {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
$row3 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,6)."' ");
$row4 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,6)."' ");
// 재고검사해서 없으면 상품가격을 0 으로 설정
$stock = get_it_stock_qty($row['it_id']);

View File

@ -19,16 +19,16 @@ else if($default['de_send_cost_case'] == '상한')
<?php
// 상품ID^카테고리^상품명^제조사^이미지URL^상품URL^가격^적립금^할인쿠폰^무이자할부^사은품^모델명^추가정보^출시일^배송료
$str = "";
$sql = " select * from {$g5['shop_item_table']}
$sql = " select * from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
$row3 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
$ca_name .= "|" . $row3['ca_name'];
}

View File

@ -81,14 +81,14 @@ else if($default['de_send_cost_case'] == '상한') {
$deliv2 = (int)$send_cost_list[0]."";
}
$sql =" select * from {$g5['shop_item_table']} where it_use = '1' order by ca_id";
$sql =" select * from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' ");
$row2 = sql_fetch(" select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' ");
$cate1 = $row2['ca_id'];
$catename1 = $row2['ca_name'];
@ -96,19 +96,19 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$catename2 = $catename3 = $catename4 = "";
if (strlen($row['ca_id']) >= 8) {
$row2 = sql_fetch(" select ca_id, ca_name from {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,8)."' ");
$row2 = sql_fetch(" select ca_id, ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,6)."' ");
$row2 = sql_fetch(" select ca_id, ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
$row2 = sql_fetch(" select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
$cate2 = $row2['ca_id'];
$catename2 = $row2['ca_name'];
}

View File

@ -48,7 +48,7 @@ include_once('./_common.php');
// 페이지당 행수
$page_rows = 1000;
$sql = " select count(*) as cnt from {$g5['shop_item_table']} where it_use = '1' and ca_id LIKE '$ca_id%'";
$sql = " select count(*) as cnt from {$g5['g5_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 {$g5['shop_item_table']}
$sql = " select * from {$g5['g5_shop_item_table']}
where it_use = '1'
and ca_id LIKE '$caid%'
order by ca_id

View File

@ -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 {$g5['shop_category_table']}
FROM {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".$row['ca_id']."'");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_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 {$g5['g5_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 = "";

View File

@ -49,7 +49,7 @@ include_once('./_common.php');
// 페이지당 행수
$page_rows = 100;
$sql = " select count(*) as cnt from {$g5['shop_item_table']} where it_use = '1' ";
$sql = " select count(*) as cnt from {$g5['g5_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 {$g5['shop_item_table']}
$sql = " select * from {$g5['g5_shop_item_table']}
where it_use = '1'
order by ca_id
limit $from_record, $page_rows ";
@ -101,7 +101,7 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
{
$code = substr($row['ca_id'],0,$k*2);
$sql3 = " select ca_name from {$g5['shop_category_table']} where ca_id = '$code' ";
$sql3 = " select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$code' ";
$row3 = sql_fetch($sql3);
$category .= $bar . $row3['ca_name'];

View File

@ -54,7 +54,7 @@ else if($default['de_send_cost_case'] == '상한') {
$send_cost = (int)$send_cost_list[0];
}
$sql =" select * from {$g5['shop_item_table']} where it_use = '1' order by ca_id";
$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' order by ca_id";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
@ -63,7 +63,7 @@ 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 {$g5['shop_category_table']} where ca_id = '$caid1' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$caid1' ");
$cate1 = $row2['ca_name'];
$caid2 = $caid3 = $caid4 = "";
@ -71,19 +71,19 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
if (strlen($row['ca_id']) >= 8) {
$caid4 = substr($row['ca_id'],0,8);
$row2 = sql_fetch(" select ca_name from {$g5['shop_category_table']} where ca_id = '$caid4' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$caid3' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$caid2' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$caid2' ");
$cate2 = $row2['ca_name'];
}

View File

@ -58,7 +58,7 @@ else if($default['de_send_cost_case'] == '상한') {
// 하루전의 상품
$time = date("Y-m-d 00:00:00", G5_SERVER_TIME - 86400);
$sql =" select * from {$g5['shop_item_table']} where it_use = '1' and it_time >= '$time' order by ca_id";
$sql =" select * from {$g5['g5_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++)
@ -67,24 +67,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 {$g5['shop_category_table']} where ca_id = '$caid1' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$caid4' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$caid3' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$caid2' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$caid2' ");
$cate2 = $row2['ca_name'];
}

View File

@ -22,7 +22,7 @@ $lt = "<<<";
$gt = ">>>";
$time = date("Y-m-d 00:00:00", G5_SERVER_TIME - 86400);
$sql =" select * from {$g5['shop_item_table']} where it_use = '1' and it_time >= '$time' order by ca_id";
$sql =" select * from {$g5['g5_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++)

View File

@ -19,7 +19,7 @@ Field Status Notes
$lt = "<<<";
$gt = ">>>";
$sql =" select it_id, it_name, it_price, it_time from {$g5['shop_item_table']} where it_use = '1' order by ca_id";
$sql =" select it_id, it_name, it_price, it_time from {$g5['g5_shop_item_table']} where it_use = '1' order by ca_id";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)

View File

@ -20,7 +20,7 @@ else if($default['de_send_cost_case'] == '상한')
$delivery = (int)$tmp[0];
}
$sql =" select * from {$g5['shop_item_table']} where it_use = '1' order by ca_id";
$sql =" select * from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$ca_id1' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$ca_id2' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$ca_id3' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$ca_id4' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$ca_id4' ");
$ca_name4 = $row2['ca_name'];
}
@ -62,7 +62,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$img_url = get_it_imageurl($row['it_id']);
// 상품별옵션
$sql = " select * from {$g5['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$result2 = sql_query($sql);
$opt_count = @mysql_num_rows($result2);

View File

@ -21,7 +21,7 @@ else if($default['de_send_cost_case'] == '상한')
}
$time = date("Y-m-d 00:00:00", G5_SERVER_TIME - 86400);
$sql =" select * from {$g5['shop_item_table']} where it_use = '1' and it_time >= '$time' order by ca_id";
$sql =" select * from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$ca_id1' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$ca_id2' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$ca_id3' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$ca_id4' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$ca_id4' ");
$ca_name4 = $row2['ca_name'];
}
@ -63,7 +63,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$img_url = get_it_imageurl($row['it_id']);
// 상품별옵션
$sql = " select * from {$g5['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$result2 = sql_query($sql);
$opt_count = @mysql_num_rows($result2);

View File

@ -60,26 +60,26 @@ else if($default['de_send_cost_case'] == '상한')
$delivery = (int)$tmp[0];
}
$sql =" select * from {$g5['shop_item_table']} where it_use = '1' order by ca_id";
$sql =" select * from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,6)."' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,8)."' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,8)."' ");
$ca_name4 = $row2['ca_name'];
}
@ -89,7 +89,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$img_url = get_it_imageurl($row['it_id']);
// 상품별옵션
$sql = " select * from {$g5['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$result2 = sql_query($sql);
$opt_count = @mysql_num_rows($result2);

View File

@ -63,26 +63,26 @@ else if($default['de_send_cost_case'] == '상한')
}
$time = date("Y-m-d 00:00:00", G5_SERVER_TIME - 86400);
$sql =" select * from {$g5['shop_item_table']} where it_use = '1' and it_time >= '$time' order by ca_id";
$sql =" select * from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,6)."' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,8)."' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,8)."' ");
$ca_name4 = $row2['ca_name'];
}
@ -92,7 +92,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$img_url = get_it_imageurl($row['it_id']);
// 상품별옵션
$sql = " select * from {$g5['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$result2 = sql_query($sql);
$opt_count = @mysql_num_rows($result2);

View File

@ -20,7 +20,7 @@ ob_start();
$lt = "[[";
$gt = "]]";
$sql =" select * from {$g5['shop_item_table']} where it_use = '1' order by ca_id";
$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' order by ca_id";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)

View File

@ -29,7 +29,7 @@ include_once('./_common.php');
// <p>상품번호^대분류^중분류^소분류^제조사^모델명^상품Url^이미지Url^가격
$str = "";
$cnt = 0;
$sql = " select * from {$g5['shop_item_table']}
$sql = " select * from {$g5['g5_shop_item_table']}
where it_use = '1'
order by ca_id ";
$result = sql_query($sql);
@ -37,16 +37,16 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
{
$image = get_it_imageurl($row['it_id']);
$row2 = sql_fetch(" select ca_name from {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
$row3 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,6)."' ");
$row4 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,6)."' ");
// 상품별옵션
$sql = " select * from {$g5['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$result2 = sql_query($sql);
$opt_count = @mysql_num_rows($result2);

View File

@ -19,16 +19,16 @@ else if($default['de_send_cost_case'] == '상한')
<?php
// 상품ID^카테고리^상품명^제조사^이미지URL^상품URL^가격^적립금^할인쿠폰^무이자할부^사은품^모델명^추가정보^출시일^배송료
$str = "";
$sql = " select * from {$g5['shop_item_table']}
$sql = " select * from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
$row3 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
$ca_name .= "|" . $row3['ca_name'];
}
@ -36,7 +36,7 @@ for ($i=0; $row=mysql_fetch_array($result); $i++) {
$img_url = get_it_imageurl($row['it_id']);
// 상품별옵션
$sql = " select * from {$g5['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$result2 = sql_query($sql);
$opt_count = @mysql_num_rows($result2);

View File

@ -79,14 +79,14 @@ else if($default['de_send_cost_case'] == '상한') {
$deliv2 = (int)$send_cost_list[0]."";
}
$sql =" select * from {$g5['shop_item_table']} where it_use = '1' order by ca_id";
$sql =" select * from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' ");
$row2 = sql_fetch(" select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' ");
$cate1 = $row2['ca_id'];
$catename1 = $row2['ca_name'];
@ -94,19 +94,19 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$catename2 = $catename3 = $catename4 = "";
if (strlen($row['ca_id']) >= 8) {
$row2 = sql_fetch(" select ca_id, ca_name from {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,8)."' ");
$row2 = sql_fetch(" select ca_id, ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,6)."' ");
$row2 = sql_fetch(" select ca_id, ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
$row2 = sql_fetch(" select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
$cate2 = $row2['ca_id'];
$catename2 = $row2['ca_name'];
}
@ -136,7 +136,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$img_url = get_it_imageurl($row['it_id']);
// 상품별옵션
$sql = " select * from {$g5['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$result2 = sql_query($sql);
$opt_count = @mysql_num_rows($result2);

View File

@ -48,7 +48,7 @@ include_once('./_common.php');
// 페이지당 행수
$page_rows = 1000;
$sql = " select count(*) as cnt from {$g5['shop_item_table']} where it_use = '1' and ca_id LIKE '$ca_id%'";
$sql = " select count(*) as cnt from {$g5['g5_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 {$g5['shop_item_table']}
$sql = " select * from {$g5['g5_shop_item_table']}
where it_use = '1'
and ca_id LIKE '$caid%'
order by ca_id
@ -116,7 +116,7 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
$img_url = get_it_imageurl($row['it_id']);
// 상품별옵션
$sql = " select * from {$g5['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$result2 = sql_query($sql);
$opt_count = @mysql_num_rows($result2);

View File

@ -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 {$g5['shop_category_table']}
FROM {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '".$row['ca_id']."'");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_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 {$g5['g5_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 = "";

View File

@ -49,7 +49,7 @@ include_once('./_common.php');
// 페이지당 행수
$page_rows = 100;
$sql = " select count(*) as cnt from {$g5['shop_item_table']} where it_use = '1' ";
$sql = " select count(*) as cnt from {$g5['g5_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 {$g5['shop_item_table']}
$sql = " select * from {$g5['g5_shop_item_table']}
where it_use = '1'
order by ca_id
limit $from_record, $page_rows ";
@ -101,7 +101,7 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
{
$code = substr($row['ca_id'],0,$k*2);
$sql3 = " select ca_name from {$g5['shop_category_table']} where ca_id = '$code' ";
$sql3 = " select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$code' ";
$row3 = sql_fetch($sql3);
$category .= $bar . $row3['ca_name'];
@ -112,7 +112,7 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
$image = get_it_imageurl($row['it_id']);
// 상품별옵션
$sql = " select * from {$g5['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$result2 = sql_query($sql);
$opt_count = @mysql_num_rows($result2);

View File

@ -52,7 +52,7 @@ else if($default['de_send_cost_case'] == '상한') {
$send_cost = (int)$send_cost_list[0];
}
$sql =" select * from {$g5['shop_item_table']} where it_use = '1' order by ca_id";
$sql =" select * from {$g5['g5_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,7 +61,7 @@ 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 {$g5['shop_category_table']} where ca_id = '$caid1' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$caid1' ");
$cate1 = $row2['ca_name'];
$caid2 = $caid3 = $caid4 = "";
@ -69,19 +69,19 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
if (strlen($row['ca_id']) >= 8) {
$caid4 = substr($row['ca_id'],0,8);
$row2 = sql_fetch(" select ca_name from {$g5['shop_category_table']} where ca_id = '$caid4' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$caid3' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$caid2' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$caid2' ");
$cate2 = $row2['ca_name'];
}
@ -95,7 +95,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
}
// 상품별옵션
$sql = " select * from {$g5['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$result2 = sql_query($sql);
$opt_count = @mysql_num_rows($result2);

View File

@ -56,7 +56,7 @@ else if($default['de_send_cost_case'] == '상한') {
// 하루전의 상품
$time = date("Y-m-d 00:00:00", G5_SERVER_TIME - 86400);
$sql =" select * from {$g5['shop_item_table']} where it_use = '1' and it_time >= '$time' order by ca_id";
$sql =" select * from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$caid1' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$caid4' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$caid3' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$caid2' ");
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$caid2' ");
$cate2 = $row2['ca_name'];
}
@ -96,7 +96,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$img_url = get_it_imageurl($row['it_id']);
// 상품별옵션
$sql = " select * from {$g5['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$result2 = sql_query($sql);
$opt_count = @mysql_num_rows($result2);

View File

@ -22,13 +22,13 @@ $lt = "<<<";
$gt = ">>>";
$time = date("Y-m-d 00:00:00", G5_SERVER_TIME - 86400);
$sql =" select * from {$g5['shop_item_table']} where it_use = '1' and it_time >= '$time' order by ca_id";
$sql =" select * from {$g5['g5_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++)
{
// 상품별옵션
$sql = " select * from {$g5['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$result2 = sql_query($sql);
$opt_count = @mysql_num_rows($result2);

View File

@ -19,13 +19,13 @@ Field Status Notes
$lt = "<<<";
$gt = ">>>";
$sql =" select it_id, it_name, it_price, it_time from {$g5['shop_item_table']} where it_use = '1' order by ca_id";
$sql =" select it_id, it_name, it_price, it_time from {$g5['g5_shop_item_table']} where it_use = '1' order by ca_id";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
// 상품별옵션
$sql = " select * from {$g5['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
$result2 = sql_query($sql);
$opt_count = @mysql_num_rows($result2);

View File

@ -11,8 +11,8 @@ include_once('./_head.php');
// QUERY 문에 공통적으로 들어가는 내용
// 상품명에 검색어가 포한된것과 상품판매가능인것만
$sql_common = " from {$g5['shop_item_table']} a,
{$g5['shop_category_table']} b
$sql_common = " from {$g5['g5_shop_item_table']} a,
{$g5['g5_shop_category_table']} b
where a.ca_id=b.ca_id
and a.it_use = 1
and b.ca_use = 1
@ -92,7 +92,7 @@ $total_count = $row['cnt'];
{
global $g5, $search_str , $default , $image_rate , $cart_dir;
$sql = " select ca_name from {$g5['shop_category_table']} where ca_id = '{$save['ca_id']}' ";
$sql = " select ca_name from {$g5['g5_shop_category_table']} where ca_id = '{$save['ca_id']}' ";
$row = sql_fetch($sql);
// 김선용 2006.12 : 중복 하위분류명이 많으므로 대분류 포함하여 출력
@ -128,7 +128,7 @@ $total_count = $row['cnt'];
it_type3,
it_type4,
it_type5
from {$g5['shop_item_table']} where it_id = '{$save['it_id'][$i]}' ";
from {$g5['g5_shop_item_table']} where it_id = '{$save['it_id'][$i]}' ";
$row = sql_fetch($sql);
$image = get_it_image($row['it_id'], (int)($default['de_simg_width']), (int)($default['de_simg_height']), true);

View File

@ -141,12 +141,12 @@ if(!$default['de_card_test']) {
/* = -------------------------------------------------------------------------- = */
if ( $tx_cd == "TX00" )
{
$sql = " select pp_id, od_id from {$g5['shop_personalpay_table']} where pp_id = '$order_no' and pp_tno = '$tno' ";
$sql = " select pp_id, od_id from {$g5['g5_shop_personalpay_table']} where pp_id = '$order_no' and pp_tno = '$tno' ";
$row = sql_fetch($sql);
if($row['pp_id']) {
// 개인결제 UPDATE
$sql = " update {$g5['shop_personalpay_table']}
$sql = " update {$g5['g5_shop_personalpay_table']}
set pp_receipt_price = '$ipgm_mnyx',
pp_receipt_time = '$tx_tm'
where pp_id = '$order_no'
@ -156,7 +156,7 @@ if(!$default['de_card_test']) {
if($row['od_id']) {
// 주문서 UPDATE
$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 {$g5['shop_order_table']}
$sql = " update {$g5['g5_shop_order_table']}
set od_receipt_price = od_receipt_price + '$ipgm_mnyx',
od_receipt_time = '$tx_tm',
od_status = '".G5_OD_STATUS_SETTLE."',
@ -166,7 +166,7 @@ if(!$default['de_card_test']) {
}
} else {
// 주문서 UPDATE
$sql = " update {$g5['shop_order_table']}
$sql = " update {$g5['g5_shop_order_table']}
set od_receipt_price = '$ipgm_mnyx',
od_receipt_time = '$tx_tm',
od_status = '".G5_OD_STATUS_SETTLE."'

View File

@ -4,7 +4,7 @@ include_once('./_common.php');
$g5['title'] = '주문번호 '.$od_id.' 현금영수증 발행';
include_once(G5_PATH.'/head.sub.php');
$od = sql_fetch(" select * from {$g5['shop_order_table']} where od_id = '$od_id' ");
$od = sql_fetch(" select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' ");
if (!$od)
die('<p id="scash_empty">주문서가 존재하지 않습니다.</p>');

View File

@ -33,13 +33,13 @@ include_once('./_head.php');
</thead>
<tbody>
<?php
$sql = " select a.wi_id, a.wi_time, b.* from {$g5['shop_wish_table']} a left join {$g5['shop_item_table']} b on ( a.it_id = b.it_id ) ";
$sql = " select a.wi_id, a.wi_time, b.* from {$g5['g5_shop_wish_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id ) ";
$sql .= " where a.mb_id = '{$member['mb_id']}' order by a.wi_id desc ";
$result = sql_query($sql);
for ($i=0; $row = mysql_fetch_array($result); $i++) {
$out_cd = '';
$sql = " select count(*) as cnt from {$g5['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' ";
$sql = " select count(*) as cnt from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' ";
$tmp = sql_fetch($sql);
if($tmp['cnt'])
$out_cd = 'no';

View File

@ -7,7 +7,7 @@ if (!$is_member)
if ($w == "d")
{
$wi_id = trim($_GET['wi_id']);
$sql = " delete from {$g5['shop_wish_table']}
$sql = " delete from {$g5['g5_shop_wish_table']}
where wi_id = '$wi_id'
and mb_id = '{$member['mb_id']}' ";
sql_query($sql);
@ -22,15 +22,15 @@ else
wi_time = '".G5_TIME_YMDHIS."',
wi_ip = '$REMOTE_ADDR' ";
$sql = " select wi_id from {$g5['shop_wish_table']}
$sql = " select wi_id from {$g5['g5_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 {$g5['shop_wish_table']} where wi_id = '{$row['wi_id']}' ";
$sql = " delete from {$g5['g5_shop_wish_table']} where wi_id = '{$row['wi_id']}' ";
sql_query($sql);
}
$sql = " insert {$g5['shop_wish_table']}
$sql = " insert {$g5['g5_shop_wish_table']}
set mb_id = '{$member['mb_id']}',
it_id = '$it_id',
wi_time = '".G5_TIME_YMDHIS."',