경로 및 전체테이블명 변경

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

@ -8,7 +8,7 @@ $html_title = "배너";
if ($w=="u")
{
$html_title .= " 수정";
$sql = " select * from $g4[yc4_banner_table] where bn_id = '$bn_id' ";
$sql = " select * from $g4[shop_banner_table] where bn_id = '$bn_id' ";
$bn = sql_fetch($sql);
}
else

View File

@ -21,9 +21,9 @@ if ($w=="")
{
if (!$bn_bimg_name) alert("배너 이미지를 업로드 하세요.");
sql_query(" alter table $g4[yc4_banner_table] auto_increment=1 ");
sql_query(" alter table $g4[shop_banner_table] auto_increment=1 ");
$sql = " insert into $g4[yc4_banner_table]
$sql = " insert into $g4[shop_banner_table]
set bn_alt = '$bn_alt',
bn_url = '$bn_url',
bn_position = '$bn_position',
@ -40,7 +40,7 @@ if ($w=="")
}
else if ($w=="u")
{
$sql = " update $g4[yc4_banner_table]
$sql = " update $g4[shop_banner_table]
set bn_alt = '$bn_alt',
bn_url = '$bn_url',
bn_position = '$bn_position',
@ -56,7 +56,7 @@ else if ($w=="d")
{
@unlink("$g4[path]/data/banner/$bn_id");
$sql = " delete from $g4[yc4_banner_table] where bn_id = $bn_id ";
$sql = " delete from $g4[shop_banner_table] where bn_id = $bn_id ";
$result = sql_query($sql);
}

View File

@ -7,7 +7,7 @@ auth_check($auth[$sub_menu], "r");
$g4[title] = "배너관리";
include_once(G4_ADMIN_PATH."/admin.head.php");
$sql_common = " from $g4[yc4_banner_table] ";
$sql_common = " from $g4[shop_banner_table] ";
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
@ -42,7 +42,7 @@ $from_record = ($page - 1) * $rows; // 시작 열을 구함
</tr>
<?
$sql = " select * from $g4[yc4_banner_table]
$sql = " select * from $g4[shop_banner_table]
order by bn_order, bn_id desc
limit $from_record, $rows ";
$result = sql_query($sql);

View File

@ -5,9 +5,9 @@ include_once(G4_CKEDITOR_PATH.'/ckeditor.lib.php');
auth_check($auth[$sub_menu], "w");
$category_path = "{$g4[path]}/data/category";
$category_path = G4_DATA_PATH.'/category';
$sql_common = " from $g4[yc4_category_table] ";
$sql_common = " from $g4[shop_category_table] ";
if ($is_admin != 'super')
$sql_common .= " where ca_mb_id = '$member[mb_id]' ";
@ -22,7 +22,7 @@ if ($w == "")
$len2 = $len + 1;
$sql = " select MAX(SUBSTRING(ca_id,$len2,2)) as max_subid from $g4[yc4_category_table] where SUBSTRING(ca_id,1,$len) = '$ca_id' ";
$sql = " select MAX(SUBSTRING(ca_id,$len2,2)) as max_subid from $g4[shop_category_table] where SUBSTRING(ca_id,1,$len) = '$ca_id' ";
$row = sql_fetch($sql);
if ($row['max_subid']) {
@ -45,7 +45,7 @@ if ($w == "")
if ($ca_id) // 2단계이상 분류
{
$sql = " select * from $g4[yc4_category_table] where ca_id = '$ca_id' ";
$sql = " select * from $g4[shop_category_table] where ca_id = '$ca_id' ";
$ca = sql_fetch($sql);
$html_title = $ca[ca_name] . " 하위분류추가";
$ca[ca_name] = "";
@ -66,7 +66,7 @@ if ($w == "")
}
else if ($w == "u")
{
$sql = " select * from $g4[yc4_category_table] where ca_id = '$ca_id' ";
$sql = " select * from $g4[shop_category_table] where ca_id = '$ca_id' ";
$ca = sql_fetch($sql);
if (!$ca[ca_id])
alert("자료가 없습니다.");

View File

@ -78,13 +78,13 @@ if ($w == "")
$parent_level = strlen($parent_ca_id) / 2;
$parent_length = $parent_level * 4;
$sql = " select left(ca_sort,$parent_length) as ca_sort from $g4[yc4_category_table] where ca_id = '$parent_ca_id' ";
$sql = " select left(ca_sort,$parent_length) as ca_sort from $g4[shop_category_table] where ca_id = '$parent_ca_id' ";
$parent = sql_fetch($sql);
$level = strlen($ca_id) / 2;
$length = $level * 4;
$sql = " select max(mid(ca_sort,$parent_length+1,4)) as max_sort from $g4[yc4_category_table] where ca_id like '$parent_ca_id%' ";
$sql = " select max(mid(ca_sort,$parent_length+1,4)) as max_sort from $g4[shop_category_table] where ca_id like '$parent_ca_id%' ";
$row = sql_fetch($sql);
if ($row[max_sort]) {
$next_sort = (int)$row[max_sort] + 1;
@ -94,7 +94,7 @@ if ($w == "")
$ca_sort = $parent['ca_sort'] . str_pad($next_sort, 4, '0', STR_PAD_LEFT);
$sql = " insert $g4[yc4_category_table]
$sql = " insert $g4[shop_category_table]
set ca_id = '$ca_id',
ca_name = '$ca_name',
ca_sort = '$ca_sort',
@ -103,7 +103,7 @@ if ($w == "")
}
else if ($w == "u")
{
$sql = " update $g4[yc4_category_table]
$sql = " update $g4[shop_category_table]
set ca_name = '$ca_name',
$sql_common
where ca_id = '$ca_id' ";
@ -112,7 +112,7 @@ else if ($w == "u")
// 하위분류를 똑같은 설정으로 반영
if ($sub_category) {
$len = strlen($ca_id);
$sql = " update $g4[yc4_category_table]
$sql = " update $g4[shop_category_table]
set $sql_common
where SUBSTRING(ca_id,1,$len) = '$ca_id' ";
if ($is_admin != 'super')
@ -125,7 +125,7 @@ else if ($w == "d")
// 분류의 길이
$len = strlen($ca_id);
$sql = " select COUNT(*) as cnt from $g4[yc4_category_table]
$sql = " select COUNT(*) as cnt from $g4[shop_category_table]
where SUBSTRING(ca_id,1,$len) = '$ca_id'
and ca_id <> '$ca_id' ";
$row = sql_fetch($sql);
@ -133,7 +133,7 @@ else if ($w == "d")
alert("이 분류에 속한 하위 분류가 있으므로 삭제 할 수 없습니다.\\n\\n하위분류를 우선 삭제하여 주십시오.");
$str = $comma = "";
$sql = " select it_id from $g4[yc4_item_table] where ca_id = '$ca_id' ";
$sql = " select it_id from $g4[shop_item_table] where ca_id = '$ca_id' ";
$result = sql_query($sql);
$i=0;
while ($row = mysql_fetch_array($result))
@ -156,7 +156,7 @@ else if ($w == "d")
@unlink("{$g4[category_path]}/$ca_id"."_t");
// 분류 삭제
$sql = " delete from $g4[yc4_category_table] where ca_id = '$ca_id' ";
$sql = " delete from $g4[shop_category_table] where ca_id = '$ca_id' ";
sql_query($sql);
}

View File

@ -10,24 +10,24 @@ if ($ca_id && ($move == 'up' || $move == 'down')) {
$level = $length / 2;
// 클릭한 분류의 분류아이디와 출력순서
$sql = " select ca_id, ca_sort from $g4[yc4_category_table] where ca_id = '$ca_id' ";
$sql = " select ca_id, ca_sort from $g4[shop_category_table] where ca_id = '$ca_id' ";
$org = sql_fetch($sql);
// 옮겨갈 분류의 분류아이디와 출력순서
if ($move == 'up') {
$sql = " select ca_id, ca_sort from $g4[yc4_category_table] where ca_id like '$parent_ca_id%' and length(ca_id) = $length and ca_sort < '$org[ca_sort]' order by ca_sort desc limit 1 ";
$sql = " select ca_id, ca_sort from $g4[shop_category_table] where ca_id like '$parent_ca_id%' and length(ca_id) = $length and ca_sort < '$org[ca_sort]' order by ca_sort desc limit 1 ";
$dst = sql_fetch($sql);
} else {
$sql = " select ca_id, ca_sort from $g4[yc4_category_table] where ca_id like '$parent_ca_id%' and length(ca_id) = $length and ca_sort > '$org[ca_sort]' order by ca_sort asc limit 1 ";
$sql = " select ca_id, ca_sort from $g4[shop_category_table] where ca_id like '$parent_ca_id%' and length(ca_id) = $length and ca_sort > '$org[ca_sort]' order by ca_sort asc limit 1 ";
$dst = sql_fetch($sql);
}
// 옮겨갈 분류가 있다면
if ($dst) {
$sql = " update $g4[yc4_category_table] set ca_sort = concat('$org[ca_sort]', mid(ca_sort,$level*4+1, 20)) where ca_id like '$dst[ca_id]%' ";
$sql = " update $g4[shop_category_table] set ca_sort = concat('$org[ca_sort]', mid(ca_sort,$level*4+1, 20)) where ca_id like '$dst[ca_id]%' ";
sql_query($sql);
$sql = " update $g4[yc4_category_table] set ca_sort = concat('$dst[ca_sort]', mid(ca_sort,$level*4+1, 20)) where ca_id like '$org[ca_id]%' ";
$sql = " update $g4[shop_category_table] set ca_sort = concat('$dst[ca_sort]', mid(ca_sort,$level*4+1, 20)) where ca_id like '$org[ca_id]%' ";
sql_query($sql);
}
}
@ -47,7 +47,7 @@ if ($stx != "") {
$page = 1;
}
$sql_common = " from $g4[yc4_category_table] ";
$sql_common = " from $g4[shop_category_table] ";
if ($is_admin != 'super')
$sql_common .= " $where ca_mb_id = '$member[mb_id]' ";
$sql_common .= $sql_search;
@ -148,7 +148,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
// 해당 분류에 속한 상품의 갯수
$sql1 = " select COUNT(*) as cnt from $g4[yc4_item_table] where ca_id = '$row[ca_id]' or ca_id2 = '$row[ca_id]' or ca_id3 = '$row[ca_id]' ";
$sql1 = " select COUNT(*) as cnt from $g4[shop_item_table] where ca_id = '$row[ca_id]' or ca_id2 = '$row[ca_id]' or ca_id3 = '$row[ca_id]' ";
$row1 = sql_fetch($sql1);
$list = $i%2;

View File

@ -7,7 +7,7 @@ check_demo();
auth_check($auth[$sub_menu], "w");
for ($i=0; $i<count($_POST['ca_id']); $i++) {
$sql = " update $g4[yc4_category_table]
$sql = " update $g4[shop_category_table]
set ca_name = '{$_POST[ca_name][$i]}',
ca_menu = '{$_POST[ca_menu][$i]}',
ca_use = '{$_POST[ca_use][$i]}',

View File

@ -4,7 +4,7 @@ include_once("./_common.php");
$ca_id = $_REQUEST['ca_id'];
$length = strlen($ca_id) + 2;
$sql = " SELECT ca_id, ca_name from {$g4['yc4_category_table']} where ca_id like '$ca_id%' and length(ca_id) = $length order by ca_order, ca_id ";
$sql = " SELECT ca_id, ca_name from {$g4['shop_category_table']} where ca_id like '$ca_id%' and length(ca_id) = $length order by ca_order, ca_id ";
$result = sql_query($sql);
$list = array();
while ($row=sql_fetch_array($result)) {
@ -13,7 +13,7 @@ while ($row=sql_fetch_array($result)) {
$cnt = 0;
if ($length < 10) {
$sql2 = " select count(*) as cnt from {$g4['yc4_category_table']} where ca_id like '{$row['ca_id']}%' and length(ca_id) = $length + 2 ";
$sql2 = " select count(*) as cnt from {$g4['shop_category_table']} where ca_id like '{$row['ca_id']}%' and length(ca_id) = $length + 2 ";
$row2 = sql_fetch($sql2);
$cnt = $row2['cnt'];
}

View File

@ -8,7 +8,7 @@ $len = strlen($ca_id) + 2;
if ($len > 10)
die('{"error":"마지막 레벨은 하위레벨이 없습니다."}');
$sql = " select ca_id, ca_name from {$g4['yc4_category_table']} where ca_id like '$ca_id%' and length(ca_id) = $len ";
$sql = " select ca_id, ca_name from {$g4['shop_category_table']} where ca_id like '$ca_id%' and length(ca_id) = $len ";
$result = sql_query($sql);
while ($row = sql_fetch_array($result)) {
$id = $row['ca_id'];

View File

@ -15,9 +15,9 @@ $pos = strlen($ca_id) * 2 - 3;
$piece_order = make_order($order);
if ($pos == 1) {
$sql = " update {$g4['yc4_category_table']} set ca_order = concat(left('$piece_order',4),mid(ca_order,$pos+4,20-($pos+4))) where ca_id like '$ca_id%' ";
$sql = " update {$g4['shop_category_table']} set ca_order = concat(left('$piece_order',4),mid(ca_order,$pos+4,20-($pos+4))) where ca_id like '$ca_id%' ";
} else {
$sql = " update {$g4['yc4_category_table']} set ca_order = concat(mid(ca_order,1,$pos-1),'$piece_order',mid(ca_order,$pos+4,20-($pos+4-1))) where ca_id like '$ca_id%' ";
$sql = " update {$g4['shop_category_table']} set ca_order = concat(mid(ca_order,1,$pos-1),'$piece_order',mid(ca_order,$pos+4,20-($pos+4-1))) where ca_id like '$ca_id%' ";
}
sql_query($sql, true);
?>

View File

@ -4,14 +4,14 @@ include_once("./_common.php");
$name = "";
if ($it_id)
{
$sql = " select it_name from {$g4['yc4_item_table']} where it_id = '$it_id' ";
$sql = " select it_name from {$g4['shop_item_table']} where it_id = '$it_id' ";
$row = sql_fetch($sql);
$code = $it_id;
$name = $row['it_name'];
}
else if ($ca_id)
{
$sql = " select ca_name from {$g4['yc4_category_table']} where ca_id = '$ca_id' ";
$sql = " select ca_name from {$g4['shop_category_table']} where ca_id = '$ca_id' ";
$row = sql_fetch($sql);
$code = $ca_id;
$name = $row['ca_name'];

View File

@ -20,7 +20,7 @@ $de_kcp_mid = substr($_POST['de_kcp_mid'],0,3);
//
// 영카트 default
//
$sql = " update $g4[yc4_default_table]
$sql = " update $g4[shop_default_table]
set de_admin_company_owner = '$de_admin_company_owner',
de_admin_company_name = '$de_admin_company_name',
de_admin_company_saupja_no = '$de_admin_company_saupja_no',

View File

@ -6,7 +6,7 @@ include_once("./_common.php");
auth_check($auth[$sub_menu], "w");
// 상단, 하단 파일경로 필드 추가
$sql = " ALTER TABLE `$g4[yc4_content_table]` ADD `co_include_head` VARCHAR( 255 ) NOT NULL ,
$sql = " ALTER TABLE `$g4[shop_content_table]` ADD `co_include_head` VARCHAR( 255 ) NOT NULL ,
ADD `co_include_tail` VARCHAR( 255 ) NOT NULL ";
sql_query($sql, false);
@ -17,7 +17,7 @@ if ($w == "u")
$html_title .= " 수정";
$readonly = " readonly";
$sql = " select * from $g4[yc4_content_table] where co_id = '$co_id' ";
$sql = " select * from $g4[shop_content_table] where co_id = '$co_id' ";
$co = sql_fetch($sql);
if (!$co[co_id])
alert("등록된 자료가 없습니다.");

View File

@ -27,19 +27,19 @@ if ($w == "")
//if(eregi("[^a-z0-9_]", $co_id)) alert("ID 는 영문자, 숫자, _ 만 가능합니다.");
if(preg_match("/[^a-z0-9_]/i", $co_id)) alert("ID 는 영문자, 숫자, _ 만 가능합니다.");
$sql = " select co_id from $g4[yc4_content_table] where co_id = '$co_id' ";
$sql = " select co_id from $g4[shop_content_table] where co_id = '$co_id' ";
$row = sql_fetch($sql);
if ($row[co_id])
alert("이미 같은 ID로 등록된 내용이 있습니다.");
$sql = " insert $g4[yc4_content_table]
$sql = " insert $g4[shop_content_table]
set co_id = '$co_id',
$sql_common ";
sql_query($sql);
}
else if ($w == "u")
{
$sql = " update $g4[yc4_content_table]
$sql = " update $g4[shop_content_table]
set $sql_common
where co_id = '$co_id' ";
sql_query($sql);
@ -49,7 +49,7 @@ else if ($w == "d")
@unlink("$g4[path]/data/content/{$co_id}_h");
@unlink("$g4[path]/data/content/{$co_id}_t");
$sql = " delete from $g4[yc4_content_table] where co_id = '$co_id' ";
$sql = " delete from $g4[shop_content_table] where co_id = '$co_id' ";
sql_query($sql);
}

View File

@ -7,7 +7,7 @@ auth_check($auth[$sub_menu], "r");
$g4[title] = "내용관리";
include_once(G4_ADMIN_PATH."/admin.head.php");
$sql_common = " from $g4[yc4_content_table] ";
$sql_common = " from $g4[shop_content_table] ";
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;

View File

@ -3,7 +3,7 @@ include_once('./_common.php');
$stx = trim($stx);
if($stx) {
$sql_common = " from {$g4['yc4_category_table']} ";
$sql_common = " from {$g4['shop_category_table']} ";
$sql_search = " where ca_use = '1' and ca_nocoupon = '0' and ca_name like '%$stx%' ";
$sql_order = " order by ca_id asc ";

View File

@ -3,7 +3,7 @@ include_once('./_common.php');
$stx = trim($stx);
if($stx) {
$sql_common = " from {$g4['yc4_item_table']} ";
$sql_common = " from {$g4['shop_item_table']} ";
$sql_search = " where it_use = '1' and it_nocoupon = '0' and it_name like '%$stx%' ";
$sql_order = " order by it_id asc ";

View File

@ -14,7 +14,7 @@ if(!$count) {
for($i=0; $i<$count; $i++) {
$cp_no = $_POST['list_chk'][$i];
$sql = " delete from {$g4['yc4_coupon_table']} where cp_no = '$cp_no' ";
$sql = " delete from {$g4['shop_coupon_table']} where cp_no = '$cp_no' ";
@sql_query($sql);
}

View File

@ -9,7 +9,7 @@ $html_title = "쿠폰";
if($w == 'u') {
$html_title .= "수정";
$sql = " select * from {$g4['yc4_coupon_table']} where cp_no = '$cp_no' ";
$sql = " select * from {$g4['shop_coupon_table']} where cp_no = '$cp_no' ";
$write = sql_fetch($sql);
if(!$write['cp_id']) {

View File

@ -160,7 +160,7 @@ if($w == '') {
do {
$cp_id = coupon_generator();
$sql = " insert into {$g4['yc4_coupon_table']}
$sql = " insert into {$g4['shop_coupon_table']}
set cp_id = '$cp_id',
cp_subject = '$cp_subject',
cp_type = '$cp_type',
@ -208,7 +208,7 @@ if($w == '') {
do {
$cp_id = coupon_generator();
$sql = " insert into {$g4['yc4_coupon_table']}
$sql = " insert into {$g4['shop_coupon_table']}
set cp_id = '$cp_id',
cp_subject = '$cp_subject',
cp_type = '$cp_type',
@ -245,7 +245,7 @@ if($w == '') {
for($i=0; $i<$ca_id_count; $i++) {
// 카테고리체크
if($ca_id != '전체카테고리') {
$sql = " select ca_id from {$g4['yc4_category_table']}
$sql = " select ca_id from {$g4['shop_category_table']}
where ca_id = '{$arr_ca_id[$i]}' and ca_use = '1' and ca_nocoupon = '0' ";
$ca = sql_fetch($sql);
if(!$ca['ca_id']) {
@ -268,7 +268,7 @@ if($w == '') {
do {
$cp_id = coupon_generator();
$sql = " insert into {$g4['yc4_coupon_table']}
$sql = " insert into {$g4['shop_coupon_table']}
set cp_id = '$cp_id',
cp_subject = '$cp_subject',
cp_type = '$cp_type',
@ -306,7 +306,7 @@ if($w == '') {
for($i=0; $i<$it_id_count; $i++) {
// 상품체크
if($it_id != '') {
$sql = " select it_id from {$g4['yc4_item_table']}
$sql = " select it_id from {$g4['shop_item_table']}
where it_id = '{$arr_it_id[$i]}' and it_use = '1' and it_nocoupon = '0' ";
$it = sql_fetch($sql);
if(!$it['it_id']) {
@ -329,7 +329,7 @@ if($w == '') {
do {
$cp_id = coupon_generator();
$sql = " insert into {$g4['yc4_coupon_table']}
$sql = " insert into {$g4['shop_coupon_table']}
set cp_id = '$cp_id',
cp_subject = '$cp_subject',
cp_type = '$cp_type',
@ -361,7 +361,7 @@ if($w == '') {
}
}
} else if($w == 'u') {
$sql = " select cp_id from {$g4['yc4_coupon_table']} where cp_no = '$cp_no' ";
$sql = " select cp_id from {$g4['shop_coupon_table']} where cp_no = '$cp_no' ";
$row = sql_fetch($sql);
if(!$row['cp_id']) {
@ -387,7 +387,7 @@ if($w == '') {
// 상품체크
if($cp_type == 0 && $cp_target == 0) {
if($it_id != '전체상품') {
$sql = " select it_id from {$g4['yc4_item_table']} where it_id = '$it_id' and it_nocoupon = '0' ";
$sql = " select it_id from {$g4['shop_item_table']} where it_id = '$it_id' and it_nocoupon = '0' ";
$row = sql_fetch($sql);
if(!$row['it_id']) {
alert('존재하지 않거나 쿠폰제외 상품입니다.');
@ -398,7 +398,7 @@ if($w == '') {
// 카테고리체크
if($cp_type == 0 && $cp_target == 1) {
if($ca_id != '전체카테고리') {
$sql = " select ca_id from {$g4['yc4_category_table']} where ca_id = '$ca_id' and ca_nocoupon = '0' ";
$sql = " select ca_id from {$g4['shop_category_table']} where ca_id = '$ca_id' and ca_nocoupon = '0' ";
$row = sql_fetch($sql);
if(!$row['ca_id']) {
alert('존재하지 않거나 쿠폰제외 카테고리입니다.');
@ -416,7 +416,7 @@ if($w == '') {
}
}
$sql = " update {$g4['yc4_coupon_table']}
$sql = " update {$g4['shop_coupon_table']}
set cp_subject = '$cp_subject',
cp_type = '$cp_type',
cp_target = '$cp_target',
@ -435,14 +435,14 @@ if($w == '') {
where cp_no = '$cp_no' ";
sql_query($sql);
} else if($w == 'd') {
$sql = " select cp_id from {$g4['yc4_coupon_table']} where cp_no = '$cp_no' ";
$sql = " select cp_id from {$g4['shop_coupon_table']} where cp_no = '$cp_no' ";
$row = sql_fetch($sql);
if(!$row['cp_id']) {
alert('쿠폰 정보가 존재하지 않습니다.');
}
$sql = " delete from {$g4['yc4_coupon_table']} where cp_no = '$cp_no' ";
$sql = " delete from {$g4['shop_coupon_table']} where cp_no = '$cp_no' ";
sql_query($sql);
}

View File

@ -7,7 +7,7 @@ auth_check($auth[$sub_menu], "r");
$g4['title'] = "쿠폰관리";
include_once(G4_ADMIN_PATH."/admin.head.php");
$sql_common = " from {$g4['yc4_coupon_table']} a left join {$g4['yc4_item_table']} b on ( a.it_id = b.it_id ) ";
$sql_common = " from {$g4['shop_coupon_table']} a left join {$g4['shop_item_table']} b on ( a.it_id = b.it_id ) ";
$sql_search = " where (1) ";
@ -106,7 +106,7 @@ for($i=0; $row=sql_fetch_array($result); $i++) {
}
} else if($row['cp_target'] == 1) { // 카테고리
if($row['ca_id'] != '전체카테고리') {
$sql = " select ca_name from {$g4['yc4_category_table']} where ca_id = '{$row['ca_id']}' ";
$sql = " select ca_name from {$g4['shop_category_table']} where ca_id = '{$row['ca_id']}' ";
$temp = sql_fetch($sql);
$target = $temp['ca_name'];
} else {
@ -119,7 +119,7 @@ for($i=0; $row=sql_fetch_array($result); $i++) {
$limit = explode('-', $row['cp_end']);
$cp_end = substr($limit[0], 2, 2).'년 '.(int)$limit[1].'월 '.(int)$limit[2].'일';
// 쿠폰사용수
$sql1 = " select count(*) as cnt from {$g4['yc4_coupon_history_table']} where cp_id = '{$row['cp_id']}' ";
$sql1 = " select count(*) as cnt from {$g4['shop_coupon_history_table']} where cp_id = '{$row['cp_id']}' ";
$row1 = sql_fetch($sql1);
$use_count = number_format($row1['cnt']);

View File

@ -9,7 +9,7 @@ if ($w == "u") {
$html_title .= " 수정";
$readonly = " readonly";
$sql = " select * from $g4[yc4_delivery_table] where dl_id = '$dl_id' ";
$sql = " select * from $g4[shop_delivery_table] where dl_id = '$dl_id' ";
$dl = sql_fetch($sql);
if (!$dl[dl_id]) alert("등록된 자료가 없습니다.");
}

View File

@ -16,19 +16,19 @@ $sql_common .= "set dl_company = '$dl_company',
dl_order = '$dl_order' ";
if ($w == "") {
$sql = " alter table $g4[yc4_delivery_table] auto_increment=1 ";
$sql = " alter table $g4[shop_delivery_table] auto_increment=1 ";
sql_query($sql);
$sql = " insert $g4[yc4_delivery_table] $sql_common ";
$sql = " insert $g4[shop_delivery_table] $sql_common ";
sql_query($sql);
$dl_id = mysql_insert_id();
} else if ($w == "u") {
$sql = " update $g4[yc4_delivery_table] $sql_common where dl_id = '$dl_id' ";
$sql = " update $g4[shop_delivery_table] $sql_common where dl_id = '$dl_id' ";
sql_query($sql);
} else if ($w == "d") {
// Master 삭제
$sql = " delete from $g4[yc4_delivery_table] where dl_id = '$dl_id' ";
$sql = " delete from $g4[shop_delivery_table] where dl_id = '$dl_id' ";
sql_query($sql);
}

View File

@ -7,7 +7,7 @@ auth_check($auth[$sub_menu], "r");
$g4[title] = "배송회사관리";
include_once(G4_ADMIN_PATH."/admin.head.php");
$sql_common = " from $g4[yc4_delivery_table] ";
$sql_common = " from $g4[shop_delivery_table] ";
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;

View File

@ -7,11 +7,11 @@ auth_check($auth[$sub_menu], "r");
$g4[title] = "배송일괄처리";
include_once(G4_ADMIN_PATH."/admin.head.php");
//sql_query(" update $g4[yc4_cart_table] set ct_status = '완료' where ct_status = '배송' ");
//sql_query(" update $g4[shop_cart_table] set ct_status = '완료' where ct_status = '배송' ");
// 배송회사리스트 ---------------------------------------------
$delivery_options = "";
$sql = " select * from $g4[yc4_delivery_table] order by dl_order ";
$sql = " select * from $g4[shop_delivery_table] order by dl_order ";
$result = sql_query($sql);
for($i=0; $row=sql_fetch_array($result); $i++) {
$delivery_options .= "<option value='$row[dl_id]'>$row[dl_company]";
@ -33,8 +33,8 @@ if ($sel_ca_id != "") {
if ($sel_field == "") $sel_field = "od_id";
$sql_common = " from $g4[yc4_cart_table] a
left join $g4[yc4_order_table] b on ( a.uq_id = b.od_id)
$sql_common = " from $g4[shop_cart_table] a
left join $g4[shop_order_table] b on ( a.uq_id = b.od_id)
$sql_search ";
// 테이블의 전체 레코드수만 얻음
@ -44,7 +44,7 @@ if ($chk_misu) {
$total_count = mysql_num_rows($result);
}
else {
$row = sql_fetch("select count(od_id) as cnt from {$g4['yc4_order_table']} $sql_search ");
$row = sql_fetch("select count(od_id) as cnt from {$g4['shop_order_table']} $sql_search ");
$total_count = $row[cnt];
}

View File

@ -23,7 +23,7 @@ for ($m=0; $m<count($_POST[od_id]); $m++)
// 배송회사와 운송장번호가 있는것만 수정
if ($_POST[dl_id][$m] && trim($_POST[od_invoice][$m]))
{
$sql = "update $g4[yc4_order_table]
$sql = "update $g4[shop_order_table]
set od_invoice_time = '{$_POST[od_invoice_time][$m]}',
dl_id = '{$_POST[dl_id][$m]}',
od_invoice = '{$_POST[od_invoice][$m]}'
@ -37,7 +37,7 @@ for ($m=0; $m<count($_POST[od_id]); $m++)
// 장바구니 상태가 '주문', '준비' 일 경우 '배송' 으로 상태를 변경
$on_uid = $_POST[on_uid][$m];
$sql = " update $g4[yc4_cart_table]
$sql = " update $g4[shop_cart_table]
set ct_status = '배송'
where ct_status in ('주문', '준비')
and on_uid = '$on_uid' ";
@ -46,16 +46,16 @@ for ($m=0; $m<count($_POST[od_id]); $m++)
include "./ordermail.inc.php";
// 재고 반영
$sql2 = " select it_id, ct_id, ct_stock_use, ct_qty from $g4[yc4_cart_table]
$sql2 = " select it_id, ct_id, ct_stock_use, ct_qty from $g4[shop_cart_table]
where on_uid = '$on_uid'
and ct_stock_use = '0' ";
$result2 = sql_query($sql2);
for ($k=0; $row2=mysql_fetch_array($result2); $k++)
{
$sql3 =" update $g4[yc4_item_table] set it_stock_qty = it_stock_qty - '$row2[ct_qty]' where it_id = '$row2[it_id]' ";
$sql3 =" update $g4[shop_item_table] set it_stock_qty = it_stock_qty - '$row2[ct_qty]' where it_id = '$row2[it_id]' ";
sql_query($sql3);
$sql4 = " update $g4[yc4_cart_table]
$sql4 = " update $g4[shop_cart_table]
set ct_stock_use = '1',
ct_history = CONCAT(ct_history,'\n배송일괄|$now|$REMOTE_ADDR')
where on_uid = '$on_uid'
@ -67,10 +67,10 @@ for ($m=0; $m<count($_POST[od_id]); $m++)
// 일괄배송처리시 SMS 문자 일괄전송
if ($default[de_sms_use4] && $_POST['send_sms'])
{
$sql = " select od_id, od_name, od_invoice, od_hp, dl_id from $g4[yc4_order_table] where od_id = '$od_id' ";
$sql = " select od_id, od_name, od_invoice, od_hp, dl_id from $g4[shop_order_table] where od_id = '$od_id' ";
$od = sql_fetch($sql);
$sql = " select dl_company from $g4[yc4_delivery_table] where dl_id = '$od[dl_id]' ";
$sql = " select dl_company from $g4[shop_delivery_table] where dl_id = '$od[dl_id]' ";
$dl = sql_fetch($sql);
$sms_contents = $default[de_sms_cont4];
@ -93,7 +93,7 @@ for ($m=0; $m<count($_POST[od_id]); $m++)
}
else
{
$sql = "update $g4[yc4_order_table]
$sql = "update $g4[shop_order_table]
set od_invoice_time = '',
dl_id = '',
od_invoice = ''

View File

@ -7,7 +7,7 @@ auth_check($auth[$sub_menu], "w");
$html_title = "FAQ 상세";
$sql = " select * from $g4[yc4_faq_master_table] where fm_id = '$fm_id' ";
$sql = " select * from $g4[shop_faq_master_table] where fm_id = '$fm_id' ";
$fm = sql_fetch($sql);
if ($w == "u")
@ -15,7 +15,7 @@ if ($w == "u")
$html_title .= " 수정";
$readonly = " readonly";
$sql = " select * from $g4[yc4_faq_table] where fa_id = '$fa_id' ";
$sql = " select * from $g4[shop_faq_table] where fa_id = '$fa_id' ";
$fa = sql_fetch($sql);
if (!$fa[fa_id]) alert("등록된 자료가 없습니다.");

View File

@ -16,7 +16,7 @@ $sql_common = " fa_subject = '$fa_subject',
if ($w == "")
{
$sql = " insert $g4[yc4_faq_table]
$sql = " insert $g4[shop_faq_table]
set fm_id ='$fm_id',
$sql_common ";
sql_query($sql);
@ -25,14 +25,14 @@ if ($w == "")
}
else if ($w == "u")
{
$sql = " update $g4[yc4_faq_table]
$sql = " update $g4[shop_faq_table]
set $sql_common
where fa_id = '$fa_id' ";
sql_query($sql);
}
else if ($w == "d")
{
$sql = " delete from $g4[yc4_faq_table] where fa_id = '$fa_id' ";
$sql = " delete from $g4[shop_faq_table] where fa_id = '$fa_id' ";
sql_query($sql);
}

View File

@ -7,10 +7,10 @@ auth_check($auth[$sub_menu], "r");
$g4[title] = "FAQ 상세관리 : $fm[fm_subject]";
include_once(G4_ADMIN_PATH."/admin.head.php");
$sql = " select * from $g4[yc4_faq_master_table] where fm_id = '$fm_id' ";
$sql = " select * from $g4[shop_faq_master_table] where fm_id = '$fm_id' ";
$fm = sql_fetch($sql);
$sql_common = " from $g4[yc4_faq_table] where fm_id = '$fm_id' ";
$sql_common = " from $g4[shop_faq_table] where fm_id = '$fm_id' ";
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
@ -49,7 +49,7 @@ $result = sql_query($sql);
<?
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$row1 = sql_fetch(" select COUNT(*) as cnt from $g4[yc4_faq_table] where fm_id = '$row[fm_id]' ");
$row1 = sql_fetch(" select COUNT(*) as cnt from $g4[shop_faq_table] where fm_id = '$row[fm_id]' ");
$cnt = $row1[cnt];
$s_mod = icon("수정", "./faqform.php?w=u&fm_id=$row[fm_id]&fa_id=$row[fa_id]");

View File

@ -11,7 +11,7 @@ if ($w == "u")
$html_title .= " 수정";
$readonly = " readonly";
$sql = " select * from $g4[yc4_faq_master_table] where fm_id = '$fm_id' ";
$sql = " select * from $g4[shop_faq_master_table] where fm_id = '$fm_id' ";
$fm = sql_fetch($sql);
if (!$fm[fm_id]) alert("등록된 자료가 없습니다.");
}

View File

@ -22,17 +22,17 @@ $sql_common = " set fm_subject = '$fm_subject',
if ($w == "")
{
$sql = " alter table $g4[yc4_faq_master_table] auto_increment=1 ";
$sql = " alter table $g4[shop_faq_master_table] auto_increment=1 ";
sql_query($sql);
$sql = " insert $g4[yc4_faq_master_table] $sql_common ";
$sql = " insert $g4[shop_faq_master_table] $sql_common ";
sql_query($sql);
$fm_id = mysql_insert_id();
}
else if ($w == "u")
{
$sql = " update $g4[yc4_faq_master_table] $sql_common where fm_id = '$fm_id' ";
$sql = " update $g4[shop_faq_master_table] $sql_common where fm_id = '$fm_id' ";
sql_query($sql);
}
else if ($w == "d")
@ -41,11 +41,11 @@ else if ($w == "d")
@unlink("$g4[path]/data/faq/{$fm_id}_t");
// FAQ삭제
$sql = " delete from $g4[yc4_faq_master_table] where fm_id = '$fm_id' ";
$sql = " delete from $g4[shop_faq_master_table] where fm_id = '$fm_id' ";
sql_query($sql);
// FAQ상세삭제
$sql = " delete from $g4[yc4_faq_table] where fm_id = '$fm_id' ";
$sql = " delete from $g4[shop_faq_table] where fm_id = '$fm_id' ";
sql_query($sql);
}

View File

@ -7,7 +7,7 @@ auth_check($auth[$sub_menu], "r");
$g4[title] = "FAQ관리";
include_once(G4_ADMIN_PATH."/admin.head.php");
$sql_common = " from $g4[yc4_faq_master_table] ";
$sql_common = " from $g4[shop_faq_master_table] ";
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
@ -50,7 +50,7 @@ $result = sql_query($sql);
<?
for ($i=0; $row=mysql_fetch_array($result); $i++)
{
$sql1 = " select COUNT(*) as cnt from $g4[yc4_faq_table] where fm_id = '$row[fm_id]' ";
$sql1 = " select COUNT(*) as cnt from $g4[shop_faq_table] where fm_id = '$row[fm_id]' ";
$row1 = sql_fetch($sql1);
$cnt = $row1[cnt];

View File

@ -32,8 +32,8 @@ include_once (G4_ADMIN_PATH.'/admin.head.php');
// 미수금이 없고 운송장번호가 없는 자료를 구함
$sql = " select b.od_id,
b.*, "._MISU_QUERY_."
from {$g4['yc4_cart_table']} a
left join {$g4['yc4_order_table']} b on (a.uq_id=b.od_id)
from {$g4['shop_cart_table']} a
left join {$g4['shop_order_table']} b on (a.uq_id=b.od_id)
group by b.od_id
/*having misu <= 0 and b.od_invoice = '' and ordercancel = 0*/
/*having orderamount - receiptamount = 0 and b.od_invoice = ''*/
@ -96,8 +96,8 @@ include_once (G4_ADMIN_PATH.'/admin.head.php');
// 미수금이 있고 송장번호가 없는 자료를 구함
$sql = " select b.od_id,
b.*, "._MISU_QUERY_."
from {$g4['yc4_cart_table']} a
left join {$g4['yc4_order_table']} b on (a.uq_id=b.od_id)
from {$g4['shop_cart_table']} a
left join {$g4['shop_order_table']} b on (a.uq_id=b.od_id)
group by b.od_id
/* having receiptamount <= 0 */
having misu > 0
@ -159,7 +159,7 @@ include_once (G4_ADMIN_PATH.'/admin.head.php');
</tr>
<?
$sql = " select * from {$g4['yc4_item_ps_table']}
$sql = " select * from {$g4['shop_item_ps_table']}
where is_confirm = 0
order by is_id desc
limit $max_limit ";
@ -204,7 +204,7 @@ include_once (G4_ADMIN_PATH.'/admin.head.php');
</tr>
<?
$sql = " select * from {$g4['yc4_item_qa_table']}
$sql = " select * from {$g4['shop_item_qa_table']}
where iq_answer = ''
order by iq_id desc
limit $max_limit ";

View File

@ -33,7 +33,7 @@ include_once(G4_ADMIN_PATH."/admin.head.php");
<select id="dl_id" name="dl_id">
<option value=''>배송회사를 선택하세요.
<?
$sql = "select * from $g4[yc4_delivery_table] order by dl_order desc, dl_id desc ";
$sql = "select * from $g4[shop_delivery_table] order by dl_order desc, dl_id desc ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
echo "<option value='$row[dl_id]'>$row[dl_company]\n";

View File

@ -23,7 +23,7 @@ while (($item = fgetcsv($handle, 1000, ",")) !== FALSE)
if ($od_id && $od_invoice)
{
$sql = " select od_id, on_uid, dl_id, od_invoice from $g4[yc4_order_table] where od_id = '$od_id' ";
$sql = " select od_id, on_uid, dl_id, od_invoice from $g4[shop_order_table] where od_id = '$od_id' ";
$row = sql_fetch($sql);
//echo $sql; echo "<br/>";
//print_r2($row);
@ -33,7 +33,7 @@ while (($item = fgetcsv($handle, 1000, ",")) !== FALSE)
if ($row[dl_id] && $row[od_invoice] && !$re)
continue;
$sql = " update $g4[yc4_order_table]
$sql = " update $g4[shop_order_table]
set od_invoice = '$od_invoice',
od_invoice_time = '$od_invoice_time',
dl_id = '$_POST[dl_id]'
@ -42,7 +42,7 @@ while (($item = fgetcsv($handle, 1000, ",")) !== FALSE)
if ($ct_status)
{
$sql = " update $g4[yc4_cart_table]
$sql = " update $g4[shop_cart_table]
set ct_status = '$ct_status'
where on_uid = '$row[on_uid]'
and ct_status in ('주문', '준비', '배송', '완료') ";

View File

@ -10,17 +10,17 @@ if ($is_admin != "super")
if (!trim($it_id))
alert("복사할 상품코드가 없습니다.");
$row = sql_fetch(" select count(*) as cnt from $g4[yc4_item_table] where it_id = '$new_it_id' ");
$row = sql_fetch(" select count(*) as cnt from $g4[shop_item_table] where it_id = '$new_it_id' ");
if ($row[cnt])
alert('이미 존재하는 상품코드 입니다.');
$sql = " select * from $g4[yc4_item_table] where it_id = '$it_id' limit 1 ";
$sql = " select * from $g4[shop_item_table] where it_id = '$it_id' limit 1 ";
$cp = sql_fetch($sql);
// 상품테이블의 필드가 추가되어도 수정하지 않도록 필드명을 추출하여 insert 퀴리를 생성한다. (상품코드만 새로운것으로 대체)
$sql_common = "";
$fields = mysql_list_fields(G4_MYSQL_DB, $g4[yc4_item_table]);
$fields = mysql_list_fields(G4_MYSQL_DB, $g4[shop_item_table]);
$columns = mysql_num_fields($fields);
for ($i = 0; $i < $columns; $i++) {
$fld = mysql_field_name($fields, $i);
@ -29,24 +29,24 @@ for ($i = 0; $i < $columns; $i++) {
}
}
$sql = " insert $g4[yc4_item_table]
$sql = " insert $g4[shop_item_table]
set it_id = '$new_it_id'
$sql_common ";
sql_query($sql);
// 선택옵션정보 copy
$opt_sql = " insert ignore into {$g4['yc4_option_table']} ( opt_id, it_id, opt_amount, opt_qty, opt_notice, opt_use )
$opt_sql = " insert ignore into {$g4['shop_option_table']} ( opt_id, it_id, opt_amount, opt_qty, opt_notice, opt_use )
select opt_id, '$new_it_id', opt_amount, opt_qty, opt_notice, opt_use
from {$g4['yc4_option_table']}
from {$g4['shop_option_table']}
where it_id = '$it_id'
order by opt_no asc ";
sql_query($opt_sql);
/*
$opt_sql = " select * from `{$g4['yc4_option_table']}` where it_id = '$it_id' order by opt_no asc ";
$opt_sql = " select * from `{$g4['shop_option_table']}` where it_id = '$it_id' order by opt_no asc ";
$opt_result = sql_query($opt_sql);
for($j = 0; $opt_row = sql_fetch_array($opt_result); $j++) {
$new_opt_id = str_replace($it_id.'-', $new_it_id.'-', $opt_row['opt_id']);
$ins_sql = " insert into `{$g4['yc4_option_table']}`
$ins_sql = " insert into `{$g4['shop_option_table']}`
set opt_id = '$new_opt_id',
it_id = '$new_it_id',
opt_amount = '{$opt_row['opt_amount']}',
@ -58,18 +58,18 @@ for($j = 0; $opt_row = sql_fetch_array($opt_result); $j++) {
*/
// 추가옵션정보 copy
$sp_sql = " insert ignore into {$g4['yc4_supplement_table']} ( sp_id, it_id, sp_amount, sp_qty, sp_notice, sp_use )
$sp_sql = " insert ignore into {$g4['shop_supplement_table']} ( sp_id, it_id, sp_amount, sp_qty, sp_notice, sp_use )
select sp_id, '$new_it_id', sp_amount, sp_qty, sp_notice, sp_use
from {$g4['yc4_supplement_table']}
from {$g4['shop_supplement_table']}
where it_id = '$it_id'
order by sp_no asc ";
sql_query($sp_sql);
/*
$sp_sql = " select * from `{$g4['yc4_supplement_table']}` where it_id = '$it_id' order by sp_no asc ";
$sp_sql = " select * from `{$g4['shop_supplement_table']}` where it_id = '$it_id' order by sp_no asc ";
$sp_result = sql_query($sp_sql);
for($j = 0; $sp_row = sql_fetch_array($sp_result); $j++) {
$new_sp_id = str_replace($it_id.'-', $new_it_id.'-', $sp_row['sp_id']);
$ins_sql = " insert into `{$g4['yc4_supplement_table']}`
$ins_sql = " insert into `{$g4['shop_supplement_table']}`
set sp_id = '$new_sp_id',
it_id = '$new_it_id',
sp_amount = '{$sp_row['sp_amount']}',
@ -81,15 +81,15 @@ for($j = 0; $sp_row = sql_fetch_array($sp_result); $j++) {
*/
// 상품요약정보 copy
$ii_sql = " insert ignore into {$g4['yc4_item_info_table']} ( it_id, ii_gubun, ii_article, ii_title, ii_value )
$ii_sql = " insert ignore into {$g4['shop_item_info_table']} ( it_id, ii_gubun, ii_article, ii_title, ii_value )
select '$new_it_id', ii_gubun, ii_article, ii_title, ii_value
from {$g4['yc4_item_info_table']}
from {$g4['shop_item_info_table']}
where it_id = '$it_id'
order by ii_id asc ";
sql_query($ii_sql);
// html 에디터로 첨부된 이미지 파일 복사
$sql = " select it_explan from {$g4['yc4_item_table']} where it_id = '$it_id' ";
$sql = " select it_explan from {$g4['shop_item_table']} where it_id = '$it_id' ";
$it = sql_fetch($sql);
if($it['it_explan']) {
@ -111,7 +111,7 @@ if($it['it_explan']) {
}
}
$sql = " update {$g4['yc4_item_table']} set it_explan = '{$it['it_explan']}' where it_id = '$new_it_id' ";
$sql = " update {$g4['shop_item_table']} set it_explan = '{$it['it_explan']}' where it_id = '$new_it_id' ";
sql_query($sql);
}

View File

@ -3,15 +3,15 @@ include_once('./_common.php');
// 상품요약정보중 it_id 가 존재하지 않는 것을 삭제
$sql = " select distinct it_id
from {$g4['yc4_item_info_table']}
from {$g4['shop_item_info_table']}
order by ii_id ";
$result = sql_query($sql);
for($i=0; $row=sql_fetch_array($result); $i++) {
$sql1 = "select it_id from {$g4['yc4_item_table']} where it_id = '{$row['it_id']}' ";
$sql1 = "select it_id from {$g4['shop_item_table']} where it_id = '{$row['it_id']}' ";
$row1 = sql_fetch($sql1);
if(!$row1['it_id']) {
@sql_query(" delete from {$g4['yc4_item_info_table']} where it_id = '{$row['it_id']}' ");
@sql_query(" delete from {$g4['shop_item_info_table']} where it_id = '{$row['it_id']}' ");
}
}

View File

@ -4,33 +4,33 @@ include_once('./_common.php');
// 선택/추가 옵션 테이블에서 상품정보가 없는 정보 삭제
$sql = " select distinct it_id
from {$g4['yc4_option_table']}
from {$g4['shop_option_table']}
order by opt_id ";
$result = sql_query($sql);
for($i=0; $row=sql_fetch_array($result); $i++) {
// 상품정보 체크
$sql1 = " select it_id from {$g4['yc4_item_table']} where it_id = '{$row['it_id']}' ";
$sql1 = " select it_id from {$g4['shop_item_table']} where it_id = '{$row['it_id']}' ";
$row1 = sql_fetch($sql1);
if(!$row1['it_id']) {
@sql_query(" delete from {$g4['yc4_option_table']} where it_id = '{$row['it_id']}' ");
@sql_query(" delete from {$g4['shop_option_table']} where it_id = '{$row['it_id']}' ");
}
}
$sql = " select distinct it_id
from {$g4['yc4_supplement_table']}
from {$g4['shop_supplement_table']}
order by sp_id ";
$result = sql_query($sql);
for($i=0; $row=sql_fetch_array($result); $i++) {
// 상품정보 체크
$sql1 = " select it_id from {$g4['yc4_item_table']} where it_id = '{$row['it_id']}' ";
$sql1 = " select it_id from {$g4['shop_item_table']} where it_id = '{$row['it_id']}' ";
$row1 = sql_fetch($sql1);
if(!$row1['it_id']) {
@sql_query(" delete from {$g4['yc4_supplement_table']} where it_id = '{$row['it_id']}' ");
@sql_query(" delete from {$g4['shop_supplement_table']} where it_id = '{$row['it_id']}' ");
}
}
?>

View File

@ -3,7 +3,7 @@ include_once('./_common.php');
// 선택옵션별 재고체크
$sql = " select a.it_id, a.opt_id, a.opt_qty, b.it_name
from {$g4['yc4_option_table']} a left join {$g4['yc4_item_table']} b on ( a.it_id = b.it_id )
from {$g4['shop_option_table']} a left join {$g4['shop_item_table']} b on ( a.it_id = b.it_id )
where a.opt_qty < a.opt_notice
and a.opt_use = '1'
order by a.opt_qty asc ";
@ -15,7 +15,7 @@ for($i=0; $row=sql_fetch_array($result); $i++) {
// 추가옵션별 재고체크
$sql = " select a.it_id, a.sp_id, a.sp_qty, b.it_name
from {$g4['yc4_supplement_table']} a left join {$g4['yc4_item_table']} b on ( a.it_id = b.it_id )
from {$g4['shop_supplement_table']} a left join {$g4['shop_item_table']} b on ( a.it_id = b.it_id )
where a.sp_qty < a.sp_notice
and a.sp_use = '1'
order by a.sp_qty asc ";

View File

@ -7,7 +7,7 @@ auth_check($auth[$sub_menu], "r");
$g4[title] = "이벤트관리";
include_once(G4_ADMIN_PATH."/admin.head.php");
$sql_common = " from $g4[yc4_event_table] ";
$sql_common = " from $g4[shop_event_table] ";
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
@ -50,7 +50,7 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
$s_vie = icon("보기", "$g4[shop_path]/event.php?ev_id=$row[ev_id]");
$href = "";
$sql = " select count(ev_id) as cnt from $g4[yc4_event_item_table] where ev_id = '$row[ev_id]' ";
$sql = " select count(ev_id) as cnt from $g4[shop_event_item_table] where ev_id = '$row[ev_id]' ";
$ev = sql_fetch($sql);
if ($ev[cnt]) {
$href = "<a href='javascript:;' onclick='itemeventwin($row[ev_id]);'>";

View File

@ -12,7 +12,7 @@ if ($w == "u")
$html_title .= " 수정";
$readonly = " readonly";
$sql = " select * from $g4[yc4_event_table] where ev_id = '$ev_id' ";
$sql = " select * from $g4[shop_event_table] where ev_id = '$ev_id' ";
$ev = sql_fetch($sql);
if (!$ev[ev_id])
alert("등록된 자료가 없습니다.");

View File

@ -32,14 +32,14 @@ if ($w == "")
{
$ev_id = $g4[server_time];
$sql = " insert $g4[yc4_event_table]
$sql = " insert $g4[shop_event_table]
$sql_common
, ev_id = '$ev_id' ";
sql_query($sql);
}
else if ($w == "u")
{
$sql = " update $g4[yc4_event_table]
$sql = " update $g4[shop_event_table]
$sql_common
where ev_id = '$ev_id' ";
sql_query($sql);
@ -50,7 +50,7 @@ else if ($w == "d")
@unlink("$g4[path]/data/event/{$ev_id}_h");
@unlink("$g4[path]/data/event/{$ev_id}_t");
$sql = " delete from $g4[yc4_event_table] where ev_id = '$ev_id' ";
$sql = " delete from $g4[shop_event_table] where ev_id = '$ev_id' ";
sql_query($sql);
}

View File

@ -25,8 +25,8 @@ if ($sel_field == "") {
$sel_field = "it_name";
}
$sql_common = " from $g4[yc4_item_table] a
left join $g4[yc4_event_item_table] b on (a.it_id=b.it_id and b.ev_id='$ev_id') ";
$sql_common = " from $g4[shop_item_table] a
left join $g4[shop_event_item_table] b on (a.it_id=b.it_id and b.ev_id='$ev_id') ";
$sql_common .= $sql_search;
// 테이블의 전체 레코드수만 얻음
@ -67,7 +67,7 @@ $qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page";
<?
// 이벤트 옵션처리
$event_option = "<option value=''>이벤트를 선택하세요";
$sql1 = " select ev_id, ev_subject from $g4[yc4_event_table] order by ev_id desc ";
$sql1 = " select ev_id, ev_subject from $g4[shop_event_table] order by ev_id desc ";
$result1 = sql_query($sql1);
while ($row1=mysql_fetch_array($result1))
$event_option .= "<option value='$row1[ev_id]'>".conv_subject($row1[ev_subject], 20,"…");
@ -81,7 +81,7 @@ $qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page";
<select id="sel_ca_id" name="sel_ca_id">
<option value=''>전체분류
<?
$sql1 = " select ca_id, ca_name from $g4[yc4_category_table] order by ca_id ";
$sql1 = " select ca_id, ca_name from $g4[shop_category_table] order by ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=mysql_fetch_array($result1); $i++)
{
@ -134,7 +134,7 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
{
$href = "{$g4[shop_path]}/item.php?it_id=$row[it_id]";
$sql = " select ev_id from $g4[yc4_event_item_table]
$sql = " select ev_id from $g4[shop_event_item_table]
where it_id = '$row[it_id]'
and ev_id = '$ev_id' ";
$ev = sql_fetch($sql);

View File

@ -8,14 +8,14 @@ auth_check($auth[$sub_menu], "w");
for ($i=0; $i<count($_POST[it_id]); $i++)
{
$sql = " delete from $g4[yc4_event_item_table]
$sql = " delete from $g4[shop_event_item_table]
where ev_id = '$ev_id'
and it_id = '{$_POST[it_id][$i]}' ";
sql_query($sql);
if ($_POST[ev_chk][$i])
{
$sql = "insert into $g4[yc4_event_item_table]
$sql = "insert into $g4[shop_event_item_table]
set ev_id = '$ev_id',
it_id = '{$_POST[it_id][$i]}' ";
sql_query($sql);

View File

@ -4,7 +4,7 @@ include_once("./_common.php");
auth_check($auth[$sub_menu], "r");
$sql = " select ev_subject from $g4[yc4_event_table] where ev_id = '$ev_id' ";
$sql = " select ev_subject from $g4[shop_event_table] where ev_id = '$ev_id' ";
$ev = sql_fetch($sql);
$g4[title] = "[$ev[ev_subject]] 이벤트상품";
@ -27,8 +27,8 @@ include_once("$g4[path]/head.sub.php");
<tr><td colspan=20 height=3 bgcolor=#F8F8F8></td></tr>
<?
$sql = " select b.it_id, b.it_name, b.it_use from $g4[yc4_event_item_table] a
left join $g4[yc4_item_table] b on (a.it_id="b".it_id)
$sql = " select b.it_id, b.it_name, b.it_use from $g4[shop_event_item_table] a
left join $g4[shop_item_table] b on (a.it_id="b".it_id)
where a.ev_id = '$ev_id'
order by b.it_id desc ";
$result = sql_query($sql);

View File

@ -6,7 +6,7 @@ check_demo();
auth_check($auth[$sub_menu], "d");
$sql = " delete from $g4[yc4_event_item_table] where ev_id = '$ev_id' and it_id = '$it_id' ";
$sql = " delete from $g4[shop_event_item_table] where ev_id = '$ev_id' and it_id = '$it_id' ";
sql_query($sql);
goto_url("./itemeventwin.php?ev_id=$ev_id");

View File

@ -19,7 +19,7 @@ if ($w == "")
$it['ca_id3'] = get_cookie("ck_ca_id3");
if (!$it['ca_id'])
{
$sql = " select ca_id from {$g4['yc4_category_table']} order by ca_id limit 1 ";
$sql = " select ca_id from {$g4['shop_category_table']} order by ca_id limit 1 ";
$row = sql_fetch($sql);
if (!$row['ca_id'])
alert("등록된 분류가 없습니다. 우선 분류를 등록하여 주십시오.");
@ -41,7 +41,7 @@ else if ($w == "u")
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]' ";
@ -50,13 +50,13 @@ else if ($w == "u")
alert("\'{$member[mb_id]}\' 님께서 수정 할 권한이 없는 상품입니다.");
}
$sql = " select * from $g4[yc4_item_table] where it_id = '$it_id' ";
$sql = " select * from $g4[shop_item_table] where it_id = '$it_id' ";
$it = sql_fetch($sql);
if (!$ca_id)
$ca_id = $it[ca_id];
$sql = " select * from $g4[yc4_category_table] where ca_id = '$ca_id' ";
$sql = " select * from $g4[shop_category_table] where ca_id = '$ca_id' ";
$ca = sql_fetch($sql);
}
else
@ -112,7 +112,7 @@ ul { margin: 0; padding: 0; list-style: none; }
<option value="">= 기본분류 =
<?
$script = "";
$sql = " select * from $g4[yc4_category_table] ";
$sql = " select * from $g4[shop_category_table] ";
if ($is_admin != 'super')
$sql .= " where ca_mb_id = '$member[mb_id]' ";
$sql .= " order by ca_id ";
@ -307,7 +307,7 @@ ul { margin: 0; padding: 0; list-style: none; }
</tr>
<?
if ($it['it_id']) {
$sql = " select distinct ii_gubun from {$g4['yc4_item_info_table']} where it_id = '$it_id' group by ii_gubun ";
$sql = " select distinct ii_gubun from {$g4['shop_item_info_table']} where it_id = '$it_id' group by ii_gubun ";
$ii = sql_fetch($sql, false);
if ($ii) {
$item_info_gubun = item_info_gubun($ii['ii_gubun']);
@ -460,14 +460,14 @@ if ($it['it_id']) {
<?
$str = array();
$sql = " select b.ca_id, b.it_id, b.it_name, b.it_amount, b.it_img1, b.it_img2, b.it_img3, b.it_img4, b.it_img5, b.it_img6, b.it_img7, b.it_img8, b.it_img9, b.it_img10
from {$g4['yc4_item_relation_table']} a
left join {$g4['yc4_item_table']} b on (a.it_id2 = b.it_id)
from {$g4['shop_item_relation_table']} a
left join {$g4['shop_item_table']} b on (a.it_id2 = b.it_id)
where a.it_id = '$it_id'
order by b.ca_id, b.it_name ";
$result = sql_query($sql);
while($row=sql_fetch_array($result))
{
$sql2 = " select ca_name from {$g4['yc4_category_table']} where ca_id = '{$row['ca_id']}' ";
$sql2 = " select ca_name from {$g4['shop_category_table']} where ca_id = '{$row['ca_id']}' ";
$row2 = sql_fetch($sql2);
// 상품이미지썸네일
@ -499,7 +499,7 @@ if ($it['it_id']) {
<option value=''>분류별 관련상품
<option value=''>----------------------
<?
$sql = " select ca_id, ca_name from {$g4['yc4_category_table']} where length(ca_id) = 2 order by ca_id ";
$sql = " select ca_id, ca_name from {$g4['shop_category_table']} where length(ca_id) = 2 order by ca_id ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
echo "<option value='$row[ca_id]'>$row[ca_name]\n";
@ -623,8 +623,8 @@ if ($it['it_id']) {
$str = "";
$comma = "";
$sql = " select b.ev_id, b.ev_subject
from $g4[yc4_event_item_table] a
left join $g4[yc4_event_table] b on (a.ev_id=b.ev_id)
from $g4[shop_event_item_table] a
left join $g4[shop_event_table] b on (a.ev_id=b.ev_id)
where a.it_id = '$it_id'
order by b.ev_id desc ";
$result = sql_query($sql);
@ -642,7 +642,7 @@ if ($it['it_id']) {
이벤트 선택후 <FONT COLOR="#0E87F9">더블클릭하면 왼쪽에 추가됨</FONT><br>
<select size=6 style='width:250px; background-color:#F6F6F6;' ondblclick="event_add(this);">
<?
$sql = " select ev_id, ev_subject from $g4[yc4_event_table] order by ev_id desc ";
$sql = " select ev_id, ev_subject from $g4[shop_event_table] order by ev_id desc ";
$result = sql_query($sql);
while ($row=sql_fetch_array($result)) {
echo "<option value='$row[ev_id]'>".get_text($row[ev_subject]);

View File

@ -4,7 +4,7 @@ include_once("./_common.php");
include_once(G4_LIB_PATH.'/thumbnail.lib.php');
$sql = " select ca_id, it_id, it_name, it_amount, 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 ca_id like '$ca_id%'
and it_id <> '$it_id'
order by ca_id, it_name ";
@ -14,12 +14,12 @@ $num = @mysql_num_rows($result);
$options = "";
for($i=0;$row=sql_fetch_array($result);$i++) {
// 관련상품으로 등록된 상품은 제외
$sql2 = " select count(*) as cnt from {$g4['yc4_item_relation_table']} where it_id = '$it_id' and it_id2 = '{$row['it_id']}' ";
$sql2 = " select count(*) as cnt from {$g4['shop_item_relation_table']} where it_id = '$it_id' and it_id2 = '{$row['it_id']}' ";
$row2 = sql_fetch($sql2);
if ($row2['cnt'])
continue;
$sql2 = " select ca_name from {$g4['yc4_category_table']} where ca_id = '{$row['ca_id']}' ";
$sql2 = " select ca_name from {$g4['shop_category_table']} where ca_id = '{$row['ca_id']}' ";
$row2 = sql_fetch($sql2);
$ca_name = addslashes($row2['ca_name']);

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);

View File

@ -7,7 +7,7 @@ $it_id = trim($_GET['it_id']);
if ($_GET['gubun']) {
$gubun = $_GET['gubun'];
} else {
$sql = " select ii_gubun from {$g4['yc4_item_info_table']} where it_id = '$it_id' group by ii_gubun ";
$sql = " select ii_gubun from {$g4['shop_item_info_table']} where it_id = '$it_id' group by ii_gubun ";
$row = sql_fetch($sql);
$gubun = $row['ii_gubun'] ? $row['ii_gubun'] : "wear";
}
@ -57,7 +57,7 @@ if ($article) {
$el_title = $value[0];
$el_example = $value[1];
$sql = " select ii_value from {$g4['yc4_item_info_table']} where it_id = '$it_id' and ii_gubun = '$gubun' and ii_article = '$key' ";
$sql = " select ii_value from {$g4['shop_item_info_table']} where it_id = '$it_id' and ii_gubun = '$gubun' and ii_article = '$key' ";
$row = sql_fetch($sql);
if ($row['ii_value']) $el_value = $row['ii_value'];

View File

@ -3,7 +3,7 @@ include_once("./_common.php");
include_once(G4_LIB_PATH.'/iteminfo.lib.php');
// 기존의 상품요약정보를 삭제하고 다시 만든다.
sql_query(" delete from {$g4['yc4_item_info_table']} where it_id = '{$_POST['it_id']}' ");
sql_query(" delete from {$g4['shop_item_info_table']} where it_id = '{$_POST['it_id']}' ");
$gubun = "";
foreach ($_POST as $key=>$value) {
@ -13,7 +13,7 @@ foreach ($_POST as $key=>$value) {
continue;
}
$sql = " insert {$g4['yc4_item_info_table']}
$sql = " insert {$g4['shop_item_info_table']}
set it_id = '{$_POST['it_id']}',
ii_gubun = '$gubun',
ii_article = '$key',

View File

@ -10,7 +10,7 @@ include_once (G4_ADMIN_PATH.'/admin.head.php');
// 분류
$ca_list = "";
$sql = " select * from $g4[yc4_category_table] ";
$sql = " select * from $g4[shop_category_table] ";
if ($is_admin != 'super')
$sql .= " where ca_mb_id = '$member[mb_id]' ";
$sql .= " order by ca_id ";
@ -44,8 +44,8 @@ if ($sca != "") {
if ($sfl == "") $sfl = "it_name";
$sql_common = " from $g4[yc4_item_table] a ,
$g4[yc4_category_table] b
$sql_common = " from $g4[shop_item_table] a ,
$g4[shop_category_table] b
where (a.ca_id = b.ca_id";
if ($is_admin != 'super')
$sql_common .= " and b.ca_mb_id = '$member[mb_id]'";
@ -88,7 +88,7 @@ $qstr = "$qstr&sca=$sca&page=$page&save_stx=$stx";
<select id="sca" name="sca">
<option value=''>전체분류
<?
$sql1 = " select ca_id, ca_name from $g4[yc4_category_table] order by ca_id ";
$sql1 = " select ca_id, ca_name from $g4[shop_category_table] order by ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=sql_fetch_array($result1); $i++)
{

View File

@ -9,7 +9,7 @@ auth_check($auth[$sub_menu], "w");
// 판매가격 일괄수정
for ($i=0; $i<count($_POST[it_id]); $i++)
{
$sql = "update $g4[yc4_item_table]
$sql = "update $g4[shop_item_table]
set ca_id = '{$_POST[ca_id][$i]}',
it_name = '{$_POST[it_name][$i]}',
it_cust_amount = '{$_POST[it_cust_amount][$i]}',

View File

@ -6,9 +6,9 @@ include_once("./_common.php");
auth_check($auth[$sub_menu], "w");
$sql = " select *
from $g4[yc4_item_ps_table] a
from $g4[shop_item_ps_table] a
left join $g4[member_table] b on (a.mb_id = b.mb_id)
left join $g4[yc4_item_table] c on (a.it_id = c.it_id)
left join $g4[shop_item_table] c on (a.it_id = c.it_id)
where is_id = '$is_id' ";
$is = sql_fetch($sql);
if (!$is[is_id])

View File

@ -9,7 +9,7 @@ if ($w == 'd')
else
auth_check($auth[$sub_menu], "w");
$iv = sql_fetch(" select * from $g4[yc4_item_ps_table] where is_id = '$is_id' ");
$iv = sql_fetch(" select * from $g4[shop_item_ps_table] where is_id = '$is_id' ");
if (!$iv[is_id])
alert("등록된 자료가 없습니다.");
@ -17,7 +17,7 @@ $qstr = "page=$page&sort1=$sort1&sort2=$sort2";
if ($w == "u")
{
$sql = "update $g4[yc4_item_ps_table]
$sql = "update $g4[shop_item_ps_table]
set is_subject = '$is_subject',
is_content = '$is_content',
is_confirm = '$is_confirm'
@ -28,7 +28,7 @@ if ($w == "u")
}
else if ($w == "d")
{
$sql = "delete from $g4[yc4_item_ps_table] where is_id = '$is_id' ";
$sql = "delete from $g4[shop_item_ps_table] where is_id = '$is_id' ";
sql_query($sql);
goto_url("./itempslist.php?$qstr");

View File

@ -28,8 +28,8 @@ if (!$sst) {
$sod = "desc";
}
$sql_common = " from $g4[yc4_item_ps_table] a
left join $g4[yc4_item_table] b on (a.it_id = b.it_id)
$sql_common = " from $g4[shop_item_ps_table] a
left join $g4[shop_item_table] b on (a.it_id = b.it_id)
left join $g4[member_table] c on (a.mb_id = c.mb_id) ";
$sql_common .= $sql_search;
@ -62,7 +62,7 @@ $qstr = "$qstr&sca=$sca&save_stx=$stx";
<select id="sca" name="sca">
<option value=''>전체분류
<?
$sql1 = " select ca_id, ca_name from $g4[yc4_category_table] order by ca_id ";
$sql1 = " select ca_id, ca_name from $g4[shop_category_table] order by ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=mysql_fetch_array($result1); $i++) {
$len = strlen($row1[ca_id]) / 2 - 1;

View File

@ -5,7 +5,7 @@ include_once("./_common.php");
auth_check($auth[$sub_menu], "w");
$sql = " select *
from $g4[yc4_item_qa_table] a
from $g4[shop_item_qa_table] a
left join $g4[member_table] b on (a.mb_id = b.mb_id)
where iq_id = '$iq_id' ";
$iq = sql_fetch($sql);

View File

@ -9,7 +9,7 @@ if ($w == 'd')
else
auth_check($auth[$sub_menu], "w");
$iq = sql_fetch(" select * from $g4[yc4_item_qa_table] where iq_id = '$iq_id' ");
$iq = sql_fetch(" select * from $g4[shop_item_qa_table] where iq_id = '$iq_id' ");
if (!$iq[iq_id]) {
alert("등록된 자료가 없습니다.");
}
@ -17,7 +17,7 @@ if (!$iq[iq_id]) {
$qstr = "page=$page&sort1=$sort1&sort2=$sort2";
if ($w == "u") {
$sql = "update $g4[yc4_item_qa_table]
$sql = "update $g4[shop_item_qa_table]
set iq_subject = '$iq_subject',
iq_question = '$iq_question',
iq_answer = '$iq_answer'
@ -26,7 +26,7 @@ if ($w == "u") {
goto_url("./itemqaform.php?w=$w&iq_id=$iq_id&$qstr");
} else if ($w == "d") {
$sql = "delete from $g4[yc4_item_qa_table] where iq_id = '$iq_id' ";
$sql = "delete from $g4[shop_item_qa_table] where iq_id = '$iq_id' ";
sql_query($sql);
goto_url("./itemqalist.php?$qstr");

View File

@ -28,8 +28,8 @@ if (!$sst) {
$sod = "desc";
}
$sql_common = " from $g4[yc4_item_qa_table] a
left join $g4[yc4_item_table] b on (a.it_id = b.it_id)
$sql_common = " from $g4[shop_item_qa_table] a
left join $g4[shop_item_table] b on (a.it_id = b.it_id)
left join $g4[member_table] c on (a.mb_id = c.mb_id) ";
$sql_common .= $sql_search;
@ -62,7 +62,7 @@ $qstr = "$qstr&sca=$sca&save_stx=$stx";
<select id="sca" name="sca">
<option value=''>전체분류
<?
$sql1 = " select ca_id, ca_name from $g4[yc4_category_table] order by ca_id ";
$sql1 = " select ca_id, ca_name from $g4[shop_category_table] order by ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=mysql_fetch_array($result1); $i++) {
$len = strlen($row1[ca_id]) / 2 - 1;

View File

@ -24,7 +24,7 @@ $sql = " select a.it_id,
SUM(IF(ct_status = '반품',ct_qty, 0)) as ct_status_7,
SUM(IF(ct_status = '품절',ct_qty, 0)) as ct_status_8,
SUM(ct_qty) as ct_status_sum
from $g4[yc4_cart_table] a, $g4[yc4_item_table] b ";
from $g4[shop_cart_table] a, $g4[shop_item_table] b ";
$sql .= " where a.it_id = b.it_id ";
if ($fr_date && $to_date)
{
@ -67,7 +67,7 @@ $qstr1 = "$qstr&sort1=$sort1&sort2=$sort2&fr_date=$fr_date&to_date=$to_date&sel_
<select id="sel_ca_id" name="sel_ca_id">
<option value=''>전체분류
<?
$sql1 = " select ca_id, ca_name from $g4[yc4_category_table] order by ca_id ";
$sql1 = " select ca_id, ca_name from $g4[shop_category_table] order by ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=mysql_fetch_array($result1); $i++) {
$len = strlen($row1[ca_id]) / 2 - 1;

View File

@ -23,7 +23,7 @@ if ($sel_field == "") $sel_field = "it_name";
if ($sort1 == "") $sort1 = "it_id";
if ($sort2 == "") $sort2 = "desc";
$sql_common = " from $g4[yc4_item_table] ";
$sql_common = " from $g4[shop_item_table] ";
$sql_common .= $sql_search;
// 테이블의 전체 레코드수만 얻음
@ -71,7 +71,7 @@ $qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page";
<select id="sel_ca_id" name="sel_ca_id">
<option value=''>전체분류
<?
$sql1 = " select ca_id, ca_name from $g4[yc4_category_table] order by ca_id ";
$sql1 = " select ca_id, ca_name from $g4[shop_category_table] order by ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=mysql_fetch_array($result1); $i++) {
$len = strlen($row1[ca_id]) / 2 - 1;
@ -133,7 +133,7 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
$href = "{$g4[shop_path]}/item.php?it_id=$row[it_id]";
$sql1 = " select SUM(ct_qty) as sum_qty
from $g4[yc4_cart_table]
from $g4[shop_cart_table]
where it_id = '$row[it_id]'
and ct_stock_use = '0'
and ct_status in ('주문', '준비') ";

View File

@ -9,7 +9,7 @@ auth_check($auth[$sub_menu], "w");
// 재고 일괄수정
for ($i=0; $i<count($_POST[it_id]); $i++)
{
$sql = "update $g4[yc4_item_table]
$sql = "update $g4[shop_item_table]
set it_stock_qty = '{$_POST[it_stock_qty][$i]}',
it_use = '{$_POST[it_use][$i]}'
where it_id = '{$_POST[it_id][$i]}' ";

View File

@ -45,7 +45,7 @@ if (!$sst) {
}
$sql_order = "order by $sst $sod";
$sql_common = " from $g4[yc4_item_table] ";
$sql_common = " from $g4[shop_item_table] ";
$sql_common .= $sql_search;
// 테이블의 전체 레코드수만 얻음
@ -87,7 +87,7 @@ $qstr = "$qstr&sca=$sca&page=$page&save_stx=$stx";
<select id="sca" name="sca">
<option value=''>전체분류
<?
$sql1 = " select ca_id, ca_name from $g4[yc4_category_table] order by ca_id ";
$sql1 = " select ca_id, ca_name from $g4[shop_category_table] order by ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=sql_fetch_array($result1); $i++) {
$len = strlen($row1[ca_id]) / 2 - 1;

View File

@ -8,7 +8,7 @@ auth_check($auth[$sub_menu], "w");
for ($i=0; $i<count($_POST[it_id]); $i++)
{
$sql = "update $g4[yc4_item_table]
$sql = "update $g4[shop_item_table]
set it_type1 = '{$_POST[it_type1][$i]}',
it_type2 = '{$_POST[it_type2][$i]}',
it_type3 = '{$_POST[it_type3][$i]}',

View File

@ -9,7 +9,7 @@ $html_title = "새창";
if ($w == "u")
{
$html_title .= " 수정";
$sql = " select * from $g4[yc4_new_win_table] where nw_id = '$nw_id' ";
$sql = " select * from $g4[shop_new_win_table] where nw_id = '$nw_id' ";
$nw = sql_fetch($sql);
if (!$nw[nw_id]) alert("등록된 자료가 없습니다.");
}

View File

@ -23,22 +23,22 @@ $sql_common = " nw_begin_time = '$nw_begin_time',
if($w == "")
{
$sql = " alter table $g4[yc4_new_win_table] auto_increment=1 ";
$sql = " alter table $g4[shop_new_win_table] auto_increment=1 ";
sql_query($sql);
$sql = " insert $g4[yc4_new_win_table] set $sql_common ";
$sql = " insert $g4[shop_new_win_table] set $sql_common ";
sql_query($sql);
$nw_id = mysql_insert_id();
}
else if ($w == "u")
{
$sql = " update $g4[yc4_new_win_table] set $sql_common where nw_id = '$nw_id' ";
$sql = " update $g4[shop_new_win_table] set $sql_common where nw_id = '$nw_id' ";
sql_query($sql);
}
else if ($w == "d")
{
$sql = " delete from $g4[yc4_new_win_table] where nw_id = '$nw_id' ";
$sql = " delete from $g4[shop_new_win_table] where nw_id = '$nw_id' ";
sql_query($sql);
}

View File

@ -7,7 +7,7 @@ auth_check($auth[$sub_menu], "r");
$g4[title] = "새창관리";
include_once(G4_ADMIN_PATH."/admin.head.php");
$sql_common = " from $g4[yc4_new_win_table] ";
$sql_common = " from $g4[shop_new_win_table] ";
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;

View File

@ -15,7 +15,7 @@ if($makemode) {
} else {
$list = array();
$sql = " select opt_id, opt_amount, opt_qty, opt_notice, opt_use
from `{$g4['yc4_option_table']}`
from `{$g4['shop_option_table']}`
where it_id = '$it_id'
order by opt_no asc ";
$result = sql_query($sql);

View File

@ -4,6 +4,6 @@ include_once('./_common.php');
auth_check($auth[$sub_menu], 'w');
$sql = " delete from `{$g4['yc4_option_table']}` where it_id = '$it_id' and opt_id = '$opt_id' ";
$sql = " delete from `{$g4['shop_option_table']}` where it_id = '$it_id' and opt_id = '$opt_id' ";
sql_query($sql);
?>

View File

@ -8,7 +8,7 @@ $html_title = '선택옵션설정';
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']}' ";

View File

@ -3,7 +3,7 @@ include_once('./_common.php');
// 새로 테이블을 만든 경우 기존 옵션정보 삭제
if($makemode == 'create') {
$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);
}
@ -11,7 +11,7 @@ if($makemode == 'create') {
$count = count($_POST['opt_id']);
if(!$count) {
$sql = " update {$g4['yc4_item_table']}
$sql = " update {$g4['shop_item_table']}
set it_option_use = '0',
it_opt1_subject = '',
it_opt2_subject = '',
@ -32,12 +32,12 @@ for($i = 0; $i < $count; $i++) {
opt_notice = '{$_POST['opt_notice'][$i]}',
opt_use = '{$_POST['opt_use'][$i]}' ";
$row = sql_fetch(" select opt_id from `{$g4['yc4_option_table']}` where it_id = '$it_id' and opt_id = '{$_POST['opt_id'][$i]}' ");
$row = sql_fetch(" select opt_id from `{$g4['shop_option_table']}` where it_id = '$it_id' and opt_id = '{$_POST['opt_id'][$i]}' ");
if($row['opt_id']) {
$sql = " update `{$g4['yc4_option_table']}` set $sql_common where it_id = '$it_id' and opt_id = '{$_POST['opt_id'][$i]}' ";
$sql = " update `{$g4['shop_option_table']}` set $sql_common where it_id = '$it_id' and opt_id = '{$_POST['opt_id'][$i]}' ";
} else {
$sql = " insert into `{$g4['yc4_option_table']}` set it_id = '$it_id', opt_id = '{$_POST['opt_id'][$i]}', $sql_common ";
$sql = " insert into `{$g4['shop_option_table']}` set it_id = '$it_id', opt_id = '{$_POST['opt_id'][$i]}', $sql_common ";
}
sql_query($sql);

View File

@ -7,7 +7,7 @@ auth_check($auth[$sub_menu], "r");
$g4[title] = "전자결제내역";
include_once(G4_ADMIN_PATH."/admin.head.php");
sql_query(" ALTER TABLE `$g4[yc4_card_history_table]` ADD INDEX `od_id` ( `od_id` ) ", false);
sql_query(" ALTER TABLE `$g4[shop_card_history_table]` ADD INDEX `od_id` ( `od_id` ) ", false);
$where = " where ";
$sql_search = "";
@ -24,8 +24,8 @@ if ($sel_field == "") $sel_field = "a.od_id";
if ($sort1 == "") $sort1 = "od_id";
if ($sort2 == "") $sort2 = "desc";
$sql_common = " from $g4[yc4_card_history_table] a
left join $g4[yc4_order_table] b on (a.od_id = b.od_id)
$sql_common = " from $g4[shop_card_history_table] a
left join $g4[shop_order_table] b on (a.od_id = b.od_id)
$sql_search ";
// 테이블의 전체 레코드수만 얻음

View File

@ -11,7 +11,7 @@ for ($i=0; $i<$cnt; $i++)
{
$ct_id = $_POST[ct_id][$i];
$sql = " select * from $g4[yc4_cart_table]
$sql = " select * from $g4[shop_cart_table]
where on_uid = '$on_uid'
and ct_id = '$ct_id' ";
$ct = sql_fetch($sql);
@ -24,7 +24,7 @@ for ($i=0; $i<$cnt; $i++)
{
$stock_use = 0;
// 재고에 다시 더한다.
$sql =" update $g4[yc4_item_table] set it_stock_qty = it_stock_qty + '$ct[ct_qty]' where it_id = '$ct[it_id]' ";
$sql =" update $g4[shop_item_table] set it_stock_qty = it_stock_qty + '$ct[ct_qty]' where it_id = '$ct[it_id]' ";
sql_query($sql);
}
}
@ -36,14 +36,14 @@ for ($i=0; $i<$cnt; $i++)
{
$stock_use = 1;
// 재고에서 뺀다.
$sql =" update $g4[yc4_item_table] set it_stock_qty = it_stock_qty - '$ct[ct_qty]' where it_id = '$ct[it_id]' ";
$sql =" update $g4[shop_item_table] set it_stock_qty = it_stock_qty - '$ct[ct_qty]' where it_id = '$ct[it_id]' ";
sql_query($sql);
}
/* 주문 수정에서 "품절" 선택시 해당 상품 자동 품절 처리하기
else if ($ct_status == '품절') {
$stock_use = 1;
// 재고에서 뺀다.
$sql =" update $g4[yc4_item_table] set it_stock_qty = 0 where it_id = '$ct[it_id]' ";
$sql =" update $g4[shop_item_table] set it_stock_qty = 0 where it_id = '$ct[it_id]' ";
sql_query($sql);
} */
}
@ -62,7 +62,7 @@ for ($i=0; $i<$cnt; $i++)
// 히스토리에 남길때는 작업|시간|IP|그리고 나머지 자료
$ct_history="\n$ct_status|$now|$REMOTE_ADDR";
$sql = " update $g4[yc4_cart_table]
$sql = " update $g4[shop_cart_table]
set ct_point_use = '$point_use',
ct_stock_use = '$stock_use',
ct_status = '$ct_status',
@ -78,7 +78,7 @@ $qstr = "sort1=$sort1&sort2=$sort2&sel_field=$sel_field&search=$search&page=$pag
$url = "./orderform.php?od_id=$od_id&$qstr";
// 1.06.06
$od = sql_fetch(" select od_receipt_point from $g4[yc4_order_table] where od_id = '$od_id' ");
$od = sql_fetch(" select od_receipt_point from $g4[shop_order_table] where od_id = '$od_id' ");
if ($od[od_receipt_point])
alert("포인트로 결제한 주문은,\\n\\n주문상태 변경으로 인해 포인트의 가감이 발생하는 경우\\n\\n회원관리 > 포인트관리에서 수작업으로 포인트를 맞추어 주셔야 합니다.\\n\\n만약, 미수금이 발생하는 경우에는 DC에 금액을 음수로 입력하시면 해결됩니다.", $url);
else

View File

@ -9,13 +9,13 @@ auth_check($auth[$sub_menu], "d");
if ($od_id && $on_uid)
{
// 장바구니 삭제
sql_query(" delete from $g4[yc4_cart_table] where on_uid = '$on_uid' ");
sql_query(" delete from $g4[shop_cart_table] where on_uid = '$on_uid' ");
// 카드결제내역 삭제
sql_query(" delete from $g4[yc4_card_history_table] where od_id = '$od_id' and on_uid = '$on_uid' ");
sql_query(" delete from $g4[shop_card_history_table] where od_id = '$od_id' and on_uid = '$on_uid' ");
// 주문서 삭제
sql_query(" delete from $g4[yc4_order_table] where od_id = '$od_id' and on_uid = '$on_uid' ");
sql_query(" delete from $g4[shop_order_table] where od_id = '$od_id' and on_uid = '$on_uid' ");
}
if ($return_url)

View File

@ -25,7 +25,7 @@ include_once(G4_ADMIN_PATH.'/admin.head.php');
if (!isset($cart_not_delete)) {
if (!$hours) $hours = 6;
$beforehours = date("Y-m-d H:i:s", ( $g4['server_time'] - (60 * 60 * $hours) ) );
$sql = " delete from {$g4['yc4_cart_table']} where ct_status = '$cart_title1' and ct_time <= '$beforehours' ";
$sql = " delete from {$g4['shop_cart_table']} where ct_status = '$cart_title1' and ct_time <= '$beforehours' ";
sql_query($sql);
}
//------------------------------------------------------------------------------
@ -38,7 +38,7 @@ if (!isset($cart_not_delete)) {
//------------------------------------------------------------------------------
if (!isset($order_not_point)) {
$beforedays = date("Y-m-d H:i:s", ( time() - (60 * 60 * 24 * (int)$default['de_point_days']) ) );
$sql = " select * from {$g4['yc4_cart_table']}
$sql = " select * from {$g4['shop_cart_table']}
where ct_status = '$cart_title2'
and ct_point_use = '0'
and ct_time <= '$beforedays' ";
@ -46,7 +46,7 @@ if (!isset($order_not_point)) {
for ($i=0; $row=sql_fetch_array($result); $i++)
{
// 회원 ID 를 얻는다.
$tmp_row = sql_fetch("select od_id, mb_id from {$g4['yc4_order_table']} where od_id = '$row[uq_id]' ");
$tmp_row = sql_fetch("select od_id, mb_id from {$g4['shop_order_table']} where od_id = '$row[uq_id]' ");
// 회원이면서 포인트가 0보다 크다면
if ($tmp_row['mb_id'] && $row['ct_point'] > 0)
@ -56,7 +56,7 @@ if (!isset($order_not_point)) {
insert_point($tmp_row['mb_id'], $po_point, $po_content, "@delivery", $tmp_row['mb_id'], "{$tmp_row['od_id']},{$row['ct_id']}");
}
sql_query("update {$g4['yc4_cart_table']} set ct_point_use = '1' where ct_id = '{$row['ct_id']}' ");
sql_query("update {$g4['shop_cart_table']} set ct_point_use = '1' where ct_id = '{$row['ct_id']}' ");
}
}
//------------------------------------------------------------------------------
@ -65,7 +65,7 @@ if (!isset($order_not_point)) {
//------------------------------------------------------------------------------
// 주문서 정보
//------------------------------------------------------------------------------
$sql = " select * from {$g4['yc4_order_table']} where od_id = '$od_id' ";
$sql = " select * from {$g4['shop_order_table']} where od_id = '$od_id' ";
$od = sql_fetch($sql);
if (!$od['od_id']) {
alert($alt_msg1);
@ -87,10 +87,10 @@ if ($default['de_card_test']) {
$g4['yc4_cardpg']['kcp'] = "http://testadmin8.kcp.co.kr";
}
$sql_common = " from ( select * from {$g4['yc4_cart_table']}
$sql_common = " from ( select * from {$g4['shop_cart_table']}
where uq_id = '{$od['od_id']}'
order by ct_id asc ) as a
left join {$g4['yc4_item_table']} as b on ( a.it_id = b.it_id )";
left join {$g4['shop_item_table']} as b on ( a.it_id = b.it_id )";
$sql = " select a.ct_id,
a.uq_id,
@ -404,7 +404,7 @@ if ($od['od_receipt_point'] > 0)
<tr><td colspan=2 height=1 bgcolor=#84C718></td></tr>
<?
$sql = " select dl_company, dl_url, dl_tel from {$g4['yc4_delivery_table']} where dl_id = '{$od['dl_id']}' ";
$sql = " select dl_company, dl_url, dl_tel from {$g4['shop_delivery_table']} where dl_id = '{$od['dl_id']}' ";
$dl = sql_fetch($sql);
?>
<tr>
@ -471,7 +471,7 @@ if ($od['od_receipt_point'] > 0)
<? if ($od['od_settle_case'] == '무통장' || $od['od_settle_case'] == '가상계좌' || $od['od_settle_case'] == '계좌이체') { ?>
<?
// 주문서
$sql = " select * from {$g4['yc4_order_table']} where od_id = '$od_id' ";
$sql = " select * from {$g4['shop_order_table']} where od_id = '$od_id' ";
$result = sql_query($sql);
$od = sql_fetch_array($result);
@ -632,7 +632,7 @@ if ($od['od_receipt_point'] > 0)
<select id="dl_id" name="dl_id">
<option value=''>배송시 선택하세요.
<?
$sql = "select * from {$g4['yc4_delivery_table']} order by dl_order desc, dl_id desc ";
$sql = "select * from {$g4['shop_delivery_table']} order by dl_order desc, dl_id desc ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
echo "<option value='{$row['dl_id']}'>{$row['dl_company']}\n";

View File

@ -2,7 +2,7 @@
$sub_menu = "400400";
include_once("./_common.php");
$sql = " update $g4[yc4_order_table]
$sql = " update $g4[shop_order_table]
set od_shop_memo = '$od_shop_memo',
od_name = '$od_name',
od_tel = '$od_tel',

View File

@ -25,8 +25,8 @@ if ($sel_field == "") $sel_field = "od_id";
if ($sort1 == "") $sort1 = "od_id";
if ($sort2 == "") $sort2 = "desc";
$sql_common = " from {$g4['yc4_cart_table']} a
left join {$g4['yc4_order_table']} b on (a.uq_id = b.od_id)
$sql_common = " from {$g4['shop_cart_table']} a
left join {$g4['shop_order_table']} b on (a.uq_id = b.od_id)
$sql_search ";
// 김선용 200805 : 조인 사용으로 전체카운트가 일정레코드 이상일 때 지연시간 문제가 심각하므로 변경
@ -50,9 +50,9 @@ $sql = " select b.*, "._MISU_QUERY_."
limit $from_record, $rows ";
$result = sql_query($sql);
if (!$result) {
sql_query(" ALTER TABLE `{$g4['yc4_order_table']}` ADD `od_temp_hp` INT NOT NULL AFTER `od_temp_card` ", false);
sql_query(" ALTER TABLE `{$g4['yc4_order_table']}` ADD `od_receipt_hp` INT NOT NULL AFTER `od_receipt_card` ", false);
sql_query(" ALTER TABLE `{$g4['yc4_order_table']}` ADD `od_hp_time` DATETIME NOT NULL AFTER `od_card_time` ", false);
sql_query(" ALTER TABLE `{$g4['shop_order_table']}` ADD `od_temp_hp` INT NOT NULL AFTER `od_temp_card` ", false);
sql_query(" ALTER TABLE `{$g4['shop_order_table']}` ADD `od_receipt_hp` INT NOT NULL AFTER `od_receipt_card` ", false);
sql_query(" ALTER TABLE `{$g4['shop_order_table']}` ADD `od_hp_time` DATETIME NOT NULL AFTER `od_card_time` ", false);
}
//echo $sql;
@ -175,7 +175,7 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
$tot_cnt = "";
if ($row[mb_id])
{
$sql2 = " select count(*) as cnt from $g4[yc4_order_table] where mb_id = '$row[mb_id]' ";
$sql2 = " select count(*) as cnt from $g4[shop_order_table] where mb_id = '$row[mb_id]' ";
$row2 = sql_fetch($sql2);
$tot_cnt = "($row2[cnt])";
}

View File

@ -26,12 +26,12 @@ if ($sel_field == "") $sel_field = "od_id";
if ($sort1 == "") $sort1 = "od_id";
if ($sort2 == "") $sort2 = "desc";
$sql_common = " from $g4[yc4_cart_table] a
left join $g4[yc4_order_table] b on ( a.uq_id = b.od_id)
$sql_common = " from $g4[shop_cart_table] a
left join $g4[shop_order_table] b on ( a.uq_id = b.od_id)
$sql_search ";
// 테이블의 전체 레코드수만 얻음
$row = sql_fetch("select count(od_id) as cnt from {$g4['yc4_order_table']} $sql_search ");
$row = sql_fetch("select count(od_id) as cnt from {$g4['shop_order_table']} $sql_search ");
$total_count = $row[cnt];
$rows = $config[cf_page_rows];
@ -198,9 +198,9 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
// 상품개별출력
$sql2 = " select c.it_name,
b.*
from $g4[yc4_order_table] a
left join $g4[yc4_cart_table] b on (a.od_id = b.uq_id)
left join $g4[yc4_item_table] c on (b.it_id = c.it_id)
from $g4[shop_order_table] a
left join $g4[shop_cart_table] b on (a.od_id = b.uq_id)
left join $g4[shop_item_table] c on (b.it_id = c.it_id)
where od_id = '$row[od_id]' ";
$result2 = sql_query($sql2);
for ($k=0; $row2=sql_fetch_array($result2); $k++)

View File

@ -7,7 +7,7 @@ if (!defined("_ORDERMAIL_")) exit;
// 주문자님께 메일발송 체크를 했다면
if ($od_send_mail)
{
$od = sql_fetch(" select * from $g4[yc4_order_table] where od_id = '$od_id' ");
$od = sql_fetch(" select * from $g4[shop_order_table] where od_id = '$od_id' ");
$addmemo = nl2br(stripslashes($addmemo));
@ -25,7 +25,7 @@ if ($od_send_mail)
b.it_opt4_subject,
b.it_opt5_subject,
b.it_opt6_subject
from $g4[yc4_cart_table] a inner join $g4[yc4_item_table] b on (b.it_id = a.it_id)
from $g4[shop_cart_table] a inner join $g4[shop_item_table] b on (b.it_id = a.it_id)
where a.on_uid = '$od[on_uid]'
order by a.ct_id ";
$result = sql_query($sql);
@ -100,7 +100,7 @@ if ($od_send_mail)
// 배송정보
$is_delivery = false;
if ((int)$od[dl_id] > 0) {
$dl = sql_fetch(" select * from $g4[yc4_delivery_table] where dl_id = '$od[dl_id]' ");
$dl = sql_fetch(" select * from $g4[shop_delivery_table] where dl_id = '$od[dl_id]' ");
$delivery_list[dl_url] = $dl[dl_url];
if (strpos($delivery_list[dl_url], "=")) $delivery_list[dl_url] .= $od[od_invoice];
@ -133,7 +133,7 @@ if ($od_send_mail)
$od_shop_memo .= ", 송장번호";
*/
sql_query(" update $g4[yc4_order_table] set od_shop_memo = '$od_shop_memo' where od_id = '$od_id' ");
sql_query(" update $g4[shop_order_table] set od_shop_memo = '$od_shop_memo' where od_id = '$od_id' ");
$admin = get_admin('super');

View File

@ -40,7 +40,7 @@ if ($csv == 'csv')
$sql = " SELECT od_b_zip1, od_b_zip2, od_b_addr1, od_b_addr2, od_b_name, od_b_tel, od_b_hp, it_name, ct_qty, b.it_id, a.od_id, od_memo, od_invoice
FROM $g4[yc4_order_table] a, $g4[yc4_cart_table] b, $g4[yc4_item_table] c
FROM $g4[shop_order_table] a, $g4[shop_cart_table] b, $g4[shop_item_table] c
where a.on_uid = b.on_uid
and b.it_id = c.it_id ";
if ($case == 1) // 출력기간
@ -96,7 +96,7 @@ if ($csv == 'xls')
$sql = " SELECT od_b_zip1, od_b_zip2, od_b_addr1, od_b_addr2, od_b_name, od_b_tel, od_b_hp, it_name, ct_qty, b.it_id, a.od_id, od_memo, od_invoice, b.it_opt1, b.it_opt2, b.it_opt3, b.it_opt4, b.it_opt5, b.it_opt6
FROM $g4[yc4_order_table] a, $g4[yc4_cart_table] b, $g4[yc4_item_table] c
FROM $g4[shop_order_table] a, $g4[shop_cart_table] b, $g4[shop_item_table] c
where a.on_uid = b.on_uid
and b.it_id = c.it_id ";
if ($case == 1) // 출력기간
@ -169,7 +169,7 @@ function get_order($on_uid)
{
global $g4;
$sql = " select * from $g4[yc4_order_table] where on_uid = '$on_uid' ";
$sql = " select * from $g4[shop_order_table] where on_uid = '$on_uid' ";
return sql_fetch($sql);
}
@ -180,13 +180,13 @@ if ($case == 1)
{
$fr_date = date_conv($fr_date);
$to_date = date_conv($to_date);
$sql = " SELECT DISTINCT a.on_uid FROM $g4[yc4_order_table] a, $g4[yc4_cart_table] b
$sql = " SELECT DISTINCT a.on_uid FROM $g4[shop_order_table] a, $g4[shop_cart_table] b
where a.on_uid = b.on_uid
and a.od_time between '$fr_date 00:00:00' and '$to_date 23:59:59' ";
}
else
{
$sql = " SELECT DISTINCT a.on_uid FROM $g4[yc4_order_table] a, $g4[yc4_cart_table] b
$sql = " SELECT DISTINCT a.on_uid FROM $g4[shop_order_table] a, $g4[shop_cart_table] b
where a.on_uid = b.on_uid
and a.od_id between '$fr_od_id' and '$to_od_id' ";
}
@ -237,7 +237,7 @@ $mod = 10;
$tot_total_amount = 0;
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$sql1 = " select * from $g4[yc4_order_table] where on_uid = '$row[on_uid]' ";
$sql1 = " select * from $g4[shop_order_table] where on_uid = '$row[on_uid]' ";
$row1 = sql_fetch($sql1);
// 1.03.02
@ -285,7 +285,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
b.it_opt5_subject,
b.it_opt6_subject,
b.it_name
from $g4[yc4_cart_table] a, $g4[yc4_item_table] b
from $g4[shop_cart_table] a, $g4[shop_item_table] b
where a.it_id = b.it_id
and a.on_uid = '$row[on_uid]' ";
if ($ct_status)

View File

@ -24,7 +24,7 @@ if ($od_hp_time)
alert("휴대폰 결제일시 오류입니다.");
}
$sql = " update {$g4['yc4_order_table']}
$sql = " update {$g4['shop_order_table']}
set od_deposit_name = '$od_deposit_name',
od_bank_account = '$od_bank_account',
od_receipt_time = '$od_receipt_time',

View File

@ -31,7 +31,7 @@ if ($od_sms_baesong_check)
{
$sms_contents = $default[de_sms_cont4];
$sms_contents = preg_replace("/{이름}/", $od_name, $sms_contents);
$sql = " select dl_company from $g4[yc4_delivery_table] where dl_id = '$dl_id' ";
$sql = " select dl_company from $g4[shop_delivery_table] where dl_id = '$dl_id' ";
$row = sql_fetch($sql);
$sms_contents = preg_replace("/{택배회사}/", $row[dl_company], $sms_contents);
$sms_contents = preg_replace("/{운송장번호}/", $od_invoice, $sms_contents);

View File

@ -27,9 +27,9 @@ if ($sel_field == "") $sel_field = "od_id";
if ($sort1 == "") $sort1 = "od_id";
if ($sort2 == "") $sort2 = "desc";
$sql_common = " from {$g4['yc4_order_table']} a
left join {$g4['yc4_cart_table']} b on (a.od_id = b.uq_id)
left join {$g4['yc4_item_table']} c on (b.it_id = c.it_id)
$sql_common = " from {$g4['shop_order_table']} a
left join {$g4['shop_cart_table']} b on (a.od_id = b.uq_id)
left join {$g4['shop_item_table']} c on (b.it_id = c.it_id)
$sql_search ";
// 테이블의 전체 레코드수만 얻음

View File

@ -63,7 +63,7 @@ $sql = " select on_uid,
od_dc_amount,
(od_receipt_bank + od_receipt_card + od_receipt_point) as receiptamount,
(od_refund_amount + od_cancel_card) as receiptcancel
from $g4[yc4_order_table]
from $g4[shop_order_table]
where SUBSTRING(od_time,1,10) between '$fr_date' and '$to_date'
order by od_time desc ";
$result = sql_query($sql);
@ -81,7 +81,7 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
// 장바구니 상태별 금액
$sql1 = " select (SUM(ct_amount * ct_qty)) as orderamount, /* 주문합계 */
(SUM(IF(ct_status = '취소' OR ct_status = '반품' OR ct_status = '품절', ct_amount * ct_qty, 0))) as ordercancel /* 주문취소 */
from $g4[yc4_cart_table]
from $g4[shop_cart_table]
where on_uid = '$row[on_uid]' ";
$row1 = sql_fetch($sql1);

View File

@ -63,7 +63,7 @@ $sql = " select on_uid,
od_dc_amount,
(od_receipt_bank + od_receipt_card + od_receipt_point) as receiptamount,
(od_refund_amount + od_cancel_card) as receiptcancel
from $g4[yc4_order_table]
from $g4[shop_order_table]
where SUBSTRING(od_time,1,7) between '$fr_date' and '$to_date'
order by od_time desc ";
$result = sql_query($sql);
@ -81,7 +81,7 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
// 장바구니 상태별 금액
$sql1 = " select (SUM(ct_amount * ct_qty)) as orderamount, /* 주문합계 */
(SUM(IF(ct_status = '취소' OR ct_status = '반품' OR ct_status = '품절', ct_amount * ct_qty, 0))) as ordercancel /* 주문취소 */
from $g4[yc4_cart_table]
from $g4[shop_cart_table]
where on_uid = '$row[on_uid]' ";
$row1 = sql_fetch($sql1);

View File

@ -39,7 +39,7 @@ $sql = " select od_id,
od_dc_amount,
(od_receipt_bank + od_receipt_card + od_receipt_point) as receiptamount,
(od_refund_amount + od_cancel_card) as receiptcancel
from $g4[yc4_order_table]
from $g4[shop_order_table]
where SUBSTRING(od_time,1,10) = '$date'
order by od_id desc ";
$result = sql_query($sql);
@ -51,7 +51,7 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
// 장바구니 상태별 금액
$sql1 = " select (SUM(ct_amount * ct_qty)) as orderamount, /* 주문합계 */
(SUM(IF(ct_status = '취소' OR ct_status = '반품' OR ct_status = '품절', ct_amount * ct_qty, 0))) as ordercancel /* 주문취소 */
from $g4[yc4_cart_table]
from $g4[shop_cart_table]
where on_uid = '$row[on_uid]' ";
$row1 = sql_fetch($sql1);

View File

@ -58,7 +58,7 @@ $sql = " select on_uid,
od_dc_amount,
(od_receipt_bank + od_receipt_card + od_receipt_point) as receiptamount,
(od_refund_amount + od_cancel_card) as receiptcancel
from $g4[yc4_order_table]
from $g4[shop_order_table]
where SUBSTRING(od_time,1,4) between '$fr_date' and '$to_date'
order by od_time desc ";
$result = sql_query($sql);
@ -76,7 +76,7 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
// 장바구니 상태별 금액
$sql1 = " select (SUM(ct_amount * ct_qty)) as orderamount, /* 주문합계 */
(SUM(IF(ct_status = '취소' OR ct_status = '반품' OR ct_status = '품절', ct_amount * ct_qty, 0))) as ordercancel /* 주문취소 */
from $g4[yc4_cart_table]
from $g4[shop_cart_table]
where on_uid = '$row[on_uid]' ";
$row1 = sql_fetch($sql1);

View File

@ -4,7 +4,7 @@ include_once("./_common.php");
auth_check($auth[$sub_menu], "d");
$sql = " delete from {$g4['yc4_sendcost_table']} where sc_no = '$sc_no' ";
$sql = " delete from {$g4['shop_sendcost_table']} where sc_no = '$sc_no' ";
sql_query($sql);
goto_url("./sendcostlist.php");

View File

@ -4,7 +4,7 @@ include_once("./_common.php");
auth_check($auth[$sub_menu], "r");
$sql_common = " from {$g4['yc4_sendcost_table']} ";
$sql_common = " from {$g4['shop_sendcost_table']} ";
$sql_order = " order by sc_no ";
// 테이블의 전체 레코드수만 얻음

View File

@ -22,7 +22,7 @@ if(!$sc_amount) {
alert("추가배송료를 입력해 주세요.");
}
$sql = " insert into {$g4['yc4_sendcost_table']}
$sql = " insert into {$g4['shop_sendcost_table']}
set sc_name = '$sc_name',
sc_zip1 = '$sc_zip1',
sc_zip2 = '$sc_zip2',

View File

@ -4,7 +4,7 @@ include_once('./_common.php');
if(!$makemode) {
$list = array();
$sql = " select sp_id, sp_amount, sp_qty, sp_notice, sp_use
from `{$g4['yc4_supplement_table']}`
from `{$g4['shop_supplement_table']}`
where it_id = '$it_id'
order by sp_no asc ";
$result = sql_query($sql);

View File

@ -4,6 +4,6 @@ include_once('./_common.php');
auth_check($auth[$sub_menu], 'w');
$sql = " delete from `{$g4['yc4_supplement_table']}` where it_id = '$it_id' and sp_id = '$sp_id' ";
$sql = " delete from `{$g4['shop_supplement_table']}` where it_id = '$it_id' and sp_id = '$sp_id' ";
sql_query($sql);
?>

View File

@ -8,7 +8,7 @@ $html_title = '추가옵션설정';
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']}' ";
@ -17,7 +17,7 @@ if ($is_admin != 'super')
alert("\'{$member[mb_id]}\' 님께서 수정 할 권한이 없는 상품입니다.");
}
$sql = " select sp_id from {$g4['yc4_supplement_table']} where it_id = '$it_id' order by sp_id asc ";
$sql = " select sp_id from {$g4['shop_supplement_table']} where it_id = '$it_id' order by sp_id asc ";
$result = sql_query($sql);
$spl_count = mysql_num_rows($result);

View File

@ -3,7 +3,7 @@ include_once('./_common.php');
// 새로 테이블을 만든 경우 기존 옵션정보 삭제
if($makemode == 'create') {
$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);
}
@ -11,7 +11,7 @@ if($makemode == 'create') {
$count = count($_POST['sp_id']);
if(!$count) {
$sql = " update {$g4['yc4_item_table']} set it_supplement_use = '0' where it_id = '$it_id' ";
$sql = " update {$g4['shop_item_table']} set it_supplement_use = '0' where it_id = '$it_id' ";
sql_query($sql);
echo '<script>self.close();</script>';
exit;
@ -23,12 +23,12 @@ for($i = 0; $i < $count; $i++) {
sp_notice = '{$_POST['sp_notice'][$i]}',
sp_use = '{$_POST['sp_use'][$i]}' ";
$row = sql_fetch(" select sp_id from `{$g4['yc4_supplement_table']}` where it_id = '$it_id' and sp_id = '{$_POST['sp_id'][$i]}' ");
$row = sql_fetch(" select sp_id from `{$g4['shop_supplement_table']}` where it_id = '$it_id' and sp_id = '{$_POST['sp_id'][$i]}' ");
if($row['sp_id']) {
$sql = " update `{$g4['yc4_supplement_table']}` set $sql_common where it_id = '$it_id' and sp_id = '{$_POST['sp_id'][$i]}' ";
$sql = " update `{$g4['shop_supplement_table']}` set $sql_common where it_id = '$it_id' and sp_id = '{$_POST['sp_id'][$i]}' ";
} else {
$sql = " insert into `{$g4['yc4_supplement_table']}` set it_id = '$it_id', sp_id = '{$_POST['sp_id'][$i]}', $sql_common ";
$sql = " insert into `{$g4['shop_supplement_table']}` set it_id = '$it_id', sp_id = '{$_POST['sp_id'][$i]}', $sql_common ";
}
sql_query($sql);

View File

@ -15,7 +15,7 @@ if ($sort2 == "") $sort2 = "desc";
$sql = " select a.it_id,
b.it_name,
COUNT(a.it_id) as it_id_cnt
from $g4[yc4_wish_table] a, $g4[yc4_item_table] b ";
from $g4[shop_wish_table] a, $g4[shop_item_table] b ";
$sql .= " where a.it_id = b.it_id ";
if ($fr_date && $to_date)
{
@ -58,7 +58,7 @@ $qstr1 = "fr_date=$fr_date&to_date=$to_date&sel_ca_id=$sel_ca_id";
<select id="sel_ca_id" name="sel_ca_id">
<option value=''>전체분류
<?
$sql1 = " select ca_id, ca_name from $g4[yc4_category_table] order by ca_id ";
$sql1 = " select ca_id, ca_name from $g4[shop_category_table] order by ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=mysql_fetch_array($result1); $i++) {
$len = strlen($row1[ca_id]) / 2 - 1;

View File

@ -102,6 +102,7 @@ if (file_exists($dbconfig_file)) {
$connect_db = sql_connect(G4_MYSQL_HOST, G4_MYSQL_USER, G4_MYSQL_PASSWORD) or die('MySQL Connect Error!!!');
$select_db = sql_select_db(G4_MYSQL_DB, $connect_db) or die('MySQL DB Error!!!');
@mysql_query(" set names utf8 ");
} else {
echo "<meta http-equiv='content-type' content='text/html; charset=utf-8'>";
echo "<h3>$dbconfig_file 파일을 찾을 수 없습니다.<br>프로그램 설치 후 실행하시기 바랍니다.</h3>";
@ -178,7 +179,14 @@ if (G4_IS_MOBILE) {
// 4.00.03 : [보안관련] PHPSESSID 가 틀리면 로그아웃한다.
if (isset($_REQUEST['PHPSESSID']) && $_REQUEST['PHPSESSID'] != session_id())
goto_url($g4['bbs_path'].'/logout.php');
goto_url(G4_BBS_URL.'/logout.php');
// 프로그램 전반에 걸쳐 사용하는 유일한 키
if (!get_session('ss_uniqid')) {
set_session('ss_uniqid', get_uniqid());
}
// QUERY_STRING
$qstr = '';

View File

@ -11,8 +11,8 @@ include_once(G4_LIB_PATH.'/shop.lib.php');
// 쇼핑몰 설정 상수 및 변수
//------------------------------------------------------------------------------
// 미수금에 대한 QUERY 문
// 테이블 a 는 장바구니 ($g4[yc4_cart_table])
// 테이블 b 는 주문서 ($g4[yc4_order_table])
// 테이블 a 는 장바구니 ($g4[shop_cart_table])
// 테이블 b 는 주문서 ($g4[shop_order_table])
/*
define(_MISU_QUERY_, "
count(distinct b.od_id) as ordercount, -- 주문서건수
@ -31,45 +31,44 @@ define(_MISU_QUERY_, "
*/
// 쇼핑몰 디렉토리
define('G4_SHOP_DIR', 'shop');
define('G4_SHOP_PATH', G4_PATH.'/shop');
define('G4_SHOP_URL', G4_URL.'/shop');
define('G4_SHOP_DIR', 'shop');
define('G4_SHOP_PATH', G4_PATH.'/shop');
define('G4_SHOP_URL', G4_URL.'/shop');
define('G4_SHOP_ADMIN_DIR', 'shop_admin');
define('G4_SHOP_ADMIN_PATH',G4_ADMIN_PATH.'/'.G4_SHOP_ADMIN_DIR);
define('G4_SHOP_ADMIN_URL', G4_ADMIN_URL.'/'.G4_SHOP_ADMIN_DIR);
define('G4_SHOP_ADMIN_DIR', 'shop_admin');
define('G4_SHOP_ADMIN_PATH', G4_ADMIN_PATH.'/'.G4_SHOP_ADMIN_DIR);
define('G4_SHOP_ADMIN_URL', G4_ADMIN_URL.'/'.G4_SHOP_ADMIN_DIR);
define('G4_SHOP_IMG_DIR', '/img');
define('G4_SHOP_IMG_URL', G4_SHOP_URL.'/'.G4_SHOP_IMG_DIR);
define('G4_SHOP_IMG_DIR', '/img');
define('G4_SHOP_IMG_URL', G4_SHOP_URL.'/'.G4_SHOP_IMG_DIR);
// 쇼핑몰 테이블명
$g4['yc4_default_table'] = "yc4_default"; // 쇼핑몰설정 테이블
$g4['yc4_banner_table'] = "yc4_banner"; // 배너 테이블
$g4['yc4_card_history_table'] = "yc4_card_history"; // 전자결제이력 테이블
$g4['yc4_cart_table'] = "yc4_cart"; // 장바구니 테이블
$g4['yc4_category_table'] = "yc4_category"; // 상품분류 테이블
$g4['yc4_content_table'] = "yc4_content"; // 내용(컨텐츠)정보 테이블
$g4['yc4_delivery_table'] = "yc4_delivery"; // 배송정보 테이블
$g4['yc4_event_table'] = "yc4_event"; // 이벤트 테이블
$g4['yc4_event_item_table'] = "yc4_event_item"; // 상품, 이벤트 연결 테이블
$g4['yc4_faq_table'] = "yc4_faq"; // 자주하시는 질문 테이블
$g4['yc4_faq_master_table'] = "yc4_faq_master"; // 자주하시는 질문 마스터 테이블
$g4['yc4_item_table'] = "yc4_item"; // 상품 테이블
$g4['yc4_item_ps_table'] = "yc4_item_ps"; // 상품 사용후기 테이블
$g4['yc4_item_qa_table'] = "yc4_item_qa"; // 상품 질문답변 테이블
$g4['yc4_item_relation_table'] = "yc4_item_relation"; // 관련 상품 테이블
$g4['yc4_new_win_table'] = "yc4_new_win"; // 새창 테이블
$g4['yc4_onlinecalc_table'] = "yc4_onlinecalc"; // 온라인견적 테이블
$g4['yc4_order_table'] = "yc4_order"; // 주문서 테이블
$g4['yc4_wish_table'] = "yc4_wish"; // 보관함(위시리스트) 테이블
$g4['yc4_on_uid_table'] = "yc4_on_uid"; // 주문번호생성 유니크키 테이블
$g4['yc4_option_table'] = "yc4_option"; // 선택 옵션 테이블
$g4['yc4_supplement_table'] = "yc4_supplement"; // 추가옵션 테이블
$g4['yc4_coupon_table'] = "yc4_coupon"; // 쿠폰정보 테이블
$g4['yc4_coupon_history_table']= "yc4_coupon_history"; // 쿠폰사용내역 테이블
$g4['yc4_sendcost_table'] = "yc4_sendcost"; // 추가배송비 테이블
$g4['yc4_uniqid_table'] = "yc4_uniqid";
$g4['yc4_item_info_table'] = "yc4_item_info"; // 상품요약정보 테이블 (상품정보고시)
$g4['shop_default_table'] = G4_TABLE_PREFIX.'shop_default'; // 쇼핑몰설정 테이블
$g4['shop_banner_table'] = G4_TABLE_PREFIX.'shop_banner'; // 배너 테이블
$g4['shop_card_history_table'] = G4_TABLE_PREFIX.'shop_card_history'; // 전자결제이력 테이블
$g4['shop_cart_table'] = G4_TABLE_PREFIX.'shop_cart'; // 장바구니 테이블
$g4['shop_category_table'] = G4_TABLE_PREFIX.'shop_category'; // 상품분류 테이블
$g4['shop_content_table'] = G4_TABLE_PREFIX.'shop_content'; // 내용(컨텐츠)정보 테이블
$g4['shop_delivery_table'] = G4_TABLE_PREFIX.'shop_delivery'; // 배송정보 테이블
$g4['shop_event_table'] = G4_TABLE_PREFIX.'shop_event'; // 이벤트 테이블
$g4['shop_event_item_table'] = G4_TABLE_PREFIX.'shop_event_item'; // 상품, 이벤트 연결 테이블
$g4['shop_faq_table'] = G4_TABLE_PREFIX.'shop_faq'; // 자주하시는 질문 테이블
$g4['shop_faq_master_table'] = G4_TABLE_PREFIX.'shop_faq_master'; // 자주하시는 질문 마스터 테이블
$g4['shop_item_table'] = G4_TABLE_PREFIX.'shop_item'; // 상품 테이블
$g4['shop_item_ps_table'] = G4_TABLE_PREFIX.'shop_item_ps'; // 상품 사용후기 테이블
$g4['shop_item_qa_table'] = G4_TABLE_PREFIX.'shop_item_qa'; // 상품 질문답변 테이블
$g4['shop_item_relation_table'] = G4_TABLE_PREFIX.'shop_item_relation'; // 관련 상품 테이블
$g4['shop_new_win_table'] = G4_TABLE_PREFIX.'shop_new_win'; // 새창 테이블
$g4['shop_onlinecalc_table'] = G4_TABLE_PREFIX.'shop_onlinecalc'; // 온라인견적 테이블
$g4['shop_order_table'] = G4_TABLE_PREFIX.'shop_order'; // 주문서 테이블
$g4['shop_wish_table'] = G4_TABLE_PREFIX.'shop_wish'; // 보관함(위시리스트) 테이블
$g4['shop_on_uid_table'] = G4_TABLE_PREFIX.'shop_on_uid'; // 주문번호생성 유니크키 테이블
$g4['shop_option_table'] = G4_TABLE_PREFIX.'shop_option'; // 선택 옵션 테이블
$g4['shop_supplement_table'] = G4_TABLE_PREFIX.'shop_supplement'; // 추가옵션 테이블
$g4['shop_coupon_table'] = G4_TABLE_PREFIX.'shop_coupon'; // 쿠폰정보 테이블
$g4['shop_coupon_history_table']= G4_TABLE_PREFIX.'shop_coupon_history'; // 쿠폰사용내역 테이블
$g4['shop_sendcost_table'] = G4_TABLE_PREFIX.'shop_sendcost'; // 추가배송비 테이블
$g4['shop_item_info_table'] = G4_TABLE_PREFIX.'shop_item_info'; // 상품요약정보 테이블 (상품정보고시)
// 신용카드결제대행사 URL
$g4['yc4_cardpg']['kcp'] = "http://admin.kcp.co.kr";
@ -90,7 +89,7 @@ $g4['yc4_cardpg']['dacom_xpay'] = "https://pgweb.dacom.net";
// 쇼핑몰 필수 실행코드 모음 시작
//==============================================================================
// 쇼핑몰 설정값 배열변수
$default = sql_fetch(" select * from {$g4['yc4_default_table']} ");
$default = sql_fetch(" select * from {$g4['shop_default_table']} ");
// 비회원장바구니 사용할 때
if($default['de_guest_cart_use']) {
@ -105,9 +104,4 @@ if($default['de_guest_cart_use']) {
//==============================================================================
// 쇼핑몰 필수 실행코드 모음 끝
//==============================================================================
// 프로그램 전반에 걸쳐 사용하는 유일한 키 (주문번호 키)
if (!get_session('ss_uniqid')) {
set_session('ss_uniqid', get_uniqid());
}
?>

View File

@ -1191,7 +1191,6 @@ function sql_select_db($db, $connect)
{
global $g4;
@mysql_query(" set names utf8 ");
return @mysql_select_db($db, $connect);
}
@ -1675,4 +1674,55 @@ function is_mobile()
{
return preg_match('/'.G4_MOBILE_AGENT.'/i', $_SERVER['HTTP_USER_AGENT']);
}
/*******************************************************************************
유일한 키를 얻는다.
결과 :
년월일시분초00 ~ 년월일시분초99
년(4) 월(2) 일(2) 시(2) 분(2) 초(2) 100분의1초(2)
총 16자리이며 년도는 2자리로 끊어서 사용해도 됩니다.
예) 2008062611570199 또는 08062611570199 (2100년까지만 유일키)
사용하는 곳 :
1. 게시판 글쓰기시 미리 유일키를 얻어 파일 업로드 필드에 넣는다.
2. 주문번호 생성시에 사용한다.
3. 기타 유일키가 필요한 곳에서 사용한다.
*******************************************************************************/
// 기존의 get_unique_id() 함수를 사용하지 않고 get_uniqid() 를 사용한다.
function get_uniqid()
{
global $g4;
sql_query(" LOCK TABLE {$g4['uniqid_table']} WRITE ");
while (1) {
// 년월일시분초에 100분의 1초 두자리를 추가함 (1/100 초 앞에 자리가 모자르면 0으로 채움)
$key = date('ymdHis', time()) . str_pad((int)(microtime()*100), 2, "0", STR_PAD_LEFT);
$result = sql_query(" insert into {$g4['uniqid_table']} values ('$key') ", false);
if ($result) break; // 쿼리가 정상이면 빠진다.
// insert 하지 못했으면 일정시간 쉰다음 다시 유일키를 만든다.
usleep(10000); // 100분의 1초를 쉰다
}
sql_query(" UNLOCK TABLES ");
return $key;
}
// CHARSET 변경 : euc-kr -> utf-8
function iconv_utf8($str)
{
return iconv('euc-kr', 'utf-8', $str);
}
// CHARSET 변경 : utf-8 -> euc-kr
function iconv_euckr($str)
{
return iconv('utf-8', 'euc-kr', $str);
}
?>

View File

@ -564,7 +564,7 @@ function create_table_item_info()
{
global $g4;
return sql_query("
CREATE TABLE IF NOT EXISTS `{$g4['yc4_item_info_table']}` (
CREATE TABLE IF NOT EXISTS `{$g4['shop_item_info_table']}` (
`ii_id` int(11) NOT NULL AUTO_INCREMENT,
`it_id` varchar(10) NOT NULL,
`ii_gubun` varchar(50) NOT NULL,

View File

@ -11,8 +11,7 @@ function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40)
$latest_skin_url = G4_SKIN_URL.'/latest/'.$skin_dir;
$cache_file = G4_DATA_PATH."/cache/latest-{$bo_table}-{$skin_dir}-{$rows}-{$subject_len}.php";
//if (!file_exists($cache_file)) {
if (1) {
if (!file_exists($cache_file)) {
$list = array();
$sql = " select * from $g4[board_table] where bo_table = '$bo_table'";

Some files were not shown because too many files have changed in this diff Show More