From efad4e648d2bf37ae0b09dbb2dbfebea5f46650d Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 9 Sep 2013 14:17:04 +0900 Subject: [PATCH] =?UTF-8?q?#291=20=EC=A3=BC=EB=AC=B8=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?=EC=95=8C=EB=A6=BC=20=EB=A9=94=EC=9D=BC=20=EB=B0=8F=20=EC=95=88?= =?UTF-8?q?=EB=82=B4=20=EB=AC=B8=EA=B5=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common.lib.php | 9 +++++++++ mobile/shop/orderformupdate.php | 13 ++++++++++--- shop/ordererrormail.php | 28 ++++++++++++++++++++++++++++ shop/orderformupdate.php | 13 ++++++++++--- 4 files changed, 57 insertions(+), 6 deletions(-) create mode 100644 shop/ordererrormail.php diff --git a/lib/common.lib.php b/lib/common.lib.php index 2a49b4bef..0ead66758 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -2370,4 +2370,13 @@ function certify_count_check($mb_id, $type) if((int)$row['cnt'] >= (int)$config['cf_cert_limit']) alert_close('오늘 '.$cert.' 본인확인을 '.$row['cnt'].'회 이용하셔서 더 이상 이용할 수 없습니다.'); } + +// die 함수를 utf-8 환경에서 사용할 때 한글깨짐방지 +function die_utf8($msg) +{ + if(!trim($msg)) + return; + + die(''.$msg.''); +} ?> \ No newline at end of file diff --git a/mobile/shop/orderformupdate.php b/mobile/shop/orderformupdate.php index cf95362db..df5feb013 100644 --- a/mobile/shop/orderformupdate.php +++ b/mobile/shop/orderformupdate.php @@ -455,7 +455,11 @@ if(!$result) { include G4_MSHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; // 결제취소처리 } - die("

$sql

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

error file : {$_SERVER['PHP_SELF']}"); + // 관리자에게 오류 알림 메일발송 + $error = 'order'; + include G4_SHOP_PATH.'/ordererrormail.php'; + + die_utf8('

고객님의 주문 정보를 처리하는 중 오류가 발생해서 주문이 완료되지 않았습니다.

KCP를 이용한 전자결제(신용카드, 계좌이체, 가상계좌 등)은 자동 취소되었습니다.'); } // 장바구니 쇼핑에서 주문으로 @@ -479,11 +483,14 @@ if(!$result) { include G4_MSHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; // 결제취소처리 } - echo "

$sql

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

error file : {$_SERVER['PHP_SELF']}"; + // 관리자에게 오류 알림 메일발송 + $error = 'status'; + include G4_SHOP_PATH.'/ordererrormail.php'; // 주문삭제 sql_query(" delete from {$g4['shop_order_table']} where od_id = '$od_id' "); - exit; + + die_utf8('

고객님의 주문 정보를 처리하는 중 오류가 발생해서 주문이 완료되지 않았습니다.

KCP를 이용한 전자결제(신용카드, 계좌이체, 가상계좌 등)은 자동 취소되었습니다.'); } // 회원이면서 포인트를 사용했다면 포인트 테이블에 사용을 추가 diff --git a/shop/ordererrormail.php b/shop/ordererrormail.php new file mode 100644 index 000000000..fb5db1da4 --- /dev/null +++ b/shop/ordererrormail.php @@ -0,0 +1,28 @@ +주문정보를 DB에 입력하는 중 오류가 발생했습니다.

'; +} else if($error == 'status') { + $content = '

주문 상품의 상태를 변경하는 중 DB 오류가 발생했습니다.

'; +} + +if($tno) { + $content .= '

KCP의 '.$od_settle_case.'는 자동 취소되었습니다.

'; + $content .= '

취소 내역은 KCP 상점관리자에서 확인할 수 있습니다.

'; +} + +$content .= '

오류내용

'; +$content .= '

'.$sql.'

'.mysql_errno().' : '.mysql_error().'

error file : '.$_SERVER['PHP_SELF'].'

'; + +// 메일발송 +mailer($od_name, $od_email, $admin['mb_email'], $subject, $content, 1); + +unset($error); +?> \ No newline at end of file diff --git a/shop/orderformupdate.php b/shop/orderformupdate.php index f73cb30f3..9a2f0e0a6 100644 --- a/shop/orderformupdate.php +++ b/shop/orderformupdate.php @@ -445,7 +445,11 @@ if(!$result) { include G4_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; // 결제취소처리 } - die("

$sql

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

error file : {$_SERVER['PHP_SELF']}"); + // 관리자에게 오류 알림 메일발송 + $error = 'order'; + include G4_SHOP_PATH.'/ordererrormail.php'; + + die_utf8('

고객님의 주문 정보를 처리하는 중 오류가 발생해서 주문이 완료되지 않았습니다.

KCP를 이용한 전자결제(신용카드, 계좌이체, 가상계좌 등)은 자동 취소되었습니다.'); } // 장바구니 쇼핑에서 주문으로 @@ -469,11 +473,14 @@ if(!$result) { include G4_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; // 결제취소처리 } - echo "

$sql

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

error file : {$_SERVER['PHP_SELF']}"; + // 관리자에게 오류 알림 메일발송 + $error = 'status'; + include G4_SHOP_PATH.'/ordererrormail.php'; // 주문삭제 sql_query(" delete from {$g4['shop_order_table']} where od_id = '$od_id' "); - exit; + + die_utf8('

고객님의 주문 정보를 처리하는 중 오류가 발생해서 주문이 완료되지 않았습니다.

KCP를 이용한 전자결제(신용카드, 계좌이체, 가상계좌 등)은 자동 취소되었습니다.'); } // 회원이면서 포인트를 사용했다면 테이블에 사용을 추가