on_uid를 uq_id로 변경

This commit is contained in:
chicpro
2013-03-25 14:29:15 +09:00
parent 3b4423ea9b
commit 5cf4ed4980
18 changed files with 122 additions and 86 deletions

View File

@ -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 "</script>";
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;
}
//==============================================================================
// 쇼핑몰 함수 모음 끝
//==============================================================================

View File

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

View File

@ -9,7 +9,7 @@ include_once('./_head.php');
<?
$s_page = 'cart.php';
$s_on_uid = get_session('ss_on_uid');
$s_uq_id = get_session('ss_uq_id');
include G4_SHOP_PATH.'/cartsub.inc.php';
?>
<br><br>

View File

@ -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);

View File

@ -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']}',

View File

@ -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);
<?
$s_page = '';
$s_on_uid = $tmp_on_uid;
$s_uq_id = $tmp_uq_id;
$od_id = $od['od_id'];
include_once('./cartsub.inc.php');
?>
@ -186,7 +186,7 @@ if (file_exists("./settle_{$default['de_card_pg']}.inc.php"))
}
else if ($settle_case == '무통장')
{
echo "<p align=center><a href='./orderinquiryview.php?od_id={$od['od_id']}&on_uid={$od['on_uid']}'><img src='".G4_SHOP_URL."/img/btn_order_end.gif' border=0></a>";
echo "<p align=center><a href='./orderinquiryview.php?od_id={$od['od_id']}&uq_id={$od['uq_id']}'><img src='".G4_SHOP_URL."/img/btn_order_end.gif' border=0></a>";
}
else
{
@ -199,7 +199,7 @@ if (file_exists("./settle_{$default['de_card_pg']}.inc.php"))
include "./settle_{$default['de_card_pg']}.inc.php";
//echo "<p align=center><input type='image' src='$g4[shop_img_path]/btn_settle.gif' border=0 onclick='OpenWindow();'>";
echo "<p align=left>&nbsp; &middot; 결제가 제대로 되지 않은 경우 [<a href='./orderinquiryview.php?od_id={$od['od_id']}&on_uid={$od['on_uid']}'><u>주문상세조회 페이지</u></a>] 에서 다시 결제하실 수 있습니다.</p>";
echo "<p align=left>&nbsp; &middot; 결제가 제대로 되지 않은 경우 [<a href='./orderinquiryview.php?od_id={$od['od_id']}&uq_id={$od['uq_id']}'><u>주문상세조회 페이지</u></a>] 에서 다시 결제하실 수 있습니다.</p>";
}
}
else
@ -207,11 +207,11 @@ else
if ($od['od_temp_card']) {
include "./ordercard{$default['de_card_pg']}.inc.php";
echo "<p align=center><input type='image' src='".G4_SHOP_URL."/img/btn_card.gif' border=0 onclick='OpenWindow();'></p>";
echo "<p align=left>&nbsp; &middot; 결제가 제대로 되지 않은 경우 <a href='./orderinquiryview.php?od_id={$od['od_id']}&on_uid={$od['on_uid']}'><u>주문상세조회 페이지</u></a>에서 다시 결제하실 수 있습니다.</p>";
echo "<p align=left>&nbsp; &middot; 결제가 제대로 되지 않은 경우 <a href='./orderinquiryview.php?od_id={$od['od_id']}&uq_id={$od['uq_id']}'><u>주문상세조회 페이지</u></a>에서 다시 결제하실 수 있습니다.</p>";
} else if ($od['od_temp_bank'] && $od['od_bank_account'] == "계좌이체") {
include "./orderiche{$default['de_card_pg']}.inc.php";
echo "<p align=center><input type='image' src='".G4_SHOP_URL."/img/btn_iche.gif' border=0 onclick='OpenWindow();'></p>";
echo "<p align=left>&nbsp; &middot; 결제가 제대로 되지 않은 경우 [<a href='./orderinquiryview.php?od_id={$od['od_id']}&on_uid={$od['on_uid']}'><u>주문상세조회 페이지</u></a>] 에서 다시 결제하실 수 있습니다.</p>";
echo "<p align=left>&nbsp; &middot; 결제가 제대로 되지 않은 경우 [<a href='./orderinquiryview.php?od_id={$od['od_id']}&uq_id={$od['uq_id']}'><u>주문상세조회 페이지</u></a>] 에서 다시 결제하실 수 있습니다.</p>";
} else {
echo "<p align=center><a href='".G4_SHOP_URL."'><img src='".G4_SHOP_URL."/img/btn_order_end.gif' border=0></a>";
}

View File

@ -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');
<?
$s_page = 'orderform.php';
$s_on_uid = $tmp_on_uid;
$s_uq_id = $tmp_uq_id;
include_once('./cartsub.inc.php');
?>

View File

@ -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');
?>

View File

@ -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']}");
}
}

View File

@ -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 "<tr height=28>\n";
echo "<td align=center>";
echo "<input type=hidden name='ct_id[$i]' value='{$row['ct_id']}'>\n";
echo "<a href='./orderinquiryview.php?od_id={$row['od_id']}&on_uid={$row['on_uid']}'><U>{$row['od_id']}</U></a></td>\n";
echo "<a href='./orderinquiryview.php?od_id={$row['od_id']}&uq_id={$row['uq_id']}'><U>{$row['od_id']}</U></a></td>\n";
echo "<td align=center>".substr($row['od_time'],0,16)." (".get_yoil($row['od_time']).")</td>\n";
echo "<td align=center>$row[itemcount]</td>\n";
echo "<td align=right>".display_amount($row['orderamount'])."&nbsp;&nbsp;</td>\n";

View File

@ -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");
?>

View File

@ -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');
<img src="<?=G4_SHOP_URL?>/img/top_orderinquiryview.gif" border=0><p>
<?
$s_on_uid = $od['on_uid'];
$s_uq_id = $od['uq_id'];
$s_page = 'orderinquiryview.php';
include './cartsub.inc.php';
?>
@ -297,7 +297,7 @@ if ($tot_cancel_amount == 0) {
($od['od_temp_card'] > 0 && $od['od_receipt_card'] == 0)) {
echo "<br><form method='post' action='./orderinquirycancel.php' style='margin:0;'>";
echo "<input type=hidden name=od_id value='{$od['od_id']}'>";
echo "<input type=hidden name=on_uid value='{$od['on_uid']}'>";
echo "<input type=hidden name=uq_id value='{$od['uq_id']}'>";
echo "<input type=hidden name=token value='$token'>";
echo "<br><table cellpadding=4 cellspacing=0 width=100%>";
echo "<colgroup width=120><colgroup width=''>";
@ -332,7 +332,7 @@ if ($default['de_taxsave_use']) {
if ($od['od_cash'])
echo "<a href=\"javascript:;\" onclick=\"window.open('https://admin.kcp.co.kr/Modules/Service/Cash/Cash_Bill_Common_View.jsp?cash_no={$od['od_cash_no']}', 'taxsave_receipt', 'width=360,height=647,scrollbars=0,menus=0');\">현금영수증 확인하기</a>";
else
echo "<a href=\"javascript:;\" onclick=\"window.open('taxsave_kcp.php?od_id=$od_id&on_uid={$od['on_uid']}', 'taxsave', 'width=550,height=400,scrollbars=1,menus=0');\">현금영수증을 발급하시려면 클릭하십시오.</a>";
echo "<a href=\"javascript:;\" onclick=\"window.open('taxsave_kcp.php?od_id=$od_id&uq_id={$od['uq_id']}', 'taxsave', 'width=550,height=400,scrollbars=1,menus=0');\">현금영수증을 발급하시려면 클릭하십시오.</a>";
echo "</td></tr>";
echo "</table>";
}

View File

@ -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++)

View File

@ -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);

View File

@ -100,7 +100,7 @@ function jsf__pay( form )
<input type=hidden name='timestamp' value='<?=$timestamp?>'>
<input type=hidden name='d_url' value='<?=$g4['url']?>'>
<input type=hidden name='shop_dir' value='<?=$g4['shop']?>'>
<input type=hidden name='on_uid' value='<?=$_SESSION['ss_temp_on_uid']?>'>
<input type=hidden name='uq_id' value='<?=$_SESSION['ss_temp_uq_id']?>'>
<?
switch ($settle_case)
@ -165,7 +165,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);

View File

@ -4,32 +4,32 @@ include_once('./_common.php');
$html_title = '결제 결과';
include_once('./_head.php');
if (get_session('ss_temp_on_uid') != $on_uid)
if (get_session('ss_temp_uq_id') != $uq_id)
alert('정상적인 방법으로 확인하실 수 있습니다.', G4_URL);
$sql = " select * from {$g4['yc4_card_history_table']} where on_uid = '$on_uid' ";
$sql = " select * from {$g4['yc4_card_history_table']} where uq_id = '$uq_id' ";
$cd = sql_fetch($sql);
if ($cd['cd_id'] == "")
alert('값이 제대로 전달되지 않았습니다.');
/*
// 포인트 결제를 했다면 실제 포인트 결제한 것으로 수정합니다.
$sql = " select od_id, on_uid, od_receipt_point, od_temp_point from $g4[yc4_order_table] where on_uid = '$on_uid' ";
$sql = " select od_id, uq_id, od_receipt_point, od_temp_point from $g4[yc4_order_table] where uq_id = '$uq_id' ";
$row = sql_fetch($sql);
if ($row[od_receipt_point] == 0 && $row[od_temp_point] != 0)
{
sql_query(" update $g4[yc4_order_table] set od_receipt_point = od_temp_point where on_uid = '$on_uid' ");
insert_point($member[mb_id], (-1) * $row[od_temp_point], "주문번호:$row[od_id] 결제", "@order", $member[mb_id], "$row[od_id],$row[on_uid]");
sql_query(" update $g4[yc4_order_table] set od_receipt_point = od_temp_point where uq_id = '$uq_id' ");
insert_point($member[mb_id], (-1) * $row[od_temp_point], "주문번호:$row[od_id] 결제", "@order", $member[mb_id], "$row[od_id],$row[uq_id]");
}
*/
$sql = " select * from {$g4['yc4_order_table']} where on_uid = '$on_uid' ";
$sql = " select * from {$g4['yc4_order_table']} where uq_id = '$uq_id' ";
$od = sql_fetch($sql);
// 이곳에서 정상 결제되었다는 메일도 같이 발송합니다.
@extract($od);
$tmp_on_uid = $on_uid;
$tmp_uq_id = $uq_id;
if ($od['od_settle_case'] == '가상계좌')
$od_receipt_bank = $od_temp_bank;
@ -90,7 +90,7 @@ else
<? } ?>
<p align=center>
<a href='<?=G4_SHOP_URL."/orderinquiryview.php?od_id={$od['od_id']}&on_uid={$od['on_uid']}";?>'><img src='<?=G4_SHOP_URL?>/img/btn_confirm.gif' border=0></a>
<a href='<?=G4_SHOP_URL."/orderinquiryview.php?od_id={$od['od_id']}&uq_id={$od['uq_id']}";?>'><img src='<?=G4_SHOP_URL?>/img/btn_confirm.gif' border=0></a>
<!-- <a href="javascript:;" onclick="window.open('http://admin.kcp.co.kr/Modules/Sale/Card/ADSA_CARD_BILL_Receipt.jsp?c_trade_no=<?=$_POST[trace_no]?>', 'winreceipt', 'width=620,height=670')">영수증 출력</a> -->
<?

View File

@ -52,7 +52,7 @@ $table_width = 900;
<a href='<?=G4_BBS_URL?>/register.php'>회원가입</a> |
<? } ?>
<a href='<?=G4_SHOP_URL?>/cart.php'>장바구니<span class=small>(<?=get_cart_count(get_session('ss_on_uid'));?>)</span></a> |
<a href='<?=G4_SHOP_URL?>/cart.php'>장바구니<span class=small>(<?=get_cart_count(get_session('ss_uq_id'));?>)</span></a> |
<a href='<?=G4_SHOP_URL?>/orderinquiry.php'>주문조회</a> |
<a href='<?=G4_SHOP_URL?>/faq.php'>FAQ</a> |
<a href='<?=G4_SHOP_URL?>/itemuselist.php'>사용후기</a> |

View File

@ -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].'건';