From 523c6e5e31cab7061638b1c6143a2cd90a2b5109 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 23 Aug 2013 10:39:16 +0900 Subject: [PATCH] =?UTF-8?q?#282=20uq=5Fid=20=ED=95=84=EB=93=9C=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/deliverylist.php | 3 +- adm/shop_admin/deliverylistupdate.php | 7 ++-- adm/shop_admin/index.php | 4 +- adm/shop_admin/ordercartupdate.php | 8 ++-- adm/shop_admin/orderdelete.php | 8 ++-- adm/shop_admin/orderform.php | 19 +++++---- adm/shop_admin/orderlist.php | 12 +++--- adm/shop_admin/orderlist2.php | 16 ++++---- adm/shop_admin/ordermail.inc.php | 2 +- adm/shop_admin/orderprintresult.php | 20 +++++----- adm/shop_admin/orderrequest.inc.php | 2 +- adm/shop_admin/orderrequestform.php | 2 +- adm/shop_admin/orderrequestlist.php | 4 +- adm/shop_admin/orderstatuslist.php | 13 +++---- adm/shop_admin/sale1date.php | 4 +- adm/shop_admin/sale1month.php | 4 +- adm/shop_admin/sale1today.php | 3 +- adm/shop_admin/sale1year.php | 4 +- extend/shop.extend2.php | 6 +++ install/shop.sql | 7 +--- lib/shop.lib.php | 56 +++++++++++++-------------- mobile/shop/cart.php | 8 ++-- mobile/shop/kcp/pp_ax_hub_result.php | 4 -- mobile/shop/orderform.php | 18 ++++----- mobile/shop/orderformupdate.php | 36 ++++++++--------- mobile/shop/orderinquiry.php | 2 +- mobile/shop/orderinquiry.sub.php | 2 +- mobile/shop/orderinquiryview.php | 9 ++--- shop/boxcart.inc.php | 2 +- shop/cart.php | 34 ++++------------ shop/cartoption.php | 6 +-- shop/cartupdate.php | 40 +++++++------------ shop/kcp/pp_ax_hub_result.php | 4 -- shop/kcp/proc_win.html | 6 +-- shop/orderform.php | 20 +++++----- shop/orderformupdate.php | 34 +++++++--------- shop/orderinquiry.sub.php | 2 +- shop/orderinquirycancel.php | 19 +++++---- shop/orderinquiryview.php | 8 ++-- shop/orderitemcoupon.php | 6 +-- shop/ordermail1.inc.php | 6 +-- shop/ordermail2.inc.php | 6 +-- shop/orderrequestupdate.php | 5 +-- shop/taxsave_kcp.php | 4 +- 44 files changed, 216 insertions(+), 269 deletions(-) diff --git a/adm/shop_admin/deliverylist.php b/adm/shop_admin/deliverylist.php index a750a5873..fc81c82f7 100644 --- a/adm/shop_admin/deliverylist.php +++ b/adm/shop_admin/deliverylist.php @@ -34,7 +34,7 @@ if ($sel_ca_id != "") { if ($sel_field == "") $sel_field = "od_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_cart_table']} b on (a.od_id=b.od_id) $sql_search "; // 테이블의 전체 레코드수만 얻음 @@ -171,7 +171,6 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌 - diff --git a/adm/shop_admin/deliverylistupdate.php b/adm/shop_admin/deliverylistupdate.php index f8c2b29c7..3ecde04b1 100644 --- a/adm/shop_admin/deliverylistupdate.php +++ b/adm/shop_admin/deliverylistupdate.php @@ -51,18 +51,17 @@ for ($m=0; $m 0 diff --git a/adm/shop_admin/ordercartupdate.php b/adm/shop_admin/ordercartupdate.php index b12f8578d..fce4a9548 100644 --- a/adm/shop_admin/ordercartupdate.php +++ b/adm/shop_admin/ordercartupdate.php @@ -44,7 +44,7 @@ for ($i=0; $i<$cnt; $i++) $ct_id = $_POST['ct_id'][$k]; $sql = " select * from {$g4['shop_cart_table']} - where uq_id = '$uq_id' + where od_id = '$od_id' and ct_id = '$ct_id' "; $ct = sql_fetch($sql); if(!$ct['ct_id']) @@ -76,7 +76,7 @@ for ($i=0; $i<$cnt; $i++) $sql = " update {$g4['shop_cart_table']} set ct_qty = '$ct_qty' where ct_id = '$ct_id' - and uq_id = '$uq_id' "; + and od_id = '$od_id' "; sql_query($sql); $mod_history .= G4_TIME_YMDHIS.' '.$ct['ct_option'].' 수량변경 '.$ct['ct_qty'].' -> '.$ct_qty."\n"; } @@ -141,7 +141,7 @@ for ($i=0; $i<$cnt; $i++) { $point_use = 0; //insert_point($mb_id, (-1) * ($ct[ct_point] * $ct[ct_qty]), "주문번호 $od_id ($ct_id) 취소"); - delete_point($mb_id, "@delivery", $mb_id, "$od_id,$uq_id,$ct_id"); + delete_point($mb_id, "@delivery", $mb_id, "$od_id,$ct_id"); } // 히스토리에 남김 @@ -153,7 +153,7 @@ for ($i=0; $i<$cnt; $i++) ct_stock_use = '$stock_use', ct_status = '$ct_status', ct_history = CONCAT(ct_history,'$ct_history') - where uq_id = '$uq_id' + where od_id = '$od_id' and ct_id = '$ct_id' "; sql_query($sql); } diff --git a/adm/shop_admin/orderdelete.php b/adm/shop_admin/orderdelete.php index f4999a7b3..540324719 100644 --- a/adm/shop_admin/orderdelete.php +++ b/adm/shop_admin/orderdelete.php @@ -6,16 +6,16 @@ check_demo(); auth_check($auth[$sub_menu], "d"); -if ($od_id && $uq_id) +if ($od_id) { // 장바구니 삭제 - sql_query(" delete from {$g4['shop_cart_table']} where uq_id = '$uq_id' "); + sql_query(" delete from {$g4['shop_cart_table']} where od_id = '$od_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['shop_card_history_table']} where od_id = '$od_id' "); // 주문서 삭제 - sql_query(" delete from {$g4['shop_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' "); } if ($return_url) diff --git a/adm/shop_admin/orderform.php b/adm/shop_admin/orderform.php index 3e12eeba9..f511f5621 100644 --- a/adm/shop_admin/orderform.php +++ b/adm/shop_admin/orderform.php @@ -43,14 +43,14 @@ 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['shop_order_table']} where uq_id = '{$row['uq_id']}' "); + $tmp_row = sql_fetch("select od_id, mb_id from {$g4['shop_order_table']} where od_id = '{$row['od_id']}' "); // 회원이면서 포인트가 0보다 크다면 if ($tmp_row['mb_id'] && $row['ct_point'] > 0) { $po_point = $row['ct_point'] * $row['ct_qty']; $po_content = "$cart_title3 {$tmp_row['od_id']} ({$row['ct_id']}) $cart_title4"; - 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']}"); + insert_point($tmp_row['mb_id'], $po_point, $po_content, "@delivery", $tmp_row['mb_id'], "{$tmp_row['od_id']},{$row['ct_id']}"); } sql_query("update {$g4['shop_cart_table']} set ct_point_use = '1' where ct_id = '{$row['ct_id']}' "); @@ -95,7 +95,7 @@ $sql = " select it_id, cp_amount, ct_notax from {$g4['shop_cart_table']} - where uq_id = '{$od['uq_id']}' + where od_id = '{$od['od_id']}' and ct_num = '0' order by ct_id "; $result = sql_query($sql); @@ -123,7 +123,6 @@ $pg_anchor .='
  • 결제상세정보 확인
  • - @@ -172,7 +171,7 @@ $pg_anchor .='
  • 결제상세정보 확인
  • // 상품의 옵션정보 $sql = " select ct_id, it_id, ct_price, ct_qty, ct_option, ct_status, ct_stock_use, ct_point_use, ct_send_cost, io_type, io_price from {$g4['shop_cart_table']} - where uq_id = '{$od['uq_id']}' + where od_id = '{$od['od_id']}' and it_id = '{$row['it_id']}' order by ct_num "; $res = sql_query($sql); @@ -291,7 +290,7 @@ $pg_anchor .='
  • 결제상세정보 확인
  • - + @@ -332,7 +331,7 @@ $pg_anchor .='
  • 결제상세정보 확인
  • break; } - $sql = " select it_name, ct_option from {$g4['shop_cart_table']} where uq_id = '{$od['uq_id']}' and ct_id = '$rq_ct_id' "; + $sql = " select it_name, ct_option from {$g4['shop_cart_table']} where od_id = '{$od['od_id']}' and ct_id = '$rq_ct_id' "; $rq_ct = sql_fetch($sql); $rq_subject = $rq_row['rq_time'].' '.$rq_ct['it_name'].' '.$rq_ct['ct_option']; if($rq_item_count > 1) @@ -340,7 +339,7 @@ $pg_anchor .='
  • 결제상세정보 확인
  • $rq_subject .= ' '.$type.'요청'; if($rq_row['rq_id'] != $rq_id) { - $order_href = './orderform.php?od_id='.$od['od_id'].'&uq_id='.$od['uq_id'].'&rq_id='.$rq_row['rq_id'].'&'.$qstr.'#anc_sodr_request'; + $order_href = './orderform.php?od_id='.$od['od_id'].'&rq_id='.$rq_row['rq_id'].'&'.$qstr.'#anc_sodr_request'; $rq_subject = ''.$rq_subject.''; } @@ -550,7 +549,7 @@ $pg_anchor .='
  • 결제상세정보 확인
  • 현금영수증 확인 - 현금영수증 발급 + 현금영수증 발급 @@ -929,7 +928,7 @@ $pg_anchor .='
  • 결제상세정보 확인
  • diff --git a/adm/shop_admin/orderlist.php b/adm/shop_admin/orderlist.php index a58152bb4..93948fe99 100644 --- a/adm/shop_admin/orderlist.php +++ b/adm/shop_admin/orderlist.php @@ -24,12 +24,12 @@ if ($search != "") $page = 1; } -if ($sel_field == "") $sel_field = "od_id"; -if ($sort1 == "") $sort1 = "od_id"; +if ($sel_field == "") $sel_field = "a.od_id"; +if ($sort1 == "") $sort1 = "a.od_id"; if ($sort2 == "") $sort2 = "desc"; $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_cart_table']} b on (a.od_id=b.od_id) $sql_search "; // 김선용 200805 : 조인 사용으로 전체카운트가 일정레코드 이상일 때 지연시간 문제가 심각하므로 변경 @@ -37,7 +37,7 @@ $sql_common = " from {$g4['shop_order_table']} a $result = sql_query(" select DISTINCT od_id ".$sql_common); $total_count = mysql_num_rows($result); */ -$sql = " select count(distinct od_id) as cnt " . $sql_common; +$sql = " select count(distinct a.od_id) as cnt " . $sql_common; $row = sql_fetch($sql); $total_count = $row['cnt']; @@ -103,7 +103,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌 - + @@ -102,7 +102,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
      -
    • ">주문번호 순 정렬
    • +
    • ">주문번호 순 정렬
    • ">주문자 순 정렬
    • ">건수 순 정렬
    • ">주문합계 순 정렬
    • @@ -198,7 +198,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌 // 상품개별출력 $sql2 = " select it_id, it_name from {$g4['shop_cart_table']} - where uq_id = '{$row['uq_id']}' + where od_id = '{$row['od_id']}' and ct_num = '0' order by ct_num "; $result2 = sql_query($sql2); @@ -229,7 +229,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌 // 옵션항목 $sql3 = " select * from {$g4['shop_cart_table']} - where uq_id = '{$row['uq_id']}' + where od_id = '{$row['od_id']}' and it_id = '{$row2['it_id']}' order by ct_num "; $result3 = sql_query($sql3); @@ -267,7 +267,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌 diff --git a/adm/shop_admin/ordermail.inc.php b/adm/shop_admin/ordermail.inc.php index 16f85660e..12ef1ba59 100644 --- a/adm/shop_admin/ordermail.inc.php +++ b/adm/shop_admin/ordermail.inc.php @@ -19,7 +19,7 @@ if ($od_send_mail) $sql = " select * from {$g4['shop_cart_table']} - where uq_id = '{$od['uq_id']}' + where od_id = '{$od['od_id']}' order by ct_id "; $result = sql_query($sql); for ($i=0; $ct=mysql_fetch_array($result); $i++) { diff --git a/adm/shop_admin/orderprintresult.php b/adm/shop_admin/orderprintresult.php index 998aff0e7..85f10695f 100644 --- a/adm/shop_admin/orderprintresult.php +++ b/adm/shop_admin/orderprintresult.php @@ -41,7 +41,7 @@ if ($csv == 'csv') $sql = " SELECT od_b_zip1, od_b_zip2, od_b_addr1, od_b_addr2, od_b_name, od_b_tel, od_b_hp, b.it_name, ct_qty, b.it_id, a.od_id, od_memo, od_invoice, b.ct_option, b.ct_send_cost FROM {$g4['shop_order_table']} a, {$g4['shop_cart_table']} b - where a.uq_id = b.uq_id "; + where a.od_id = b.od_id "; if ($case == 1) // 출력기간 $sql .= " and a.od_time between '$fr_date 00:00:00' and '$to_date 23:59:59' "; else // 주문번호구간 @@ -99,7 +99,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, b.it_name, ct_qty, b.it_id, a.od_id, od_memo, od_invoice, b.ct_option, b.ct_send_cost FROM {$g4['shop_order_table']} a, {$g4['shop_cart_table']} b - where a.uq_id = b.uq_id "; + where a.od_id = b.od_id "; if ($case == 1) // 출력기간 $sql .= " and a.od_time between '$fr_date 00:00:00' and '$to_date 23:59:59' "; else // 주문번호구간 @@ -162,11 +162,11 @@ if ($csv == 'xls') exit; } -function get_order($uq_id) +function get_order($od_id) { global $g4; - $sql = " select * from {$g4['shop_order_table']} where uq_id = '$uq_id' "; + $sql = " select * from {$g4['shop_order_table']} where od_id = '$od_id' "; return sql_fetch($sql); } @@ -177,14 +177,14 @@ if ($case == 1) { $fr_date = date_conv($fr_date); $to_date = date_conv($to_date); - $sql = " SELECT DISTINCT a.uq_id FROM {$g4['shop_order_table']} a, {$g4['shop_cart_table']} b - where a.uq_id = b.uq_id + $sql = " SELECT DISTINCT a.od_id FROM {$g4['shop_order_table']} a, {$g4['shop_cart_table']} b + where a.od_id = b.od_id and a.od_time between '$fr_date 00:00:00' and '$to_date 23:59:59' "; } else { - $sql = " SELECT DISTINCT a.uq_id FROM {$g4['shop_order_table']} a, {$g4['shop_cart_table']} b - where a.uq_id = b.uq_id + $sql = " SELECT DISTINCT a.od_id FROM {$g4['shop_order_table']} a, {$g4['shop_cart_table']} b + where a.od_id = b.od_id and a.od_id between '$fr_od_id' and '$to_od_id' "; } if ($ct_status) @@ -213,7 +213,7 @@ if (mysql_num_rows($result) == 0) $tot_total_amount = 0; for ($i=0; $row=sql_fetch_array($result); $i++) { - $sql1 = " select * from {$g4['shop_order_table']} where uq_id = '{$row['uq_id']}' "; + $sql1 = " select * from {$g4['shop_order_table']} where od_id = '{$row['od_id']}' "; $row1 = sql_fetch($sql1); // 1.03.02 @@ -275,7 +275,7 @@ if (mysql_num_rows($result) == 0) diff --git a/adm/shop_admin/orderrequestform.php b/adm/shop_admin/orderrequestform.php index cc1d23062..0a54c7e75 100644 --- a/adm/shop_admin/orderrequestform.php +++ b/adm/shop_admin/orderrequestform.php @@ -96,7 +96,7 @@ if($rq['rq_parent']) { // 요청상품 $sql = " select ct_id, it_id, it_name, ct_option, ct_price, ct_qty, io_type, io_price, ct_status from {$g4['shop_cart_table']} - where uq_id = '{$od['uq_id']}' + where od_id = '{$od['od_id']}' order by ct_id "; $result = sql_query($sql); diff --git a/adm/shop_admin/orderrequestlist.php b/adm/shop_admin/orderrequestlist.php index 889b1fa80..7b1917078 100644 --- a/adm/shop_admin/orderrequestlist.php +++ b/adm/shop_admin/orderrequestlist.php @@ -53,7 +53,7 @@ $total_page = ceil($total_count / $rows); // 전체 페이지 계산 if ($page == '') { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) $from_record = ($page - 1) * $rows; // 시작 열을 구함 -$sql = " select a.*, b.uq_id, b.od_temp_amount, b.od_name +$sql = " select a.*, b.od_temp_amount, b.od_name $sql_common order by $sst $sod, a.rq_id desc limit $from_record, $rows "; @@ -165,7 +165,7 @@ if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌 if($tmp['rq_time']) $done_date = substr($tmp['rq_time'], 2, 8); - $order_href = './orderform.php?od_id='.$row['od_id'].'&uq_id='.$row['uq_id'].'&rq_id='.$row['rq_id'].'&rq_type='.$rq_type.'&'.$qstr; + $order_href = './orderform.php?od_id='.$row['od_id'].'&rq_id='.$row['rq_id'].'&rq_type='.$rq_type.'&'.$qstr; ?> diff --git a/adm/shop_admin/orderstatuslist.php b/adm/shop_admin/orderstatuslist.php index 84dbcbc45..8482c92ae 100644 --- a/adm/shop_admin/orderstatuslist.php +++ b/adm/shop_admin/orderstatuslist.php @@ -23,12 +23,12 @@ if ($search != "") { $page = 1; } -if ($sel_field == "") $sel_field = "od_id"; -if ($sort1 == "") $sort1 = "od_id"; +if ($sel_field == "") $sel_field = "a.od_id"; +if ($sort1 == "") $sort1 = "a.od_id"; if ($sort2 == "") $sort2 = "desc"; $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_cart_table']} b on (a.od_id = b.od_id) left join {$g4['shop_item_table']} c on (b.it_id = c.it_id) $sql_search "; @@ -105,7 +105,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌 - diff --git a/shop/boxcart.inc.php b/shop/boxcart.inc.php index 64585ef40..9ed5ddc8b 100644 --- a/shop/boxcart.inc.php +++ b/shop/boxcart.inc.php @@ -9,7 +9,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
        '$ctime' "; - sql_query($sql); -} - -$s_uq_id = get_session('ss_uq_id'); +$s_cart_id = get_session('ss_cart_id'); // 선택필드 초기화 -$sql = " update {$g4['shop_cart_table']} set ct_select = '0' where uq_id = '$s_uq_id' "; +$sql = " update {$g4['shop_cart_table']} set ct_select = '0' where od_id = '$s_cart_id' "; sql_query($sql); $cart_action_url = G4_SHOP_URL.'/cartupdate.php'; @@ -65,7 +47,7 @@ include_once('./_head.php'); $tot_sell_amount = 0; $tot_cancel_amount = 0; - // $s_uq_id 로 현재 장바구니 자료 쿼리 + // $s_cart_id 로 현재 장바구니 자료 쿼리 $sql = " select a.ct_id, a.it_id, a.it_name, @@ -78,7 +60,7 @@ include_once('./_head.php'); b.ca_id2, b.ca_id3 from {$g4['shop_cart_table']} a left join {$g4['shop_item_table']} b on ( a.it_id = b.it_id ) - where a.uq_id = '$s_uq_id' + where a.od_id = '$s_cart_id' and a.ct_num = '0' "; if($default['de_cart_keep_term']) { $ctime = date('Y-m-d H:i:s', G4_SERVER_TIME - ($default['de_cart_keep_term'] * 86400)); @@ -97,7 +79,7 @@ include_once('./_head.php'); SUM(ct_qty) as qty from {$g4['shop_cart_table']} where it_id = '{$row['it_id']}' - and uq_id = '$s_uq_id' "; + and od_id = '$s_cart_id' "; $sum = sql_fetch($sql); if ($i==0) { // 계속쇼핑 @@ -109,7 +91,7 @@ include_once('./_head.php'); $image = get_it_image($row['it_id'], 70, 70); $it_name = $a1 . stripslashes($row['it_name']) . $a2; - $it_options = print_item_options($row['it_id'], $s_uq_id); + $it_options = print_item_options($row['it_id'], $s_cart_id); if($it_options) { $mod_options = '
        '; $it_name .= '
        '.$it_options.'
        '; diff --git a/shop/cartoption.php b/shop/cartoption.php index 6c2f05358..9dd5717dd 100644 --- a/shop/cartoption.php +++ b/shop/cartoption.php @@ -11,12 +11,12 @@ if(!$it['it_id']) die('no-item'); // 장바구니 자료 -$uq_id = get_session('ss_uq_id'); -$sql = " select * from {$g4['shop_cart_table']} where uq_id = '$uq_id' and it_id = '$it_id' order by io_type asc, ct_num asc, ct_id asc "; +$cart_id = get_session('ss_cart_id'); +$sql = " select * from {$g4['shop_cart_table']} where od_id = '$cart_id' and it_id = '$it_id' order by io_type asc, ct_num asc, ct_id asc "; $result = sql_query($sql); // 판매가격 -$sql2 = " select ct_price, it_name, ct_send_cost from {$g4['shop_cart_table']} where uq_id = '$uq_id' and it_id = '$it_id' and ct_num = '0' "; +$sql2 = " select ct_price, it_name, ct_send_cost from {$g4['shop_cart_table']} where od_id = '$cart_id' and it_id = '$it_id' and ct_num = '0' "; $row2 = sql_fetch($sql2); if(!mysql_num_rows($result)) diff --git a/shop/cartupdate.php b/shop/cartupdate.php index 75fa2e4c2..e9bc570d7 100644 --- a/shop/cartupdate.php +++ b/shop/cartupdate.php @@ -3,16 +3,16 @@ include_once('./_common.php'); // print_r2($_POST); exit; -// uq_id 설정 -set_unique_id($sw_direct); +// cart id 설정 +set_cart_id($sw_direct); if($sw_direct) - $tmp_uq_id = get_session('ss_uq_direct'); + $tmp_cart_id = get_session('ss_cart_direct'); else - $tmp_uq_id = get_session('ss_uq_id'); + $tmp_cart_id = get_session('ss_cart_id'); // 브라우저에서 쿠키를 허용하지 않은 경우라고 볼 수 있음. -if (!$tmp_uq_id) +if (!$tmp_cart_id) { alert('더 이상 작업을 진행할 수 없습니다.\\n\\n브라우저의 쿠키 허용을 사용하지 않음으로 설정한것 같습니다.\\n\\n브라우저의 인터넷 옵션에서 쿠키 허용을 사용으로 설정해 주십시오.\\n\\n그래도 진행이 되지 않는다면 쇼핑몰 운영자에게 문의 바랍니다.'); } @@ -36,7 +36,7 @@ if($act == "buy") $it_id = $_POST['it_id'][$i]; $sql = " update {$g4['shop_cart_table']} set ct_select = '1' - where it_id = '$it_id' and uq_id = '$tmp_uq_id' "; + where it_id = '$it_id' and od_id = '$tmp_cart_id' "; sql_query($sql); } } @@ -49,7 +49,7 @@ if($act == "buy") else if ($act == "alldelete") // 모두 삭제이면 { $sql = " delete from {$g4['shop_cart_table']} - where uq_id = '$tmp_uq_id' "; + where od_id = '$tmp_cart_id' "; sql_query($sql); } else if ($act == "seldelete") // 선택삭제 @@ -62,7 +62,7 @@ else if ($act == "seldelete") // 선택삭제 $ct_chk = $_POST['ct_chk'][$i]; if($ct_chk) { $it_id = $_POST['it_id'][$i]; - $sql = " delete from {$g4['shop_cart_table']} where it_id = '$it_id' and uq_id = '$tmp_uq_id' "; + $sql = " delete from {$g4['shop_cart_table']} where it_id = '$it_id' and od_id = '$tmp_cart_id' "; sql_query($sql); } } @@ -124,7 +124,7 @@ else // 장바구니에 담기 $sql = " select SUM(ct_qty) as cnt from {$g4['shop_cart_table']} where it_id = '$it_id' - and uq_id = '$tmp_uq_id' + and od_id = '$tmp_cart_id' and io_id = '$io_id' "; $row = sql_fetch($sql); $sum_qty = $row['cnt']; @@ -145,24 +145,13 @@ else // 장바구니에 담기 // 바로구매에 있던 장바구니 자료를 지운다. if($i == 0) - sql_query(" delete from {$g4['shop_cart_table']} where uq_id = '$tmp_uq_id' and ct_direct = 1 ", false); + sql_query(" delete from {$g4['shop_cart_table']} where od_id = '$tmp_cart_id' and ct_direct = 1 ", false); // 옵션수정일 때 기존 장바구니 자료를 먼저 삭제 if($act == 'optionmod') - sql_query(" delete from {$g4['shop_cart_table']} where uq_id = '$tmp_uq_id' and it_id = '$it_id' "); + sql_query(" delete from {$g4['shop_cart_table']} where od_id = '$tmp_cart_id' and it_id = '$it_id' "); // 장바구니에 Insert - $sql = " select ct_num - from {$g4['shop_cart_table']} - where it_id = '$it_id' - and uq_id = '$tmp_uq_id' - order by ct_num desc "; - $row = sql_fetch($sql); - if($row['ct_num'] != '') - $ct_num = (int)$row['ct_num'] + 1; - else - $ct_num = 0; - // 바로구매일 경우 장바구니가 체크된것으로 강제 설정 if($sw_direct) $ct_select = 1; @@ -172,7 +161,7 @@ else // 장바구니에 담기 $ct_count = 0; $comma = ''; $sql = " INSERT INTO {$g4['shop_cart_table']} - ( uq_id, mb_id, it_id, it_name, ct_status, ct_price, ct_point, ct_point_use, ct_stock_use, ct_option, ct_qty, ct_num, ct_notax, io_id, io_type, io_price, ct_time, ct_ip, ct_send_cost, ct_direct, ct_select ) + ( od_id, mb_id, it_id, it_name, ct_status, ct_price, ct_point, ct_point_use, ct_stock_use, ct_option, ct_qty, ct_num, ct_notax, io_id, io_type, io_price, ct_time, ct_ip, ct_send_cost, ct_direct, ct_select ) VALUES "; for($k=0; $k<$opt_count; $k++) { @@ -194,7 +183,7 @@ else // 장바구니에 담기 // 동일옵션의 상품이 있으면 수량 더함 $sql2 = " select ct_id from {$g4['shop_cart_table']} - where uq_id = '$tmp_uq_id' + where od_id = '$tmp_cart_id' and it_id = '$it_id' and io_id = '$io_id' and ct_status = '쇼핑' "; @@ -207,9 +196,8 @@ else // 장바구니에 담기 continue; } - $sql .= $comma."( '$tmp_uq_id', '{$member['mb_id']}', '{$it['it_id']}', '{$it['it_name']}', '쇼핑', '{$it['it_price']}', '$point', '0', '0', '$io_value', '$ct_qty', '$ct_num', '{$it['it_notax']}', '$io_id', '$io_type', '$io_price', '".G4_TIME_YMDHIS."', '$REMOTE_ADDR', '$ct_send_cost', '$sw_direct', '$ct_select' )"; + $sql .= $comma."( '$tmp_cart_id', '{$member['mb_id']}', '{$it['it_id']}', '{$it['it_name']}', '쇼핑', '{$it['it_price']}', '$point', '0', '0', '$io_value', '$ct_qty', '$k', '{$it['it_notax']}', '$io_id', '$io_type', '$io_price', '".G4_TIME_YMDHIS."', '$REMOTE_ADDR', '$ct_send_cost', '$sw_direct', '$ct_select' )"; $comma = ' , '; - $ct_num++; $ct_count++; } diff --git a/shop/kcp/pp_ax_hub_result.php b/shop/kcp/pp_ax_hub_result.php index 8ad6c1495..353d15e4c 100644 --- a/shop/kcp/pp_ax_hub_result.php +++ b/shop/kcp/pp_ax_hub_result.php @@ -30,7 +30,6 @@ if ( $req_tx == "pay" ) // 카드내역 INSERT $sql = "insert {$g4['shop_card_history_table']} set od_id = '$ordr_idxx', - uq_id = '$uq_id', cd_mall_id = '$site_cd', cd_amount = '$good_mny', cd_app_no = '$app_no', @@ -51,7 +50,6 @@ if ( $req_tx == "pay" ) // 계좌이체내역 INSERT $sql = "insert {$g4['shop_card_history_table']} set od_id = '$ordr_idxx', - uq_id = '$uq_id', cd_mall_id = '$site_cd', cd_amount = '$good_mny', cd_app_no = '$tno', @@ -75,7 +73,6 @@ if ( $req_tx == "pay" ) // 가상계좌내역 INSERT $sql = "insert {$g4['shop_card_history_table']} set od_id = '$ordr_idxx', - uq_id = '$uq_id', cd_mall_id = '$site_cd', cd_amount = '0', cd_app_no = '$tno', @@ -101,7 +98,6 @@ if ( $req_tx == "pay" ) // 휴대폰결제내역 INSERT $sql = "insert {$g4['shop_card_history_table']} set od_id = '$ordr_idxx', - uq_id = '$uq_id', cd_mall_id = '$site_cd', cd_amount = '$good_mny', cd_app_no = '$tno', diff --git a/shop/kcp/proc_win.html b/shop/kcp/proc_win.html index 2d8194444..5ef4443ef 100644 --- a/shop/kcp/proc_win.html +++ b/shop/kcp/proc_win.html @@ -1,14 +1,14 @@ - ó¸®Áß - + 처리중 + diff --git a/shop/orderform.php b/shop/orderform.php index a7725c976..b4a010bd1 100644 --- a/shop/orderform.php +++ b/shop/orderform.php @@ -12,13 +12,13 @@ if (G4_IS_MOBILE) { set_session("ss_direct", $sw_direct); // 장바구니가 비어있는가? if ($sw_direct) { - $tmp_uq_id = get_session("ss_uq_direct"); + $tmp_cart_id = get_session('ss_cart_direct'); } else { - $tmp_uq_id = get_session("ss_uq_id"); + $tmp_cart_id = get_session('ss_cart_id'); } -if (get_cart_count($tmp_uq_id) == 0) +if (get_cart_count($tmp_cart_id) == 0) alert('장바구니가 비어 있습니다.', G4_SHOP_URL.'/cart.php'); $g4['title'] = '주문서 작성'; @@ -27,8 +27,8 @@ include_once('./_head.php'); // 새로운 주문번호 생성 $od_id = get_uniqid(); -set_session('ss_order_uniqid', $od_id); -$s_uq_id = $tmp_uq_id; +set_session('ss_order_id', $od_id); +$s_cart_id = $tmp_cart_id; $order_action_url = G4_HTTPS_SHOP_URL.'/orderformupdate.php'; if (file_exists('./settle_'.$default['de_card_pg'].'.inc.php')) { include './settle_'.$default['de_card_pg'].'.inc.php'; @@ -147,7 +147,7 @@ function get_intall_file() $goods = $goods_it_id = ""; $goods_count = -1; - // $s_uq_id 로 현재 장바구니 자료 쿼리 + // $s_cart_id 로 현재 장바구니 자료 쿼리 $sql = " select a.ct_id, a.it_id, a.it_name, @@ -161,7 +161,7 @@ function get_intall_file() b.ca_id3, b.it_notax from {$g4['shop_cart_table']} a left join {$g4['shop_item_table']} b on ( a.it_id = b.it_id ) - where a.uq_id = '$s_uq_id' + where a.od_id = '$s_cart_id' and a.ct_select = '1' and a.ct_num = '0' "; if($default['de_cart_keep_term']) { @@ -187,7 +187,7 @@ function get_intall_file() SUM(ct_qty) as qty from {$g4['shop_cart_table']} where it_id = '{$row['it_id']}' - and uq_id = '$s_uq_id' "; + and od_id = '$s_cart_id' "; $sum = sql_fetch($sql); if (!$goods) @@ -213,7 +213,7 @@ function get_intall_file() $image = get_it_image($row['it_id'], 50, 50); $it_name = '' . stripslashes($row['it_name']) . ''; - $it_options = print_item_options($row['it_id'], $s_uq_id); + $it_options = print_item_options($row['it_id'], $s_cart_id); if($it_options) { $it_name .= '
        '.$it_options.'
        '; } @@ -1550,7 +1550,7 @@ function gumae2baesong(f) $(function(){ - $("#od_hope_date").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd", showButtonPanel: true, yearRange: "c-99:c+99", minDate: "+d;", maxDate: "+d;" }); + $("#od_hope_date").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd", showButtonPanel: true, yearRange: "c-99:c+99", minDate: "+d;", maxDate: "+d;" }); }); diff --git a/shop/orderformupdate.php b/shop/orderformupdate.php index 559bac2d0..7a6cba8d6 100644 --- a/shop/orderformupdate.php +++ b/shop/orderformupdate.php @@ -15,11 +15,11 @@ $_POST = array_add_callback("mysql_real_escape_string", $_POST); // 장바구니가 비어있는가? if (get_session("ss_direct")) - $tmp_uq_id = get_session('ss_uq_direct'); + $tmp_cart_id = get_session('ss_cart_direct'); else - $tmp_uq_id = get_session('ss_uq_id'); + $tmp_cart_id = get_session('ss_cart_id'); -if (get_cart_count($tmp_uq_id) == 0)// 장바구니에 담기 +if (get_cart_count($tmp_cart_id) == 0)// 장바구니에 담기 alert('장바구니가 비어 있습니다.\\n\\n이미 주문하셨거나 장바구니에 담긴 상품이 없는 경우입니다.', G4_SHOP_URL.'/cart.php'); $error = ""; @@ -31,7 +31,7 @@ $sql = " select it_id, io_type, ct_option from {$g4['shop_cart_table']} - where uq_id = '$tmp_uq_id' + where od_id = '$tmp_cart_id' and ct_select = '1' "; $result = sql_query($sql); for ($i=0; $row=sql_fetch_array($result); $i++) @@ -64,7 +64,7 @@ $i_temp_point = (int)$_POST['od_temp_point']; // 주문금액이 상이함 $sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as od_amount - from {$g4['shop_cart_table']} where uq_id = '$tmp_uq_id' and ct_select = '1' "; + from {$g4['shop_cart_table']} where od_id = '$tmp_cart_id' and ct_select = '1' "; $row = sql_fetch($sql); $tot_ct_amount = $row['od_amount']; @@ -110,7 +110,7 @@ if($is_member) { // 상품금액 $sql = " select SUM( IF(io_type = '1', io_price * ct_qty, (ct_price + io_price) * ct_qty)) as sum_price from {$g4['shop_cart_table']} - where uq_id = '$tmp_uq_id' + where od_id = '$tmp_cart_id' and it_id = '$it_id' and ct_select = '1' "; $ct = sql_fetch($sql); @@ -197,7 +197,7 @@ if ($default['de_send_cost_case'] == '없음') { $send_cost = 0; $sql = " select it_id from {$g4['shop_cart_table']} - where uq_id = '$tmp_uq_id' + where od_id = '$tmp_cart_id' and ct_select = '1' and ct_num = '0' and ct_send_cost = '0' "; @@ -208,7 +208,7 @@ if ($default['de_send_cost_case'] == '없음') { SUM(ct_qty) as qty from {$g4['shop_cart_table']} where it_id = '{$sc['it_id']}' - and uq_id = '$tmp_uq_id' "; + and od_id = '$tmp_cart_id' "; $sum = sql_fetch($sql); $send_cost += get_item_sendcost($sc['it_id'], $sum['price'], $sum['qty']); @@ -382,10 +382,7 @@ else $od_pwd = sql_password($_POST['od_pwd']); // 주문번호를 얻는다. -$od_id = get_session('ss_order_uniqid'); - -// 주문상품의 uq_id 변경을 위한 uq_id를 얻는다. -$uq_id = get_uniqid(); +$od_id = get_session('ss_order_id'); $od_escrow = 0; if($escw_yn == 'Y') @@ -404,7 +401,6 @@ if($default['de_tax_flag_use']) { // 주문서에 입력 $sql = " insert {$g4['shop_order_table']} set od_id = '$od_id', - uq_id = '$uq_id', mb_id = '{$member['mb_id']}', od_pwd = '$od_pwd', od_name = '$od_name', @@ -465,10 +461,10 @@ if ($od_receipt_amount > 0 && !$default['de_card_point']) { $sql_card_point = " , ct_point = '0' "; } $sql = "update {$g4['shop_cart_table']} - set uq_id = '$uq_id', + set od_id = '$od_id', ct_status = '주문' $sql_card_point - where uq_id = '$tmp_uq_id' + where od_id = '$tmp_cart_id' and ct_select = '1' "; $result = sql_query($sql, false); @@ -482,7 +478,7 @@ if(!$result) { echo "

        $sql

        " . mysql_errno() . " : " . mysql_error() . "

        error file : {$_SERVER['PHP_SELF']}"; // 주문삭제 - sql_query(" delete from {$g4['shop_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' "); exit; } @@ -515,7 +511,7 @@ if($is_member) { $cp_amt = (int)$arr_it_cp_amt[$cp_it_id]; $sql = " update {$g4['shop_cart_table']} set cp_amount = '$cp_amt' - where uq_id = '$uq_id' + where od_id = '$od_id' and it_id = '$cp_it_id' and ct_select = '1' and ct_num = '0' "; @@ -594,11 +590,11 @@ $uid = md5($od_id.G4_TIME_YMDHIS.$REMOTE_ADDR); set_session('ss_orderview_uid', $uid); // 주문번호제거 -set_session('ss_order_uniqid', ''); +set_session('ss_order_id', ''); // 기존자료 세션에서 제거 if (get_session('ss_direct')) - set_session('ss_uq_direct', ''); + set_session('ss_cart_direct', ''); goto_url(G4_SHOP_URL.'/orderinquiryview.php?od_id='.$od_id.'&uid='.$uid); ?> diff --git a/shop/orderinquiry.sub.php b/shop/orderinquiry.sub.php index fb440b81c..d0aa541ab 100644 --- a/shop/orderinquiry.sub.php +++ b/shop/orderinquiry.sub.php @@ -24,7 +24,7 @@ if (!defined("_ORDERINQUIRY_")) exit; // 개별 페이지 접근 불가 $sql = " select a.od_id, a.*, "._MISU_QUERY_." from {$g4['shop_order_table']} a - left join {$g4['shop_cart_table']} b on (b.uq_id=a.uq_id) + left join {$g4['shop_cart_table']} b on (a.od_id=b.od_id) where a.mb_id = '{$member['mb_id']}' group by a.od_id order by a.od_id desc diff --git a/shop/orderinquirycancel.php b/shop/orderinquirycancel.php index a9b2eabcb..1dfe33d27 100644 --- a/shop/orderinquirycancel.php +++ b/shop/orderinquirycancel.php @@ -9,7 +9,7 @@ if ($token && get_session("ss_token") == $token) { alert_close("토큰 에러"); } -$od = sql_fetch(" select * from {$g4['shop_order_table']} where od_id = '$od_id' and uq_id = '$uq_id' and mb_id = '{$member['mb_id']}' "); +$od = sql_fetch(" select * from {$g4['shop_order_table']} where od_id = '$od_id' and mb_id = '{$member['mb_id']}' "); if (!$od['od_id']) { alert("존재하는 주문이 아닙니다."); @@ -19,11 +19,14 @@ if (!$od['od_id']) { $sql = " select SUM(IF(ct_status = '주문', 1, 0)) as od_count2, COUNT(*) as od_count1 from {$g4['shop_cart_table']} - where uq_id = '$uq_id' "; + where od_id = '$od_id' "; $ct = sql_fetch($sql); -if($ct['od_count1'] != $ct['od_count2'] || ($od['od_settle_case'] == '가상계좌' && $od['od_receipt_amount'] > 0)) - alert("취소할 수 있는 주문이 아닙니다.", G4_SHOP_URL."/orderinquiryview.php?od_id=$od_id&uq_id=$uq_id"); +$uid = md5($od['od_id'].$od['od_time'].$od['od_ip']); + +if($ct['od_count1'] != $ct['od_count2'] || ($od['od_settle_case'] == '가상계좌' && $od['od_receipt_amount'] > 0)) { + alert("취소할 수 있는 주문이 아닙니다.", G4_SHOP_URL."/orderinquiryview.php?od_id=$od_id&uid=$uid"); +} // PG 결제 취소 if($od['od_tno']) { @@ -57,16 +60,16 @@ if($od['od_tno']) { } // 장바구니 자료 취소 -sql_query(" update {$g4['shop_cart_table']} set ct_status = '취소' where uq_id = '$uq_id' "); +sql_query(" update {$g4['shop_cart_table']} set ct_status = '취소' where od_id = '$od_id' "); // 주문 취소 $cancel_memo = addslashes($cancel_memo); -//sql_query(" update $g4[shop_order_table] set od_temp_point = '0', od_receipt_point = '0', od_shop_memo = concat(od_shop_memo,\"\\n주문자 본인 직접 취소 - {$g4['time_ymdhis']} (취소이유 : {$cancel_memo})\") where uq_id = '$uq_id' "); -sql_query(" update {$g4['shop_order_table']} set od_send_cost = '0', od_send_cost2 = '0', od_temp_point = '0', od_receipt_amount = '0', od_receipt_point = '0', od_shop_memo = concat(od_shop_memo,\"\\n주문자 본인 직접 취소 - ".G4_TIME_YMDHIS." (취소이유 : {$cancel_memo})\") where uq_id = '$uq_id' "); +sql_query(" update {$g4['shop_order_table']} set od_send_cost = '0', od_send_cost2 = '0', od_temp_point = '0', od_receipt_amount = '0', od_receipt_point = '0', od_shop_memo = concat(od_shop_memo,\"\\n주문자 본인 직접 취소 - ".G4_TIME_YMDHIS." (취소이유 : {$cancel_memo})\") where od_id = '$od_id' "); // 주문취소 회원의 포인트를 되돌려 줌 if ($od['od_receipt_point'] > 0) insert_point($member['mb_id'], $od['od_receipt_point'], "주문번호 $od_id 본인 취소"); -goto_url(G4_SHOP_URL."/orderinquiryview.php?od_id=$od_id&uq_id=$uq_id"); +$ +goto_url(G4_SHOP_URL."/orderinquiryview.php?od_id=$od_id&uid=$uid"); ?> \ No newline at end of file diff --git a/shop/orderinquiryview.php b/shop/orderinquiryview.php index 0c469b55e..0735d6c49 100644 --- a/shop/orderinquiryview.php +++ b/shop/orderinquiryview.php @@ -50,7 +50,6 @@ if(openwin != null) {

        -

        주문하신 상품

        상품 상태 설명 @@ -70,7 +69,7 @@ if(openwin != null) { $sql = " select it_id, it_name, cp_amount from {$g4['shop_cart_table']} - where uq_id = '$uq_id' + where od_id = '$od_id' and ct_num = '0' order by ct_id "; $result = sql_query($sql); @@ -101,7 +100,7 @@ if(openwin != null) { - 현금영수증을 발급하시려면 클릭하십시오. + 현금영수증을 발급하시려면 클릭하십시오. @@ -712,7 +711,6 @@ if(openwin != null) {
        - diff --git a/shop/orderitemcoupon.php b/shop/orderitemcoupon.php index 0fc551264..595a93166 100644 --- a/shop/orderitemcoupon.php +++ b/shop/orderitemcoupon.php @@ -12,13 +12,13 @@ $it = sql_fetch($sql); // 상품 총 금액 if($sw_direct) - $uq_id = get_session('ss_uq_direct'); + $cart_id = get_session('ss_cart_direct'); else - $uq_id = get_session('ss_uq_id'); + $cart_id = get_session('ss_cart_id'); $sql = " select SUM( IF(io_type = '1', io_price * ct_qty, (ct_price + io_price) * ct_qty)) as sum_price from {$g4['shop_cart_table']} - where uq_id = '$uq_id' + where od_id = '$od_id' and it_id = '$it_id' "; $ct = sql_fetch($sql); $item_price = $ct['sum_price']; diff --git a/shop/ordermail1.inc.php b/shop/ordermail1.inc.php index 4569fca08..145635d1e 100644 --- a/shop/ordermail1.inc.php +++ b/shop/ordermail1.inc.php @@ -18,7 +18,7 @@ $sql = " select a.it_id, b.it_sell_email, b.it_origin from {$g4['shop_cart_table']} a left join {$g4['shop_item_table']} b on ( a.it_id = b.it_id ) - where a.uq_id = '$uq_id' + where a.od_id = '$od_id' and a.ct_select = '1' and a.ct_num = '0' "; $result = sql_query($sql); @@ -30,14 +30,14 @@ for ($i=0; $row=sql_fetch_array($result); $i++) SUM(ct_qty) as qty from {$g4['shop_cart_table']} where it_id = '{$row['it_id']}' - and uq_id = '$uq_id' + and od_id = '$od_id' and ct_select = '1' "; $sum = sql_fetch($sql); // 옵션정보 $sql2 = " select ct_option, ct_qty from {$g4['shop_cart_table']} - where it_id = '{$row['it_id']}' and uq_id = '$uq_id' and ct_select = '1' + where it_id = '{$row['it_id']}' and od_id = '$od_id' and ct_select = '1' order by io_type asc, ct_num asc, ct_id asc "; $result2 = sql_query($sql2); diff --git a/shop/ordermail2.inc.php b/shop/ordermail2.inc.php index e23decc22..301a52b96 100644 --- a/shop/ordermail2.inc.php +++ b/shop/ordermail2.inc.php @@ -39,7 +39,7 @@ $sql = " select b.it_sell_email, a.it_id, a.it_name from {$g4['shop_cart_table']} a left join {$g4['shop_item_table']} b on ( a.it_id = b.it_id ) - where a.uq_id = '$uq_id' + where a.od_id = '$od_id' and a.ct_select = '1' and a.ct_num = '0' and b.it_sell_email <> '' "; @@ -52,14 +52,14 @@ for ($i=0; $row=sql_fetch_array($result); $i++) SUM(ct_qty) as qty from {$g4['shop_cart_table']} where it_id = '{$row['it_id']}' - and uq_id = '$uq_id' + and od_id = '$od_id' and ct_select = '1' "; $sum = sql_fetch($sql); // 옵션정보 $sql2 = " select ct_option, ct_qty from {$g4['shop_cart_table']} - where it_id = '{$row['it_id']}' and uq_id = '$uq_id' and ct_select = '1' + where it_id = '{$row['it_id']}' and od_id = '$od_id' and ct_select = '1' order by io_type asc, ct_num asc, ct_id asc "; $result2 = sql_query($sql2); diff --git a/shop/orderrequestupdate.php b/shop/orderrequestupdate.php index b7b365951..dd680f38e 100644 --- a/shop/orderrequestupdate.php +++ b/shop/orderrequestupdate.php @@ -2,7 +2,6 @@ include_once('./_common.php'); $od_id = $_POST['od_id']; -$uq_id = $_POST['uq_id']; $rq_type = $_POST['rq_type']; $rq_content = $_POST['rq_content']; @@ -21,7 +20,7 @@ switch($rq_type) { if(!count($_POST['chk_ct_id'])) alert($req_act.'하실 상품을 하나이상 선택해 주십시오.'); -$od = sql_fetch(" select od_id from {$g4['shop_order_table']} where od_id = '$od_id' and uq_id = '$uq_id' and mb_id = '{$member['mb_id']}' "); +$od = sql_fetch(" select od_id, od_time, od_ip from {$g4['shop_order_table']} where od_id = '$od_id' and mb_id = '{$member['mb_id']}' "); if (!$od['od_id']) { alert("존재하는 주문이 아닙니다."); @@ -50,5 +49,5 @@ $sql = " insert into {$g4['shop_request_table']} ( '$rq_type', '$od_id', '$ct_id', '{$member['mb_id']}', '$rq_content', '".G4_TIME_YMDHIS."', '$REMOTE_ADDR' ) "; sql_query($sql); -goto_url(G4_SHOP_URL.'/orderinquiryview.php?od_id='.$od_id.'&uq_id='.$uq_id); +goto_url(G4_SHOP_URL.'/orderinquiryview.php?od_id='.$od_id.'&uid='.md5($od['od_id'].$od['od_time'].$od['od_ip'])); ?> \ No newline at end of file diff --git a/shop/taxsave_kcp.php b/shop/taxsave_kcp.php index 010f5c61b..47051ca43 100644 --- a/shop/taxsave_kcp.php +++ b/shop/taxsave_kcp.php @@ -4,11 +4,11 @@ include_once('./_common.php'); $g4['title'] = '주문번호 '.$od_id.' 현금영수증 발행'; include_once(G4_PATH.'/head.sub.php'); -$od = sql_fetch(" select * from {$g4['shop_order_table']} where od_id = '$od_id' and uq_id = '$uq_id' "); +$od = sql_fetch(" select * from {$g4['shop_order_table']} where od_id = '$od_id' "); if (!$od) die('

        주문서가 존재하지 않습니다.

        '); -$goods = get_goods($od['uq_id']); +$goods = get_goods($od['od_id']); $goods_name = $goods['full_name']; //if ($goods[count] > 1) $goods_name .= ' 외 '.$goods[count].'건';