경로 및 전체테이블명 변경

This commit is contained in:
gnuboard
2013-02-07 16:56:29 +09:00
parent d7b9aab47a
commit f7855b165c
184 changed files with 711 additions and 708 deletions

View File

@ -19,8 +19,8 @@ function itemdelete($it_id)
/*
$str = $comma = $od_id = "";
$sql = " select b.od_id
from $g4[yc4_cart_table] a,
$g4[yc4_order_table] b
from $g4[shop_cart_table] a,
$g4[shop_order_table] b
where a.uq_id = b.uq_id
and a.it_id = '$it_id'
and a.ct_status != '쇼핑' ";
@ -51,42 +51,42 @@ function itemdelete($it_id)
@rmdir(G4_DATA_PATH.'/item/'.$it_id);
// 장바구니 삭제
$sql = " delete from `{$g4['yc4_cart_table']}` where it_id = '$it_id' ";
$sql = " delete from `{$g4['shop_cart_table']}` where it_id = '$it_id' ";
sql_query($sql);
// 이벤트삭제
$sql = " delete from `{$g4['yc4_event_item_table']}` where it_id = '$it_id' ";
$sql = " delete from `{$g4['shop_event_item_table']}` where it_id = '$it_id' ";
sql_query($sql);
// 사용후기삭제
$sql = " delete from `{$g4['yc4_item_ps_table']}` where it_id = '$it_id' ";
$sql = " delete from `{$g4['shop_item_ps_table']}` where it_id = '$it_id' ";
sql_query($sql);
// 상품문의삭제
$sql = " delete from `{$g4['yc4_item_qa_table']}` where it_id = '$it_id' ";
$sql = " delete from `{$g4['shop_item_qa_table']}` where it_id = '$it_id' ";
sql_query($sql);
// 관련상품삭제
$sql = " delete from `{$g4['yc4_item_relation_table']}` where it_id = '$it_id' or it_id2 = '$it_id' ";
$sql = " delete from `{$g4['shop_item_relation_table']}` where it_id = '$it_id' or it_id2 = '$it_id' ";
sql_query($sql);
// 선택옵션정보삭제
$sql = " delete from `{$g4['yc4_option_table']}` where it_id = '$it_id' ";
$sql = " delete from `{$g4['shop_option_table']}` where it_id = '$it_id' ";
sql_query($sql);
// 추가옵션정보삭제
$sql = " delete from `{$g4['yc4_supplement_table']}` where it_id = '$it_id' ";
$sql = " delete from `{$g4['shop_supplement_table']}` where it_id = '$it_id' ";
sql_query($sql);
// 상품요약정보삭제
$sql = " delete from `{$g4['yc4_item_info_table']}` where it_id = '$it_id' ";
$sql = " delete from `{$g4['shop_item_info_table']}` where it_id = '$it_id' ";
sql_query($sql);
//------------------------------------------------------------------------
// HTML 내용에서 에디터에 올라간 이미지의 경로를 얻어 삭제함
//------------------------------------------------------------------------
$sql = " select * from {$g4['yc4_item_table']} where it_id = '$it_id' ";
$sql = " select * from {$g4['shop_item_table']} where it_id = '$it_id' ";
$it = sql_fetch($sql);
$s = $it['it_explan'];
@ -127,7 +127,7 @@ function itemdelete($it_id)
// 상품 삭제
$sql = " delete from {$g4['yc4_item_table']} where it_id = '$it_id' ";
$sql = " delete from {$g4['shop_item_table']} where it_id = '$it_id' ";
sql_query($sql);
}
@ -158,7 +158,7 @@ if($w == "" && !trim($it_id)) {
// 파일정보
if($w == "u") {
$sql = " select it_img1, it_img2, it_img3, it_img4, it_img5, it_img6, it_img7, it_img8, it_img9, it_img10
from {$g4['yc4_item_table']}
from {$g4['shop_item_table']}
where it_id = '$it_id' ";
$file = sql_fetch($sql);
@ -255,13 +255,13 @@ if ($w == "" || $w == "u")
// 관련상품을 우선 삭제함
sql_query(" delete from {$g4['yc4_item_relation_table']} where it_id = '$it_id' ");
sql_query(" delete from {$g4['shop_item_relation_table']} where it_id = '$it_id' ");
// 관련상품의 반대도 삭제
sql_query(" delete from {$g4['yc4_item_relation_table']} where it_id2 = '$it_id' ");
sql_query(" delete from {$g4['shop_item_relation_table']} where it_id2 = '$it_id' ");
// 이벤트상품을 우선 삭제함
sql_query(" delete from {$g4['yc4_event_item_table']} where it_id = '$it_id' ");
sql_query(" delete from {$g4['shop_event_item_table']} where it_id = '$it_id' ");
// 개별배송비처리
if($default['de_send_cost_case'] == "개별배송") {
@ -354,7 +354,7 @@ $sql_common = " ca_id = '$ca_id',
if ($w == "")
{
$sql = " insert $g4[yc4_item_table]
$sql = " insert $g4[shop_item_table]
set it_id = '$it_id',
$sql_common ";
sql_query($sql);
@ -364,7 +364,7 @@ if ($w == "")
$op_item_code = get_session('ss_op_item_code');
if($it_id != $op_item_code) {
$sql = " update {$g4['yc4_option_table']} set it_id = '$it_id' where it_id = '$op_item_code' ";
$sql = " update {$g4['shop_option_table']} set it_id = '$it_id' where it_id = '$op_item_code' ";
sql_query($sql);
}
}
@ -374,7 +374,7 @@ if ($w == "")
$sp_item_code = get_session('ss_sp_item_code');
if($it_id != $sp_item_code) {
$sql = " update {$g4['yc4_supplement_table']} set it_id = '$it_id' where it_id = '$sp_item_code' ";
$sql = " update {$g4['shop_supplement_table']} set it_id = '$it_id' where it_id = '$sp_item_code' ";
sql_query($sql);
}
}
@ -384,7 +384,7 @@ if ($w == "")
$ii_item_code = get_session('ss_ii_item_code');
if($it_id != $ii_item_code) {
$sql = " update {$g4['yc4_item_info_table']} set it_id = '$it_id' where it_id = '$ii_item_code' ";
$sql = " update {$g4['shop_item_info_table']} set it_id = '$it_id' where it_id = '$ii_item_code' ";
sql_query($sql);
}
}
@ -395,20 +395,20 @@ if ($w == "")
}
else if ($w == "u")
{
$sql = " update $g4[yc4_item_table]
$sql = " update $g4[shop_item_table]
set $sql_common
where it_id = '$it_id' ";
sql_query($sql);
// 선택옵션정보 삭제
if(!$it_option_use) {
$sql = " delete from {$g4['yc4_option_table']} where it_id = '$it_id' ";
$sql = " delete from {$g4['shop_option_table']} where it_id = '$it_id' ";
sql_query($sql);
}
// 추가옵션정보 삭제
if(!$it_supplement_use) {
$sql = " delete from {$g4['yc4_supplement_table']} where it_id = '$it_id' ";
$sql = " delete from {$g4['shop_supplement_table']} where it_id = '$it_id' ";
sql_query($sql);
}
}
@ -416,7 +416,7 @@ else if ($w == "d")
{
if ($is_admin != 'super')
{
$sql = " select it_id from $g4[yc4_item_table] a, $g4[yc4_category_table] b
$sql = " select it_id from $g4[shop_item_table] a, $g4[shop_category_table] b
where a.it_id = '$it_id'
and a.ca_id = b.ca_id
and b.ca_mb_id = '$member[mb_id]' ";
@ -436,13 +436,13 @@ if ($w == "" || $w == "u")
{
if (trim($it_id2[$i]))
{
$sql = " insert into {$g4['yc4_item_relation_table']}
$sql = " insert into {$g4['shop_item_relation_table']}
set it_id = '$it_id',
it_id2 = '$it_id2[$i]' ";
sql_query($sql, false);
// 관련상품의 반대로도 등록
$sql = " insert into {$g4['yc4_item_relation_table']}
$sql = " insert into {$g4['shop_item_relation_table']}
set it_id = '$it_id2[$i]',
it_id2 = '$it_id' ";
sql_query($sql, false);
@ -455,7 +455,7 @@ if ($w == "" || $w == "u")
{
if (trim($ev_id[$i]))
{
$sql = " insert into {$g4['yc4_event_item_table']}
$sql = " insert into {$g4['shop_event_item_table']}
set ev_id = '$ev_id[$i]',
it_id = '$it_id' ";
sql_query($sql, false);