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

@ -37,7 +37,7 @@ include_once(G5_MSHOP_PATH.'/_head.php');
a.ct_status,
a.ct_send_cost,
b.ca_id
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));
@ -55,7 +55,7 @@ include_once(G5_MSHOP_PATH.'/_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

@ -13,7 +13,7 @@ if($ca) {
$sql_where = " where length(ca_id) = '2' ";
}
$sql = " select ca_id, ca_name from {$g5['shop_category_table']}
$sql = " select ca_id, ca_name from {$g5['g5_shop_category_table']}
$sql_where
and ca_use = '1'
order by ca_id ";

View File

@ -17,8 +17,8 @@ set_session('ss_norobot_key', $norobot_key);
$sql = " select a.*,
b.ca_name,
b.ca_use
from {$g5['shop_item_table']} a,
{$g5['shop_category_table']} b
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);
@ -31,7 +31,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']}
from {$g5['g5_shop_category_table']}
where ca_id = '{$it['ca_id']}' ";
$ca = sql_fetch($sql);
@ -75,7 +75,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_mobile_head_html']).'</div>';
// 이전 상품보기
$sql = " select it_id, it_name from {$g5['shop_item_table']}
$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'
@ -113,7 +113,7 @@ if ($row['it_id']) {
}
// 다음 상품보기
$sql = " select it_id, it_name from {$g5['shop_item_table']}
$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'
@ -131,19 +131,19 @@ 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')
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'];
@ -600,7 +600,7 @@ else
<div class="sct_wrap">
<?php
$sql = " select b.* from {$g5['shop_item_relation_table']} a left join {$g5['shop_item_table']} b on (a.it_id2=b.it_id) where a.it_id = '{$it['it_id']}' and b.it_use='1' ";
$sql = " select b.* from {$g5['g5_shop_item_relation_table']} a left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id) where a.it_id = '{$it['it_id']}' and b.it_use='1' ";
$list = new item_list("list.10.skin.php", $default['de_rel_list_mod'], 1, $default['de_rel_img_width'], $default['de_rel_img_height']);
$list->set_mobile(true);

View File

@ -16,7 +16,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

@ -15,7 +15,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

@ -8,7 +8,7 @@ $stx = escape_trim($_REQUEST['stx']);
$g5['title'] = '상품문의';
include_once(G5_MSHOP_PATH.'/_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

@ -22,7 +22,7 @@ $itemuse_formupdate = "./itemuseformupdate.php?it_id=".$it_id;
wr_4 : 관리자확인
*/
//$sql_common = " from `{$g5['write_prefix']}itemuse` where wr_is_comment = 0 and wr_1 = '{$it['it_id']}' and wr_4 = '1' ";
$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

@ -16,7 +16,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

@ -8,7 +8,7 @@ $stx = escape_trim($_REQUEST['stx']);
$g5['title'] = '사용후기';
include_once(G5_MSHOP_PATH.'/_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)
@ -90,7 +90,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

@ -5,7 +5,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

@ -2,7 +2,7 @@
include_once('./_common.php');
$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,7 +6,7 @@ $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']}
$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'
@ -15,7 +15,7 @@ $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,14 +16,14 @@ if (!$exists) {
$len4 = $tmp_ca_id_len + 4;
// 차차기 분류의 건수를 얻음
$sql = " select count(*) as cnt from {$g5['shop_category_table']}
$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']}
$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 ";
@ -36,7 +36,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']}
$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 ";

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']}
$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'

View File

@ -10,7 +10,7 @@ include_once(G5_MSHOP_PATH.'/_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."' ";
@ -70,8 +70,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

@ -70,7 +70,7 @@ ob_start();
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']) {
@ -95,7 +95,7 @@ ob_start();
$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);
@ -148,7 +148,7 @@ ob_start();
$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."'
@ -428,7 +428,7 @@ ob_end_clean();
$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);
@ -440,7 +440,7 @@ ob_end_clean();
// 최근배송지
$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 ";
@ -525,7 +525,7 @@ ob_end_clean();
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."'
@ -542,7 +542,7 @@ ob_end_clean();
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

@ -32,7 +32,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);
@ -68,7 +68,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'];
@ -84,7 +84,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."'
@ -101,7 +101,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);
@ -117,7 +117,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' ";
@ -149,7 +149,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."'
@ -194,7 +194,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."'
@ -230,7 +230,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;
@ -373,7 +373,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',
@ -443,7 +443,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
@ -463,7 +463,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를 이용한 전자결제(신용카드, 계좌이체, 가상계좌 등)은 자동 취소되었습니다.');
}
@ -483,7 +483,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',
@ -494,7 +494,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'
@ -505,7 +505,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',
@ -515,7 +515,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',
@ -588,7 +588,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'
@ -597,14 +597,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',
@ -619,7 +619,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

@ -8,11 +8,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 // 그렇지 않다면 로그인으로 가기
{
@ -43,7 +43,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

@ -20,7 +20,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 a.mb_id = '{$member['mb_id']}'
group by a.od_id
order by a.od_id desc

View File

@ -10,7 +10,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);
@ -42,7 +42,7 @@ include_once(G5_MSHOP_PATH.'/_head.php');
</dl>
<?php
$sql = " select it_id, it_name, cp_price
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where od_id = '$od_id'
group by it_id
order by ct_id ";
@ -72,7 +72,7 @@ include_once(G5_MSHOP_PATH.'/_head.php');
<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 ";
@ -427,7 +427,7 @@ include_once(G5_MSHOP_PATH.'/_head.php');
<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

@ -17,7 +17,7 @@ include_once(G5_MSHOP_PATH.'/_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

@ -1,7 +1,7 @@
<?php
include_once('./_common.php');
$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

@ -15,7 +15,7 @@ if($_POST['tran_cd'] == '' || $_POST['enc_info'] == '' || $_POST['enc_data'] ==
// 개인결제 정보
$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('개인결제 정보가 존재하지 않습니다.');
@ -91,7 +91,7 @@ else
$od_pwd = sql_password($_POST['od_pwd']);
// 결제정보 입력
$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',
@ -119,7 +119,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

@ -1,7 +1,7 @@
<?php
include_once('./_common.php');
$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

@ -6,8 +6,8 @@ include_once(G5_MSHOP_PATH.'/_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
@ -86,7 +86,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);
$ca_name = $row['ca_name'];
@ -113,7 +113,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

@ -27,14 +27,14 @@ include_once(G5_MSHOP_PATH.'/_head.php');
<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 )
from {$g5['g5_shop_wish_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id )
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';