shop 테이블명 g5_shop 으로 변경
This commit is contained in:
@ -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']);
|
||||
|
||||
@ -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']);
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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&ca_id='.$row['ca_id'].'&'.$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"'; ?>>
|
||||
|
||||
@ -16,7 +16,7 @@ for ($i=0; $i<count($_POST['ca_id']); $i++)
|
||||
alert("\'{$_POST['ca_mb_id'][$i]}\' 은(는) 존재하는 회원아이디가 아닙니다.", "./categorylist.php?page=$page&sort1=$sort1&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]}',
|
||||
|
||||
@ -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'];
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -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('등록된 자료가 없습니다.');
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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('등록된 자료가 없습니다.');
|
||||
}
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -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'];
|
||||
?>
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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%' ";
|
||||
|
||||
@ -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('등록된 자료가 없습니다.');
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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'];
|
||||
}
|
||||
|
||||
|
||||
@ -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 = ''
|
||||
|
||||
@ -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("등록된 자료가 없습니다.");
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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("수정", "");
|
||||
|
||||
@ -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('등록된 자료가 없습니다.');
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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'];
|
||||
?>
|
||||
|
||||
@ -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 ";
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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'].');">';
|
||||
|
||||
@ -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 ";
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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");
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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&sca=$sca&page=$page";
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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]}',
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -11,9 +11,9 @@ else
|
||||
|
||||
$qstr = "page=$page&sort1=$sort1&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&iq_id=$iq_id&$qstr");
|
||||
}
|
||||
}
|
||||
else {
|
||||
alert();
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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 ('주문', '준비') ";
|
||||
|
||||
@ -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]}' ";
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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]}',
|
||||
|
||||
@ -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'])
|
||||
|
||||
@ -13,7 +13,7 @@ $qstr = "page=$page&sort1=$sort1&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'
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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("등록된 자료가 없습니다.");
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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]}'
|
||||
|
||||
@ -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&$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
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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++) {
|
||||
?>
|
||||
|
||||
@ -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' ";
|
||||
|
||||
@ -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'];
|
||||
}
|
||||
|
||||
@ -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 ";
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
@ -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' ";
|
||||
|
||||
@ -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'];
|
||||
|
||||
@ -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 ";
|
||||
|
||||
// 테이블의 전체 레코드수만 얻음
|
||||
|
||||
@ -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'])
|
||||
|
||||
@ -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']}',
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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 ";
|
||||
|
||||
@ -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' ) ";
|
||||
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user