테이블 변수명에서 yc4_를 shop_로 변경

This commit is contained in:
chicpro
2013-04-09 15:34:05 +09:00
parent 512c8feaf8
commit 4d95a696cd
149 changed files with 722 additions and 740 deletions

View File

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

View File

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

View File

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

View File

@ -7,7 +7,7 @@ auth_check($auth[$sub_menu], "w");
$category_path = G4_DATA_PATH."/category";
$sql_common = " from {$g4['yc4_category_table']} ";
$sql_common = " from {$g4['shop_category_table']} ";
if ($is_admin != 'super')
$sql_common .= " where ca_mb_id = '{$member['mb_id']}' ";
@ -22,7 +22,7 @@ if ($w == "")
$len2 = $len + 1;
$sql = " select MAX(SUBSTRING(ca_id,$len2,2)) as max_subid from {$g4['yc4_category_table']}
$sql = " select MAX(SUBSTRING(ca_id,$len2,2)) as max_subid from {$g4['shop_category_table']}
where SUBSTRING(ca_id,1,$len) = '$ca_id' ";
$row = sql_fetch($sql);
@ -42,7 +42,7 @@ if ($w == "")
if ($ca_id) // 2단계이상 분류
{
$sql = " select * from {$g4['yc4_category_table']} where ca_id = '$ca_id' ";
$sql = " select * from {$g4['shop_category_table']} where ca_id = '$ca_id' ";
$ca = sql_fetch($sql);
$html_title = $ca['ca_name'] . " 하위분류추가";
$ca['ca_name'] = "";
@ -62,7 +62,7 @@ if ($w == "")
}
else if ($w == "u")
{
$sql = " select * from {$g4['yc4_category_table']} where ca_id = '$ca_id' ";
$sql = " select * from {$g4['shop_category_table']} where ca_id = '$ca_id' ";
$ca = sql_fetch($sql);
if (!$ca['ca_id'])
alert("자료가 없습니다.");
@ -103,7 +103,7 @@ $pg_anchor ="<ul class=\"anchor\">
<col class="grid_3">
<col class="grid_6">
</colgroup>
<tbody>
<tbody>
<tr>
<th scope="row"><label for="ca_id">분류코드</label></th>
<td colspan="3">

View File

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

View File

@ -18,7 +18,7 @@ if ($stx != "") {
$page = 1;
}
$sql_common = " from {$g4['yc4_category_table']} ";
$sql_common = " from {$g4['shop_category_table']} ";
if ($is_admin != 'super')
$sql_common .= " $where ca_mb_id = '{$member['mb_id']}' ";
$sql_common .= $sql_search;
@ -111,7 +111,7 @@ $qstr = $qstr."&amp;sca=".$sca."&amp;page=".$page."&amp;save_stx=".$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 {$g4['yc4_category_table']} where ca_id = '$p_ca_id' ";
$sql = " select ca_name from {$g4['shop_category_table']} where ca_id = '$p_ca_id' ";
$temp = sql_fetch($sql);
$p_ca_name = $temp['ca_name'].'의하위';
} else
@ -129,7 +129,7 @@ $qstr = $qstr."&amp;sca=".$sca."&amp;page=".$page."&amp;save_stx=".$stx;
$s_del = '<a href="javascript:del(\'./categoryformupdate.php?w=d&amp;ca_id='.$row['ca_id'].'&amp;'.$qstr.'\');">삭제</a>';
// 해당 분류에 속한 상품의 갯수
$sql1 = " select COUNT(*) as cnt from {$g4['yc4_item_table']}
$sql1 = " select COUNT(*) as cnt from {$g4['shop_item_table']}
where ca_id = '{$row['ca_id']}'
or ca_id2 = '{$row['ca_id']}'
or ca_id3 = '{$row['ca_id']}' ";

View File

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

View File

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

View File

@ -5,41 +5,6 @@ include_once(G4_CKEDITOR_PATH.'/ckeditor.lib.php');
auth_check($auth[$sub_menu], "r");
//------------------------------------------------------------------------------
// 설정테이블에 필드 추가
//------------------------------------------------------------------------------
sql_query(" ALTER TABLE `{$g4['yc4_default_table']}` ADD `de_hp_use` TINYINT NOT NULL DEFAULT '0' ", false);
sql_query(" ALTER TABLE `{$g4['yc4_default_table']}` ADD `de_escrow_use` TINYINT NOT NULL DEFAULT '0' ", false);
// 쏜다넷 smskey 필드 추가 : 101201
@mysql_query(" ALTER TABLE `{$g4['yc4_default_table']}` ADD `de_xonda_smskey` VARCHAR( 255 ) NOT NULL ");
// 비회원에 대한 개인정보 수집에 대한 내용
@mysql_query(" ALTER TABLE `{$g4['yc4_default_table']}` ADD `de_guest_privacy` TEXT NOT NULL ");
// 현금영수증 발급
@mysql_query(" ALTER TABLE `{$g4['yc4_default_table']}` ADD `de_taxsave_use` TINYINT NOT NULL ");
@mysql_query(" ALTER TABLE `{$g4['yc4_default_table']}` ADD `de_kcp_site_key` VARCHAR( 255 ) NOT NULL ");
@mysql_query(" ALTER TABLE `{$g4['yc4_default_table']}` ADD `de_dacom_mertkey` VARCHAR( 255 ) NOT NULL ");
@mysql_query(" ALTER TABLE `{$g4['yc4_default_table']}` ADD `de_vbank_use` VARCHAR( 255 ) NOT NULL ");
@mysql_query(" ALTER TABLE `{$g4['yc4_order_table']}` ADD `od_settle_case` VARCHAR( 255 ) NOT NULL ");
@mysql_query(" ALTER TABLE `{$g4['yc4_order_table']}` ADD `od_escrow1` VARCHAR( 255 ) NOT NULL ");
@mysql_query(" ALTER TABLE `{$g4['yc4_order_table']}` ADD `od_escrow2` VARCHAR( 255 ) NOT NULL ");
@mysql_query(" ALTER TABLE `{$g4['yc4_order_table']}` ADD `od_escrow3` VARCHAR( 255 ) NOT NULL ");
// SMS 아이코드 추가 (icodekorea.com)
$sql = " ALTER TABLE `{$g4['yc4_default_table']}` ADD `de_sms_use` VARCHAR( 255 ) NOT NULL ,
ADD `de_icode_id` VARCHAR( 255 ) NOT NULL ,
ADD `de_icode_pw` VARCHAR( 255 ) NOT NULL ,
ADD `de_icode_server_ip` VARCHAR( 255 ) NOT NULL ,
ADD `de_icode_server_port` VARCHAR( 255 ) NOT NULL ";
sql_query($sql, false);
//------------------------------------------------------------------------------
if (!function_exists("get_sock")) {
function get_sock($url)
{
@ -477,84 +442,6 @@ $pg_anchor ="<ul class=\"anchor\">
<?=G4_SHOP_URL?>/settle_kcp_common.php
</td>
</tr>
<tr style="display:none;">
<th scope="row"><label for="de_dacom_mid">LG텔레콤 상점아이디</label></th>
<td>
<input type="text" name="de_dacom_mid" value="<?=$default['de_dacom_mid']?>" id="de_dacom_mid" size="40">
<?=help("tsi_ 로 시작되는 상점아이디로만 테스트 결제가 가능합니다.");?>
</td>
<th scope="row"><label for="de_dacom_mertkey">LG텔레콤 mertkey</label></th>
<td>
<input type="text" name="de_dacom_mertkey" value="<?=$default['de_dacom_mertkey']?>" id="de_dacom_mertkey" size="40">
</td>
<!-- <td>LG텔레콤 테스트 모드</td>
<td>
<input type="checkbox" name="de_dacom_test" value="1" <?=$default[de_dacom_test]?"checked":"";?>>
테스트로 결제하실 경우에 체크하세요.
</td> -->
</tr>
<tr style="display:none;">
<th scope="row"><label for="de_inicis_mid">이니시스 아이디</label></th>
<td>
<input type="text" name="de_inicis_mid" value="<?=$default['de_inicis_mid']?>" id="de_inicis_mid" size="40">
</td>
<th scope="row"><label for="de_inicis_passwd">이니시스 패스워드</label></th>
<td>
<input type="text" name="de_inicis_passwd" value="<?=$default['de_inicis_passwd']?>" id="de_inicis_passwd">
</td>
</tr>
<tr style="display:none">
<th scope="row"><label for="de_banktown_mid">뱅크타운 상점ID</label></th>
<td>
<input type="text" name="de_banktown_mid" value="<?=$default['de_banktown_mid']?>" id="de_banktown_mid" size="40">
</td>
<th scope="row"><label for="de_banktown_auth_key">뱅크타운 라이센스 키<!-- AuthKey --></label></th>
<td>
<input type="text" name="de_banktown_auth_key" value="<?=$default['de_banktown_auth_key']?>" id="de_banktown_auth_key" size="40" maxlength="32">
</td>
</tr>
<tr style="display:none">
<th scope="row"><label for="de_allthegate_mid">올더게이트 몰ID</label></th>
<td colspan="3">
<input type="text" name="de_allthegate_mid" value="<?=$default['de_allthegate_mid']?>" id="de_allthegate_mid" size="40">
</td>
</tr>
<tr style="display:none">
<th scope="row"><label for="de_allat_partner_id">올앳 파트너 ID</label></th>
<td>
<input type="text" name="de_allat_partner_id" value="<?=$default['de_allat_partner_id']?>" id="de_allat_partner_id" size="40">
</td>
<th scope="row"><label for="de_allat_prefix">주문번호 Prefix</label></th>
<td>
<input type="text" name="de_allat_prefix" value="<?=$default['de_allat_prefix']?>" id="de_allat_prefix"> 3자리
</td>
</tr>
<tr style="display:none">
<th scope="row"><label for="de_allat_formkey">올앳 FormKey 값</label></th>
<td>
<input type="text" name="de_allat_formkey" value="<?=$default['de_allat_formkey']?>" id="de_allat_formkey" size="40">
</td>
<th scope="row"><label for="de_allat_crosskey">올앳 CrossKey 값</label></th>
<td>
<input type="text" name="de_allat_crosskey" value="<?=$default['de_allat_crosskey']?>" id="de_allat_crosskey" size="40">
</td>
</tr>
<tr style="display:none">
<th scope="row"><label for="de_tgcorp_mxid">티지코프 ID</label></th>
<td>
<input type="text" name="de_tgcorp_mxid" value="<?=$default['de_tgcorp_mxid']?>" id="de_tgcorp_mxid" size="40">
</td>
<th scope="row"><label for="de_tgcorp_mxotp">티지코프 접근키</label></th>
<td>
<input type="text" name="de_tgcorp_mxotp" value="<?=$default['de_tgcorp_mxotp']?>" id="de_tgcorp_mxotp" size="40">
</td>
</tr>
<tr style="display:none">
<th scope="row"><label for="de_kspay_id">KSPAY 상점아이디</label></th>
<td colspan="3">
<input type="text" name="de_kspay_id" value="<?=$default['de_kspay_id']?>" id="de_kspay_id" size="40">
</td>
</tr>
</tbody>
</table>
</section>

View File

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

View File

@ -6,7 +6,7 @@ include_once(G4_CKEDITOR_PATH.'/ckeditor.lib.php');
auth_check($auth[$sub_menu], "w");
// 상단, 하단 파일경로 필드 추가
$sql = " ALTER TABLE `{$g4['yc4_content_table']}` ADD `co_include_head` VARCHAR( 255 ) NOT NULL ,
$sql = " ALTER TABLE `{$g4['shop_content_table']}` ADD `co_include_head` VARCHAR( 255 ) NOT NULL ,
ADD `co_include_tail` VARCHAR( 255 ) NOT NULL ";
sql_query($sql, false);
@ -17,7 +17,7 @@ if ($w == "u")
$html_title .= " 수정";
$readonly = " readonly";
$sql = " select * from {$g4['yc4_content_table']} where co_id = '$co_id' ";
$sql = " select * from {$g4['shop_content_table']} where co_id = '$co_id' ";
$co = sql_fetch($sql);
if (!$co['co_id'])
alert('등록된 자료가 없습니다.');
@ -75,7 +75,7 @@ include_once (G4_ADMIN_PATH.'/admin.head.php');
<th scope="row"><label for="co_include_tail">하단 파일 경로</label></th>
<td>
<?=help("내용별로 하단+우측의 내용이 다를 경우 하단+우측 디자인 파일의 경로를 입력합니다.\n입력이 없으면 기본 하단 파일을 사용합니다.\n하단 내용과 달리 PHP 코드를 사용할 수 있습니다.\n");?>
<input type="text" name="co_include_tail" value="<?=$co['co_include_tail']?>" id="co_include_tail" class="frm_input" size="60">
<input type="text" name="co_include_tail" value="<?=$co['co_include_tail']?>" id="co_include_tail" class="frm_input" size="60">
</td>
</tr>
<tr>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -10,17 +10,17 @@ if ($is_admin != "super")
if (!trim($it_id))
alert("복사할 상품코드가 없습니다.");
$row = sql_fetch(" select count(*) as cnt from {$g4['yc4_item_table']} where it_id = '$new_it_id' ");
$row = sql_fetch(" select count(*) as cnt from {$g4['shop_item_table']} where it_id = '$new_it_id' ");
if ($row['cnt'])
alert('이미 존재하는 상품코드 입니다.');
$sql = " select * from {$g4['yc4_item_table']} where it_id = '$it_id' limit 1 ";
$sql = " select * from {$g4['shop_item_table']} where it_id = '$it_id' limit 1 ";
$cp = sql_fetch($sql);
// 상품테이블의 필드가 추가되어도 수정하지 않도록 필드명을 추출하여 insert 퀴리를 생성한다. (상품코드만 새로운것으로 대체)
$sql_common = "";
$fields = mysql_list_fields(G4_MYSQL_DB, $g4['yc4_item_table']);
$fields = mysql_list_fields(G4_MYSQL_DB, $g4['shop_item_table']);
$columns = mysql_num_fields($fields);
for ($i = 0; $i < $columns; $i++) {
$fld = mysql_field_name($fields, $i);
@ -29,7 +29,7 @@ for ($i = 0; $i < $columns; $i++) {
}
}
$sql = " insert {$g4['yc4_item_table']}
$sql = " insert {$g4['shop_item_table']}
set it_id = '$new_it_id'
$sql_common ";
sql_query($sql);
@ -52,10 +52,10 @@ if(is_file($img_path.$mimg))
copy($img_path.$mimg,$img_path.$new_it_id."_m");
// 상품요약정보 복사
$sql = " select * from {$g4['yc4_item_info_table']} where it_id = '$it_id' order by ii_id ";
$sql = " select * from {$g4['shop_item_info_table']} where it_id = '$it_id' order by ii_id ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
$sql = " INSERT INTO `{$g4['yc4_item_info_table']}` (`ii_id`, `it_id`, `ii_gubun`, `ii_article`, `ii_title`, `ii_value`)
$sql = " INSERT INTO `{$g4['shop_item_info_table']}` (`ii_id`, `it_id`, `ii_gubun`, `ii_article`, `ii_title`, `ii_value`)
VALUES (NULL, '$new_it_id', '{$row['ii_gubun']}', '{$row['ii_article']}', '".addslashes($row['ii_title'])."', '".addslashes($row['ii_value'])."') ";
sql_query($sql);
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -6,23 +6,23 @@ include_once(G4_LIB_PATH.'/iteminfo.lib.php');
/*
// 상품테이블에 분류 필드 추가
sql_query(" ALTER TABLE `$g4[yc4_item_table]` ADD `ca_id2` VARCHAR( 255 ) NOT NULL AFTER `ca_id` ", FALSE);
sql_query(" ALTER TABLE `$g4[yc4_item_table]` ADD `ca_id3` VARCHAR( 255 ) NOT NULL AFTER `ca_id2` ", FALSE);
sql_query(" ALTER TABLE `$g4[shop_item_table]` ADD `ca_id2` VARCHAR( 255 ) NOT NULL AFTER `ca_id` ", FALSE);
sql_query(" ALTER TABLE `$g4[shop_item_table]` ADD `ca_id3` VARCHAR( 255 ) NOT NULL AFTER `ca_id2` ", FALSE);
// 사용후기 테이블에 이름, 패스워드 필드 추가
sql_query(" ALTER TABLE `$g4[yc4_item_ps_table]` ADD `is_name` VARCHAR( 255 ) NOT NULL AFTER `mb_id` ", FALSE);
sql_query(" ALTER TABLE `$g4[yc4_item_ps_table]` ADD `is_password` VARCHAR( 255 ) NOT NULL AFTER `is_name` ", FALSE);
sql_query(" ALTER TABLE `$g4[shop_item_ps_table]` ADD `is_name` VARCHAR( 255 ) NOT NULL AFTER `mb_id` ", FALSE);
sql_query(" ALTER TABLE `$g4[shop_item_ps_table]` ADD `is_password` VARCHAR( 255 ) NOT NULL AFTER `is_name` ", FALSE);
// 상품문의 테이블에 이름, 패스워드 필드 추가
sql_query(" ALTER TABLE `$g4[yc4_item_qa_table]` ADD `iq_name` VARCHAR( 255 ) NOT NULL AFTER `mb_id` ", FALSE);
sql_query(" ALTER TABLE `$g4[yc4_item_qa_table]` ADD `iq_password` VARCHAR( 255 ) NOT NULL AFTER `iq_name` ", FALSE);
sql_query(" ALTER TABLE `$g4[shop_item_qa_table]` ADD `iq_name` VARCHAR( 255 ) NOT NULL AFTER `mb_id` ", FALSE);
sql_query(" ALTER TABLE `$g4[shop_item_qa_table]` ADD `iq_password` VARCHAR( 255 ) NOT NULL AFTER `iq_name` ", FALSE);
// 회원권한별 상품가격 틀리게 적용하는 필드 추가
// it_amount : 비회원가격
// it_amount2 : 회원가격
// it_amount3 : 특별회원가격
sql_query(" ALTER TABLE `$g4[yc4_item_table]` ADD `it_amount2` INT NOT NULL AFTER `it_amount` ", FALSE);
sql_query(" ALTER TABLE `$g4[yc4_item_table]` ADD `it_amount3` INT NOT NULL AFTER `it_amount2` ", FALSE);
sql_query(" ALTER TABLE `$g4[shop_item_table]` ADD `it_amount2` INT NOT NULL AFTER `it_amount` ", FALSE);
sql_query(" ALTER TABLE `$g4[shop_item_table]` ADD `it_amount3` INT NOT NULL AFTER `it_amount2` ", FALSE);
*/
auth_check($auth[$sub_menu], "w");
@ -40,7 +40,7 @@ if ($w == "")
$it['ca_id3'] = get_cookie("ck_ca_id3");
if (!$it['ca_id'])
{
$sql = " select ca_id from {$g4['yc4_category_table']} order by ca_id limit 1 ";
$sql = " select ca_id from {$g4['shop_category_table']} order by ca_id limit 1 ";
$row = sql_fetch($sql);
if (!$row['ca_id'])
alert("등록된 분류가 없습니다. 우선 분류를 등록하여 주십시오.");
@ -57,7 +57,7 @@ else if ($w == "u")
if ($is_admin != 'super')
{
$sql = " select it_id from {$g4['yc4_item_table']} a, {$g4['yc4_category_table']} b
$sql = " select it_id from {$g4['shop_item_table']} a, {$g4['shop_category_table']} b
where a.it_id = '$it_id'
and a.ca_id = b.ca_id
and b.ca_mb_id = '{$member['mb_id']}' ";
@ -66,13 +66,13 @@ else if ($w == "u")
alert("\'{$member['mb_id']}\' 님께서 수정 할 권한이 없는 상품입니다.");
}
$sql = " select * from {$g4['yc4_item_table']} where it_id = '$it_id' ";
$sql = " select * from {$g4['shop_item_table']} where it_id = '$it_id' ";
$it = sql_fetch($sql);
if (!$ca_id)
$ca_id = $it['ca_id'];
$sql = " select * from {$g4['yc4_category_table']} where ca_id = '$ca_id' ";
$sql = " select * from {$g4['shop_category_table']} where ca_id = '$ca_id' ";
$ca = sql_fetch($sql);
}
else
@ -135,7 +135,7 @@ $pg_anchor ="<ul class=\"anchor\">
<option value="">= 기본분류 =</option>
<?
$script = "";
$sql = " select * from {$g4['yc4_category_table']} ";
$sql = " select * from {$g4['shop_category_table']} ";
if ($is_admin != 'super')
$sql .= " where ca_mb_id = '{$member['mb_id']}' ";
$sql .= " order by ca_id ";
@ -325,7 +325,7 @@ $pg_anchor ="<ul class=\"anchor\">
</tr>
<? if ($it['it_id']) { ?>
<?
$sql = " select distinct ii_gubun from {$g4['yc4_item_info_table']} where it_id = '$it_id' group by ii_gubun ";
$sql = " select distinct ii_gubun from {$g4['shop_item_info_table']} where it_id = '$it_id' group by ii_gubun ";
$ii = sql_fetch($sql, false);
if ($ii) {
$item_info_gubun = item_info_gubun($ii['ii_gubun']);
@ -490,14 +490,14 @@ $pg_anchor ="<ul class=\"anchor\">
<?
$str = array();
$sql = " select b.ca_id, b.it_id, b.it_name, b.it_amount
from {$g4['yc4_item_relation_table']} a
left join {$g4['yc4_item_table']} b on (a.it_id2=b.it_id)
from {$g4['shop_item_relation_table']} a
left join {$g4['shop_item_table']} b on (a.it_id2=b.it_id)
where a.it_id = '$it_id'
order by b.ca_id, b.it_name ";
$result = sql_query($sql);
while($row=sql_fetch_array($result))
{
$sql2 = " select ca_name from {$g4['yc4_category_table']} where ca_id = '{$row['ca_id']}' ";
$sql2 = " select ca_name from {$g4['shop_category_table']} where ca_id = '{$row['ca_id']}' ";
$row2 = sql_fetch($sql2);
// 김선용 2006.10
@ -537,7 +537,7 @@ $pg_anchor ="<ul class=\"anchor\">
<option value=''>분류별 관련상품</option>
<option value=''>----------------------</option>
<?
$sql = " select ca_id, ca_name from {$g4['yc4_category_table']} where length(ca_id) = 2 order by ca_id ";
$sql = " select ca_id, ca_name from {$g4['shop_category_table']} where length(ca_id) = 2 order by ca_id ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
echo "<option value='{$row['ca_id']}'>{$row['ca_name']}\n";
@ -548,13 +548,13 @@ $pg_anchor ="<ul class=\"anchor\">
<?
/*
$sql = " select ca_id, it_id, it_name, it_amount
from $g4[yc4_item_table]
from $g4[shop_item_table]
where it_id <> '$it_id'
order by ca_id, it_name ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$sql2 = " select ca_name from $g4[yc4_category_table] where ca_id = '$row[ca_id]' ";
$sql2 = " select ca_name from $g4[shop_category_table] where ca_id = '$row[ca_id]' ";
$row2 = sql_fetch($sql2);
// 김선용 2006.10
@ -667,8 +667,8 @@ $pg_anchor ="<ul class=\"anchor\">
$str = "";
$comma = "";
$sql = " select b.ev_id, b.ev_subject
from {$g4['yc4_event_item_table']} a
left join {$g4['yc4_event_table']} b on (a.ev_id=b.ev_id)
from {$g4['shop_event_item_table']} a
left join {$g4['shop_event_table']} b on (a.ev_id=b.ev_id)
where a.it_id = '$it_id'
order by b.ev_id desc ";
$result = sql_query($sql);
@ -686,7 +686,7 @@ $pg_anchor ="<ul class=\"anchor\">
이벤트 선택후 <FONT COLOR="#0E87F9">더블클릭하면 왼쪽에 추가됨</FONT><br>
<select size=6 style='width:250px; background-color:#F6F6F6;' ondblclick="event_add(this);">
<?
$sql = " select ev_id, ev_subject from {$g4['yc4_event_table']} order by ev_id desc ";
$sql = " select ev_id, ev_subject from {$g4['shop_event_table']} order by ev_id desc ";
$result = sql_query($sql);
while ($row=sql_fetch_array($result)) {
echo "<option value='{$row['ev_id']}'>".get_text($row['ev_subject']);

View File

@ -3,20 +3,20 @@ $sub_menu = '400300';
include_once('./_common.php');
$sql = " select ca_id, it_id, it_name, it_amount
from {$g4['yc4_item_table']}
from {$g4['shop_item_table']}
where ca_id like '$ca_id%'
and it_id <> '$it_id'
order by ca_id, it_name ";
$result = sql_query($sql);
for($i=0;$row=sql_fetch_array($result);$i++) {
//$sql2 = " select count(*) as cnt from $g4[yc4_item_relation_table] where it_id = '$row[it_id]' ";
$sql2 = " select count(*) as cnt from {$g4['yc4_item_relation_table']} where it_id = '$it_id' and it_id2 = '{$row['it_id']}' ";
//$sql2 = " select count(*) as cnt from $g4[shop_item_relation_table] where it_id = '$row[it_id]' ";
$sql2 = " select count(*) as cnt from {$g4['shop_item_relation_table']} where it_id = '$it_id' and it_id2 = '{$row['it_id']}' ";
$row2 = sql_fetch($sql2);
if ($row2['cnt'])
continue;
$sql2 = " select ca_name from {$g4['yc4_category_table']} where ca_id = '{$row['ca_id']}' ";
$sql2 = " select ca_name from {$g4['shop_category_table']} where ca_id = '{$row['ca_id']}' ";
$row2 = sql_fetch($sql2);
$ca_name = addslashes($row2['ca_name']);

View File

@ -18,8 +18,8 @@ function itemdelete($it_id)
$str = $comma = $od_id = "";
$sql = " select b.od_id
from {$g4['yc4_cart_table']} a,
{$g4['yc4_order_table']} b
from {$g4['shop_cart_table']} a,
{$g4['shop_order_table']} b
where a.uq_id = b.uq_id
and a.it_id = '$it_id'
and a.ct_status != '쇼핑' ";
@ -55,34 +55,34 @@ function itemdelete($it_id)
@unlink(G4_DATA_PATH."/item/$it_id"."_t");
// 장바구니 삭제
$sql = " delete from {$g4['yc4_cart_table']} where it_id = '$it_id' ";
$sql = " delete from {$g4['shop_cart_table']} where it_id = '$it_id' ";
sql_query($sql);
// 이벤트삭제
$sql = " delete from {$g4['yc4_event_item_table']} where it_id = '$it_id' ";
$sql = " delete from {$g4['shop_event_item_table']} where it_id = '$it_id' ";
sql_query($sql);
// 사용후기삭제
$sql = " delete from {$g4['yc4_item_ps_table']} where it_id = '$it_id' ";
$sql = " delete from {$g4['shop_item_ps_table']} where it_id = '$it_id' ";
sql_query($sql);
// 상품문의삭제
$sql = " delete from {$g4['yc4_item_qa_table']} where it_id = '$it_id' ";
$sql = " delete from {$g4['shop_item_qa_table']} where it_id = '$it_id' ";
sql_query($sql);
// 관련상품삭제
$sql = " delete from {$g4['yc4_item_relation_table']} where it_id = '$it_id' or it_id2 = '$it_id' ";
$sql = " delete from {$g4['shop_item_relation_table']} where it_id = '$it_id' or it_id2 = '$it_id' ";
sql_query($sql);
// 상품요약정보삭제
$sql = " delete from {$g4['yc4_item_info_table']} where it_id = '$it_id' ";
$sql = " delete from {$g4['shop_item_info_table']} where it_id = '$it_id' ";
sql_query($sql);
//------------------------------------------------------------------------
// HTML 내용에서 에디터에 올라간 이미지의 경로를 얻어 삭제함
//------------------------------------------------------------------------
$sql = " select it_explan from {$g4['yc4_item_table']} where it_id = '$it_id' ";
$sql = " select it_explan from {$g4['shop_item_table']} where it_id = '$it_id' ";
$it = sql_fetch($sql);
$imgs = get_editor_image($it['it_explan']);
@ -103,7 +103,7 @@ function itemdelete($it_id)
// 상품 삭제
$sql = " delete from {$g4['yc4_item_table']} where it_id = '$it_id' ";
$sql = " delete from {$g4['shop_item_table']} where it_id = '$it_id' ";
sql_query($sql);
}
@ -226,13 +226,13 @@ if ($w == "" || $w == "u")
// 관련상품을 우선 삭제함
sql_query(" delete from {$g4['yc4_item_relation_table']} where it_id = '$it_id' ");
sql_query(" delete from {$g4['shop_item_relation_table']} where it_id = '$it_id' ");
// 관련상품의 반대도 삭제
sql_query(" delete from {$g4['yc4_item_relation_table']} where it_id2 = '$it_id' ");
sql_query(" delete from {$g4['shop_item_relation_table']} where it_id2 = '$it_id' ");
// 이벤트상품을 우선 삭제함
sql_query(" delete from {$g4['yc4_event_item_table']} where it_id = '$it_id' ");
sql_query(" delete from {$g4['shop_event_item_table']} where it_id = '$it_id' ");
$sql_common = " ca_id = '$ca_id',
@ -284,14 +284,14 @@ if ($w == "")
alert("상품 코드가 없으므로 상품을 추가하실 수 없습니다.");
}
$sql = " insert {$g4['yc4_item_table']}
$sql = " insert {$g4['shop_item_table']}
set it_id = '$it_id',
$sql_common ";
sql_query($sql);
}
else if ($w == "u")
{
$sql = " update {$g4['yc4_item_table']}
$sql = " update {$g4['shop_item_table']}
set $sql_common
where it_id = '$it_id' ";
sql_query($sql);
@ -300,7 +300,7 @@ else if ($w == "d")
{
if ($is_admin != 'super')
{
$sql = " select it_id from {$g4['yc4_item_table']} a, {$g4['yc4_category_table']} b
$sql = " select it_id from {$g4['shop_item_table']} a, {$g4['shop_category_table']} b
where a.it_id = '$it_id'
and a.ca_id = b.ca_id
and b.ca_mb_id = '{$member['mb_id']}' ";
@ -320,13 +320,13 @@ if ($w == "" || $w == "u")
{
if (trim($it_id2[$i]))
{
$sql = " insert into {$g4['yc4_item_relation_table']}
$sql = " insert into {$g4['shop_item_relation_table']}
set it_id = '$it_id',
it_id2 = '$it_id2[$i]' ";
sql_query($sql, false);
// 관련상품의 반대로도 등록
$sql = " insert into {$g4['yc4_item_relation_table']}
$sql = " insert into {$g4['shop_item_relation_table']}
set it_id = '$it_id2[$i]',
it_id2 = '$it_id' ";
sql_query($sql, false);
@ -339,7 +339,7 @@ if ($w == "" || $w == "u")
{
if (trim($ev_id[$i]))
{
$sql = " insert into {$g4['yc4_event_item_table']}
$sql = " insert into {$g4['shop_event_item_table']}
set ev_id = '$ev_id[$i]',
it_id = '$it_id' ";
sql_query($sql, false);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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 {$g4['yc4_cart_table']} a, {$g4['yc4_item_table']} b ";
from {$g4['shop_cart_table']} a, {$g4['shop_item_table']} b ";
$sql .= " where a.it_id = b.it_id ";
if ($fr_date && $to_date)
{
@ -66,7 +66,7 @@ $qstr1 = "$qstr&sort1=$sort1&sort2=$sort2&fr_date=$fr_date&to_date=$to_date&sel_
<select name="sel_ca_id">
<option value=''>전체분류
<?
$sql1 = " select ca_id, ca_name from {$g4['yc4_category_table']} order by ca_id ";
$sql1 = " select ca_id, ca_name from {$g4['shop_category_table']} order by ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=mysql_fetch_array($result1); $i++) {
$len = strlen($row1['ca_id']) / 2 - 1;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -24,7 +24,7 @@ include_once(G4_ADMIN_PATH.'/admin.head.php');
if (!isset($cart_not_delete)) {
if (!$hours) $hours = 6;
$beforehours = date("Y-m-d H:i:s", ( G4_SERVER_TIME - (60 * 60 * $hours) ) );
$sql = " delete from {$g4['yc4_cart_table']} where ct_status = '$cart_title1' and ct_time <= '$beforehours' ";
$sql = " delete from {$g4['shop_cart_table']} where ct_status = '$cart_title1' and ct_time <= '$beforehours' ";
sql_query($sql);
}
//------------------------------------------------------------------------------
@ -37,7 +37,7 @@ if (!isset($cart_not_delete)) {
//------------------------------------------------------------------------------
if (!isset($order_not_point)) {
$beforedays = date("Y-m-d H:i:s", ( time() - (60 * 60 * 24 * (int)$default['de_point_days']) ) );
$sql = " select * from {$g4['yc4_cart_table']}
$sql = " select * from {$g4['shop_cart_table']}
where ct_status = '$cart_title2'
and ct_point_use = '0'
and ct_time <= '$beforedays' ";
@ -45,7 +45,7 @@ if (!isset($order_not_point)) {
for ($i=0; $row=sql_fetch_array($result); $i++)
{
// 회원 ID 를 얻는다.
$tmp_row = sql_fetch("select od_id, mb_id from {$g4['yc4_order_table']} where uq_id = '{$row['uq_id']}' ");
$tmp_row = sql_fetch("select od_id, mb_id from {$g4['shop_order_table']} where uq_id = '{$row['uq_id']}' ");
// 회원이면서 포인트가 0보다 크다면
if ($tmp_row['mb_id'] && $row['ct_point'] > 0)
@ -55,7 +55,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['uq_id']},{$row['ct_id']}");
}
sql_query("update {$g4['yc4_cart_table']} set ct_point_use = '1' where ct_id = '{$row['ct_id']}' ");
sql_query("update {$g4['shop_cart_table']} set ct_point_use = '1' where ct_id = '{$row['ct_id']}' ");
}
}
//------------------------------------------------------------------------------
@ -64,7 +64,7 @@ if (!isset($order_not_point)) {
//------------------------------------------------------------------------------
// 주문서 정보
//------------------------------------------------------------------------------
$sql = " select * from {$g4['yc4_order_table']} where od_id = '$od_id' ";
$sql = " select * from {$g4['shop_order_table']} where od_id = '$od_id' ";
$od = sql_fetch($sql);
if (!$od['od_id']) {
alert($alt_msg1);
@ -83,7 +83,7 @@ if ($default['de_card_test']) {
// 로그인 아이디 / 비번
// 일반 : test1234 / test12345
// 에스크로 : escrow / escrow913
$g4['yc4_cardpg']['kcp'] = "http://testadmin8.kcp.co.kr";
$g4['shop_cardpg']['kcp'] = "http://testadmin8.kcp.co.kr";
}
$sql = " select a.ct_id,
@ -102,7 +102,7 @@ $sql = " select a.ct_id,
a.it_opt5,
a.it_opt6,
b.it_name
from {$g4['yc4_cart_table']} a, {$g4['yc4_item_table']} b
from {$g4['shop_cart_table']} a, {$g4['shop_item_table']} b
where a.uq_id = '{$od['uq_id']}'
and a.it_id = b.it_id
order by a.ct_id ";
@ -388,7 +388,7 @@ if ($od['od_receipt_point'] > 0)
<tr><td colspan=2 height=1 bgcolor=#84C718></td></tr>
<?
$sql = " select dl_company, dl_url, dl_tel from {$g4['yc4_delivery_table']} where dl_id = '{$od['dl_id']}' ";
$sql = " select dl_company, dl_url, dl_tel from {$g4['shop_delivery_table']} where dl_id = '{$od['dl_id']}' ";
$dl = sql_fetch($sql);
?>
<tr class=ht>
@ -444,7 +444,7 @@ if ($od['od_receipt_point'] > 0)
<? if ($od['od_settle_case'] == '무통장' || $od['od_settle_case'] == '가상계좌' || $od['od_settle_case'] == '계좌이체') { ?>
<?
// 주문서
$sql = " select * from {$g4['yc4_order_table']} where od_id = '$od_id' ";
$sql = " select * from {$g4['shop_order_table']} where od_id = '$od_id' ";
$result = sql_query($sql);
$od = sql_fetch_array($result);
@ -486,7 +486,7 @@ if ($od['od_receipt_point'] > 0)
<?
if ($od['od_settle_case'] == '계좌이체' || $od['od_settle_case'] == '가상계좌')
{
$pg_url = $g4['yc4_cardpg'][$default['de_card_pg']];
$pg_url = $g4['shop_cardpg'][$default['de_card_pg']];
echo "&nbsp;<a href='$pg_url' target=_new>결제대행사</a>";
}
?>
@ -524,7 +524,7 @@ if ($od['od_receipt_point'] > 0)
<td>
<input type=text class=ed name=od_receipt_hp size=10 value='<? echo $od['od_receipt_hp'] ?>'>원
<?
$pg_url = $g4['yc4_cardpg'][$default['de_card_pg']];
$pg_url = $g4['shop_cardpg'][$default['de_card_pg']];
echo "&nbsp;<a href='$pg_url' target=_new>결제대행사</a>";
?>
</td>
@ -549,7 +549,7 @@ if ($od['od_receipt_point'] > 0)
value='<? echo $od['od_receipt_card'] ?>'>원
&nbsp;
<?
$card_url = $g4['yc4_cardpg'][$default['de_card_pg']];
$card_url = $g4['shop_cardpg'][$default['de_card_pg']];
?>
<a href='<? echo $card_url ?>' target=_new>결제대행사</a>
</td>
@ -599,7 +599,7 @@ if ($od['od_receipt_point'] > 0)
<select name=dl_id>
<option value=''>배송시 선택하세요.
<?
$sql = "select * from {$g4['yc4_delivery_table']} order by dl_order desc, dl_id desc ";
$sql = "select * from {$g4['shop_delivery_table']} order by dl_order desc, dl_id desc ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
echo "<option value='{$row['dl_id']}'>{$row['dl_company']}\n";

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -24,8 +24,8 @@ if (G4_HTTPS_DOMAIN) {
}
// 미수금에 대한 QUERY 문
// 테이블 a 는 주문서 ($g4[yc4_order_table])
// 테이블 b 는 장바구니 ($g4[yc4_cart_table])
// 테이블 a 는 주문서 ($g4[shop_order_table])
// 테이블 b 는 장바구니 ($g4[shop_cart_table])
define(_MISU_QUERY_, "
count(distinct a.od_id) as ordercount, /* 주문서건수 */
count(b.ct_id) as itemcount, /* 상품건수 */
@ -49,42 +49,29 @@ define(_MISU_QUERY_, "
//------------------------------------------------------------------------------
// 쇼핑몰 변수 모음 시작
//------------------------------------------------------------------------------
define('YC4_TABLE_PREFIX', 'yc4_');
define('SHOP_TABLE_PREFIX', 'yc4_');
// 쇼핑몰 테이블명
$g4['yc4_default_table'] = YC4_TABLE_PREFIX.'default'; // 쇼핑몰설정 테이블
$g4['yc4_banner_table'] = YC4_TABLE_PREFIX.'banner'; // 배너 테이블
$g4['yc4_card_history_table'] = YC4_TABLE_PREFIX.'card_history'; // 전자결제이력 테이블
$g4['yc4_cart_table'] = YC4_TABLE_PREFIX.'cart'; // 장바구니 테이블
$g4['yc4_category_table'] = YC4_TABLE_PREFIX.'category'; // 상품분류 테이블
$g4['yc4_content_table'] = YC4_TABLE_PREFIX.'content'; // 내용(컨텐츠)정보 테이블
$g4['yc4_delivery_table'] = YC4_TABLE_PREFIX.'delivery'; // 배송정보 테이블
$g4['yc4_event_table'] = YC4_TABLE_PREFIX.'event'; // 이벤트 테이블
$g4['yc4_event_item_table'] = YC4_TABLE_PREFIX.'event_item'; // 상품, 이벤트 연결 테이블
$g4['yc4_faq_table'] = YC4_TABLE_PREFIX.'faq'; // 자주하시는 질문 테이블
$g4['yc4_faq_master_table'] = YC4_TABLE_PREFIX.'faq_master'; // 자주하시는 질문 마스터 테이블
$g4['yc4_item_table'] = YC4_TABLE_PREFIX.'item'; // 상품 테이블
$g4['yc4_item_ps_table'] = YC4_TABLE_PREFIX.'item_ps'; // 상품 사용후기 테이블
$g4['yc4_item_qa_table'] = YC4_TABLE_PREFIX.'item_qa'; // 상품 질문답변 테이블
$g4['yc4_item_relation_table'] = YC4_TABLE_PREFIX.'item_relation'; // 관련 상품 테이블
$g4['yc4_new_win_table'] = YC4_TABLE_PREFIX.'new_win'; // 새창 테이블
$g4['yc4_onlinecalc_table'] = YC4_TABLE_PREFIX.'onlinecalc'; // 온라인견적 테이블
$g4['yc4_order_table'] = YC4_TABLE_PREFIX.'order'; // 주문서 테이블
$g4['yc4_wish_table'] = YC4_TABLE_PREFIX.'wish'; // 보관함(위시리스트) 테이블
$g4['yc4_item_info_table'] = YC4_TABLE_PREFIX.'item_info'; // 상품요약정보 테이블 (상품정보고시)
// 신용카드결제대행사 URL
$g4[yc4_cardpg][kcp] = "http://admin.kcp.co.kr";
$g4[yc4_cardpg][banktown] = "http://ebiz.banktown.com/index.cs";
$g4[yc4_cardpg][telec] = "http://www.ebizpro.co.kr";
$g4[yc4_cardpg][inicis] = "https://iniweb.inicis.com/DefaultWebApp/index.html";
$g4[yc4_cardpg][allthegate] = "http://www.allthegate.com/login/r_login.jsp";
$g4[yc4_cardpg][allat] = "http://www.allatbiz.net/servlet/AllatBizSrvX/bizcon/jspx/login/login.jsp?next=/servlet/AllatBizSrvX/bizable/jspx/login/login.jsp";
$g4[yc4_cardpg][tgcorp] = "https://npg.tgcorp.com/mdbop/login.jsp";
$g4[yc4_cardpg][kspay] = "http://nims.ksnet.co.kr:7001/pg_infoc/src/login.jsp"; // ksnet
$g4[yc4_cardpg][dacom] = "https://pgweb.dacom.net";
$g4[yc4_cardpg][dacom_xpay] = "https://pgweb.dacom.net";
$g4['shop_default_table'] = SHOP_TABLE_PREFIX.'default'; // 쇼핑몰설정 테이블
$g4['shop_banner_table'] = SHOP_TABLE_PREFIX.'banner'; // 배너 테이블
$g4['shop_card_history_table'] = SHOP_TABLE_PREFIX.'card_history'; // 전자결제이력 테이블
$g4['shop_cart_table'] = SHOP_TABLE_PREFIX.'cart'; // 장바구니 테이블
$g4['shop_category_table'] = SHOP_TABLE_PREFIX.'category'; // 상품분류 테이블
$g4['shop_content_table'] = SHOP_TABLE_PREFIX.'content'; // 내용(컨텐츠)정보 테이블
$g4['shop_delivery_table'] = SHOP_TABLE_PREFIX.'delivery'; // 배송정보 테이블
$g4['shop_event_table'] = SHOP_TABLE_PREFIX.'event'; // 이벤트 테이블
$g4['shop_event_item_table'] = SHOP_TABLE_PREFIX.'event_item'; // 상품, 이벤트 연결 테이블
$g4['shop_faq_table'] = SHOP_TABLE_PREFIX.'faq'; // 자주하시는 질문 테이블
$g4['shop_faq_master_table'] = SHOP_TABLE_PREFIX.'faq_master'; // 자주하시는 질문 마스터 테이블
$g4['shop_item_table'] = SHOP_TABLE_PREFIX.'item'; // 상품 테이블
$g4['shop_item_ps_table'] = SHOP_TABLE_PREFIX.'item_ps'; // 상품 사용후기 테이블
$g4['shop_item_qa_table'] = SHOP_TABLE_PREFIX.'item_qa'; // 상품 질문답변 테이블
$g4['shop_item_relation_table'] = SHOP_TABLE_PREFIX.'item_relation'; // 관련 상품 테이블
$g4['shop_new_win_table'] = SHOP_TABLE_PREFIX.'new_win'; // 새창 테이블
$g4['shop_onlinecalc_table'] = SHOP_TABLE_PREFIX.'onlinecalc'; // 온라인견적 테이블
$g4['shop_order_table'] = SHOP_TABLE_PREFIX.'order'; // 주문서 테이블
$g4['shop_wish_table'] = SHOP_TABLE_PREFIX.'wish'; // 보관함(위시리스트) 테이블
$g4['shop_item_info_table'] = SHOP_TABLE_PREFIX.'item_info'; // 상품요약정보 테이블 (상품정보고시)
//------------------------------------------------------------------------------
// 쇼핑몰 변수 모음 끝
//------------------------------------------------------------------------------
@ -94,7 +81,7 @@ $g4[yc4_cardpg][dacom_xpay] = "https://pgweb.dacom.net";
// 쇼핑몰 필수 실행코드 모음 시작
//==============================================================================
// 쇼핑몰 설정값 배열변수
$default = sql_fetch(" select * from {$g4['yc4_default_table']} ");
$default = sql_fetch(" select * from {$g4['shop_default_table']} ");
// uniqid 테이블이 없을 경우 생성
if(!sql_query(" select uq_id from {$g4['uniqid_table']} limit 1 ", false)) {
@ -105,17 +92,17 @@ if(!sql_query(" select uq_id from {$g4['uniqid_table']} limit 1 ", false)) {
}
// uq_id 필드추가
$sql = " select uq_id from {$g4['yc4_cart_table']} limit 1 ";
$sql = " select uq_id from {$g4['shop_cart_table']} limit 1 ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" ALTER TABLE `{$g4['yc4_cart_table']}` ADD `uq_id` BIGINT(20) unsigned NOT NULL AFTER `ct_id` ", false);
sql_query(" ALTER TABLE `{$g4['yc4_order_table']}` ADD `uq_id` BIGINT(20) unsigned NOT NULL AFTER `od_id` ", false);
sql_query(" ALTER TABLE `{$g4['yc4_card_history_table']}` ADD `uq_id` BIGINT(20) unsigned NOT NULL AFTER `od_id` ", false);
sql_query(" ALTER TABLE `{$g4['yc4_order_table']}` MODIFY COLUMN od_id BIGINT(20) unsigned NOT NULL ", false);
sql_query(" ALTER TABLE `{$g4['yc4_card_history_table']}` MODIFY COLUMN od_id BIGINT(20) unsigned NOT NULL ", false);
sql_query(" ALTER TABLE `{$g4['yc4_cart_table']}` ADD INDEX uq_id (uq_id) ", false);
sql_query(" ALTER TABLE `{$g4['yc4_order_table']}` ADD UNIQUE uq_id (uq_id) ", false);
sql_query(" ALTER TABLE `{$g4['yc4_order_table']}` DROP INDEX index1", false);
sql_query(" ALTER TABLE `{$g4['shop_cart_table']}` ADD `uq_id` BIGINT(20) unsigned NOT NULL AFTER `ct_id` ", false);
sql_query(" ALTER TABLE `{$g4['shop_order_table']}` ADD `uq_id` BIGINT(20) unsigned NOT NULL AFTER `od_id` ", false);
sql_query(" ALTER TABLE `{$g4['shop_card_history_table']}` ADD `uq_id` BIGINT(20) unsigned NOT NULL AFTER `od_id` ", false);
sql_query(" ALTER TABLE `{$g4['shop_order_table']}` MODIFY COLUMN od_id BIGINT(20) unsigned NOT NULL ", false);
sql_query(" ALTER TABLE `{$g4['shop_card_history_table']}` MODIFY COLUMN od_id BIGINT(20) unsigned NOT NULL ", false);
sql_query(" ALTER TABLE `{$g4['shop_cart_table']}` ADD INDEX uq_id (uq_id) ", false);
sql_query(" ALTER TABLE `{$g4['shop_order_table']}` ADD UNIQUE uq_id (uq_id) ", false);
sql_query(" ALTER TABLE `{$g4['shop_order_table']}` DROP INDEX index1", false);
}
//==============================================================================

View File

@ -48,7 +48,6 @@ if (!$select_db) {
<?
// 테이블 생성 ------------------------------------
$file = implode('', file('./gnuboard4s.sql'));
eval("\$file = \"$file\";");
$file = preg_replace('/^--.*$/m', '', $file);
$file = preg_replace('/`g4s_([^`]+`)/', '`'.$table_prefix.'$1', $file);
@ -57,6 +56,17 @@ for ($i=0; $i<count($f); $i++) {
if (trim($f[$i]) == '') continue;
mysql_query($f[$i]) or die(mysql_error());
}
// 쇼핑몰 테이블 생성 -----------------------------
$file = implode('', file('./shop.sql'));
$file = preg_replace('/^--.*$/m', '', $file);
$file = preg_replace('/`shop_([^`]+`)/', '`'.$shop_prefix.'$1', $file);
$f = explode(';', $file);
for ($i=0; $i<count($f); $i++) {
if (trim($f[$i]) == '') continue;
mysql_query($f[$i]) or die(mysql_error());
}
// 테이블 생성 ------------------------------------
?>
@ -71,7 +81,7 @@ $download_point = -20;
//-------------------------------------------------------------------------------------------------
// config 테이블 설정
$sql = " insert into `{$table_prefix}config`
set cf_title = '그누보드4s',
set cf_title = '쇼핑몰',
cf_admin = '$admin_id',
cf_use_point = '1',
cf_use_norobot = '1',
@ -144,6 +154,96 @@ $sql = " insert into `{$table_prefix}member`
mb_ip = '{$_SERVER['REMOTE_ADDR']}'
";
@mysql_query($sql);
// 내용관리 생성
@mysql_query(" insert into `{$shop_prefix}content` set co_id = 'company', co_html = '1', co_subject = '회사소개', co_content= '<p align=center><b>회사소개에 대한 내용을 입력하십시오.</b>' ") or die(mysql_error() . "<p>" . $sql);
@mysql_query(" insert into `{$shop_prefix}content` set co_id = 'privacy', co_html = '1', co_subject = '개인정보 취급방침', co_content= '<p align=center><b>개인정보 취급방침에 대한 내용을 입력하십시오.' ") or die(mysql_error() . "<p>" . $sql);
@mysql_query(" insert into `{$shop_prefix}content` set co_id = 'provision', co_html = '1', co_subject = '서비스 이용약관', co_content= '<p align=center><b>서비스 이용약관에 대한 내용을 입력하십시오.' ") or die(mysql_error() . "<p>" . $sql);
// 온라인견적
@mysql_query(" insert into `{$shop_prefix}onlinecalc` set oc_id = '1', oc_subject = '온라인견적' ") or die(mysql_error() . "<p>" . $sql);
// FAQ Master
@mysql_query(" insert into `{$shop_prefix}faq_master` set fm_id = '1', fm_subject = '자주하시는 질문' ") or die(mysql_error() . "<p>" . $sql);
// default 설정 (쇼핑몰 설정)
$sql = " insert into `{$shop_prefix}default`
set de_admin_company_name = '회사명',
de_admin_company_saupja_no = '123-45-67890',
de_admin_company_owner = '대표자명',
de_admin_company_tel = '02-123-4567',
de_admin_company_fax = '02-123-4568',
de_admin_tongsin_no = '제 OO구 - 123호',
de_admin_buga_no = '12345호',
de_admin_company_zip = '123-456',
de_admin_company_addr = 'OO도 OO시 OO구 OO동 123-45',
de_admin_info_name = '정보책임자명',
de_admin_info_email = '정보책임자 E-mail',
de_type1_list_use = '1',
de_type1_list_skin = 'maintype10.inc.php',
de_type1_list_mod = '3',
de_type1_list_row = '2',
de_type1_img_width = '$simg_width',
de_type1_img_height = '$simg_height',
de_type2_list_use = '1',
de_type2_list_skin = 'maintype20.inc.php',
de_type2_list_mod = '3',
de_type2_list_row = '2',
de_type2_img_width = '$simg_width',
de_type2_img_height = '$simg_height',
de_type3_list_use = '1',
de_type3_list_skin = 'maintype30.inc.php',
de_type3_list_mod = '1',
de_type3_list_row = '3',
de_type3_img_width = '$simg_width',
de_type3_img_height = '$simg_height',
de_type4_list_use = '1',
de_type4_list_skin = 'maintype40.inc.php',
de_type4_list_mod = '3',
de_type4_list_row = '1',
de_type4_img_width = '$simg_width',
de_type4_img_height = '$simg_height',
de_type5_list_use = '1',
de_type5_list_skin = 'maintype50.inc.php',
de_type5_list_mod = '3',
de_type5_list_row = '1',
de_type5_img_width = '$simg_width',
de_type5_img_height = '$simg_height',
de_bank_use = '1',
de_bank_account = 'OO은행 12345-67-89012 예금주명',
de_vbank_use = '0',
de_iche_use = '0',
de_card_use = '0',
de_card_max_amount = '1000',
de_point_settle = '10000',
de_point_per = '5',
de_card_point = '0',
de_point_days = '7',
de_card_pg = 'kcp',
de_kcp_mid = 'T0000',
de_send_cost_case = '상한',
de_send_cost_limit = '20000;30000;40000',
de_send_cost_list = '4000;3000;2000',
de_hope_date_use = '0',
de_hope_date_after = '3',
de_baesong_content = '<b>배송 안내 입력전입니다.</b>',
de_change_content = '<b>교환/반품 안내 입력전입니다.</b>',
de_rel_list_mod = '4',
de_rel_img_width = '$simg_width',
de_rel_img_height = '$simg_height',
de_simg_width = '$simg_width',
de_simg_height = '$simg_height',
de_mimg_width = '$mimg_width',
de_mimg_height = '$mimg_height',
de_item_ps_use = '1',
de_level_sell = '1',
de_code_dup_use = '1',
de_sms_cont1 = '{이름}님의 회원가입을 축하드립니다.\nID:{회원아이디}\n{회사명}',
de_sms_cont2 = '{이름}님께서 주문하셨습니다.\n{주문번호}\n{주문금액}원\n{회사명}',
de_sms_cont3 = '{이름}님 입금 감사합니다.\n{입금액}원\n주문번호:\n{주문번호}\n{회사명}',
de_sms_cont4 = '{이름}님 배송합니다.\n택배:{택배회사}\n운송장번호:\n{운송장번호}\n{회사명}'
";
mysql_query($sql) or die(mysql_error() . "<p>" . $sql);
?>
<li>DB설정 완료</li>
@ -158,7 +258,15 @@ $dir_arr = array (
$data_path.'/file',
$data_path.'/log',
$data_path.'/member',
$data_path.'/session'
$data_path.'/session',
$data_path.'/banner',
$data_path.'/category',
$data_path.'/common',
$data_path.'/content',
$data_path.'/event',
$data_path.'/faq',
$data_path.'/item',
$data_path.'/onlinecalc'
);
for ($i=0; $i<count($dir_arr); $i++) {
@ -228,7 +336,7 @@ fclose($f);
?>
</ol>
<p class="st_strong">축하합니다. 그누보드4s 설치가 완료되었습니다.</p>
<p class="st_strong">축하합니다. 쇼핑몰 설치가 완료되었습니다.</p>
<h2>환경설정 변경은 다음의 과정을 따르십시오.</h2>

View File

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

View File

@ -7,7 +7,7 @@ function get_cart_count($uq_id)
{
global $g4;
$sql = " select count(ct_id) as cnt from {$g4['yc4_cart_table']} where uq_id = '$uq_id' ";
$sql = " select count(ct_id) as cnt from {$g4['shop_cart_table']} where uq_id = '$uq_id' ";
$row = sql_fetch($sql);
$cnt = (int)$row[cnt];
return $cnt;
@ -59,13 +59,13 @@ function get_it_stock_qty($it_id)
{
global $g4;
$sql = " select it_stock_qty from {$g4['yc4_item_table']} where it_id = '$it_id' ";
$sql = " select it_stock_qty from {$g4['shop_item_table']} where it_id = '$it_id' ";
$row = sql_fetch($sql);
$jaego = (int)$row['it_stock_qty'];
// 재고에서 빼지 않았고 주문인것만
$sql = " select SUM(ct_qty) as sum_qty
from {$g4['yc4_cart_table']}
from {$g4['shop_cart_table']}
where it_id = '$it_id'
and ct_stock_use = 0
and ct_status in ('주문', '준비') ";
@ -205,7 +205,7 @@ function display_type($type, $skin_file, $list_mod, $list_row, $img_width, $img_
// 1.02.00
// it_order 추가
$sql = " select *
from {$g4['yc4_item_table']}
from {$g4['shop_item_table']}
where it_use = '1'
and it_type{$type} = '1' ";
if ($ca_id) $sql .= " and ca_id like '$ca_id%' ";
@ -234,7 +234,7 @@ function display_category($no, $list_mod, $list_row, $img_width, $img_height, $c
// 상품의 갯수
$items = $list_mod * $list_row;
$sql = " select * from {$g4['yc4_item_table']} where it_use = '1'";
$sql = " select * from {$g4['shop_item_table']} where it_use = '1'";
if ($ca_id)
$sql .= " and ca_id LIKE '{$ca_id}%' ";
$sql .= " order by it_order, it_id desc limit $items ";
@ -270,7 +270,7 @@ function get_star_image($it_id)
{
global $g4;
$sql = "select (SUM(is_score) / COUNT(*)) as score from {$g4['yc4_item_ps_table']} where it_id = '$it_id' ";
$sql = "select (SUM(is_score) / COUNT(*)) as score from {$g4['shop_item_ps_table']} where it_id = '$it_id' ";
$row = sql_fetch($sql);
return (int)get_star($row['score']);
@ -408,7 +408,7 @@ function print_item_options()
it_opt4_subject,
it_opt5_subject,
it_opt6_subject
from {$g4['yc4_item_table']}
from {$g4['shop_item_table']}
where it_id = '$it_id' ";
$it = sql_fetch($sql);
@ -500,8 +500,8 @@ function display_event($no, $event, $list_mod, $list_row, $img_width, $img_heigh
// 1.02.00
// b.it_order 추가
$sql = " select b.*
from {$g4['yc4_event_item_table']} a,
{$g4['yc4_item_table']} b
from {$g4['shop_event_item_table']} a,
{$g4['shop_item_table']} b
where a.it_id = b.it_id
and b.it_use = '1'
and a.ev_id = '$event' ";
@ -537,7 +537,7 @@ function get_goods($uq_id)
global $g4;
// 상품명만들기
$row = sql_fetch(" select a.it_id, b.it_name from {$g4['yc4_cart_table']} a, {$g4['yc4_item_table']} b where a.it_id = b.it_id and a.uq_id = '$uq_id' order by ct_id limit 1 ");
$row = sql_fetch(" select a.it_id, b.it_name from {$g4['shop_cart_table']} a, {$g4['shop_item_table']} b where a.it_id = b.it_id and a.uq_id = '$uq_id' order by ct_id limit 1 ");
// 상품명에 "(쌍따옴표)가 들어가면 오류 발생함
$goods['it_id'] = $row['it_id'];
$goods['full_name']= $goods['name'] = addslashes($row['it_name']);
@ -545,7 +545,7 @@ function get_goods($uq_id)
$goods['full_name'] = preg_replace ("/[ #\&\+\-%@=\/\\\:;,\.'\"\^`~\_|\!\?\*$#<>()\[\]\{\}]/i", "", $goods['full_name']);
// 상품건수
$row = sql_fetch(" select count(*) as cnt from {$g4['yc4_cart_table']} where uq_id = '$uq_id' ");
$row = sql_fetch(" select count(*) as cnt from {$g4['shop_cart_table']} where uq_id = '$uq_id' ");
$cnt = $row['cnt'] - 1;
if ($cnt)
$goods['full_name'] .= "{$cnt}";
@ -622,10 +622,10 @@ function get_new_od_id()
global $g4;
// 주문서 테이블 Lock 걸고
sql_query(" LOCK TABLES {$g4['yc4_order_table']} READ, {$g4['yc4_order_table']} WRITE ", FALSE);
sql_query(" LOCK TABLES {$g4['shop_order_table']} READ, {$g4['shop_order_table']} WRITE ", FALSE);
// 주문서 번호를 만든다.
$date = date("ymd", time()); // 2002년 3월 7일 일경우 020307
$sql = " select max(od_id) as max_od_id from {$g4['yc4_order_table']} where SUBSTRING(od_id, 1, 6) = '$date' ";
$sql = " select max(od_id) as max_od_id from {$g4['shop_order_table']} where SUBSTRING(od_id, 1, 6) = '$date' ";
$row = sql_fetch($sql);
$od_id = $row['max_od_id'];
if ($od_id == 0)

View File

@ -3,7 +3,7 @@ include_once("./_common.php");
if ($_COOKIE['ck_bn_id'] != $bn_id)
{
$sql = " update {$g4['yc4_banner_table']} set bn_hit = bn_hit + 1 where bn_id = '$bn_id' ";
$sql = " update {$g4['shop_banner_table']} set bn_hit = bn_hit + 1 where bn_id = '$bn_id' ";
sql_query($sql);
// 하루 동안
set_cookie("ck_bn_id", $bn_id, 60*60*24);

View File

@ -1,6 +1,6 @@
<?
// 배너 출력
$sql = " select * from {$g4['yc4_banner_table']}
$sql = " select * from {$g4['shop_banner_table']}
where '".G4_TIME_YMDHIS."' between bn_begin_time and bn_end_time
and bn_position = '$position'
order by bn_order, bn_id desc ";

View File

@ -5,7 +5,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<table cellpadding=0 cellspacing=0 bgcolor=#FFFFFF>
<tr><td><a href='<?=$g4[shop_path]?>/cart.php'><img src='<?=G4_SHOP_URL?>/img/bar_cart.gif' border=0></a></td></tr>
<?
$hsql = " select a.it_id, b.it_name, a.ct_qty from {$g4['yc4_cart_table']} a, {$g4['yc4_item_table']} b
$hsql = " select a.it_id, b.it_name, a.ct_qty from {$g4['shop_cart_table']} a, {$g4['shop_item_table']} b
where a.uq_id = '".get_session('ss_uq_id')."'
and a.it_id = b.it_id
order by a.ct_id ";

View File

@ -12,7 +12,7 @@ $sub_menu_left = 100; // 2단계 메뉴 왼쪽 좌표 (1단계 좌표에서 부
<tr><td align=center valign=top height=50><img src='<?=G4_SHOP_URL?>/img/bar_category.gif'></td></tr>
<?
// 1단계 분류 판매가능한것만
$hsql = " select ca_id, ca_name from {$g4['yc4_category_table']}
$hsql = " select ca_id, ca_name from {$g4['shop_category_table']}
where length(ca_id) = '2'
and ca_use = '1'
order by ca_id ";
@ -24,7 +24,7 @@ for ($i=0; $row=sql_fetch_array($hresult); $i++)
$menubody = "";
$onmouseover = "";
$onmouseout = "";
$sql2 = " select ca_id, ca_name from {$g4['yc4_category_table']}
$sql2 = " select ca_id, ca_name from {$g4['shop_category_table']}
where LENGTH(ca_id) = '4'
and SUBSTRING(ca_id,1,2) = '{$row['ca_id']}'
and ca_use = '1'

View File

@ -5,7 +5,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<table bgcolor=#FFFFFF width=100% cellpadding=0 cellspacing=0>
<tr><td align=center valign=top height=50><img src='<?=G4_SHOP_URL?>/img/bar_event.gif'></td></tr>
<?
$hsql = " select ev_id, ev_subject from {$g4['yc4_event_table']} where ev_use = '1' order by ev_id desc ";
$hsql = " select ev_id, ev_subject from {$g4['shop_event_table']} where ev_use = '1' order by ev_id desc ";
$hresult = sql_query($hsql);
for ($i=0; $row=sql_fetch_array($hresult); $i++)
{

View File

@ -54,7 +54,7 @@ echo "\n";
for ($i=1; $i<=$tv_idx; $i++)
{
$tv_it_id = get_session("ss_tv[$i]");
$rowx = sql_fetch(" select it_name from $g4[yc4_item_table] where it_id = '$tv_it_id' ");
$rowx = sql_fetch(" select it_name from $g4[shop_item_table] where it_id = '$tv_it_id' ");
$it_name = get_text(addslashes($rowx['it_name']));
$img = get_it_image($tv_it_id."_s", $tv_div['img_width'], $tv_div['img_height'], $tv_it_id);
$img = str_replace('"', '\"', preg_replace("/\<a /", "<a title=\"$it_name\" ", $img));

View File

@ -5,7 +5,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<table cellpadding=0 cellspacing=0 bgcolor=#FFFFFF>
<tr><td><a href='<?=G4_SHOP_URL?>/wishlist.php'><img src='<?=G4_SHOP_URL?>/img/bar_wishlist.gif' border=0></a></td></tr>
<?
$hsql = " select a.it_id, b.it_name from {$g4['yc4_wish_table']} a, {$g4['yc4_item_table']} b
$hsql = " select a.it_id, b.it_name from {$g4['shop_wish_table']} a, {$g4['shop_item_table']} b
where a.mb_id = '{$member['mb_id']}'
and a.it_id = b.it_id
order by a.wi_id desc ";

View File

@ -61,8 +61,8 @@ $sql = " select a.ct_id,
b.it_id,
b.it_name,
b.ca_id
from {$g4['yc4_cart_table']} a,
{$g4['yc4_item_table']} b
from {$g4['shop_cart_table']} a,
{$g4['shop_item_table']} b
where a.uq_id = '$s_uq_id'
and a.it_id = b.it_id
order by a.ct_id ";
@ -195,7 +195,7 @@ if ($i == 0) {
}
// 이미 주문된 내역을 보여주는것이므로 배송비를 주문서에서 얻는다.
$sql = "select od_send_cost from {$g4['yc4_order_table']} where od_id = '$od_id' ";
$sql = "select od_send_cost from {$g4['shop_order_table']} where od_id = '$od_id' ";
$row = sql_fetch($sql);
if ($row['od_send_cost'] > 0)
$send_cost = $row['od_send_cost'];

View File

@ -32,14 +32,14 @@ if ($member['mb_level'] < $default['de_level_sell'])
if ($act == "d") // 삭제이면
{
$sql = " delete from {$g4['yc4_cart_table']}
$sql = " delete from {$g4['shop_cart_table']}
where ct_id = '$ct_id'
and uq_id = '$tmp_uq_id' ";
sql_query($sql);
}
else if ($act == "alldelete") // 모두 삭제이면
{
$sql = " delete from {$g4['yc4_cart_table']}
$sql = " delete from {$g4['shop_cart_table']}
where uq_id = '$tmp_uq_id' ";
sql_query($sql);
}
@ -64,7 +64,7 @@ else if ($act == "allupdate") // 수량 변경이면 : 모두 수정이면
for ($i=0; $i<$fldcnt; $i++)
{
$sql = " update {$g4['yc4_cart_table']}
$sql = " update {$g4['shop_cart_table']}
set ct_qty = '{$_POST['ct_qty'][$i]}'
where ct_id = '{$_POST['ct_id'][$i]}'
and uq_id = '$tmp_uq_id' ";
@ -85,7 +85,7 @@ else if ($act == "multi") // 온라인견적(등)에서 여러개의 상품이
// 비회원가격과 회원가격이 다르다면
if (!$is_member && $default['de_different_msg'])
{
$sql = " select it_amount, it_amount2 from {$g4['yc4_item_table']} where it_id = '{$_POST['it_id'][$i]}' ";
$sql = " select it_amount, it_amount2 from {$g4['shop_item_table']} where it_id = '{$_POST['it_id'][$i]}' ";
$row = sql_fetch($sql);
if ($row['it_amount2'] && $row['it_amount'] != $row['it_amount2']) {
$error .= "\"{$_POST['it_name'][$i]}\" 의 비회원가격과 회원가격이 다릅니다. 로그인 후 구입하여 주십시오.\\n\\n";
@ -95,7 +95,7 @@ else if ($act == "multi") // 온라인견적(등)에서 여러개의 상품이
//--------------------------------------------------------
// 변조 검사
//--------------------------------------------------------
$sql = " select * from {$g4['yc4_item_table']} where it_id = '{$_POST['it_id'][$i]}' ";
$sql = " select * from {$g4['shop_item_table']} where it_id = '{$_POST['it_id'][$i]}' ";
$it = sql_fetch($sql);
$amount = get_amount($it);
@ -110,7 +110,7 @@ else if ($act == "multi") // 온라인견적(등)에서 여러개의 상품이
//--------------------------------------------------------
// 이미 장바구니에 있는 같은 상품의 수량합계를 구한다.
$sql = " select SUM(ct_qty) as cnt from {$g4['yc4_cart_table']} where it_id = '{$_POST['it_id'][$i]}' and uq_id = '$tmp_uq_id' ";
$sql = " select SUM(ct_qty) as cnt from {$g4['shop_cart_table']} where it_id = '{$_POST['it_id'][$i]}' and uq_id = '$tmp_uq_id' ";
$row = sql_fetch($sql);
$sum_qty = $row['cnt'];
@ -132,7 +132,7 @@ else if ($act == "multi") // 온라인견적(등)에서 여러개의 상품이
if (!$config['cf_use_point']) $_POST['it_point'][$i] = 0;
// 장바구니에 Insert
$sql = " insert {$g4['yc4_cart_table']}
$sql = " insert {$g4['shop_cart_table']}
set uq_id = '$tmp_uq_id',
it_id = '{$_POST['it_id'][$i]}',
ct_status = '쇼핑',
@ -157,7 +157,7 @@ else // 장바구니에 담기
// 비회원가격과 회원가격이 다르다면
if (!$is_member && $default['de_different_msg'])
{
$sql = " select it_amount, it_amount2 from {$g4['yc4_item_table']} where it_id = '{$_POST['it_id']}' ";
$sql = " select it_amount, it_amount2 from {$g4['shop_item_table']} where it_id = '{$_POST['it_id']}' ";
$row = sql_fetch($sql);
if ($row['it_amount2'] && $row['it_amount'] != $row['it_amount2']) {
echo "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">";
@ -170,7 +170,7 @@ else // 장바구니에 담기
// 변조 검사
//--------------------------------------------------------
$opt_amount = 0;
$sql = " select * from {$g4['yc4_item_table']} where it_id = '{$_POST['it_id']}' ";
$sql = " select * from {$g4['shop_item_table']} where it_id = '{$_POST['it_id']}' ";
$it = sql_fetch($sql);
for ($i=1; $i<=6; $i++) {
//$dst_opt = $_POST["it_opt".$i];
@ -211,7 +211,7 @@ else // 장바구니에 담기
// 재고 검사
//--------------------------------------------------------
// 이미 장바구니에 있는 같은 상품의 수량합계를 구한다.
$sql = " select SUM(ct_qty) as cnt from {$g4['yc4_cart_table']}
$sql = " select SUM(ct_qty) as cnt from {$g4['shop_cart_table']}
where it_id = '{$_POST['it_id']}'
and uq_id = '$tmp_uq_id' ";
$row = sql_fetch($sql);
@ -226,17 +226,17 @@ else // 장바구니에 담기
//--------------------------------------------------------
// 바로구매에 있던 장바구니 자료를 지운다.
$result = sql_query(" delete from {$g4['yc4_cart_table']} where uq_id = '$tmp_uq_id' and ct_direct = 1 ", false);
$result = sql_query(" delete from {$g4['shop_cart_table']} where uq_id = '$tmp_uq_id' and ct_direct = 1 ", false);
if (!$result) {
// 삭제중 에러가 발생했다면 필드가 없다는 것이므로 바로구매 필드를 생성한다.
sql_query(" ALTER TABLE `{$g4['yc4_cart_table']}` ADD `ct_direct` TINYINT NOT NULL ");
sql_query(" ALTER TABLE `{$g4['shop_cart_table']}` ADD `ct_direct` TINYINT NOT NULL ");
}
// 포인트 사용하지 않는다면
if (!$config['cf_use_point']) { $_POST['it_point'] = 0; }
// 장바구니에 Insert
$sql = " insert {$g4['yc4_cart_table']}
$sql = " insert {$g4['shop_cart_table']}
set uq_id = '$tmp_uq_id',
it_id = '{$_POST['it_id']}',
it_opt1 = '{$_POST['it_opt1']}',

View File

@ -2,7 +2,7 @@
include_once('./_common.php');
// 내용
$sql = " select * from {$g4['yc4_content_table']} where co_id = '$co_id' ";
$sql = " select * from {$g4['shop_content_table']} where co_id = '$co_id' ";
$co = sql_fetch($sql);
if (!$co['co_id'])
alert("등록된 내용이 없습니다.");

View File

@ -1,7 +1,7 @@
<?
include_once('./_common.php');
$sql = " select * from {$g4['yc4_event_table']}
$sql = " select * from {$g4['shop_event_table']}
where ev_id = '$ev_id'
and ev_use = 1 ";
$ev = sql_fetch($sql);
@ -62,8 +62,8 @@ $sql_list1 = " select a.ca_id,
$sql_list1 = " select * ";
$sql_list2 = " order by $order_by a.it_order, a.it_id desc ";
$sql_common = " from {$g4['yc4_item_table']} a
left join {$g4['yc4_event_item_table']} b on (a.it_id=b.it_id)
$sql_common = " from {$g4['shop_item_table']} a
left join {$g4['shop_event_item_table']} b on (a.it_id=b.it_id)
where b.ev_id = '$ev_id'
and a.it_use = '1' ";

View File

@ -4,7 +4,7 @@ include_once('./_common.php');
if (!$fm_id) $fm_id = 1;
// FAQ MASTER
$sql = " select * from {$g4['yc4_faq_master_table']} where fm_id = '$fm_id' ";
$sql = " select * from {$g4['shop_faq_master_table']} where fm_id = '$fm_id' ";
$fm = sql_fetch($sql);
if (!$fm['fm_id'])
alert('등록된 내용이 없습니다.');
@ -30,7 +30,7 @@ echo "<br>";
echo "<table width=95% align=center cellpadding=1 cellspacing=0>\n";
echo "<tr><td class=bg_faq><table width=100% cellpadding=2 cellspacing=1 border=0 bgcolor=#FFFFFF>\n";
$sql = " select * from {$g4['yc4_faq_table']}
$sql = " select * from {$g4['shop_faq_table']}
where fm_id = '$fm_id'
order by fa_order , fa_id ";
$result = sql_query($sql);

View File

@ -35,7 +35,7 @@ if (!$saved) {
// 조회수 증가
if ($_COOKIE['ck_it_id'] != $it_id) {
sql_query(" update {$g4['yc4_item_table']} set it_hit = it_hit + 1 where it_id = '$it_id' "); // 1증가
sql_query(" update {$g4['shop_item_table']} set it_hit = it_hit + 1 where it_id = '$it_id' "); // 1증가
set_cookie("ck_it_id", $it_id, time() + 3600); // 1시간동안 저장
}
@ -43,8 +43,8 @@ if ($_COOKIE['ck_it_id'] != $it_id) {
$sql = " select a.*,
b.ca_name,
b.ca_use
from {$g4['yc4_item_table']} a,
{$g4['yc4_category_table']} b
from {$g4['shop_item_table']} a,
{$g4['shop_category_table']} b
where a.it_id = '$it_id'
and a.ca_id = b.ca_id ";
$it = sql_fetch($sql);
@ -57,7 +57,7 @@ if (!($it['ca_use'] && $it['it_use'])) {
// 분류 테이블에서 분류 상단, 하단 코드를 얻음
$sql = " select ca_include_head, ca_include_tail
from {$g4['yc4_category_table']}
from {$g4['shop_category_table']}
where ca_id = '{$it['ca_id']}' ";
$ca = sql_fetch($sql);
@ -88,7 +88,7 @@ if ($is_admin)
include G4_SHOP_PATH.'/listcategory.inc.php';
// 이전 상품보기
$sql = " select it_id, it_name from {$g4['yc4_item_table']}
$sql = " select it_id, it_name from {$g4['shop_item_table']}
where it_id > '$it_id'
and SUBSTRING(ca_id,1,4) = '".substr($it['ca_id'],0,4)."'
and it_use = '1'
@ -104,7 +104,7 @@ if ($row['it_id']) {
}
// 다음 상품보기
$sql = " select it_id, it_name from {$g4['yc4_item_table']}
$sql = " select it_id, it_name from {$g4['shop_item_table']}
where it_id < '$it_id'
and SUBSTRING(ca_id,1,4) = '".substr($it['ca_id'],0,4)."'
and it_use = '1'
@ -121,8 +121,8 @@ if ($row['it_id']) {
// 관련상품의 갯수를 얻음
$sql = " select count(*) as cnt
from {$g4['yc4_item_relation_table']} a
left join {$g4['yc4_item_table']} b on (a.it_id2=b.it_id and b.it_use='1')
from {$g4['shop_item_relation_table']} a
left join {$g4['shop_item_table']} b on (a.it_id2=b.it_id and b.it_use='1')
where a.it_id = '{$it['it_id']}' ";
$row = sql_fetch($sql);
$item_relation_count = $row['cnt'];
@ -407,7 +407,7 @@ function click_item(id)
<tr><td rowspan=2 width=31 valign=top bgcolor=#CACDE2><img src='<?=G4_SHOP_URL?>/img/item_t01.gif'></td><td height=2 bgcolor=#CACDE2></td></tr>
<tr><td style='padding:15px'>
<?
$sql = " select * from {$g4['yc4_item_info_table']} where it_id = '$it_id' order by ii_id ";
$sql = " select * from {$g4['shop_item_info_table']} where it_id = '$it_id' order by ii_id ";
$result = sql_query($sql, false);
if (@mysql_num_rows($result)) {
?>
@ -496,8 +496,8 @@ include_once('./itemqa.inc.php');
$td_width = (int)(100 / $list_mod);
$sql = " select b.*
from {$g4['yc4_item_relation_table']} a
left join {$g4['yc4_item_table']} b on (a.it_id2=b.it_id)
from {$g4['shop_item_relation_table']} a
left join {$g4['shop_item_table']} b on (a.it_id2=b.it_id)
where a.it_id = '{$it['it_id']}'
and b.it_use='1' ";
$result = sql_query($sql);

View File

@ -24,7 +24,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<td width=11><img src='<?=G4_SHOP_URL?>/img/corner02.gif'></td>
</tr>
<?
$sql_common = " from {$g4['yc4_item_qa_table']} where it_id = '{$it['it_id']}' ";
$sql_common = " from {$g4['shop_item_qa_table']} where it_id = '{$it['it_id']}' ";
// 테이블의 전체 레코드수만 얻음
$sql = " select COUNT(*) as cnt " . $sql_common;

View File

@ -46,18 +46,18 @@ $url = "./item.php?it_id=$it_id";
if ($w == '')
{
$sql = " select max(iq_id) as max_iq_id from {$g4['yc4_item_qa_table']} ";
$sql = " select max(iq_id) as max_iq_id from {$g4['shop_item_qa_table']} ";
$row = sql_fetch($sql);
$max_iq_id = $row['max_iq_id'];
$sql = " select max(iq_id) as max_iq_id from {$g4['yc4_item_qa_table']}
$sql = " select max(iq_id) as max_iq_id from {$g4['shop_item_qa_table']}
where it_id = '$it_id'
and mb_id = '{$member['mb_id']}' ";
$row = sql_fetch($sql);
if ($row['max_iq_id'] && $row['max_iq_id'] == $max_iq_id)
alert('같은 상품에 대하여 계속해서 질문 하실 수 없습니다.');
$sql = "insert {$g4['yc4_item_qa_table']}
$sql = "insert {$g4['shop_item_qa_table']}
set it_id = '$it_id',
mb_id = '{$member['mb_id']}',
iq_name = '$iq_name',
@ -72,12 +72,12 @@ if ($w == '')
}
else if ($w == 'u')
{
$sql = " select iq_password from {$g4['yc4_item_qa_table']} where iq_id = '$iq_id' ";
$sql = " select iq_password from {$g4['shop_item_qa_table']} where iq_id = '$iq_id' ";
$row = sql_fetch($sql);
if ($row['iq_password'] != $iq_password)
alert('패스워드가 틀리므로 수정하실 수 없습니다.');
$sql = " update {$g4['yc4_item_qa_table']}
$sql = " update {$g4['shop_item_qa_table']}
set iq_subject = '$iq_subject',
iq_question = '$iq_question'
where iq_id = '$iq_id' ";
@ -89,7 +89,7 @@ else if ($w == 'd')
{
if ($is_member)
{
$sql = " select count(*) as cnt from {$g4['yc4_item_qa_table']} where mb_id = '{$member['mb_id']}' and iq_id = '$iq_id' ";
$sql = " select count(*) as cnt from {$g4['shop_item_qa_table']} where mb_id = '{$member['mb_id']}' and iq_id = '$iq_id' ";
$row = sql_fetch($sql);
if (!$row['cnt'])
alert('자신의 상품문의만 삭제하실 수 있습니다.');
@ -98,13 +98,13 @@ else if ($w == 'd')
{
$iq_password = sql_password($iq_password);
$sql = " select iq_password from {$g4['yc4_item_qa_table']} where iq_id = '$iq_id' ";
$sql = " select iq_password from {$g4['shop_item_qa_table']} where iq_id = '$iq_id' ";
$row = sql_fetch($sql);
if ($row['iq_password'] != $iq_password)
alert('패스워드가 틀리므로 삭제하실 수 없습니다.');
}
$sql = " delete from {$g4['yc4_item_qa_table']} where mb_id = '{$member['mb_id']}' and iq_id = '$iq_id' ";
$sql = " delete from {$g4['shop_item_qa_table']} where mb_id = '{$member['mb_id']}' and iq_id = '$iq_id' ";
sql_query($sql);
goto_url($url);

View File

@ -8,7 +8,7 @@ if (!$is_member)
$token = md5(uniqid(rand(), true));
set_session("ss_token", $token);
$sql = " select it_name from {$g4['yc4_item_table']} where it_id='$it_id' ";
$sql = " select it_name from {$g4['shop_item_table']} where it_id='$it_id' ";
$it = sql_fetch($sql);
if (!$it['it_name'])
alert_close("등록된 상품이 아닙니다.");

View File

@ -28,7 +28,7 @@ if ($_POST["token"] && get_session("ss_token") == $_POST["token"]) {
}
// 상품
$sql = " select * from {$g4['yc4_item_table']} where it_id = '$it_id' ";
$sql = " select * from {$g4['shop_item_table']} where it_id = '$it_id' ";
$it = sql_fetch($sql);
if (!$it['it_id'])
alert("등록된 상품이 아닙니다.");

View File

@ -25,7 +25,7 @@ include_once(G4_LIB_PATH.'/thumb.lib.php');
<td width=11><img src='<?=G4_SHOP_URL?>/img/corner02.gif'></td>
</tr>
<?
$sql_common = " from {$g4['yc4_item_ps_table']} where it_id = '{$it['it_id']}' and is_confirm = '1' ";
$sql_common = " from {$g4['shop_item_ps_table']} where it_id = '{$it['it_id']}' and is_confirm = '1' ";
// 테이블의 전체 레코드수만 얻음
$sql = " select COUNT(*) as cnt " . $sql_common;

View File

@ -5,7 +5,7 @@ include_once(G4_LIB_PATH.'/thumb.lib.php');
$g4['title'] = '사용후기';
include_once('./_head.php');
$sql_common = " from {$g4['yc4_item_ps_table']} where is_confirm = '1' ";
$sql_common = " from {$g4['shop_item_ps_table']} where is_confirm = '1' ";
$sql_order = " order by is_time desc ";
$sql = " select count(*) as cnt
@ -68,7 +68,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$is_time = substr($row['is_time'], 2, 14);
$small_image = $row['it_id']."_s";
$row2 = sql_fetch(" select it_name from {$g4['yc4_item_table']} where it_id = '{$row['it_id']}' ");
$row2 = sql_fetch(" select it_name from {$g4['shop_item_table']} where it_id = '{$row['it_id']}' ");
$it_href = G4_SHOP_URL."/item.php?it_id={$row['it_id']}";
echo "

View File

@ -45,18 +45,18 @@ $url = "./item.php?it_id=$it_id";
if ($w == '')
{
$sql = " select max(is_id) as max_is_id from {$g4['yc4_item_ps_table']} ";
$sql = " select max(is_id) as max_is_id from {$g4['shop_item_ps_table']} ";
$row = sql_fetch($sql);
$max_is_id = $row['max_is_id'];
$sql = " select max(is_id) as max_is_id from {$g4['yc4_item_ps_table']}
$sql = " select max(is_id) as max_is_id from {$g4['shop_item_ps_table']}
where it_id = '$it_id'
and mb_id = '{$member['mb_id']}' ";
$row = sql_fetch($sql);
if ($row['max_is_id'] && $row['max_is_id'] == $max_is_id)
alert("같은 상품에 대하여 계속해서 평가하실 수 없습니다.");
$sql = "insert {$g4['yc4_item_ps_table']}
$sql = "insert {$g4['shop_item_ps_table']}
set it_id = '$it_id',
mb_id = '{$member['mb_id']}',
is_score = '$is_score',
@ -77,12 +77,12 @@ if ($w == '')
}
else if ($w == 'u')
{
$sql = " select is_password from {$g4['yc4_item_ps_table']} where is_id = '$is_id' ";
$sql = " select is_password from {$g4['shop_item_ps_table']} where is_id = '$is_id' ";
$row = sql_fetch($sql);
if ($row['is_password'] != $is_password)
alert("패스워드가 틀리므로 수정하실 수 없습니다.");
$sql = " update {$g4['yc4_item_ps_table']}
$sql = " update {$g4['shop_item_ps_table']}
set is_subject = '$is_subject',
is_content = '$is_content',
is_score = '$is_score'
@ -95,7 +95,7 @@ else if ($w == 'd')
{
if ($is_member)
{
$sql = " select count(*) as cnt from {$g4['yc4_item_ps_table']} where mb_id = '{$member['mb_id']}' and is_id = '$is_id' ";
$sql = " select count(*) as cnt from {$g4['shop_item_ps_table']} where mb_id = '{$member['mb_id']}' and is_id = '$is_id' ";
$row = sql_fetch($sql);
if (!$row['cnt'])
alert("자신의 사용후기만 삭제하실 수 있습니다.");
@ -104,13 +104,13 @@ else if ($w == 'd')
{
$is_password = sql_password($is_password);
$sql = " select is_password from {$g4['yc4_item_ps_table']} where is_id = '$is_id' ";
$sql = " select is_password from {$g4['shop_item_ps_table']} where is_id = '$is_id' ";
$row = sql_fetch($sql);
if ($row['is_password'] != $is_password)
alert("패스워드가 틀리므로 삭제하실 수 없습니다.");
}
$sql = " delete from {$g4['yc4_item_ps_table']} where mb_id = '{$member['mb_id']}' and is_id = '$is_id' ";
$sql = " delete from {$g4['shop_item_ps_table']} where mb_id = '{$member['mb_id']}' and is_id = '$is_id' ";
sql_query($sql);
goto_url($url);

View File

@ -12,7 +12,7 @@ if (!$is_member) {
if ($w == "") {
$is_score = 10;
} else if ($w == "u") {
$ps = sql_fetch(" select * from {$g4['yc4_item_ps_table']} where is_id = '$is_id' ");
$ps = sql_fetch(" select * from {$g4['shop_item_ps_table']} where is_id = '$is_id' ");
if (!$ps) {
alert_close("사용후기 정보가 없습니다.");
}

View File

@ -25,16 +25,16 @@ $url = "./item.php?it_id=$it_id";
if ($w == '')
{
$sql = " select max(is_id) as max_is_id from {$g4['yc4_item_ps_table']} ";
$sql = " select max(is_id) as max_is_id from {$g4['shop_item_ps_table']} ";
$row = sql_fetch($sql);
$max_is_id = $row['max_is_id'];
$sql = " select max(is_id) as max_is_id from {$g4['yc4_item_ps_table']} where it_id = '$it_id' and mb_id = '{$member['mb_id']}' ";
$sql = " select max(is_id) as max_is_id from {$g4['shop_item_ps_table']} where it_id = '$it_id' and mb_id = '{$member['mb_id']}' ";
$row = sql_fetch($sql);
if ($row['max_is_id'] && $row['max_is_id'] == $max_is_id)
alert("같은 상품에 대하여 계속해서 평가하실 수 없습니다.");
$sql = "insert {$g4['yc4_item_ps_table']}
$sql = "insert {$g4['shop_item_ps_table']}
set it_id = '$it_id',
mb_id = '{$member['mb_id']}',
is_score = '$is_score',
@ -56,12 +56,12 @@ if ($w == '')
}
else if ($w == 'u')
{
$sql = " select is_password from {$g4['yc4_item_ps_table']} where is_id = '$is_id' ";
$sql = " select is_password from {$g4['shop_item_ps_table']} where is_id = '$is_id' ";
$row = sql_fetch($sql);
if ($row['is_password'] != $is_password)
alert("패스워드가 틀리므로 수정하실 수 없습니다.");
$sql = " update {$g4['yc4_item_ps_table']}
$sql = " update {$g4['shop_item_ps_table']}
set is_subject = '$is_subject',
is_content = '$is_content',
is_score = '$is_score'

View File

@ -1,7 +1,7 @@
<?
include_once('./_common.php');
$sql = " select it_name from {$g4['yc4_item_table']} where it_id='$it_id' ";
$sql = " select it_name from {$g4['shop_item_table']} where it_id='$it_id' ";
$row = sql_fetch_array(sql_query($sql));
$imagefile = G4_DATA_PATH."/item/$img";

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