테이블 변수명에서 yc4_를 shop_로 변경
This commit is contained in:
@ -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
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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">
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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."&sca=".$sca."&page=".$page."&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."&sca=".$sca."&page=".$page."&save_stx=".$stx;
|
||||
$s_del = '<a href="javascript:del(\'./categoryformupdate.php?w=d&ca_id='.$row['ca_id'].'&'.$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']}' ";
|
||||
|
||||
@ -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]}',
|
||||
|
||||
@ -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'];
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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('등록된 자료가 없습니다.');
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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'];
|
||||
}
|
||||
|
||||
|
||||
@ -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 = ''
|
||||
|
||||
@ -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("등록된 자료가 없습니다.");
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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']}");
|
||||
|
||||
@ -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('등록된 자료가 없습니다.');
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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'];
|
||||
|
||||
|
||||
@ -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 ";
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -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 ('주문', '준비', '배송', '완료') ";
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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']});'>";
|
||||
|
||||
@ -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("등록된 자료가 없습니다.");
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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");
|
||||
|
||||
@ -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']);
|
||||
|
||||
@ -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']);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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'];
|
||||
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -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++)
|
||||
{
|
||||
|
||||
@ -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]}',
|
||||
|
||||
@ -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'])
|
||||
|
||||
@ -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");
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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");
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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 ('주문', '준비') ";
|
||||
|
||||
@ -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]}' ";
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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]}',
|
||||
|
||||
@ -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("등록된 자료가 없습니다.");
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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 ";
|
||||
|
||||
// 테이블의 전체 레코드수만 얻음
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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 " <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 " <a href='$pg_url' target=_new>결제대행사</a>";
|
||||
?>
|
||||
</td>
|
||||
@ -549,7 +549,7 @@ if ($od['od_receipt_point'] > 0)
|
||||
value='<? echo $od['od_receipt_card'] ?>'>원
|
||||
|
||||
<?
|
||||
$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";
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -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'].')';
|
||||
}
|
||||
|
||||
@ -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++)
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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 ";
|
||||
|
||||
// 테이블의 전체 레코드수만 얻음
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user