Merge branch 'master' of github.com:gnuboard/yc4s

This commit is contained in:
rollydream
2013-03-27 13:21:32 +09:00
3 changed files with 29 additions and 38 deletions

View File

@ -68,6 +68,9 @@ $sql = " select a.ct_id,
and a.it_id = b.it_id
order by a.ct_id ";
$result = sql_query($sql);
$good_info = '';
for ($i=0; $row=mysql_fetch_array($result); $i++)
{
if (!$goods)
@ -79,6 +82,17 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
}
$goods_count++;
// 에스크로 상품정보
if($s_page == 'orderform.php' && $default['de_escrow_use']) {
if ($i>0)
$good_info .= chr(30);
$good_info .= "seq=".($i+1).chr(31);
$good_info .= "ordr_numb={$od_id}_".sprintf("%04d", $i).chr(31);
$good_info .= "good_name=".addslashes($row['it_name']).chr(31);
$good_info .= "good_cntx=".$row['ct_qty'].chr(31);
$good_info .= "good_amtx=".$row['ct_amount'].chr(31);
}
if ($i==0) { // 계속쇼핑
$continue_ca_id = $row['ca_id'];
}
@ -222,14 +236,14 @@ if ($i == 0) {
<?
if ($s_page == "cart.php") {
if ($i == 0) {
echo "<br><a href='".G4_URL."'><img src='".G4_SHOP_URL."/img/btn_shopping.gif' border='0'></a>";
echo "<br><a href='".G4_SHOP_URL."'><img src='".G4_SHOP_URL."/img/btn_shopping.gif' border='0'></a>";
} else {
echo "
<br><input type=hidden name=url value='./orderform.php'>
<a href=\"javascript:form_check('buy')\"><img src='".G4_SHOP_URL."/img/btn_buy.gif' border='0' alt='구매하기'></a>&nbsp;
<a href=\"javascript:form_check('allupdate')\"><img src='".G4_SHOP_URL."/img/btn_cart_quan.gif' border='0' alt='장바구니 수량 변경'></a>&nbsp;
<a href=\"javascript:form_check('alldelete');\"><img src='".G4_SHOP_URL."/img/btn_cart_out.gif' border='0' alt='장바구니 비우기'></a>&nbsp;
<a href='./list.php?ca_id=$continue_ca_id'><img src='".G4_SHOP_URL."/img/btn_shopping.gif' border='0' alt='계속쇼핑하기'></a>";
<a href='".G4_SHOP_URL."/list.php?ca_id=$continue_ca_id'><img src='".G4_SHOP_URL."/img/btn_shopping.gif' border='0' alt='계속쇼핑하기'></a>";
}
}
?>

View File

@ -1,12 +1,12 @@
<?
/* ============================================================================== */
/* = PAGE : <EFBFBD><EFBFBD><EFBFBD>̺<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> PAGE = */
/* = PAGE : 라이브버리 PAGE = */
/* = -------------------------------------------------------------------------- = */
/* = Copyright (c) 2010.02 KCP Inc. All Rights Reserverd. = */
/* ============================================================================== */
/* ============================================================================== */
/* = <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> CLASS = */
/* = 지불 연동 CLASS = */
/* ============================================================================== */
class C_PP_CLI
{
@ -20,14 +20,14 @@
var $m_encx_info;
/* -------------------------------------------------------------------- */
/* - ó<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> - */
/* - 처리 결과 값 - */
/* -------------------------------------------------------------------- */
var $m_res_data;
var $m_res_cd;
var $m_res_msg;
/* -------------------------------------------------------------------- */
/* - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - */
/* - 생성자 - */
/* -------------------------------------------------------------------- */
function C_PP_CLI()
{
@ -79,7 +79,7 @@
}
/* -------------------------------------------------------------------- */
/* - FUNC : ENC DATA <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Լ<EFBFBD> - */
/* - FUNC : ENC DATA 정보 설정 함수 - */
/* -------------------------------------------------------------------- */
function mf_set_payx_common_data( $name, $val )
{
@ -136,7 +136,7 @@
}
/* -------------------------------------------------------------------- */
/* - FUNC : <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3> <20>Լ<EFBFBD> - */
/* - FUNC : 지불 처리 함수 - */
/* -------------------------------------------------------------------- */
function mf_do_tx( $trace_no, $home_dir, $site_cd,
$site_key, $tx_cd, $pub_key_str,
@ -187,7 +187,7 @@
"opt=" . $opt . "" );
if ( $res_data == "" )
{
$res_data = "res_cd=9502" . chr( 31 ) . "res_msg=<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ȣ<><C8A3> <20><><EFBFBD><EFBFBD>";
$res_data = "res_cd=9502" . chr( 31 ) . "res_msg=연동 모듈 호출 오류";
}
}
@ -198,7 +198,7 @@
}
/* -------------------------------------------------------------------- */
/* - FUNC : ó<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20>Լ<EFBFBD> - */
/* - FUNC : 처리 결과 값을 리턴하는 함수 - */
/* -------------------------------------------------------------------- */
function mf_get_res_data( $name )
{

View File

@ -19,6 +19,10 @@ if (get_cart_count($tmp_uq_id) == 0)
$g4['title'] = '주문서 작성';
include_once('./_head.php');
// 새로운 주문번호 생성
$od_id = get_uniqid();
set_session('ss_order_uniqid', $od_id);
?>
<img src="<?=G4_SHOP_URL?>/img/top_orderform.gif" border="0"><p>
@ -28,37 +32,10 @@ $s_page = 'orderform.php';
$s_uq_id = $tmp_uq_id;
include_once('./cartsub.inc.php');
// 새로운 주문번호 생성
$od_id = get_uniqid();
set_session('ss_order_uniqid', $od_id);
if (file_exists("./settle_{$default['de_card_pg']}.inc.php")) {
include "./settle_{$default['de_card_pg']}.inc.php";
}
$good_info = '';
// 상품수만큼 정보 필드 미리 만들어둠
for($k=0;$itemlist = sql_fetch_array($result); $k++) {
// 에스크로 상품정보
if ($k>0)
$good_info .= chr(30);
$good_info .= "seq=".($k+1).chr(31);
$good_info .= "ordr_numb={$od_uq_id}_".sprintf("%04d", $k).chr(31);
$good_info .= "good_name=".addslashes(preg_replace("/\'|\"|\||\,|\&|\;/", "", $itemlist[$k]['it_name'])).chr(31);
$good_info .= "good_cntx=".$itemlist[$k]['qty'].chr(31);
$good_info .= "good_amtx=".$itemlist[$k]['amount'].chr(31);
// 상품명
if($k == 0) {
$goods = preg_replace("/\'|\"|\||\,|\&|\;/", "", $itemlist[$k]['it_name']);
}
}
if($goods_count > 1) {
$goods .= "외 ".($goods_count - 1);
}
$good_mny = (int)$tot_sell_amount + (int)$send_cost;
$order_action_url = G4_HTTPS_SHOP_URL.'/orderformupdate.php';
@ -251,7 +228,7 @@ $order_action_url = G4_HTTPS_SHOP_URL.'/orderformupdate.php';
<input type='hidden' name='deli_term' value='03'>
<!-- 장바구니 상품 개수 : 장바구니에 담겨있는 상품의 개수를 입력 -->
<input type='hidden' name='bask_cntx' value="<? echo (int)$goods_count; ?>" />
<input type='hidden' name='bask_cntx' value="<? echo (int)$goods_count + 1; ?>" />
<!-- 장바구니 상품 상세 정보 (자바 스크립트 샘플(create_goodInfo()) 참고) -->
<input type='hidden' name='good_info' value="<? echo $good_info; ?>" />