diff --git a/lib/shop.lib.php b/lib/shop.lib.php index ef96764f9..c36d77d2b 100644 --- a/lib/shop.lib.php +++ b/lib/shop.lib.php @@ -3,11 +3,11 @@ // 쇼핑몰 함수 모음 시작 //============================================================================== // 장바구니 건수 검사 -function get_cart_count($on_uid) +function get_cart_count($uq_id) { global $g4; - $sql = " select count(ct_id) as cnt from {$g4['yc4_cart_table']} where on_uid = '$on_uid' "; + $sql = " select count(ct_id) as cnt from {$g4['yc4_cart_table']} where uq_id = '$uq_id' "; $row = sql_fetch($sql); $cnt = (int)$row[cnt]; return $cnt; @@ -532,12 +532,12 @@ function get_yn($val, $case='') } // 상품명과 건수를 반환 -function get_goods($on_uid) +function get_goods($uq_id) { global $g4; // 상품명만들기 - $row = sql_fetch(" select a.it_id, b.it_name from {$g4['yc4_cart_table']} a, {$g4['yc4_item_table']} b where a.it_id = b.it_id and a.on_uid = '$on_uid' order by ct_id limit 1 "); + $row = sql_fetch(" select a.it_id, b.it_name from {$g4['yc4_cart_table']} a, {$g4['yc4_item_table']} b where a.it_id = b.it_id and a.uq_id = '$uq_id' order by ct_id limit 1 "); // 상품명에 "(쌍따옴표)가 들어가면 오류 발생함 $goods['it_id'] = $row['it_id']; $goods['full_name']= $goods['name'] = addslashes($row['it_name']); @@ -545,7 +545,7 @@ function get_goods($on_uid) $goods['full_name'] = preg_replace ("/[ #\&\+\-%@=\/\\\:;,\.'\"\^`~\_|\!\?\*$#<>()\[\]\{\}]/i", "", $goods['full_name']); // 상품건수 - $row = sql_fetch(" select count(*) as cnt from {$g4['yc4_cart_table']} where on_uid = '$on_uid' "); + $row = sql_fetch(" select count(*) as cnt from {$g4['yc4_cart_table']} where uq_id = '$uq_id' "); $cnt = $row['cnt'] - 1; if ($cnt) $goods['full_name'] .= " 외 {$cnt}건"; @@ -615,6 +615,32 @@ function alert_opener($msg='', $url='') echo ""; exit; } + +// 주문서 번호를 얻는다. +function get_new_od_id() +{ + global $g4; + + // 주문서 테이블 Lock 걸고 + sql_query(" LOCK TABLES {$g4['yc4_order_table']} READ, {$g4['yc4_order_table']} WRITE ", FALSE); + // 주문서 번호를 만든다. + $date = date("ymd", time()); // 2002년 3월 7일 일경우 020307 + $sql = " select max(od_id) as max_od_id from {$g4['yc4_order_table']} where SUBSTRING(od_id, 1, 6) = '$date' "; + $row = sql_fetch($sql); + $od_id = $row['max_od_id']; + if ($od_id == 0) + $od_id = 1; + else + { + $od_id = (int)substr($od_id, -4); + $od_id++; + } + $od_id = $date . substr("0000" . $od_id, -4); + // 주문서 테이블 Lock 풀고 + sql_query(" UNLOCK TABLES ", FALSE); + + return $od_id; +} //============================================================================== // 쇼핑몰 함수 모음 끝 //============================================================================== diff --git a/shop/boxcart.inc.php b/shop/boxcart.inc.php index 49d04f605..99f6724fb 100644 --- a/shop/boxcart.inc.php +++ b/shop/boxcart.inc.php @@ -6,7 +6,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

diff --git a/shop/cartsub.inc.php b/shop/cartsub.inc.php index 782b833d3..74cb6dbff 100644 --- a/shop/cartsub.inc.php +++ b/shop/cartsub.inc.php @@ -5,8 +5,8 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 $s_page 는 cart.php 일때 수량의 수정, 물품의 삭제를 위한 변수이다. orderinquiryview.php 일때 배송상태등을 나타내는 변수이다. - $s_on_uid 는 유일한 키인데 orderupdate.php 에서 ck_on_uid 를 죽이면서 - ck_tmp_on_uid 에 복사본을 넣어준다. ck_tmp_on_uid 는 orderconfirm.php 에서만 사용한다. + $s_uq_id 는 유일한 키인데 orderupdate.php 에서 ck_uq_id 를 죽이면서 + ck_tmp_uq_id 에 복사본을 넣어준다. ck_tmp_uq_id 는 orderconfirm.php 에서만 사용한다. */ if ($s_page == 'cart.php' || $s_page == 'orderinquiryview.php') @@ -47,7 +47,7 @@ $tot_cancel_amount = 0; $goods = $goods_it_id = ""; $goods_count = -1; -// $s_on_uid 로 현재 장바구니 자료 쿼리 +// $s_uq_id 로 현재 장바구니 자료 쿼리 $sql = " select a.ct_id, a.it_opt1, a.it_opt2, @@ -64,7 +64,7 @@ $sql = " select a.ct_id, b.ca_id from {$g4['yc4_cart_table']} a, {$g4['yc4_item_table']} b - where a.on_uid = '$s_on_uid' + where a.uq_id = '$s_uq_id' and a.it_id = b.it_id order by a.ct_id "; $result = sql_query($sql); diff --git a/shop/cartupdate.php b/shop/cartupdate.php index f205417a0..ce9075d53 100644 --- a/shop/cartupdate.php +++ b/shop/cartupdate.php @@ -2,22 +2,32 @@ include_once('./_common.php'); if ($sw_direct) { - $tmp_on_uid = get_session('ss_on_direct'); - if(!$tmp_on_uid) { - $tmp_on_uid = get_uniqid(); - set_session('ss_on_direct', $tmp_on_uid); + $tmp_uq_id = get_session('ss_uq_direct'); + if(!$tmp_uq_id) { + $tmp_uq_id = get_uniqid(); + set_session('ss_uq_direct', $tmp_uq_id); } } else { - $tmp_on_uid = get_session('ss_on_uid'); - if(!$tmp_on_uid) { - $tmp_on_uid = get_uniqid(); - set_session('ss_on_uid', $tmp_on_uid); + $tmp_uq_id = get_session('ss_uq_id'); + if(!$tmp_uq_id) { + $tmp_uq_id = get_uniqid(); + set_session('ss_uq_id', $tmp_uq_id); } } +// uq_id 필드추가 +$sql = " select uq_id from {$g4['yc4_cart_table']} limit 1 "; +$result = sql_query($sql, false); +if(!$result) { + sql_query(" ALTER TABLE `{$g4['yc4_cart_table']}` ADD `uq_id` BIGINT(20) unsigned NOT NULL AFTER `ct_id` ", false); + sql_query(" ALTER TABLE `{$g4['yc4_order_table']}` ADD `uq_id` BIGINT(20) unsigned NOT NULL AFTER `od_id` ", false); + sql_query(" ALTER TABLE `{$g4['yc4_cart_table']}` ADD INDEX uq_id (uq_id) ", false); + sql_query(" ALTER TABLE `{$g4['yc4_order_table']}` ADD UNIQUE uq_id (uq_id) ", false); +} + // 브라우저에서 쿠키를 허용하지 않은 경우라고 볼 수 있음. -if (!$tmp_on_uid) +if (!$tmp_uq_id) { alert('더 이상 작업을 진행할 수 없습니다.\\n\\n브라우저의 쿠키 허용을 사용하지 않음으로 설정한것 같습니다.\\n\\n브라우저의 인터넷 옵션에서 쿠키 허용을 사용으로 설정해 주십시오.\\n\\n그래도 진행이 되지 않는다면 쇼핑몰 운영자에게 문의 바랍니다.'); } @@ -34,13 +44,13 @@ if ($w == "d") // 삭제이면 { $sql = " delete from {$g4['yc4_cart_table']} where ct_id = '$ct_id' - and on_uid = '$tmp_on_uid' "; + and uq_id = '$tmp_uq_id' "; sql_query($sql); } else if ($w == "alldelete") // 모두 삭제이면 { $sql = " delete from {$g4['yc4_cart_table']} - where on_uid = '$tmp_on_uid' "; + where uq_id = '$tmp_uq_id' "; sql_query($sql); } else if ($w == "allupdate") // 수량 변경이면 : 모두 수정이면 @@ -67,7 +77,7 @@ else if ($w == "allupdate") // 수량 변경이면 : 모두 수정이면 $sql = " update {$g4['yc4_cart_table']} set ct_qty = '{$_POST['ct_qty'][$i]}' where ct_id = '{$_POST['ct_id'][$i]}' - and on_uid = '$tmp_on_uid' "; + and uq_id = '$tmp_uq_id' "; sql_query($sql); } } @@ -110,7 +120,7 @@ else if ($w == "multi") // 온라인견적(등)에서 여러개의 상품이 한 //-------------------------------------------------------- // 이미 장바구니에 있는 같은 상품의 수량합계를 구한다. - $sql = " select SUM(ct_qty) as cnt from {$g4['yc4_cart_table']} where it_id = '{$_POST['it_id'][$i]}' and on_uid = '$tmp_on_uid' "; + $sql = " select SUM(ct_qty) as cnt from {$g4['yc4_cart_table']} where it_id = '{$_POST['it_id'][$i]}' and uq_id = '$tmp_uq_id' "; $row = sql_fetch($sql); $sum_qty = $row['cnt']; @@ -133,7 +143,7 @@ else if ($w == "multi") // 온라인견적(등)에서 여러개의 상품이 한 // 장바구니에 Insert $sql = " insert {$g4['yc4_cart_table']} - set on_uid = '$tmp_on_uid', + set uq_id = '$tmp_uq_id', it_id = '{$_POST['it_id'][$i]}', ct_status = '쇼핑', ct_amount = '{$_POST['it_amount'][$i]}', @@ -213,7 +223,7 @@ else // 장바구니에 담기 // 이미 장바구니에 있는 같은 상품의 수량합계를 구한다. $sql = " select SUM(ct_qty) as cnt from {$g4['yc4_cart_table']} where it_id = '{$_POST['it_id']}' - and on_uid = '$tmp_on_uid' "; + and uq_id = '$tmp_uq_id' "; $row = sql_fetch($sql); $sum_qty = $row['cnt']; @@ -226,7 +236,7 @@ else // 장바구니에 담기 //-------------------------------------------------------- // 바로구매에 있던 장바구니 자료를 지운다. - $result = sql_query(" delete from {$g4['yc4_cart_table']} where on_uid = '$tmp_on_uid' and ct_direct = 1 ", false); + $result = sql_query(" delete from {$g4['yc4_cart_table']} where uq_id = '$tmp_uq_id' and ct_direct = 1 ", false); if (!$result) { // 삭제중 에러가 발생했다면 필드가 없다는 것이므로 바로구매 필드를 생성한다. sql_query(" ALTER TABLE `{$g4['yc4_cart_table']}` ADD `ct_direct` TINYINT NOT NULL "); @@ -237,7 +247,7 @@ else // 장바구니에 담기 // 장바구니에 Insert $sql = " insert {$g4['yc4_cart_table']} - set on_uid = '$tmp_on_uid', + set uq_id = '$tmp_uq_id', it_id = '{$_POST['it_id']}', it_opt1 = '{$_POST['it_opt1']}', it_opt2 = '{$_POST['it_opt2']}', diff --git a/shop/orderconfirm.php b/shop/orderconfirm.php index 26976cf04..8650e0460 100644 --- a/shop/orderconfirm.php +++ b/shop/orderconfirm.php @@ -2,13 +2,13 @@ include_once('./_common.php'); // 장바구니가 비어있는가? -$tmp_on_uid = get_session('ss_temp_on_uid'); -if (get_cart_count($tmp_on_uid) == 0)// 장바구니에 담기 +$tmp_uq_id = get_session('ss_temp_uq_id'); +if (get_cart_count($tmp_uq_id) == 0)// 장바구니에 담기 alert("장바구니가 비어 있습니다.\\n\\n이미 주문하셨거나 장바구니에 담긴 상품이 없는 경우입니다.", "./cart.php"); -set_session("ss_on_uid_inquiry", $tmp_on_uid); +set_session("ss_uq_id_inquiry", $tmp_uq_id); -$sql = " select * from {$g4['yc4_order_table']} where on_uid = '$tmp_on_uid' "; +$sql = " select * from {$g4['yc4_order_table']} where uq_id = '$tmp_uq_id' "; $od = sql_fetch($sql); //print_r2($od); @@ -21,7 +21,7 @@ include_once('./_head.php'); $sql = " select a.it_id, b.it_name from {$g4['yc4_cart_table']} a, {$g4['yc4_item_table']} b where a.it_id = b.it_id - and a.on_uid = '$tmp_on_uid' + and a.uq_id = '$tmp_uq_id' order by ct_id limit 1 "; $row = sql_fetch($sql); @@ -31,7 +31,7 @@ $row = sql_fetch($sql); @@ -186,7 +186,7 @@ if (file_exists("./settle_{$default['de_card_pg']}.inc.php")) } else if ($settle_case == '무통장') { - echo "

"; + echo "

"; } else { @@ -199,7 +199,7 @@ if (file_exists("./settle_{$default['de_card_pg']}.inc.php")) include "./settle_{$default['de_card_pg']}.inc.php"; //echo "

"; - echo "

  · 결제가 제대로 되지 않은 경우 [주문상세조회 페이지] 에서 다시 결제하실 수 있습니다.

"; + echo "

  · 결제가 제대로 되지 않은 경우 [주문상세조회 페이지] 에서 다시 결제하실 수 있습니다.

"; } } else @@ -207,11 +207,11 @@ else if ($od['od_temp_card']) { include "./ordercard{$default['de_card_pg']}.inc.php"; echo "

"; - echo "

  · 결제가 제대로 되지 않은 경우 주문상세조회 페이지에서 다시 결제하실 수 있습니다.

"; + echo "

  · 결제가 제대로 되지 않은 경우 주문상세조회 페이지에서 다시 결제하실 수 있습니다.

"; } else if ($od['od_temp_bank'] && $od['od_bank_account'] == "계좌이체") { include "./orderiche{$default['de_card_pg']}.inc.php"; echo "

"; - echo "

  · 결제가 제대로 되지 않은 경우 [주문상세조회 페이지] 에서 다시 결제하실 수 있습니다.

"; + echo "

  · 결제가 제대로 되지 않은 경우 [주문상세조회 페이지] 에서 다시 결제하실 수 있습니다.

"; } else { echo "

"; } diff --git a/shop/orderform.php b/shop/orderform.php index c24b42b70..e5763a4eb 100644 --- a/shop/orderform.php +++ b/shop/orderform.php @@ -4,13 +4,13 @@ include_once('./_common.php'); set_session("ss_direct", $sw_direct); // 장바구니가 비어있는가? if ($sw_direct) { - $tmp_on_uid = get_session("ss_on_direct"); + $tmp_uq_id = get_session("ss_uq_direct"); } else { - $tmp_on_uid = get_session("ss_on_uid"); + $tmp_uq_id = get_session("ss_uq_id"); } -if (get_cart_count($tmp_on_uid) == 0) +if (get_cart_count($tmp_uq_id) == 0) alert("장바구니가 비어 있습니다.", "./cart.php"); // 포인트 결제 대기 필드 추가 @@ -25,7 +25,7 @@ include_once('./_head.php'); diff --git a/shop/orderformupdate.php b/shop/orderformupdate.php index 68e6e2819..824bc199e 100644 --- a/shop/orderformupdate.php +++ b/shop/orderformupdate.php @@ -11,11 +11,11 @@ $_POST = array_map("mysql_real_escape_string", $_POST); // 장바구니가 비어있는가? if (get_session("ss_direct")) - $tmp_on_uid = get_session("ss_on_direct"); + $tmp_uq_id = get_session("ss_uq_direct"); else - $tmp_on_uid = get_session("ss_on_uid"); + $tmp_uq_id = get_session("ss_uq_id"); -if (get_cart_count($tmp_on_uid) == 0)// 장바구니에 담기 +if (get_cart_count($tmp_uq_id) == 0)// 장바구니에 담기 alert("장바구니가 비어 있습니다.\\n\\n이미 주문하셨거나 장바구니에 담긴 상품이 없는 경우입니다.", "./cart.php"); $error = ""; @@ -26,7 +26,7 @@ $sql = " select a.it_id, b.it_name from {$g4['yc4_cart_table']} a, {$g4['yc4_item_table']} b - where a.on_uid = '$tmp_on_uid' + where a.uq_id = '$tmp_uq_id' and a.it_id = b.it_id "; $result = sql_query($sql); for ($i=0; $row=sql_fetch_array($result); $i++) @@ -50,7 +50,7 @@ $i_temp_point = (int)$_POST['od_temp_point']; // 주문금액이 상이함 -$sql = " select SUM(ct_amount * ct_qty) as od_amount from {$g4['yc4_cart_table']} where on_uid = '$tmp_on_uid' "; +$sql = " select SUM(ct_amount * ct_qty) as od_amount from {$g4['yc4_cart_table']} where uq_id = '$tmp_uq_id' "; $row = sql_fetch($sql); if ((int)$row['od_amount'] !== $i_amount) { die("Error."); @@ -150,7 +150,7 @@ $od_id = get_new_od_id(); // 주문서에 입력 $sql = " insert {$g4['yc4_order_table']} set od_id = '$od_id', - on_uid = '$tmp_on_uid', + uq_id = '$tmp_uq_id', mb_id = '{$member['mb_id']}', od_pwd = '$od_pwd', od_name = '$od_name', @@ -198,7 +198,7 @@ if (($od_receipt_card > 0 || $od_receipt_hp > 0) && $default['de_card_point'] == $sql = "update {$g4['yc4_cart_table']} set ct_status = '주문' $sql_card_point - where on_uid = '$tmp_on_uid' "; + where uq_id = '$tmp_uq_id' "; sql_query($sql); // 회원이면서 포인트를 사용했다면 포인트 테이블에 사용을 추가 @@ -240,13 +240,13 @@ if ($default['de_sms_use2'] && $receive_number) // order_confirm 에서 사용하기 위해 tmp에 넣고 -set_session('ss_temp_on_uid', $tmp_on_uid); +set_session('ss_temp_uq_id', $tmp_uq_id); -// ss_on_uid 기존자료 세션에서 제거 +// ss_uq_id 기존자료 세션에서 제거 if (get_session("ss_direct")) - set_session("ss_on_direct", ""); + set_session("ss_uq_direct", ""); else - set_session("ss_on_uid", ""); + set_session("ss_uq_id", ""); goto_url(G4_SHOP_URL.'/orderconfirm.php'); ?> diff --git a/shop/orderinquiry.php b/shop/orderinquiry.php index eb8fcfefa..c77fa4b35 100644 --- a/shop/orderinquiry.php +++ b/shop/orderinquiry.php @@ -43,11 +43,11 @@ $from_record = ($page - 1) * $rows; // 시작 열을 구함 // 비회원 주문확인의 경우 바로 주문서 상세조회로 이동 if (!$is_member) { - $sql = " select od_id, on_uid from {$g4['yc4_order_table']} where od_id = '$od_id' and od_pwd = '$od_pwd' "; + $sql = " select od_id, uq_id from {$g4['yc4_order_table']} where od_id = '$od_id' and od_pwd = '$od_pwd' "; $row = sql_fetch($sql); if ($row['od_id']) { - set_session("ss_on_uid_inquiry", $row['on_uid']); - goto_url(G4_ShOP_URL."/orderinquiryview.php?od_id={$row['od_id']}&on_uid={$row['on_uid']}"); + set_session("ss_uq_id_inquiry", $row['uq_id']); + goto_url(G4_ShOP_URL."/orderinquiryview.php?od_id={$row['od_id']}&uq_id={$row['uq_id']}"); } } diff --git a/shop/orderinquiry.sub.php b/shop/orderinquiry.sub.php index 3a4bd587d..9b7beade0 100644 --- a/shop/orderinquiry.sub.php +++ b/shop/orderinquiry.sub.php @@ -26,7 +26,7 @@ if (!defined("_ORDERINQUIRY_")) exit; // 개별 페이지 접근 불가 $sql = " select a.od_id, a.*, "._MISU_QUERY_." from {$g4['yc4_order_table']} a - left join {$g4['yc4_cart_table']} b on (b.on_uid=a.on_uid) + left join {$g4['yc4_cart_table']} b on (b.uq_id=a.uq_id) where mb_id = '{$member['mb_id']}' group by a.od_id order by a.od_id desc @@ -40,7 +40,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) echo "\n"; echo ""; echo "\n"; - echo "{$row['od_id']}\n"; + echo "{$row['od_id']}\n"; echo "".substr($row['od_time'],0,16)." (".get_yoil($row['od_time']).")\n"; echo "$row[itemcount]\n"; echo "".display_amount($row['orderamount'])."  \n"; diff --git a/shop/orderinquirycancel.php b/shop/orderinquirycancel.php index fea4ff1c1..c4c131808 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['yc4_order_table']} where od_id = '$od_id' and on_uid = '$on_uid' and mb_id = '{$member['mb_id']}' "); +$od = sql_fetch(" select * from {$g4['yc4_order_table']} where od_id = '$od_id' and uq_id = '$uq_id' and mb_id = '{$member['mb_id']}' "); if (!$od['od_id']) { alert("존재하는 주문이 아닙니다."); @@ -23,17 +23,17 @@ if (($od['od_temp_bank'] > 0 && $od['od_receipt_bank'] == 0) || } // 장바구니 자료 취소 -sql_query(" update {$g4['yc4_cart_table']} set ct_status = '취소' where on_uid = '$on_uid' "); +sql_query(" update {$g4['yc4_cart_table']} set ct_status = '취소' where uq_id = '$uq_id' "); // 주문 취소 $cancel_memo = addslashes($cancel_memo); -//sql_query(" update $g4[yc4_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 on_uid = '$on_uid' "); -sql_query(" update {$g4['yc4_order_table']} set od_send_cost = '0', od_temp_point = '0', od_receipt_point = '0', od_shop_memo = concat(od_shop_memo,\"\\n주문자 본인 직접 취소 - ".G4_TIME_YMDHIS." (취소이유 : {$cancel_memo})\") where on_uid = '$on_uid' "); +//sql_query(" update $g4[yc4_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['yc4_order_table']} set od_send_cost = '0', 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' "); // 주문취소 회원의 포인트를 되돌려 줌 if ($od['od_receipt_point'] > 0) { insert_point($member['mb_id'], $od['od_receipt_point'], "주문번호 $od_id 본인 취소"); } -goto_url("./orderinquiryview.php?od_id=$od_id&on_uid=$on_uid"); +goto_url("./orderinquiryview.php?od_id=$od_id&uq_id=$uq_id"); ?> \ No newline at end of file diff --git a/shop/orderinquiryview.php b/shop/orderinquiryview.php index a5740e0d6..903f5254d 100644 --- a/shop/orderinquiryview.php +++ b/shop/orderinquiryview.php @@ -6,21 +6,21 @@ $token = md5(uniqid(rand(), true)); set_session("ss_token", $token); if (!$is_member) { - if (get_session("ss_on_uid_inquiry") != $_GET['on_uid']) + if (get_session("ss_uq_id_inquiry") != $_GET['uq_id']) alert("직접 링크로는 주문서 조회가 불가합니다.\\n\\n주문조회 화면을 통하여 조회하시기 바랍니다."); } -$sql = "select * from {$g4['yc4_order_table']} where od_id = '$od_id' and on_uid = '$on_uid' "; +$sql = "select * from {$g4['yc4_order_table']} where od_id = '$od_id' and uq_id = '$uq_id' "; $od = sql_fetch($sql); if (!$od['od_id']) { - echo "$od_id $on_uid $MxIssueNO"; - alert("조회하실 주문서가 없습니다.", G4_URL); + echo "$od_id $uq_id $MxIssueNO"; + alert("조회하실 주문서가 없습니다.", G4_SHOP_URL); } // 결제방법 $settle_case = $od['od_settle_case']; -set_session('ss_temp_on_uid', $on_uid); +set_session('ss_temp_uq_id', $uq_id); $g4['title'] = "주문상세내역 : 주문번호 - $od_id"; include_once('./_head.php'); @@ -29,7 +29,7 @@ include_once('./_head.php');

@@ -297,7 +297,7 @@ if ($tot_cancel_amount == 0) { ($od['od_temp_card'] > 0 && $od['od_receipt_card'] == 0)) { echo "

"; echo ""; - echo ""; + echo ""; echo ""; echo "
"; echo ""; @@ -332,7 +332,7 @@ if ($default['de_taxsave_use']) { if ($od['od_cash']) echo "현금영수증 확인하기"; else - echo "현금영수증을 발급하시려면 클릭하십시오."; + echo "현금영수증을 발급하시려면 클릭하십시오."; echo ""; echo "
"; } diff --git a/shop/ordermail1.inc.php b/shop/ordermail1.inc.php index 8f30375d0..2e49c1254 100644 --- a/shop/ordermail1.inc.php +++ b/shop/ordermail1.inc.php @@ -24,7 +24,7 @@ $sql = " select b.it_sell_email, a.ct_amount, a.ct_point from {$g4['yc4_cart_table']} a, {$g4['yc4_item_table']} b - where a.on_uid = '$tmp_on_uid' + where a.uq_id = '$tmp_uq_id' and a.it_id = b.it_id "; $result = sql_query($sql); for ($i=0; $row=sql_fetch_array($result); $i++) diff --git a/shop/ordermail2.inc.php b/shop/ordermail2.inc.php index 8e7266a26..214c372a2 100644 --- a/shop/ordermail2.inc.php +++ b/shop/ordermail2.inc.php @@ -45,7 +45,7 @@ $sql = " select b.it_sell_email, a.it_opt6, a.ct_qty from {$g4['yc4_cart_table']} a, {$g4['yc4_item_table']} b - where a.on_uid = '$tmp_on_uid' + where a.uq_id = '$tmp_uq_id' and a.it_id = b.it_id and b.it_sell_email <> '' "; $result = sql_query($sql); diff --git a/shop/settle_kcp.inc.php b/shop/settle_kcp.inc.php index 0360b8cc0..a64c88765 100644 --- a/shop/settle_kcp.inc.php +++ b/shop/settle_kcp.inc.php @@ -100,7 +100,7 @@ function jsf__pay( form ) '> '> -'> +'>

- '> + '> /register.php'>회원가입 | - 장바구니() | + 장바구니() | 주문조회 | FAQ | 사용후기 | diff --git a/shop/taxsave_kcp.php b/shop/taxsave_kcp.php index 1052b8fda..c4236f071 100644 --- a/shop/taxsave_kcp.php +++ b/shop/taxsave_kcp.php @@ -4,11 +4,11 @@ include_once('./_common.php'); $g4['title'] = "현금영수증 발행"; include_once(G4_PATH.'/head.sub.php'); -$od = sql_fetch(" select * from {$g4['yc4_order_table']} where od_id = '$od_id' and on_uid = '$on_uid' "); +$od = sql_fetch(" select * from {$g4['yc4_order_table']} where od_id = '$od_id' and uq_id = '$uq_id' "); if (!$od) die("주문서가 존재하지 않습니다."); -$goods = get_goods($od['on_uid']); +$goods = get_goods($od['uq_id']); $goods_name = $goods['full_name']; //if ($goods[count] > 1) $goods_name .= ' 외 '.$goods[count].'건';