shop 테이블명 g5_shop 으로 변경

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

View File

@ -6,7 +6,7 @@ if (preg_match("/[^0-9a-z]/i", $ca_id)) {
die("{\"error\":\"분류코드는 영문자 숫자 만 입력 가능합니다.\"}");
}
$sql = " select ca_name from {$g5['shop_category_table']} where ca_id = '{$ca_id}' ";
$sql = " select ca_name from {$g5['g5_shop_category_table']} where ca_id = '{$ca_id}' ";
$row = sql_fetch($sql);
if ($row['ca_name']) {
$ca_name = addslashes($row['ca_name']);

View File

@ -6,7 +6,7 @@ if (preg_match("/[^\w\-]/", $it_id)) { // \w : 0-9 A-Z a-z _
die("{\"error\":\"상품코드는 영문자 숫자 _ - 만 입력 가능합니다.\"}");
}
$sql = " select it_name from {$g5['shop_item_table']} where it_id = '{$it_id}' ";
$sql = " select it_name from {$g5['g5_shop_item_table']} where it_id = '{$it_id}' ";
$row = sql_fetch($sql);
if ($row['it_name']) {
$it_name = addslashes($row['it_name']);

View File

@ -10,7 +10,7 @@ $g5['title'] = $html_title.'관리';
if ($w=="u")
{
$html_title .= ' 수정';
$sql = " select * from {$g5['shop_banner_table']} where bn_id = '$bn_id' ";
$sql = " select * from {$g5['g5_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 {$g5['shop_banner_table']} auto_increment=1 ");
sql_query(" alter table {$g5['g5_shop_banner_table']} auto_increment=1 ");
$sql = " insert into {$g5['shop_banner_table']}
$sql = " insert into {$g5['g5_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 {$g5['shop_banner_table']}
$sql = " update {$g5['g5_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(G5_DATA_PATH."/banner/$bn_id");
$sql = " delete from {$g5['shop_banner_table']} where bn_id = $bn_id ";
$sql = " delete from {$g5['g5_shop_banner_table']} where bn_id = $bn_id ";
$result = sql_query($sql);
}

View File

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

View File

@ -7,7 +7,7 @@ auth_check($auth[$sub_menu], "w");
$category_path = G5_DATA_PATH."/category";
$sql_common = " from {$g5['shop_category_table']} ";
$sql_common = " from {$g5['g5_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 {$g5['shop_category_table']}
$sql = " select MAX(SUBSTRING(ca_id,$len2,2)) as max_subid from {$g5['g5_shop_category_table']}
where SUBSTRING(ca_id,1,$len) = '$ca_id' ";
$row = sql_fetch($sql);
@ -42,7 +42,7 @@ if ($w == "")
if ($ca_id) // 2단계이상 분류
{
$sql = " select * from {$g5['shop_category_table']} where ca_id = '$ca_id' ";
$sql = " select * from {$g5['g5_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 {$g5['shop_category_table']} where ca_id = '$ca_id' ";
$sql = " select * from {$g5['g5_shop_category_table']} where ca_id = '$ca_id' ";
$ca = sql_fetch($sql);
if (!$ca['ca_id'])
alert("자료가 없습니다.");
@ -76,7 +76,7 @@ else if ($w == "u")
}
if (!isset($ca['ca_mobile_skin'])) {
sql_query(" ALTER TABLE `{$g5['shop_category_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_category_table']}`
ADD `ca_mobile_skin` VARCHAR(255) NOT NULL DEFAULT '' AFTER `ca_skin`,
ADD `ca_mobile_img_width` INT(11) NOT NULL DEFAULT '0' AFTER `ca_list_row`,
ADD `ca_mobile_img_height` INT(11) NOT NULL DEFAULT '0' AFTER `ca_mobile_img_width`,
@ -86,10 +86,10 @@ if (!isset($ca['ca_mobile_skin'])) {
}
// 인증사용필드추가
$sql = " select ca_hp_cert_use from {$g5['shop_category_table']} limit 1 ";
$sql = " select ca_hp_cert_use from {$g5['g5_shop_category_table']} limit 1 ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" ALTER TABLE `{$g5['shop_category_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_category_table']}`
ADD `ca_hp_cert_use` TINYINT(4) NOT NULL DEFAULT '0' AFTER `ca_mb_id`,
ADD `ca_adult_cert_use` TINYINT(4) NOT NULL DEFAULT '0' AFTER `ca_hp_cert_use` ", false);
}

View File

@ -72,7 +72,7 @@ if ($w == "")
// 소문자로 변환
$ca_id = strtolower($ca_id);
$sql = " insert {$g5['shop_category_table']}
$sql = " insert {$g5['g5_shop_category_table']}
set ca_id = '$ca_id',
ca_name = '$ca_name',
$sql_common ";
@ -80,7 +80,7 @@ if ($w == "")
}
else if ($w == "u")
{
$sql = " update {$g5['shop_category_table']}
$sql = " update {$g5['g5_shop_category_table']}
set ca_name = '$ca_name',
$sql_common
where ca_id = '$ca_id' ";
@ -89,7 +89,7 @@ else if ($w == "u")
// 하위분류를 똑같은 설정으로 반영
if ($sub_category) {
$len = strlen($ca_id);
$sql = " update {$g5['shop_category_table']}
$sql = " update {$g5['g5_shop_category_table']}
set $sql_common
where SUBSTRING(ca_id,1,$len) = '$ca_id' ";
if ($is_admin != 'super')
@ -102,7 +102,7 @@ else if ($w == "d")
// 분류의 길이
$len = strlen($ca_id);
$sql = " select COUNT(*) as cnt from {$g5['shop_category_table']}
$sql = " select COUNT(*) as cnt from {$g5['g5_shop_category_table']}
where SUBSTRING(ca_id,1,$len) = '$ca_id'
and ca_id <> '$ca_id' ";
$row = sql_fetch($sql);
@ -110,7 +110,7 @@ else if ($w == "d")
alert("이 분류에 속한 하위 분류가 있으므로 삭제 할 수 없습니다.\\n\\n하위분류를 우선 삭제하여 주십시오.");
$str = $comma = "";
$sql = " select it_id from {$g5['shop_item_table']} where ca_id = '$ca_id' ";
$sql = " select it_id from {$g5['g5_shop_item_table']} where ca_id = '$ca_id' ";
$result = sql_query($sql);
$i=0;
while ($row = mysql_fetch_array($result))
@ -129,7 +129,7 @@ else if ($w == "d")
@unlink("{$g5['category_path']}/$ca_id"."_t");
// 분류 삭제
$sql = " delete from {$g5['shop_category_table']} where ca_id = '$ca_id' ";
$sql = " delete from {$g5['g5_shop_category_table']} where ca_id = '$ca_id' ";
sql_query($sql);
}

View File

@ -18,7 +18,7 @@ if ($stx != "") {
$page = 1;
}
$sql_common = " from {$g5['shop_category_table']} ";
$sql_common = " from {$g5['g5_shop_category_table']} ";
if ($is_admin != 'super')
$sql_common .= " $where ca_mb_id = '{$member['mb_id']}' ";
$sql_common .= $sql_search;
@ -135,7 +135,7 @@ if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
$class = 'class="cate_list_lbl"'; // 2단 이상 분류의 label 에 스타일 부여 - 지운아빠 2013-04-02
// 상위단계의 분류명
$p_ca_id = substr($row['ca_id'], 0, $level*2);
$sql = " select ca_name from {$g5['shop_category_table']} where ca_id = '$p_ca_id' ";
$sql = " select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$p_ca_id' ";
$temp = sql_fetch($sql);
$p_ca_name = $temp['ca_name'].'의하위';
} else {
@ -153,7 +153,7 @@ if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
$s_del = '<a href="./categoryformupdate.php?w=d&amp;ca_id='.$row['ca_id'].'&amp;'.$qstr.'" onclick="return delete_confirm();"><span class="sound_only">'.get_text($row['ca_name']).' </span>삭제</a> ';
// 해당 분류에 속한 상품의 갯수
$sql1 = " select COUNT(*) as cnt from {$g5['shop_item_table']}
$sql1 = " select COUNT(*) as cnt from {$g5['g5_shop_item_table']}
where ca_id = '{$row['ca_id']}'
or ca_id2 = '{$row['ca_id']}'
or ca_id3 = '{$row['ca_id']}' ";
@ -207,7 +207,7 @@ if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
<td class="td_confirm">
<input type="checkbox" name="ca_hp_cert_use[<?php echo $i; ?>]" value="1" id="ca_hp_cert_use_yes<?php echo $i; ?>" <?php if($row['ca_hp_cert_use']) echo 'checked="checked"'; ?>>
<label for="ca_hp_cert_use_yes<?php echo $i; ?>">사용</label>
<!-- <input type="radio" name="ca_hp_cert_use[<?php echo $i; ?>]" value="1" id="ca_hp_cert_use_yes<?php echo $i; ?>" <?php if($row['ca_hp_cert_use']) echo 'checked="checked"'; ?>>
<label for="ca_hp_cert_use_yes<?php echo $i; ?>">사용함</label>
<input type="radio" name="ca_hp_cert_use[<?php echo $i; ?>]" value="0" id="ca_hp_cert_use_no<?php echo $i; ?>" <?php if(!$row['ca_hp_cert_use']) echo 'checked="checked"'; ?>>
@ -216,7 +216,7 @@ if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
<td class="td_confirm">
<input type="checkbox" name="ca_adult_cert_use[<?php echo $i; ?>]" value="1" id="ca_adult_cert_use_yes<?php echo $i; ?>" <?php if($row['ca_adult_cert_use']) echo 'checked="checked"'; ?>>
<label for="ca_adult_cert_use_yes<?php echo $i; ?>">사용</label>
<!-- <input type="radio" name="ca_adult_cert_use[<?php echo $i; ?>]" value="1" id="ca_adult_cert_use_yes<?php echo $i; ?>" <?php if($row['ca_adult_cert_use']) echo 'checked="checked"'; ?>>
<label for="ca_adult_cert_use_yes<?php echo $i; ?>">사용함</label>
<input type="radio" name="ca_adult_cert_use[<?php echo $i; ?>]" value="0" id="ca_adult_cert_use_no<?php echo $i; ?>" <?php if(!$row['ca_adult_cert_use']) echo 'checked="checked"'; ?>>

View File

@ -16,7 +16,7 @@ for ($i=0; $i<count($_POST['ca_id']); $i++)
alert("\'{$_POST['ca_mb_id'][$i]}\' 은(는) 존재하는 회원아이디가 아닙니다.", "./categorylist.php?page=$page&amp;sort1=$sort1&amp;sort2=$sort2");
}
$sql = " update {$g5['shop_category_table']}
$sql = " update {$g5['g5_shop_category_table']}
set ca_name = '{$_POST['ca_name'][$i]}',
ca_mb_id = '{$_POST['ca_mb_id'][$i]}',
ca_img_width = '{$_POST['ca_img_width'][$i]}',

View File

@ -5,14 +5,14 @@ $name = '';
if ($it_id)
{
$sql = " select it_name from {$g5['shop_item_table']} where it_id = '$it_id' ";
$sql = " select it_name from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$row = sql_fetch($sql);
$code = $it_id;
$name = $row['it_name'];
}
else if ($ca_id)
{
$sql = " select ca_name from {$g5['shop_category_table']} where ca_id = '$ca_id' ";
$sql = " select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$ca_id' ";
$row = sql_fetch($sql);
$code = $ca_id;
$name = $row['ca_name'];

View File

@ -22,7 +22,7 @@ $de_kcp_mid = substr($_POST['de_kcp_mid'],0,3);
//
// 영카트 default
//
$sql = " update {$g5['shop_default_table']}
$sql = " update {$g5['g5_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(G5_EDITOR_LIB);
auth_check($auth[$sub_menu], "w");
// 상단, 하단 파일경로 필드 추가
$sql = " ALTER TABLE `{$g5['shop_content_table']}` ADD `co_include_head` VARCHAR( 255 ) NOT NULL ,
$sql = " ALTER TABLE `{$g5['g5_shop_content_table']}` ADD `co_include_head` VARCHAR( 255 ) NOT NULL ,
ADD `co_include_tail` VARCHAR( 255 ) NOT NULL ";
sql_query($sql, false);
@ -18,7 +18,7 @@ if ($w == "u")
$html_title .= " 수정";
$readonly = " readonly";
$sql = " select * from {$g5['shop_content_table']} where co_id = '$co_id' ";
$sql = " select * from {$g5['g5_shop_content_table']} where co_id = '$co_id' ";
$co = sql_fetch($sql);
if (!$co['co_id'])
alert('등록된 자료가 없습니다.');

View File

@ -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 {$g5['shop_content_table']} where co_id = '$co_id' ";
$sql = " select co_id from {$g5['g5_shop_content_table']} where co_id = '$co_id' ";
$row = sql_fetch($sql);
if ($row['co_id'])
alert("이미 같은 ID로 등록된 내용이 있습니다.");
$sql = " insert {$g5['shop_content_table']}
$sql = " insert {$g5['g5_shop_content_table']}
set co_id = '$co_id',
$sql_common ";
sql_query($sql);
}
else if ($w == "u")
{
$sql = " update {$g5['shop_content_table']}
$sql = " update {$g5['g5_shop_content_table']}
set $sql_common
where co_id = '$co_id' ";
sql_query($sql);
@ -49,7 +49,7 @@ else if ($w == "d")
@unlink(G5_DATA_PATH."/content/{$co_id}_h");
@unlink(G5_DATA_PATH."/content/{$co_id}_t");
$sql = " delete from {$g5['shop_content_table']} where co_id = '$co_id' ";
$sql = " delete from {$g5['g5_shop_content_table']} where co_id = '$co_id' ";
sql_query($sql);
}

View File

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

View File

@ -9,7 +9,7 @@ $g5['title'] = '쿠폰관리';
if ($w == 'u') {
$html_title = '쿠폰 수정';
$sql = " select * from {$g5['shop_coupon_table']} where cp_id = '$cp_id' ";
$sql = " select * from {$g5['g5_shop_coupon_table']} where cp_id = '$cp_id' ";
$cp = sql_fetch($sql);
if (!$cp['cp_id']) alert('등록된 자료가 없습니다.');
}

View File

@ -38,12 +38,12 @@ if($_POST['cp_type'] && ($_POST['cp_price'] < 1 || $_POST['cp_price'] > 99))
alert('할인비율을은 1과 99사이 값으로 입력해 주십시오.');
if($_POST['cp_method'] == 0) {
$sql = " select count(*) as cnt from {$g5['shop_item_table']} where it_id = '$cp_target' ";
$sql = " select count(*) as cnt from {$g5['g5_shop_item_table']} where it_id = '$cp_target' ";
$row = sql_fetch($sql);
if(!$row['cnt'])
alert('입력하신 상품코드는 존재하지 않는 상품코드입니다.');
} else if($_POST['cp_method'] == 1) {
$sql = " select count(*) as cnt from {$g5['shop_category_table']} where ca_id = '$cp_target' ";
$sql = " select count(*) as cnt from {$g5['g5_shop_category_table']} where ca_id = '$cp_target' ";
$row = sql_fetch($sql);
if(!$row['cnt'])
alert('입력하신 분류코드는 존재하지 않는 분류코드입니다.');
@ -65,7 +65,7 @@ if($w == '') {
do {
$cp_id = get_coupon_id();
$sql3 = " select count(*) as cnt from {$g5['shop_coupon_table']} where cp_id = '$cp_id' ";
$sql3 = " select count(*) as cnt from {$g5['g5_shop_coupon_table']} where cp_id = '$cp_id' ";
$row3 = sql_fetch($sql3);
if(!$row3['cnt'])
@ -76,14 +76,14 @@ if($w == '') {
}
} while(1);
$sql = " INSERT INTO {$g5['shop_coupon_table']}
$sql = " INSERT INTO {$g5['g5_shop_coupon_table']}
( cp_id, cp_subject, cp_method, cp_target, mb_id, cp_start, cp_end, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum, cp_datetime )
VALUES
( '$cp_id', '$cp_subject', '$cp_method', '$cp_target', '$mb_id', '$cp_start', '$cp_end', '$cp_type', '$cp_price', '$cp_trunc', '$cp_minimum', '$cp_maximum', '".G5_TIME_YMDHIS."' ) ";
sql_query($sql);
} else if($w == 'u') {
$sql = " select * from {$g5['shop_coupon_table']} where cp_id = '$cp_id' ";
$sql = " select * from {$g5['g5_shop_coupon_table']} where cp_id = '$cp_id' ";
$cp = sql_fetch($sql);
if(!$cp['cp_id'])
@ -93,7 +93,7 @@ if($w == '') {
$mb_id = '전체회원';
}
$sql = " update {$g5['shop_coupon_table']}
$sql = " update {$g5['g5_shop_coupon_table']}
set cp_subject = '$cp_subject',
cp_method = '$cp_method',
cp_target = '$cp_target',

View File

@ -6,7 +6,7 @@ auth_check($auth[$sub_menu], "r");
$token = get_token();
$sql_common = " from {$g5['shop_coupon_table']} ";
$sql_common = " from {$g5['g5_shop_coupon_table']} ";
$sql_search = " where (1) ";
if ($stx) {
@ -112,12 +112,12 @@ $colspan = 8;
for ($i=0; $row=sql_fetch_array($result); $i++) {
switch($row['cp_method']) {
case '0':
$sql3 = " select it_name from {$g5['shop_item_table']} where it_id = '{$row['cp_target']}' ";
$sql3 = " select it_name from {$g5['g5_shop_item_table']} where it_id = '{$row['cp_target']}' ";
$row3 = sql_fetch($sql3);
$cp_target = get_text($row3['it_name']);
break;
case '1':
$sql3 = " select ca_name from {$g5['shop_category_table']} where ca_id = '{$row['cp_target']}' ";
$sql3 = " select ca_name from {$g5['g5_shop_category_table']} where ca_id = '{$row['cp_target']}' ";
$row3 = sql_fetch($sql3);
$cp_target = get_text($row3['ca_name']);
break;
@ -133,7 +133,7 @@ $colspan = 8;
$link2 = '</a>';
// 쿠폰사용회수
$sql = " select count(*) as cnt from {$g5['shop_coupon_log_table']} where cp_id = '{$row['cp_id']}' ";
$sql = " select count(*) as cnt from {$g5['g5_shop_coupon_log_table']} where cp_id = '{$row['cp_id']}' ";
$tmp = sql_fetch($sql);
$used_count = $tmp['cnt'];
?>

View File

@ -17,7 +17,7 @@ for ($i=0; $i<$count; $i++)
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$sql = " delete from {$g5['shop_coupon_table']} where cp_id = '{$_POST['cp_id'][$k]}' ";
$sql = " delete from {$g5['g5_shop_coupon_table']} where cp_id = '{$_POST['cp_id'][$k]}' ";
sql_query($sql);
}

View File

@ -22,14 +22,14 @@ $g5['title'] = $html_title.'검색';
include_once(G5_PATH.'/head.sub.php');
if($_GET['sch_target'] == 1) {
$sql_common = " from {$g5['shop_category_table']} ";
$sql_common = " from {$g5['g5_shop_category_table']} ";
$sql_where = " where ca_use = '1' ";
if($_GET['sch_word'])
$sql_where .= " and ca_name like '%$sch_word%' ";
$sql_select = " select ca_id as t_id, ca_name as t_name ";
$sql_order = " order by ca_name ";
} else {
$sql_common = " from {$g5['shop_item_table']} ";
$sql_common = " from {$g5['g5_shop_item_table']} ";
$sql_where = " where it_use = '1' ";
if($GET['sch_word'])
$sql_where .= " and it_name like '%$sch_word%' ";

View File

@ -11,7 +11,7 @@ if ($w == "u") {
$html_title .= ' 수정';
$readonly = ' readonly';
$sql = " select * from {$g5['shop_delivery_table']} where dl_id = '$dl_id' ";
$sql = " select * from {$g5['g5_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 {$g5['shop_delivery_table']} auto_increment=1 ";
$sql = " alter table {$g5['g5_shop_delivery_table']} auto_increment=1 ";
sql_query($sql);
$sql = " insert {$g5['shop_delivery_table']} $sql_common ";
$sql = " insert {$g5['g5_shop_delivery_table']} $sql_common ";
sql_query($sql);
$dl_id = mysql_insert_id();
} else if ($w == "u") {
$sql = " update {$g5['shop_delivery_table']} $sql_common where dl_id = '$dl_id' ";
$sql = " update {$g5['g5_shop_delivery_table']} $sql_common where dl_id = '$dl_id' ";
sql_query($sql);
} else if ($w == "d") {
// Master 삭제
$sql = " delete from {$g5['shop_delivery_table']} where dl_id = '$dl_id' ";
$sql = " delete from {$g5['g5_shop_delivery_table']} where dl_id = '$dl_id' ";
sql_query($sql);
}

View File

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

View File

@ -11,7 +11,7 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
// 배송회사리스트 ---------------------------------------------
$delivery_options = '<option value="">선택하세요</option>'.PHP_EOL;
$sql = " select * from {$g5['shop_delivery_table']} order by dl_order ";
$sql = " select * from {$g5['g5_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'].'</option>'.PHP_EOL;
@ -33,7 +33,7 @@ if ($sel_ca_id != "") {
if ($sel_field == "") $sel_field = "od_id";
$sql_common = " from {$g5['shop_order_table']}
$sql_common = " from {$g5['g5_shop_order_table']}
$sql_search ";
// 테이블의 전체 레코드수만 얻음
@ -43,7 +43,7 @@ if ($chk_misu) {
$total_count = mysql_num_rows($result);
}
else {
$row = sql_fetch("select count(od_id) as cnt from {$g5['shop_order_table']} $sql_search ");
$row = sql_fetch("select count(od_id) as cnt from {$g5['g5_shop_order_table']} $sql_search ");
$total_count = $row['cnt'];
}

View File

@ -19,7 +19,7 @@ if ($default['de_sms_use'] == "icode")
}
if($_POST['send_escrow']) {
$sql = " select dl_id, dl_company from {$g5['shop_delivery_table']} order by dl_id asc ";
$sql = " select dl_id, dl_company from {$g5['g5_shop_delivery_table']} order by dl_id asc ";
$result = sql_query($sql);
$dl_comp = array();
for($i=0; $row=sql_fetch_array($result); $i++) {
@ -38,7 +38,7 @@ for ($m=0; $m<count($_POST['od_id']); $m++)
// 배송회사와 운송장번호가 있는것만 수정
if ($_POST['dl_id'][$m] && trim($_POST['od_invoice'][$m]))
{
$sql = "update {$g5['shop_order_table']}
$sql = "update {$g5['g5_shop_order_table']}
set od_invoice_time = '{$_POST['od_invoice_time'][$m]}',
dl_id = '{$_POST['dl_id'][$m]}',
od_invoice = '{$_POST['od_invoice'][$m]}'
@ -51,7 +51,7 @@ for ($m=0; $m<count($_POST['od_id']); $m++)
$od_id = $_POST['od_id'][$m];
// 장바구니 상태가 '주문', '준비' 일 경우 '배송' 으로 상태를 변경
$sql = " update {$g5['shop_cart_table']}
$sql = " update {$g5['g5_shop_cart_table']}
set ct_status = '배송'
where ct_status in ('주문', '준비')
and od_id = '$od_id' ";
@ -60,16 +60,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 {$g5['shop_cart_table']}
$sql2 = " select it_id, ct_id, ct_stock_use, ct_qty from {$g5['g5_shop_cart_table']}
where od_id = '$od_id'
and ct_stock_use = '0' ";
$result2 = sql_query($sql2);
for ($k=0; $row2=mysql_fetch_array($result2); $k++)
{
$sql3 =" update {$g5['shop_item_table']} set it_stock_qty = it_stock_qty - '{$row2['ct_qty']}' where it_id = '{$row2['it_id']}' ";
$sql3 =" update {$g5['g5_shop_item_table']} set it_stock_qty = it_stock_qty - '{$row2['ct_qty']}' where it_id = '{$row2['it_id']}' ";
sql_query($sql3);
$sql4 = " update {$g5['shop_cart_table']}
$sql4 = " update {$g5['g5_shop_cart_table']}
set ct_stock_use = '1',
ct_history = CONCAT(ct_history,'\n배송일괄|$now|$REMOTE_ADDR')
where od_id = '$od_id'
@ -81,10 +81,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 {$g5['shop_order_table']} where od_id = '$od_id' ";
$sql = " select od_id, od_name, od_invoice, od_hp, dl_id from {$g5['g5_shop_order_table']} where od_id = '$od_id' ";
$od = sql_fetch($sql);
$sql = " select dl_company from {$g5['shop_delivery_table']} where dl_id = '{$od['dl_id']}' ";
$sql = " select dl_company from {$g5['g5_shop_delivery_table']} where dl_id = '{$od['dl_id']}' ";
$dl = sql_fetch($sql);
$sms_contents = $default['de_sms_cont4'];
@ -115,7 +115,7 @@ for ($m=0; $m<count($_POST['od_id']); $m++)
}
else
{
$sql = "update {$g5['shop_order_table']}
$sql = "update {$g5['g5_shop_order_table']}
set od_invoice_time = '',
dl_id = '',
od_invoice = ''

View File

@ -5,7 +5,7 @@ include_once(G5_EDITOR_LIB);
auth_check($auth[$sub_menu], "w");
$sql = " select * from {$g5['shop_faq_master_table']} where fm_id = '$fm_id' ";
$sql = " select * from {$g5['g5_shop_faq_master_table']} where fm_id = '$fm_id' ";
$fm = sql_fetch($sql);
$html_title = 'FAQ '.$fm['fm_subject'];;
@ -16,7 +16,7 @@ if ($w == "u")
$html_title .= " 수정";
$readonly = " readonly";
$sql = " select * from {$g5['shop_faq_table']} where fa_id = '$fa_id' ";
$sql = " select * from {$g5['g5_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 {$g5['shop_faq_table']}
$sql = " insert {$g5['g5_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 {$g5['shop_faq_table']}
$sql = " update {$g5['g5_shop_faq_table']}
set $sql_common
where fa_id = '$fa_id' ";
sql_query($sql);
}
else if ($w == "d")
{
$sql = " delete from {$g5['shop_faq_table']} where fa_id = '$fa_id' ";
$sql = " delete from {$g5['g5_shop_faq_table']} where fa_id = '$fa_id' ";
sql_query($sql);
}

View File

@ -8,10 +8,10 @@ $g5['title'] = 'FAQ 상세관리';
if ($fm_subject) $g5['title'] .= ' : '.$fm_subject;
include_once (G5_ADMIN_PATH.'/admin.head.php');
$sql = " select * from {$g5['shop_faq_master_table']} where fm_id = '$fm_id' ";
$sql = " select * from {$g5['g5_shop_faq_master_table']} where fm_id = '$fm_id' ";
$fm = sql_fetch($sql);
$sql_common = " from {$g5['shop_faq_table']} where fm_id = '$fm_id' ";
$sql_common = " from {$g5['g5_shop_faq_table']} where fm_id = '$fm_id' ";
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
@ -49,7 +49,7 @@ $result = sql_query($sql);
<?php
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$row1 = sql_fetch(" select COUNT(*) as cnt from {$g5['shop_faq_table']} where fm_id = '{$row['fm_id']}' ");
$row1 = sql_fetch(" select COUNT(*) as cnt from {$g5['g5_shop_faq_table']} where fm_id = '{$row['fm_id']}' ");
$cnt = $row1[cnt];
$s_mod = icon("수정", "");

View File

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

View File

@ -22,17 +22,17 @@ $sql_common = " set fm_subject = '$fm_subject',
if ($w == "")
{
$sql = " alter table {$g5['shop_faq_master_table']} auto_increment=1 ";
$sql = " alter table {$g5['g5_shop_faq_master_table']} auto_increment=1 ";
sql_query($sql);
$sql = " insert {$g5['shop_faq_master_table']} $sql_common ";
$sql = " insert {$g5['g5_shop_faq_master_table']} $sql_common ";
sql_query($sql);
$fm_id = mysql_insert_id();
}
else if ($w == "u")
{
$sql = " update {$g5['shop_faq_master_table']} $sql_common where fm_id = '$fm_id' ";
$sql = " update {$g5['g5_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(G5_DATA_PATH."/faq/{$fm_id}_t");
// FAQ삭제
$sql = " delete from {$g5['shop_faq_master_table']} where fm_id = '$fm_id' ";
$sql = " delete from {$g5['g5_shop_faq_master_table']} where fm_id = '$fm_id' ";
sql_query($sql);
// FAQ상세삭제
$sql = " delete from {$g5['shop_faq_table']} where fm_id = '$fm_id' ";
$sql = " delete from {$g5['g5_shop_faq_table']} where fm_id = '$fm_id' ";
sql_query($sql);
}

View File

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

View File

@ -33,7 +33,7 @@ $pg_anchor = '<ul class="anchor">
<?php
// 미수금이 없고 운송장번호가 없는 자료를 구함
$sql = " select *
from {$g5['shop_order_table']}
from {$g5['g5_shop_order_table']}
where od_receipt_price > 0 and od_misu <= 0 and od_invoice = ''
order by od_id desc
limit $max_limit ";
@ -93,7 +93,7 @@ $pg_anchor = '<ul class="anchor">
<?php
// 미수금이 있고 송장번호가 없는 자료를 구함
$sql = " select *
from {$g5['shop_order_table']}
from {$g5['g5_shop_order_table']}
where od_misu > 0
order by od_id desc
limit $max_limit ";
@ -192,7 +192,7 @@ $pg_anchor = '<ul class="anchor">
</thead>
<tbody>
<?php
$sql = " select * from {$g5['shop_item_qa_table']}
$sql = " select * from {$g5['g5_shop_item_qa_table']}
where iq_answer = ''
order by iq_id desc
limit $max_limit ";

View File

@ -14,17 +14,17 @@ $t_it_id = preg_replace("/[A-Za-z0-9\-_]/", "", $new_it_id);
if($t_it_id)
alert("상품코드는 영문자, 숫자, -, _ 만 사용할 수 있습니다.");
$row = sql_fetch(" select count(*) as cnt from {$g5['shop_item_table']} where it_id = '$new_it_id' ");
$row = sql_fetch(" select count(*) as cnt from {$g5['g5_shop_item_table']} where it_id = '$new_it_id' ");
if ($row['cnt'])
alert('이미 존재하는 상품코드 입니다.');
$sql = " select * from {$g5['shop_item_table']} where it_id = '$it_id' limit 1 ";
$sql = " select * from {$g5['g5_shop_item_table']} where it_id = '$it_id' limit 1 ";
$cp = sql_fetch($sql);
// 상품테이블의 필드가 추가되어도 수정하지 않도록 필드명을 추출하여 insert 퀴리를 생성한다. (상품코드만 새로운것으로 대체)
$sql_common = "";
$fields = mysql_list_fields(G5_MYSQL_DB, $g5['shop_item_table']);
$fields = mysql_list_fields(G5_MYSQL_DB, $g5['g5_shop_item_table']);
$columns = mysql_num_fields($fields);
for ($i = 0; $i < $columns; $i++) {
$fld = mysql_field_name($fields, $i);
@ -33,15 +33,15 @@ for ($i = 0; $i < $columns; $i++) {
}
}
$sql = " insert {$g5['shop_item_table']}
$sql = " insert {$g5['g5_shop_item_table']}
set it_id = '$new_it_id'
$sql_common ";
sql_query($sql);
// 선택/추가 옵션 copy
$opt_sql = " insert ignore into {$g5['shop_item_option_table']} ( io_id, io_type, it_id, io_price, io_stock_qty, io_noti_qty, io_use )
$opt_sql = " insert ignore into {$g5['g5_shop_item_option_table']} ( io_id, io_type, it_id, io_price, io_stock_qty, io_noti_qty, io_use )
select io_id, io_type, '$new_it_id', io_price, io_stock_qty, io_noti_qty, io_use
from {$g5['shop_item_option_table']}
from {$g5['g5_shop_item_option_table']}
where it_id = '$it_id'
order by io_no asc ";
sql_query($opt_sql);
@ -69,7 +69,7 @@ if($cp['it_explan']) {
}
}
$sql = " update {$g5['shop_item_table']} set it_explan = '{$cp['it_explan']}' where it_id = '$new_it_id' ";
$sql = " update {$g5['g5_shop_item_table']} set it_explan = '{$cp['it_explan']}' where it_id = '$new_it_id' ";
sql_query($sql);
}
@ -95,7 +95,7 @@ if($cp['it_mobile_explan']) {
}
}
$sql = " update {$g5['shop_item_table']} set it_mobile_explan = '{$cp['it_mobile_explan']}' where it_id = '$new_it_id' ";
$sql = " update {$g5['g5_shop_item_table']} set it_mobile_explan = '{$cp['it_mobile_explan']}' where it_id = '$new_it_id' ";
sql_query($sql);
}
@ -153,7 +153,7 @@ for($i=1; $i<=10; $i++) {
$comma = ',';
}
$sql = " update {$g5['shop_item_table']}
$sql = " update {$g5['g5_shop_item_table']}
set $sql_img
where it_id = '$new_it_id' ";
sql_query($sql);

View File

@ -13,7 +13,7 @@ if (!function_exists("itemdelete")) {
global $g5, $is_admin;
$sql = " select it_explan, it_mobile_explan, it_img1, it_img2, it_img3, it_img4, it_img5, it_img6, it_img7, it_img8, it_img9, it_img10
from {$g5['shop_item_table']} where it_id = '$it_id' ";
from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$it = sql_fetch($sql);
// 상품 이미지 삭제
@ -41,23 +41,23 @@ if (!function_exists("itemdelete")) {
@unlink(G5_DATA_PATH."/item/$it_id"."_t");
// 장바구니 삭제
$sql = " delete from {$g5['shop_cart_table']} where it_id = '$it_id' ";
$sql = " delete from {$g5['g5_shop_cart_table']} where it_id = '$it_id' ";
sql_query($sql);
// 이벤트삭제
$sql = " delete from {$g5['shop_event_item_table']} where it_id = '$it_id' ";
$sql = " delete from {$g5['g5_shop_event_item_table']} where it_id = '$it_id' ";
sql_query($sql);
// 사용후기삭제
$sql = " delete from {$g5['shop_item_use_table']} where it_id = '$it_id' ";
$sql = " delete from {$g5['g5_shop_item_use_table']} where it_id = '$it_id' ";
sql_query($sql);
// 상품문의삭제
$sql = " delete from {$g5['shop_item_qa_table']} where it_id = '$it_id' ";
$sql = " delete from {$g5['g5_shop_item_qa_table']} where it_id = '$it_id' ";
sql_query($sql);
// 관련상품삭제
$sql = " delete from {$g5['shop_item_relation_table']} where it_id = '$it_id' or it_id2 = '$it_id' ";
$sql = " delete from {$g5['g5_shop_item_relation_table']} where it_id = '$it_id' or it_id2 = '$it_id' ";
sql_query($sql);
@ -97,7 +97,7 @@ if (!function_exists("itemdelete")) {
// 상품 삭제
$sql = " delete from {$g5['shop_item_table']} where it_id = '$it_id' ";
$sql = " delete from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
sql_query($sql);
}
}

View File

@ -7,7 +7,7 @@ auth_check($auth[$sub_menu], "r");
$g5['title'] = '이벤트관리';
include_once (G5_ADMIN_PATH.'/admin.head.php');
$sql_common = " from {$g5['shop_event_table']} ";
$sql_common = " from {$g5['g5_shop_event_table']} ";
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
@ -42,7 +42,7 @@ $result = sql_query($sql);
for ($i=0; $row=mysql_fetch_array($result); $i++) {
$href = "";
$sql = " select count(ev_id) as cnt from {$g5['shop_event_item_table']} where ev_id = '{$row['ev_id']}' ";
$sql = " select count(ev_id) as cnt from {$g5['g5_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

@ -13,14 +13,14 @@ if ($w == "u")
$html_title .= " 수정";
$readonly = " readonly";
$sql = " select * from {$g5['shop_event_table']} where ev_id = '$ev_id' ";
$sql = " select * from {$g5['g5_shop_event_table']} where ev_id = '$ev_id' ";
$ev = sql_fetch($sql);
if (!$ev['ev_id'])
alert("등록된 자료가 없습니다.");
// 등록된 이벤트 상품
$sql = " select b.it_id, b.it_name
from {$g5['shop_event_item_table']} a left join {$g5['shop_item_table']} b on ( a.it_id = b.it_id )
from {$g5['g5_shop_event_item_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id )
where a.ev_id = '$ev_id' ";
$res_item = sql_query($sql);
}
@ -42,7 +42,7 @@ else
// 분류리스트
$category_select = '';
$sql = " select * from {$g5['shop_category_table']} ";
$sql = " select * from {$g5['g5_shop_category_table']} ";
if ($is_admin != 'super')
$sql .= " where ca_mb_id = '{$member['mb_id']}' ";
$sql .= " order by ca_id ";

View File

@ -33,14 +33,14 @@ if ($w == "")
{
$ev_id = G5_SERVER_TIME;
$sql = " insert {$g5['shop_event_table']}
$sql = " insert {$g5['g5_shop_event_table']}
$sql_common
, ev_id = '$ev_id' ";
sql_query($sql);
}
else if ($w == "u")
{
$sql = " update {$g5['shop_event_table']}
$sql = " update {$g5['g5_shop_event_table']}
$sql_common
where ev_id = '$ev_id' ";
sql_query($sql);
@ -52,10 +52,10 @@ else if ($w == "d")
@unlink(G5_DATA_PATH."/event/{$ev_id}_t");
// 이벤트상품삭제
$sql = " delete from {$g5['shop_event_item_table']} where ev_id = '$ev_id' ";
$sql = " delete from {$g5['g5_shop_event_item_table']} where ev_id = '$ev_id' ";
sql_query($sql);
$sql = " delete from {$g5['shop_event_table']} where ev_id = '$ev_id' ";
$sql = " delete from {$g5['g5_shop_event_table']} where ev_id = '$ev_id' ";
sql_query($sql);
}
@ -66,7 +66,7 @@ if ($w == "" || $w == "u")
if ($_FILES['ev_timg']['name']) upload_file($_FILES['ev_timg']['tmp_name'], $ev_id."_t", G5_DATA_PATH."/event");
// 등록된 이벤트 상품 먼저 삭제
$sql = " delete from {$g5['shop_event_item_table']} where ev_id = '$ev_id' ";
$sql = " delete from {$g5['g5_shop_event_item_table']} where ev_id = '$ev_id' ";
sql_query($sql);
// 이벤트 상품등록
@ -76,7 +76,7 @@ if ($w == "" || $w == "u")
for($i=0; $i<$count; $i++) {
$it_id = $item[$i];
if($it_id) {
$sql = " insert into {$g5['shop_event_item_table']}
$sql = " insert into {$g5['g5_shop_event_item_table']}
set ev_id = '$ev_id',
it_id = '$it_id' ";
sql_query($sql);

View File

@ -24,8 +24,8 @@ if ($sel_field == "") {
$sel_field = "it_name";
}
$sql_common = " from {$g5['shop_item_table']} a
left join {$g5['shop_event_item_table']} b on (a.it_id=b.it_id and b.ev_id='$ev_id') ";
$sql_common = " from {$g5['g5_shop_item_table']} a
left join {$g5['g5_shop_event_item_table']} b on (a.it_id=b.it_id and b.ev_id='$ev_id') ";
$sql_common .= $sql_search;
// 테이블의 전체 레코드수만 얻음
@ -79,7 +79,7 @@ if (isset($ev_set)) {
<?php
// 이벤트 옵션처리
$event_option = "<option value=''>이벤트를 선택하세요</option>";
$sql1 = " select ev_id, ev_subject from {$g5['shop_event_table']} order by ev_id desc ";
$sql1 = " select ev_id, ev_subject from {$g5['g5_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'].'`'.$row1['ev_subject'].'" '.get_selected($ev_set, $row1['ev_id'].'`'.$row1['ev_subject']).' >'.conv_subject($row1['ev_subject'], 20,"…").'</option>';
@ -103,7 +103,7 @@ if (isset($ev_set)) {
<select name="sel_ca_id" id="sel_ca_id">
<option value=''>전체분류</option>
<?php
$sql1 = " select ca_id, ca_name from {$g5['shop_category_table']} order by ca_id ";
$sql1 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} order by ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=mysql_fetch_array($result1); $i++)
{
@ -161,7 +161,7 @@ if (isset($ev_set)) {
<?php for ($i=0; $row=mysql_fetch_array($result); $i++) {
$href = G5_SHOP_URL.'/item.php?it_id='.$row['it_id'];
$sql = " select ev_id from {$g5['shop_event_item_table']}
$sql = " select ev_id from {$g5['g5_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 {$g5['shop_event_item_table']}
$sql = " delete from {$g5['g5_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 {$g5['shop_event_item_table']}
$sql = "insert into {$g5['g5_shop_event_item_table']}
set ev_id = '$ev_id',
it_id = '{$_POST['it_id'][$i]}' ";
sql_query($sql);

View File

@ -8,7 +8,7 @@ if(!trim($_POST['ca_id']))
die("");
$sql = " select it_id, it_name
from {$g5['shop_item_table']}
from {$g5['g5_shop_item_table']}
where ( ca_id like '$ca_id%' or ca_id2 like '$ca_id%' or ca_id3 like '$ca_id%' )
order by ca_id, it_name ";
$result = sql_query($sql);
@ -16,7 +16,7 @@ $result = sql_query($sql);
$list = '';
for($i=0;$row=sql_fetch_array($result);$i++) {
if($w == 'u') {
$sql2 = " select count(*) as cnt from {$g5['shop_event_item_table']} where ev_id = '$ev_id' and it_id = '{$row['it_id']}' ";
$sql2 = " select count(*) as cnt from {$g5['g5_shop_event_item_table']} where ev_id = '$ev_id' and it_id = '{$row['it_id']}' ";
$row2 = sql_fetch($sql2);
if ($row2['cnt'])
continue;

View File

@ -4,7 +4,7 @@ include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
$sql = " select ev_subject from {$g5['shop_event_table']} where ev_id = '$ev_id' ";
$sql = " select ev_subject from {$g5['g5_shop_event_table']} where ev_id = '$ev_id' ";
$ev = sql_fetch($sql);
$g5['title'] = $ev['ev_subject'].' 이벤트상품';
@ -23,8 +23,8 @@ include_once(G5_PATH.'/head.sub.php');
</thead>
<tbody>
<?php
$sql = " select b.it_id, b.it_name, b.it_use from {$g5['shop_event_item_table']} a
left join {$g5['shop_item_table']} b on (a.it_id=b.it_id)
$sql = " select b.it_id, b.it_name, b.it_use from {$g5['g5_shop_event_item_table']} a
left join {$g5['g5_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 {$g5['shop_event_item_table']} where ev_id = '$ev_id' and it_id = '$it_id' ";
$sql = " delete from {$g5['g5_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

@ -72,7 +72,7 @@ if($_FILES['excelfile']['tmp_name']) {
$succ_count = 0;
$comma = '';
$sql = " INSERT INTO {$g5['shop_item_table']}
$sql = " INSERT INTO {$g5['g5_shop_item_table']}
( it_id, ca_id, ca_id2, ca_id3, it_name, it_maker, it_origin, it_brand, it_model, it_type1, it_type2, it_type3, it_type4, it_type5, it_basic, it_explan, it_mobile_explan, it_explan_html, it_cust_price, it_price, it_point, it_sell_email, it_use, it_stock_qty, it_time, it_ip, it_order, it_tel_inq, it_img1, it_img2, it_img3, it_img4, it_img5, it_img6, it_img7, it_img8, it_img9, it_img10 )
VALUES ";
@ -121,7 +121,7 @@ if($_FILES['excelfile']['tmp_name']) {
}
// it_id 중복체크
$sql2 = " select count(*) as cnt from {$g5['shop_item_table']} where it_id = '$it_id' ";
$sql2 = " select count(*) as cnt from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$row2 = sql_fetch($sql2);
if($row2['cnt']) {
$fail_it_id[] = $it_id;
@ -132,7 +132,7 @@ if($_FILES['excelfile']['tmp_name']) {
}
// 기본분류체크
$sql2 = " select count(*) as cnt from {$g5['shop_category_table']} where ca_id = '$ca_id' ";
$sql2 = " select count(*) as cnt from {$g5['g5_shop_category_table']} where ca_id = '$ca_id' ";
$row2 = sql_fetch($sql2);
if(!$row2['cnt']) {
$fail_it_id[] = $it_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 {$g5['shop_category_table']} order by ca_id limit 1 ";
$sql = " select ca_id from {$g5['g5_shop_category_table']} order by ca_id limit 1 ";
$row = sql_fetch($sql);
if (!$row['ca_id'])
alert("등록된 분류가 없습니다. 우선 분류를 등록하여 주십시오.");
@ -36,7 +36,7 @@ else if ($w == "u")
if ($is_admin != 'super')
{
$sql = " select it_id from {$g5['shop_item_table']} a, {$g5['shop_category_table']} b
$sql = " select it_id from {$g5['g5_shop_item_table']} a, {$g5['g5_shop_category_table']} b
where a.it_id = '$it_id'
and a.ca_id = b.ca_id
and b.ca_mb_id = '{$member['mb_id']}' ";
@ -45,13 +45,13 @@ else if ($w == "u")
alert("\'{$member['mb_id']}\' 님께서 수정 할 권한이 없는 상품입니다.");
}
$sql = " select * from {$g5['shop_item_table']} where it_id = '$it_id' ";
$sql = " select * from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$it = sql_fetch($sql);
if (!$ca_id)
$ca_id = $it['ca_id'];
$sql = " select * from {$g5['shop_category_table']} where ca_id = '$ca_id' ";
$sql = " select * from {$g5['g5_shop_category_table']} where ca_id = '$ca_id' ";
$ca = sql_fetch($sql);
}
else
@ -74,7 +74,7 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
// 분류리스트
$category_select = '';
$script = '';
$sql = " select * from {$g5['shop_category_table']} ";
$sql = " select * from {$g5['g5_shop_category_table']} ";
if ($is_admin != 'super')
$sql .= " where ca_mb_id = '{$member['mb_id']}' ";
$sql .= " order by ca_id ";
@ -1002,7 +1002,7 @@ $(function(){
<select id="sch_relation">
<option value=''>분류별 상품</option>
<?php
$sql = " select * from {$g5['shop_category_table']} ";
$sql = " select * from {$g5['g5_shop_category_table']} ";
if ($is_admin != 'super')
$sql .= " where ca_mb_id = '{$member['mb_id']}' ";
$sql .= " order by ca_id ";
@ -1092,8 +1092,8 @@ $(function(){
<?php
$str = array();
$sql = " select b.ca_id, b.it_id, b.it_name, b.it_price
from {$g5['shop_item_relation_table']} a
left join {$g5['shop_item_table']} b on (a.it_id2=b.it_id)
from {$g5['g5_shop_item_relation_table']} a
left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id)
where a.it_id = '$it_id'
order by ir_no asc ";
$result = sql_query($sql);
@ -1133,7 +1133,7 @@ $(function(){
<h3>등록된 전체이벤트 목록</h3>
<div id="event_list" class="srel_list srel_noneimg">
<?php
$sql = " select ev_id, ev_subject from {$g5['shop_event_table']} order by ev_id desc ";
$sql = " select ev_id, ev_subject from {$g5['g5_shop_event_table']} order by ev_id desc ";
$result = sql_query($sql);
for ($g=0; $row=sql_fetch_array($result); $g++) {
if($g == 0)
@ -1205,8 +1205,8 @@ $(function(){
$str = "";
$comma = "";
$sql = " select b.ev_id, b.ev_subject
from {$g5['shop_event_item_table']} a
left join {$g5['shop_event_table']} b on (a.ev_id=b.ev_id)
from {$g5['g5_shop_event_item_table']} a
left join {$g5['g5_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);

View File

@ -3,7 +3,7 @@ $sub_menu = '400300';
include_once('./_common.php');
$sql = " select ca_id, it_id, it_name, it_price
from {$g5['shop_item_table']}
from {$g5['g5_shop_item_table']}
where it_id <> '$it_id'
and ( ca_id like '$ca_id%' or ca_id2 like '$ca_id%' or ca_id3 like '$ca_id%' )
order by ca_id, it_name ";
@ -12,7 +12,7 @@ $result = sql_query($sql);
$list = '';
for($i=0;$row=sql_fetch_array($result);$i++) {
$sql2 = " select count(*) as cnt from {$g5['shop_item_relation_table']} where it_id = '$it_id' and it_id2 = '{$row['it_id']}' ";
$sql2 = " select count(*) as cnt from {$g5['g5_shop_item_relation_table']} where it_id = '$it_id' and it_id2 = '{$row['it_id']}' ";
$row2 = sql_fetch($sql2);
if ($row2['cnt'])
continue;

View File

@ -16,7 +16,7 @@ else if ($w == 'd')
// 파일정보
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 {$g5['shop_item_table']}
from {$g5['g5_shop_item_table']}
where it_id = '$it_id' ";
$file = sql_fetch($sql);
@ -193,16 +193,16 @@ if ($w == "" || $w == "u")
// 관련상품을 우선 삭제함
sql_query(" delete from {$g5['shop_item_relation_table']} where it_id = '$it_id' ");
sql_query(" delete from {$g5['g5_shop_item_relation_table']} where it_id = '$it_id' ");
// 관련상품의 반대도 삭제
sql_query(" delete from {$g5['shop_item_relation_table']} where it_id2 = '$it_id' ");
sql_query(" delete from {$g5['g5_shop_item_relation_table']} where it_id2 = '$it_id' ");
// 이벤트상품을 우선 삭제함
sql_query(" delete from {$g5['shop_event_item_table']} where it_id = '$it_id' ");
sql_query(" delete from {$g5['g5_shop_event_item_table']} where it_id = '$it_id' ");
// 선택옵션
sql_query(" delete from {$g5['shop_item_option_table']} where io_type = '0' and it_id = '$it_id' "); // 기존선택옵션삭제
sql_query(" delete from {$g5['g5_shop_item_option_table']} where io_type = '0' and it_id = '$it_id' "); // 기존선택옵션삭제
$option_count = count($_POST['opt_id']);
if($option_count) {
@ -228,7 +228,7 @@ if($option_count) {
}
// 추가옵션
sql_query(" delete from {$g5['shop_item_option_table']} where io_type = '1' and it_id = '$it_id' "); // 기존추가옵션삭제
sql_query(" delete from {$g5['g5_shop_item_option_table']} where io_type = '1' and it_id = '$it_id' "); // 기존추가옵션삭제
$supply_count = count($_POST['spl_id']);
if($supply_count) {
@ -323,14 +323,14 @@ if ($w == "")
if($t_it_id)
alert('상품 코드는 영문자, 숫자, -, _ 만 사용할 수 있습니다.');
$sql = " insert {$g5['shop_item_table']}
$sql = " insert {$g5['g5_shop_item_table']}
set it_id = '$it_id',
$sql_common ";
sql_query($sql);
}
else if ($w == "u")
{
$sql = " update {$g5['shop_item_table']}
$sql = " update {$g5['g5_shop_item_table']}
set $sql_common
where it_id = '$it_id' ";
sql_query($sql);
@ -340,7 +340,7 @@ else if ($w == "d")
{
if ($is_admin != 'super')
{
$sql = " select it_id from {$g5['shop_item_table']} a, {$g5['shop_category_table']} b
$sql = " select it_id from {$g5['g5_shop_item_table']} a, {$g5['g5_shop_category_table']} b
where a.it_id = '$it_id'
and a.ca_id = b.ca_id
and b.ca_mb_id = '{$member['mb_id']}' ";
@ -361,14 +361,14 @@ if ($w == "" || $w == "u")
{
if (trim($it_id2[$i]))
{
$sql = " insert into {$g5['shop_item_relation_table']}
$sql = " insert into {$g5['g5_shop_item_relation_table']}
set it_id = '$it_id',
it_id2 = '$it_id2[$i]',
ir_no = '$i' ";
sql_query($sql, false);
// 관련상품의 반대로도 등록
$sql = " insert into {$g5['shop_item_relation_table']}
$sql = " insert into {$g5['g5_shop_item_relation_table']}
set it_id = '$it_id2[$i]',
it_id2 = '$it_id',
ir_no = '$i' ";
@ -382,7 +382,7 @@ if ($w == "" || $w == "u")
{
if (trim($ev_id[$i]))
{
$sql = " insert into {$g5['shop_event_item_table']}
$sql = " insert into {$g5['g5_shop_event_item_table']}
set ev_id = '$ev_id[$i]',
it_id = '$it_id' ";
sql_query($sql, false);
@ -393,7 +393,7 @@ if ($w == "" || $w == "u")
// 선택옵션등록
if($option_count) {
$comma = '';
$sql = " INSERT INTO {$g5['shop_item_option_table']}
$sql = " INSERT INTO {$g5['g5_shop_item_option_table']}
( `io_id`, `io_type`, `it_id`, `io_price`, `io_stock_qty`, `io_noti_qty`, `io_use` )
VALUES ";
for($i=0; $i<$option_count; $i++) {
@ -407,7 +407,7 @@ if($option_count) {
// 추가옵션등록
if($supply_count) {
$comma = '';
$sql = " INSERT INTO {$g5['shop_item_option_table']}
$sql = " INSERT INTO {$g5['g5_shop_item_option_table']}
( `io_id`, `io_type`, `it_id`, `io_price`, `io_stock_qty`, `io_noti_qty`, `io_use` )
VALUES ";
for($i=0; $i<$supply_count; $i++) {
@ -443,11 +443,11 @@ if(is_checked('chk_ca_it_mobile_head_html')) $ca_fields .= " , it_mobile_head
if(is_checked('chk_ca_it_mobile_tail_html')) $ca_fields .= " , it_mobile_tail_html = '$it_mobile_tail_html' ";
if($ca_fields) {
sql_query(" update {$g5['shop_item_table']} set it_name = it_name {$ca_fields} where ca_id = '$ca_id' ");
sql_query(" update {$g5['g5_shop_item_table']} set it_name = it_name {$ca_fields} where ca_id = '$ca_id' ");
if($ca_id2)
sql_query(" update {$g5['shop_item_table']} set it_name = it_name {$ca_fields} where ca_id2 = '$ca_id2' ");
sql_query(" update {$g5['g5_shop_item_table']} set it_name = it_name {$ca_fields} where ca_id2 = '$ca_id2' ");
if($ca_id3)
sql_query(" update {$g5['shop_item_table']} set it_name = it_name {$ca_fields} where ca_id3 = '$ca_id3' ");
sql_query(" update {$g5['g5_shop_item_table']} set it_name = it_name {$ca_fields} where ca_id3 = '$ca_id3' ");
}
// 모든 상품 동일 옵션 적용
@ -475,7 +475,7 @@ if(is_checked('chk_all_it_mobile_head_html')) $all_fields .= " , it_mobile_he
if(is_checked('chk_all_it_mobile_tail_html')) $all_fields .= " , it_mobile_tail_html = '$it_mobile_tail_html' ";
if($all_fields) {
sql_query(" update {$g5['shop_item_table']} set it_name = it_name {$all_fields} ");
sql_query(" update {$g5['g5_shop_item_table']} set it_name = it_name {$all_fields} ");
}
$qstr = "$qstr&amp;sca=$sca&amp;page=$page";

View File

@ -7,7 +7,7 @@ $gubun = $_POST['gubun'] ? $_POST['gubun'] : 'wear';
if($it['it_id'])
$it_id = $it['it_id'];
else {
$sql = " select it_id, it_info_gubun, it_info_value from {$g5['shop_item_table']} where it_id = '$it_id' ";
$sql = " select it_id, it_info_gubun, it_info_value from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$it = sql_fetch($sql);
}

View File

@ -9,7 +9,7 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
// 분류
$ca_list = '<option value="">선택</option>'.PHP_EOL;
$sql = " select * from {$g5['shop_category_table']} ";
$sql = " select * from {$g5['g5_shop_category_table']} ";
if ($is_admin != 'super')
$sql .= " where ca_mb_id = '{$member['mb_id']}' ";
$sql .= " order by ca_id ";
@ -42,8 +42,8 @@ if ($sca != "") {
if ($sfl == "") $sfl = "it_name";
$sql_common = " from {$g5['shop_item_table']} a ,
{$g5['shop_category_table']} b
$sql_common = " from {$g5['g5_shop_item_table']} a ,
{$g5['g5_shop_category_table']} b
where (a.ca_id = b.ca_id";
if ($is_admin != 'super')
$sql_common .= " and b.ca_mb_id = '{$member['mb_id']}'";
@ -98,7 +98,7 @@ if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
<select name="sca" id="sca">
<option value="">전체분류</option>
<?php
$sql1 = " select ca_id, ca_name from {$g5['shop_category_table']} order by ca_id ";
$sql1 = " select ca_id, ca_name from {$g5['g5_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

@ -17,7 +17,7 @@ if ($_POST['act_button'] == "선택수정") {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$sql = "update {$g5['shop_item_table']}
$sql = "update {$g5['g5_shop_item_table']}
set ca_id = '{$_POST['ca_id'][$k]}',
it_name = '{$_POST['it_name'][$k]}',
it_mobile_name = '{$_POST['it_mobile_name'][$k]}',

View File

@ -9,7 +9,7 @@ if($it['it_id']) {
$opt2_subject = $opt_subject[1];
$opt3_subject = $opt_subject[2];
$sql = " select * from {$g5['shop_item_option_table']} where io_type = '0' and it_id = '{$it['it_id']}' order by io_no asc ";
$sql = " select * from {$g5['g5_shop_item_option_table']} where io_type = '0' and it_id = '{$it['it_id']}' order by io_no asc ";
$result = sql_query($sql);
if(mysql_num_rows($result))
$po_run = true;

View File

@ -6,7 +6,7 @@ include_once(G5_EDITOR_LIB);
auth_check($auth[$sub_menu], "w");
$sql = " select *
from {$g5['shop_item_qa_table']} a
from {$g5['g5_shop_item_qa_table']} a
left join {$g5['member_table']} b on (a.mb_id = b.mb_id)
where iq_id = '$iq_id' ";
$iq = sql_fetch($sql);

View File

@ -11,9 +11,9 @@ else
$qstr = "page=$page&amp;sort1=$sort1&amp;sort2=$sort2";
if ($w == "u")
if ($w == "u")
{
$sql = "update {$g5['shop_item_qa_table']}
$sql = "update {$g5['g5_shop_item_qa_table']}
set iq_subject = '$iq_subject',
iq_question = '$iq_question',
iq_answer = '$iq_answer'
@ -21,7 +21,7 @@ if ($w == "u")
sql_query($sql);
goto_url("./itemqaform.php?w=$w&amp;iq_id=$iq_id&amp;$qstr");
}
}
else {
alert();
}

View File

@ -28,8 +28,8 @@ if (!$sst) {
$sod = "desc";
}
$sql_common = " from {$g5['shop_item_qa_table']} a
left join {$g5['shop_item_table']} b on (a.it_id = b.it_id)
$sql_common = " from {$g5['g5_shop_item_qa_table']} a
left join {$g5['g5_shop_item_table']} b on (a.it_id = b.it_id)
left join {$g5['member_table']} c on (a.mb_id = c.mb_id) ";
$sql_common .= $sql_search;
@ -74,7 +74,7 @@ if ($sfl || $stx) // 검색 결과일 때만 처음 버튼을 보여줌
<select name="sca" id="sca">
<option value="">전체분류</option>
<?php
$sql1 = " select ca_id, ca_name from {$g5['shop_category_table']} order by ca_id ";
$sql1 = " select ca_id, ca_name from {$g5['g5_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

@ -16,7 +16,7 @@ if ($_POST['act_button'] == "선택삭제") {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$sql = "delete from {$g5['shop_item_qa_table']} where iq_id = '{$_POST['iq_id'][$k]}' ";
$sql = "delete from {$g5['g5_shop_item_qa_table']} where iq_id = '{$_POST['iq_id'][$k]}' ";
sql_query($sql);
}
}

View File

@ -23,7 +23,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 {$g5['shop_cart_table']} a, {$g5['shop_item_table']} b ";
from {$g5['g5_shop_cart_table']} a, {$g5['g5_shop_item_table']} b ";
$sql .= " where a.it_id = b.it_id ";
if ($fr_date && $to_date)
{
@ -77,7 +77,7 @@ if ($fr_date || $to_date) // 검색렬일 때만 처음 버튼을 보여줌
<select name="sel_ca_id" id="sel_ca_id">
<option value=''>전체분류</option>
<?php
$sql1 = " select ca_id, ca_name from {$g5['shop_category_table']} order by ca_id ";
$sql1 = " select ca_id, ca_name from {$g5['g5_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

@ -71,7 +71,7 @@ if ($search) // 검색 결과일 때만 처음 버튼을 보여줌
<select name="sel_ca_id" id="sel_ca_id">
<option value=''>전체분류</option>
<?php
$sql1 = " select ca_id, ca_name from {$g5['shop_category_table']} order by ca_id ";
$sql1 = " select ca_id, ca_name from {$g5['g5_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;
@ -140,12 +140,12 @@ if ($search) // 검색 결과일 때만 처음 버튼을 보여줌
$href = G5_SHOP_URL."/item.php?it_id={$row['it_id']}";
// 선택옵션이 있을 경우 주문대기 수량 계산하지 않음
$sql2 = " select count(*) as cnt from {$g5['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' ";
$sql2 = " select count(*) as cnt from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' ";
$row2 = sql_fetch($sql2);
if(!$row2['cnt']) {
$sql1 = " select SUM(ct_qty) as sum_qty
from {$g5['shop_cart_table']}
from {$g5['g5_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 {$g5['shop_item_table']}
$sql = "update {$g5['g5_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

@ -4,7 +4,7 @@ include_once('./_common.php');
$ps_run = false;
if($it['it_id']) {
$sql = " select * from {$g5['shop_item_option_table']} where io_type = '1' and it_id = '{$it['it_id']}' order by io_no asc ";
$sql = " select * from {$g5['g5_shop_item_option_table']} where io_type = '1' and it_id = '{$it['it_id']}' order by io_no asc ";
$result = sql_query($sql);
if(mysql_num_rows($result))
$ps_run = true;

View File

@ -45,7 +45,7 @@ if (!$sst) {
}
$sql_order = "order by $sst $sod";
$sql_common = " from {$g5['shop_item_table']} ";
$sql_common = " from {$g5['g5_shop_item_table']} ";
$sql_common .= $sql_search;
// 테이블의 전체 레코드수만 얻음
@ -98,7 +98,7 @@ if ($stx) // 검색 결과일 때만 처음 버튼을 보여줌
<select name="sca" id="sca">
<option value="">전체분류</option>
<?php
$sql1 = " select ca_id, ca_name from {$g5['shop_category_table']} order by ca_id ";
$sql1 = " select ca_id, ca_name from {$g5['g5_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 {$g5['shop_item_table']}
$sql = "update {$g5['g5_shop_item_table']}
set it_type1 = '{$_POST['it_type1'][$i]}',
it_type2 = '{$_POST['it_type2'][$i]}',
it_type3 = '{$_POST['it_type3'][$i]}',

View File

@ -6,9 +6,9 @@ include_once(G5_EDITOR_LIB);
auth_check($auth[$sub_menu], "w");
$sql = " select *
from {$g5['shop_item_use_table']} a
from {$g5['g5_shop_item_use_table']} a
left join {$g5['member_table']} b on (a.mb_id = b.mb_id)
left join {$g5['shop_item_table']} c on (a.it_id = c.it_id)
left join {$g5['g5_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

@ -13,7 +13,7 @@ $qstr = "page=$page&amp;sort1=$sort1&amp;sort2=$sort2";
if ($w == "u")
{
$sql = "update {$g5['shop_item_use_table']}
$sql = "update {$g5['g5_shop_item_use_table']}
set is_subject = '$is_subject',
is_content = '$is_content',
is_confirm = '$is_confirm'

View File

@ -28,8 +28,8 @@ if (!$sst) {
$sod = "desc";
}
$sql_common = " from {$g5['shop_item_use_table']} a
left join {$g5['shop_item_table']} b on (a.it_id = b.it_id)
$sql_common = " from {$g5['g5_shop_item_use_table']} a
left join {$g5['g5_shop_item_table']} b on (a.it_id = b.it_id)
left join {$g5['member_table']} c on (a.mb_id = c.mb_id) ";
$sql_common .= $sql_search;
@ -74,7 +74,7 @@ if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
<select name="sca" id="sca">
<option value=''>전체분류</option>
<?php
$sql1 = " select ca_id, ca_name from {$g5['shop_category_table']} order by ca_id ";
$sql1 = " select ca_id, ca_name from {$g5['g5_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

@ -17,7 +17,7 @@ if ($_POST['act_button'] == "선택수정") {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$sql = "update {$g5['shop_item_use_table']}
$sql = "update {$g5['g5_shop_item_use_table']}
set is_confirm = '{$_POST['is_confirm'][$k]}'
where is_id = '{$_POST['is_id'][$k]}' ";
sql_query($sql);
@ -30,7 +30,7 @@ if ($_POST['act_button'] == "선택수정") {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$sql = "delete from {$g5['shop_item_use_table']} where is_id = '{$_POST['is_id'][$k]}' ";
$sql = "delete from {$g5['g5_shop_item_use_table']} where is_id = '{$_POST['is_id'][$k]}' ";
sql_query($sql);
}
}

View File

@ -9,7 +9,7 @@ $html_title = "팝업레이어";
if ($w == "u")
{
$html_title .= " 수정";
$sql = " select * from {$g5['shop_new_win_table']} where nw_id = '$nw_id' ";
$sql = " select * from {$g5['g5_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 {$g5['shop_new_win_table']} auto_increment=1 ";
$sql = " alter table {$g5['g5_shop_new_win_table']} auto_increment=1 ";
sql_query($sql);
$sql = " insert {$g5['shop_new_win_table']} set $sql_common ";
$sql = " insert {$g5['g5_shop_new_win_table']} set $sql_common ";
sql_query($sql);
$nw_id = mysql_insert_id();
}
else if ($w == "u")
{
$sql = " update {$g5['shop_new_win_table']} set $sql_common where nw_id = '$nw_id' ";
$sql = " update {$g5['g5_shop_new_win_table']} set $sql_common where nw_id = '$nw_id' ";
sql_query($sql);
}
else if ($w == "d")
{
$sql = " delete from {$g5['shop_new_win_table']} where nw_id = '$nw_id' ";
$sql = " delete from {$g5['g5_shop_new_win_table']} where nw_id = '$nw_id' ";
sql_query($sql);
}

View File

@ -7,7 +7,7 @@ auth_check($auth[$sub_menu], "r");
$g5['title'] = '팝업레이어 관리';
include_once (G5_ADMIN_PATH.'/admin.head.php');
$sql_common = " from {$g5['shop_new_win_table']} ";
$sql_common = " from {$g5['g5_shop_new_win_table']} ";
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;

View File

@ -22,7 +22,7 @@ if ($sel_field == "") $sel_field = "b.it_name";
if ($sort1 == "") $sort1 = "a.io_stock_qty";
if ($sort2 == "") $sort2 = "asc";
$sql_common = " from {$g5['shop_item_option_table']} a left join {$g5['shop_item_table']} b on ( a.it_id = b.it_id ) ";
$sql_common = " from {$g5['g5_shop_item_option_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id ) ";
$sql_common .= $sql_search;
// 테이블의 전체 레코드수만 얻음
@ -75,7 +75,7 @@ if ($search) // 검색 결과일 때만 처음 버튼을 보여줌
<select name="sel_ca_id" id="sel_ca_id">
<option value=''>전체분류</option>
<?php
$sql1 = " select ca_id, ca_name from {$g5['shop_category_table']} order by ca_id ";
$sql1 = " select ca_id, ca_name from {$g5['g5_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;
@ -147,7 +147,7 @@ if ($search) // 검색 결과일 때만 처음 버튼을 보여줌
$href = G5_SHOP_URL."/item.php?it_id={$row['it_id']}";
$sql1 = " select SUM(ct_qty) as sum_qty
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where it_id = '{$row['it_id']}'
and io_id = '{$row['io_id']}'
and ct_stock_use = '0'

View File

@ -9,7 +9,7 @@ auth_check($auth[$sub_menu], "w");
// 재고 일괄수정
for ($i=0; $i<count($_POST['it_id']); $i++)
{
$sql = "update {$g5['shop_item_option_table']}
$sql = "update {$g5['g5_shop_item_option_table']}
set io_stock_qty = '{$_POST['io_stock_qty'][$i]}',
io_use = '{$_POST['io_use'][$i]}'
where it_id = '{$_POST['it_id'][$i]}'

View File

@ -43,7 +43,7 @@ for ($i=0; $i<$cnt; $i++)
$k = $_POST['ct_chk'][$i];
$ct_id = $_POST['ct_id'][$k];
$sql = " select * from {$g5['shop_cart_table']}
$sql = " select * from {$g5['g5_shop_cart_table']}
where od_id = '$od_id'
and ct_id = '$ct_id' ";
$ct = sql_fetch($sql);
@ -58,13 +58,13 @@ for ($i=0; $i<$cnt; $i++)
// 재고에 차이 반영.
if($ct['ct_stock_use']) {
if($ct['io_id']) {
$sql = " update {$g5['shop_item_option_table']}
$sql = " update {$g5['g5_shop_item_option_table']}
set io_stock_qty = io_stock_qty + '$diff_qty'
where it_id = '{$ct['it_id']}'
and io_id = '{$ct['io_id']}'
and io_type = '{$ct['io_type']}' ";
} else {
$sql = " update {$g5['shop_item_table']}
$sql = " update {$g5['g5_shop_item_table']}
set it_stock_qty = it_stock_qty + '$diff_qty'
where it_id = '{$ct['it_id']}' ";
}
@ -73,7 +73,7 @@ for ($i=0; $i<$cnt; $i++)
}
// 수량변경
$sql = " update {$g5['shop_cart_table']}
$sql = " update {$g5['g5_shop_cart_table']}
set ct_qty = '$ct_qty'
where ct_id = '$ct_id'
and od_id = '$od_id' ";
@ -90,13 +90,13 @@ for ($i=0; $i<$cnt; $i++)
$stock_use = 0;
// 재고에 다시 더한다.
if($ct['io_id']) {
$sql = " update {$g5['shop_item_option_table']}
$sql = " update {$g5['g5_shop_item_option_table']}
set io_stock_qty = io_stock_qty + '{$ct['ct_qty']}'
where it_id = '{$ct['it_id']}'
and io_id = '{$ct['io_id']}'
and io_type = '{$ct['io_type']}' ";
} else {
$sql = " update {$g5['shop_item_table']}
$sql = " update {$g5['g5_shop_item_table']}
set it_stock_qty = it_stock_qty + '{$ct['ct_qty']}'
where it_id = '{$ct['it_id']}' ";
}
@ -112,13 +112,13 @@ for ($i=0; $i<$cnt; $i++)
$stock_use = 1;
// 재고에서 뺀다.
if($ct['io_id']) {
$sql = " update {$g5['shop_item_option_table']}
$sql = " update {$g5['g5_shop_item_option_table']}
set io_stock_qty = io_stock_qty - '{$ct['ct_qty']}'
where it_id = '{$ct['it_id']}'
and io_id = '{$ct['io_id']}'
and io_type = '{$ct['io_type']}' ";
} else {
$sql = " update {$g5['shop_item_table']}
$sql = " update {$g5['g5_shop_item_table']}
set it_stock_qty = it_stock_qty - '{$ct['ct_qty']}'
where it_id = '{$ct['it_id']}' ";
}
@ -129,7 +129,7 @@ for ($i=0; $i<$cnt; $i++)
else if ($ct_status == '품절') {
$stock_use = 1;
// 재고에서 뺀다.
$sql =" update {$g5['shop_item_table']} set it_stock_qty = 0 where it_id = '{$ct['it_id']}' ";
$sql =" update {$g5['g5_shop_item_table']} set it_stock_qty = 0 where it_id = '{$ct['it_id']}' ";
sql_query($sql);
} */
}
@ -148,7 +148,7 @@ for ($i=0; $i<$cnt; $i++)
// 히스토리에 남길때는 작업|시간|IP|그리고 나머지 자료
$ct_history="\n$ct_status|$now|$REMOTE_ADDR";
$sql = " update {$g5['shop_cart_table']}
$sql = " update {$g5['g5_shop_cart_table']}
set ct_point_use = '$point_use',
ct_stock_use = '$stock_use',
ct_status = '$ct_status',
@ -159,14 +159,14 @@ for ($i=0; $i<$cnt; $i++)
}
// 주문정보
$sql = " select * from {$g5['shop_order_table']} where od_id = '$od_id' ";
$sql = " select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' ";
$od = sql_fetch($sql);
// 주문 합계
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,
SUM(cp_price) as coupon,
COUNT(distinct it_id) as cnt
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where od_id = '$od_id'
and ct_status IN ( '주문', '준비', '배송', '완료' ) ";
$sum = sql_fetch($sql);
@ -182,7 +182,7 @@ $tot_od_cp_price = $tot_sc_cp_price = 0;
if($od['mb_id']) {
// 주문할인 쿠폰
$sql = " select a.cp_id, a.cp_type, a.cp_price, a.cp_trunc, a.cp_minimum, a.cp_maximum
from {$g5['shop_coupon_table']} a right join {$g5['shop_coupon_log_table']} b on ( a.cp_id = b.cp_id )
from {$g5['g5_shop_coupon_table']} a right join {$g5['g5_shop_coupon_log_table']} b on ( a.cp_id = b.cp_id )
where b.od_id = '$od_id'
and b.mb_id = '{$od['mb_id']}'
and a.cp_method = '2' ";
@ -213,7 +213,7 @@ if($od['mb_id']) {
// 배송쿠폰 할인
$sql = " select a.cp_id, a.cp_type, a.cp_price, a.cp_trunc, a.cp_minimum, a.cp_maximum
from {$g5['shop_coupon_table']} a right join {$g5['shop_coupon_log_table']} b on ( a.cp_id = b.cp_id )
from {$g5['g5_shop_coupon_table']} a right join {$g5['g5_shop_coupon_log_table']} b on ( a.cp_id = b.cp_id )
where b.od_id = '$od_id'
and b.mb_id = '{$od['mb_id']}'
and a.cp_method = '3' ";
@ -241,7 +241,7 @@ if($od['mb_id']) {
// 취소 합계
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where od_id = '$od_id'
and ct_status IN ( '취소', '반품', '품절' ) ";
$sum = sql_fetch($sql);
@ -253,7 +253,7 @@ $od_misu = ( $cart_price + $send_cost + $od['od_send_cost2'] )
- ( $od['od_receipt_price'] + $od['od_receipt_point'] - $od['od_refund_price'] );
// 주문정보 반영
$sql = " update {$g5['shop_order_table']}
$sql = " update {$g5['g5_shop_order_table']}
set od_cart_price = '$cart_price',
od_cart_coupon = '$cart_coupon',
od_coupon = '$tot_od_cp_price',
@ -270,14 +270,14 @@ $url = "./orderform.php?od_id=$od_id&amp;$qstr";
// 수량변경 히스토리 기록
if($mod_history) {
$sql = " update {$g5['shop_order_table']}
$sql = " update {$g5['g5_shop_order_table']}
set od_mod_history = CONCAT(od_mod_history,'$mod_history')
where od_id = '$od_id' ";
sql_query($sql);
}
// 1.06.06
$od = sql_fetch(" select od_receipt_point from {$g5['shop_order_table']} where od_id = '$od_id' ");
$od = sql_fetch(" select od_receipt_point from {$g5['g5_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,10 +9,10 @@ auth_check($auth[$sub_menu], "d");
if ($od_id)
{
// 장바구니 삭제
sql_query(" delete from {$g5['shop_cart_table']} where od_id = '$od_id' ");
sql_query(" delete from {$g5['g5_shop_cart_table']} where od_id = '$od_id' ");
// 주문서 삭제
sql_query(" delete from {$g5['shop_order_table']} where od_id = '$od_id' ");
sql_query(" delete from {$g5['g5_shop_order_table']} where od_id = '$od_id' ");
}
if ($return_url)

View File

@ -23,7 +23,7 @@ include_once(G5_ADMIN_PATH.'/admin.head.php');
$keep_term = $default['de_cart_keep_term'];
if (!$keep_term) $keep_term = 15; // 기본값 15일
$beforetime = date('Y-m-d H:i:s', ( G5_SERVER_TIME - (86400 * $keep_term) ) );
$sql = " delete from {$g5['shop_cart_table']} where ct_status = '$cart_title1' and ct_time <= '$beforetime' ";
$sql = " delete from {$g5['g5_shop_cart_table']} where ct_status = '$cart_title1' and ct_time <= '$beforetime' ";
sql_query($sql);
//------------------------------------------------------------------------------
@ -35,7 +35,7 @@ sql_query($sql);
//------------------------------------------------------------------------------
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 {$g5['shop_cart_table']}
$sql = " select * from {$g5['g5_shop_cart_table']}
where ct_status = '$cart_title2'
and ct_point_use = '0'
and ct_time <= '$beforedays' ";
@ -43,7 +43,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 {$g5['shop_order_table']} where od_id = '{$row['od_id']}' ");
$tmp_row = sql_fetch("select od_id, mb_id from {$g5['g5_shop_order_table']} where od_id = '{$row['od_id']}' ");
// 회원이면서 포인트가 0보다 크다면
if ($tmp_row['mb_id'] && $row['ct_point'] > 0)
@ -53,7 +53,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 {$g5['shop_cart_table']} set ct_point_use = '1' where ct_id = '{$row['ct_id']}' ");
sql_query("update {$g5['g5_shop_cart_table']} set ct_point_use = '1' where ct_id = '{$row['ct_id']}' ");
}
}
//------------------------------------------------------------------------------
@ -62,7 +62,7 @@ if (!isset($order_not_point)) {
//------------------------------------------------------------------------------
// 주문서 정보
//------------------------------------------------------------------------------
$sql = " select * from {$g5['shop_order_table']} where od_id = '$od_id' ";
$sql = " select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' ";
$od = sql_fetch($sql);
if (!$od['od_id']) {
alert($alt_msg1);
@ -80,7 +80,7 @@ if ($default['de_card_test']) {
// 로그인 아이디 / 비번
// 일반 : test1234 / test12345
// 에스크로 : escrow / escrow913
$g5['shop_cardpg']['kcp'] = "http://testadmin8.kcp.co.kr";
$g5['g5_shop_cardpg']['kcp'] = "http://testadmin8.kcp.co.kr";
}
// 상품목록
@ -88,7 +88,7 @@ $sql = " select it_id,
it_name,
cp_price,
ct_notax
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where od_id = '{$od['od_id']}'
group by it_id
order by ct_id ";
@ -163,7 +163,7 @@ $pg_anchor = '<ul class="anchor">
<?php
// 상품의 옵션정보
$sql = " select ct_id, it_id, ct_price, ct_qty, ct_option, ct_status, cp_price, ct_stock_use, ct_point_use, ct_send_cost, io_type, io_price
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where od_id = '{$od['od_id']}'
and it_id = '{$row['it_id']}'
order by io_type asc, ct_id asc ";
@ -400,7 +400,7 @@ $pg_anchor = '<ul class="anchor">
<td><?php echo display_price($od['od_refund_price']); ?></td>
</tr>
<?php
$sql = " select dl_company, dl_url, dl_tel from {$g5['shop_delivery_table']} where dl_id = '{$od['dl_id']}' ";
$sql = " select dl_company, dl_url, dl_tel from {$g5['g5_shop_delivery_table']} where dl_id = '{$od['dl_id']}' ";
$dl = sql_fetch($sql);
?>
<tr>
@ -479,7 +479,7 @@ $pg_anchor = '<ul class="anchor">
<?php if ($od['od_settle_case'] == '무통장' || $od['od_settle_case'] == '가상계좌' || $od['od_settle_case'] == '계좌이체') { ########## 시작?>
<?php
// 주문서
$sql = " select * from {$g5['shop_order_table']} where od_id = '$od_id' ";
$sql = " select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' ";
$result = sql_query($sql);
$od = sql_fetch_array($result);
@ -513,7 +513,7 @@ $pg_anchor = '<ul class="anchor">
<input type="text" name="od_receipt_price" value="<?php echo $od['od_receipt_price']; ?>" id="od_receipt_price" class="frm_input" size="10"> 원
<?php
if ($od['od_settle_case'] == '계좌이체' || $od['od_settle_case'] == '가상계좌') {
$pg_url = $g5['shop_cardpg'][$default['de_card_pg']];
$pg_url = $g5['g5_shop_cardpg'][$default['de_card_pg']];
?>
<a href="<?php echo $pg_url; ?>" target="_blank">결제대행사</a>
<?php } ?>
@ -549,7 +549,7 @@ $pg_anchor = '<ul class="anchor">
<th scope="row"><label for="od_receipt_price"><?php echo $od['od_settle_case']; ?> 결제액</label></th>
<td>
<input type="text" name="od_receipt_price" value="<?php echo $od['od_receipt_price']; ?>" id="od_receipt_price" class="frm_input"> 원
<?php $pg_url = $g5['shop_cardpg'][$default['de_card_pg']];?>
<?php $pg_url = $g5['g5_shop_cardpg'][$default['de_card_pg']];?>
<a href="<?php echo $pg_url; ?>" target="_blank">결제대행사</a>
</td>
</tr>
@ -568,7 +568,7 @@ $pg_anchor = '<ul class="anchor">
<th scope="row" class="sodr_sppay"><label for="od_receipt_price">신용카드 결제액</label></th>
<td>
<input type="text" name="od_receipt_price" value="<?php echo $od['od_receipt_price']; ?>" id="od_receipt_price" class="frm_input" size="10"> 원
<?php $card_url = $g5['shop_cardpg'][$default['de_card_pg']]; ?>
<?php $card_url = $g5['g5_shop_cardpg'][$default['de_card_pg']]; ?>
<a href="<?php echo $card_url; ?>" target="_blank">결제대행사</a>
</td>
</tr>
@ -598,7 +598,7 @@ $pg_anchor = '<ul class="anchor">
<select name="dl_id" id="dl_id">
<option value="">배송시 선택하세요.</option>
<?php
$sql = "select * from {$g5['shop_delivery_table']} order by dl_order desc, dl_id desc ";
$sql = "select * from {$g5['g5_shop_delivery_table']} order by dl_order desc, dl_id desc ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
?>

View File

@ -3,7 +3,7 @@ $sub_menu = '400400';
include_once('./_common.php');
if($_POST['mod_type'] == 'info') {
$sql = " update {$g5['shop_order_table']}
$sql = " update {$g5['g5_shop_order_table']}
set od_name = '$od_name',
od_tel = '$od_tel',
od_hp = '$od_hp',
@ -22,7 +22,7 @@ if($_POST['mod_type'] == 'info') {
if ($default['de_hope_date_use'])
$sql .= " , od_hope_date = '$od_hope_date' ";
} else {
$sql = "update {$g5['shop_order_table']}
$sql = "update {$g5['g5_shop_order_table']}
set od_shop_memo = '$od_shop_memo' ";
}
$sql .= " where od_id = '$od_id' ";

View File

@ -52,7 +52,7 @@ if ($sel_field == "") $sel_field = "od_id";
if ($sort1 == "") $sort1 = "od_id";
if ($sort2 == "") $sort2 = "desc";
$sql_common = " from {$g5['shop_order_table']} $sql_search ";
$sql_common = " from {$g5['g5_shop_order_table']} $sql_search ";
$sql = " select count(od_id) as cnt " . $sql_common;
$row = sql_fetch($sql);
@ -179,7 +179,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
$od_cnt = 0;
if ($row['mb_id'])
{
$sql2 = " select count(*) as cnt from {$g5['shop_order_table']} where mb_id = '{$row['mb_id']}' ";
$sql2 = " select count(*) as cnt from {$g5['g5_shop_order_table']} where mb_id = '{$row['mb_id']}' ";
$row2 = sql_fetch($sql2);
$od_cnt = $row2['cnt'];
}

View File

@ -25,7 +25,7 @@ if ($sel_field == "") $sel_field = "od_id";
if ($sort1 == "") $sort1 = "od_id";
if ($sort2 == "") $sort2 = "desc";
$sql_common = " from {$g5['shop_order_table']}
$sql_common = " from {$g5['g5_shop_order_table']}
$sql_search ";
// 테이블의 전체 레코드수만 얻음
@ -177,7 +177,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
<?php
// 상품개별출력
$sql2 = " select it_id, it_name
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where od_id = '{$row['od_id']}'
group by it_id
order by ct_id asc ";
@ -208,7 +208,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
<?php
// 옵션항목
$sql3 = " select *
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where od_id = '{$row['od_id']}'
and it_id = '{$row2['it_id']}'
order by io_type asc, ct_id asc ";

View File

@ -7,7 +7,7 @@ if (!defined("_ORDERMAIL_")) exit;
// 주문자님께 메일발송 체크를 했다면
if ($od_send_mail)
{
$od = sql_fetch(" select * from {$g5['shop_order_table']} where od_id = '$od_id' ");
$od = sql_fetch(" select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' ");
$addmemo = nl2br(stripslashes($addmemo));
@ -18,7 +18,7 @@ if ($od_send_mail)
unset($delivery_list);
$sql = " select *
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where od_id = '{$od['od_id']}'
order by ct_id ";
$result = sql_query($sql);
@ -72,7 +72,7 @@ if ($od_send_mail)
// 배송정보
$is_delivery = false;
if ((int)$od[dl_id] > 0) {
$dl = sql_fetch(" select * from {$g5['shop_delivery_table']} where dl_id = '{$od['dl_id']}' ");
$dl = sql_fetch(" select * from {$g5['g5_shop_delivery_table']} where dl_id = '{$od['dl_id']}' ");
$delivery_list['dl_url'] = $dl['dl_url'];
if (strpos($delivery_list['dl_url'], "=")) $delivery_list['dl_url'] .= $od['od_invoice'];
@ -105,7 +105,7 @@ if ($od_send_mail)
$od_shop_memo .= ", 송장번호";
*/
sql_query(" update {$g5['shop_order_table']} set od_shop_memo = '$od_shop_memo' where od_id = '$od_id' ");
sql_query(" update {$g5['g5_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, b.it_name, ct_qty, b.it_id, a.od_id, od_memo, od_invoice, b.ct_option, b.ct_send_cost
FROM {$g5['shop_order_table']} a, {$g5['shop_cart_table']} b
FROM {$g5['g5_shop_order_table']} a, {$g5['g5_shop_cart_table']} b
where a.od_id = b.od_id ";
if ($case == 1) // 출력기간
$sql .= " and a.od_time between '$fr_date 00:00:00' and '$to_date 23:59:59' ";
@ -98,7 +98,7 @@ if ($csv == 'xls')
$to_date = date_conv($to_date);
$sql = " SELECT od_b_zip1, od_b_zip2, od_b_addr1, od_b_addr2, od_b_name, od_b_tel, od_b_hp, b.it_name, ct_qty, b.it_id, a.od_id, od_memo, od_invoice, b.ct_option, b.ct_send_cost
FROM {$g5['shop_order_table']} a, {$g5['shop_cart_table']} b
FROM {$g5['g5_shop_order_table']} a, {$g5['g5_shop_cart_table']} b
where a.od_id = b.od_id ";
if ($case == 1) // 출력기간
$sql .= " and a.od_time between '$fr_date 00:00:00' and '$to_date 23:59:59' ";
@ -166,7 +166,7 @@ function get_order($od_id)
{
global $g5;
$sql = " select * from {$g5['shop_order_table']} where od_id = '$od_id' ";
$sql = " select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' ";
return sql_fetch($sql);
}
@ -177,13 +177,13 @@ if ($case == 1)
{
$fr_date = date_conv($fr_date);
$to_date = date_conv($to_date);
$sql = " SELECT DISTINCT a.od_id FROM {$g5['shop_order_table']} a, {$g5['shop_cart_table']} b
$sql = " SELECT DISTINCT a.od_id FROM {$g5['g5_shop_order_table']} a, {$g5['g5_shop_cart_table']} b
where a.od_id = b.od_id
and a.od_time between '$fr_date 00:00:00' and '$to_date 23:59:59' ";
}
else
{
$sql = " SELECT DISTINCT a.od_id FROM {$g5['shop_order_table']} a, {$g5['shop_cart_table']} b
$sql = " SELECT DISTINCT a.od_id FROM {$g5['g5_shop_order_table']} a, {$g5['g5_shop_cart_table']} b
where a.od_id = b.od_id
and a.od_id between '$fr_od_id' and '$to_od_id' ";
}
@ -213,7 +213,7 @@ if (mysql_num_rows($result) == 0)
$tot_total_price = 0;
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$sql1 = " select * from {$g5['shop_order_table']} where od_id = '{$row['od_id']}' ";
$sql1 = " select * from {$g5['g5_shop_order_table']} where od_id = '{$row['od_id']}' ";
$row1 = sql_fetch($sql1);
// 1.03.02
@ -274,7 +274,7 @@ if (mysql_num_rows($result) == 0)
<tbody>
<?php
$sql2 = " select *
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where od_id = '{$row['od_id']}' ";
if ($ct_status)
$sql2 .= " and ct_status = '$ct_status' ";

View File

@ -6,7 +6,7 @@ include_once(G5_LIB_PATH.'/icode.sms.lib.php');
auth_check($auth[$sub_menu], "w");
$sql = " select * from {$g5['shop_order_table']} where od_id = '$od_id' ";
$sql = " select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' ";
$od = sql_fetch($sql);
if(!$od['od_id'])
@ -23,7 +23,7 @@ $od_misu = ( $od['od_cart_price'] + $od_send_cost + $od_send_cost2 )
- ( $od['od_cart_coupon'] + $od['od_coupon'] + $od['od_send_coupon'] )
- ( $od_receipt_price + $od_receipt_point - $od_refund_price );
$sql = " update {$g5['shop_order_table']}
$sql = " update {$g5['g5_shop_order_table']}
set od_deposit_name = '$od_deposit_name',
od_bank_account = '$od_bank_account',
od_receipt_time = '$od_receipt_time',
@ -57,7 +57,7 @@ if($_POST['od_tno'] && $_POST['od_escrow'] == 1) {
$arr_numb = array();
// 배송회사정보
$sql = " select dl_company from {$g5['shop_delivery_table']} where dl_id = '$dl_id' ";
$sql = " select dl_company from {$g5['g5_shop_delivery_table']} where dl_id = '$dl_id' ";
$row = sql_fetch($sql);
$arr_tno[0] = $_POST['od_tno'];

View File

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

View File

@ -7,7 +7,7 @@ auth_check($auth[$sub_menu], 'w');
$g5['title'] = '개인결제 복사';
include_once(G5_PATH.'/head.sub.php');
$sql = " select * from {$g5['shop_personalpay_table']} where pp_id = '$pp_id' ";
$sql = " select * from {$g5['g5_shop_personalpay_table']} where pp_id = '$pp_id' ";
$row = sql_fetch($sql);
if(!$row['pp_id'])

View File

@ -14,13 +14,13 @@ if(preg_match('/[^0-9]/', $_POST['pp_price']))
alert('주문금액은 숫자만 입력해 주십시오.');
if($_POST['od_id']) {
$sql = " select od_id from {$g5['shop_order_table']} where od_id = '{$_POST['od_id']}' ";
$sql = " select od_id from {$g5['g5_shop_order_table']} where od_id = '{$_POST['od_id']}' ";
$od = sql_fetch($sql);
if(!$od['od_id'])
alert('입력하신 주문번호는 존재하지 않습니다.');
}
$sql = " select * from {$g5['shop_personalpay_table']} where pp_id = '$pp_id' ";
$sql = " select * from {$g5['g5_shop_personalpay_table']} where pp_id = '$pp_id' ";
$row = sql_fetch($sql);
if(!$row['pp_id'])
@ -28,7 +28,7 @@ if(!$row['pp_id'])
$new_pp_id = get_uniqid();
$sql = " insert into {$g5['shop_personalpay_table']}
$sql = " insert into {$g5['g5_shop_personalpay_table']}
set pp_id = '$new_pp_id',
od_id = '{$_POST['od_id']}',
pp_name = '{$_POST['pp_name']}',

View File

@ -9,7 +9,7 @@ $g5['title'] = '개인결제 관리';
if ($w == 'u') {
$html_title = '개인결제 수정';
$sql = " select * from {$g5['shop_personalpay_table']} where pp_id = '$pp_id' ";
$sql = " select * from {$g5['g5_shop_personalpay_table']} where pp_id = '$pp_id' ";
$pp = sql_fetch($sql);
if (!$pp['pp_id']) alert('등록된 자료가 없습니다.');
}
@ -25,7 +25,7 @@ if($popup == 'yes') { // 팝업창일 때
include_once(G5_PATH.'/head.sub.php');
$pp['od_id'] = $od_id;
$sql = " select od_id, od_name, od_misu
from {$g5['shop_order_table']}
from {$g5['g5_shop_order_table']}
where od_id = '$od_id' ";
$od = sql_fetch($sql);

View File

@ -5,12 +5,12 @@ include_once('./_common.php');
if($w == 'd') {
auth_check($auth[$sub_menu], 'd');
$sql = " select pp_id from {$g5['shop_personalpay_table']} where pp_id = '{$_GET['pp_id']}' ";
$sql = " select pp_id from {$g5['g5_shop_personalpay_table']} where pp_id = '{$_GET['pp_id']}' ";
$row = sql_fetch($sql);
if(!$row['pp_id'])
alert('삭제하시려는 자료가 존재하지 않습니다.');
sql_query(" delete from {$g5['shop_personalpay_table']} where pp_id = '{$_GET['pp_id']}' ");
sql_query(" delete from {$g5['g5_shop_personalpay_table']} where pp_id = '{$_GET['pp_id']}' ");
goto_url('./personalpaylist.php?'.$qstr);
} else {
@ -26,7 +26,7 @@ if($w == 'd') {
alert('주문금액은 숫자만 입력해 주십시오.');
if($_POST['od_id']) {
$sql = " select od_id from {$g5['shop_order_table']} where od_id = '{$_POST['od_id']}' ";
$sql = " select od_id from {$g5['g5_shop_order_table']} where od_id = '{$_POST['od_id']}' ";
$row = sql_fetch($sql);
if(!$row['od_id'])
alert('입력하신 주문번호는 존재하지 않는 주문 자료입니다.');
@ -45,19 +45,19 @@ if($w == 'd') {
if($w == '') {
$pp_id = get_uniqid();
$sql = " insert into {$g5['shop_personalpay_table']}
$sql = " insert into {$g5['g5_shop_personalpay_table']}
set pp_id = '$pp_id',
$sql_common ,
pp_ip = '{$_SERVER['REMOTE_ADDR']}',
pp_time = '".G5_TIME_YMDHIS."' ";
sql_query($sql);
} else if($w == 'u') {
$sql = " select pp_id from {$g5['shop_personalpay_table']} where pp_id = '{$_POST['pp_id']}' ";
$sql = " select pp_id from {$g5['g5_shop_personalpay_table']} where pp_id = '{$_POST['pp_id']}' ";
$row = sql_fetch($sql);
if(!$row['pp_id'])
alert('수정하시려는 자료가 존재하지 않습니다.');
$sql = " update {$g5['shop_personalpay_table']}
$sql = " update {$g5['g5_shop_personalpay_table']}
set $sql_common
where pp_id = '{$_POST['pp_id']}' ";
sql_query($sql);

View File

@ -6,7 +6,7 @@ auth_check($auth[$sub_menu], "r");
$token = get_token();
$sql_common = " from {$g5['shop_personalpay_table']} ";
$sql_common = " from {$g5['g5_shop_personalpay_table']} ";
$sql_search = " where (1) ";
if ($stx) {

View File

@ -17,7 +17,7 @@ for ($i=0; $i<$count; $i++)
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$sql = " delete from {$g5['shop_personalpay_table']} where pp_id = '{$_POST['pp_id'][$k]}' ";
$sql = " delete from {$g5['g5_shop_personalpay_table']} where pp_id = '{$_POST['pp_id'][$k]}' ";
sql_query($sql);
}

View File

@ -39,7 +39,7 @@ $sql = " select od_id,
od_misu,
(od_cart_price + od_send_cost + od_send_cost2) as orderprice,
(od_cart_coupon + od_coupon + od_send_coupon) as couponprice
from {$g5['shop_order_table']}
from {$g5['g5_shop_order_table']}
where SUBSTRING(od_time,1,10) between '$fr_date' and '$to_date'
order by od_time desc ";
$result = sql_query($sql);

View File

@ -40,7 +40,7 @@ $sql = " select od_id,
od_misu,
(od_cart_price + od_send_cost + od_send_cost2) as orderprice,
(od_cart_coupon + od_coupon + od_send_coupon) as couponprice
from {$g5['shop_order_table']}
from {$g5['g5_shop_order_table']}
where SUBSTRING(od_time,1,7) between '$fr_month' and '$to_month'
order by od_time desc ";
$result = sql_query($sql);

View File

@ -20,7 +20,7 @@ $sql = " select od_id,
od_misu,
(od_cart_price + od_send_cost + od_send_cost2) as orderprice,
(od_cart_coupon + od_coupon + od_send_coupon) as couponprice
from {$g5['shop_order_table']}
from {$g5['g5_shop_order_table']}
where SUBSTRING(od_time,1,10) = '$date'
order by od_id desc ";
$result = sql_query($sql);

View File

@ -35,7 +35,7 @@ $sql = " select od_id,
od_misu,
(od_cart_price + od_send_cost + od_send_cost2) as orderprice,
(od_cart_coupon + od_coupon + od_send_coupon) as couponprice
from {$g5['shop_order_table']}
from {$g5['g5_shop_order_table']}
where SUBSTRING(od_time,1,4) between '$fr_year' and '$to_year'
order by od_time desc ";
$result = sql_query($sql);

View File

@ -6,7 +6,7 @@ auth_check($auth[$sub_menu], "r");
$token = get_token();
$sql_common = " from {$g5['shop_sendcost_table']} ";
$sql_common = " from {$g5['g5_shop_sendcost_table']} ";
$sql_search = " where (1) ";
$sql_order = " order by sc_id desc ";

View File

@ -16,7 +16,7 @@ if($w == 'd') {
for($i=0; $i<$count; $i++) {
if($_POST['chk'][$i]) {
$sc_id = $_POST['sc_id'][$i];
sql_query(" delete from {$g5['shop_sendcost_table']} where sc_id = '$sc_id' ");
sql_query(" delete from {$g5['g5_shop_sendcost_table']} where sc_id = '$sc_id' ");
}
}
} else {
@ -34,7 +34,7 @@ if($w == 'd') {
if(!$sc_price)
alert('추가배송비를 입력해 주십시오.');
$sql = " insert into {$g5['shop_sendcost_table']}
$sql = " insert into {$g5['g5_shop_sendcost_table']}
( sc_name, sc_zip1, sc_zip2, sc_price )
values
( '$sc_name', '$sc_zip1', '$sc_zip2', '$sc_price' ) ";

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 {$g5['shop_wish_table']} a, {$g5['shop_item_table']} b ";
from {$g5['g5_shop_wish_table']} a, {$g5['g5_shop_item_table']} b ";
$sql .= " where a.it_id = b.it_id ";
if ($fr_date && $to_date)
{
@ -69,7 +69,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
<select name="sel_ca_id" id="sel_ca_id">
<option value=''>전체분류</option>
<?php
$sql1 = " select ca_id, ca_name from {$g5['shop_category_table']} order by ca_id ";
$sql1 = " select ca_id, ca_name from {$g5['g5_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

@ -40,7 +40,7 @@ define(_MISU_QUERY_, "
//==============================================================================
// 쇼핑몰 설정값 배열변수
$default = sql_fetch(" select * from {$g5['shop_default_table']} ");
$default = sql_fetch(" select * from {$g5['g5_shop_default_table']} ");
define('G5_SHOP_SKIN_PATH', G5_PATH.'/'.G5_SKIN_DIR.'/shop/'.$default['de_shop_skin']);
define('G5_SHOP_SKIN_URL', G5_URL .'/'.G5_SKIN_DIR.'/shop/'.$default['de_shop_skin']);

View File

@ -13,8 +13,8 @@ if(!sql_query(" select uq_id from {$g5['uniqid_table']} limit 1 ", false)) {
}
// 상품옵션 테이블 생성
if(!sql_query(" select io_id from {$g5['shop_item_option_table']} limit 1 ", false)) {
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['shop_item_option_table']}` (
if(!sql_query(" select io_id from {$g5['g5_shop_item_option_table']} limit 1 ", false)) {
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['g5_shop_item_option_table']}` (
`io_no` INT(11) NOT NULL AUTO_INCREMENT,
`io_id` VARCHAR(255) NOT NULL DEFAULT '',
`io_type` TINYINT(4) NOT NULL DEFAULT '0',
@ -27,48 +27,48 @@ if(!sql_query(" select io_id from {$g5['shop_item_option_table']} limit 1 ", fal
KEY `io_id` (`io_id`),
KEY `it_id` (`it_id`)
) ", false);
sql_query(" ALTER TABLE `{$g5['shop_item_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}`
ADD `it_option_subject` VARCHAR(255) NOT NULL DEFAULT '' AFTER `it_origin`,
ADD `it_supply_subject` VARCHAR(255) NOT NULL DEFAULT '' AFTER `it_option` ", false);
}
// uq_id 필드추가
$sql = " select uq_id from {$g5['shop_cart_table']} limit 1 ";
$sql = " select uq_id from {$g5['g5_shop_cart_table']} limit 1 ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" ALTER TABLE `{$g5['shop_cart_table']}` ADD `uq_id` BIGINT(20) unsigned NOT NULL AFTER `ct_id` ", false);
sql_query(" ALTER TABLE `{$g5['shop_order_table']}` ADD `uq_id` BIGINT(20) unsigned NOT NULL AFTER `od_id` ", false);
sql_query(" ALTER TABLE `{$g5['shop_order_table']}` MODIFY COLUMN od_id BIGINT(20) unsigned NOT NULL ", false);
sql_query(" ALTER TABLE `{$g5['shop_cart_table']}` ADD INDEX uq_id (uq_id) ", false);
sql_query(" ALTER TABLE `{$g5['shop_order_table']}` ADD UNIQUE uq_id (uq_id) ", false);
sql_query(" ALTER TABLE `{$g5['shop_order_table']}` DROP INDEX index1", false);
sql_query(" ALTER TABLE `{$g5['g5_shop_cart_table']}` ADD `uq_id` BIGINT(20) unsigned NOT NULL AFTER `ct_id` ", false);
sql_query(" ALTER TABLE `{$g5['g5_shop_order_table']}` ADD `uq_id` BIGINT(20) unsigned NOT NULL AFTER `od_id` ", false);
sql_query(" ALTER TABLE `{$g5['g5_shop_order_table']}` MODIFY COLUMN od_id BIGINT(20) unsigned NOT NULL ", false);
sql_query(" ALTER TABLE `{$g5['g5_shop_cart_table']}` ADD INDEX uq_id (uq_id) ", false);
sql_query(" ALTER TABLE `{$g5['g5_shop_order_table']}` ADD UNIQUE uq_id (uq_id) ", false);
sql_query(" ALTER TABLE `{$g5['g5_shop_order_table']}` DROP INDEX index1", false);
}
// 가격필드명변경
$sql = " select it_price from {$g5['shop_item_table']} limit 1 ";
$sql = " select it_price from {$g5['g5_shop_item_table']} limit 1 ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" ALTER TABLE `{$g5['shop_item_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}`
CHANGE `it_amount` `it_price` INT(11) NOT NULL DEFAULT '0',
CHANGE `it_cust_amount` `it_cust_price` INT(11) NOT NULL DEFAULT '0' ", false);
sql_query(" ALTER TABLE `{$g5['shop_cart_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_cart_table']}`
CHANGE `ct_amount` `ct_price` INT(11) NOT NULL DEFAULT '0',
ADD `it_name` VARCHAR(255) NOT NULL DEFAULT '' AFTER `it_id` ", false);
}
// od_mobile 추가
$sql = " select od_mobile from {$g5['shop_order_table']} limit 1 ";
$sql = " select od_mobile from {$g5['g5_shop_order_table']} limit 1 ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" ALTER TABLE `{$g5['shop_order_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_order_table']}`
ADD `od_mobile` TINYINT(4) NOT NULL DEFAULT '0' AFTER `od_time` ", false);
}
// ct_option 추가
$sql = " select ct_option from {$g5['shop_cart_table']} limit 1 ";
$sql = " select ct_option from {$g5['g5_shop_cart_table']} limit 1 ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" ALTER TABLE `{$g5['shop_cart_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_cart_table']}`
ADD `ct_option` VARCHAR(255) NOT NULL DEFAULT '' AFTER `ct_stock_use`,
ADD `io_id` VARCHAR(255) NOT NULL DEFAULT '' AFTER `ct_qty`,
ADD `io_type` TINYINT(4) NOT NULL DEFAULT '0' AFTER `io_id`,
@ -76,28 +76,28 @@ if(!$result) {
}
// it_brand 추가
$sql = " select it_brand from {$g5['shop_item_table']} limit 1 ";
$sql = " select it_brand from {$g5['g5_shop_item_table']} limit 1 ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" ALTER TABLE `{$g5['shop_item_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}`
ADD `it_brand` VARCHAR(255) NOT NULL DEFAULT '' AFTER `it_origin`,
ADD `it_model` VARCHAR(255) NOT NULL DEFAULT '' AFTER `it_brand` ", false);
}
// sms_cont5 필드추가
$sql = " select de_sms_cont5 from {$g5['shop_default_table']} ";
$sql = " select de_sms_cont5 from {$g5['g5_shop_default_table']} ";
$result = sql_query($sql, false);
if (!$result) {
sql_query(" ALTER TABLE `{$g5['shop_default_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}`
ADD `de_sms_cont5` VARCHAR(255) NOT NULL DEFAULT '' AFTER `de_sms_cont4`,
ADD `de_sms_use5` TINYINT(4) NOT NULL DEFAULT '0' AFTER `de_sms_use4` ", false);
}
// 모바일 상품유형 필드 추가
$sql = " select de_mobile_type1_list_use from {$g5['shop_default_table']} ";
$sql = " select de_mobile_type1_list_use from {$g5['g5_shop_default_table']} ";
$result = sql_query($sql, false);
if (!$result) {
sql_query(" ALTER TABLE `{$g5['shop_default_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}`
ADD `de_mobile_type1_list_use` TINYINT(4) NOT NULL DEFAULT '0' AFTER `de_type5_img_height`,
ADD `de_mobile_type1_list_skin` VARCHAR(255) NOT NULL DEFAULT '' AFTER `de_mobile_type1_list_use`,
ADD `de_mobile_type1_list_row` INT(11) NOT NULL DEFAULT '0' AFTER `de_mobile_type1_list_skin`,
@ -127,32 +127,32 @@ if (!$result) {
}
// it_id type 수정
$sql = " SHOW COLUMNS FROM `{$g5['shop_item_table']}` WHERE field = 'it_id' ";
$sql = " SHOW COLUMNS FROM `{$g5['g5_shop_item_table']}` WHERE field = 'it_id' ";
$row = sql_fetch($sql);
if(intval(preg_replace("/[^0-9]/", "", $row['Type'])) != 20) {
sql_query(" ALTER TABLE `{$g5['shop_item_table']}` MODIFY COLUMN it_id VARCHAR(20) NOT NULL DEFAULT '' ", false);
sql_query(" ALTER TABLE `{$g5['shop_cart_table']}` MODIFY COLUMN it_id VARCHAR(20) NOT NULL DEFAULT '' ", false);
sql_query(" ALTER TABLE `{$g5['shop_item_qa_table']}` MODIFY COLUMN it_id VARCHAR(20) NOT NULL DEFAULT '' ", false);
sql_query(" ALTER TABLE `{$g5['shop_item_use_table']}` MODIFY COLUMN it_id VARCHAR(20) NOT NULL DEFAULT '' ", false);
sql_query(" ALTER TABLE `{$g5['shop_item_relation_table']}` MODIFY COLUMN it_id VARCHAR(20) NOT NULL DEFAULT '' ", false);
sql_query(" ALTER TABLE `{$g5['shop_item_relation_table']}` MODIFY COLUMN it_id2 VARCHAR(20) NOT NULL DEFAULT '' ", false);
sql_query(" ALTER TABLE `{$g5['shop_event_item_table']}` MODIFY COLUMN it_id VARCHAR(20) NOT NULL DEFAULT '' ", false);
sql_query(" ALTER TABLE `{$g5['shop_wish_table']}` MODIFY COLUMN it_id VARCHAR(20) NOT NULL DEFAULT '' ", false);
sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}` MODIFY COLUMN it_id VARCHAR(20) NOT NULL DEFAULT '' ", false);
sql_query(" ALTER TABLE `{$g5['g5_shop_cart_table']}` MODIFY COLUMN it_id VARCHAR(20) NOT NULL DEFAULT '' ", false);
sql_query(" ALTER TABLE `{$g5['g5_shop_item_qa_table']}` MODIFY COLUMN it_id VARCHAR(20) NOT NULL DEFAULT '' ", false);
sql_query(" ALTER TABLE `{$g5['g5_shop_item_use_table']}` MODIFY COLUMN it_id VARCHAR(20) NOT NULL DEFAULT '' ", false);
sql_query(" ALTER TABLE `{$g5['g5_shop_item_relation_table']}` MODIFY COLUMN it_id VARCHAR(20) NOT NULL DEFAULT '' ", false);
sql_query(" ALTER TABLE `{$g5['g5_shop_item_relation_table']}` MODIFY COLUMN it_id2 VARCHAR(20) NOT NULL DEFAULT '' ", false);
sql_query(" ALTER TABLE `{$g5['g5_shop_event_item_table']}` MODIFY COLUMN it_id VARCHAR(20) NOT NULL DEFAULT '' ", false);
sql_query(" ALTER TABLE `{$g5['g5_shop_wish_table']}` MODIFY COLUMN it_id VARCHAR(20) NOT NULL DEFAULT '' ", false);
}
// 상품요약정보 필드추가
$sql = " select it_info_gubun from {$g5['shop_item_table']} limit 1 ";
$sql = " select it_info_gubun from {$g5['g5_shop_item_table']} limit 1 ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" ALTER TABLE `{$g5['shop_item_table']}` ADD `it_info_gubun` VARCHAR(50) NOT NULL DEFAULT '' AFTER `it_tel_inq`,
sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}` ADD `it_info_gubun` VARCHAR(50) NOT NULL DEFAULT '' AFTER `it_tel_inq`,
ADD `it_info_value` TEXT NOT NULL AFTER `it_info_gubun` ", false);
}
// 상품이미지 필드추가
$sql = " select it_img1 from {$g5['shop_item_table']} limit 1 ";
$sql = " select it_img1 from {$g5['g5_shop_item_table']} limit 1 ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" ALTER TABLE `{$g5['shop_item_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}`
ADD `it_img1` VARCHAR(255) NOT NULL DEFAULT '' AFTER `it_info_value`,
ADD `it_img2` VARCHAR(255) NOT NULL DEFAULT '' AFTER `it_img1`,
ADD `it_img3` VARCHAR(255) NOT NULL DEFAULT '' AFTER `it_img2`,
@ -166,44 +166,44 @@ if(!$result) {
}
// 관련상품 정렬을 위한 ir_no 필드 추가
$sql = " select ir_no from {$g5['shop_item_relation_table']} limit 1 ";
$sql = " select ir_no from {$g5['g5_shop_item_relation_table']} limit 1 ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" ALTER TABLE `{$g5['shop_item_relation_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_item_relation_table']}`
ADD `ir_no` INT(11) NOT NULL DEFAULT '0' AFTER `it_id2` ", false);
}
if (!isset($it['it_mobile_explan'])) {
sql_query(" ALTER TABLE `{$g5['shop_item_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}`
ADD `it_mobile_explan` TEXT NOT NULL AFTER `it_explan`,
ADD `it_mobile_head_html` TEXT NOT NULL AFTER `it_tail_html`,
ADD `it_mobile_tail_html` TEXT NOT NULL AFTER `it_mobile_head_html` ", false);
}
// de_guest_cart_use 필드추가
$sql = " select de_guest_cart_use from {$g5['shop_default_table']} ";
$sql = " select de_guest_cart_use from {$g5['g5_shop_default_table']} ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" ALTER TABLE `{$g5['shop_cart_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_cart_table']}`
ADD `mb_id` VARCHAR(255) NOT NULL DEFAULT '' AFTER `uq_id` ", false);
sql_query(" ALTER TABLE `{$g5['shop_default_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}`
ADD `de_cart_keep_term` INT(11) NOT NULL DEFAULT '0' AFTER `de_code_dup_use`,
ADD `de_guest_cart_use` TINYINT(4) NOT NULL DEFAULT '0' AFTER `de_cart_keep_term` ", false);
}
// 포인트타입 필드 추가
$sql = " select it_point_type from {$g5['shop_item_table']} limit 1 ";
$sql = " select it_point_type from {$g5['g5_shop_item_table']} limit 1 ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" ALTER TABLE `{$g5['shop_item_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}`
ADD `it_point_type` TINYINT(4) NOT NULL DEFAULT '0' AFTER `it_point` ", false);
}
// 쿠폰테이블
$sql = " DESCRIBE `{$g5['shop_coupon_table']}` ";
$sql = " DESCRIBE `{$g5['g5_shop_coupon_table']}` ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['shop_coupon_table']}` (
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['g5_shop_coupon_table']}` (
`cp_no` INT(11) NOT NULL AUTO_INCREMENT,
`cp_id` VARCHAR(255) NOT NULL DEFAULT '',
`cp_subject` VARCHAR(255) NOT NULL DEFAULT '',
@ -226,38 +226,38 @@ if(!$result) {
}
// 쿠폰관련필드 추가
$sql = " select cp_amount from {$g5['shop_cart_table']} limit 1 ";
$sql = " select cp_amount from {$g5['g5_shop_cart_table']} limit 1 ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" ALTER TABLE `{$g5['shop_cart_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_cart_table']}`
ADD `cp_amount` INT(11) NOT NULL DEFAULT '0' AFTER `ct_point` ", false);
sql_query(" ALTER TABLE `{$g5['shop_order_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_order_table']}`
ADD `od_coupon` INT(11) NOT NULL DEFAULT '0' AFTER `od_dc_amount`,
ADD `od_send_coupon` INT(11) NOT NULL DEFAULT '0' AFTER `od_send_cost` ", false);
}
// 쿠폰사용정보필드추가
$sql = " select od_id from {$g5['shop_coupon_table']} limit 1 ";
$sql = " select od_id from {$g5['g5_shop_coupon_table']} limit 1 ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" ALTER TABLE `{$g5['shop_coupon_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_coupon_table']}`
ADD `od_id` BIGINT(20) UNSIGNED NOT NULL AFTER `cp_maximum`,
ADD `cp_used_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `cp_used` ", false);
}
// 장바구니 선택필드추가
$sql = " select ct_select from {$g5['shop_cart_table']} limit 1 ";
$sql = " select ct_select from {$g5['g5_shop_cart_table']} limit 1 ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" ALTER TABLE `{$g5['shop_cart_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_cart_table']}`
ADD `ct_select` TINYINT(4) NOT NULL DEFAULT '0' AFTER `ct_direct` ", true);
}
// 개별배송비 필드 추가
$sql = " select it_sc_type from {$g5['shop_item_table']} limit 1 ";
$sql = " select it_sc_type from {$g5['g5_shop_item_table']} limit 1 ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" ALTER TABLE `{$g5['shop_item_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}`
ADD `it_sc_type` TINYINT(4) NOT NULL DEFAULT '0' AFTER `it_stock_qty`,
ADD `it_sc_method` TINYINT(4) NOT NULL DEFAULT '0' AFTER `it_sc_type`,
ADD `it_sc_amount` INT(11) NOT NULL DEFAULT '0' AFTER `it_sc_method`,
@ -266,28 +266,28 @@ if(!$result) {
}
// 장바구니 배송비필드 추가
$sql = " select ct_send_cost from {$g5['shop_cart_table']} limit 1 ";
$sql = " select ct_send_cost from {$g5['g5_shop_cart_table']} limit 1 ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" ALTER TABLE `{$g5['shop_cart_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_cart_table']}`
ADD `ct_send_cost` TINYINT(11) NOT NULL DEFAULT '0' AFTER `io_price` ", false);
}
// 결제필드 변경
$sql = " select od_temp_amount from {$g5['shop_order_table']} limit 1 ";
$sql = " select od_temp_amount from {$g5['g5_shop_order_table']} limit 1 ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" ALTER TABLE `{$g5['shop_order_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_order_table']}`
ADD `od_temp_amount` INT(11) NOT NULL DEFAULT '0' AFTER `od_send_coupon`,
ADD `od_receipt_amount` INT(11) NOT NULL DEFAULT '0' AFTER `od_temp_point`,
ADD `od_receipt_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `od_bank_account` ", false);
}
// 추가배송비 테이블
$sql = " select sc_id from {$g5['shop_sendcost_table']} limit 1 ";
$sql = " select sc_id from {$g5['g5_shop_sendcost_table']} limit 1 ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['shop_sendcost_table']}` (
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['g5_shop_sendcost_table']}` (
`sc_id` INT(11) NOT NULL AUTO_INCREMENT,
`sc_name` VARCHAR(255) NOT NULL DEFAULT '',
`sc_zip1` VARCHAR(10) NOT NULL DEFAULT '',
@ -300,35 +300,35 @@ if(!$result) {
}
// od_send_cost2 추가
$sql = " select od_send_cost2 from {$g5['shop_order_table']} limit 1 ";
$sql = " select od_send_cost2 from {$g5['g5_shop_order_table']} limit 1 ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" ALTER TABLE `{$g5['shop_order_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_order_table']}`
ADD `od_send_cost2` INT(11) NOT NULL DEFAULT '0' AFTER `od_send_coupon` ", false);
}
// 복합과세 필드 추가
$sql = " select de_tax_flag_use from {$g5['shop_default_table']} ";
$sql = " select de_tax_flag_use from {$g5['g5_shop_default_table']} ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" ALTER TABLE `{$g5['shop_default_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}`
ADD `de_tax_flag_use` TINYINT(4) NOT NULL DEFAULT '0' AFTER `de_escrow_use` ", false);
sql_query(" ALTER TABLE `{$g5['shop_item_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}`
ADD `it_notax` TINYINT(4) NOT NULL DEFAULT '0' AFTER `it_point_type` ", false);
}
// 에스크로필드 추가
$sql = " select od_tno from {$g5['shop_order_table']} limit 1 ";
$sql = " select od_tno from {$g5['g5_shop_order_table']} limit 1 ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" ALTER TABLE `{$g5['shop_order_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_order_table']}`
ADD `od_tno` VARCHAR(255) NOT NULL DEFAULT '' AFTER `od_settle_case`,
ADD `od_escrow` TINYINT(4) NOT NULL DEFAULT '0' AFTER `od_tno` ", true);
}
// shop_request 테이블이 없을 경우 생성
if(!sql_query(" select rq_id from {$g5['shop_request_table']} limit 1 ", false)) {
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['shop_request_table']}` (
if(!sql_query(" select rq_id from {$g5['g5_shop_request_table']} limit 1 ", false)) {
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['g5_shop_request_table']}` (
`rq_id` INT(11) NOT NULL AUTO_INCREMENT,
`rq_type` TINYINT(4) NOT NULL DEFAULT '0',
`rq_parent` INT(11) NOT NULL DEFAULT '0',
@ -351,38 +351,38 @@ if(!sql_query(" select rq_id from {$g5['shop_request_table']} limit 1 ", false))
}
// 수량변경 history 기록
if(!sql_query(" select od_mod_history from {$g5['shop_order_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['shop_order_table']}`
if(!sql_query(" select od_mod_history from {$g5['g5_shop_order_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_order_table']}`
ADD `od_mod_history` TEXT NOT NULL AFTER `od_shop_memo` ", true);
}
// 주문정보에 복합결제 필드추가
if(!sql_query(" select od_tax_flag from {$g5['shop_order_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['shop_order_table']}`
if(!sql_query(" select od_tax_flag from {$g5['g5_shop_order_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_order_table']}`
ADD `od_tax_flag` TINYINT(4) NOT NULL DEFAULT '0' AFTER `od_escrow` ", true);
}
*/
/*
// notax 필드추가
$sql = " select ct_notax from {$g5['shop_cart_table']} limit 1 ";
$sql = " select ct_notax from {$g5['g5_shop_cart_table']} limit 1 ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" ALTER TABLE `{$g5['shop_cart_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_cart_table']}`
ADD `ct_notax` TINYINT(4) NOT NULL DEFAULT '0' AFTER `ct_qty` ", true);
}
*/
// 쇼핑몰 스킨 필드 추가
if (!isset($default['de_shop_skin'])) {
sql_query(" ALTER TABLE `{$g5['shop_default_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}`
ADD `de_shop_skin` VARCHAR(255) NOT NULL DEFAULT '' AFTER `de_admin_info_email`,
ADD `de_shop_mobile_skin` VARCHAR(255) NOT NULL DEFAULT '' AFTER `de_shop_skin` ", false);
}
// 모바일 상품유형 필드 수정
if (!sql_query(" select de_mobile_type1_list_mod from {$g5['shop_default_table']} ", false)) {
sql_query(" ALTER TABLE `{$g5['shop_default_table']}`
if (!sql_query(" select de_mobile_type1_list_mod from {$g5['g5_shop_default_table']} ", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}`
CHANGE `de_mobile_type1_list_row` `de_mobile_type1_list_mod` INT(11) NOT NULL DEFAULT '0',
CHANGE `de_mobile_type2_list_row` `de_mobile_type2_list_mod` INT(11) NOT NULL DEFAULT '0',
CHANGE `de_mobile_type3_list_row` `de_mobile_type3_list_mod` INT(11) NOT NULL DEFAULT '0',
@ -391,34 +391,34 @@ if (!sql_query(" select de_mobile_type1_list_mod from {$g5['shop_default_table']
}
// 분류 모바일 필드명 수정
if(!sql_query(" select ca_mobile_list_mod from {$g5['shop_category_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['shop_category_table']}`
if(!sql_query(" select ca_mobile_list_mod from {$g5['g5_shop_category_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_category_table']}`
CHANGE `ca_mobile_list_row` `ca_mobile_list_mod` INT(11) NOT NULL DEFAULT '0' ", true);
}
// 과세, 비과세 금액 필드 추가
if(!sql_query(" select od_tax_mny from {$g5['shop_order_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['shop_order_table']}`
if(!sql_query(" select od_tax_mny from {$g5['g5_shop_order_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_order_table']}`
ADD `od_tax_mny` INT(11) NOT NULL DEFAULT '0' AFTER `od_tax_flag`,
ADD `od_vat_mny` INT(11) NOT NULL DEFAULT '0' AFTER `od_tax_mny`,
ADD `od_free_mny` INT(11) NOT NULL DEFAULT '0' AFTER `od_vat_mny` ", true);
}
// cart uq_id를 od_id로 변경
if(!sql_query(" select od_id from {$g5['shop_cart_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['shop_cart_table']}`
if(!sql_query(" select od_id from {$g5['g5_shop_cart_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_cart_table']}`
CHANGE `uq_id` `od_id` BIGINT(2) UNSIGNED NOT NULL ", true);
}
// it_mobile_name 필드추가
if(!sql_query(" select it_mobile_name from {$g5['shop_item_table']} limit 1 ", false)) {
sql_query( " ALTER TABLE `{$g5['shop_item_table']}`
if(!sql_query(" select it_mobile_name from {$g5['g5_shop_item_table']} limit 1 ", false)) {
sql_query( " ALTER TABLE `{$g5['g5_shop_item_table']}`
ADD `it_mobile_name` VARCHAR(255) NOT NULL DEFAULT '' AFTER `it_name` ", true);
}
// 개인결제 테이블추가
if(!sql_query(" select pp_id from {$g5['shop_personalpay_table']} limit 1 ", false)) {
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['shop_personalpay_table']}` (
if(!sql_query(" select pp_id from {$g5['g5_shop_personalpay_table']} limit 1 ", false)) {
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['g5_shop_personalpay_table']}` (
`pp_id` BIGINT(20) unsigned NOT NULL,
`od_id` BIGINT(20) unsigned NOT NULL,
`pp_name` VARCHAR(255) NOT NULL DEFAULT '',
@ -442,14 +442,14 @@ if(!sql_query(" select pp_id from {$g5['shop_personalpay_table']} limit 1 ", fal
}
// od_app_no 필드 추가
if(!sql_query(" select od_app_no from {$g5['shop_order_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['shop_order_table']}`
if(!sql_query(" select od_app_no from {$g5['g5_shop_order_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_order_table']}`
ADD `od_app_no` varchar(20) NOT NULL DEFAULT '' AFTER `od_tno` ", true);
}
// 배송지이력 테이블추가
if(!sql_query(" DESCRIBE `{$g5['shop_order_address_table']}` ", false)) {
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['shop_order_address_table']}` (
if(!sql_query(" DESCRIBE `{$g5['g5_shop_order_address_table']}` ", false)) {
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['g5_shop_order_address_table']}` (
`ad_id` int(11) NOT NULL AUTO_INCREMENT,
`mb_id` varchar(255) NOT NULL DEFAULT '',
`ad_subject` varchar(255) NOT NULL DEFAULT '',
@ -467,8 +467,8 @@ if(!sql_query(" DESCRIBE `{$g5['shop_order_address_table']}` ", false)) {
}
// 포인트 설정필드 변경
if(!sql_query(" select de_settle_min_point from {$g5['shop_default_table']} ", false)) {
sql_query(" ALTER TABLE `{$g5['shop_default_table']}`
if(!sql_query(" select de_settle_min_point from {$g5['g5_shop_default_table']} ", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}`
CHANGE `de_point_settle` `de_settle_min_point` int(11) NOT NULL DEFAULT '0',
ADD `de_settle_max_point` int(11) NOT NULL DEFAULT '0' AFTER `de_settle_min_point`,
ADD `de_settle_point_unit` int(11) NOT NULL DEFAULT '0' AFTER `de_settle_max_point`,
@ -476,8 +476,8 @@ if(!sql_query(" select de_settle_min_point from {$g5['shop_default_table']} ", f
}
// 주문 금액 등의 필드 추가
if(!sql_query(" select od_cart_count from {$g5['shop_order_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['shop_order_table']}`
if(!sql_query(" select od_cart_count from {$g5['g5_shop_order_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_order_table']}`
ADD `od_cart_count` int(11) NOT NULL DEFAULT '0' AFTER `od_memo`,
ADD `od_cart_price` int(11) NOT NULL DEFAULT '0' AFTER `od_cart_count`,
ADD `od_cart_coupon` int(11) NOT NULL DEFAULT '0' AFTER `od_cart_price`,
@ -486,39 +486,39 @@ if(!sql_query(" select od_cart_count from {$g5['shop_order_table']} limit 1 ", f
}
// order amount 필드명 수정
if(sql_query(" select od_cart_amount from {$g5['shop_order_table']} limit 1", false)) {
sql_query(" ALTER TABLE `{$g5['shop_order_table']}`
if(sql_query(" select od_cart_amount from {$g5['g5_shop_order_table']} limit 1", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_order_table']}`
CHANGE `od_cart_amount` `od_cart_price` int(11) NOT NULL DEFAULT '0',
CHANGE `od_receipt_amount` `od_receipt_price` int(11) NOT NULL DEFAULT '0',
CHANGE `od_cancel_amount` `od_cancel_price` int(11) NOT NULL DEFAULT '0' ", true);
}
// amount 필드명 수정
if(sql_query(" select cp_amount from {$g5['shop_cart_table']} limit 1", false)) {
sql_query(" ALTER TABLE `{$g5['shop_personalpay_table']}`
if(sql_query(" select cp_amount from {$g5['g5_shop_cart_table']} limit 1", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_personalpay_table']}`
CHANGE `pp_amount` `pp_price` int(11) NOT NULL DEFAULT '0',
CHANGE `pp_receipt_amount` `pp_receipt_price` int(11) NOT NULL DEFAULT '0' ", true);
sql_query(" ALTER TABLE `{$g5['shop_cart_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_cart_table']}`
CHANGE `cp_amount` `cp_price` int(11) NOT NULL DEFAULT '0' ", true);
sql_query(" ALTER TABLE `{$g5['shop_coupon_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_coupon_table']}`
CHANGE `cp_amount` `cp_price` int(11) NOT NULL DEFAULT '0' ", true);
sql_query(" ALTER TABLE `{$g5['shop_sendcost_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_sendcost_table']}`
CHANGE `sc_amount` `sc_price` int(11) NOT NULL DEFAULT '0' ", true);
sql_query(" ALTER TABLE `{$g5['shop_item_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}`
CHANGE `it_sc_amount` `it_sc_price` int(11) NOT NULL DEFAULT '0' ", true);
}
// 미수 필드 추가
if(!sql_query(" select od_misu from {$g5['shop_order_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['shop_order_table']}`
if(!sql_query(" select od_misu from {$g5['g5_shop_order_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_order_table']}`
ADD `od_misu` int(11) NOT NULL DEFAULT '0' AFTER `od_coupon` ", true);
}
// 쿠폰로그 테이블추가
if(!isset($g5['shop_coupon_log_table']))
die_utf8('dbconfig.php 파일에 $g5[\'shop_coupon_log_table\'] = SHOP_TABLE_PREFIX.\'coupon_log\'; // 쿠폰정보 테이블 추가해주세요.');
if(!sql_query(" DESCRIBE `{$g5['shop_coupon_log_table']}` ", false)) {
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['shop_coupon_log_table']}` (
if(!isset($g5['g5_shop_coupon_log_table']))
die_utf8('dbconfig.php 파일에 $g5[\'shop_coupon_log_table\'] = G5_SHOP_TABLE_PREFIX.\'coupon_log\'; // 쿠폰정보 테이블 추가해주세요.');
if(!sql_query(" DESCRIBE `{$g5['g5_shop_coupon_log_table']}` ", false)) {
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['g5_shop_coupon_log_table']}` (
`cl_id` int(11) NOT NULL AUTO_INCREMENT,
`cp_id` varchar(255) NOT NULL DEFAULT '',
`mb_id` varchar(255) NOT NULL DEFAULT '',
@ -529,15 +529,15 @@ if(!sql_query(" DESCRIBE `{$g5['shop_coupon_log_table']}` ", false)) {
KEY `mb_id` (`mb_id`),
KEY `od_id` (`od_id`)
)", true);
sql_query(" ALTER TABLE `{$g5['shop_coupon_table']}`
sql_query(" ALTER TABLE `{$g5['g5_shop_coupon_table']}`
DROP `od_id`,
DROP `cp_used_time`,
DROP `cp_used` ", true);
}
// 환불필드 추가
if(!sql_query(" select od_refund_price from {$g5['shop_order_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['shop_order_table']}`
if(!sql_query(" select od_refund_price from {$g5['g5_shop_order_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_order_table']}`
ADD `od_refund_price` int(11) NOT NULL DEFAULT '0' AFTER `od_receipt_point` ", true);
}
?>

View File

@ -1,700 +0,0 @@
-- --------------------------------------------------------
--
-- Table structure for table `g5_auth`
--
DROP TABLE IF EXISTS `g5_auth`;
CREATE TABLE IF NOT EXISTS `g5_auth` (
`mb_id` varchar(255) NOT NULL default '',
`au_menu` varchar(20) NOT NULL default '',
`au_auth` set('r','w','d') NOT NULL default '',
PRIMARY KEY (`mb_id`,`au_menu`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `g5_board`
--
DROP TABLE IF EXISTS `g5_board`;
CREATE TABLE IF NOT EXISTS `g5_board` (
`bo_table` varchar(20) NOT NULL DEFAULT '',
`gr_id` varchar(255) NOT NULL DEFAULT '',
`bo_subject` varchar(255) NOT NULL DEFAULT '',
`bo_device` enum('both','pc','mobile') NOT NULL DEFAULT 'both',
`bo_admin` varchar(255) NOT NULL DEFAULT '',
`bo_list_level` tinyint(4) NOT NULL DEFAULT '0',
`bo_read_level` tinyint(4) NOT NULL DEFAULT '0',
`bo_write_level` tinyint(4) NOT NULL DEFAULT '0',
`bo_reply_level` tinyint(4) NOT NULL DEFAULT '0',
`bo_comment_level` tinyint(4) NOT NULL DEFAULT '0',
`bo_upload_level` tinyint(4) NOT NULL DEFAULT '0',
`bo_download_level` tinyint(4) NOT NULL DEFAULT '0',
`bo_html_level` tinyint(4) NOT NULL DEFAULT '0',
`bo_link_level` tinyint(4) NOT NULL DEFAULT '0',
`bo_trackback_level` tinyint(4) NOT NULL DEFAULT '0',
`bo_count_delete` tinyint(4) NOT NULL DEFAULT '0',
`bo_count_modify` tinyint(4) NOT NULL DEFAULT '0',
`bo_read_point` int(11) NOT NULL DEFAULT '0',
`bo_write_point` int(11) NOT NULL DEFAULT '0',
`bo_comment_point` int(11) NOT NULL DEFAULT '0',
`bo_download_point` int(11) NOT NULL DEFAULT '0',
`bo_use_category` tinyint(4) NOT NULL DEFAULT '0',
`bo_category_list` text NOT NULL,
`bo_disable_tags` text NOT NULL,
`bo_use_sideview` tinyint(4) NOT NULL DEFAULT '0',
`bo_use_file_content` tinyint(4) NOT NULL DEFAULT '0',
`bo_use_secret` tinyint(4) NOT NULL DEFAULT '0',
`bo_use_dhtml_editor` tinyint(4) NOT NULL DEFAULT '0',
`bo_use_rss_view` tinyint(4) NOT NULL DEFAULT '0',
`bo_use_good` tinyint(4) NOT NULL DEFAULT '0',
`bo_use_nogood` tinyint(4) NOT NULL DEFAULT '0',
`bo_use_name` tinyint(4) NOT NULL DEFAULT '0',
`bo_use_signature` tinyint(4) NOT NULL DEFAULT '0',
`bo_use_ip_view` tinyint(4) NOT NULL DEFAULT '0',
`bo_use_trackback` tinyint(4) NOT NULL DEFAULT '0',
`bo_use_list_view` tinyint(4) NOT NULL DEFAULT '0',
`bo_use_list_file` tinyint(4) NOT NULL DEFAULT '0',
`bo_use_list_content` tinyint(4) NOT NULL DEFAULT '0',
`bo_table_width` int(11) NOT NULL DEFAULT '0',
`bo_subject_len` int(11) NOT NULL DEFAULT '0',
`bo_mobile_subject_len` int(11) NOT NULL DEFAULT '0',
`bo_page_rows` int(11) NOT NULL DEFAULT '0',
`bo_mobile_page_rows` int(11) NOT NULL DEFAULT '0',
`bo_new` int(11) NOT NULL DEFAULT '0',
`bo_hot` int(11) NOT NULL DEFAULT '0',
`bo_image_width` int(11) NOT NULL DEFAULT '0',
`bo_skin` varchar(255) NOT NULL DEFAULT '',
`bo_mobile_skin` varchar(255) NOT NULL DEFAULT '',
`bo_image_head` varchar(255) NOT NULL DEFAULT '',
`bo_image_tail` varchar(255) NOT NULL DEFAULT '',
`bo_include_head` varchar(255) NOT NULL DEFAULT '',
`bo_include_tail` varchar(255) NOT NULL DEFAULT '',
`bo_content_head` text NOT NULL,
`bo_mobile_content_head` text NOT NULL,
`bo_content_tail` text NOT NULL,
`bo_mobile_content_tail` text NOT NULL,
`bo_insert_content` text NOT NULL,
`bo_gallery_cols` int(11) NOT NULL DEFAULT '0',
`bo_gallery_width` int(11) NOT NULL DEFAULT '0',
`bo_gallery_height` int(11) NOT NULL DEFAULT '0',
`bo_mobile_gallery_cols` int(11) NOT NULL DEFAULT '0',
`bo_mobile_gallery_width` int(11) NOT NULL DEFAULT '0',
`bo_mobile_gallery_height` int(11) NOT NULL DEFAULT '0',
`bo_upload_size` int(11) NOT NULL DEFAULT '0',
`bo_reply_order` tinyint(4) NOT NULL DEFAULT '0',
`bo_use_search` tinyint(4) NOT NULL DEFAULT '0',
`bo_show_menu` tinyint(4) NOT NULL DEFAULT '0',
`bo_order` int(11) NOT NULL DEFAULT '0',
`bo_count_write` int(11) NOT NULL DEFAULT '0',
`bo_count_comment` int(11) NOT NULL DEFAULT '0',
`bo_write_min` int(11) NOT NULL DEFAULT '0',
`bo_write_max` int(11) NOT NULL DEFAULT '0',
`bo_comment_min` int(11) NOT NULL DEFAULT '0',
`bo_comment_max` int(11) NOT NULL DEFAULT '0',
`bo_notice` text NOT NULL,
`bo_upload_count` tinyint(4) NOT NULL DEFAULT '0',
`bo_use_email` tinyint(4) NOT NULL DEFAULT '0',
`bo_use_cert` enum('','cert','adult','hp-cert','hp-adult') NOT NULL DEFAULT '',
`bo_use_sns` tinyint(4) NOT NULL DEFAULT '0',
`bo_sort_field` varchar(255) NOT NULL DEFAULT '',
`bo_1_subj` varchar(255) NOT NULL DEFAULT '',
`bo_2_subj` varchar(255) NOT NULL DEFAULT '',
`bo_3_subj` varchar(255) NOT NULL DEFAULT '',
`bo_4_subj` varchar(255) NOT NULL DEFAULT '',
`bo_5_subj` varchar(255) NOT NULL DEFAULT '',
`bo_6_subj` varchar(255) NOT NULL DEFAULT '',
`bo_7_subj` varchar(255) NOT NULL DEFAULT '',
`bo_8_subj` varchar(255) NOT NULL DEFAULT '',
`bo_9_subj` varchar(255) NOT NULL DEFAULT '',
`bo_10_subj` varchar(255) NOT NULL DEFAULT '',
`bo_1` varchar(255) NOT NULL DEFAULT '',
`bo_2` varchar(255) NOT NULL DEFAULT '',
`bo_3` varchar(255) NOT NULL DEFAULT '',
`bo_4` varchar(255) NOT NULL DEFAULT '',
`bo_5` varchar(255) NOT NULL DEFAULT '',
`bo_6` varchar(255) NOT NULL DEFAULT '',
`bo_7` varchar(255) NOT NULL DEFAULT '',
`bo_8` varchar(255) NOT NULL DEFAULT '',
`bo_9` varchar(255) NOT NULL DEFAULT '',
`bo_10` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`bo_table`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `g5_board_file`
--
DROP TABLE IF EXISTS `g5_board_file`;
CREATE TABLE IF NOT EXISTS `g5_board_file` (
`bo_table` varchar(20) NOT NULL default '',
`wr_id` int(11) NOT NULL default '0',
`bf_no` int(11) NOT NULL default '0',
`bf_source` varchar(255) NOT NULL default '',
`bf_file` varchar(255) NOT NULL default '',
`bf_download` int(11) NOT NULL,
`bf_content` text NOT NULL,
`bf_filesize` int(11) NOT NULL default '0',
`bf_width` int(11) NOT NULL default '0',
`bf_height` smallint(6) NOT NULL default '0',
`bf_type` tinyint(4) NOT NULL default '0',
`bf_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`bo_table`,`wr_id`,`bf_no`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `g5_board_good`
--
DROP TABLE IF EXISTS `g5_board_good`;
CREATE TABLE IF NOT EXISTS `g5_board_good` (
`bg_id` int(11) NOT NULL auto_increment,
`bo_table` varchar(20) NOT NULL default '',
`wr_id` int(11) NOT NULL default '0',
`mb_id` varchar(20) NOT NULL default '',
`bg_flag` varchar(255) NOT NULL default '',
`bg_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`bg_id`),
UNIQUE KEY `fkey1` (`bo_table`,`wr_id`,`mb_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `g5_board_new`
--
DROP TABLE IF EXISTS `g5_board_new`;
CREATE TABLE IF NOT EXISTS `g5_board_new` (
`bn_id` int(11) NOT NULL auto_increment,
`bo_table` varchar(20) NOT NULL default '',
`wr_id` int(11) NOT NULL default '0',
`wr_parent` int(11) NOT NULL default '0',
`bn_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
`mb_id` varchar(20) NOT NULL default '',
PRIMARY KEY (`bn_id`),
KEY `mb_id` (`mb_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `g5_config`
--
DROP TABLE IF EXISTS `g5_config`;
CREATE TABLE IF NOT EXISTS `g5_config` (
`cf_title` varchar(255) NOT NULL DEFAULT '',
`cf_admin` varchar(255) NOT NULL DEFAULT '',
`cf_admin_email` varchar(255) NOT NULL DEFAULT '',
`cf_include_index` varchar(255) NOT NULL DEFAULT '',
`cf_include_head` varchar(255) NOT NULL DEFAULT '',
`cf_include_tail` varchar(255) NOT NULL DEFAULT '',
`cf_add_script` text NOT NULL,
`cf_use_point` tinyint(4) NOT NULL DEFAULT '0',
`cf_point_term` int(11) NOT NULL DEFAULT '0',
`cf_use_norobot` tinyint(4) NOT NULL DEFAULT '0',
`cf_use_copy_log` tinyint(4) NOT NULL DEFAULT '0',
`cf_use_email_certify` tinyint(4) NOT NULL DEFAULT '0',
`cf_login_point` int(11) NOT NULL DEFAULT '0',
`cf_cut_name` tinyint(4) NOT NULL DEFAULT '0',
`cf_nick_modify` int(11) NOT NULL DEFAULT '0',
`cf_new_skin` varchar(255) NOT NULL DEFAULT '',
`cf_login_skin` varchar(255) NOT NULL DEFAULT '',
`cf_new_rows` int(11) NOT NULL DEFAULT '0',
`cf_search_skin` varchar(255) NOT NULL DEFAULT '',
`cf_connect_skin` varchar(255) NOT NULL DEFAULT '',
`cf_read_point` int(11) NOT NULL DEFAULT '0',
`cf_write_point` int(11) NOT NULL DEFAULT '0',
`cf_comment_point` int(11) NOT NULL DEFAULT '0',
`cf_download_point` int(11) NOT NULL DEFAULT '0',
`cf_search_bgcolor` varchar(255) NOT NULL DEFAULT '',
`cf_search_color` varchar(255) NOT NULL DEFAULT '',
`cf_write_pages` int(11) NOT NULL DEFAULT '0',
`cf_mobile_pages` int(11) NOT NULL DEFAULT '0',
`cf_link_target` varchar(255) NOT NULL DEFAULT '',
`cf_delay_sec` int(11) NOT NULL DEFAULT '0',
`cf_filter` text NOT NULL,
`cf_possible_ip` text NOT NULL,
`cf_intercept_ip` text NOT NULL,
`cf_analytics` text NOT NULL,
`cf_register_skin` varchar(255) NOT NULL DEFAULT 'basic',
`cf_member_skin` varchar(255) NOT NULL DEFAULT '',
`cf_use_homepage` tinyint(4) NOT NULL DEFAULT '0',
`cf_req_homepage` tinyint(4) NOT NULL DEFAULT '0',
`cf_use_tel` tinyint(4) NOT NULL DEFAULT '0',
`cf_req_tel` tinyint(4) NOT NULL DEFAULT '0',
`cf_use_hp` tinyint(4) NOT NULL DEFAULT '0',
`cf_req_hp` tinyint(4) NOT NULL DEFAULT '0',
`cf_use_addr` tinyint(4) NOT NULL DEFAULT '0',
`cf_req_addr` tinyint(4) NOT NULL DEFAULT '0',
`cf_use_signature` tinyint(4) NOT NULL DEFAULT '0',
`cf_req_signature` tinyint(4) NOT NULL DEFAULT '0',
`cf_use_profile` tinyint(4) NOT NULL DEFAULT '0',
`cf_req_profile` tinyint(4) NOT NULL DEFAULT '0',
`cf_register_level` tinyint(4) NOT NULL DEFAULT '0',
`cf_register_point` int(11) NOT NULL DEFAULT '0',
`cf_icon_level` tinyint(4) NOT NULL DEFAULT '0',
`cf_use_recommend` tinyint(4) NOT NULL DEFAULT '0',
`cf_recommend_point` int(11) NOT NULL DEFAULT '0',
`cf_leave_day` int(11) NOT NULL DEFAULT '0',
`cf_search_part` int(11) NOT NULL DEFAULT '0',
`cf_email_use` tinyint(4) NOT NULL DEFAULT '0',
`cf_email_wr_super_admin` tinyint(4) NOT NULL DEFAULT '0',
`cf_email_wr_group_admin` tinyint(4) NOT NULL DEFAULT '0',
`cf_email_wr_board_admin` tinyint(4) NOT NULL DEFAULT '0',
`cf_email_wr_write` tinyint(4) NOT NULL DEFAULT '0',
`cf_email_wr_comment_all` tinyint(4) NOT NULL DEFAULT '0',
`cf_email_mb_super_admin` tinyint(4) NOT NULL DEFAULT '0',
`cf_email_mb_member` tinyint(4) NOT NULL DEFAULT '0',
`cf_email_po_super_admin` tinyint(4) NOT NULL DEFAULT '0',
`cf_prohibit_id` text NOT NULL,
`cf_prohibit_email` text NOT NULL,
`cf_new_del` int(11) NOT NULL DEFAULT '0',
`cf_memo_del` int(11) NOT NULL DEFAULT '0',
`cf_visit_del` int(11) NOT NULL DEFAULT '0',
`cf_popular_del` int(11) NOT NULL DEFAULT '0',
`cf_use_jumin` tinyint(4) NOT NULL DEFAULT '0',
`cf_use_member_icon` tinyint(4) NOT NULL DEFAULT '0',
`cf_member_icon_size` int(11) NOT NULL DEFAULT '0',
`cf_member_icon_width` int(11) NOT NULL DEFAULT '0',
`cf_member_icon_height` int(11) NOT NULL DEFAULT '0',
`cf_login_minutes` int(11) NOT NULL DEFAULT '0',
`cf_image_extension` varchar(255) NOT NULL DEFAULT '',
`cf_flash_extension` varchar(255) NOT NULL DEFAULT '',
`cf_movie_extension` varchar(255) NOT NULL DEFAULT '',
`cf_formmail_is_member` tinyint(4) NOT NULL DEFAULT '0',
`cf_page_rows` int(11) NOT NULL DEFAULT '0',
`cf_visit` varchar(255) NOT NULL DEFAULT '',
`cf_max_po_id` int(11) NOT NULL DEFAULT '0',
`cf_stipulation` text NOT NULL,
`cf_privacy` text NOT NULL,
`cf_open_modify` int(11) NOT NULL DEFAULT '0',
`cf_memo_send_point` int(11) NOT NULL DEFAULT '0',
`cf_mobile_new_skin` varchar(255) NOT NULL DEFAULT '',
`cf_mobile_search_skin` varchar(255) NOT NULL DEFAULT '',
`cf_mobile_connect_skin` varchar(255) NOT NULL DEFAULT '',
`cf_mobile_member_skin` varchar(255) NOT NULL DEFAULT '',
`cf_gcaptcha_mp3` varchar(255) NOT NULL DEFAULT '',
`cf_editor` varchar(255) NOT NULL DEFAULT '',
`cf_cert_use` tinyint(4) NOT NULL DEFAULT '0',
`cf_cert_ipin` varchar(255) NOT NULL DEFAULT '',
`cf_cert_hp` varchar(255) NOT NULL DEFAULT '',
`cf_cert_kcb_cd` varchar(255) NOT NULL DEFAULT '',
`cf_cert_kcp_cd` varchar(255) NOT NULL DEFAULT '',
`cf_cert_limit` int(11) NOT NULL DEFAULT '0',
`cf_googl_shorturl_apikey` varchar(255) NOT NULL DEFAULT '',
`cf_facebook_appid` varchar(255) NOT NULL,
`cf_facebook_secret` varchar(255) NOT NULL,
`cf_twitter_key` varchar(255) NOT NULL,
`cf_twitter_secret` varchar(255) NOT NULL,
`cf_me2day_key` varchar(255) NOT NULL,
`cf_1_subj` varchar(255) NOT NULL DEFAULT '',
`cf_2_subj` varchar(255) NOT NULL DEFAULT '',
`cf_3_subj` varchar(255) NOT NULL DEFAULT '',
`cf_4_subj` varchar(255) NOT NULL DEFAULT '',
`cf_5_subj` varchar(255) NOT NULL DEFAULT '',
`cf_6_subj` varchar(255) NOT NULL DEFAULT '',
`cf_7_subj` varchar(255) NOT NULL DEFAULT '',
`cf_8_subj` varchar(255) NOT NULL DEFAULT '',
`cf_9_subj` varchar(255) NOT NULL DEFAULT '',
`cf_10_subj` varchar(255) NOT NULL DEFAULT '',
`cf_1` varchar(255) NOT NULL DEFAULT '',
`cf_2` varchar(255) NOT NULL DEFAULT '',
`cf_3` varchar(255) NOT NULL DEFAULT '',
`cf_4` varchar(255) NOT NULL DEFAULT '',
`cf_5` varchar(255) NOT NULL DEFAULT '',
`cf_6` varchar(255) NOT NULL DEFAULT '',
`cf_7` varchar(255) NOT NULL DEFAULT '',
`cf_8` varchar(255) NOT NULL DEFAULT '',
`cf_9` varchar(255) NOT NULL DEFAULT '',
`cf_10` varchar(255) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `g5_cert_history`
--
CREATE TABLE IF NOT EXISTS `g5_cert_history` (
`cr_id` int(11) NOT NULL auto_increment,
`mb_id` varchar(255) NOT NULL DEFAULT '',
`cr_company` varchar(255) NOT NULL DEFAULT '',
`cr_method` varchar(255) NOT NULL DEFAULT '',
`cr_ip` varchar(255) NOT NULL DEFAULT '',
`cr_date` date NOT NULL DEFAULT '0000-00-00',
`cr_time` time NOT NULL DEFAULT '00:00:00',
PRIMARY KEY (`cr_id`),
KEY `mb_id` (`mb_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `g5_group`
--
DROP TABLE IF EXISTS `g5_group`;
CREATE TABLE IF NOT EXISTS `g5_group` (
`gr_id` varchar(10) NOT NULL default '',
`gr_subject` varchar(255) NOT NULL default '',
`gr_device` ENUM('both','pc','mobile') NOT NULL DEFAULT 'both',
`gr_admin` varchar(255) NOT NULL default '',
`gr_use_access` tinyint(4) NOT NULL default '0',
`gr_show_menu` tinyint(4) NOT NULL default '0',
`gr_order` int(11) NOT NULL default '0',
`gr_1_subj` varchar(255) NOT NULL default '',
`gr_2_subj` varchar(255) NOT NULL default '',
`gr_3_subj` varchar(255) NOT NULL default '',
`gr_4_subj` varchar(255) NOT NULL default '',
`gr_5_subj` varchar(255) NOT NULL default '',
`gr_6_subj` varchar(255) NOT NULL default '',
`gr_7_subj` varchar(255) NOT NULL default '',
`gr_8_subj` varchar(255) NOT NULL default '',
`gr_9_subj` varchar(255) NOT NULL default '',
`gr_10_subj` varchar(255) NOT NULL default '',
`gr_1` varchar(255) NOT NULL default '',
`gr_2` varchar(255) NOT NULL default '',
`gr_3` varchar(255) NOT NULL default '',
`gr_4` varchar(255) NOT NULL default '',
`gr_5` varchar(255) NOT NULL default '',
`gr_6` varchar(255) NOT NULL default '',
`gr_7` varchar(255) NOT NULL default '',
`gr_8` varchar(255) NOT NULL default '',
`gr_9` varchar(255) NOT NULL default '',
`gr_10` varchar(255) NOT NULL default '',
PRIMARY KEY (`gr_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `g5_group_member`
--
DROP TABLE IF EXISTS `g5_group_member`;
CREATE TABLE IF NOT EXISTS `g5_group_member` (
`gm_id` int(11) NOT NULL auto_increment,
`gr_id` varchar(255) NOT NULL default '',
`mb_id` varchar(255) NOT NULL default '',
`gm_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`gm_id`),
KEY `gr_id` (`gr_id`),
KEY `mb_id` (`mb_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `g5_login`
--
DROP TABLE IF EXISTS `g5_login`;
CREATE TABLE IF NOT EXISTS `g5_login` (
`lo_ip` varchar(255) NOT NULL default '',
`mb_id` varchar(255) NOT NULL default '',
`lo_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
`lo_location` text NOT NULL,
`lo_url` text NOT NULL,
PRIMARY KEY (`lo_ip`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `g5_mail`
--
DROP TABLE IF EXISTS `g5_mail`;
CREATE TABLE IF NOT EXISTS `g5_mail` (
`ma_id` int(11) NOT NULL auto_increment,
`ma_subject` varchar(255) NOT NULL default '',
`ma_content` mediumtext NOT NULL,
`ma_time` datetime NOT NULL default '0000-00-00 00:00:00',
`ma_ip` varchar(255) NOT NULL default '',
`ma_last_option` text NOT NULL,
PRIMARY KEY (`ma_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `g5_member`
--
DROP TABLE IF EXISTS `g5_member`;
CREATE TABLE IF NOT EXISTS `g5_member` (
`mb_no` int(11) NOT NULL auto_increment,
`mb_id` varchar(255) NOT NULL default '',
`mb_password` varchar(255) NOT NULL default '',
`mb_name` varchar(255) NOT NULL default '',
`mb_nick` varchar(255) NOT NULL default '',
`mb_nick_date` date NOT NULL default '0000-00-00',
`mb_email` varchar(255) NOT NULL default '',
`mb_homepage` varchar(255) NOT NULL default '',
`mb_password_q` varchar(255) NOT NULL default '',
`mb_password_a` varchar(255) NOT NULL default '',
`mb_level` tinyint(4) NOT NULL default '0',
`mb_jumin` varchar(255) NOT NULL default '',
`mb_sex` char(1) NOT NULL default '',
`mb_birth` varchar(255) NOT NULL default '',
`mb_tel` varchar(255) NOT NULL default '',
`mb_hp` varchar(255) NOT NULL default '',
`mb_certify` varchar(20) NOT NULL default '',
`mb_adult` tinyint(4) NOT NULL default '0',
`mb_zip1` char(3) NOT NULL default '',
`mb_zip2` char(3) NOT NULL default '',
`mb_addr1` varchar(255) NOT NULL default '',
`mb_addr2` varchar(255) NOT NULL default '',
`mb_signature` text NOT NULL,
`mb_recommend` varchar(255) NOT NULL default '',
`mb_point` int(11) NOT NULL default '0',
`mb_today_login` datetime NOT NULL default '0000-00-00 00:00:00',
`mb_login_ip` varchar(255) NOT NULL default '',
`mb_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
`mb_ip` varchar(255) NOT NULL default '',
`mb_leave_date` varchar(8) NOT NULL default '',
`mb_intercept_date` varchar(8) NOT NULL default '',
`mb_email_certify` datetime NOT NULL default '0000-00-00 00:00:00',
`mb_memo` text NOT NULL,
`mb_lost_certify` varchar(255) NOT NULL,
`mb_mailling` tinyint(4) NOT NULL default '0',
`mb_sms` tinyint(4) NOT NULL default '0',
`mb_open` tinyint(4) NOT NULL default '0',
`mb_open_date` date NOT NULL default '0000-00-00',
`mb_profile` text NOT NULL,
`mb_memo_call` varchar(255) NOT NULL default '',
`mb_1` varchar(255) NOT NULL default '',
`mb_2` varchar(255) NOT NULL default '',
`mb_3` varchar(255) NOT NULL default '',
`mb_4` varchar(255) NOT NULL default '',
`mb_5` varchar(255) NOT NULL default '',
`mb_6` varchar(255) NOT NULL default '',
`mb_7` varchar(255) NOT NULL default '',
`mb_8` varchar(255) NOT NULL default '',
`mb_9` varchar(255) NOT NULL default '',
`mb_10` varchar(255) NOT NULL default '',
PRIMARY KEY (`mb_no`),
UNIQUE KEY `mb_id` (`mb_id`),
KEY `mb_today_login` (`mb_today_login`),
KEY `mb_datetime` (`mb_datetime`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `g5_memo`
--
DROP TABLE IF EXISTS `g5_memo`;
CREATE TABLE IF NOT EXISTS `g5_memo` (
`me_id` int(11) NOT NULL default '0',
`me_recv_mb_id` varchar(255) NOT NULL default '',
`me_send_mb_id` varchar(255) NOT NULL default '',
`me_send_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
`me_read_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
`me_memo` text NOT NULL,
PRIMARY KEY (`me_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `g5_point`
--
DROP TABLE IF EXISTS `g5_point`;
CREATE TABLE IF NOT EXISTS `g5_point` (
`po_id` int(11) NOT NULL auto_increment,
`mb_id` varchar(20) NOT NULL default '',
`po_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
`po_content` varchar(255) NOT NULL default '',
`po_point` int(11) NOT NULL default '0',
`po_use_point` int(11) NOT NULL default '0',
`po_expired` tinyint(4) NOT NULL default '0',
`po_expire_date` date NOT NULL default '0000-00-00',
`po_mb_point` int(11) NOT NULL default '0',
`po_rel_table` varchar(20) NOT NULL default '',
`po_rel_id` varchar(20) NOT NULL default '',
`po_rel_action` varchar(255) NOT NULL default '',
PRIMARY KEY (`po_id`),
KEY `index1` (`mb_id`,`po_rel_table`,`po_rel_id`,`po_rel_action`),
KEY `index2` (`po_expire_date`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `g5_poll`
--
DROP TABLE IF EXISTS `g5_poll`;
CREATE TABLE IF NOT EXISTS `g5_poll` (
`po_id` int(11) NOT NULL auto_increment,
`po_subject` varchar(255) NOT NULL default '',
`po_poll1` varchar(255) NOT NULL default '',
`po_poll2` varchar(255) NOT NULL default '',
`po_poll3` varchar(255) NOT NULL default '',
`po_poll4` varchar(255) NOT NULL default '',
`po_poll5` varchar(255) NOT NULL default '',
`po_poll6` varchar(255) NOT NULL default '',
`po_poll7` varchar(255) NOT NULL default '',
`po_poll8` varchar(255) NOT NULL default '',
`po_poll9` varchar(255) NOT NULL default '',
`po_cnt1` int(11) NOT NULL default '0',
`po_cnt2` int(11) NOT NULL default '0',
`po_cnt3` int(11) NOT NULL default '0',
`po_cnt4` int(11) NOT NULL default '0',
`po_cnt5` int(11) NOT NULL default '0',
`po_cnt6` int(11) NOT NULL default '0',
`po_cnt7` int(11) NOT NULL default '0',
`po_cnt8` int(11) NOT NULL default '0',
`po_cnt9` int(11) NOT NULL default '0',
`po_etc` varchar(255) NOT NULL default '',
`po_level` tinyint(4) NOT NULL default '0',
`po_point` int(11) NOT NULL default '0',
`po_date` date NOT NULL default '0000-00-00',
`po_ips` mediumtext NOT NULL,
`mb_ids` text NOT NULL,
PRIMARY KEY (`po_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `g5_poll_etc`
--
DROP TABLE IF EXISTS `g5_poll_etc`;
CREATE TABLE IF NOT EXISTS `g5_poll_etc` (
`pc_id` int(11) NOT NULL default '0',
`po_id` int(11) NOT NULL default '0',
`mb_id` varchar(255) NOT NULL default '',
`pc_name` varchar(255) NOT NULL default '',
`pc_idea` varchar(255) NOT NULL default '',
`pc_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`pc_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `g5_popular`
--
DROP TABLE IF EXISTS `g5_popular`;
CREATE TABLE IF NOT EXISTS `g5_popular` (
`pp_id` int(11) NOT NULL auto_increment,
`pp_word` varchar(50) NOT NULL default '',
`pp_date` date NOT NULL default '0000-00-00',
`pp_ip` varchar(50) NOT NULL default '',
PRIMARY KEY (`pp_id`),
UNIQUE KEY `index1` (`pp_date`,`pp_word`,`pp_ip`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `g5_scrap`
--
DROP TABLE IF EXISTS `g5_scrap`;
CREATE TABLE IF NOT EXISTS `g5_scrap` (
`ms_id` int(11) NOT NULL auto_increment,
`mb_id` varchar(255) NOT NULL default '',
`bo_table` varchar(20) NOT NULL default '',
`wr_id` varchar(15) NOT NULL default '',
`ms_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`ms_id`),
KEY `mb_id` (`mb_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `g5_visit`
--
DROP TABLE IF EXISTS `g5_visit`;
CREATE TABLE IF NOT EXISTS `g5_visit` (
`vi_id` int(11) NOT NULL default '0',
`vi_ip` varchar(255) NOT NULL default '',
`vi_date` date NOT NULL default '0000-00-00',
`vi_time` time NOT NULL default '00:00:00',
`vi_referer` text NOT NULL,
`vi_agent` varchar(255) NOT NULL default '',
PRIMARY KEY (`vi_id`),
UNIQUE KEY `index1` (`vi_ip`,`vi_date`),
KEY `index2` (`vi_date`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `g5_visit_sum`
--
DROP TABLE IF EXISTS `g5_visit_sum`;
CREATE TABLE IF NOT EXISTS `g5_visit_sum` (
`vs_date` date NOT NULL default '0000-00-00',
`vs_count` int(11) NOT NULL default '0',
PRIMARY KEY (`vs_date`),
KEY `index1` (`vs_count`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `g5_unique`
--
DROP TABLE IF EXISTS `g5_uniqid`;
CREATE TABLE IF NOT EXISTS `g5_uniqid` (
`uq_id` bigint(20) unsigned NOT NULL,
`uq_ip` varchar(255) NOT NULL,
PRIMARY KEY (`uq_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `g5_syndi_log`
--
DROP TABLE IF EXISTS `g5_syndi_log`;
CREATE TABLE IF NOT EXISTS `g5_syndi_log` (
`content_id` int(11) NOT NULL,
`bbs_id` varchar(50) NOT NULL,
`title` text NOT NULL,
`link_alternative` varchar(250) NOT NULL,
`delete_date` varchar(14) NOT NULL,
PRIMARY KEY (`content_id`,`bbs_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `g5_autosave`
--
DROP TABLE IF EXISTS `g5_autosave`;
CREATE TABLE IF NOT EXISTS `g5_autosave` (
`as_id` int(11) NOT NULL AUTO_INCREMENT,
`mb_id` varchar(20) NOT NULL,
`as_uid` bigint(20) unsigned NOT NULL,
`as_subject` varchar(255) NOT NULL,
`as_content` text NOT NULL,
`as_datetime` datetime NOT NULL,
PRIMARY KEY (`as_id`),
UNIQUE KEY `as_uid` (`as_uid`),
KEY `mb_id` (`mb_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------

View File

@ -1,11 +1,11 @@
-- --------------------------------------------------------
--
-- Table structure for table `shop_banner`
-- Table structure for table `g5_shop_banner`
--
DROP TABLE IF EXISTS `shop_banner`;
CREATE TABLE IF NOT EXISTS `shop_banner` (
DROP TABLE IF EXISTS `g5_shop_banner`;
CREATE TABLE IF NOT EXISTS `g5_shop_banner` (
`bn_id` int(11) NOT NULL AUTO_INCREMENT,
`bn_alt` varchar(255) NOT NULL DEFAULT '',
`bn_url` varchar(255) NOT NULL DEFAULT '',
@ -23,11 +23,11 @@ CREATE TABLE IF NOT EXISTS `shop_banner` (
-- --------------------------------------------------------
--
-- Table structure for table `shop_cart`
-- Table structure for table `g5_shop_cart`
--
DROP TABLE IF EXISTS `shop_cart`;
CREATE TABLE IF NOT EXISTS `shop_cart` (
DROP TABLE IF EXISTS `g5_shop_cart`;
CREATE TABLE IF NOT EXISTS `g5_shop_cart` (
`ct_id` int(11) NOT NULL AUTO_INCREMENT,
`od_id` bigint(20) unsigned NOT NULL,
`mb_id` varchar(255) NOT NULL DEFAULT '',
@ -58,11 +58,11 @@ CREATE TABLE IF NOT EXISTS `shop_cart` (
-- --------------------------------------------------------
--
-- Table structure for table `shop_category`
-- Table structure for table `g5_shop_category`
--
DROP TABLE IF EXISTS `shop_category`;
CREATE TABLE IF NOT EXISTS `shop_category` (
DROP TABLE IF EXISTS `g5_shop_category`;
CREATE TABLE IF NOT EXISTS `g5_shop_category` (
`ca_id` varchar(10) NOT NULL DEFAULT '0',
`ca_name` varchar(255) NOT NULL DEFAULT '',
`ca_skin` varchar(255) NOT NULL DEFAULT '',
@ -91,11 +91,11 @@ CREATE TABLE IF NOT EXISTS `shop_category` (
-- --------------------------------------------------------
--
-- Table structure for table `shop_content`
-- Table structure for table `g5_shop_content`
--
DROP TABLE IF EXISTS `shop_content`;
CREATE TABLE IF NOT EXISTS `shop_content` (
DROP TABLE IF EXISTS `g5_shop_content`;
CREATE TABLE IF NOT EXISTS `g5_shop_content` (
`co_id` varchar(20) NOT NULL DEFAULT '',
`co_html` tinyint(4) NOT NULL DEFAULT '0',
`co_subject` varchar(255) NOT NULL DEFAULT '',
@ -109,11 +109,11 @@ CREATE TABLE IF NOT EXISTS `shop_content` (
-- --------------------------------------------------------
--
-- Table structure for table `shop_coupon`
-- Table structure for table `g5_shop_coupon`
--
DROP TABLE IF EXISTS `shop_coupon`;
CREATE TABLE IF NOT EXISTS `shop_coupon` (
DROP TABLE IF EXISTS `g5_shop_coupon`;
CREATE TABLE IF NOT EXISTS `g5_shop_coupon` (
`cp_no` INT(11) NOT NULL AUTO_INCREMENT,
`cp_id` VARCHAR(255) NOT NULL DEFAULT '',
`cp_subject` VARCHAR(255) NOT NULL DEFAULT '',
@ -137,10 +137,10 @@ CREATE TABLE IF NOT EXISTS `shop_coupon` (
-- --------------------------------------------------------
--
-- Table structure for table `shop_coupon_log`
-- Table structure for table `g5_shop_coupon_log`
--
CREATE TABLE IF NOT EXISTS `shop_coupon_log` (
CREATE TABLE IF NOT EXISTS `g5_shop_coupon_log` (
`cl_id` int(11) NOT NULL AUTO_INCREMENT,
`cp_id` varchar(255) NOT NULL DEFAULT '',
`mb_id` varchar(255) NOT NULL DEFAULT '',
@ -155,11 +155,11 @@ CREATE TABLE IF NOT EXISTS `shop_coupon_log` (
-- --------------------------------------------------------
--
-- Table structure for table `shop_default`
-- Table structure for table `g5_shop_default`
--
DROP TABLE IF EXISTS `shop_default`;
CREATE TABLE IF NOT EXISTS `shop_default` (
DROP TABLE IF EXISTS `g5_shop_default`;
CREATE TABLE IF NOT EXISTS `g5_shop_default` (
`de_admin_company_owner` varchar(255) NOT NULL DEFAULT '',
`de_admin_company_name` varchar(255) NOT NULL DEFAULT '',
`de_admin_company_saupja_no` varchar(255) NOT NULL DEFAULT '',
@ -290,11 +290,11 @@ CREATE TABLE IF NOT EXISTS `shop_default` (
-- --------------------------------------------------------
--
-- Table structure for table `shop_delivery`
-- Table structure for table `g5_shop_delivery`
--
DROP TABLE IF EXISTS `shop_delivery`;
CREATE TABLE IF NOT EXISTS `shop_delivery` (
DROP TABLE IF EXISTS `g5_shop_delivery`;
CREATE TABLE IF NOT EXISTS `g5_shop_delivery` (
`dl_id` int(11) NOT NULL AUTO_INCREMENT,
`dl_company` varchar(255) NOT NULL DEFAULT '',
`dl_url` varchar(255) NOT NULL DEFAULT '',
@ -306,11 +306,11 @@ CREATE TABLE IF NOT EXISTS `shop_delivery` (
-- --------------------------------------------------------
--
-- Table structure for table `shop_event`
-- Table structure for table `g5_shop_event`
--
DROP TABLE IF EXISTS `shop_event`;
CREATE TABLE IF NOT EXISTS `shop_event` (
DROP TABLE IF EXISTS `g5_shop_event`;
CREATE TABLE IF NOT EXISTS `g5_shop_event` (
`ev_id` int(11) NOT NULL AUTO_INCREMENT,
`it_group` int(11) NOT NULL DEFAULT '0',
`ev_skin` varchar(255) NOT NULL DEFAULT '',
@ -329,11 +329,11 @@ CREATE TABLE IF NOT EXISTS `shop_event` (
-- --------------------------------------------------------
--
-- Table structure for table `shop_event_item`
-- Table structure for table `g5_shop_event_item`
--
DROP TABLE IF EXISTS `shop_event_item`;
CREATE TABLE IF NOT EXISTS `shop_event_item` (
DROP TABLE IF EXISTS `g5_shop_event_item`;
CREATE TABLE IF NOT EXISTS `g5_shop_event_item` (
`ev_id` int(11) NOT NULL DEFAULT '0',
`it_id` varchar(20) NOT NULL DEFAULT '',
PRIMARY KEY (`ev_id`,`it_id`),
@ -343,11 +343,11 @@ CREATE TABLE IF NOT EXISTS `shop_event_item` (
-- --------------------------------------------------------
--
-- Table structure for table `shop_faq`
-- Table structure for table `g5_shop_faq`
--
DROP TABLE IF EXISTS `shop_faq`;
CREATE TABLE IF NOT EXISTS `shop_faq` (
DROP TABLE IF EXISTS `g5_shop_faq`;
CREATE TABLE IF NOT EXISTS `g5_shop_faq` (
`fa_id` int(11) NOT NULL AUTO_INCREMENT,
`fm_id` int(11) NOT NULL DEFAULT '0',
`fa_subject` text NOT NULL,
@ -360,11 +360,11 @@ CREATE TABLE IF NOT EXISTS `shop_faq` (
-- --------------------------------------------------------
--
-- Table structure for table `shop_faq_master`
-- Table structure for table `g5_shop_faq_master`
--
DROP TABLE IF EXISTS `shop_faq_master`;
CREATE TABLE IF NOT EXISTS `shop_faq_master` (
DROP TABLE IF EXISTS `g5_shop_faq_master`;
CREATE TABLE IF NOT EXISTS `g5_shop_faq_master` (
`fm_id` int(11) NOT NULL AUTO_INCREMENT,
`fm_subject` varchar(255) NOT NULL DEFAULT '',
`fm_head_html` text NOT NULL,
@ -376,11 +376,11 @@ CREATE TABLE IF NOT EXISTS `shop_faq_master` (
-- --------------------------------------------------------
--
-- Table structure for table `shop_item`
-- Table structure for table `g5_shop_item`
--
DROP TABLE IF EXISTS `shop_item`;
CREATE TABLE IF NOT EXISTS `shop_item` (
DROP TABLE IF EXISTS `g5_shop_item`;
CREATE TABLE IF NOT EXISTS `g5_shop_item` (
`it_id` varchar(20) NOT NULL DEFAULT '',
`ca_id` varchar(10) NOT NULL DEFAULT '0',
`ca_id2` varchar(255) NOT NULL DEFAULT '',
@ -445,11 +445,11 @@ CREATE TABLE IF NOT EXISTS `shop_item` (
-- --------------------------------------------------------
--
-- Table structure for table `shop_item_option`
-- Table structure for table `g5_shop_item_option`
--
DROP TABLE IF EXISTS `shop_item_option`;
CREATE TABLE IF NOT EXISTS `shop_item_option` (
DROP TABLE IF EXISTS `g5_shop_item_option`;
CREATE TABLE IF NOT EXISTS `g5_shop_item_option` (
`io_no` INT(11) NOT NULL AUTO_INCREMENT,
`io_id` VARCHAR(255) NOT NULL DEFAULT '0',
`io_type` TINYINT(4) NOT NULL DEFAULT '0',
@ -466,11 +466,11 @@ CREATE TABLE IF NOT EXISTS `shop_item_option` (
-- --------------------------------------------------------
--
-- Table structure for table `shop_item_use`
-- Table structure for table `g5_shop_item_use`
--
DROP TABLE IF EXISTS `shop_item_use`;
CREATE TABLE IF NOT EXISTS `shop_item_use` (
DROP TABLE IF EXISTS `g5_shop_item_use`;
CREATE TABLE IF NOT EXISTS `g5_shop_item_use` (
`is_id` int(11) NOT NULL AUTO_INCREMENT,
`it_id` varchar(20) NOT NULL DEFAULT '0',
`mb_id` varchar(255) NOT NULL DEFAULT '',
@ -489,11 +489,11 @@ CREATE TABLE IF NOT EXISTS `shop_item_use` (
-- --------------------------------------------------------
--
-- Table structure for table `shop_item_qa`
-- Table structure for table `g5_shop_item_qa`
--
DROP TABLE IF EXISTS `shop_item_qa`;
CREATE TABLE IF NOT EXISTS `shop_item_qa` (
DROP TABLE IF EXISTS `g5_shop_item_qa`;
CREATE TABLE IF NOT EXISTS `g5_shop_item_qa` (
`iq_id` int(11) NOT NULL AUTO_INCREMENT,
`it_id` varchar(20) NOT NULL DEFAULT '',
`mb_id` varchar(255) NOT NULL DEFAULT '',
@ -510,11 +510,11 @@ CREATE TABLE IF NOT EXISTS `shop_item_qa` (
-- --------------------------------------------------------
--
-- Table structure for table `shop_item_relation`
-- Table structure for table `g5_shop_item_relation`
--
DROP TABLE IF EXISTS `shop_item_relation`;
CREATE TABLE IF NOT EXISTS `shop_item_relation` (
DROP TABLE IF EXISTS `g5_shop_item_relation`;
CREATE TABLE IF NOT EXISTS `g5_shop_item_relation` (
`it_id` varchar(20) NOT NULL DEFAULT '',
`it_id2` varchar(20) NOT NULL DEFAULT '',
`ir_no` int(11) NOT NULL DEFAULT '0',
@ -524,11 +524,11 @@ CREATE TABLE IF NOT EXISTS `shop_item_relation` (
-- --------------------------------------------------------
--
-- Table structure for table `shop_new_win`
-- Table structure for table `g5_shop_new_win`
--
DROP TABLE IF EXISTS `shop_new_win`;
CREATE TABLE IF NOT EXISTS `shop_new_win` (
DROP TABLE IF EXISTS `g5_shop_new_win`;
CREATE TABLE IF NOT EXISTS `g5_shop_new_win` (
`nw_id` int(11) NOT NULL AUTO_INCREMENT,
`nw_begin_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`nw_end_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
@ -546,11 +546,11 @@ CREATE TABLE IF NOT EXISTS `shop_new_win` (
-- --------------------------------------------------------
--
-- Table structure for table `shop_onlinecalc`
-- Table structure for table `g5_shop_onlinecalc`
--
DROP TABLE IF EXISTS `shop_onlinecalc`;
CREATE TABLE IF NOT EXISTS `shop_onlinecalc` (
DROP TABLE IF EXISTS `g5_shop_onlinecalc`;
CREATE TABLE IF NOT EXISTS `g5_shop_onlinecalc` (
`oc_id` int(11) NOT NULL AUTO_INCREMENT,
`oc_subject` varchar(255) NOT NULL DEFAULT '',
`oc_category` text NOT NULL,
@ -562,11 +562,11 @@ CREATE TABLE IF NOT EXISTS `shop_onlinecalc` (
-- --------------------------------------------------------
--
-- Table structure for table `shop_order`
-- Table structure for table `g5_shop_order`
--
DROP TABLE IF EXISTS `shop_order`;
CREATE TABLE IF NOT EXISTS `shop_order` (
DROP TABLE IF EXISTS `g5_shop_order`;
CREATE TABLE IF NOT EXISTS `g5_shop_order` (
`od_id` bigint(20) unsigned NOT NULL,
`mb_id` varchar(255) NOT NULL DEFAULT '',
`od_pwd` varchar(255) NOT NULL DEFAULT '',
@ -634,10 +634,10 @@ CREATE TABLE IF NOT EXISTS `shop_order` (
-- --------------------------------------------------------
--
-- Table structure for table `shop_order_address`
-- Table structure for table `g5_shop_order_address`
--
CREATE TABLE IF NOT EXISTS `shop_order_address` (
CREATE TABLE IF NOT EXISTS `g5_shop_order_address` (
`ad_id` int(11) NOT NULL AUTO_INCREMENT,
`mb_id` varchar(255) NOT NULL DEFAULT '',
`ad_subject` varchar(255) NOT NULL DEFAULT '',
@ -656,11 +656,11 @@ CREATE TABLE IF NOT EXISTS `shop_order_address` (
-- --------------------------------------------------------
--
-- Table structure for table `shop_personalpay`
-- Table structure for table `g5_shop_personalpay`
--
DROP TABLE IF EXISTS `shop_personalpay`;
CREATE TABLE IF NOT EXISTS `shop_personalpay` (
DROP TABLE IF EXISTS `g5_shop_personalpay`;
CREATE TABLE IF NOT EXISTS `g5_shop_personalpay` (
`pp_id` BIGINT(20) unsigned NOT NULL,
`od_id` BIGINT(20) unsigned NOT NULL,
`pp_name` VARCHAR(255) NOT NULL DEFAULT '',
@ -685,11 +685,11 @@ CREATE TABLE IF NOT EXISTS `shop_personalpay` (
-- --------------------------------------------------------
--
-- Table structure for table `shop_sendcost`
-- Table structure for table `g5_shop_sendcost`
--
DROP TABLE IF EXISTS `shop_sendcost`;
CREATE TABLE IF NOT EXISTS `shop_sendcost` (
DROP TABLE IF EXISTS `g5_shop_sendcost`;
CREATE TABLE IF NOT EXISTS `g5_shop_sendcost` (
`sc_id` INT(11) NOT NULL AUTO_INCREMENT,
`sc_name` VARCHAR(255) NOT NULL DEFAULT '',
`sc_zip1` VARCHAR(10) NOT NULL DEFAULT '',
@ -703,11 +703,11 @@ CREATE TABLE IF NOT EXISTS `shop_sendcost` (
-- --------------------------------------------------------
--
-- Table structure for table `shop_wish`
-- Table structure for table `g5_shop_wish`
--
DROP TABLE IF EXISTS `shop_wish`;
CREATE TABLE IF NOT EXISTS `shop_wish` (
DROP TABLE IF EXISTS `g5_shop_wish`;
CREATE TABLE IF NOT EXISTS `g5_shop_wish` (
`wi_id` int(11) NOT NULL AUTO_INCREMENT,
`mb_id` varchar(255) NOT NULL DEFAULT '',
`it_id` varchar(20) NOT NULL DEFAULT '0',

View File

@ -60,7 +60,7 @@ if (isset($_POST['agree']) && $_POST['agree'] != '동의함') {
<th scope="row"><label for="">쇼핑몰TABLE명 접두사</label></th>
<td>
<span>가능한 변경하지 마십시오.</span>
<input name="shop_prefix" type="text" value="shop_" id="shop_prefix">
<input name="g5_shop_prefix" type="text" value="g5_shop_" id="g5_shop_prefix">
</td>
</tr>
<tr>
@ -72,7 +72,7 @@ if (isset($_POST['agree']) && $_POST['agree'] != '동의함') {
<tr>
<th scope="row"><label for="">쇼핑몰설치</label></th>
<td>
<input name="shop_install" type="checkbox" value="1" id="shop_install">설치
<input name="g5_shop_install" type="checkbox" value="1" id="g5_shop_install">설치
</td>
</tr>
</tbody>

View File

@ -18,13 +18,13 @@ $mysql_user = $_POST['mysql_user'];
$mysql_pass = $_POST['mysql_pass'];
$mysql_db = $_POST['mysql_db'];
$table_prefix= $_POST['table_prefix'];
$g5_install = $_POST['g5_install'];
$shop_prefix = $_POST['shop_prefix'];
$shop_install= $_POST['shop_install'];
$admin_id = $_POST['admin_id'];
$admin_pass = $_POST['admin_pass'];
$admin_name = $_POST['admin_name'];
$admin_email = $_POST['admin_email'];
$g5_install = $_POST['g5_install'];
$g5_shop_prefix = $_POST['g5_shop_prefix'];
$g5_shop_install= $_POST['g5_shop_install'];
@mysql_query('set names utf8');
$dblink = @mysql_connect($mysql_host, $mysql_user, $mysql_pass);
@ -69,10 +69,10 @@ if($g5_install || !$result) {
// 쇼핑몰 테이블 생성 -----------------------------
if($shop_install) {
$file = implode('', file('./shop.sql'));
$file = implode('', file('./gnuboard5shop.sql'));
$file = preg_replace('/^--.*$/m', '', $file);
$file = preg_replace('/`shop_([^`]+`)/', '`'.$shop_prefix.'$1', $file);
$file = preg_replace('/`g5_shop_([^`]+`)/', '`'.$g5_shop_prefix.'$1', $file);
$f = explode(';', $file);
for ($i=0; $i<count($f); $i++) {
if (trim($f[$i]) == '') continue;
@ -179,18 +179,18 @@ if($shop_install) {
$mimg_height = 230;
// 내용관리 생성
@mysql_query(" insert into `{$shop_prefix}content` set co_id = 'company', co_html = '1', co_subject = '회사소개', co_content= '<p align=center><b>회사소개에 대한 내용을 입력하십시오.</b></p>' ") or die(mysql_error() . "<p>" . $sql);
@mysql_query(" insert into `{$shop_prefix}content` set co_id = 'privacy', co_html = '1', co_subject = '개인정보 취급방침', co_content= '<p align=center><b>개인정보 취급방침에 대한 내용을 입력하십시오.</b></p>' ") or die(mysql_error() . "<p>" . $sql);
@mysql_query(" insert into `{$shop_prefix}content` set co_id = 'provision', co_html = '1', co_subject = '서비스 이용약관', co_content= '<p align=center><b>서비스 이용약관에 대한 내용을 입력하십시오.</b></p>' ") or die(mysql_error() . "<p>" . $sql);
@mysql_query(" insert into `{$g5_shop_prefix}content` set co_id = 'company', co_html = '1', co_subject = '회사소개', co_content= '<p align=center><b>회사소개에 대한 내용을 입력하십시오.</b></p>' ") or die(mysql_error() . "<p>" . $sql);
@mysql_query(" insert into `{$g5_shop_prefix}content` set co_id = 'privacy', co_html = '1', co_subject = '개인정보 취급방침', co_content= '<p align=center><b>개인정보 취급방침에 대한 내용을 입력하십시오.</b></p>' ") or die(mysql_error() . "<p>" . $sql);
@mysql_query(" insert into `{$g5_shop_prefix}content` set co_id = 'provision', co_html = '1', co_subject = '서비스 이용약관', co_content= '<p align=center><b>서비스 이용약관에 대한 내용을 입력하십시오.</b></p>' ") or die(mysql_error() . "<p>" . $sql);
// 온라인견적
@mysql_query(" insert into `{$shop_prefix}onlinecalc` set oc_id = '1', oc_subject = '온라인견적' ") or die(mysql_error() . "<p>" . $sql);
@mysql_query(" insert into `{$g5_shop_prefix}onlinecalc` set oc_id = '1', oc_subject = '온라인견적' ") or die(mysql_error() . "<p>" . $sql);
// FAQ Master
@mysql_query(" insert into `{$shop_prefix}faq_master` set fm_id = '1', fm_subject = '자주하시는 질문' ") or die(mysql_error() . "<p>" . $sql);
@mysql_query(" insert into `{$g5_shop_prefix}faq_master` set fm_id = '1', fm_subject = '자주하시는 질문' ") or die(mysql_error() . "<p>" . $sql);
// default 설정 (쇼핑몰 설정)
$sql = " insert into `{$shop_prefix}default`
$sql = " insert into `{$g5_shop_prefix}default`
set de_admin_company_name = '회사명',
de_admin_company_saupja_no = '123-45-67890',
de_admin_company_owner = '대표자명',
@ -471,30 +471,30 @@ fwrite($f, "?>");
if($shop_install) {
fwrite($f, "\n\n<?php\n");
fwrite($f, "define('G5_USE_SHOP', true);\n\n");
fwrite($f, "define('SHOP_TABLE_PREFIX', '{$shop_prefix}');\n\n");
fwrite($f, "\$g5['shop_default_table'] = SHOP_TABLE_PREFIX.'default'; // 쇼핑몰설정 테이블\n");
fwrite($f, "\$g5['shop_banner_table'] = SHOP_TABLE_PREFIX.'banner'; // 배너 테이블\n");
fwrite($f, "\$g5['shop_cart_table'] = SHOP_TABLE_PREFIX.'cart'; // 장바구니 테이블\n");
fwrite($f, "\$g5['shop_category_table'] = SHOP_TABLE_PREFIX.'category'; // 상품분류 테이블\n");
fwrite($f, "\$g5['shop_content_table'] = SHOP_TABLE_PREFIX.'content'; // 내용(컨텐츠)정보 테이블\n");
fwrite($f, "\$g5['shop_delivery_table'] = SHOP_TABLE_PREFIX.'delivery'; // 배송정보 테이블\n");
fwrite($f, "\$g5['shop_event_table'] = SHOP_TABLE_PREFIX.'event'; // 이벤트 테이블\n");
fwrite($f, "\$g5['shop_event_item_table'] = SHOP_TABLE_PREFIX.'event_item'; // 상품, 이벤트 연결 테이블\n");
fwrite($f, "\$g5['shop_faq_table'] = SHOP_TABLE_PREFIX.'faq'; // 자주하시는 질문 테이블\n");
fwrite($f, "\$g5['shop_faq_master_table'] = SHOP_TABLE_PREFIX.'faq_master'; // 자주하시는 질문 마스터 테이블\n");
fwrite($f, "\$g5['shop_item_table'] = SHOP_TABLE_PREFIX.'item'; // 상품 테이블\n");
fwrite($f, "\$g5['shop_item_option_table'] = SHOP_TABLE_PREFIX.'item_option'; // 상품옵션 테이블\n");
fwrite($f, "\$g5['shop_item_use_table'] = SHOP_TABLE_PREFIX.'item_use'; // 상품 사용후기 테이블\n");
fwrite($f, "\$g5['shop_item_qa_table'] = SHOP_TABLE_PREFIX.'item_qa'; // 상품 질문답변 테이블\n");
fwrite($f, "\$g5['shop_item_relation_table'] = SHOP_TABLE_PREFIX.'item_relation'; // 관련 상품 테이블\n");
fwrite($f, "\$g5['shop_new_win_table'] = SHOP_TABLE_PREFIX.'new_win'; // 새창 테이블\n");
fwrite($f, "\$g5['shop_onlinecalc_table'] = SHOP_TABLE_PREFIX.'onlinecalc'; // 온라인견적 테이블\n");
fwrite($f, "\$g5['shop_order_table'] = SHOP_TABLE_PREFIX.'order'; // 주문서 테이블\n");
fwrite($f, "\$g5['shop_wish_table'] = SHOP_TABLE_PREFIX.'wish'; // 보관함(위시리스트) 테이블\n");
fwrite($f, "\$g5['shop_coupon_table'] = SHOP_TABLE_PREFIX.'coupon'; // 쿠폰정보 테이블\n");
fwrite($f, "\$g5['shop_sendcost_table'] = SHOP_TABLE_PREFIX.'sendcost'; // 추가배송비 테이블\n");
fwrite($f, "\$g5['shop_personalpay_table'] = SHOP_TABLE_PREFIX.'personalpay'; // 개인결제 정보 테이블\n");
fwrite($f, "\$g5['shop_order_address_table'] = SHOP_TABLE_PREFIX.'order_address'; // 배송지이력 정보 테이블\n");
fwrite($f, "define('G5_SHOP_TABLE_PREFIX', '{$g5_shop_prefix}');\n\n");
fwrite($f, "\$g5['g5_shop_default_table'] = G5_SHOP_TABLE_PREFIX.'default'; // 쇼핑몰설정 테이블\n");
fwrite($f, "\$g5['g5_shop_banner_table'] = G5_SHOP_TABLE_PREFIX.'banner'; // 배너 테이블\n");
fwrite($f, "\$g5['g5_shop_cart_table'] = G5_SHOP_TABLE_PREFIX.'cart'; // 장바구니 테이블\n");
fwrite($f, "\$g5['g5_shop_category_table'] = G5_SHOP_TABLE_PREFIX.'category'; // 상품분류 테이블\n");
fwrite($f, "\$g5['g5_shop_content_table'] = G5_SHOP_TABLE_PREFIX.'content'; // 내용(컨텐츠)정보 테이블\n");
fwrite($f, "\$g5['g5_shop_delivery_table'] = G5_SHOP_TABLE_PREFIX.'delivery'; // 배송정보 테이블\n");
fwrite($f, "\$g5['g5_shop_event_table'] = G5_SHOP_TABLE_PREFIX.'event'; // 이벤트 테이블\n");
fwrite($f, "\$g5['g5_shop_event_item_table'] = G5_SHOP_TABLE_PREFIX.'event_item'; // 상품, 이벤트 연결 테이블\n");
fwrite($f, "\$g5['g5_shop_faq_table'] = G5_SHOP_TABLE_PREFIX.'faq'; // 자주하시는 질문 테이블\n");
fwrite($f, "\$g5['g5_shop_faq_master_table'] = G5_SHOP_TABLE_PREFIX.'faq_master'; // 자주하시는 질문 마스터 테이블\n");
fwrite($f, "\$g5['g5_shop_item_table'] = G5_SHOP_TABLE_PREFIX.'item'; // 상품 테이블\n");
fwrite($f, "\$g5['g5_shop_item_option_table'] = G5_SHOP_TABLE_PREFIX.'item_option'; // 상품옵션 테이블\n");
fwrite($f, "\$g5['g5_shop_item_use_table'] = G5_SHOP_TABLE_PREFIX.'item_use'; // 상품 사용후기 테이블\n");
fwrite($f, "\$g5['g5_shop_item_qa_table'] = G5_SHOP_TABLE_PREFIX.'item_qa'; // 상품 질문답변 테이블\n");
fwrite($f, "\$g5['g5_shop_item_relation_table'] = G5_SHOP_TABLE_PREFIX.'item_relation'; // 관련 상품 테이블\n");
fwrite($f, "\$g5['g5_shop_new_win_table'] = G5_SHOP_TABLE_PREFIX.'new_win'; // 새창 테이블\n");
fwrite($f, "\$g5['g5_shop_onlinecalc_table'] = G5_SHOP_TABLE_PREFIX.'onlinecalc'; // 온라인견적 테이블\n");
fwrite($f, "\$g5['g5_shop_order_table'] = G5_SHOP_TABLE_PREFIX.'order'; // 주문서 테이블\n");
fwrite($f, "\$g5['g5_shop_wish_table'] = G5_SHOP_TABLE_PREFIX.'wish'; // 보관함(위시리스트) 테이블\n");
fwrite($f, "\$g5['g5_shop_coupon_table'] = G5_SHOP_TABLE_PREFIX.'coupon'; // 쿠폰정보 테이블\n");
fwrite($f, "\$g5['g5_shop_sendcost_table'] = G5_SHOP_TABLE_PREFIX.'sendcost'; // 추가배송비 테이블\n");
fwrite($f, "\$g5['g5_shop_personalpay_table'] = G5_SHOP_TABLE_PREFIX.'personalpay'; // 개인결제 정보 테이블\n");
fwrite($f, "\$g5['g5_shop_order_address_table'] = G5_SHOP_TABLE_PREFIX.'order_address'; // 배송지이력 정보 테이블\n");
fwrite($f, "?>");
}

View File

@ -2358,4 +2358,13 @@ function certify_count_check($mb_id, $type)
if((int)$row['cnt'] >= (int)$config['cf_cert_limit'])
alert_close('오늘 '.$cert.' 본인확인을 '.$row['cnt'].'회 이용하셔서 더 이상 이용할 수 없습니다.');
}
// die 함수를 utf-8 환경에서 사용할 때 한글깨짐방지
function die_utf8($msg)
{
if(!trim($msg))
return;
die('<meta charset="utf-8"><p>'.$msg.'</p>');
}
?>

View File

@ -290,11 +290,11 @@ class item_list
if ($this->event) {
$sql_select = " select {$this->fields} ";
$sql_common = " from `{$g5['shop_event_item_table']}` a left join `{$g5['shop_item_table']}` b on (a.it_id = b.it_id) ";
$sql_common = " from `{$g5['g5_shop_event_item_table']}` a left join `{$g5['g5_shop_item_table']}` b on (a.it_id = b.it_id) ";
$where[] = " a.ev_id = '{$this->event}' ";
} else {
$sql_select = " select {$this->fields} ";
$sql_common = " from `{$g5['shop_item_table']}` ";
$sql_common = " from `{$g5['g5_shop_item_table']}` ";
}
$sql_where = " where " . implode(" and ", $where);
$sql_limit = " limit " . $this->from_record . " , " . ($this->list_mod * $this->list_row);
@ -340,7 +340,7 @@ function get_cart_count($cart_id)
{
global $g5, $default;
$sql = " select count(ct_id) as cnt from {$g5['shop_cart_table']} where od_id = '$cart_id' ";
$sql = " select count(ct_id) as cnt from {$g5['g5_shop_cart_table']} where od_id = '$cart_id' ";
if($default['de_cart_keep_term']) {
$ctime = date('Y-m-d H:i:s', G5_SERVER_TIME - ($default['de_cart_keep_term'] * 86400));
$sql .= " and ct_time > '$ctime' ";
@ -397,7 +397,7 @@ function get_it_image($it_id, $width, $height=0, $anchor=false, $img_id='')
if(!$it_id || !$width)
return '';
$sql = " select it_id, it_img1, it_img2, it_img3, it_img4, it_img5, it_img6, it_img7, it_img8, it_img9, it_img10 from {$g5['shop_item_table']} where it_id = '$it_id' ";
$sql = " select it_id, it_img1, it_img2, it_img3, it_img4, it_img5, it_img6, it_img7, it_img8, it_img9, it_img10 from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$row = sql_fetch($sql);
if(!$row['it_id'])
@ -487,7 +487,7 @@ function get_it_imageurl($it_id)
global $g5;
$sql = " select it_img1, it_img2, it_img3, it_img4, it_img5, it_img6, it_img7, it_img8, it_img9, it_img10
from {$g5['shop_item_table']}
from {$g5['g5_shop_item_table']}
where it_id = '$it_id' ";
$row = sql_fetch($sql);
$filepath = '';
@ -518,13 +518,13 @@ function get_it_stock_qty($it_id)
{
global $g5;
$sql = " select it_stock_qty from {$g5['shop_item_table']} where it_id = '$it_id' ";
$sql = " select it_stock_qty from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$row = sql_fetch($sql);
$jaego = (int)$row['it_stock_qty'];
// 재고에서 빼지 않았고 주문인것만
$sql = " select SUM(ct_qty) as sum_qty
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where it_id = '$it_id'
and io_id = ''
and ct_stock_use = 0
@ -541,14 +541,14 @@ function get_option_stock_qty($it_id, $io_id, $type)
global $g5;
$sql = " select io_stock_qty
from {$g5['shop_item_option_table']}
from {$g5['g5_shop_item_option_table']}
where it_id = '$it_id' and io_id = '$io_id' and io_type = '$type' and io_use = '1' ";
$row = sql_fetch($sql);
$jaego = (int)$row['io_stock_qty'];
// 재고에서 빼지 않았고 주문인것만
$sql = " select SUM(ct_qty) as sum_qty
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where it_id = '$it_id'
and io_id = '$io_id'
and io_type = '$type'
@ -721,7 +721,7 @@ function display_type($type, $list_skin='', $list_mod='', $list_row='', $img_wid
// 1.02.00
// it_order 추가
$sql = " select * from {$g5['shop_item_table']} where it_use = '1' and it_type{$type} = '1' ";
$sql = " select * from {$g5['g5_shop_item_table']} where it_use = '1' and it_type{$type} = '1' ";
if ($ca_id) $sql .= " and ca_id like '$ca_id%' ";
$sql .= " order by it_order, it_id desc limit $items ";
$result = sql_query($sql);
@ -755,7 +755,7 @@ function mobile_display_type($type, $skin_file, $list_row, $img_width, $img_heig
// 1.02.00
// it_order 추가
$sql = " select * from {$g5['shop_item_table']} where it_use = '1' and it_type{$type} = '1' ";
$sql = " select * from {$g5['g5_shop_item_table']} where it_use = '1' and it_type{$type} = '1' ";
if ($ca_id) $sql .= " and ca_id like '$ca_id%' ";
$sql .= " order by it_order, it_id desc limit $items ";
$result = sql_query($sql);
@ -783,7 +783,7 @@ function display_category($no, $list_mod, $list_row, $img_width, $img_height, $c
// 상품의 갯수
$items = $list_mod * $list_row;
$sql = " select * from {$g5['shop_item_table']} where it_use = '1'";
$sql = " select * from {$g5['g5_shop_item_table']} where it_use = '1'";
if ($ca_id)
$sql .= " and ca_id LIKE '{$ca_id}%' ";
$sql .= " order by it_order, it_id desc limit $items ";
@ -819,7 +819,7 @@ function get_star_image($it_id)
{
global $g5;
$sql = "select (SUM(is_score) / COUNT(*)) as score from {$g5['shop_item_use_table']} where it_id = '$it_id' ";
$sql = "select (SUM(is_score) / COUNT(*)) as score from {$g5['g5_shop_item_use_table']} where it_id = '$it_id' ";
$row = sql_fetch($sql);
return (int)get_star($row['score']);
@ -911,7 +911,7 @@ function get_item_options($it_id, $subject)
if(!$it_id || !$subject)
return '';
$sql = " select * from {$g5['shop_item_option_table']} where io_type = '0' and it_id = '$it_id' and io_use = '1' order by io_no asc ";
$sql = " select * from {$g5['g5_shop_item_option_table']} where io_type = '0' and it_id = '$it_id' and io_use = '1' order by io_no asc ";
$result = sql_query($sql);
if(!mysql_num_rows($result))
return '';
@ -998,7 +998,7 @@ function get_item_supply($it_id, $subject)
if(!$it_id || !$subject)
return '';
$sql = " select * from {$g5['shop_item_option_table']} where io_type = '1' and it_id = '$it_id' and io_use = '1' order by io_no asc ";
$sql = " select * from {$g5['g5_shop_item_option_table']} where io_type = '1' and it_id = '$it_id' and io_use = '1' order by io_no asc ";
$result = sql_query($sql);
if(!mysql_num_rows($result))
return '';
@ -1063,7 +1063,7 @@ function print_item_options($it_id, $cart_id)
{
global $g5;
$sql = " select ct_option, ct_qty from {$g5['shop_cart_table']} where it_id = '$it_id' and od_id = '$cart_id' order by io_type asc, ct_id asc ";
$sql = " select ct_option, ct_qty from {$g5['g5_shop_cart_table']} where it_id = '$it_id' and od_id = '$cart_id' order by io_type asc, ct_id asc ";
$result = sql_query($sql);
$str = '';
@ -1113,7 +1113,7 @@ function display_event($no, $event, $list_mod, $list_row, $img_width, $img_heigh
// 1.02.00
// b.it_order 추가
$sql = " select b.* from {$g5['shop_event_item_table']} a, {$g5['shop_item_table']} b where a.it_id = b.it_id and b.it_use = '1' and a.ev_id = '$event' ";
$sql = " select b.* from {$g5['g5_shop_event_item_table']} a, {$g5['g5_shop_item_table']} b where a.it_id = b.it_id and b.it_use = '1' and a.ev_id = '$event' ";
if ($ca_id) $sql .= " and ca_id = '$ca_id' ";
$sql .= " order by b.it_order, a.it_id desc limit $items ";
$result = sql_query($sql);
@ -1145,7 +1145,7 @@ function get_goods($cart_id)
global $g5;
// 상품명만들기
$row = sql_fetch(" select a.it_id, b.it_name from {$g5['shop_cart_table']} a, {$g5['shop_item_table']} b where a.it_id = b.it_id and a.od_id = '$cart_id' order by ct_id limit 1 ");
$row = sql_fetch(" select a.it_id, b.it_name from {$g5['g5_shop_cart_table']} a, {$g5['g5_shop_item_table']} b where a.it_id = b.it_id and a.od_id = '$cart_id' order by ct_id limit 1 ");
// 상품명에 "(쌍따옴표)가 들어가면 오류 발생함
$goods['it_id'] = $row['it_id'];
$goods['full_name']= $goods['name'] = addslashes($row['it_name']);
@ -1153,7 +1153,7 @@ function get_goods($cart_id)
$goods['full_name'] = preg_replace ("/[ #\&\+\-%@=\/\\\:;,\.'\"\^`~\_|\!\?\*$#<>()\[\]\{\}]/i", "", $goods['full_name']);
// 상품건수
$row = sql_fetch(" select count(*) as cnt from {$g5['shop_cart_table']} where od_id = '$cart_id' ");
$row = sql_fetch(" select count(*) as cnt from {$g5['g5_shop_cart_table']} where od_id = '$cart_id' ");
$cnt = $row['cnt'] - 1;
if ($cnt)
$goods['full_name'] .= ' 외 '.$cnt.'건';
@ -1246,10 +1246,10 @@ function get_new_od_id()
global $g5;
// 주문서 테이블 Lock 걸고
sql_query(" LOCK TABLES {$g5['shop_order_table']} READ, {$g5['shop_order_table']} WRITE ", FALSE);
sql_query(" LOCK TABLES {$g5['g5_shop_order_table']} READ, {$g5['g5_shop_order_table']} WRITE ", FALSE);
// 주문서 번호를 만든다.
$date = date("ymd", time()); // 2002년 3월 7일 일경우 020307
$sql = " select max(od_id) as max_od_id from {$g5['shop_order_table']} where SUBSTRING(od_id, 1, 6) = '$date' ";
$sql = " select max(od_id) as max_od_id from {$g5['g5_shop_order_table']} where SUBSTRING(od_id, 1, 6) = '$date' ";
$row = sql_fetch($sql);
$od_id = $row['max_od_id'];
if ($od_id == 0)
@ -1299,7 +1299,7 @@ function set_cart_id($direct)
// 보관된 회원장바구니 자료 cart id 변경
if($member['mb_id'] && $tmp_cart_id) {
$sql = " update {$g5['shop_cart_table']}
$sql = " update {$g5['g5_shop_cart_table']}
set od_id = '$tmp_cart_id'
where mb_id = '{$member['mb_id']}'
and ct_direct = '0'
@ -1324,7 +1324,7 @@ function relation_item($it_id, $width, $height, $rows=3)
if(!$it_id)
return $str;
$sql = " select b.it_id, b.it_name, b.it_price, b.it_tel_inq from {$g5['shop_item_relation_table']} a left join {$g5['shop_item_table']} b on ( a.it_id2 = b.it_id ) where a.it_id = '$it_id' order by ir_no asc limit 0, $rows ";
$sql = " select b.it_id, b.it_name, b.it_price, b.it_tel_inq from {$g5['g5_shop_item_relation_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id2 = b.it_id ) where a.it_id = '$it_id' order by ir_no asc limit 0, $rows ";
$result = sql_query($sql);
for($i=0; $row=sql_fetch_array($result); $i++) {
@ -1497,7 +1497,7 @@ function get_sendcost($price, $cart_id, $selected=1)
} else { // 개별배송비
$send_cost = 0;
$sql = " select distinct it_id
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where od_id = '$cart_id'
and ct_send_cost = '0'
and ct_status IN ( '쇼핑', '주문', '준비', '배송', '완료' )
@ -1508,7 +1508,7 @@ function get_sendcost($price, $cart_id, $selected=1)
// 합계
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,
SUM(ct_qty) as qty
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where it_id = '{$sc['it_id']}'
and od_id = '$cart_id' ";
$sum = sql_fetch($sql);
@ -1529,7 +1529,7 @@ function get_item_sendcost($it_id, $price, $qty)
return 0;
$sql = " select it_id, it_sc_type, it_sc_method, it_sc_price, it_sc_minimum, it_sc_qty
from {$g5['shop_item_table']}
from {$g5['g5_shop_item_table']}
where it_id = '$it_id' ";
$it = sql_fetch($sql);
if(!$it['it_id'])
@ -1567,7 +1567,7 @@ function get_order_misu($od_id)
$sql = " select od_id,
( od_cart_price + od_send_cost + od_send_cost2 - od_cart_coupon - od_coupon - od_send_coupon - od_receipt_price - od_receipt_point ) as misu
from {$g5['shop_order_table']}
from {$g5['g5_shop_order_table']}
where od_id = '$od_id' ";
$od = sql_fetch($sql);
@ -1584,7 +1584,7 @@ function is_used_coupon($mb_id, $cp_id)
$used = false;
$sql = " select count(*) as cnt from {$g5['shop_coupon_log_table']} where mb_id = '$mb_id' and cp_id = '$cp_id' ";
$sql = " select count(*) as cnt from {$g5['g5_shop_coupon_log_table']} where mb_id = '$mb_id' and cp_id = '$cp_id' ";
$row = sql_fetch($sql);
if($row['cnt'])

View File

@ -37,7 +37,7 @@ include_once(G5_MSHOP_PATH.'/_head.php');
a.ct_status,
a.ct_send_cost,
b.ca_id
from {$g5['shop_cart_table']} a left join {$g5['shop_item_table']} b on ( a.it_id = b.it_id )
from {$g5['g5_shop_cart_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id )
where a.od_id = '$s_cart_id' ";
if($default['de_cart_keep_term']) {
$ctime = date('Y-m-d H:i:s', G5_SERVER_TIME - ($default['de_cart_keep_term'] * 86400));
@ -55,7 +55,7 @@ include_once(G5_MSHOP_PATH.'/_head.php');
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,
SUM(ct_point * ct_qty) as point,
SUM(ct_qty) as qty
from {$g5['shop_cart_table']}
from {$g5['g5_shop_cart_table']}
where it_id = '{$row['it_id']}'
and od_id = '$s_cart_id' ";
$sum = sql_fetch($sql);

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