diff --git a/.gitignore b/.gitignore index bbcfde1ac..309e1c111 100644 --- a/.gitignore +++ b/.gitignore @@ -6,8 +6,12 @@ sirgle/ test.php *.key *.sh +log +g5_tree cheditor*/ ckeditor*/ log/ g5_tree/ naver*.html +initests01/ +SIRsoft000/ diff --git a/_common.php b/_common.php index 2ed94c3fb..9969c3802 100644 --- a/_common.php +++ b/_common.php @@ -1,3 +1,11 @@ 쇼핑몰 설치 후 이용해 주십시오.

'); + + define('_SHOP_', true); +} ?> \ No newline at end of file diff --git a/adm/admin.head.php b/adm/admin.head.php index 90b07d8d7..e5132a374 100644 --- a/adm/admin.head.php +++ b/adm/admin.head.php @@ -74,10 +74,10 @@ function imageview(id, w, h) '; + +$frm_submit = '
+ + 쇼핑몰 +
'; + +// 무이자 할부 사용설정 필드 추가 +if(!isset($default['de_card_noint_use'])) { + sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}` + ADD `de_card_noint_use` tinyint(4) NOT NULL DEFAULT '0' AFTER `de_card_use` ", true); +} + +// 모바일 관련상품 설정 필드추가 +if(!isset($default['de_mobile_rel_list_use'])) { + sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}` + ADD `de_mobile_rel_list_use` tinyint(4) NOT NULL DEFAULT '0' AFTER `de_rel_img_height`, + ADD `de_mobile_rel_list_skin` varchar(255) NOT NULL DEFAULT '' AFTER `de_mobile_rel_list_use`, + ADD `de_mobile_rel_img_width` int(11) NOT NULL DEFAULT '0' AFTER `de_mobile_rel_list_skin`, + ADD `de_mobile_rel_img_height` int(11) NOT NULL DEFAULT ' 0' AFTER `de_mobile_rel_img_width`", true); +} + +// 신규회원 쿠폰 설정 필드 추가 +if(!isset($default['de_member_reg_coupon_use'])) { + sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}` + ADD `de_member_reg_coupon_use` tinyint(4) NOT NULL DEFAULT '0' AFTER `de_tax_flag_use`, + ADD `de_member_reg_coupon_term` int(11) NOT NULL DEFAULT '0' AFTER `de_member_reg_coupon_use`, + ADD `de_member_reg_coupon_price` int(11) NOT NULL DEFAULT '0' AFTER `de_member_reg_coupon_term` ", true); +} + +// 신규회원 쿠폰 주문 최소금액 필드추가 +if(!isset($default['de_member_reg_coupon_minimum'])) { + sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}` + ADD `de_member_reg_coupon_minimum` int(11) NOT NULL DEFAULT '0' AFTER `de_member_reg_coupon_price` ", true); +} + +// lg 결제관련 필드 추가 +if(!isset($default['de_pg_service'])) { + sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}` + ADD `de_pg_service` varchar(255) NOT NULL DEFAULT '' AFTER `de_sms_hp` ", true); +} + + +// inicis 필드 추가 +if(!isset($default['de_inicis_mid'])) { + sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}` + ADD `de_inicis_mid` varchar(255) NOT NULL DEFAULT '' AFTER `de_kcp_site_key`, + ADD `de_inicis_admin_key` varchar(255) NOT NULL DEFAULT '' AFTER `de_inicis_mid` ", true); +} + + +// 모바일 초기화면 이미지 줄 수 필드 추가 +if(!isset($default['de_mobile_type1_list_row'])) { + sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}` + ADD `de_mobile_type1_list_row` int(11) NOT NULL DEFAULT '0' AFTER `de_mobile_type1_list_mod`, + ADD `de_mobile_type2_list_row` int(11) NOT NULL DEFAULT '0' AFTER `de_mobile_type2_list_mod`, + ADD `de_mobile_type3_list_row` int(11) NOT NULL DEFAULT '0' AFTER `de_mobile_type3_list_mod`, + ADD `de_mobile_type4_list_row` int(11) NOT NULL DEFAULT '0' AFTER `de_mobile_type4_list_mod`, + ADD `de_mobile_type5_list_row` int(11) NOT NULL DEFAULT '0' AFTER `de_mobile_type5_list_mod` ", true); +} + +// 모바일 관련상품 이미지 줄 수 필드 추가 +if(!isset($default['de_mobile_rel_list_mod'])) { + sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}` + ADD `de_mobile_rel_list_mod` int(11) NOT NULL DEFAULT '0' AFTER `de_mobile_rel_list_skin` ", true); +} + +// 모바일 검색상품 이미지 줄 수 필드 추가 +if(!isset($default['de_mobile_search_list_row'])) { + sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}` + ADD `de_mobile_search_list_row` int(11) NOT NULL DEFAULT '0' AFTER `de_mobile_search_list_mod` ", true); +} + +// PG 간펼결제 사용여부 필드 추가 +if(!isset($default['de_easy_pay_use'])) { + sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}` + ADD `de_easy_pay_use` tinyint(4) NOT NULL DEFAULT '0' AFTER `de_iche_use` ", true); +} +?> + +
+
+

사업자정보

+ +
+

사업자정보는 tail.php 와 content.php 에서 표시합니다.

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
사업자정보 입력
+ + + +
+ +
+ + + +
+ + + +
+ + + +
+ + + +
+
+
+ + + +
+

스킨설정

+ +
+

상품 분류리스트, 상품상세보기 등 에서 사용할 스킨을 설정합니다.

+
+ +
+ + + + + + + + + + + + + + + + +
스킨설정
+ +
+ +
+
+
+ +$#i', '', $frm_submit); ?> + +
+

쇼핑몰 초기화면

+ +
+

+ 상품관리에서 선택한 상품의 타입대로 쇼핑몰 초기화면에 출력합니다. (상품 타입 히트/추천/최신/인기/할인)
+ 각 타입별로 선택된 상품이 없으면 쇼핑몰 초기화면에 출력하지 않습니다. +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
쇼핑몰 초기화면 설정
히트상품출력 + + > + + + + + + + + + + +
추천상품출력 + + > + + + + + + + + + + +
최신상품출력 + + > + + + + + + + + + + +
인기상품출력 + + > + + + + + + + + + + +
할인상품출력 + + > + + + + + + + + + + +
+
+
+ +$#i', '', $frm_submit); ?> + +
+

모바일 쇼핑몰 초기화면 설정

+ +
+

+ 상품관리에서 선택한 상품의 타입대로 쇼핑몰 초기화면에 출력합니다. (상품 타입 히트/추천/최신/인기/할인)
+ 각 타입별로 선택된 상품이 없으면 쇼핑몰 초기화면에 출력하지 않습니다. +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
모바일 쇼핑몰 초기화면 설정
히트상품출력 + + > + + + + + + + + + + +
추천상품출력 + > + + + + + + + + + + +
최신상품출력 + + > + + + + + + + + + + +
인기상품출력 + + > + + + + + + + + + + +
할인상품출력 + + > + + + + + + + + + + +
+
+
+ +$#i', '', $frm_submit); ?> + +
+

결제설정

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
결제설정 입력
+ + +
+ +
+ + +
+ + +
KCP 가상계좌 입금통보 URL + KCP 관리자 > 상점정보관리 > 정보변경 > 공통URL 정보 > 공통URL 변경후에 넣으셔야 상점에 자동으로 입금 통보됩니다."); ?> + /settle_kcp_common.php
KG이니시스 가상계좌 입금통보 URL + KG이니시스 관리자 > 거래조회 > 가상계좌 > 입금통보방식선택 > URL 수신 설정에 넣으셔야 상점에 자동으로 입금 통보됩니다."); ?> + /settle_inicis_common.php
+ + +
+ + +
+ 사용으로 설정하시면 PG사 가맹점 관리자 페이지에서 설정하신 무이자할부 설정이 적용됩니다.
사용안함으로 설정하시면 PG사 무이자 이벤트 카드를 제외한 모든 카드의 무이자 설정이 적용되지 않습니다.", 50); ?> + +
+ + +
+ 주문내역 > 보기에서 발급이 가능합니다.\n현금영수증 발급 취소는 PG사에서 지원하는 현금영수증 취소 기능을 사용하시기 바랍니다.", 50); ?> + +
+ 환경설정 > 기본환경설정과 동일한 설정입니다."); ?> + > 사용 +
+ + 점 +
+ + 점 +
+ + 점 +
+ + +
+ + 주문 완료 일 이후에 포인트를 지급 +
+ + +
+
+ KCP서비스신청하기 +
+ + SR 영대문자, 숫자 혼용 3자리 +
+ + +
+
+ LG유플러스 서비스신청하기 +
+ 기본환경설정 > 본인확인 설정의 LG유플러스 상점아이디와 동일합니다."); ?> + si_ 영문자, 숫자 혼용 +
+ 계약정보 -> 상점정보관리에서 확인하실 수 있습니다.\n예) 95160cce09854ef44d2edb2bfb05f9f3\n기본환경설정 > 본인확인 설정의 LG유플러스 MERT KEY와 동일합니다."); ?> + +
+
+ KG이니시스 서비스신청하기 +
+ + SIR 영문소문자(숫자포함 가능) +
+ + +
에스크로 사용 + + id="de_escrow_use1"> + + id="de_escrow_use2"> + +
신용카드 결제테스트 + + id="de_card_test1"> + + id="de_card_test2"> + + + + +
+ 일반결제 사용시 테스트 결제 +
+
신용카드
1000원 이상, 모든 카드가 테스트 되는 것은 아니므로 여러가지 카드로 결제해 보셔야 합니다.
(BC, 현대, 롯데, 삼성카드)
+
계좌이체
150원 이상, 계좌번호, 비밀번호는 가짜로 입력해도 되며, 주민등록번호는 공인인증서의 것과 일치해야 합니다.
+
가상계좌
1원 이상, 모든 은행이 테스트 되는 것은 아니며 "해당 은행 계좌 없음" 자주 발생함.
(광주은행, 하나은행)
+
휴대폰
1004원, 실결제가 되며 다음날 새벽에 일괄 취소됨
+
+ 에스크로 사용시 테스트 결제
+
+
신용카드
1000원 이상, 모든 카드가 테스트 되는 것은 아니므로 여러가지 카드로 결제해 보셔야 합니다.
(BC, 현대, 롯데, 삼성카드)
+
계좌이체
150원 이상, 계좌번호, 비밀번호는 가짜로 입력해도 되며, 주민등록번호는 공인인증서의 것과 일치해야 합니다.
+
가상계좌
1원 이상, 입금통보는 제대로 되지 않음.
+
휴대폰
테스트 지원되지 않음.
+
+
    +
  • 테스트결제의 상점관리자 로그인 정보는 KCP로 문의하시기 바랍니다. (기술지원 1544-8661)
  • +
  • 일반결제의 테스트 사이트코드는 T0000 이며, 에스크로 결제의 테스트 사이트코드는 T0007 입니다.
  • +
+
    +
  • 테스트결제의 상점관리자 로그인 정보는 LG유플러스 상점아이디 첫 글자에 t를 추가해서 로그인하시기 바랍니다. 예) tsi_lguplus
  • +
+
    +
  • 일반결제의 테스트 사이트 mid는 INIpayTest 이며, 에스크로 결제의 테스트 사이트 mid는 iniescrow0 입니다.
  • +
+
+
+ + > 사용 +
+ +
+
+ + + +
+

배송설정

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
배송설정 입력
+ + +
+ 금액별차등으로 설정한 경우, 주문총액이 배송비상한가 미만일 경우 배송비를 받습니다.\n무료배송으로 설정한 경우, 배송비상한가 및 배송비를 무시하며 착불의 경우도 무료배송으로 설정합니다.\n상품별로 배송비 설정을 한 경우 상품별 배송비 설정이 우선 적용됩니다.\n예를 들어 무료배송으로 설정했을 때 특정 상품에 배송비가 설정되어 있으면 주문시 배송비가 부과됩니다."); ?> + +
+ ; 로 구분합니다.\n\n예를 들어 20000원 미만일 경우 4000원, 30000원 미만일 경우 3000원 으로 사용할 경우에는 배송비상한가를 20000;30000 으로 입력하고 배송비를 4000;3000 으로 입력합니다."); ?> + 원 +
+ 원 +
+ + +
+ + 일 +
배송정보
교환/반품
+
+
+ + + +
+

기타 설정

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
기타 설정
관련상품출력 + + + + + + + + + + + > +
모바일 관련상품출력 + + + + + + + + + + + > +
검색상품출력 + + + + + + + + + + +
모바일 검색상품출력 + + + + + + + + + + +
이미지(소) + + + 픽셀 + / + + 픽셀 +
이미지(중) + + + 픽셀 + / + + 픽셀 +
상단로고이미지 + + + + + + + + + +
하단로고이미지 + + + + + + + + + +
모바일 상단로고이미지 + + + + + + + + + +
모바일 하단로고이미지 + + + + + + + + + +
+ + +
+ + +
+ + +
+ + > 사용 +
+ + 일 +
+ + > 사용 +
신규회원 쿠폰발행 + + + > + + 원 + + 원이상 + + 일 +
비회원에 대한
개인정보수집 내용
MYSQL USER
MYSQL DB
서버 IP
+
+
+ +$#i', '', $frm_submit); ?> + + + + + + + +
+

SMS 설정

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SMS 설정
+ 아이코드는 무료 문자메세지 발송 테스트 환경을 지원합니다.
기본환경설정 > SMS 설정과 동일합니다."); ?> + +
+ + +
+ + +
+ + +
요금제 + + '; + } else if ($userinfo['payment'] == 'C') { + echo '정액제'; + echo ''; + } else { + echo '가입해주세요.'; + echo ''; + } + ?> +
아이코드 SMS 신청
회원가입
+ + 아이코드 회원가입 +
충전 잔액 + 원. + 충전하기 +
건수별 금액 + 원. +
+
+ +
+

사전에 정의된 SMS프리셋

+
+
+
회원가입시
+
{이름} {회원아이디} {회사명}
+
주문서작성
+
{이름} {보낸분} {받는분} {주문번호} {주문금액} {회사명}
+
입금확인시
+
{이름} {입금액} {주문번호} {회사명}
+
상품배송시
+
{이름} {택배회사} {운송장번호} {주문번호} {회사명}
+
+

+
+ +
+ "회원가입시 고객님께 발송", "주문시 고객님께 발송", "주문시 관리자에게 발송", "입금확인시 고객님께 발송", "상품배송시 고객님께 발송"); + for ($i=1; $i<=5; $i++) { + ?> +
+

+ > + +
+ +
+ 0 / 80 바이트 +
+ + + +
+
+ +
+ + + +
+ + + +'.PHP_EOL; + echo 'alert("PHP openssl 확장모듈이 설치되어 있지 않습니다.\n모바일 쇼핑몰 결제 때 사용되오니 openssl 확장 모듈을 설치하여 주십시오.");'.PHP_EOL; + echo ''.PHP_EOL; + } + + if(!extension_loaded('soap') || !class_exists('SOAPClient')) { + echo ''.PHP_EOL; + } + + $is_linux = true; + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') + $is_linux = false; + + $exe = '/kcp/bin/'; + if($is_linux) { + if(PHP_INT_MAX == 2147483647) // 32-bit + $exe .= 'pp_cli'; + else + $exe .= 'pp_cli_x64'; + } else { + $exe .= 'pp_cli_exe.exe'; + } + + echo module_exec_check(G5_SHOP_PATH.$exe, 'pp_cli'); + } + + // LG의 경우 log 디렉토리 체크 + if($default['de_pg_service'] == 'lg') { + $log_path = G5_LGXPAY_PATH.'/lgdacom/log'; + + if(!is_dir($log_path)) { + echo ''.PHP_EOL; + } else { + if(!is_writable($log_path)) { + echo ''.PHP_EOL; + } + } + } + + // 이니시스의 경우 log 디렉토리 체크 + if($default['de_pg_service'] == 'inicis') { + if (!function_exists('xml_set_element_handler')) { + echo ''.PHP_EOL; + } + + if (!function_exists('openssl_get_publickey')) { + echo ''.PHP_EOL; + } + + if (!function_exists('socket_create')) { + echo ''.PHP_EOL; + } + + if (!function_exists('mcrypt_cbc')) { + echo ''.PHP_EOL; + } + + $log_path = G5_SHOP_PATH.'/inicis/log'; + + if(!is_dir($log_path)) { + echo ''.PHP_EOL; + } else { + if(!is_writable($log_path)) { + echo ''.PHP_EOL; + } + } + } +} + +include_once (G5_ADMIN_PATH.'/admin.tail.php'); +?> diff --git a/adm/shop_admin/configformupdate.php b/adm/shop_admin/configformupdate.php new file mode 100644 index 000000000..e49547b47 --- /dev/null +++ b/adm/shop_admin/configformupdate.php @@ -0,0 +1,201 @@ + 포인트 사용 +sql_query(" update {$g5['config_table']} set cf_use_point = '{$_POST['cf_use_point']}' "); + +// LG, 아이코드 설정 +$sql = " update {$g5['config_table']} + set cf_sms_use = '{$_POST['cf_sms_use']}', + cf_icode_id = '{$_POST['cf_icode_id']}', + cf_icode_pw = '{$_POST['cf_icode_pw']}', + cf_icode_server_ip = '{$_POST['cf_icode_server_ip']}', + cf_icode_server_port = '{$_POST['cf_icode_server_port']}', + cf_lg_mid = '{$_POST['cf_lg_mid']}', + cf_lg_mert_key = '{$_POST['cf_lg_mert_key']}' "; +sql_query($sql); + +goto_url("./configform.php"); +?> diff --git a/adm/shop_admin/couponform.php b/adm/shop_admin/couponform.php new file mode 100644 index 000000000..71e4848b8 --- /dev/null +++ b/adm/shop_admin/couponform.php @@ -0,0 +1,283 @@ + + +
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ + +
+ + + + +
+ + +
+ + +
+ + +
+ +
+ +
+ 원 +
+ 원 +
쿠폰발행알림 + + + + +
+
+ +
+ + 목록 +
+ +
+ + + + \ No newline at end of file diff --git a/adm/shop_admin/couponformupdate.php b/adm/shop_admin/couponformupdate.php new file mode 100644 index 000000000..de5daaf83 --- /dev/null +++ b/adm/shop_admin/couponformupdate.php @@ -0,0 +1,205 @@ + $_POST['cp_end']) + alert('사용 시작일은 종료일 이전으로 입력해 주십시오.'); + +if($_POST['cp_end'] < G5_TIME_YMD) + alert('종료일은 오늘('.G5_TIME_YMD.')이후로 입력해 주십시오.'); + +if(!$_POST['cp_price']) { + if($_POST['cp_type']) + alert('할인비율을 입력해 주십시오.'); + else + alert('할인금액을 입력해 주십시오.'); +} + +if($_POST['cp_type'] && ($_POST['cp_price'] < 1 || $_POST['cp_price'] > 99)) + alert('할인비율을은 1과 99사이 값으로 입력해 주십시오.'); + +if($_POST['cp_method'] == 0) { + $sql = " select count(*) as cnt from {$g5['g5_shop_item_table']} where it_id = '$cp_target' and it_nocoupon = '0' "; + $row = sql_fetch($sql); + if(!$row['cnt']) + alert('입력하신 상품코드는 존재하지 않는 코드이거나 쿠폰적용안함으로 설정된 상품입니다.'); +} else if($_POST['cp_method'] == 1) { + $sql = " select count(*) as cnt from {$g5['g5_shop_category_table']} where ca_id = '$cp_target' and ca_nocoupon = '0' "; + $row = sql_fetch($sql); + if(!$row['cnt']) + alert('입력하신 분류코드는 존재하지 않는 분류코드이거나 쿠폰적용안함으로 설정된 분류입니다.'); +} + +if($w == '') { + if($_POST['chk_all_mb']) { + $mb_id = '전체회원'; + } else { + $sql = " select mb_id from {$g5['member_table']} where mb_id = '{$_POST['mb_id']}' and mb_leave_date = '' and mb_intercept_date = '' "; + $row = sql_fetch($sql); + if(!$row['mb_id']) + alert('입력하신 회원아이디는 존재하지 않거나 탈퇴 또는 차단된 회원아이디입니다.'); + + $mb_id = $_POST['mb_id']; + } + + $j = 0; + do { + $cp_id = get_coupon_id(); + + $sql3 = " select count(*) as cnt from {$g5['g5_shop_coupon_table']} where cp_id = '$cp_id' "; + $row3 = sql_fetch($sql3); + + if(!$row3['cnt']) + break; + else { + if($j > 20) + die('Coupon ID Error'); + } + } while(1); + + $sql = " INSERT INTO {$g5['g5_shop_coupon_table']} + ( cp_id, cp_subject, cp_method, cp_target, mb_id, cp_start, cp_end, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum, cp_datetime ) + VALUES + ( '$cp_id', '$cp_subject', '$cp_method', '$cp_target', '$mb_id', '$cp_start', '$cp_end', '$cp_type', '$cp_price', '$cp_trunc', '$cp_minimum', '$cp_maximum', '".G5_TIME_YMDHIS."' ) "; + + sql_query($sql); +} else if($w == 'u') { + $sql = " select * from {$g5['g5_shop_coupon_table']} where cp_id = '$cp_id' "; + $cp = sql_fetch($sql); + + if(!$cp['cp_id']) + alert('쿠폰정보가 존해하지 않습니다.', './couponlist.php'); + + if($_POST['chk_all_mb']) { + $mb_id = '전체회원'; + } + + $sql = " update {$g5['g5_shop_coupon_table']} + set cp_subject = '$cp_subject', + cp_method = '$cp_method', + cp_target = '$cp_target', + mb_id = '$mb_id', + cp_start = '$cp_start', + cp_end = '$cp_end', + cp_type = '$cp_type', + cp_price = '$cp_price', + cp_trunc = '$cp_trunc', + cp_maximum = '$cp_maximum', + cp_minimum = '$cp_minimum' + where cp_id = '$cp_id' "; + sql_query($sql); +} + +// 쿠폰생성알림 발송 +if($w == '' && ($_POST['cp_sms_send'] || $_POST['cp_email_send'])) { + include_once(G5_LIB_PATH.'/mailer.lib.php'); + include_once(G5_LIB_PATH.'/icode.sms.lib.php'); + + $sms_count = 0; + if($config['cf_sms_use'] == 'icode' && $_POST['cp_sms_send']) + { + $SMS = new SMS; + $SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']); + } + + $arr_send_list = array(); + + if($_POST['chk_all_mb']) { + $sql = " select mb_id, mb_name, mb_hp, mb_email, mb_mailling, mb_sms + from {$g5['member_table']} + where mb_leave_date = '' + and mb_intercept_date = '' + and ( mb_mailling = '1' or mb_sms = '1' ) + and mb_id <> '{$config['cf_admin']}' "; + } else { + $sql = " select mb_id, mb_name, mb_hp, mb_email, mb_mailling, mb_sms + from {$g5['member_table']} + where mb_id = '$mb_id' "; + } + + $result = sql_query($sql); + + for($i=0; $row = sql_fetch_array($result); $i++) { + $arr_send_list[] = $row; + } + + $count = count($arr_send_list); + + for($i=0; $i<$count; $i++) { + if(!$arr_send_list[$i]['mb_id']) + continue; + + // SMS + if($config['cf_sms_use'] == 'icode' && $_POST['cp_sms_send'] && $arr_send_list[$i]['mb_hp'] && $arr_send_list[$i]['mb_sms']) { + $sms_contents = $cp_subject.' 쿠폰이 '.get_text($arr_send_list[$i]['mb_name']).'님께 발행됐습니다. 쿠폰만료 : '.$cp_end.' '.str_replace('http://', '', G5_URL); + $sms_contents = iconv_euckr($sms_contents); + + if($sms_contents) { + $receive_number = preg_replace("/[^0-9]/", "", $arr_send_list[$i]['mb_hp']); // 수신자번호 + $send_number = preg_replace("/[^0-9]/", "", $default['de_admin_company_tel']); // 발신자번호 + + if($receive_number && $send_number) { + $SMS->Add($receive_number, $send_number, $config['cf_icode_id'], $sms_contents, ""); + $sms_count++; + } + } + } + + // E-MAIL + if($config['cf_email_use'] && $_POST['cp_email_send'] && $arr_send_list[$i]['mb_email'] && $arr_send_list[$i]['mb_mailling']) { + $mb_name = get_text($arr_send_list[$i]['mb_name']); + switch($cp_method) { + case 2: + $coupon_method = '결제금액할인'; + break; + case 3: + $coupon_method = '배송비할인'; + break; + default: + $coupon_method = '개별상품할인'; + break; + } + $contents = '쿠폰명 : '.$cp_subject.'
'; + $contents .= '적용대상 : '.$coupon_method.'
'; + $contents .= '쿠폰만료 : '.$cp_end; + + $title = $config['cf_title'].' - 쿠폰발행알림 메일'; + $email = $arr_send_list[$i]['mb_email']; + + ob_start(); + include G5_SHOP_PATH.'/mail/couponmail.mail.php'; + $content = ob_get_contents(); + ob_end_clean(); + + mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $email, $title, $content, 1); + } + } + + // SMS발송 + if($config['cf_sms_use'] == 'icode' && $_POST['cp_sms_send'] && $sms_count) + { + $SMS->Send(); + } +} + +goto_url('./couponlist.php'); +?> \ No newline at end of file diff --git a/adm/shop_admin/couponlist.php b/adm/shop_admin/couponlist.php new file mode 100644 index 000000000..74098fed1 --- /dev/null +++ b/adm/shop_admin/couponlist.php @@ -0,0 +1,193 @@ + + +
+ + 전체 개 + + + + + +
+ +
+ 쿠폰 추가 +
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + '; + $link2 = ''; + + // 쿠폰사용회수 + $sql = " select count(*) as cnt from {$g5['g5_shop_coupon_log_table']} where cp_id = '{$row['cp_id']}' "; + $tmp = sql_fetch($sql); + $used_count = $tmp['cnt']; + + $bg = 'bg'.($i%2); + ?> + + + + + + + + + + + + + + '; + ?> + +
+ + + 쿠폰종류쿠폰코드쿠폰이름적용대상회원아이디사용기한사용회수관리
+ + +
~ + 수정 +
자료가 없습니다.
+
+ +
+ +
+ +
+ + + + + + \ No newline at end of file diff --git a/adm/shop_admin/couponlist_delete.php b/adm/shop_admin/couponlist_delete.php new file mode 100644 index 000000000..261fcfb13 --- /dev/null +++ b/adm/shop_admin/couponlist_delete.php @@ -0,0 +1,25 @@ + diff --git a/adm/shop_admin/couponmember.php b/adm/shop_admin/couponmember.php new file mode 100644 index 000000000..65a7082f9 --- /dev/null +++ b/adm/shop_admin/couponmember.php @@ -0,0 +1,96 @@ + '{$config['cf_admin']}' and mb_leave_date = '' and mb_intercept_date ='' "; + +if($_GET['mb_name']) + $sql_where .= " and mb_name like '%$mb_name%' "; + +// 테이블의 전체 레코드수만 얻음 +$sql = " select count(*) as cnt " . $sql_common . $sql_where; +$row = sql_fetch($sql); +$total_count = $row['cnt']; + +$rows = $config['cf_page_rows']; +$total_page = ceil($total_count / $rows); // 전체 페이지 계산 +if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) +$from_record = ($page - 1) * $rows; // 시작 열을 구함 + +$sql = " select mb_id, mb_name + $sql_common + $sql_where + order by mb_id + limit $from_record, $rows "; +$result = sql_query($sql); + +$qstr1 = 'mb_name='.$_GET['mb_name']; +?> + +
+

쿠폰 적용 회원선택

+ +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + '; + ?> + +
검색결과
회원이름회원아이디선택
검색된 자료가 없습니다.
+
+
+ + + +
+ +
+
+ + + + \ No newline at end of file diff --git a/adm/shop_admin/coupontarget.php b/adm/shop_admin/coupontarget.php new file mode 100644 index 000000000..7ae0a13dc --- /dev/null +++ b/adm/shop_admin/coupontarget.php @@ -0,0 +1,124 @@ + + +
+

쿠폰 적용 선택

+ +
+

+ 쿠폰을 적용할 선택하세요.
+ 많을 경우에는 검색 기능을 이용하세요. +

+
+ +
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + + + + '; + ?> + +
검색결과
선택
+
검색된 자료가 없습니다.
+
+
+ + + +
+ +
+
+ + + + \ No newline at end of file diff --git a/adm/shop_admin/img/icon_reply.gif b/adm/shop_admin/img/icon_reply.gif new file mode 100644 index 000000000..91c135977 Binary files /dev/null and b/adm/shop_admin/img/icon_reply.gif differ diff --git a/adm/shop_admin/img/mobilebg.jpg b/adm/shop_admin/img/mobilebg.jpg new file mode 100644 index 000000000..69ff72a4a Binary files /dev/null and b/adm/shop_admin/img/mobilebg.jpg differ diff --git a/adm/shop_admin/img/sms_back.gif b/adm/shop_admin/img/sms_back.gif new file mode 100644 index 000000000..1041a5d19 Binary files /dev/null and b/adm/shop_admin/img/sms_back.gif differ diff --git a/adm/shop_admin/index.php b/adm/shop_admin/index.php new file mode 100644 index 000000000..0020b85db --- /dev/null +++ b/adm/shop_admin/index.php @@ -0,0 +1,542 @@ + +
  • 주문현황
  • +
  • 입금완료미배송내역
  • +
  • 미입금주문내역
  • +
  • 사용후기
  • +
  • 상품문의
  • +'; + +// 주문상태에 따른 합계 금액 +function get_order_status_sum($status) +{ + global $g5; + + $sql = " select count(*) as cnt, + sum(od_cart_price + od_send_cost + od_send_cost2 - od_cancel_price) as price + from {$g5['g5_shop_order_table']} + where od_status = '$status' "; + $row = sql_fetch($sql); + + $info = array(); + $info['count'] = (int)$row['cnt']; + $info['price'] = (int)$row['price']; + $info['href'] = './orderlist.php?od_status='.urlencode($status); + + return $info; +} + +// 일자별 주문 합계 금액 +function get_order_date_sum($date) +{ + global $g5; + + $sql = " select sum(od_cart_price + od_send_cost + od_send_cost2) as orderprice, + sum(od_cancel_price) as cancelprice + from {$g5['g5_shop_order_table']} + where SUBSTRING(od_time, 1, 10) = '$date' "; + $row = sql_fetch($sql); + + $info = array(); + $info['order'] = (int)$row['orderprice']; + $info['cancel'] = (int)$row['cancelprice']; + + return $info; +} + +// 일자별 결제수단 주문 합계 금액 +function get_order_settle_sum($date) +{ + global $g5, $default; + + $case = array('신용카드', '계좌이체', '가상계좌', '무통장', '휴대폰'); + $info = array(); + + // 결제수단별 합계 + foreach($case as $val) + { + $sql = " select sum(od_cart_price + od_send_cost + od_send_cost2 - od_receipt_point - od_cart_coupon - od_coupon - od_send_coupon) as price, + count(*) as cnt + from {$g5['g5_shop_order_table']} + where SUBSTRING(od_time, 1, 10) = '$date' + and od_settle_case = '$val' "; + $row = sql_fetch($sql); + + $info[$val]['price'] = (int)$row['price']; + $info[$val]['count'] = (int)$row['cnt']; + } + + // 포인트 합계 + $sql = " select sum(od_receipt_point) as price, + count(*) as cnt + from {$g5['g5_shop_order_table']} + where SUBSTRING(od_time, 1, 10) = '$date' + and od_receipt_point > 0 "; + $row = sql_fetch($sql); + $info['포인트']['price'] = (int)$row['price']; + $info['포인트']['count'] = (int)$row['cnt']; + + // 쿠폰 합계 + $sql = " select sum(od_cart_coupon + od_coupon + od_send_coupon) as price, + count(*) as cnt + from {$g5['g5_shop_order_table']} + where SUBSTRING(od_time, 1, 10) = '$date' + and ( od_cart_coupon > 0 or od_coupon > 0 or od_send_coupon > 0 ) "; + $row = sql_fetch($sql); + $info['쿠폰']['price'] = (int)$row['price']; + $info['쿠폰']['count'] = (int)$row['cnt']; + + return $info; +} + +function get_max_value($arr) +{ + foreach($arr as $key => $val) + { + if(is_array($val)) + { + $arr[$key] = get_max_value($val); + } + } + + sort($arr); + + return array_pop($arr); +} +?> + +
    +
    +

    주문현황

    + + + =0; $i--) { + $date = date('Y-m-d', strtotime('-'.$i.' days', G5_SERVER_TIME)); + + $x_val[] = $date; + $arr_order[] = get_order_date_sum($date); + } + + $max_y = get_max_value($arr_order); + $max_y = ceil(($max_y) / 1000) * 1000; + $y_val = array(); + $y_val[] = $max_y; + + for($i=4; $i>=1; $i--) { + $y_val[] = $max_y * (($i * 2) / 10); + } + + $max_height = 230; + $h_val = array(); + $js_val = array(); + $offset = 10; // 금액이 상대적으로 작아 높이가 0일 때 기본 높이로 사용 + foreach($arr_order as $val) { + if($val['order'] > 0) + $h1 = intval(($max_height * $val['order']) / $max_y) + $offset; + else + $h1 = 0; + + if($val['cancel'] > 0) + $h2 = intval(($max_height * $val['cancel']) / $max_y) + $offset; + else + $h2 = 0 ; + + $h_val['order'][] = $h1; + $h_val['cancel'][] = $h2; + } + ?> + +
    +
      + +
    • + +
    +
      + +
    • +
      + +
      +
      + +
      +
    • + +
    +
      + +
    • + +
    +
    + 주문 + 취소 +
    +
    +
    + +
    +
    +

    처리할 주문

    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    상태변경건수금액
    주문 -> 입금
    입금 -> 준비
    준비 -> 배송
    배송 -> 완료
    +
    +
    + +
    +

    재고현황

    + + + +
    + + + + + + + + + + + + + + + +
    재고부족 상품재고부족 옵션SMS 잔여금액
    +
    +
    +
    +
    + +
    +

    결제수단별 주문현황

    + + +
    + + + + + =0; $i--) { + $date = date("Y-m-d", strtotime('-'.$i.' days', G5_SERVER_TIME)); + $info[$date] = get_order_settle_sum($date); + + $day = substr($date, 5, 5).' ('.get_yoil($date).')'; + $info_key[] = $date; + ?> + + + + + + + + + + + + + + + + + + + + + +
    구분
    건수금액
    +
    +
    + +
    +
    +

    1:1문의

    + + +
    +
      + +
    • + + + +
    • + 자료가 없습니다.'; + ?> +
    +
    + + +
    + +
    +

    상품문의

    + + +
    +
      + +
    • + + +
    • + 자료가 없습니다.'; + ?> +
    +
    + + +
    + +
    +

    사용후기

    + + +
    +
      + +
    • + + +
    • + 자료가 없습니다.'; + ?> +
    +
    + + +
    +
    + + + + diff --git a/adm/shop_admin/itemcopy.php b/adm/shop_admin/itemcopy.php new file mode 100644 index 000000000..249920017 --- /dev/null +++ b/adm/shop_admin/itemcopy.php @@ -0,0 +1,46 @@ + + +
    +

    상품 복사

    +
    + +
    + + +
    + +
    + + +
    + +
    +
    + + + + \ No newline at end of file diff --git a/adm/shop_admin/itemcopyupdate.php b/adm/shop_admin/itemcopyupdate.php new file mode 100644 index 000000000..54b409db4 --- /dev/null +++ b/adm/shop_admin/itemcopyupdate.php @@ -0,0 +1,165 @@ + \ No newline at end of file diff --git a/adm/shop_admin/itemdelete.inc.php b/adm/shop_admin/itemdelete.inc.php new file mode 100644 index 000000000..7e9239708 --- /dev/null +++ b/adm/shop_admin/itemdelete.inc.php @@ -0,0 +1,109 @@ + \ No newline at end of file diff --git a/adm/shop_admin/itemevent.php b/adm/shop_admin/itemevent.php new file mode 100644 index 000000000..c99a23cee --- /dev/null +++ b/adm/shop_admin/itemevent.php @@ -0,0 +1,89 @@ + + +
    + 전체 이벤트 건 +
    + + +
    + 이벤트 추가 +
    + +
    + + + + + + + + + + + + + '; + $href_close = ''; + } + if ($row['ev_subject_strong']) $subject = ''.$row['ev_subject'].''; + else $subject = $row['ev_subject']; + ?> + + + + + + + + + + '; + } + ?> + +
    목록
    이벤트번호제목연결상품사용관리
    예' : '아니오'; ?> + 수정 + 보기 + 삭제 +
    자료가 없습니다.
    +
    + + + + diff --git a/adm/shop_admin/itemeventform.php b/adm/shop_admin/itemeventform.php new file mode 100644 index 000000000..1330695f6 --- /dev/null +++ b/adm/shop_admin/itemeventform.php @@ -0,0 +1,445 @@ +$nbsp{$row['ca_name']}\n"; +} + +// 모바일 1줄당 이미지수 필드 추가 +if(!sql_query(" select ev_mobile_list_row from {$g5['g5_shop_event_table']} limit 1 ", false)) { + sql_query(" ALTER TABLE `{$g5['g5_shop_event_table']}` + ADD `ev_mobile_list_row` int(11) NOT NULL DEFAULT '0' AFTER `ev_mobile_list_mod` ", true); +} + +include_once (G5_ADMIN_PATH.'/admin.head.php'); +?> + +
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    이벤트번호 + + 이벤트바로가기 + +
    + + +
    + + +
    + 픽셀 +
    + 픽셀 +
    + + 개 +
    + + 줄 +
    + 픽셀 +
    + 픽셀 +
    + + 개 +
    + + 개 +
    + + +
    + + > + +
    + + + 750) + $width = 750; + else + $width = $size[0]; + + echo ' '; + $mimg_str = ''; + } + if ($mimg_str) { + echo ''; + } + ?> +
    관련상품 + +
    +

    상품검색

    + + + + + + +
    +

    상품의 분류를 선택하시거나 상품명을 입력하신 후 검색하여 주십시오.

    +
    +
    + +
    +

    등록된 상품

    + +
    + '; + ?> +
  • + +
    +
    +
  • + 0) + echo ''; + else + echo '

    등록된 상품이 없습니다.

    '; + ?> +
    +
    +
    + + + 750) + $width = 750; + else + $width = $size[0]; + + echo ' '; + $himg_str = ''; + } + if ($himg_str) { + echo ''; + } + ?> +
    + + + 750) + $width = 750; + else + $width = $size[0]; + echo ' '; + $timg_str = ''; + } + if ($timg_str) { + echo ''; + } + ?> +
    상단내용 + +
    하단내용 + +
    +
    + +
    + + 목록 +
    +
    + + + + + diff --git a/adm/shop_admin/itemeventformupdate.php b/adm/shop_admin/itemeventformupdate.php new file mode 100644 index 000000000..a27524d4b --- /dev/null +++ b/adm/shop_admin/itemeventformupdate.php @@ -0,0 +1,97 @@ + diff --git a/adm/shop_admin/itemeventlist.php b/adm/shop_admin/itemeventlist.php new file mode 100644 index 000000000..2de1e37ec --- /dev/null +++ b/adm/shop_admin/itemeventlist.php @@ -0,0 +1,212 @@ +전체목록'; + +// 이벤트제목 +if($ev_id) { + $tmp = sql_fetch(" select ev_subject from {$g5['g5_shop_event_table']} where ev_id = '$ev_id' "); + $ev_title = $tmp['ev_subject']; +} +?> + +
    + 전체 이벤트 건 +
    + +
    + + + + + +
    + +
    + + + + + + + + + + + + + + +
    + +
    +

    상품을 이벤트별로 일괄 처리합니다.

    +
    + +
    + + + + + + + + +
    + + + + + + + + + + + + '; + ?> + +
    목록
    이벤트 + +
    + + + > +
    자료가 없습니다.
    +
    + +
    +

    + + 현재 선택된 이벤트는 입니다.
    + 선택된 이벤트의 상품 수정 내용을 반영하시려면 일괄수정 버튼을 누르십시오. + + 이벤트를 선택하지 않으셨습니다. 수정 내용을 반영하기 전에 이벤트를 선택해주십시오.
    + 이벤트 선택 + +

    +
    +
    + +
    + +
    + + + + + + \ No newline at end of file diff --git a/adm/shop_admin/itemeventlistupdate.php b/adm/shop_admin/itemeventlistupdate.php new file mode 100644 index 000000000..66eddaf4a --- /dev/null +++ b/adm/shop_admin/itemeventlistupdate.php @@ -0,0 +1,27 @@ + diff --git a/adm/shop_admin/itemeventsearch.php b/adm/shop_admin/itemeventsearch.php new file mode 100644 index 000000000..617c5c305 --- /dev/null +++ b/adm/shop_admin/itemeventsearch.php @@ -0,0 +1,49 @@ +상품의 분류를 선택하시거나 상품명을 입력하신 후 검색하여 주십시오.

    '); + +$sql = " select it_id, it_name + from {$g5['g5_shop_item_table']} + where (1) "; +if($ca_id) + $sql .= " and ( ca_id like '$ca_id%' or ca_id2 like '$ca_id%' or ca_id3 like '$ca_id%' ) "; + +if($it_name) + $sql .= " and it_name like '%$it_name%' "; + +$sql .= " order by ca_id, it_name "; +$result = sql_query($sql); + +$list = ''; +for($i=0;$row=sql_fetch_array($result);$i++) { + if($w == 'u') { + $sql2 = " select count(*) as cnt from {$g5['g5_shop_event_item_table']} where ev_id = '$ev_id' and it_id = '{$row['it_id']}' "; + $row2 = sql_fetch($sql2); + if ($row2['cnt']) + continue; + } + + $it_name = get_it_image($row['it_id'], 50, 50).' '.$row['it_name']; + + $list .= '
  • '; + $list .= ''; + $list .= '
    '.$it_name.'
    '; + $list .= '
    '; + $list .= '
  • '.PHP_EOL; +} + +if($list) + $list = ''; +else + $list = '

    등록된 상품이 없습니다.

    '; + +echo $list; +?> \ No newline at end of file diff --git a/adm/shop_admin/itemeventwin.php b/adm/shop_admin/itemeventwin.php new file mode 100644 index 000000000..98bb35bf9 --- /dev/null +++ b/adm/shop_admin/itemeventwin.php @@ -0,0 +1,65 @@ + + +
    +

    + +
    + + + + + + + + + + + + + + + + + '; + ?> + +
    입력
    상품명사용삭제
    + + + + + 삭제
    자료가 없습니다.
    +
    + +
    + +
    + +
    + + diff --git a/adm/shop_admin/itemeventwindel.php b/adm/shop_admin/itemeventwindel.php new file mode 100644 index 000000000..64e603623 --- /dev/null +++ b/adm/shop_admin/itemeventwindel.php @@ -0,0 +1,13 @@ + diff --git a/adm/shop_admin/itemexcel.php b/adm/shop_admin/itemexcel.php new file mode 100644 index 000000000..d91826794 --- /dev/null +++ b/adm/shop_admin/itemexcel.php @@ -0,0 +1,45 @@ + + +
    +

    + +
    +

    + 엑셀파일을 이용하여 상품을 일괄등록할 수 있습니다.
    + 형식은 상품일괄등록용 엑셀파일을 다운로드하여 상품 정보를 입력하시면 됩니다.
    + 수정 완료 후 엑셀파일을 업로드하시면 상품이 일괄등록됩니다.
    + 엑셀파일을 저장하실 때는 Excel 97 - 2003 통합문서 (*.xls) 로 저장하셔야 합니다. +

    + +

    + 상품일괄등록용 엑셀파일 다운로드 +

    +
    + +
    + +
    + + +
    + +
    + + +
    + +
    + +
    + + \ No newline at end of file diff --git a/adm/shop_admin/itemexcelupdate.php b/adm/shop_admin/itemexcelupdate.php new file mode 100644 index 000000000..b900b2c0d --- /dev/null +++ b/adm/shop_admin/itemexcelupdate.php @@ -0,0 +1,237 @@ +setOutputEncoding('UTF-8'); + + /*** + * if you want you can change 'iconv' to mb_convert_encoding: + * $data->setUTFEncoder('mb'); + * + **/ + + /*** + * By default rows & cols indeces start with 1 + * For change initial index use: + * $data->setRowColOffset(0); + * + **/ + + + + /*** + * Some function for formatting output. + * $data->setDefaultFormat('%.2f'); + * setDefaultFormat - set format for columns with unknown formatting + * + * $data->setColumnFormat(4, '%.3f'); + * setColumnFormat - set format for column (apply only to number fields) + * + **/ + + $data->read($file); + + /* + + + $data->sheets[0]['numRows'] - count rows + $data->sheets[0]['numCols'] - count columns + $data->sheets[0]['cells'][$i][$j] - data from $i-row $j-column + + $data->sheets[0]['cellsInfo'][$i][$j] - extended info about cell + + $data->sheets[0]['cellsInfo'][$i][$j]['type'] = "date" | "number" | "unknown" + if 'type' == "unknown" - use 'raw' value, because cell contain value with format '0.00'; + $data->sheets[0]['cellsInfo'][$i][$j]['raw'] = value if cell without format + $data->sheets[0]['cellsInfo'][$i][$j]['colspan'] + $data->sheets[0]['cellsInfo'][$i][$j]['rowspan'] + */ + + error_reporting(E_ALL ^ E_NOTICE); + + $dup_it_id = array(); + $fail_it_id = array(); + $dup_count = 0; + $total_count = 0; + $fail_count = 0; + $succ_count = 0; + + for ($i = 3; $i <= $data->sheets[0]['numRows']; $i++) { + $total_count++; + + $j = 1; + + $it_id = addslashes($data->sheets[0]['cells'][$i][$j++]); + $ca_id = addslashes($data->sheets[0]['cells'][$i][$j++]); + $ca_id2 = addslashes($data->sheets[0]['cells'][$i][$j++]); + $ca_id3 = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_name = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_maker = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_origin = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_brand = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_model = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_type1 = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_type2 = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_type3 = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_type4 = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_type5 = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_basic = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_explan = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_mobile_explan = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_cust_price = addslashes(only_number($data->sheets[0]['cells'][$i][$j++])); + $it_price = addslashes(only_number($data->sheets[0]['cells'][$i][$j++])); + $it_tel_inq = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_point = addslashes(only_number($data->sheets[0]['cells'][$i][$j++])); + $it_point_type = addslashes(only_number($data->sheets[0]['cells'][$i][$j++])); + $it_sell_email = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_use = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_stock_qty = addslashes(only_number($data->sheets[0]['cells'][$i][$j++])); + $it_noti_qty = addslashes(only_number($data->sheets[0]['cells'][$i][$j++])); + $it_buy_min_qty = addslashes(only_number($data->sheets[0]['cells'][$i][$j++])); + $it_buy_max_qty = addslashes(only_number($data->sheets[0]['cells'][$i][$j++])); + $it_notax = addslashes(only_number($data->sheets[0]['cells'][$i][$j++])); + $it_order = addslashes(only_number($data->sheets[0]['cells'][$i][$j++])); + $it_img1 = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_img2 = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_img3 = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_img4 = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_img5 = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_img6 = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_img7 = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_img8 = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_img9 = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_img10 = addslashes($data->sheets[0]['cells'][$i][$j++]); + $it_explan2 = strip_tags(trim($it_explan)); + + if(!$it_id || !$ca_id || !$it_name) { + $fail_count++; + continue; + } + + // it_id 중복체크 + $sql2 = " select count(*) as cnt from {$g5['g5_shop_item_table']} where it_id = '$it_id' "; + $row2 = sql_fetch($sql2); + if($row2['cnt']) { + $fail_it_id[] = $it_id; + $dup_it_id[] = $it_id; + $dup_count++; + $fail_count++; + continue; + } + + // 기본분류체크 + $sql2 = " select count(*) as cnt from {$g5['g5_shop_category_table']} where ca_id = '$ca_id' "; + $row2 = sql_fetch($sql2); + if(!$row2['cnt']) { + $fail_it_id[] = $it_id; + $fail_count++; + continue; + } + + $sql = " INSERT INTO {$g5['g5_shop_item_table']} + SET it_id = '$it_id', + ca_id = '$ca_id', + ca_id2 = '$ca_id2', + ca_id3 = '$ca_id3', + it_name = '$it_name', + it_maker = '$it_maker', + it_origin = '$it_origin', + it_brand = '$it_brand', + it_model = '$it_model', + it_type1 = '$it_type1', + it_type2 = '$it_type2', + it_type3 = '$it_type3', + it_type4 = '$it_type4', + it_type5 = '$it_type5', + it_basic = '$it_basic', + it_explan = '$it_explan', + it_explan2 = '$it_explan2', + it_mobile_explan = '$it_mobile_explan', + it_cust_price = '$it_cust_price', + it_price = '$it_price', + it_point = '$it_point', + it_point_type = '$it_point_type', + it_stock_qty = '$it_stock_qty', + it_noti_qty = '$it_noti_qty', + it_buy_min_qty = '$it_buy_min_qty', + it_buy_max_qty = '$it_buy_max_qty', + it_notax = '$it_notax', + it_use = '$it_use', + it_time = '".G5_TIME_YMDHIS."', + it_ip = '{$_SERVER['REMOTE_ADDR']}', + it_order = '$it_order', + it_tel_inq = '$it_tel_inq', + it_img1 = '$it_img1', + it_img2 = '$it_img2', + it_img3 = '$it_img3', + it_img4 = '$it_img4', + it_img5 = '$it_img5', + it_img6 = '$it_img6', + it_img7 = '$it_img7', + it_img8 = '$it_img8', + it_img9 = '$it_img9', + it_img10 = '$it_img10' "; + sql_query($sql); + + $succ_count++; + } +} + +$g5['title'] = '상품 엑셀일괄등록 결과'; +include_once(G5_PATH.'/head.sub.php'); +?> + +
    +

    + +
    +

    상품등록을 완료했습니다.

    +
    + +
    +
    총상품수
    +
    +
    완료건수
    +
    +
    실패건수
    +
    + 0) { ?> +
    실패상품코드
    +
    + + 0) { ?> +
    상품코드중복건수
    +
    +
    중복상품코드
    +
    + +
    + +
    + +
    + +
    + + \ No newline at end of file diff --git a/adm/shop_admin/itemform.php b/adm/shop_admin/itemform.php new file mode 100644 index 000000000..7111c5e02 --- /dev/null +++ b/adm/shop_admin/itemform.php @@ -0,0 +1,1867 @@ +$nbsp{$row['ca_name']}\n"; + + $script .= "ca_use['{$row['ca_id']}'] = {$row['ca_use']};\n"; + $script .= "ca_stock_qty['{$row['ca_id']}'] = {$row['ca_stock_qty']};\n"; + //$script .= "ca_explan_html['$row[ca_id]'] = $row[ca_explan_html];\n"; + $script .= "ca_sell_email['{$row['ca_id']}'] = '{$row['ca_sell_email']}';\n"; +} + +// 재입고알림 설정 필드 추가 +if(!sql_query(" select it_stock_sms from {$g5['g5_shop_item_table']} limit 1 ", false)) { + sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}` + ADD `it_stock_sms` tinyint(4) NOT NULL DEFAULT '0' AFTER `it_stock_qty` ", true); +} + +// 추가옵션 포인트 설정 필드 추가 +if(!sql_query(" select it_supply_point from {$g5['g5_shop_item_table']} limit 1 ", false)) { + sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}` + ADD `it_supply_point` int(11) NOT NULL DEFAULT '0' AFTER `it_point_type` ", true); +} + +// 상품메모 필드 추가 +if(!sql_query(" select it_shop_memo from {$g5['g5_shop_item_table']} limit 1 ", false)) { + sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}` + ADD `it_shop_memo` text NOT NULL AFTER `it_use_avg` ", true); +} + +$pg_anchor =' +'; + +$frm_submit = '
    + + 목록'; +if($it_id) + $frm_submit .= PHP_EOL.'상품보기'; +$frm_submit .= '
    '; + +// 쿠폰적용안함 설정 필드 추가 +if(!sql_query(" select it_nocoupon from {$g5['g5_shop_item_table']} limit 1", false)) { + sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}` + ADD `it_nocoupon` tinyint(4) NOT NULL DEFAULT '0' AFTER `it_use` ", true); +} + +// 스킨필드 추가 +if(!sql_query(" select it_skin from {$g5['g5_shop_item_table']} limit 1", false)) { + sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}` + ADD `it_skin` varchar(255) NOT NULL DEFAULT '' AFTER `ca_id3`, + ADD `it_mobile_skin` varchar(255) NOT NULL DEFAULT '' AFTER `it_skin` ", true); +} +?> + +
    + + + + + + + + + + +
    +

    상품분류

    + +
    +

    기본분류는 반드시 선택하셔야 합니다. 하나의 상품에 최대 3개의 다른 분류를 지정할 수 있습니다.

    +
    + +
    + + + + + + + + + + + + + + + + + + +
    상품분류 입력
    + + + +
    + + +
    +
    +
    + + + +
    +

    스킨설정

    + +
    +

    상품상세보기에서 사용할 스킨을 설정합니다.

    +
    + +
    + + + + + + + + + + + + + + + + + + +
    스킨설정
    + + + + + + +
    + + + + + + +
    +
    +
    + + + +
    +

    기본정보

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    기본정보 입력
    상품코드 + + + + 직접 상품코드를 입력할 수도 있습니다.\n상품코드는 영문자, 숫자, - 만 입력 가능합니다."); ?> + + + + + + 상품확인 + 사용후기 + 상품문의 + +
    + + " id="it_name" required class="frm_input required" size="95"> +
    + + + + + + + +
    + 입력하지 않으면 자동으로 출력됩니다."); ?> + + + + + + +
    상품유형 + + id="it_type1"> + + id="it_type2"> + + id="it_type3"> + + id="it_type4"> + + id="it_type5"> + + + + + + +
    + + + + + + + +
    + + + + + + + +
    + + + + + + + +
    + + + + + + + +
    + + > 예 + + + + + +
    + + > 예 + + + + + +
    + + > 예 + + + + + +
    상품설명
    모바일 상품설명
    + + + + + + + +
    + + + + +
    +
    +
    + + + +
    +

    상품요약정보

    + +
    +

    전자상거래 등에서의 상품 등의 정보제공에 관한 고시에 따라 총 35개 상품군에 대해 상품 특성 등을 양식에 따라 입력할 수 있습니다.

    +
    + +
    + + +
    +
    +
    + + + + + +
    +

    가격 및 재고

    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    가격 및 재고 입력
    + 원 + + + + + +
    + + 원 + + + + + +
    + + + + + + + + +
    + + + + + + + +
    + + 점 + + + + + +
    + + > 예 + + + + + +
    + + > 예 +
    + 주문관리에서 상품별 상태 변경에 따라 자동으로 재고를 가감합니다. 재고는 규격/색상별이 아닌, 상품별로만 관리됩니다.
    재고수량을 0으로 설정하시면 품절상품으로 표시됩니다."); ?> + 개 +
    + + + + +
    + 옵션이 있는 상품은 개별 옵션의 통보수량이 적용됩니다."); ?> + 개 + + + + + +
    + + 개 + + + + + +
    + + 개 + + + + + +
    + + + + + + + +
    상품선택옵션 +
    + 옵션명과 옵션항목에 따옴표(\', ")는 입력할 수 없습니다.'); ?> + + + + + + + + + + + + + + + + + + + + +
    상품선택옵션 입력
    + + + + + +
    + + + + + +
    + + + + + +
    +
    + +
    +
    +
    + + +
    상품추가옵션 +
    + 옵션명과 옵션항목에 따옴표(\', ")는 입력할 수 없습니다.'); ?> + + + + + + + + + + + + + + +
    상품추가옵션 입력
    + + + + + + 0) + echo ''; + ?> +
    +
    +
    + +
    +
    +
    + + +
    +
    +
    + + + +
    +

    배송비

    + +
    +

    쇼핑몰설정 > 배송비유형 설정보다 개별상품 배송비설정이 우선 적용됩니다.

    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    배송비 입력
    + + + + + + + +
    + +
    + + 원 +
    + 주문금액 이상 무료 배송 +
    + + 주문수량 마다 배송비 부과 +
    +
    + + +
    + + + +
    +

    이미지

    + + +
    + + + + + + + + + + + + + + +
    이미지 업로드
    + + + + + + + + +
    +
    +
    + + + +
    +

    관련상품

    + + +
    +

    + 등록된 전체상품 목록에서 상품분류를 선택하면 해당 상품 리스트가 연이어 나타납니다.
    + 상품리스트에서 관련 상품으로 추가하시면 선택된 관련상품 목록에 함께 추가됩니다.
    + 예를 들어, A 상품에 B 상품을 관련상품으로 등록하면 B 상품에도 A 상품이 관련상품으로 자동 추가되며, 확인 버튼을 누르셔야 정상 반영됩니다. +

    +
    + +
    +
    +

    등록된 전체상품 목록

    + + + + + + + +
    +

    상품의 분류를 선택하시거나 상품명을 입력하신 후 검색하여 주십시오.

    +
    + +
    + +
    +

    선택된 관련상품 목록

    + +
    + '; + ?> +
  • + +
    +
    +
  • + 0) + echo ''; + else + echo '

    선택된 상품이 없습니다.

    '; + ?> +
    + +
    + +
    + +
    + + + +
    +

    관련이벤트

    + + +
    +
    +

    등록된 전체이벤트 목록

    +
    + '; + ?> +
  • + +
    +
    +
  • + 0) + echo ''; + else + echo '

    등록된 이벤트가 없습니다.

    '; + ?> +
    + +
    + +
    +

    선택된 관련이벤트 목록

    +
    + '; + ?> +
  • + +
    +
    +
  • + 0) + echo ''; + else + echo '

    선택된 이벤트가 없습니다.

    '; + ?> +
    + +
    +
    + +
    + + + +
    +

    상세설명설정

    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    상세설명설정
    상품상단내용 + + + + +
    상품하단내용 + + + + +
    모바일 상품상단내용 + + + + +
    모바일 상품하단내용 + + + + +
    +
    +
    + + + +
    +

    여분필드 설정

    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    여분필드 + + + + + + + + + +
    입력일시 + + +
    수정일시 + + +
    +
    +
    + + +
    + + + + + diff --git a/adm/shop_admin/itemformrelation.php b/adm/shop_admin/itemformrelation.php new file mode 100644 index 000000000..0d7e541cf --- /dev/null +++ b/adm/shop_admin/itemformrelation.php @@ -0,0 +1,48 @@ +상품의 분류를 선택하시거나 상품명을 입력하신 후 검색하여 주십시오.

    '); + +$sql = " select ca_id, it_id, it_name, it_price + from {$g5['g5_shop_item_table']} + where it_id <> '$it_id' "; +if($ca_id) + $sql .= " and ( ca_id like '$ca_id%' or ca_id2 like '$ca_id%' or ca_id3 like '$ca_id%' ) "; + +if($it_name) + $sql .= " and it_name like '%$it_name%' "; + +$sql .= " order by ca_id, it_name "; +$result = sql_query($sql); + +$list = ''; + +for($i=0;$row=sql_fetch_array($result);$i++) { + $sql2 = " select count(*) as cnt from {$g5['g5_shop_item_relation_table']} where it_id = '$it_id' and it_id2 = '{$row['it_id']}' "; + $row2 = sql_fetch($sql2); + if ($row2['cnt']) + continue; + + $it_name = get_it_image($row['it_id'], 50, 50).' '.$row['it_name']; + + $list .= '
  • '; + $list .= ''; + $list .= '
    '.$it_name.'
    '; + $list .= '
    '; + $list .= '
  • '.PHP_EOL; +} + +if($list) + $list = ''; +else + $list = '

    등록된 상품이 없습니다.'; + +echo $list; +?> \ No newline at end of file diff --git a/adm/shop_admin/itemformupdate.php b/adm/shop_admin/itemformupdate.php new file mode 100644 index 000000000..18490b990 --- /dev/null +++ b/adm/shop_admin/itemformupdate.php @@ -0,0 +1,576 @@ + 99) + alert("포인트 비율을 0과 99 사이의 값으로 입력해 주십시오."); + +$it_name = strip_tags(trim($_POST['it_name'])); +if ($it_name == "") + alert("상품명을 입력해 주십시오."); + +$sql_common = " ca_id = '$ca_id', + ca_id2 = '$ca_id2', + ca_id3 = '$ca_id3', + it_skin = '$it_skin', + it_mobile_skin = '$it_mobile_skin', + it_name = '$it_name', + it_maker = '$it_maker', + it_origin = '$it_origin', + it_brand = '$it_brand', + it_model = '$it_model', + it_option_subject = '$it_option_subject', + it_supply_subject = '$it_supply_subject', + it_type1 = '$it_type1', + it_type2 = '$it_type2', + it_type3 = '$it_type3', + it_type4 = '$it_type4', + it_type5 = '$it_type5', + it_basic = '$it_basic', + it_explan = '$it_explan', + it_explan2 = '".strip_tags(trim($_POST['it_explan']))."', + it_mobile_explan = '$it_mobile_explan', + it_cust_price = '$it_cust_price', + it_price = '$it_price', + it_point = '$it_point', + it_point_type = '$it_point_type', + it_supply_point = '$it_supply_point', + it_notax = '$it_notax', + it_sell_email = '$it_sell_email', + it_use = '$it_use', + it_nocoupon = '$it_nocoupon', + it_soldout = '$it_soldout', + it_stock_qty = '$it_stock_qty', + it_stock_sms = '$it_stock_sms', + it_noti_qty = '$it_noti_qty', + it_sc_type = '$it_sc_type', + it_sc_method = '$it_sc_method', + it_sc_price = '$it_sc_price', + it_sc_minimum = '$it_sc_minimum', + it_sc_qty = '$it_sc_qty', + it_buy_min_qty = '$it_buy_min_qty', + it_buy_max_qty = '$it_buy_max_qty', + it_head_html = '$it_head_html', + it_tail_html = '$it_tail_html', + it_mobile_head_html = '$it_mobile_head_html', + it_mobile_tail_html = '$it_mobile_tail_html', + it_ip = '{$_SERVER['REMOTE_ADDR']}', + it_order = '$it_order', + it_tel_inq = '$it_tel_inq', + it_info_gubun = '$it_info_gubun', + it_info_value = '$it_info_value', + it_shop_memo = '$it_shop_memo', + it_img1 = '$it_img1', + it_img2 = '$it_img2', + it_img3 = '$it_img3', + it_img4 = '$it_img4', + it_img5 = '$it_img5', + it_img6 = '$it_img6', + it_img7 = '$it_img7', + it_img8 = '$it_img8', + it_img9 = '$it_img9', + it_img10 = '$it_img10', + it_1_subj = '$it_1_subj', + it_2_subj = '$it_2_subj', + it_3_subj = '$it_3_subj', + it_4_subj = '$it_4_subj', + it_5_subj = '$it_5_subj', + it_6_subj = '$it_6_subj', + it_7_subj = '$it_7_subj', + it_8_subj = '$it_8_subj', + it_9_subj = '$it_9_subj', + it_10_subj = '$it_10_subj', + it_1 = '$it_1', + it_2 = '$it_2', + it_3 = '$it_3', + it_4 = '$it_4', + it_5 = '$it_5', + it_6 = '$it_6', + it_7 = '$it_7', + it_8 = '$it_8', + it_9 = '$it_9', + it_10 = '$it_10' + "; + +if ($w == "") +{ + $it_id = $_POST['it_id']; + + if (!trim($it_id)) { + alert('상품 코드가 없으므로 상품을 추가하실 수 없습니다.'); + } + + $t_it_id = preg_replace("/[A-Za-z0-9\-_]/", "", $it_id); + if($t_it_id) + alert('상품 코드는 영문자, 숫자, -, _ 만 사용할 수 있습니다.'); + + $sql_common .= " , it_time = '".G5_TIME_YMDHIS."' "; + $sql_common .= " , it_update_time = '".G5_TIME_YMDHIS."' "; + $sql = " insert {$g5['g5_shop_item_table']} + set it_id = '$it_id', + $sql_common "; + sql_query($sql); +} +else if ($w == "u") +{ + $sql_common .= " , it_update_time = '".G5_TIME_YMDHIS."' "; + $sql = " update {$g5['g5_shop_item_table']} + set $sql_common + where it_id = '$it_id' "; + sql_query($sql); +} +/* +else if ($w == "d") +{ + if ($is_admin != 'super') + { + $sql = " select it_id from {$g5['g5_shop_item_table']} a, {$g5['g5_shop_category_table']} b + where a.it_id = '$it_id' + and a.ca_id = b.ca_id + and b.ca_mb_id = '{$member['mb_id']}' "; + $row = sql_fetch($sql); + if (!$row['it_id']) + alert("\'{$member['mb_id']}\' 님께서 삭제 할 권한이 없는 상품입니다."); + } + + itemdelete($it_id); +} +*/ + +if ($w == "" || $w == "u") +{ + // 관련상품 등록 + $it_id2 = explode(",", $it_list); + for ($i=0; $i"; +?> + diff --git a/adm/shop_admin/iteminfo.php b/adm/shop_admin/iteminfo.php new file mode 100644 index 000000000..a04889aca --- /dev/null +++ b/adm/shop_admin/iteminfo.php @@ -0,0 +1,66 @@ + + +

    + + + + + + + + + $value) { + $el_name = $key; + $el_title = $value[0]; + $el_example = $value[1]; + $el_value = '상품페이지 참고'; + + if($gubun == $it['it_info_gubun'] && $info_value[$key]) + $el_value = $info_value[$key]; + ?> + + + + + + + + + + +
    상품요약정보 입력
    + + + + + + + + +
    +
    \ No newline at end of file diff --git a/adm/shop_admin/itemlist.php b/adm/shop_admin/itemlist.php new file mode 100644 index 000000000..2577aa146 --- /dev/null +++ b/adm/shop_admin/itemlist.php @@ -0,0 +1,321 @@ +선택'.PHP_EOL; +$sql = " select * from {$g5['g5_shop_category_table']} "; +if ($is_admin != 'super') + $sql .= " where ca_mb_id = '{$member['mb_id']}' "; +$sql .= " order by ca_order, ca_id "; +$result = sql_query($sql); +for ($i=0; $row=sql_fetch_array($result); $i++) +{ + $len = strlen($row['ca_id']) / 2 - 1; + $nbsp = ''; + for ($i=0; $i<$len; $i++) { + $nbsp .= '   '; + } + $ca_list .= ''.PHP_EOL; +} + +// 스킨 +$skin_list = ''.PHP_EOL; +$arr = get_skin_dir('shop'); +for ($i=0; $i'.$arr[$i].''.PHP_EOL; +} + +$mskin_list = ''.PHP_EOL; +$arr = get_skin_dir('shop', G5_MOBILE_PATH.'/'.G5_SKIN_DIR); +for ($i=0; $i'.$arr[$i].''.PHP_EOL; +} + + +$where = " and "; +$sql_search = ""; +if ($stx != "") { + if ($sfl != "") { + $sql_search .= " $where $sfl like '%$stx%' "; + $where = " and "; + } + if ($save_stx != $stx) + $page = 1; +} + +if ($sca != "") { + $sql_search .= " $where (a.ca_id like '$sca%' or a.ca_id2 like '$sca%' or a.ca_id3 like '$sca%') "; +} + +if ($sfl == "") $sfl = "it_name"; + +$sql_common = " from {$g5['g5_shop_item_table']} a , + {$g5['g5_shop_category_table']} b + where (a.ca_id = b.ca_id"; +if ($is_admin != 'super') + $sql_common .= " and b.ca_mb_id = '{$member['mb_id']}'"; +$sql_common .= ") "; +$sql_common .= $sql_search; + +// 테이블의 전체 레코드수만 얻음 +$sql = " select count(*) as cnt " . $sql_common; +$row = sql_fetch($sql); +$total_count = $row['cnt']; + +$rows = $config['cf_page_rows']; +$total_page = ceil($total_count / $rows); // 전체 페이지 계산 +if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) +$from_record = ($page - 1) * $rows; // 시작 열을 구함 + +if (!$sst) { + $sst = "it_id"; + $sod = "desc"; +} +$sql_order = "order by $sst $sod"; + + +$sql = " select * + $sql_common + $sql_order + limit $from_record, $rows "; +$result = sql_query($sql); + +//$qstr = $qstr.'&sca='.$sca.'&page='.$page; +$qstr = $qstr.'&sca='.$sca.'&page='.$page.'&save_stx='.$stx; + +$listall = '전체목록'; +?> + +
    + + 등록된 상품 건 +
    + +
    + + + + + + + + + + + + + +
    + + + +
    + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + '; + ?> + +
    목록
    + + + 상품코드분류순서판매품절조회관리
    이미지상품명판매가격시중가격PC스킨
    포인트재고모바일스킨
    + + + + + + + + + + + + + + + + + + value="1" id="use_"> + + + value="1" id="soldout_"> + + 수정 + 복사 + 보기 +
    + + " id="name_" required class="frm_input required" size="30"> + + + + + + + + + +
    + + + + + +
    자료가 한건도 없습니다.
    +
    + +
    + + + + +
    + +
    + + + + + + diff --git a/adm/shop_admin/itemlistupdate.php b/adm/shop_admin/itemlistupdate.php new file mode 100644 index 000000000..95cbbd094 --- /dev/null +++ b/adm/shop_admin/itemlistupdate.php @@ -0,0 +1,58 @@ + diff --git a/adm/shop_admin/itemoption.php b/adm/shop_admin/itemoption.php new file mode 100644 index 000000000..ac978e570 --- /dev/null +++ b/adm/shop_admin/itemoption.php @@ -0,0 +1,220 @@ + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    옵션 목록
    + + + 옵션추가금액재고수량통보수량사용여부
    + + + + > '.$opt_2; if ($opt_3_len) echo ' > '.$opt_3; ?> + + + + + + + + + + + +
    + + + + > '.$opt_2; if ($opt_3_len) echo ' > '.$opt_3; ?> + + + + + + + + + + + +
    +
    + +
    + +
    + +
    + 옵션 일괄 적용 + + + + + + + + + + + + + + +
    + \ No newline at end of file diff --git a/adm/shop_admin/itemqaform.php b/adm/shop_admin/itemqaform.php new file mode 100644 index 000000000..d0607b74a --- /dev/null +++ b/adm/shop_admin/itemqaform.php @@ -0,0 +1,96 @@ + + +
    + + + + + + + + + +
    +

    상품에 대한 문의에 답변하실 수 있습니다. 상품 문의 내용의 수정도 가능합니다.

    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    수정
    이름
    이메일
    휴대폰
    +
    + +
    + + 목록 +
    +
    + + + + diff --git a/adm/shop_admin/itemqaformupdate.php b/adm/shop_admin/itemqaformupdate.php new file mode 100644 index 000000000..0e598caf8 --- /dev/null +++ b/adm/shop_admin/itemqaformupdate.php @@ -0,0 +1,59 @@ +SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']); + $SMS->Add($recv_number, $send_number, $config['cf_icode_id'], iconv("utf-8", "euc-kr", stripslashes($sms_content)), ""); + $SMS->Send(); + } + } + + // 답변 이메일전송 + if(trim($row['iq_email'])) { + include_once(G5_LIB_PATH.'/mailer.lib.php'); + + $subject = $config['cf_title'].' '.$row['it_name'].' 상품문의 답변 알림 메일'; + $content = conv_content($iq_answer, 1); + + mailer($config['cf_title'], $config['cf_admin_email'], $row['iq_email'], $subject, $content, 1); + } + } + + goto_url("./itemqaform.php?w=$w&iq_id=$iq_id&sca=$sca&$qstr"); +} +else { + alert(); +} +?> diff --git a/adm/shop_admin/itemqalist.php b/adm/shop_admin/itemqalist.php new file mode 100644 index 000000000..4eaaf6a9e --- /dev/null +++ b/adm/shop_admin/itemqalist.php @@ -0,0 +1,203 @@ +전체목록'; +?> + +
    + + 전체 문의내역 건 +
    + +
    + + + + + + + + + + + + + +
    + +
    + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + '; + } + ?> + +
    목록
    + + + 상품명질문이름답변관리
    + + + + + + + + 수정 +
    자료가 없습니다.
    +
    + +
    + +
    +
    + + + + + + diff --git a/adm/shop_admin/itemqalistupdate.php b/adm/shop_admin/itemqalistupdate.php new file mode 100644 index 000000000..40f522ab6 --- /dev/null +++ b/adm/shop_admin/itemqalistupdate.php @@ -0,0 +1,25 @@ + diff --git a/adm/shop_admin/itemsellrank.php b/adm/shop_admin/itemsellrank.php new file mode 100644 index 000000000..abd78a7d7 --- /dev/null +++ b/adm/shop_admin/itemsellrank.php @@ -0,0 +1,176 @@ +전체목록'; +?> + +
    + + 등록상품 건 +
    + +
    + + + + + + + + +기간설정 + + 에서 + + 까지 + + +
    + +
    +

    판매량을 합산하여 상품판매순위를 집계합니다.

    +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + '; + } + ?> + +
    목록
    순위상품명">쇼핑">주문">입금">준비">배송">완료">취소">반품">품절">합계
    자료가 없습니다.
    +
    + + + + + + diff --git a/adm/shop_admin/itemstocklist.php b/adm/shop_admin/itemstocklist.php new file mode 100644 index 000000000..51548034e --- /dev/null +++ b/adm/shop_admin/itemstocklist.php @@ -0,0 +1,212 @@ +전체목록'; +?> + +
    + + 전체 상품 개 +
    + +
    + + + + + + + + + + + + + + + +
    + +
    +

    재고수정의 수치를 수정하시면 창고재고의 수치가 변경됩니다.

    +
    + + + +
    + + + + + + + +
    + + + + + + + + + + + + + + + + + + + 재고부족 '; + } + + $bg = 'bg'.($i%2); + + ?> + + + + + + + + + + + + + + '; + ?> + +
    목록
    ">상품코드">상품명">창고재고주문대기가재고재고수정통보수량">판매">품절">재입고알림관리
    + + + + + + + + + + + > + + + > + + + > + 수정
    자료가 없습니다.
    +
    + +
    + +
    +
    + + + + diff --git a/adm/shop_admin/itemstocklistupdate.php b/adm/shop_admin/itemstocklistupdate.php new file mode 100644 index 000000000..ae05caed3 --- /dev/null +++ b/adm/shop_admin/itemstocklistupdate.php @@ -0,0 +1,23 @@ + diff --git a/adm/shop_admin/itemstocksms.php b/adm/shop_admin/itemstocksms.php new file mode 100644 index 000000000..ca5a625fb --- /dev/null +++ b/adm/shop_admin/itemstocksms.php @@ -0,0 +1,184 @@ +dbconfig.php 파일에 $g5[\'g5_shop_item_stocksms_table\'] = G5_SHOP_TABLE_PREFIX.\'item_stocksms\'; 를 추가해 주세요.'); + +if(!sql_query(" select ss_id from {$g5['g5_shop_item_stocksms_table']} limit 1", false)) { + sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['g5_shop_item_stocksms_table']}` ( + `ss_id` int(11) NOT NULL AUTO_INCREMENT, + `it_id` varchar(20) NOT NULL DEFAULT '', + `ss_hp` varchar(255) NOT NULL DEFAULT '', + `ss_send` tinyint(4) NOT NULL DEFAULT '0', + `ss_send_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `ss_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `ss_ip` varchar(25) NOT NULL DEFAULT '', + PRIMARY KEY (`ss_id`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true); +} + +$sql_search = " where 1 "; +if ($search != "") { + if ($sel_field != "") { + $sql_search .= " and $sel_field like '%$search%' "; + } +} + +if ($sel_field == "") $sel_field = "it_it"; +if ($sort1 == "") $sort1 = "ss_send"; +if ($sort2 == "") $sort2 = "asc"; + +$sql_common = " from {$g5['g5_shop_item_stocksms_table']} "; + +// 미전송 건수 +$sql = " select count(*) as cnt " . $sql_common . " where ss_send = '0' "; +$row = sql_fetch($sql); +$unsend_count = $row['cnt']; + +// 테이블의 전체 레코드수만 얻음 +$sql = " select count(*) as cnt " . $sql_common; +$row = sql_fetch($sql); +$total_count = $row['cnt']; + +$rows = $config['cf_page_rows']; +$total_page = ceil($total_count / $rows); // 전체 페이지 계산 +if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) +$from_record = ($page - 1) * $rows; // 시작 열을 구함 + +$sql = " select * + $sql_common + $sql_search + order by $sort1 $sort2 + limit $from_record, $rows "; +$result = sql_query($sql); + +$qstr1 = 'sel_field='.$sel_field.'&search='.$search; +$qstr = $qstr1.'&sort1='.$sort1.'&sort2='.$sort2.'&page='.$page; + +$listall = '전체목록'; +?> + +
    + + 전체 건, 미전송 건 +
    + +
    + + + + + + + + + + + + +
    + +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + '; + ?> + +
    목록
    + + + 상품명휴대폰번호SMS전송SMS전송일시등록일시
    + + + +
    자료가 없습니다.
    +
    + + +
    + +
    + + +
    + +
    +
    + + + + + + \ No newline at end of file diff --git a/adm/shop_admin/itemstocksmsupdate.php b/adm/shop_admin/itemstocksmsupdate.php new file mode 100644 index 000000000..1368031de --- /dev/null +++ b/adm/shop_admin/itemstocksmsupdate.php @@ -0,0 +1,86 @@ +SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']); + } + + auth_check($auth[$sub_menu], 'w'); + + $cnt = 0; + + for ($i=0; $iAdd($receive_number, $send_number, $config['cf_icode_id'], $sms_contents, ""); + $cnt++; + } + } + + // SMS 전송으로 변경함 + $sql = " update {$g5['g5_shop_item_stocksms_table']} + set ss_send = '1', + ss_send_time = '".G5_TIME_YMDHIS."' + where ss_id = '{$_POST['ss_id'][$k]}' "; + sql_query($sql); + } + + // SMS + if($config['cf_sms_use'] == 'icode' && $cnt) + { + $SMS->Send(); + } +} else if ($_POST['act_button'] == "선택삭제") { + + if ($is_admin != 'super') + alert('자료의 삭제는 최고관리자만 가능합니다.'); + + auth_check($auth[$sub_menu], 'd'); + + check_token(); + + for ($i=0; $i diff --git a/adm/shop_admin/itemsupply.php b/adm/shop_admin/itemsupply.php new file mode 100644 index 000000000..f26580ecc --- /dev/null +++ b/adm/shop_admin/itemsupply.php @@ -0,0 +1,180 @@ + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    추가옵션 목록
    + + + 옵션명옵션항목상품금액재고수량통보수량사용여부
    + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    +
    + +
    + +
    + +
    + + + + + + + + + + + + + + +
    + \ No newline at end of file diff --git a/adm/shop_admin/itemtypelist.php b/adm/shop_admin/itemtypelist.php new file mode 100644 index 000000000..e38a5b1da --- /dev/null +++ b/adm/shop_admin/itemtypelist.php @@ -0,0 +1,192 @@ +전체목록'; +?> + +
    + + 전체 상품 개 +
    + +
    + + + + + + + + + + + + + +
    + +
    + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + '; + ?> + +
    목록
    상품코드상품명히트
    상품
    추천
    상품
    신규
    상품
    인기
    상품
    할인
    상품
    관리
    + + + + + > + + + > + + + > + + + > + + + > + + 수정 +
    자료가 없습니다.
    +
    + +
    + +
    +
    + + + + diff --git a/adm/shop_admin/itemtypelistupdate.php b/adm/shop_admin/itemtypelistupdate.php new file mode 100644 index 000000000..ed210d40d --- /dev/null +++ b/adm/shop_admin/itemtypelistupdate.php @@ -0,0 +1,23 @@ + diff --git a/adm/shop_admin/itemuseform.php b/adm/shop_admin/itemuseform.php new file mode 100644 index 000000000..9ab55a0fc --- /dev/null +++ b/adm/shop_admin/itemuseform.php @@ -0,0 +1,100 @@ + + +
    + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    수정
    상품명
    이름
    평점 (점)
    '>
    내용
    확인 + > + + > + +
    +
    + +
    + + 목록 +
    +
    + + + + diff --git a/adm/shop_admin/itemuseformupdate.php b/adm/shop_admin/itemuseformupdate.php new file mode 100644 index 000000000..c1d95d02a --- /dev/null +++ b/adm/shop_admin/itemuseformupdate.php @@ -0,0 +1,29 @@ + diff --git a/adm/shop_admin/itemuselist.php b/adm/shop_admin/itemuselist.php new file mode 100644 index 000000000..4ea9fe702 --- /dev/null +++ b/adm/shop_admin/itemuselist.php @@ -0,0 +1,218 @@ +전체목록'; +?> + +
    + + 전체 후기내역 건 +
    + +
    + + + + + + + + + + + + + +
    + +
    + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + '; + } + ?> + +
    목록
    + + + 상품명이름제목평점확인관리
    + + + + + + + + + + + + + value="1" id="confirm_"> + + 수정 +
    자료가 없습니다.
    +
    + +
    + + +
    +
    + + + + + + diff --git a/adm/shop_admin/itemuselistupdate.php b/adm/shop_admin/itemuselistupdate.php new file mode 100644 index 000000000..03b71ef6b --- /dev/null +++ b/adm/shop_admin/itemuselistupdate.php @@ -0,0 +1,42 @@ + diff --git a/adm/shop_admin/optionstocklist.php b/adm/shop_admin/optionstocklist.php new file mode 100644 index 000000000..0149256df --- /dev/null +++ b/adm/shop_admin/optionstocklist.php @@ -0,0 +1,225 @@ +전체목록'; +?> + +
    + + 전체 옵션 개 +
    + +
    + + + + + + + + + + + + + + + +
    + + + +
    + + + + + + + +
    + + + + + + + + + + + + + + + + + + '; + } + } + } + + $type = '선택옵션'; + if($row['io_type']) + $type = '추가옵션'; + + // 통보수량보다 재고수량이 작을 때 + $io_stock_qty = number_format($row['io_stock_qty']); + $io_stock_qty_st = ''; // 스타일 정의 + if($row['io_stock_qty'] <= $row['io_noti_qty']) { + $io_stock_qty_st = ' sit_stock_qty_alert'; + $io_stock_qty = ''.$io_stock_qty.' ! 재고부족 '; + } + + $bg = 'bg'.($i%2); + ?> + + + + + + + + + + + + + '; + ?> + +
    목록
    ">상품명옵션항목옵션타입">창고재고주문대기가재고재고수정통보수량">판매관리
    + + + + + + + + + + + + + > + 수정
    자료가 없습니다.
    +
    + +
    + +
    +
    + +
    +

    + 재고수정의 수치를 수정하시면 창고재고의 수치가 변경됩니다.
    + 창고재고가 부족한 경우 재고수량 뒤에 ! 혹은 재고부족으로 표시됩니다. +

    +
    + + + + diff --git a/adm/shop_admin/optionstocklistupdate.php b/adm/shop_admin/optionstocklistupdate.php new file mode 100644 index 000000000..2a42dda51 --- /dev/null +++ b/adm/shop_admin/optionstocklistupdate.php @@ -0,0 +1,23 @@ + diff --git a/adm/shop_admin/orderdelivery.php b/adm/shop_admin/orderdelivery.php new file mode 100644 index 000000000..5ae0289e5 --- /dev/null +++ b/adm/shop_admin/orderdelivery.php @@ -0,0 +1,55 @@ + + +
    +

    + +
    +

    + 엑셀파일을 이용하여 배송정보를 일괄등록할 수 있습니다.
    + 형식은 배송처리용 엑셀파일을 다운로드하여 배송 정보를 입력하시면 됩니다.
    + 수정 완료 후 엑셀파일을 업로드하시면 배송정보가 일괄등록됩니다.
    + 엑셀파일을 저장하실 때는 Excel 97 - 2003 통합문서 (*.xls) 로 저장하셔야 합니다.
    + 주문상태가 준비이고 미수금이 0인 주문에 한해 엑셀파일이 생성됩니다. +

    + +

    + 배송정보 일괄등록용 엑셀파일 다운로드 +

    +
    + +
    + +
    + + +
    + +
    + + + + + + +
    + +
    + + +
    + +
    + +
    + + \ No newline at end of file diff --git a/adm/shop_admin/orderdeliveryexcel.php b/adm/shop_admin/orderdeliveryexcel.php new file mode 100644 index 000000000..3c31257dc --- /dev/null +++ b/adm/shop_admin/orderdeliveryexcel.php @@ -0,0 +1,60 @@ +addworksheet(); + +// Put Excel data +$data = array('주문번호', '주문자명', '주문자전화1', '주문자전화2', '배송자명', '배송지전화1', '배송지전화2', '배송지주소', '배송회사', '운송장번호'); +$data = array_map('iconv_euckr', $data); + +$col = 0; +foreach($data as $cell) { + $worksheet->write(0, $col++, $cell); +} + +for($i=1; $row=sql_fetch_array($result); $i++) { + $row = array_map('iconv_euckr', $row); + + $worksheet->write($i, 0, ' '.$row['od_id']); + $worksheet->write($i, 1, $row['od_name']); + $worksheet->write($i, 2, ' '.$row['od_tel']); + $worksheet->write($i, 3, ' '.$row['od_hp']); + $worksheet->write($i, 4, $row['od_b_name']); + $worksheet->write($i, 5, ' '.$row['od_b_tel']); + $worksheet->write($i, 6, ' '.$row['od_b_hp']); + $worksheet->write($i, 7, print_address($row['od_b_addr1'], $row['od_b_addr2'], $row['od_b_addr3'], $row['od_b_addr_jibeon'])); + $worksheet->write($i, 8, $row['od_delivery_company']); + $worksheet->write($i, 9, $row['od_invoice']); +} + +$workbook->close(); + +header("Content-Type: application/x-msexcel; name=\"deliverylist-".date("ymd", time()).".xls\""); +header("Content-Disposition: inline; filename=\"deliverylist-".date("ymd", time()).".xls\""); +$fh=fopen($fname, "rb"); +fpassthru($fh); +unlink($fname); +?> \ No newline at end of file diff --git a/adm/shop_admin/orderdeliveryupdate.php b/adm/shop_admin/orderdeliveryupdate.php new file mode 100644 index 000000000..b26dab94a --- /dev/null +++ b/adm/shop_admin/orderdeliveryupdate.php @@ -0,0 +1,184 @@ +SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']); +} + +if($_FILES['excelfile']['tmp_name']) { + $file = $_FILES['excelfile']['tmp_name']; + + include_once(G5_LIB_PATH.'/Excel/reader.php'); + + $data = new Spreadsheet_Excel_Reader(); + + // Set output Encoding. + $data->setOutputEncoding('UTF-8'); + + /*** + * if you want you can change 'iconv' to mb_convert_encoding: + * $data->setUTFEncoder('mb'); + * + **/ + + /*** + * By default rows & cols indeces start with 1 + * For change initial index use: + * $data->setRowColOffset(0); + * + **/ + + + + /*** + * Some function for formatting output. + * $data->setDefaultFormat('%.2f'); + * setDefaultFormat - set format for columns with unknown formatting + * + * $data->setColumnFormat(4, '%.3f'); + * setColumnFormat - set format for column (apply only to number fields) + * + **/ + + $data->read($file); + + /* + + + $data->sheets[0]['numRows'] - count rows + $data->sheets[0]['numCols'] - count columns + $data->sheets[0]['cells'][$i][$j] - data from $i-row $j-column + + $data->sheets[0]['cellsInfo'][$i][$j] - extended info about cell + + $data->sheets[0]['cellsInfo'][$i][$j]['type'] = "date" | "number" | "unknown" + if 'type' == "unknown" - use 'raw' value, because cell contain value with format '0.00'; + $data->sheets[0]['cellsInfo'][$i][$j]['raw'] = value if cell without format + $data->sheets[0]['cellsInfo'][$i][$j]['colspan'] + $data->sheets[0]['cellsInfo'][$i][$j]['rowspan'] + */ + + error_reporting(E_ALL ^ E_NOTICE); + + $fail_od_id = array(); + $total_count = 0; + $fail_count = 0; + $succ_count = 0; + + // $i 사용시 ordermail.inc.php의 $i 때문에 무한루프에 빠짐 + for ($k = 2; $k <= $data->sheets[0]['numRows']; $k++) { + $total_count++; + + $od_id = addslashes(trim($data->sheets[0]['cells'][$k][1])); + $od_delivery_company = addslashes($data->sheets[0]['cells'][$k][9]); + $od_invoice = addslashes($data->sheets[0]['cells'][$k][10]); + + if(!$od_id || !$od_delivery_company || !$od_invoice) { + $fail_count++; + $fail_od_id[] = $od_id; + continue; + } + + // 주문정보 + $od = sql_fetch(" select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' "); + if (!$od) { + $fail_count++; + $fail_od_id[] = $od_id; + continue; + } + + if($od['od_status'] != '준비') { + $fail_count++; + $fail_od_id[] = $od_id; + continue; + } + + $delivery['invoice'] = $od_invoice; + $delivery['invoice_time'] = G5_TIME_YMDHIS; + $delivery['delivery_company'] = $od_delivery_company; + + // 주문정보 업데이트 + order_update_delivery($od_id, $od['mb_id'], '배송', $delivery); + change_status($od_id, '준비', '배송'); + + $succ_count++; + + // SMS + if($config['cf_sms_use'] == 'icode' && $_POST['send_sms'] && $default['de_sms_use5']) { + $sms_contents = conv_sms_contents($od_id, $default['de_sms_cont5']); + if($sms_contents) { + $receive_number = preg_replace("/[^0-9]/", "", $od['od_hp']); // 수신자번호 + $send_number = preg_replace("/[^0-9]/", "", $default['de_admin_company_tel']); // 발신자번호 + + if($receive_number && $send_number) { + $SMS->Add($receive_number, $send_number, $config['cf_icode_id'], $sms_contents, ""); + $sms_count++; + } + } + } + + // 메일 + if($config['cf_email_use'] && $_POST['od_send_mail']) + include './ordermail.inc.php'; + + // 에스크로 배송 + if($_POST['send_escrow'] && $od['od_tno'] && $od['od_escrow']) { + $escrow_tno = $od['od_tno']; + $escrow_numb = $od_invoice; + $escrow_corp = $od_delivery_company; + + include(G5_SHOP_PATH.'/'.$od['od_pg'].'/escrow.register.php'); + } + } +} + +// SMS +if($config['cf_sms_use'] == 'icode' && $_POST['send_sms'] && $sms_count) +{ + $SMS->Send(); +} + +$g5['title'] = '엑셀 배송일괄처리 결과'; +include_once(G5_PATH.'/head.sub.php'); +?> + +
    +

    + +
    +

    배송일괄처리를 완료했습니다.

    +
    + +
    +
    총배송건수
    +
    +
    완료건수
    +
    +
    실패건수
    +
    + 0) { ?> +
    실패주문코드
    +
    + +
    + +
    + +
    + +
    + + \ No newline at end of file diff --git a/adm/shop_admin/orderform.php b/adm/shop_admin/orderform.php new file mode 100644 index 000000000..429e6544f --- /dev/null +++ b/adm/shop_admin/orderform.php @@ -0,0 +1,1029 @@ + +
  • 주문상품 목록
  • +
  • 주문결제 내역
  • +
  • 결제상세정보 확인
  • +
  • 결제상세정보 수정
  • +
  • 상점메모
  • +
  • 주문하신 분
  • +
  • 받으시는 분
  • +'; + +$html_receipt_chk = ' +
    '; + +$qstr = "sort1=$sort1&sort2=$sort2&sel_field=$sel_field&search=$search&page=$page"; + +// 상품목록 +$sql = " select it_id, + it_name, + cp_price, + ct_notax, + ct_send_cost, + it_sc_type + from {$g5['g5_shop_cart_table']} + where od_id = '{$od['od_id']}' + group by it_id + order by ct_id "; +$result = sql_query($sql); + +// 주소 참고항목 필드추가 +if(!isset($od['od_addr3'])) { + sql_query(" ALTER TABLE `{$g5['g5_shop_order_table']}` + ADD `od_addr3` varchar(255) NOT NULL DEFAULT '' AFTER `od_addr2`, + ADD `od_b_addr3` varchar(255) NOT NULL DEFAULT '' AFTER `od_b_addr2` ", true); +} + +// 배송목록에 참고항목 필드추가 +if(!sql_query(" select ad_addr3 from {$g5['g5_shop_order_address_table']} limit 1", false)) { + sql_query(" ALTER TABLE `{$g5['g5_shop_order_address_table']}` + ADD `ad_addr3` varchar(255) NOT NULL DEFAULT '' AFTER `ad_addr2` ", true); +} + +// 결제 PG 필드 추가 +if(!sql_query(" select od_pg from {$g5['g5_shop_order_table']} limit 1 ", false)) { + sql_query(" ALTER TABLE `{$g5['g5_shop_order_table']}` + ADD `od_pg` varchar(255) NOT NULL DEFAULT '' AFTER `od_mobile`, + ADD `od_casseqno` varchar(255) NOT NULL DEFAULT '' AFTER `od_escrow` ", true); + + // 주문 결제 PG kcp로 설정 + sql_query(" update {$g5['g5_shop_order_table']} set od_pg = 'kcp' "); +} + +// LG 현금영수증 JS +if($od['od_pg'] == 'lg') { + if($default['de_card_test']) { + echo ''.PHP_EOL; + } else { + echo ''.PHP_EOL; + } +} + +// add_javascript('js 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨 +add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js +?> + +
    +

    주문상품 목록

    + +
    +

    + 현재 주문상태 + | + 주문일시 () + | + 주문총액 원 +

    +

    희망배송일은 () 입니다.

    + +

    모바일 쇼핑몰의 주문입니다.

    + +
    + +
    + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    주문 상품 목록
    상품명 + + + 옵션항목상태수량판매가소계쿠폰포인트배송비포인트반영재고반영
    + + + + + + + + + + + + + +
    + +
    + +
    +

    + + 주문 및 장바구니 상태 변경 + + + + + + + + +

    +
    + +
    +

    주문, 입금, 준비, 배송, 완료는 장바구니와 주문서 상태를 모두 변경하지만, 취소, 반품, 품절은 장바구니의 상태만 변경하며, 주문서 상태는 변경하지 않습니다.

    +

    개별적인(이곳에서의) 상태 변경은 모든 작업을 수동으로 처리합니다. 예를 들어 주문에서 입금으로 상태 변경시 입금액(결제금액)을 포함한 모든 정보는 수동 입력으로 처리하셔야 합니다.

    +
    + +
    + + +
    +

    주문 수량변경 및 주문 전체취소 처리 내역

    +
    + +
    +
    + + +
    + +
    +

    주문결제 내역

    + + + 0) + $s_receipt_way .= "+포인트"; + ?> + +
    + 미수금 + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    주문결제 내역
    주문번호결제방법주문총액배송비포인트결제총결제액쿠폰주문취소
    원원
    +
    +
    + +
    +

    결제상세정보

    + + +
    + + + + + + + + + + + + +
    + +
    +

    결제상세정보 확인

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    결제상세정보
    계좌번호
    입금액
    입금자
    입금확인일시 + 입금 확인일시를 체크해 주세요. + () + +
    휴대폰번호
    결제액
    결제 확인일시 + 결제 확인일시를 체크해 주세요. + () + +
    신용카드 결제금액 + 0원 + + +
    카드 승인일시 + 신용카드 결제 일시 정보가 없습니다. + + +
    결제대행사 링크 + {$pg_test}바로가기
    "; + } + //------------------------------------------------------------------------------ + ?> +
    과세공급가액
    과세부가세액
    비과세공급가액
    주문금액할인
    포인트
    결제취소/환불액
    배송회사
    운송장번호
    배송일시
    + 원 +
    배송비할인
    + 원 +
    현금영수증 + + 현금영수증 확인 + + 현금영수증 발급 + +
    +
    +
    + +
    +

    결제상세정보 수정

    + +
    + + + + + + + + + '.PHP_EOL; + $bank_account .= ''.PHP_EOL; + for ($i=0; $i'.$str[$i].''.PHP_EOL; + } + $bank_account .= ' '; + } + else if ($od['od_settle_case'] == '가상계좌') + $bank_account = $od['od_bank_account'].''; + else if ($od['od_settle_case'] == '계좌이체') + $bank_account = $od['od_settle_case']; + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    결제상세정보 수정
    + + 원 +
    + + + +
    + + +
    + " onclick="if (this.checked == true) this.form.od_receipt_time.value=this.form.od_bank_chk.value; else this.form.od_receipt_time.value = this.form.od_receipt_time.defaultValue;"> +
    + " id="od_receipt_time" class="frm_input" maxlength="19"> +
    휴대폰번호
    + + 원 +
    + " onclick="if (this.checked == true) this.form.od_receipt_time.value=this.form.od_hp_chk.value; else this.form.od_receipt_time.value = this.form.od_receipt_time.defaultValue;"> +
    + " id="op_receipt_time" class="frm_input" size="19" maxlength="19"> +
    + + 원 +
    + " onclick="if (this.checked == true) this.form.od_receipt_time.value=this.form.od_card_chk.value; else this.form.od_receipt_time.value = this.form.od_receipt_time.defaultValue;"> +
    + " id="od_receipt_time" class="frm_input" size="19" maxlength="19"> +
    점
    + 원 +
    + + + +
    + + +
    + +
    + +
    + " onclick="chk_invoice_time()"> +
    + " class="frm_input" maxlength="19"> +
    + + 메일발송 +
    +
    +
    + +
    + +
    + + 0) { ?> + 개인결제추가 + + 0 && ($od['od_settle_case'] == '신용카드' || $od['od_settle_case'] == '계좌이체')) { ?> + 부분취소 + + 목록 +
    +
    +
    + +
    +

    상점메모

    + +
    +

    + 현재 열람 중인 주문에 대한 내용을 메모하는곳입니다.
    + 입금, 배송 내역을 메일로 발송할 경우 함께 기록됩니다. +

    +
    + +
    + + + + + + + + +
    + + +
    + +
    + +
    + +
    +
    + +
    +

    주문자/배송지 정보

    + + +
    + + + + + + + + +
    + +
    +

    주문하신 분

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    주문자/배송지 정보
    주문하시는 분 주소 + + +
    + + +
    + + +
    + + +
    +
    주문하신 분 IP Address
    +
    +
    + +
    +

    받으시는 분

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    받으시는 분 정보
    받으시는 분 주소 + + +
    + + + + + + +
    +
    + () +
    전달 메세지
    +
    +
    + +
    + +
    + + 목록 +
    + +
    +
    + + + + \ No newline at end of file diff --git a/adm/shop_admin/orderformcartupdate.php b/adm/shop_admin/orderformcartupdate.php new file mode 100644 index 000000000..e4ce7ade7 --- /dev/null +++ b/adm/shop_admin/orderformcartupdate.php @@ -0,0 +1,374 @@ + '.$ct_qty."\n"; + } + + // 재고를 이미 사용했다면 (재고에서 이미 뺐다면) + $stock_use = $ct['ct_stock_use']; + if ($ct['ct_stock_use']) + { + if ($ct_status == '주문' || $ct_status == '취소' || $ct_status == '반품' || $ct_status == '품절') + { + $stock_use = 0; + // 재고에 다시 더한다. + if($ct['io_id']) { + $sql = " update {$g5['g5_shop_item_option_table']} + set io_stock_qty = io_stock_qty + '{$ct['ct_qty']}' + where it_id = '{$ct['it_id']}' + and io_id = '{$ct['io_id']}' + and io_type = '{$ct['io_type']}' "; + } else { + $sql = " update {$g5['g5_shop_item_table']} + set it_stock_qty = it_stock_qty + '{$ct['ct_qty']}' + where it_id = '{$ct['it_id']}' "; + } + + sql_query($sql); + } + } + else + { + // 재고 오류로 인한 수정 + if ($ct_status == '배송' || $ct_status == '완료') + { + $stock_use = 1; + // 재고에서 뺀다. + if($ct['io_id']) { + $sql = " update {$g5['g5_shop_item_option_table']} + set io_stock_qty = io_stock_qty - '{$ct['ct_qty']}' + where it_id = '{$ct['it_id']}' + and io_id = '{$ct['io_id']}' + and io_type = '{$ct['io_type']}' "; + } else { + $sql = " update {$g5['g5_shop_item_table']} + set it_stock_qty = it_stock_qty - '{$ct['ct_qty']}' + where it_id = '{$ct['it_id']}' "; + } + + sql_query($sql); + } + /* 주문 수정에서 "품절" 선택시 해당 상품 자동 품절 처리하기 + else if ($ct_status == '품절') { + $stock_use = 1; + // 재고에서 뺀다. + $sql =" update {$g5['g5_shop_item_table']} set it_stock_qty = 0 where it_id = '{$ct['it_id']}' "; + sql_query($sql); + } */ + } + + $point_use = $ct['ct_point_use']; + // 회원이면서 포인트가 0보다 크면 + // 이미 포인트를 부여했다면 뺀다. + if ($mb_id && $ct['ct_point'] && $ct['ct_point_use']) + { + $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,$ct_id"); + } + + // 히스토리에 남김 + // 히스토리에 남길때는 작업|아이디|시간|IP|그리고 나머지 자료 + $now = G5_TIME_YMDHIS; + $ct_history="\n$ct_status|{$member['mb_id']}|$now|$REMOTE_ADDR"; + + $sql = " update {$g5['g5_shop_cart_table']} + set ct_point_use = '$point_use', + ct_stock_use = '$stock_use', + ct_status = '$ct_status', + ct_history = CONCAT(ct_history,'$ct_history') + where od_id = '$od_id' + and ct_id = '$ct_id' "; + sql_query($sql); + + // it_id를 배열에 저장 + if($ct_status == '주문' || $ct_status == '취소' || $ct_status == '반품' || $ct_status == '품절' || $ct_status == '완료') + $arr_it_id[] = $ct['it_id']; +} + +// 상품 판매수량 반영 +if(is_array($arr_it_id) && !empty($arr_it_id)) { + $unq_it_id = array_unique($arr_it_id); + + foreach($unq_it_id as $it_id) { + $sql2 = " select sum(ct_qty) as sum_qty from {$g5['g5_shop_cart_table']} where it_id = '$it_id' and ct_status = '완료' "; + $row2 = sql_fetch($sql2); + + $sql3 = " update {$g5['g5_shop_item_table']} set it_sum_qty = '{$row2['sum_qty']}' where it_id = '$it_id' "; + sql_query($sql3); + } +} + +// 장바구니 상품 모두 취소일 경우 주문상태 변경 +$cancel_change = false; +if (in_array($_POST['ct_status'], $status_cancel)) { + $sql = " select count(*) as od_count1, + SUM(IF(ct_status = '취소' OR ct_status = '반품' OR ct_status = '품절', 1, 0)) as od_count2 + from {$g5['g5_shop_cart_table']} + where od_id = '$od_id' "; + $row = sql_fetch($sql); + + if($row['od_count1'] == $row['od_count2']) { + $cancel_change = true; + + $pg_res_cd = ''; + $pg_res_msg = ''; + $pg_cancel_log = ''; + + // PG 신용카드 결제 취소일 때 + if($pg_cancel == 1) { + $sql = " select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' "; + $od = sql_fetch($sql); + + if($od['od_tno'] && $od['od_settle_case'] == '신용카드') { + switch($od['od_pg']) { + case 'lg': + include_once(G5_SHOP_PATH.'/settle_lg.inc.php'); + + $LGD_TID = $od['od_tno']; + + $xpay = new XPay($configPath, $CST_PLATFORM); + + // Mert Key 설정 + $xpay->set_config_value('t'.$LGD_MID, $config['cf_lg_mert_key']); + $xpay->set_config_value($LGD_MID, $config['cf_lg_mert_key']); + + $xpay->Init_TX($LGD_MID); + + $xpay->Set('LGD_TXNAME', 'Cancel'); + $xpay->Set('LGD_TID', $LGD_TID); + + if ($xpay->TX()) { + $res_cd = $xpay->Response_Code(); + if($res_cd != '0000' && $res_cd != 'AV11') { + $pg_res_cd = $res_cd; + $pg_res_msg = $xpay->Response_Msg(); + } + } else { + $pg_res_cd = $xpay->Response_Code(); + $pg_res_msg = $xpay->Response_Msg(); + } + break; + case 'inicis': + include_once(G5_SHOP_PATH.'/settle_inicis.inc.php'); + $cancel_msg = iconv_euckr('쇼핑몰 운영자 승인 취소'); + + /********************* + * 3. 취소 정보 설정 * + *********************/ + $inipay->SetField("type", "cancel"); // 고정 (절대 수정 불가) + $inipay->SetField("mid", $default['de_inicis_mid']); // 상점아이디 + /************************************************************************************************** + * admin 은 키패스워드 변수명입니다. 수정하시면 안됩니다. 1111의 부분만 수정해서 사용하시기 바랍니다. + * 키패스워드는 상점관리자 페이지(https://iniweb.inicis.com)의 비밀번호가 아닙니다. 주의해 주시기 바랍니다. + * 키패스워드는 숫자 4자리로만 구성됩니다. 이 값은 키파일 발급시 결정됩니다. + * 키패스워드 값을 확인하시려면 상점측에 발급된 키파일 안의 readme.txt 파일을 참조해 주십시오. + **************************************************************************************************/ + $inipay->SetField("admin", $default['de_inicis_admin_key']); //비대칭 사용키 키패스워드 + $inipay->SetField("tid", $od['od_tno']); // 취소할 거래의 거래아이디 + $inipay->SetField("cancelmsg", $cancel_msg); // 취소사유 + + /**************** + * 4. 취소 요청 * + ****************/ + $inipay->startAction(); + + /**************************************************************** + * 5. 취소 결과 * + * * + * 결과코드 : $inipay->getResult('ResultCode') ("00"이면 취소 성공) * + * 결과내용 : $inipay->getResult('ResultMsg') (취소결과에 대한 설명) * + * 취소날짜 : $inipay->getResult('CancelDate') (YYYYMMDD) * + * 취소시각 : $inipay->getResult('CancelTime') (HHMMSS) * + * 현금영수증 취소 승인번호 : $inipay->getResult('CSHR_CancelNum') * + * (현금영수증 발급 취소시에만 리턴됨) * + ****************************************************************/ + + $res_cd = $inipay->getResult('ResultCode'); + $res_msg = $inipay->getResult('ResultMsg'); + + if($res_cd != '00') { + $pg_res_cd = $res_cd; + $pg_res_msg = iconv_utf8($res_msg); + } + break; + default: + include_once(G5_SHOP_PATH.'/settle_kcp.inc.php'); + require_once(G5_SHOP_PATH.'/kcp/pp_ax_hub_lib.php'); + + // locale ko_KR.euc-kr 로 설정 + setlocale(LC_CTYPE, 'ko_KR.euc-kr'); + + $c_PayPlus = new C_PP_CLI; + + $c_PayPlus->mf_clear(); + + $tno = $od['od_tno']; + $tran_cd = '00200000'; + $g_conf_home_dir = G5_SHOP_PATH.'/kcp'; + $g_conf_key_dir = ''; + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') + { + $g_conf_log_dir = G5_SHOP_PATH.'/kcp/log'; + $g_conf_key_dir = G5_SHOP_PATH.'/kcp/bin/pub.key'; + } + $g_conf_site_cd = $default['de_kcp_mid']; + + if (preg_match("/^T000/", $g_conf_site_cd) || $default['de_card_test']) { + $g_conf_gw_url = "testpaygw.kcp.co.kr"; + } else { + $g_conf_gw_url = "paygw.kcp.co.kr"; + } + $cancel_msg = iconv_euckr('쇼핑몰 운영자 승인 취소'); + $cust_ip = $_SERVER['REMOTE_ADDR']; + $bSucc_mod_type = "STSC"; + + $c_PayPlus->mf_set_modx_data( "tno", $tno ); // KCP 원거래 거래번호 + $c_PayPlus->mf_set_modx_data( "mod_type", $bSucc_mod_type ); // 원거래 변경 요청 종류 + $c_PayPlus->mf_set_modx_data( "mod_ip", $cust_ip ); // 변경 요청자 IP + $c_PayPlus->mf_set_modx_data( "mod_desc", $cancel_msg ); // 변경 사유 + + $c_PayPlus->mf_do_tx( $tno, $g_conf_home_dir, $g_conf_site_cd, + $g_conf_site_key, $tran_cd, "", + $g_conf_gw_url, $g_conf_gw_port, "payplus_cli_slib", + $ordr_idxx, $cust_ip, "3" , + 0, 0, $g_conf_key_dir, $g_conf_log_dir); + + $res_cd = $c_PayPlus->m_res_cd; + $res_msg = $c_PayPlus->m_res_msg; + + if($res_cd != '0000') { + $pg_res_cd = $res_cd; + $pg_res_msg = iconv_utf8($res_msg); + } + + // locale 설정 초기화 + setlocale(LC_CTYPE, ''); + break; + } + + // PG 취소요청 성공했으면 + if($pg_res_cd == '') { + $pg_cancel_log = ' PG 신용카드 승인취소 처리'; + $sql = " update {$g5['g5_shop_order_table']} + set od_refund_price = '{$od['od_receipt_price']}' + where od_id = '$od_id' "; + sql_query($sql); + } + } + } + + // 관리자 주문취소 로그 + $mod_history .= G5_TIME_YMDHIS.' '.$member['mb_id'].' 주문'.$_POST['ct_status'].' 처리'.$pg_cancel_log."\n"; + } +} + +// 미수금 등의 정보 +$info = get_order_info($od_id); + +if(!$info) + alert('주문자료가 존재하지 않습니다.'); + +$sql = " update {$g5['g5_shop_order_table']} + set od_cart_price = '{$info['od_cart_price']}', + od_cart_coupon = '{$info['od_cart_coupon']}', + od_coupon = '{$info['od_coupon']}', + od_send_coupon = '{$info['od_send_coupon']}', + od_cancel_price = '{$info['od_cancel_price']}', + od_send_cost = '{$info['od_send_cost']}', + od_misu = '{$info['od_misu']}', + od_tax_mny = '{$info['od_tax_mny']}', + od_vat_mny = '{$info['od_vat_mny']}', + od_free_mny = '{$info['od_free_mny']}' "; +if ($mod_history) { // 주문변경 히스토리 기록 + $sql .= " , od_mod_history = CONCAT(od_mod_history,'$mod_history') "; +} + +if($cancel_change) { + $sql .= " , od_status = '취소' "; // 주문상품 모두 취소, 반품, 품절이면 주문 취소 +} else { + if (in_array($_POST['ct_status'], $status_normal)) { // 정상인 주문상태만 기록 + $sql .= " , od_status = '{$_POST['ct_status']}' "; + } +} + +$sql .= " where od_id = '$od_id' "; +sql_query($sql); + +$qstr = "sort1=$sort1&sort2=$sort2&sel_field=$sel_field&search=$search&page=$page"; + +$url = "./orderform.php?od_id=$od_id&$qstr"; + +// 신용카드 취소 때 오류가 있으면 알림 +if($pg_cancel == 1 && $pg_res_cd && $pg_res_msg) { + alert('오류코드 : '.$pg_res_cd.' 오류내용 : '.$pg_res_msg, $url); +} else { + // 1.06.06 + $od = sql_fetch(" select od_receipt_point from {$g5['g5_shop_order_table']} where od_id = '$od_id' "); + if ($od['od_receipt_point']) + alert("포인트로 결제한 주문은,\\n\\n주문상태 변경으로 인해 포인트의 가감이 발생하는 경우\\n\\n회원관리 > 포인트관리에서 수작업으로 포인트를 맞추어 주셔야 합니다.", $url); + else + goto_url($url); +} +?> diff --git a/adm/shop_admin/orderformreceiptupdate.php b/adm/shop_admin/orderformreceiptupdate.php new file mode 100644 index 000000000..7b4472a27 --- /dev/null +++ b/adm/shop_admin/orderformreceiptupdate.php @@ -0,0 +1,146 @@ + diff --git a/adm/shop_admin/orderformupdate.php b/adm/shop_admin/orderformupdate.php new file mode 100644 index 000000000..1ff37a11c --- /dev/null +++ b/adm/shop_admin/orderformupdate.php @@ -0,0 +1,43 @@ + diff --git a/adm/shop_admin/orderlist.php b/adm/shop_admin/orderlist.php new file mode 100644 index 000000000..61ee11354 --- /dev/null +++ b/adm/shop_admin/orderlist.php @@ -0,0 +1,661 @@ + 0 "; + break; + default: + $where[] = " od_status = '$od_status' "; + break; + } + + switch ($od_status) { + case '주문' : + $sort1 = "od_id"; + $sort2 = "desc"; + break; + case '입금' : // 결제완료 + $sort1 = "od_receipt_time"; + $sort2 = "desc"; + break; + case '배송' : // 배송중 + $sort1 = "od_invoice_time"; + $sort2 = "desc"; + break; + } +} + +if ($od_settle_case) { + $where[] = " od_settle_case = '$od_settle_case' "; +} + +if ($od_misu) { + $where[] = " od_misu != 0 "; +} + +if ($od_cancel_price) { + $where[] = " od_cancel_price != 0 "; +} + +if ($od_refund_price) { + $where[] = " od_refund_price != 0 "; +} + +if ($od_receipt_point) { + $where[] = " od_receipt_point != 0 "; +} + +if ($od_coupon) { + $where[] = " od_coupon != 0 "; +} + +if ($od_escrow) { + $where[] = " od_escrow = 1 "; +} + +if ($fr_date && $to_date) { + $where[] = " od_time between '$fr_date 00:00:00' and '$to_date 23:59:59' "; +} + +if ($where) { + $sql_search = ' where '.implode(' and ', $where); +} + +if ($sel_field == "") $sel_field = "od_id"; +if ($sort1 == "") $sort1 = "od_id"; +if ($sort2 == "") $sort2 = "desc"; + +$sql_common = " from {$g5['g5_shop_order_table']} $sql_search "; + +$sql = " select count(od_id) as cnt " . $sql_common; +$row = sql_fetch($sql); +$total_count = $row['cnt']; + +$rows = $config['cf_page_rows']; +$total_page = ceil($total_count / $rows); // 전체 페이지 계산 +if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) +$from_record = ($page - 1) * $rows; // 시작 열을 구함 + +$sql = " select *, + (od_cart_coupon + od_coupon + od_send_coupon) as couponprice + $sql_common + order by $sort1 $sort2 + limit $from_record, $rows "; +$result = sql_query($sql); + +$qstr1 = "od_status=".urlencode($od_status)."&od_settle_case=".urlencode($od_settle_case)."&od_misu=$od_misu&od_cancel_price=$od_cancel_price&od_refund_price=$od_refund_price&od_receipt_point=$od_receipt_point&od_coupon=$od_coupon&fr_date=$fr_date&to_date=$to_date&sel_field=$sel_field&search=$search&save_search=$search"; +$qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page"; + +$listall = '전체목록'; + +// 주문삭제 히스토리 테이블 필드 추가 +if(!sql_query(" select mb_id from {$g5['g5_shop_order_delete_table']} limit 1 ", false)) { + sql_query(" ALTER TABLE `{$g5['g5_shop_order_delete_table']}` + ADD `mb_id` varchar(20) NOT NULL DEFAULT '' AFTER `de_data`, + ADD `de_ip` varchar(255) NOT NULL DEFAULT '' AFTER `mb_id`, + ADD `de_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `de_ip` ", true); +} +?> + +
    + + 전체 주문내역 건 + 0) { ?> + 엑셀배송처리 + +
    + +
    + + + + + + + + + + + + + +
    + +
    +
    + 주문상태 + > + + > + + > + + > + + > + + > + + > + + > + +
    + +
    + 결제수단 + > + + > + + > + + > + + > + + > + +
    + +
    + 기타선택 + > + + > + + > + + > + + > + + + > + + +
    + +
    + 주문일자 + ~ + + + + + + + + + +
    +
    + +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + '; + } + else + { + $s_receipt_way = '결제수단없음'; + $s_br = '
    '; + } + + if ($row['od_receipt_point'] > 0) + $s_receipt_way .= $s_br."포인트"; + + $mb_nick = get_sideview($row['mb_id'], get_text($row['od_name']), $row['od_email'], ''); + + $od_cnt = 0; + if ($row['mb_id']) + { + $sql2 = " select count(*) as cnt from {$g5['g5_shop_order_table']} where mb_id = '{$row['mb_id']}' "; + $row2 = sql_fetch($sql2); + $od_cnt = $row2['cnt']; + } + + // 주문 번호에 device 표시 + $od_mobile = ''; + if($row['od_mobile']) + $od_mobile = '(M)'; + + // 주문번호에 - 추가 + switch(strlen($row['od_id'])) { + case 16: + $disp_od_id = substr($row['od_id'],0,8).'-'.substr($row['od_id'],8); + break; + default: + $disp_od_id = substr($row['od_id'],0,6).'-'.substr($row['od_id'],6); + break; + } + + // 주문 번호에 에스크로 표시 + $od_paytype = ''; + if($default['de_escrow_use'] && $row['od_escrow']) + $od_paytype = '에스크로'; + + $uid = md5($row['od_id'].$row['od_time'].$row['od_ip']); + + $invoice_time = is_null_time($row['od_invoice_time']) ? G5_TIME_YMDHIS : $row['od_invoice_time']; + $delivery_company = $row['od_delivery_company'] ? $row['od_delivery_company'] : $default['de_delivery_company']; + + $bg = 'bg'.($i%2); + $td_color = 0; + if($row['od_cancel_price'] > 0) { + $bg .= 'cancel'; + $td_color = 1; + } + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + '; + ?> + + + + + + + + + + + + + + + +
    주문 내역 목록
    + + + ">주문번호주문자주문자전화받는분주문합계
    선불배송비포함
    입금합계주문취소쿠폰미수금보기
    회원ID주문상품수누적주문수
    주문상태결제수단운송장번호배송회사배송일시
    + + + + + + + + + 보기 +
    + + + + 비회원 + + 건건
    + + + + + + + + + + + + + + + + + +
    자료가 없습니다.
      건합 계
    +
    + +
    + + + + + + + + + + + + + + + + + 주문상태에서만 삭제가 가능합니다. +
    + +
    +

    + <무통장>인 경우에만 <주문>에서 <입금>으로 변경됩니다. 가상계좌는 입금시 자동으로 <입금>처리됩니다.
    + <준비>에서 <배송>으로 변경시 <에스크로배송등록>을 체크하시면 에스크로 주문에 한해 PG사에 배송정보가 자동 등록됩니다.
    + 주의! 주문번호를 클릭하여 나오는 주문상세내역의 주소를 외부에서 조회가 가능한곳에 올리지 마십시오. +

    +
    + +
    + + + + + + + + diff --git a/adm/shop_admin/orderlistdelete.php b/adm/shop_admin/orderlistdelete.php new file mode 100644 index 000000000..2e874d69d --- /dev/null +++ b/adm/shop_admin/orderlistdelete.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/adm/shop_admin/orderlistupdate.php b/adm/shop_admin/orderlistupdate.php new file mode 100644 index 000000000..58ec1ce0a --- /dev/null +++ b/adm/shop_admin/orderlistupdate.php @@ -0,0 +1,171 @@ +SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']); +} + +for ($i=0; $i"; + + $current_status = $od['od_status']; + $change_status = $_POST['od_status']; + + switch ($current_status) + { + case '주문' : + if ($change_status != '입금') continue; + if ($od['od_settle_case'] != '무통장') continue; + change_status($od_id, '주문', '입금'); + order_update_receipt($od_id); + + // SMS + if($config['cf_sms_use'] == 'icode' && $_POST['send_sms'] && $default['de_sms_use4']) { + $sms_contents = conv_sms_contents($od_id, $default['de_sms_cont4']); + if($sms_contents) { + $receive_number = preg_replace("/[^0-9]/", "", $od['od_hp']); // 수신자번호 + $send_number = preg_replace("/[^0-9]/", "", $default['de_admin_company_tel']); // 발신자번호 + + if($receive_number && $send_number) { + $SMS->Add($receive_number, $send_number, $config['cf_icode_id'], $sms_contents, ""); + $sms_count++; + } + } + } + + // 메일 + if($config['cf_email_use'] && $_POST['od_send_mail']) + include './ordermail.inc.php'; + + break; + + case '입금' : + if ($change_status != '준비') continue; + change_status($od_id, '입금', '준비'); + break; + + case '준비' : + if ($change_status != '배송') continue; + + $delivery['invoice'] = $invoice; + $delivery['invoice_time'] = $invoice_time; + $delivery['delivery_company'] = $delivery_company; + + order_update_delivery($od_id, $od['mb_id'], $change_status, $delivery); + change_status($od_id, '준비', '배송'); + + // SMS + if($config['cf_sms_use'] == 'icode' && $_POST['send_sms'] && $default['de_sms_use5']) { + $sms_contents = conv_sms_contents($od_id, $default['de_sms_cont5']); + if($sms_contents) { + $receive_number = preg_replace("/[^0-9]/", "", $od['od_hp']); // 수신자번호 + $send_number = preg_replace("/[^0-9]/", "", $default['de_admin_company_tel']); // 발신자번호 + + if($receive_number && $send_number) { + $SMS->Add($receive_number, $send_number, $config['cf_icode_id'], $sms_contents, ""); + $sms_count++; + } + } + } + + // 메일 + if($config['cf_email_use'] && $_POST['od_send_mail']) + include './ordermail.inc.php'; + + // 에스크로 배송 + if($_POST['send_escrow'] && $od['od_tno'] && $od['od_escrow']) { + $escrow_tno = $od['od_tno']; + $escrow_numb = $invoice; + $escrow_corp = $delivery_company; + + include(G5_SHOP_PATH.'/'.$od['od_pg'].'/escrow.register.php'); + } + + break; + + case '배송' : + if ($change_status != '완료') continue; + change_status($od_id, '배송', '완료'); + + // 완료인 경우에만 상품구입 합계수량을 상품테이블에 저장한다. + $sql2 = " select it_id from {$g5['g5_shop_cart_table']} where od_id = '$od_id' and ct_status = '완료' group by it_id "; + $result2 = sql_query($sql2); + for ($k=0; $row2=sql_fetch_array($result2); $k++) { + $sql3 = " select sum(ct_qty) as sum_qty from {$g5['g5_shop_cart_table']} where it_id = '{$row2['it_id']}' and ct_status = '완료' "; + $row3 = sql_fetch($sql3); + + $sql4 = " update {$g5['g5_shop_item_table']} set it_sum_qty = '{$row3['sum_qty']}' where it_id = '{$row2['it_id']}' "; + sql_query($sql4); + } + /* + $sql2 = " select it_id, sum(ct_qty) as sum_qty from {$g5['g5_shop_cart_table']} where od_id = '$od_id' and ct_status = '완료' group by it_id "; + $result2 = sql_query($sql2); + for ($k=0; $row2=sql_fetch_array($result2); $k++) { + $sql3 = " update {$g5['g5_shop_item_table']} set it_sum_qty = it_sum_qty + '{$row2['sum_qty']}' where it_id = '{$row2['it_id']}' "; + sql_query($sql3); + } + */ + break; + + } // switch end + + + // 주문정보 + $info = get_order_info($od_id); + if(!$info) continue; + + $sql = " update {$g5['g5_shop_order_table']} + set od_misu = '{$info['od_misu']}', + od_tax_mny = '{$info['od_tax_mny']}', + od_vat_mny = '{$info['od_vat_mny']}', + od_free_mny = '{$info['od_free_mny']}', + od_send_cost = '{$info['od_send_cost']}' + where od_id = '$od_id' "; + sql_query($sql, true); + +} + +// SMS +if($config['cf_sms_use'] == 'icode' && $_POST['send_sms'] && $sms_count) +{ + $SMS->Send(); +} + +$qstr = "sort1=$sort1&sort2=$sort2&sel_field=$sel_field&search=$search"; +$qstr .= "&od_status=$od_status"; +$qstr .= "&od_settle_case=$od_settle_case"; +$qstr .= "&od_misu=$od_misu"; +$qstr .= "&od_cancel_price=$od_cancel_price"; +$qstr .= "&od_receipt_price=$od_receipt_price"; +$qstr .= "&od_receipt_point=$od_receipt_point"; +$qstr .= "&od_receipt_coupon=$od_receipt_coupon"; +//$qstr .= "&page=$page"; + +//exit; + +goto_url("./orderlist.php?$qstr"); +?> \ No newline at end of file diff --git a/adm/shop_admin/ordermail.inc.php b/adm/shop_admin/ordermail.inc.php new file mode 100644 index 000000000..f24dd1981 --- /dev/null +++ b/adm/shop_admin/ordermail.inc.php @@ -0,0 +1,109 @@ + 0 && $od['od_settle_case'] == '신용카드') { + $card_list['od_receipt_time'] = $od['od_receipt_time']; + $card_list['od_receipt_price'] = display_price($od['od_receipt_price']); + + $is_receipt = true; + } + + // 무통장 입금 + if ($od['od_receipt_price'] > 0 && $od['od_settle_case'] == '무통장') { + $bank_list['od_receipt_time'] = $od['od_receipt_time']; + $bank_list['od_receipt_price'] = display_price($od['od_receipt_price']); + $bank_list['od_deposit_name'] = $od['od_deposit_name']; + + $is_receipt = true; + } + + // 포인트 입금 + if ($od['od_receipt_point'] > 0) { + $point_list['od_time'] = $od['od_time']; + $point_list['od_receipt_point'] = display_point($od['od_receipt_point']); + + $is_receipt = true; + } + + // 배송정보 + $is_delivery = false; + if ($od['od_delivery_company'] && $od['od_invoice']) { + $delivery_list['dl_company'] = $od['od_delivery_company']; + $delivery_list['od_invoice'] = $od['od_invoice']; + $delivery_list['od_invoice_time'] = $od['od_invoice_time']; + $delivery_list['dl_inquiry'] = get_delivery_inquiry($od['od_delivery_company'], $od['od_invoice'], 'dvr_link'); + + $is_delivery = true; + } + + // 입금 또는 배송내역이 있다면 메일 발송 + if ($is_receipt || $is_delivery) + { + ob_start(); + include G5_SHOP_PATH.'/mail/ordermail.mail.php'; + $content = ob_get_contents(); + ob_end_clean(); + + $title = $config['cf_title'].' - '.$od['od_name'].'님 주문 처리 내역 안내'; + $email = $od['od_email']; + + // 메일 보낸 내역 상점메모에 update + $od_shop_memo = G5_TIME_YMDHIS.' - 결제/배송내역 메일발송\n' . $od['od_shop_memo']; + /* 1.00.06 + ** 주석처리 - 처리하지 않음 + if ($receipt_check) + $od_shop_memo .= ", 입금확인"; + if ($invoice_check) + $od_shop_memo .= ", 송장번호"; + */ + + sql_query(" update {$g5['g5_shop_order_table']} set od_shop_memo = '$od_shop_memo' where od_id = '$od_id' "); + + mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $email, $title, $content, 1); + } +} +?> diff --git a/adm/shop_admin/orderpartcancel.php b/adm/shop_admin/orderpartcancel.php new file mode 100644 index 000000000..c1e0345c4 --- /dev/null +++ b/adm/shop_admin/orderpartcancel.php @@ -0,0 +1,104 @@ += G5_TIME_YMD) + alert_close('실시간 계좌이체건의 부분취소 요청은 결제일 익일에 가능합니다.'); + +if($od['od_receipt_price'] - $od['od_refund_price'] <= 0) + alert_close('부분취소 처리할 금액이 없습니다.'); + +$g5['title'] = $od['od_settle_case'].' 부분취소'; +include_once(G5_PATH.'/head.sub.php'); + +// 취소가능금액 +$od_misu = abs($od['od_misu']); +?> + +
    + + +
    +

    부분취소

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    입력
    취소가능 금액
    원
    원
    +
    + +
    + + +
    +
    +
    + + + + \ No newline at end of file diff --git a/adm/shop_admin/orderpartcancelupdate.php b/adm/shop_admin/orderpartcancelupdate.php new file mode 100644 index 000000000..c0b80689e --- /dev/null +++ b/adm/shop_admin/orderpartcancelupdate.php @@ -0,0 +1,52 @@ += G5_TIME_YMD) + alert_close('실시간 계좌이체건의 부분취소 요청은 결제일 익일에 가능합니다.'); + +// 금액비교 +$od_misu = abs($od['od_misu']); + +if(($tax_mny && $free_mny) && ($tax_mny + $free_mny) > $od_misu) + alert('과세, 비과세 취소금액의 합을 '.display_price($od_misu).' 이하로 입력해 주십시오.'); + +if($tax_mny && $tax_mny > $od_misu) + alert('과세 취소금액을 '.display_price($od_misu).' 이하로 입력해 주십시오.'); + +if($free_mny && $free_mny > $od_misu) + alert('비과세 취소금액을 '.display_price($od_misu).' 이하로 입력해 주십시오.'); + +// PG사별 부분취소 실행 +include_once(G5_SHOP_PATH.'/'.$od['od_pg'].'/orderpartcancel.inc.php'); + +include_once(G5_PATH.'/head.sub.php'); +?> + + + + \ No newline at end of file diff --git a/adm/shop_admin/orderprint.php b/adm/shop_admin/orderprint.php new file mode 100644 index 000000000..a1a9ce012 --- /dev/null +++ b/adm/shop_admin/orderprint.php @@ -0,0 +1,110 @@ + + +
    + +
    +
    + + + 기간별 출력 + + + + + + + + " id="fr_date" required class="required frm_input" size="10" maxlength="8"> + ~ + + " id="to_date" required class="required frm_input" size="10" maxlength="8"> + + +
    +
    + +
    + +
    + + 주문번호구간별 출력 + + + + + + + + + + ~ + + + + +
    +
    + +
    + + + +
    +

    기간별 혹은 주문번호구간별 주문내역을 새창으로 출력할 수 있습니다.

    +
    + + + + diff --git a/adm/shop_admin/orderprintresult.php b/adm/shop_admin/orderprintresult.php new file mode 100644 index 000000000..461e9f111 --- /dev/null +++ b/adm/shop_admin/orderprintresult.php @@ -0,0 +1,490 @@ +addworksheet(); + + // Put Excel data + $data = array('우편번호', '주소', '이름', '전화1', '전화2', '상품명', '수량', '선택사항', '배송비', '상품코드', '주문번호', '운송장번호', '전하실말씀'); + $data = array_map('iconv_euckr', $data); + + $col = 0; + foreach($data as $cell) { + $worksheet->write(0, $col++, $cell); + } + + $save_it_id = ''; + for($i=1; $row=sql_fetch_array($result); $i++) + { + if($save_it_id != $row['it_id']) { + // 합계금액 계산 + $sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price, + SUM(ct_qty) as qty + from {$g5['g5_shop_cart_table']} + where it_id = '{$row['it_id']}' + and od_id = '{$row['od_id']}' "; + $sum = sql_fetch($sql); + + switch($row['ct_send_cost']) + { + case 1: + $ct_send_cost = '착불'; + break; + case 2: + $ct_send_cost = '무료'; + break; + default: + $ct_send_cost = '선불'; + break; + } + + // 조건부무료 + if($row['it_sc_type'] == 2) { + $sendcost = get_item_sendcost($row['it_id'], $sum['price'], $sum['qty'], $row['od_id']); + + if($sendcost == 0) + $ct_send_cost = '무료'; + } + + $save_it_id = $row['it_id']; + + $ct_send_cost = iconv_euckr($ct_send_cost); + } + + $row = array_map('iconv_euckr', $row); + + $worksheet->write($i, 0, $row['od_b_zip1'].$row['od_b_zip2']); + $worksheet->write($i, 1, print_address($row['od_b_addr1'], $row['od_b_addr2'], $row['od_b_addr3'], $row['od_b_addr_jibeon'])); + $worksheet->write($i, 2, $row['od_b_name']); + $worksheet->write($i, 3, ' '.$row['od_b_tel']); + $worksheet->write($i, 4, ' '.$row['od_b_hp']); + $worksheet->write($i, 5, $row['it_name']); + $worksheet->write($i, 6, $row['ct_qty']); + $worksheet->write($i, 7, $row['ct_option']); + $worksheet->write($i, 8, $ct_send_cost); + $worksheet->write($i, 9, ' '.$row['it_id']); + $worksheet->write($i, 10, ' '.$row['od_id']); + $worksheet->write($i, 11, $row['od_invoice']); + $worksheet->write($i, 12, $row['od_memo']); + } + + $workbook->close(); + + header("Content-Type: application/x-msexcel; name=\"orderlist-".date("ymd", time()).".xls\""); + header("Content-Disposition: inline; filename=\"orderlist-".date("ymd", time()).".xls\""); + $fh=fopen($fname, "rb"); + fpassthru($fh); + unlink($fname); + + exit; +} + +function get_order($od_id) +{ + global $g5; + + $sql = " select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' "; + return sql_fetch($sql); +} + +$g5['title'] = "주문내역"; +include_once(G5_PATH.'/head.sub.php'); + +if ($case == 1) +{ + $fr_date = date_conv($fr_date); + $to_date = date_conv($to_date); + $sql = " SELECT DISTINCT a.od_id FROM {$g5['g5_shop_order_table']} a, {$g5['g5_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.od_id FROM {$g5['g5_shop_order_table']} a, {$g5['g5_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) + $sql .= " and b.ct_status = '$ct_status' "; +$sql .= " order by a.od_id "; +$result = sql_query($sql); +if (mysql_num_rows($result) == 0) +{ + echo ""; + exit; +} +?> + +
    +

    + +

    + + + +
    +

    주문번호

    +

    보내는 사람 :

    + +
    +
    주소
    +
    +
    휴대폰
    +
    +
    전화번호
    +
    +
    + +

    보내는 사람과 받는 사람이 동일합니다.

    + +

    받는 사람 :

    +
    +
    주소
    +
    +
    휴대폰
    +
    +
    전화번호
    +
    +
    + + +

    주문 목록

    +
    + + + + + + + + + + + + + = 0) + $price_plus = '+'; + + $it_name = "$it_name ({$row2['ct_option']} ".$price_plus.display_price($row2['io_price']).")"; + + if($save_it_id != $row2['it_id']) { + switch($row2['ct_send_cost']) + { + case 1: + $ct_send_cost = '착불'; + break; + case 2: + $ct_send_cost = '무료'; + break; + default: + $ct_send_cost = '선불'; + break; + } + + // 합계금액 계산 + $sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price, + SUM(ct_qty) as qty + from {$g5['g5_shop_cart_table']} + where it_id = '{$row2['it_id']}' + and od_id = '{$row2['od_id']}' "; + $sum = sql_fetch($sql); + + // 조건부무료 + if($row2['it_sc_type'] == 2) { + $sendcost = get_item_sendcost($row2['it_id'], $sum['price'], $sum['qty'], $row['od_id']); + + if($sendcost == 0) + $ct_send_cost = '무료'; + } + + $save_it_id = $row2['it_id']; + } + + $fontqty1 = $fontqty2 = ""; + if ($row2['ct_qty'] >= 2) + { + $fontqty1 = ""; + $fontqty2 = ""; + } + + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    주문 목록
    상품명(선택사항)판매가수량소계배송비
    배송비1
    추가 배송비1
    합계
    +
    + 비고 $od_memo

    "; + if ($od_shop_memo) $od_shop_memo = "

    상점메모 $od_shop_memo

    "; + + echo " + $od_memo + $od_shop_memo + "; + ?> +
    + + + +
    + + 전체 + 개 + 원 + + <출력 끝> +
    + +
    + + + + \ No newline at end of file diff --git a/adm/shop_admin/ordersms.inc.php b/adm/shop_admin/ordersms.inc.php new file mode 100644 index 000000000..9a0aeb3dd --- /dev/null +++ b/adm/shop_admin/ordersms.inc.php @@ -0,0 +1,44 @@ +SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']); + $SMS->Add($receive_number, $send_number, $config['cf_icode_id'], iconv("utf-8", "euc-kr", stripslashes($sms_contents)), ""); + $SMS->Send(); + } + } + + if ($od_sms_baesong_check && $default['de_sms_use5']) + { + if ($od_delivery_company && $od_invoice) + { + $sms_contents = $default['de_sms_cont5']; + $sms_contents = str_replace("{이름}", $od_name, $sms_contents); + $sms_contents = str_replace("{택배회사}", $od_delivery_company, $sms_contents); + $sms_contents = str_replace("{운송장번호}", $od_invoice, $sms_contents); + $sms_contents = str_replace("{주문번호}", $od_id, $sms_contents); + $sms_contents = str_replace("{회사명}", $default['de_admin_company_name'], $sms_contents); + + $SMS = new SMS; + $SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']); + $SMS->Add($receive_number, $send_number, $config['cf_icode_id'], iconv("utf-8", "euc-kr", stripslashes($sms_contents)), ""); + $SMS->Send(); + } + } +} +?> diff --git a/adm/shop_admin/personalpaycopy.php b/adm/shop_admin/personalpaycopy.php new file mode 100644 index 000000000..3fdf22ff0 --- /dev/null +++ b/adm/shop_admin/personalpaycopy.php @@ -0,0 +1,68 @@ + + +
    +

    개인결제 복사

    + +
    + + +
    + + + + + + + + + + + + + + + + +
    원
    +
    + +
    + + +
    + +
    + +
    + + + + \ No newline at end of file diff --git a/adm/shop_admin/personalpaycopyupdate.php b/adm/shop_admin/personalpaycopyupdate.php new file mode 100644 index 000000000..a755fe6d1 --- /dev/null +++ b/adm/shop_admin/personalpaycopyupdate.php @@ -0,0 +1,54 @@ + + + + + \ No newline at end of file diff --git a/adm/shop_admin/personalpayform.php b/adm/shop_admin/personalpayform.php new file mode 100644 index 000000000..5ae284f70 --- /dev/null +++ b/adm/shop_admin/personalpayform.php @@ -0,0 +1,288 @@ + 0) + $pp['pp_price'] = $od['od_misu']; + $wrp_tag_st = '
    '.PHP_EOL.'

    '.$html_title.'

    '; + $wrp_tag_end = '
    '; +} +else { // 현재페이지일 때 + include_once (G5_ADMIN_PATH.'/admin.head.php'); +} +$pg_anchor = ''; + +// pg 설정 필드 추가 +if(!sql_query(" select pp_pg from {$g5['g5_shop_personalpay_table']} limit 1 ", false)) { + sql_query(" ALTER TABLE `{$g5['g5_shop_personalpay_table']}` + ADD `pp_pg` varchar(255) NOT NULL DEFAULT '' AFTER `pp_price` ", true); + + // 개인결제 PG kcp로 설정 + sql_query(" update {$g5['g5_shop_personalpay_table']} set pp_pg = 'kcp' "); +} + +// 현금영수증 필드 추가 +if(!sql_query(" select pp_cash from {$g5['g5_shop_personalpay_table']} limit 1 ", false)) { + sql_query(" ALTER TABLE `{$g5['g5_shop_personalpay_table']}` + ADD `pp_cash` tinyint(4) NOT NULL DEFAULT '0' AFTER `pp_shop_memo`, + ADD `pp_cash_no` varchar(255) NOT NULL DEFAULT '' AFTER `pp_cash`, + ADD `pp_cash_info` text NOT NULL AFTER `pp_cash_no`, + ADD `pp_email` varchar(255) NOT NULL DEFAULT '' AFTER `pp_name`, + ADD `pp_hp` varchar(255) NOT NULL DEFAULT '' AFTER `pp_email`, + ADD `pp_casseqno` varchar(255) NOT NULL DEFAULT '' AFTER `pp_app_no` ", true); +} +?> + +
    + + + + + + + + + + + + + + +
    +

    주문 정보

    + +
    +

    주문 관련 기본 정보입니다.

    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    주문 정보 목록
    원
    +
    +
    + +
    + + + + + 목록 + + + 삭제 + +
    + + +
    +

    결제 정보

    + +
    +

    결제 관련 정보입니다.

    +
    + +
    + + + + + + + + + + + + + + + + + + + + + 0) + $is_cash_receipt = false; + } + + if ($is_cash_receipt && ($pp['pp_price'] - $pp['pp_receipt_price']) == 0) { + if ($pp['pp_receipt_price'] && ($pp['pp_settle_case'] == '무통장' || $pp['pp_settle_case'] == '가상계좌' || $pp['pp_settle_case'] == '계좌이체')) { + ?> + + + + + + + + + + + + + + + +
    결제 정보 목록
    원
    + +
    + " onclick="if (this.checked == true) this.form.pp_receipt_time.value=this.form.pp_receipt_chk.value; else this.form.pp_receipt_time.value = this.form.pp_receipt_time.defaultValue;"> +
    + " id="pp_receipt_time" class="frm_input" maxlength="19"> +
    현금영수증 + + 현금영수증 확인 + + 현금영수증 발급 + +
    + +
    +
    +
    + +
    + + + + + 목록 + + + 삭제 + +
    + + + +
    + + + + \ No newline at end of file diff --git a/adm/shop_admin/personalpayformupdate.php b/adm/shop_admin/personalpayformupdate.php new file mode 100644 index 000000000..190b61c58 --- /dev/null +++ b/adm/shop_admin/personalpayformupdate.php @@ -0,0 +1,72 @@ + \ No newline at end of file diff --git a/adm/shop_admin/personalpaylist.php b/adm/shop_admin/personalpaylist.php new file mode 100644 index 000000000..a8e49fefb --- /dev/null +++ b/adm/shop_admin/personalpaylist.php @@ -0,0 +1,182 @@ + + +
    + 전체 건 +
    + +
    + + + + +
    + + + +
    + + + + + + + +
    + + + + + + + + + + + + + + + + + + '.$row['od_id'].''; + else + $od_id = ' '; + + $bg = 'bg'.($i%2); + ?> + + + + + + + + + + + + + + + '; + ?> + +
    목록
    + + + 제목주문번호주문금액입금금액미수금액입금방법입금일사용관리
    + + + + 수정 + 복사 +
    자료가 없습니다.
    +
    + +
    + +
    + +
    + + + + + + \ No newline at end of file diff --git a/adm/shop_admin/personalpaylistdelete.php b/adm/shop_admin/personalpaylistdelete.php new file mode 100644 index 000000000..f5c6bee0f --- /dev/null +++ b/adm/shop_admin/personalpaylistdelete.php @@ -0,0 +1,25 @@ + \ No newline at end of file diff --git a/adm/shop_admin/price.php b/adm/shop_admin/price.php new file mode 100644 index 000000000..aecbe03b4 --- /dev/null +++ b/adm/shop_admin/price.php @@ -0,0 +1,90 @@ + +
  • 가격비교사이트 연동 안내
  • +
  • 사이트별 엔진페이지 URL
  • +
  • 사이트별 엔진페이지 URL [장바구니 담기]
  • +'; +?> + +
    +

    가격비교사이트 연동 안내

    + + +
    +
      +
    1. 가격비교사이트는 네이버 지식쇼핑, 다음 쇼핑하우 등이 있습니다.
    2. +
    3. 앞서 나열한 가격비교사이트 중 희망하시는 사이트에 입점합니다.
    4. +
    5. 사이트별 엔진페이지 URL을 참고하여 해당 엔진페이지 URL 을 입점하신 사이트에 알려주시면 됩니다.
    6. +
    +
    +
    + +
    +

    사이트별 엔진페이지 URL

    + + +
    +

    사이트 명을 클릭하시면 해당 사이트로 이동합니다.

    + +
    +
    네이버 지식쇼핑
    +
    + +
    +
    다음 쇼핑하우
    +
    + +
    +
    +
    +
    + +
    +

    사이트별 엔진페이지 URL [장바구니 담기]

    + + +
    +

    사이트 명을 클릭하시면 해당 사이트로 이동합니다.

    +

    기존 엔진페이지 URL은 가격비교 사이트에서 상품 클릭시 상품상세 페이지로 이동하지만 아래의 URL은 상품 클릭시 해당 상품이 장바구니에 담기게 됩니다.

    + +
    +
    네이버 지식쇼핑
    +
    + +
    +
    다음 쇼핑하우
    +
    + +
    +
    +
    +
    + + diff --git a/adm/shop_admin/sale1.php b/adm/shop_admin/sale1.php new file mode 100644 index 000000000..4da86d85c --- /dev/null +++ b/adm/shop_admin/sale1.php @@ -0,0 +1,73 @@ + + +
    + +
    +
    + 일일 매출 + " id="date" required class="required frm_input" size="8" maxlength="8"> + + +
    +
    + +
    +
    + 일간 매출 + " id="fr_date" required class="required frm_input" size="8" maxlength="8"> + + " id="to_date" required class="required frm_input" size="8" maxlength="8"> + + +
    +
    + +
    +
    + 월간 매출 + " id="fr_month" required class="required frm_input" size="6" maxlength="6"> + + " id="to_month" required class="required frm_input" size="6" maxlength="6"> + + +
    +
    + +
    +
    + 연간 매출 + " id="fr_year" required class="required frm_input" size="4" maxlength="4"> + + " id="to_year" required class="required frm_input" size="4" maxlength="4"> + + +
    +
    + +
    + + + + diff --git a/adm/shop_admin/sale1date.php b/adm/shop_admin/sale1date.php new file mode 100644 index 000000000..cb5aa3ba6 --- /dev/null +++ b/adm/shop_admin/sale1date.php @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + '; + } else { + print_line($save); + } + ?> + + + + + + + + + + + + + + + + + +
    주문일주문수주문합계쿠폰무통장가상계좌계좌이체카드입금휴대폰포인트입금주문취소미수금
    자료가 없습니다.
    합계
    +
    + + diff --git a/adm/shop_admin/sale1month.php b/adm/shop_admin/sale1month.php new file mode 100644 index 000000000..302e75b29 --- /dev/null +++ b/adm/shop_admin/sale1month.php @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + '; + } else { + print_line($save); + } + ?> + + + + + + + + + + + + + + + + + +
    주문월주문수주문합계쿠폰무통장가상계좌계좌이체카드입금휴대폰포인트입금주문취소미수금
    자료가 없습니다.
    합 계
    +
    + + + diff --git a/adm/shop_admin/sale1today.php b/adm/shop_admin/sale1today.php new file mode 100644 index 000000000..1a112f72c --- /dev/null +++ b/adm/shop_admin/sale1today.php @@ -0,0 +1,124 @@ + + + + + diff --git a/adm/shop_admin/sale1year.php b/adm/shop_admin/sale1year.php new file mode 100644 index 000000000..d0f08fe8b --- /dev/null +++ b/adm/shop_admin/sale1year.php @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + '; + } else { + print_line($save); + } + ?> + + + + + + + + + + + + + + + + + +
    주문년도주문수주문합계쿠폰무통장가상계좌계좌이체카드입금휴대폰포인트입금주문취소미수금
    자료가 없습니다.
    합 계
    +
    + + diff --git a/adm/shop_admin/sendcostlist.php b/adm/shop_admin/sendcostlist.php new file mode 100644 index 000000000..b6f9bb921 --- /dev/null +++ b/adm/shop_admin/sendcostlist.php @@ -0,0 +1,157 @@ + + +
    +

    추가배송비 내역

    + +
    + + + +
    + + + + + + + + + + + + + + + + + + + '; + ?> + +
    추가배송비 내역
    + + + 지역명우편번호추가배송비
    + + +
    자료가 없습니다.
    +
    + +
    + +
    + +
    +
    + + + +
    +

    추가배송비 등록

    + +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    추가배송비 등록
    + (입력 예 : 123-456) +
    + (입력 예 : 123-456) +
    원
    +
    + +
    + +
    + +
    + +
    + + + + \ No newline at end of file diff --git a/adm/shop_admin/sendcostupdate.php b/adm/shop_admin/sendcostupdate.php new file mode 100644 index 000000000..bddc05032 --- /dev/null +++ b/adm/shop_admin/sendcostupdate.php @@ -0,0 +1,45 @@ + \ No newline at end of file diff --git a/adm/shop_admin/wishlist.php b/adm/shop_admin/wishlist.php new file mode 100644 index 000000000..bcd6e7cb4 --- /dev/null +++ b/adm/shop_admin/wishlist.php @@ -0,0 +1,145 @@ +전체목록'; +?> + +
    + + 건 +
    + +
    + + + + + + + + +~ + + + + +
    + +
    + + + + + + + + + + + + + + + + + '; + } + ?> + +
    순위상품평건수
    + +
    자료가 없습니다.
    +
    + + + +
    +

    고객님들이 보관함에 가장 많이 넣은 순으로 순위를 출력합니다.

    +
    + + + + diff --git a/adm/theme.js b/adm/theme.js index d20c53a60..c0d4f0fb5 100644 --- a/adm/theme.js +++ b/adm/theme.js @@ -8,7 +8,7 @@ $(function() { var set_default_skin = 0; if($(this).data("set_default_skin") == true) { - if(confirm("기본환경설정, 1:1문의 스킨을 테마에서 설정된 스킨으로 변경하시겠습니까?\n\n변경을 선택하시면 테마에서 지정된 스킨으로 회원스킨 등이 변경됩니다.")) + if(confirm("기본환경설정, 1:1문의, 쇼핑몰 스킨을 테마에서 설정된 스킨으로 변경하시겠습니까?\n\n변경을 선택하시면 테마에서 지정된 스킨으로 회원스킨 등이 변경됩니다.")) set_default_skin = 1; } diff --git a/adm/theme_config_load.php b/adm/theme_config_load.php index 544c5a6f7..8ca3d910f 100644 --- a/adm/theme_config_load.php +++ b/adm/theme_config_load.php @@ -22,7 +22,7 @@ if(!in_array($config['cf_theme'], $theme_dir)) { } $type = $_POST['type']; -$arr_type = array('board', 'conf_skin', 'conf_member'); +$arr_type = array('board', 'conf_skin', 'conf_member', 'shop_skin', 'shop_pc_index', 'shop_mobile_index', 'shop_etc', 'shop_event', 'shop_category'); if(!in_array($type, $arr_type)) { $data['error'] = '올바른 방법으로 이용해 주십시오.'; die(json_encode($data)); @@ -72,6 +72,112 @@ if($type == 'board') { if($i == 0) $data['error'] = '적용할 기본환경 회원스킨 설정이 없습니다.'; +} else if($type == 'shop_skin') { + $keys = array('de_shop_skin', 'de_shop_mobile_skin'); + + $tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys)); + + $i = 0; + foreach($keys as $val) { + if($tconfig[$val]) { + $data[$val] = preg_match('#^theme/.+$#', $tconfig[$val]) ? $tconfig[$val] : 'theme/'.$tconfig[$val]; + $i++; + } + } + + if($i == 0) + $data['error'] = '적용할 쇼핑몰 스킨 설정이 없습니다.'; +} else if($type == 'shop_pc_index') { + $keys = array(); + for($i=1; $i<=5; $i++) { + $keys[] = 'de_type'.$i.'_list_use'; + $keys[] = 'de_type'.$i.'_list_skin'; + $keys[] = 'de_type'.$i.'_list_mod'; + $keys[] = 'de_type'.$i.'_list_row'; + $keys[] = 'de_type'.$i.'_img_width'; + $keys[] = 'de_type'.$i.'_img_height'; + } + + $tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys)); + + $i = 0; + foreach($keys as $val) { + if(strlen($tconfig[$val])) { + $data[$val] = trim($tconfig[$val]); + $i++; + } + } + + if($i == 0) + $data['error'] = '적용할 테마 설정이 없습니다.'; +} else if($type == 'shop_mobile_index') { + $keys = array(); + for($i=1; $i<=5; $i++) { + $keys[] = 'de_mobile_type'.$i.'_list_use'; + $keys[] = 'de_mobile_type'.$i.'_list_skin'; + $keys[] = 'de_mobile_type'.$i.'_list_mod'; + $keys[] = 'de_mobile_type'.$i.'_list_row'; + $keys[] = 'de_mobile_type'.$i.'_img_width'; + $keys[] = 'de_mobile_type'.$i.'_img_height'; + } + + $tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys)); + + $i = 0; + foreach($keys as $val) { + if(strlen($tconfig[$val])) { + $data[$val] = trim($tconfig[$val]); + $i++; + } + } + + if($i == 0) + $data['error'] = '적용할 테마 설정이 없습니다.'; +} else if($type == 'shop_etc') { + $keys = array('de_rel_list_use', 'de_rel_list_skin', 'de_rel_list_mod', 'de_rel_img_width', 'de_rel_img_height', 'de_mobile_rel_list_use', 'de_mobile_rel_list_skin', 'de_mobile_rel_list_mod', 'de_mobile_rel_img_width', 'de_mobile_rel_img_height', 'de_search_list_skin', 'de_search_list_mod', 'de_search_list_row', 'de_search_img_width', 'de_search_img_height', 'de_mobile_search_list_skin', 'de_mobile_search_list_mod', 'de_mobile_search_list_row', 'de_mobile_search_img_width', 'de_mobile_search_img_height', 'de_mimg_width', 'de_mimg_height'); + + $tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys)); + + $i = 0; + foreach($keys as $val) { + if(strlen($tconfig[$val])) { + $data[$val] = trim($tconfig[$val]); + $i++; + } + } + + if($i == 0) + $data['error'] = '적용할 테마 설정이 없습니다.'; +} else if($type == 'shop_event') { + $keys = array('ev_skin', 'ev_img_width', 'ev_img_height', 'ev_list_mod', 'ev_list_row', 'ev_mobile_skin', 'ev_mobile_img_width', 'ev_mobile_img_height', 'ev_mobile_list_mod', 'ev_mobile_list_row'); + + $tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys)); + + $i = 0; + foreach($keys as $val) { + if(strlen($tconfig[$val])) { + $data[$val] = trim($tconfig[$val]); + $i++; + } + } + + if($i == 0) + $data['error'] = '적용할 테마 설정이 없습니다.'; +} else if($type == 'shop_category') { + $keys = array('ca_skin', 'ca_img_width', 'ca_img_height', 'ca_list_mod', 'ca_list_row', 'ca_mobile_skin', 'ca_mobile_img_width', 'ca_mobile_img_height', 'ca_mobile_list_mod', 'ca_mobile_list_row'); + + $tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys)); + + $i = 0; + foreach($keys as $val) { + if(strlen($tconfig[$val])) { + $data[$val] = trim($tconfig[$val]); + $i++; + } + } + + if($i == 0) + $data['error'] = '적용할 테마 설정이 없습니다.'; } die(json_encode($data)); diff --git a/adm/theme_preview.php b/adm/theme_preview.php index 559db4e63..dd5467d4a 100644 --- a/adm/theme_preview.php +++ b/adm/theme_preview.php @@ -10,15 +10,21 @@ if(!$theme || !in_array($theme, $theme_dir)) $info = get_theme_info($theme); -$arr_mode = array('index', 'list', 'view'); +$arr_mode = array('index', 'list', 'view', 'shop', 'ca_list', 'item'); $mode = substr(strip_tags($_GET['mode']), 0, 20); if(!in_array($mode, $arr_mode)) $mode = 'index'; -$qstr_index = '&mode=index'; -$qstr_list = '&mode=list'; -$qstr_view = '&mode=view'; -$qstr_device = '&mode='.$mode.'&device='.(G5_IS_MOBILE ? 'pc' : 'mobile'); +if(G5_COMMUNITY_USE === false || $mode == 'shop' || $mode == 'ca_list' || $mode == 'item') + define('_SHOP_', true); + +$qstr_index = '&mode=index'; +$qstr_list = '&mode=list'; +$qstr_view = '&mode=view'; +$qstr_shop = '&mode=shop'; +$qstr_ca_list = '&mode=ca_list'; +$qstr_item = '&mode=item'; +$qstr_device = '&mode='.$mode.'&device='.(G5_IS_MOBILE ? 'pc' : 'mobile'); $sql = " select bo_table, wr_parent from {$g5['board_new_table']} order by bn_id desc limit 1 "; $row = sql_fetch($sql); @@ -27,7 +33,7 @@ $board = sql_fetch(" select * from {$g5['board_table']} where bo_table = '$bo_ta $write_table = $g5['write_prefix'] . $bo_table; // theme.config.php 미리보기 게시판 스킨이 설정돼 있다면 -$tconfig = get_theme_config_value($theme, 'set_default_skin, preview_board_skin, preview_mobile_board_skin'); +$tconfig = get_theme_config_value($theme); if($mode == 'list' || $mode == 'view') { if($tconfig['preview_board_skin']) $board['bo_skin'] = preg_match('#^theme/.+$#', $tconfig['preview_board_skin']) ? $tconfig['preview_board_skin'] : 'theme/'.$tconfig['preview_board_skin']; @@ -65,6 +71,59 @@ if (G5_IS_MOBILE) { $faq_skin_url = get_skin_url('faq', $config['cf_faq_skin']); } +// 쇼핑몰 스킨 재설정 +if($tconfig['de_shop_skin']) + $default['de_shop_skin'] = preg_match('#^theme/.+$#', $tconfig['de_shop_skin']) ? $tconfig['de_shop_skin'] : 'theme/'.$tconfig['de_shop_skin']; + +if($tconfig['de_shop_mobile_skin']) + $default['de_shop_mobile_skin'] = preg_match('#^theme/.+$#', $tconfig['de_shop_mobile_skin']) ? $tconfig['de_shop_mobile_skin'] : 'theme/'.$tconfig['de_shop_mobile_skin']; + +// 쇼핑몰초기화면 변수 재설정 +for($i=1; $i<=5; $i++) { + $default['de_type'.$i.'_list_use'] = (isset($tconfig['de_type'.$i.'_list_use']) && $tconfig['de_type'.$i.'_list_use']) ? $tconfig['de_type'.$i.'_list_use'] : $default['de_type'.$i.'_list_use']; + $default['de_type'.$i.'_list_skin'] = (isset($tconfig['de_type'.$i.'_list_skin']) && $tconfig['de_type'.$i.'_list_skin']) ? $tconfig['de_type'.$i.'_list_skin'] : $default['de_type'.$i.'_list_skin']; + $default['de_type'.$i.'_list_mod'] = (isset($tconfig['de_type'.$i.'_list_mod']) && $tconfig['de_type'.$i.'_list_mod']) ? $tconfig['de_type'.$i.'_list_mod'] : $default['de_type'.$i.'_list_mod']; + $default['de_type'.$i.'_list_row'] = (isset($tconfig['de_type'.$i.'_list_row']) && $tconfig['de_type'.$i.'_list_row']) ? $tconfig['de_type'.$i.'_list_row'] : $default['de_type'.$i.'_list_row']; + $default['de_type'.$i.'_img_width'] = (isset($tconfig['de_type'.$i.'_img_width']) && $tconfig['de_type'.$i.'_img_width']) ? $tconfig['de_type'.$i.'_img_width'] : $default['de_type'.$i.'_img_width']; + $default['de_type'.$i.'_img_height'] = (isset($tconfig['de_type'.$i.'_img_height']) && $tconfig['de_type'.$i.'_img_height']) ? $tconfig['de_type'.$i.'_img_height'] : $default['de_type'.$i.'_img_height']; + + $default['de_mobile_type'.$i.'_list_use'] = (isset($tconfig['de_mobile_type'.$i.'_list_use']) && $tconfig['de_mobile_type'.$i.'_list_use']) ? $tconfig['de_mobile_type'.$i.'_list_use'] : $default['de_mobile_type'.$i.'_list_use']; + $default['de_mobile_type'.$i.'_list_skin'] = (isset($tconfig['de_mobile_type'.$i.'_list_skin']) && $tconfig['de_mobile_type'.$i.'_list_skin']) ? $tconfig['de_mobile_type'.$i.'_list_skin'] : $default['de_mobile_type'.$i.'_list_skin']; + $default['de_mobile_type'.$i.'_list_mod'] = (isset($tconfig['de_mobile_type'.$i.'_list_mod']) && $tconfig['de_mobile_type'.$i.'_list_mod']) ? $tconfig['de_mobile_type'.$i.'_list_mod'] : $default['de_mobile_type'.$i.'_list_mod']; + $default['de_mobile_type'.$i.'_list_row'] = (isset($tconfig['de_mobile_type'.$i.'_list_row']) && $tconfig['de_mobile_type'.$i.'_list_row']) ? $tconfig['de_mobile_type'.$i.'_list_row'] : $default['de_mobile_type'.$i.'_list_row']; + $default['de_mobile_type'.$i.'_img_width'] = (isset($tconfig['de_mobile_type'.$i.'_img_width']) && $tconfig['de_mobile_type'.$i.'_img_width']) ? $tconfig['de_mobile_type'.$i.'_img_width'] : $default['de_mobile_type'.$i.'_img_width']; + $default['de_mobile_type'.$i.'_img_height'] = (isset($tconfig['de_mobile_type'.$i.'_img_height']) && $tconfig['de_mobile_type'.$i.'_img_height']) ? $tconfig['de_mobile_type'.$i.'_img_height'] : $default['de_mobile_type'.$i.'_img_height']; +} + +// 상품상세 이미지 사이즈 재설정 +$default['de_mimg_width'] = (isset($tconfig['de_mimg_width']) && $tconfig['de_mimg_width']) ? $tconfig['de_mimg_width'] : $default['de_mimg_width']; +$default['de_mimg_height'] = (isset($tconfig['de_mimg_height']) && $tconfig['de_mimg_height']) ? $tconfig['de_mimg_height'] : $default['de_mimg_height']; + +// 테마 경로 설정 +if(defined('G5_THEME_PATH')) { + define('G5_THEME_SHOP_PATH', G5_THEME_PATH.'/'.G5_SHOP_DIR); + define('G5_THEME_SHOP_URL', G5_THEME_URL.'/'.G5_SHOP_DIR); + define('G5_THEME_MSHOP_PATH', G5_THEME_PATH.'/'.G5_MOBILE_DIR.'/'.G5_SHOP_DIR); + define('G5_THEME_MSHOP_URL', G5_THEME_URL.'/'.G5_MOBILE_DIR.'/'.G5_SHOP_DIR); +} + +// 스킨 경로 설정 +if(preg_match('#^theme/(.+)$#', $default['de_shop_skin'], $match)) { + define('G5_SHOP_SKIN_PATH', G5_THEME_PATH.'/'.G5_SKIN_DIR.'/shop/'.$match[1]); + define('G5_SHOP_SKIN_URL', G5_THEME_URL .'/'.G5_SKIN_DIR.'/shop/'.$match[1]); +} else { + define('G5_SHOP_SKIN_PATH', G5_PATH.'/'.G5_SKIN_DIR.'/shop/'.$default['de_shop_skin']); + define('G5_SHOP_SKIN_URL', G5_URL .'/'.G5_SKIN_DIR.'/shop/'.$default['de_shop_skin']); +} + +if(preg_match('#^theme/(.+)$#', $default['de_shop_mobile_skin'], $match)) { + define('G5_MSHOP_SKIN_PATH', G5_THEME_MOBILE_PATH.'/'.G5_SKIN_DIR.'/shop/'.$match[1]); + define('G5_MSHOP_SKIN_URL', G5_THEME_URL .'/'.G5_MOBILE_DIR.'/'.G5_SKIN_DIR.'/shop/'.$match[1]); +} else { + define('G5_MSHOP_SKIN_PATH', G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/shop/'.$default['de_shop_mobile_skin']); + define('G5_MSHOP_SKIN_URL', G5_MOBILE_URL .'/'.G5_SKIN_DIR.'/shop/'.$default['de_shop_mobile_skin']); +} + $conf = sql_fetch(" select cf_theme from {$g5['config_table']} "); $name = get_text($info['theme_name']); if($conf['cf_theme'] != $theme) { @@ -90,6 +149,13 @@ require_once(G5_PATH.'/head.sub.php');
  • 인덱스 화면
  • 게시글 리스트
  • 게시글 보기
  • + + +
  • 쇼핑몰
  • + +
  • 상품리스트
  • +
  • 상품상세
  • +
  • @@ -106,6 +172,21 @@ require_once(G5_PATH.'/head.sub.php'); $write = sql_fetch(" select * from $write_table where wr_id = '$wr_id' "); include(G5_BBS_PATH.'/board.php'); break; + case 'shop': + include(G5_SHOP_PATH.'/index.php'); + break; + case 'ca_list': + $sql = " select ca_id from {$g5['g5_shop_category_table']} where ca_use = '1' order by ca_id limit 1 "; + $tmp = sql_fetch($sql); + $ca_id = $tmp['ca_id']; + include(G5_SHOP_PATH.'/list.php'); + break; + case 'item': + $sql = " select it_id from {$g5['g5_shop_item_table']} where it_use = '1' order by it_id desc limit 1 "; + $tmp = sql_fetch($sql); + $_GET['it_id'] = $tmp['it_id']; + include(G5_SHOP_PATH.'/item.php'); + break; default: include(G5_PATH.'/index.php'); break; diff --git a/adm/theme_update.php b/adm/theme_update.php index e40f310d8..bb975f538 100644 --- a/adm/theme_update.php +++ b/adm/theme_update.php @@ -23,13 +23,14 @@ sql_query($sql); // 테마 설정 스킨 적용 if($_POST['set_default_skin'] == 1) { - $keys = 'set_default_skin, cf_member_skin, cf_mobile_member_skin, cf_new_skin, cf_mobile_new_skin, cf_search_skin, cf_mobile_search_skin, cf_connect_skin, cf_mobile_connect_skin, cf_faq_skin, cf_mobile_faq_skin, qa_skin, qa_mobile_skin'; + $keys = 'set_default_skin, cf_member_skin, cf_mobile_member_skin, cf_new_skin, cf_mobile_new_skin, cf_search_skin, cf_mobile_search_skin, cf_connect_skin, cf_mobile_connect_skin, cf_faq_skin, cf_mobile_faq_skin, qa_skin, qa_mobile_skin, de_shop_skin, de_shop_mobile_skin'; $tconfig = get_theme_config_value($theme, $keys); if($tconfig['set_default_skin']) { $sql_common = array(); $qa_sql_common = array(); + $de_sql_common = array(); foreach($tconfig as $key => $val) { if(preg_match('#^qa_.+$#', $key)) { @@ -43,6 +44,20 @@ if($_POST['set_default_skin'] == 1) { continue; } + if(preg_match('#^de_.+$#', $key)) { + if(!isset($default[$key])) + continue; + + if($val) { + if(!preg_match('#^theme/.+$#', $val)) + $val = 'theme/'.$val; + + $de_sql_common[] = " $key = '$val' "; + } + + continue; + } + if(!isset($config[$key])) continue; @@ -63,6 +78,11 @@ if($_POST['set_default_skin'] == 1) { $sql = " update {$g5['qa_config_table']} set " . implode(', ', $qa_sql_common); sql_query($sql); } + + if(!empty($de_sql_common)) { + $sql = " update {$g5['g5_shop_default_table']} set " . implode(', ', $de_sql_common); + sql_query($sql); + } } } diff --git a/bbs/_common.php b/bbs/_common.php index b556cc9d3..6c3cf08ce 100644 --- a/bbs/_common.php +++ b/bbs/_common.php @@ -1,3 +1,11 @@ 쇼핑몰 설치 후 이용해 주십시오.

    '); + + define('_SHOP_', true); +} ?> \ No newline at end of file diff --git a/bbs/logout.php b/bbs/logout.php index 3bcb99cef..c9a0f4ba7 100644 --- a/bbs/logout.php +++ b/bbs/logout.php @@ -16,7 +16,10 @@ if ($url) { alert('url에 도메인을 지정할 수 없습니다.'); } - $link = $url; + if($url == 'shop') + $link = G5_SHOP_URL; + else + $link = $url; } else if ($bo_table) { $link = G5_BBS_URL.'/board.php?bo_table='.$bo_table; } else { diff --git a/bbs/newwin.inc.php b/bbs/newwin.inc.php index e3f8aed55..2882aa9c3 100644 --- a/bbs/newwin.inc.php +++ b/bbs/newwin.inc.php @@ -1,9 +1,15 @@ diff --git a/bbs/register_form_update.php b/bbs/register_form_update.php index 44e5e39ab..f15e319c8 100644 --- a/bbs/register_form_update.php +++ b/bbs/register_form_update.php @@ -390,6 +390,51 @@ if ($config['cf_use_email_certify'] && $old_email != $mb_email) { } +// 신규회원 쿠폰발생 +if($w == '' && $default['de_member_reg_coupon_use'] && $default['de_member_reg_coupon_term'] > 0 && $default['de_member_reg_coupon_price'] > 0) { + $j = 0; + $create_coupon = false; + + do { + $cp_id = get_coupon_id(); + + $sql3 = " select count(*) as cnt from {$g5['g5_shop_coupon_table']} where cp_id = '$cp_id' "; + $row3 = sql_fetch($sql3); + + if(!$row3['cnt']) { + $create_coupon = true; + break; + } else { + if($j > 20) + break; + } + } while(1); + + if($create_coupon) { + $cp_subject = '신규 회원가입 축하 쿠폰'; + $cp_method = 2; + $cp_target = ''; + $cp_start = G5_TIME_YMD; + $cp_end = date("Y-m-d", (G5_SERVER_TIME + (86400 * ((int)$default['de_member_reg_coupon_term'] - 1)))); + $cp_type = 0; + $cp_price = $default['de_member_reg_coupon_price']; + $cp_trunc = 1; + $cp_minimum = $default['de_member_reg_coupon_minimum']; + $cp_maximum = 0; + + $sql = " INSERT INTO {$g5['g5_shop_coupon_table']} + ( cp_id, cp_subject, cp_method, cp_target, mb_id, cp_start, cp_end, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum, cp_datetime ) + VALUES + ( '$cp_id', '$cp_subject', '$cp_method', '$cp_target', '$mb_id', '$cp_start', '$cp_end', '$cp_type', '$cp_price', '$cp_trunc', '$cp_minimum', '$cp_maximum', '".G5_TIME_YMDHIS."' ) "; + + $res = sql_query($sql, false); + + if($res) + set_session('ss_member_reg_coupon', 1); + } +} + + // 사용자 코드 실행 @include_once ($member_skin_path.'/register_form_update.tail.skin.php'); diff --git a/common.php b/common.php index 89fa4f8da..b2b1d1ca7 100644 --- a/common.php +++ b/common.php @@ -484,6 +484,11 @@ if(isset($config['cf_theme']) && trim($config['cf_theme'])) { if(is_file(G5_THEME_PATH.'/theme.config.php')) include_once(G5_THEME_PATH.'/theme.config.php'); + +// 쇼핑몰 설정 +if (defined('G5_USE_SHOP') && G5_USE_SHOP) + include_once(G5_PATH.'/shop.config.php'); + //===================================================================================== // 사용기기 설정 // 테마의 G5_THEME_DEVICE 설정에 따라 사용자 화면 제한됨 diff --git a/config.php b/config.php index 3c71769bd..1dbb1a8f5 100644 --- a/config.php +++ b/config.php @@ -5,7 +5,11 @@ ********************/ define('G5_VERSION', '그누보드5'); + + + define('G5_GNUBOARD_VER', '5.1.1'); +define('G5_YOUNGCART_VER', '5.1.0'); // 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음 define('_GNUBOARD_', true); diff --git a/css/default.css b/css/default.css index 731c6b84d..240c04076 100644 --- a/css/default.css +++ b/css/default.css @@ -7,13 +7,13 @@ body {margin:0;padding:0;font-size:0.75em;font-family:dotum} html, h1, h2, h3, h4, h5, h6, form, fieldset, img {margin:0;padding:0;border:0} h1, h2, h3, h4, h5, h6 {font-size:1em;font-family:dotum} article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {display:block} - + #hd ul, nav ul, #ft ul {margin:0;padding:0;list-style:none} legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden} label, input, button, select, img {vertical-align:middle} input, button {margin:0;padding:0;font-family:dotum;font-size:1em} button {cursor:pointer} - + textarea, select {font-family:dotum;font-size:1em} select {margin:0} p {margin:0;padding:0;word-break:break-all} @@ -283,4 +283,4 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none} /*메일인증*/ .rg_em{margin-top:5px} -.rg_em caption{padding:0;font-size:0;line-height:0;overflow:hidden} \ No newline at end of file +.rg_em caption{padding:0;font-size:0;line-height:0;overflow:hidden} diff --git a/css/default_shop.css b/css/default_shop.css new file mode 100644 index 000000000..2a0ae3b99 --- /dev/null +++ b/css/default_shop.css @@ -0,0 +1,523 @@ +@charset "utf-8"; +/* SIR 지운아빠 */ + +/* 초기화 */ +html {overflow-y:scroll} +body {margin:0;padding:0;font-size:0.75em;font-family:dotum} +html, h1, h2, h3, h4, h5, h6, form, fieldset, img {margin:0;padding:0;border:0} +h1, h2, h3, h4, h5, h6 {font-size:1em;font-family:dotum} +article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {display:block} +#hd ul, nav ul, #ft ul {margin:0;padding:0;list-style:none} +legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden} +label, input, button, select, img {vertical-align:middle} +input, button {margin:0;padding:0;font-family:dotum;font-size:1em} +button {cursor:pointer} +textarea, select {font-family:dotum;font-size:1em} +select {margin:0} +p {margin:0;padding:0;word-break:break-all} +hr {display:none} +pre {overflow-x:scroll;font-size:1.1em} +a:link, a:visited {color:#000;text-decoration:none} +a:hover, a:focus, a:active {color:#000;text-decoration:underline} + +/* 팝업레이어 */ +#hd_pop {z-index:1000;position:relative;margin:0 auto;width:1000px;height:0} +#hd_pop h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +.hd_pops {position:absolute;border:1px solid #e9e9e9;background:#fff} +.hd_pops_con {} +.hd_pops_footer {padding:10px 0;background:#000;color:#fff;text-align:right} +.hd_pops_footer button {margin-right:5px;padding:5px 10px;border:0;background:#393939;color:#fff} + +/* 상단 레이아웃 */ +#hd {min-width:1000px;border-bottom:1px solid #dde4e9} +#hd_h1 {position:absolute;font-size:0;line-height:0;overflow:hidden} + +#hd_qnb {border-bottom:1px solid #e9e9e9;background:#f2f5f9;zoom:1} +#hd_qnb:after {display:block;visibility:hidden;clear:both;content:""} +#hd_qnb h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#hd_qnb div {text-align:center;letter-spacing:-4px} +#hd_qnb a {letter-spacing:0} + +#hd_wrapper {position:relative;margin:0 auto;padding:26px 0;width:1000px;zoom:1} +#hd_wrapper:after {display:block;visibility:hidden;clear:both;content:""} + +#logo {float:left;padding:5px 0 0} + +#hd_sch {float:left;margin:0 0 0 20px;border:1px solid #c3c6ca} +#hd_sch h3 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#hd_sch #sch_str {padding-left:5px;width:110px;height:24px;border:0;background:#fff;line-height:1.9em !important;line-height:1.6em} +#hd_sch #sch_submit {padding:0 5px;height:26px;border:0;background:#e2e6eb;color:#333;cursor:pointer} + +#tnb {float:right} +#tnb h3 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#tnb ul {zoom:1} +#tnb ul:after {display:block;visibility:hidden;clear:both;content:""} +#tnb li {float:left} +#tnb a {display:inline-block;padding:0 10px;height:28px;color:#333;letter-spacing:-0.1em;line-height:2.4em} +#tnb a:focus, #tnb a:hover {text-decoration:none} + +/* 중간 레이아웃 */ +#wrapper {z-index:5;margin:30px auto;width:1000px;zoom:1} +#wrapper:after {display:block;visibility:hidden;clear:both;content:""} +#wrapper_title {margin-bottom:20px;font-size:1.2em;font-weight:bold} + +/* aside wrapper */ +#aside {float:left;margin:0 10px 0 0;width:150px} + +#container {position:relative;float:left;width:740px;min-height:500px;height:auto !important;height:500px;background:#fff;zoom:1} +#container:after {display:block;visibility:hidden;clear:both;content:""} + +/* 텍스트 크기 조절 */ +#text_size {display:none;position:absolute;top:-31px;left:-1px} +#text_size button {padding:0 10px;height:30px;border:1px solid #cfded8;border-bottom:0;background:#000;color:#fff;cursor:pointer} + +/* 하단 레이아웃 */ +#ft {clear:both;padding:0 0 40px;min-width:1000px;border-top:1px solid #e9e9e9} +#ft h1 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#ft div {position:relative;margin:0 auto;padding:0 0 0 200px;width:750px} +#ft_logo {position:absolute;top:20px;left:0} +#ft ul {margin:0 0 15px;padding:20px 0 0;zoom:1} +#ft ul:after {display:block;visibility:hidden;clear:both;content:""} +#ft li {float:left;margin:0 20px 0 0} +#ft a {text-decoration:none} +#ft p {margin:0;padding:10px 0;line-height:1.8em} +#ft span {display:inline-block;margin:0 15px 0 0} +#ft b {display:inline-block;margin:0 5px 0 0} +#ft_totop {position:absolute;top:20px;right:0} + +/* 화면낭독기 사용자용 */ +#hd_login_msg {position:absolute;top:0;left:0;width:1px;height:1px;overflow:hidden} +.msg_sound_only, .sound_only {display:inline-block !important;position:absolute;top:0;left:0;margin:0 !important;padding:0 !important;font-size:0;line-height:0;border:0 !important;overflow:hidden !important} +/* 본문 바로가기 */ +#skip_to_container a {z-index:100000;position:absolute;top:0;left:0;width:1px;height:1px;font-size:0;line-height:0;overflow:hidden} +#skip_to_container a:focus, #skip_to_container a:active {width:100%;height:75px;background:#21272e;color:#fff;font-size:2em;font-weight:bold;text-align:center;text-decoration:none;line-height:3.3em} + +/* 이미지 등비율 리사이징 */ +.img_fix {width:100%;height:auto} + +/* 캡챠 자동등록(입력)방지 기본 */ +#captcha {display:inline-block;position:relative} +#captcha legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden} +#captcha #captcha_img {width:100px;height:41px;border:1px solid #e9e9e9} +#captcha #captcha_mp3 {position:absolute;top:0;left:101px;;margin:0;padding:0;width:23px;height:22px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer} +#captcha #captcha_mp3 span {position:absolute;top:0;left:0;width:23px;height:22px;background:url('../plugin/kcaptcha/img/sound.gif')} +#captcha #captcha_reload {position:absolute;top:21px;left:101px;margin:0;padding:0;width:23px;height:22px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer} +#captcha #captcha_reload span {position:absolute;top:0;left:0;width:23px;height:22px;background:url('../plugin/kcaptcha/img/reload.gif')} +#captcha #captcha_key {margin:0 0 0 25px;padding:0 5px;width:70px;height:41px;border:1px solid #b8c9c2;background:#f7f7f7;font-size:1.333em;font-weight:bold;text-align:center;line-height:2.8em} +#captcha #captcha_info {display:block;margin:5px 0 0;font-size:0.95em;letter-spacing:-0.1em} + +/* ckeditor 단축키 */ +.cke_sc {margin:0 0 5px;text-align:right} +.btn_cke_sc{display:inline-block;padding:0 10px;height:23px;border:1px solid #ccc !important;background:#fafafa !important;color:#000 !important;text-decoration:none !important;line-height:1.9em;vertical-align:middle} +.cke_sc_def {margin:0 0 5px;padding:10px;border:1px solid #ccc;background:#f2f5f9;text-align:center} +.cke_sc_def dl {margin:0 0 5px;text-align:left;zoom:1} +.cke_sc_def dl:after {display:block;visibility:hidden;clear:both;content:""} +.cke_sc_def dt, .cke_sc_def dd {float:left;margin:0;padding:5px 0;border-bottom:1px solid #e9e9e9} +.cke_sc_def dt {width:20%;font-weight:bold} +.cke_sc_def dd {width:30%} + +/* Mobile화면으로 */ +#mobile_cng {display:block;margin:0.3em;padding:0.5em 0;border:1px solid #eee;border-radius:2em;background:#fff;color:#000;font-size:2em;text-decoration:none;text-align:center} + +/* 목록 바로가기 */ +.sanchor {margin:0 0 10px;padding:0;zoom:1} +.sanchor:after {display:block;visibility:hidden;clear:both;content:""} +.sanchor li {float:left;margin-left:-1px;list-style:none} +.sanchor a {display:inline-block;border:1px solid #e9e9e9;background:#f2f5f9;padding:0 7px;height:30px;text-decoration:none;line-height:2.6em} +.sanchor a:focus, .sanchor a:hover {background:#626870;color:#fff;text-decoration:none} +.sanchor a.sanchor_on {background:#626870;color:#fff !important;text-decoration:none} + +/* 콘텐츠별 스타일 */ +.cnt_cmt {display:inline-block;margin:0 0 0 3px;font-weight:bold} + +/* 버튼 */ +a.btn01 {display:inline-block;padding:7px;border:1px solid #ccc;background:#fafafa;color:#000;text-decoration:none;vertical-align:middle} +a.btn01:focus, a.btn01:hover {text-decoration:none} +button.btn01 {display:inline-block;margin:0;padding:7px;border:1px solid #ccc;background:#fafafa;color:#000;text-decoration:none} +a.btn02 {display:inline-block;padding:7px;border:1px solid #3b3c3f;background:#4b545e;color:#fff;text-decoration:none;vertical-align:middle} +a.btn02:focus, .btn02:hover {text-decoration:none} +button.btn02 {display:inline-block;margin:0;padding:7px;border:1px solid #3b3c3f;background:#4b545e;color:#fff;text-decoration:none} + +.btn_confirm {text-align:center} /* 서식단계 진행 */ + +.btn_submit {padding:8px;border:0;background:#ff3061;color:#fff;letter-spacing:-0.1em;cursor:pointer} +fieldset .btn_submit {padding:0 7px;height:24px;line-height:1em} + +a.btn_cancel {display:inline-block;padding:7px;border:1px solid #ccc;background:#fafafa;color:#000;text-decoration:none;vertical-align:middle} +button.btn_cancel {display:inline-block;padding:7px;border:1px solid #ccc;background:#fafafa;color:#000;vertical-align:top;text-decoration:none} + +a.btn_frmline, button.btn_frmline {display:inline-block;padding:0 5px;height:24px;border:0;background:#333;color:#fff;letter-spacing:-0.1em;text-decoration:none;vertical-align:middle} /* 우편번호검색버튼 등 */ +a.btn_frmline {line-height:24px} +button.btn_frmline {font-size:1em} + +/* 게시판용 버튼 */ +a.btn_b01 {display:inline-block;padding:7px;border:1px solid #d9ded9;background:#f2f5f9;color:#000;text-decoration:none;vertical-align:middle} +a.btn_b01:focus, .btn_b01:hover {text-decoration:none} +a.btn_b02 {display:inline-block;padding:7px 7px;border:1px solid #3b3c3f;background:#4b545e;color:#fff;text-decoration:none;vertical-align:middle} +a.btn_b02:focus, .btn_b02:hover {text-decoration:none} +a.btn_admin {display:inline-block;padding:7px;border:1px solid #e8180c;background:#e8180c;color:#fff;text-decoration:none;vertical-align:middle} /* 관리자 전용 버튼 */ +a.btn_admin:focus, a.btn_admin:hover {text-decoration:none} + +/* 선택수정 버튼 */ +.btn_list {margin:0 auto;width:93%} +.btn_list input, .btn_list button {background: none repeat scroll 0 0 #617D46;border: 0 none;color: #FFFFFF;height: 28px;line-height: 2.2em;padding: 0 15px;vertical-align: middle} + +/* 기본테이블 */ +.tbl_wrap table {width:100%;border-collapse:collapse;border-spacing:0} +.tbl_wrap caption {padding:10px 0;font-weight:bold;text-align:left} + +.tbl_head01 {margin:0 0 10px} +.tbl_head01 caption {padding:0;font-size:0;line-height:0;overflow:hidden} +.tbl_head01 thead th {padding:12px 0;border-top:1px solid #d1dee2;border-bottom:1px solid #d1dee2;background:#e5ecef;color:#383838;font-size:0.95em;text-align:center;letter-spacing:-0.1em} +.tbl_head01 thead a {color:#383838} +.tbl_head01 thead th input {vertical-align:top} /* middle 로 하면 게시판 읽기에서 목록 사용시 체크박스 라인 깨짐 */ +.tbl_head01 tfoot th, .tbl_head01 tfoot td {padding:10px 0;border-top:1px solid #c1d1d5;border-bottom:1px solid #c1d1d5;background:#d7e0e2;text-align:center} +.tbl_head01 tbody th {padding:8px 0;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9} +.tbl_head01 td {padding:8px 5px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;line-height:1.5em;word-break:break-all} +.tbl_head01 a {} + +.tbl_head02 {margin:0 0 10px} +.tbl_head02 caption {padding:0;font-size:0;line-height:0;overflow:hidden} +.tbl_head02 thead th {padding:5px 0;border-top:1px solid #d1dee2;border-bottom:1px solid #d1dee2;background:#e5ecef;color:#383838;font-size:0.95em;text-align:center;letter-spacing:-0.1em} +.tbl_head02 thead a {color:#383838} +.tbl_head02 thead th input {vertical-align:top} /* middle 로 하면 게시판 읽기에서 목록 사용시 체크박스 라인 깨짐 */ +.tbl_head02 tfoot th, .tbl_head02 tfoot td {padding:10px 0;border-top:1px solid #c1d1d5;border-bottom:1px solid #c1d1d5;background:#d7e0e2;text-align:center} +.tbl_head02 tbody th {padding:5px 0;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9} +.tbl_head02 td {padding:5px 3px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;line-height:1.4em;word-break:break-all} +.tbl_head02 a {} + +/* 폼 테이블 */ +.tbl_frm01 {margin:0 0 20px} +.tbl_frm01 table {width:100%;border-collapse:collapse;border-spacing:0} +.tbl_frm01 th {width:100px;padding:7px 13px;border:1px solid #e9e9e9;border-left:0;background:#f7f7f7;text-align:left} +.tbl_frm01 td {padding:7px 10px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;background:transparent} +.tbl_frm01 textarea, .frm_input {border:1px solid #e4eaec;background:#f7f7f7;color:#000;vertical-align:middle;line-height:2em} +.tbl_frm01 textarea {padding:2px 2px 3px} +.frm_input {height:22px} +.tbl_frm01 textarea {width:98%;height:100px} +.tbl_frm01 a {text-decoration:none} +.tbl_frm01 .frm_address {margin-top:5px} +.tbl_frm01 .frm_file {display:block;margin-bottom:5px} +.tbl_frm01 .frm_info {display:block;padding:0 0 5px;line-height:1.4em} + +/* 자료 없는 목록 */ +.empty_table {padding:50px 0 !important;text-align:center} +.empty_list {padding:20px 0 !important;text-align:center} + +/* 필수입력 */ +.required, textarea.required {background:url('../img/wrest.gif') #f7f7f7 top right no-repeat !important} + +/* 테이블 그리드 padding 0 5px 고려한 넓이 */ +.grid_1 {width:40px} +.grid_2 {width:90px} +.grid_3 {width:140px} +.grid_4 {width:190px} +.grid_5 {width:240px} +.grid_6 {width:290px} +.grid_7 {width:340px} +.grid_8 {width:390px} +.grid_9 {width:440px} +.grid_10 {width:490px} +.grid_11 {width:540px} +.grid_12 {width:590px} +.grid_13 {width:640px} +.grid_14 {width:690px} +.grid_15 {width:740px} +.grid_16 {width:790px} +.grid_17 {width:840px} +.grid_18 {width:890px} + +/* 테이블 항목별 정의 */ +.td_board {width:120px;text-align:center} +.td_chk {width:30px;text-align:center} +.td_date {width:60px;text-align:center} +.td_datetime {width:110px;text-align:center} +.td_default {width:60px;text-align:center} +.td_dvr {width:30px;text-align:center} +.td_group {width:100px;text-align:center} +.td_imgsmall {width:60px;text-align:center} +.td_num {width:50px;text-align:center} +.td_numbig {width:100px;text-align:center} +.td_nick {width:100px;text-align:center} +.td_name {width:100px;text-align:left} +.td_namesmall {width:50px;text-align:left} +.td_mb_id {width:100px;text-align:center} +.td_mng {width:80px;text-align:center} +.td_mngsmall {width:50px;text-align:center} +.td_statsmall {width:50px;text-align:center} + +/* 새창 기본 스타일 */ +.new_win {} +.new_win .tbl_wrap {margin:0 20px} +.new_win #win_title {margin:0 0 20px;padding:20px;border-top:3px solid #4e5d60;border-bottom:1px solid #e9e9e9;background:#fff;font-size:1.2em} +.new_win #win_title .sv {font-size:0.75em;line-height:1.2em} +.new_win .win_ul {margin:-20px 0 20px 0;padding:0 20px;border-bottom:1px solid #455255;background:#484848;list-style:none;zoom:1} +.new_win .win_ul:after {display:block;visibility:hidden;clear:both;content:""} +.new_win .win_ul li {float:left;margin-left:-1px} +.new_win .win_ul a {display:block;padding:10px 10px 8px;border-right:1px solid #455255;border-left:1px solid #455255;color:#fff;font-family:dotum;font-weight:bold;text-decoration:none} +.new_win .win_desc {margin:0 20px} + +.new_win .win_btn {clear:both;padding:20px;text-align:center} /* 새창용 */ +.new_win .win_btn button {display:inline-block;padding:0 10px;height:30px;border:0;background:#4b545e;color:#fff;line-height:2em;cursor:pointer} +.new_win .win_btn input {padding:0 10px;height:30px;line-height:2em} +.new_win .win_btn a {display:inline-block;padding:0 10px;height:30px;background:#4b545e;color:#fff;vertical-align:middle;line-height:2.4em} +.new_win .win_btn a:focus, .new_win .win_btn a:hover {text-decoration:none} + +/* 내용관리 */ +#ctt {margin:10px 0;padding:10px;border:1px solid #e9e9e9} +.ctt_admin {text-align:right} +#ctt header h1 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#ctt_con {padding:10px 0} +.ctt_img {text-align:center} + +/* 자바스크립트 alert 대안 */ +#validation_check {margin:100px auto;width:500px} +#validation_check h1 {margin-bottom:20px;font-size:1.3em} +#validation_check p {margin-bottom:20px;padding:30px 20px;border:1px solid #e9e9e9;background:#fff} + +/* 사이드뷰 */ +.sv_wrap {display:inline-block;position:relative;font-weight:normal} +.sv_wrap .sv {z-index:1000;display:none;margin:5px 0 0;border:1px solid #283646;background:#111} +.sv_wrap .sv a {display:inline-block !important;margin:0 !important;padding:3px !important;width:94px;border-bottom:1px solid #283646;color:#fff !important} +.sv_wrap a:focus, .sv_wrap a:hover, .sv_wrap a:active {text-decoration:none !important} +.sv_on {display:block !important;position:absolute;top:10px;left:20px;width:auto;height:auto !important} +.sv_nojs .sv {display:block} + +/* 페이징 */ +.pg_wrap {clear:both;margin:0 0 20px;padding:20px 0 0;text-align:center} +.pg {} +.pg_page, .pg_current, .qa_page {display:inline-block;padding:0 8px;height:25px;color:#000;letter-spacing:0;line-height:2.2em;vertical-align:middle} +.pg a:focus, .pg a:hover {text-decoration:none} +.pg_page, .qa_page {background:#e4eaec;text-decoration:none} +.pg_start, .pg_prev {/* 이전 */} +.pg_end, .pg_next {/* 다음 */} +.pg_current {display:inline-block;margin:0 4px 0 0;background:#333;color:#fff;font-weight:normal} + +/* ########## 쇼핑몰 컨텐츠 ########## */ +/* 인덱스 이미지 출력 */ +#sidx_img {margin:0 0 20px} +#sidx_img img {max-width:100%;height:auto} + +/* 마이페이지 */ +#smb_my {} + +#smb_my_ov {margin:0 0 20px} +#smb_my_ov h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#smb_my_act {margin:0 0 10px;;zoom:1} +#smb_my_act:after {display:block;visibility:hidden;clear:both;content:""} +#smb_my_act ul {float:right;margin:0;padding:0;list-style:none} +#smb_my_act li {float:left;margin:0 0 0 4px} +#smb_my_ov dl {margin:0;border:1px solid #e9e9e9;background:#f2f5f9;zoom:1} +#smb_my_ov dl:after {display:block;visibility:hidden;clear:both;content:''} +#smb_my_ov dt {float:left;padding:7px 10px;width:100px;border-bottom:1px solid #e9e9e9;font-weight:bold} +#smb_my_ov dd {float:left;margin:0;padding:7px 10px;width:220px;border-bottom:1px solid #e9e9e9} +#smb_my_ovaddt {border-bottom:0 !important} +#smb_my_ovaddd {width:590px !important;border-bottom:0 !important} + +#smb_my_od {margin:0 0 20px} +#smb_my_od h2 {margin:0 0 10px} + +#smb_my_wish h2 {margin:0 0 10px} + +.smb_my_more {text-align:right} + +.smb_my_img {width:90px;text-align:center} + +/* 장바구니 */ +#sod_bsk {} +.sod_img {width:90px;text-align:center} +.sod_opt {margin:5px 0;border:1px solid #e9e9e9;border-bottom:0;background:#f2f5f9} +.sod_opt ul {margin:0;padding:0;list-style:none} +.sod_opt li {padding:3px;border-bottom:1px solid #e9e9e9} +.sod_option_btn .mod_options {margin:0;padding:3px 0;width:100%;border:0;background:#ff882a;color:#fff;cursor:pointer} + +#sit_opt_added {margin:0;padding:0;border:1px solid #e9e9e9;border-bottom:0;background:#fff;list-style:none} +#sit_opt_added li {padding:10px 20px;border-bottom:1px solid #e9e9e9} +#sit_opt_added li div {margin:5px 0 0;text-align:right} +#sit_opt_added button {margin:0 0 0 1px} + +#sod_bsk_list {position:relative} +#sod_bsk_list #mod_option_frm {z-index:10000;position:absolute;top:0;left:99px;padding:20px;width:500px;height:auto !important;height:500px;max-height:500px;border:1px solid #000;background:#f2f5f9;overflow-y:scroll;overflow-x:none} + +#sod_bsk_tot {margin:0 0 20px;padding:10px;border:1px solid #e9e9e9;background:#f2f5f9;zoom:1} +#sod_bsk_tot:after {display:block;visibility:hidden;clear:both;content:""} +#sod_bsk_tot dt, #sod_bsk_tot dd {float:left;padding:12px 0;border-bottom:1px solid #e9e9e9} +#sod_bsk_tot dt {padding-left:2%;width:48%;font-weight:bold} +#sod_bsk_tot dd {margin:0;padding-right:2%;width:47%;text-align:right} +.sod_bsk_cnt {background:#ff3061;color:#fff} +.sod_bsk_point {border-bottom:0 !important} + +#sod_bsk_act {text-align:center} +#sod_bsk_act p {margin:0 0 10px} + +/* 위시리스트 */ +#sod_ws {} +.sod_ws_img {width:90px;text-align:center} +#sod_ws_act {text-align:center} + +/* 주문서 작성 */ +.display_setup_message {margin:0 0 10px;padding:15px;border:1px solid #fccdff;background:#ffeef9} +.display_setup_message strong {display:block;margin:0 0 10px} + +#sod_frm {} +#sod_frm h2 {margin:0 0 10px} + +#sod_frm p {margin:0 0 10px} + +#sod_list {position:relative} +#sod_list #cp_frm {z-index:10000;position:absolute;top:0;left:99px;padding:20px;width:500px;height:auto !important;height:500px;max-height:500px;border:1px solid #000;background:#f2f5f9;overflow-y:scroll;overflow-x:none} + +#sod_frm_orderer {margin:20px 0 40px} +#sod_frm_orderer #od_addr_jibeon, #sod_frm_taker #od_b_addr_jibeon {display:inline-block;margin:5px 0 0} + +#sod_frm_same {margin:0 0 10px} + +#sod_frm #od_memo {height:50px} + +#sod_frm p#sod_frm_pt {margin:10px 0 5px} +#sod_frm #sod_frm_pt_alert {margin:0 0 10px} + +#sod_frm #display_pay_process {text-align:center} +#sod_frm #display_pay_process span {display:block;margin:5px 0 0} + +#sod_frm_pay {position:relative} +#sod_frm_pay h2 {margin:0 0 10px} +#sod_frm_pay .tbl_wrap th {width:auto !important;font-weight:bold;text-align:center !important} +#sod_frm_pay .tbl_wrap td {padding:8px 5px 6px !important;border-top:1px solid #e9e9e9 !important;border-bottom:1px solid #e9e9e9 !important;line-height:1.5em !important;word-break:break-all !important} +#sod_frm_pay_info {margin:0 0 10px} + +#sod_frm_pay #sc_coupon_frm, #sod_frm_pay #od_coupon_frm {z-index:10000;position:absolute;top:0;left:99px;padding:20px;width:500px;height:auto !important;height:500px;max-height:500px;border:1px solid #000;background:#f2f5f9;overflow-y:scroll} + +#sod_frm_paysel {margin:0 0 20px;padding:10px;border:1px solid #e9e9e9;background:#f2f5f9;text-align:center} +#sod_frm_paysel legend {position:absolute;font-size:0;line-height:0;overflow:hidden} +#sod_frm_paysel .KPAY{background:url('../img/kpay_logo.png') no-repeat;padding-left:37px;display:inline-block} +#sod_frm_paysel .PAYNOW{background:url('../img/paynow_logo.png') no-repeat;padding-left:46px;display:inline-block} +#sod_frm_paysel .PAYCO{background:url('../img/payco_logo.png') no-repeat 1px;padding-left:46px;display:inline-block} + +#settle_bank {margin:10px 0 0} + +#sod_frm_escrow {margin:30px 0 0} + +#display_pay_process {padding:20px;text-align:center} + +/* 배송지 목록 */ +#sod_addr .td_mng button {margin:0;padding:0;border:0;background:transparent} + +/* 주문내역 */ +#sod_v {} +#sod_v .basic_tbl {text-align:center} +#sod_v_info {margin:0 0 10px} + +/* 주문상세내역 */ +#sod_fin {} + +#sod_fin_no {margin:0 0 20px} + +#sod_sts_wrap {margin:0 0 10px;text-align:right} +#sod_sts_explan {display:none} + +#sod_fin_legend {padding:7px 5px 0;border:1px solid #e9e9e9;text-align:left;zoom:1} +#sod_fin_legend:after {display:block;visibility:hidden;clear:both;content:''} +#sod_fin_legend dt {clear:both;float:left;margin:0 0 5px;width:50px;font-weight:bold} +#sod_fin_legend dd {float:left;margin:0} + +#sod_fin #sod_bsk_tot {border-bottom:0 !important} + +#request_form {position:relative} +#request_form div {display:none;z-index:10000;position:absolute;top:23px;left:0;padding:20px 0;width:520px;border:1px solid #000;background:#f2f5f9;text-align:center} +#request_form .frm_input {width:300px;background:#fff !important} +#request_form .btn_frmline, #request_form .btn_cancel {vertical-align:middle !important} +#request_form .btn_frmline {padding:0 10px;line-height:1.6em} + +#sod_req_btn {margin:0 0 10px} +#sod_req_btn button {background:#626870} + +#sod_req_log {margin:0 0 20px} +#sod_req_log ul {margin:0;padding:0;border-top:1px solid #e9e9e9;background:#f2f5f9;list-style:none} +#sod_req_log li {padding:10px 10px 20px;border:1px solid #e9e9e9;border-top:0} +#sod_req_log h3 {margin:20px 0 10px} +.sod_req_log_view table {margin:0} +.sod_req_log_view caption {padding:10px 0;font-size:1em;font-weight:bold;text-align:left;line-height:1em} +.sod_req_log_view caption span {color:#ff3061} +.sod_req_log_view th {border-top:1px solid #e9e9e9;background:#f7f7f7 !important;color:#000 !important;text-align:center} +.sod_req_log_view td {background:#fff;color:#000} +.sod_req_log_view p {padding:10px 15px;border-bottom:1px solid #e9e9e9;background:#fff;color:#000} +.sod_req_log_view .sod_req_it {width:270px} +.sod_req_log_view button {margin:0;padding:0;border:0;background:transparent;color:#ff3061;text-decoration:underline;vertical-align:middle;cursor:pointer} + +#sod_fin_list h2 {margin:0 0 10px} +#sod_fin_list td {height:30px} + +#sod_fin_view {border:1px solid #e9e9e9} +#sod_fin_view h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#sod_fin_view h3 {margin:0 0 10px} +#sod_fin_view .basic_tbl th {padding:0 10px;border-top:1px solid #eee;border-bottom:1px solid #eee;background:#f2f5f9;text-align:left} + +#sod_fin_pay {padding:10px;border-bottom:1px solid #e9e9e9} + +#sod_fin_orderer {padding:10px;border-bottom:1px solid #e9e9e9} + +#sod_fin_receiver {padding:10px;border-bottom:1px solid #e9e9e9} + +#sod_fin_dvr {padding:10px} +#sod_fin_dvr .dvr_link {color:#ff3061;text-decoration:underline} + +#sod_fin_tot {margin:0 0 30px;padding:10px;border:1px solid #e9e9e9;border-top:0;background:#565e60;color:#fff} +#sod_fin_tot h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#sod_fin_tot ul {margin:0;padding:0;list-style:none} +#sod_fin_tot li {padding:10px;border-bottom:1px solid #6f7a7d;zoom:1} +#sod_fin_tot li:after {display:block;visibility:hidden;clear:both;content:""} +#sod_fin_tot #alrdy {border-bottom:0 !important} +#sod_fin_tot strong {float:right} + +#sod_fin_cancel {text-align:center} +#sod_fin_cancel h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#sod_fin_cancel button {padding:10px;border:0;background:#ff3600;color:#fff} +#sod_fin_cancelfrm {display:none;margin:10px 0 0} +#sod_fin_cancelfrm .frm_input {background:#fff} + +#sod_fin_test {padding:10px} + +/* 주문상세내역 중 현금영수증 발급 */ +#scash {} +#scash section {padding:10px 0} +#scash h2 {margin:0 0 10px;text-align:center} +#scash .basic_tbl th {padding:0 10px;border-top:1px solid #eee;border-bottom:1px solid #eee;background:#f2f5f9;text-align:left} +#scash_apply {padding:10px 0 20px;text-align:center} +#scash_apply button {padding:10px;border:0;background:#565e60;color:#fff} +#scash_copy {text-align:center} + +/* 공지사항 및 커뮤니티 새글 */ +#sidx_lat {padding:15px 0 0;border-top:1px solid #ddd} +#sidx_lat h2 {text-align:center} + +/* 배너 인덱스 출력 */ +#sbn_idx {} + +/* 상품검색 */ +#ssch_frm {padding:20px;border:1px solid #e9e9e9;background:#f2f5f9;zoom:1} +#ssch_frm:after {display:block;visibility:hidden;clear:both;content:""} +#ssch_frm div {margin:0 0 5px} +#ssch_frm strong, #ssch_frm .ssch_lbl {display:inline-block;width:100px;font-weight:bold} +#ssch_frm .frm_input {background:#fff} +#ssch_frm .btn_submit {padding:0 8px;height:24px} +#ssch_frm p {padding:10px 0;border-top:1px solid #e9e9e9;line-height:1.5em} +#ssch_frm #ssch_sort {float:left;margin:0;padding:0;list-style:none;zoom:1} +#ssch_frm #ssch_sort:after {display:block;visibility:hidden;clear:both;content:""} +#ssch_frm #ssch_sort li {float:left;margin:0 1px 0 0} +#ssch_frm #ssch_ov {float:right} + +#ssch_cate {} +#ssch_cate ul {margin:10px 0;padding:10px 20px 20px;border-bottom:1px solid #e9e9e9;list-style:none;zoom:1} +#ssch_cate ul:after {display:block;visibility:hidden;clear:both;content:""} +#ssch_cate li {float:left;margin:0 10px 0 0;padding:0 10px 0 0;border-right:1px solid #e9e9e9} +#ssch_cate a {} +#ssch_cate a span {font-weight:bold} + +/* 쇼핑몰 이벤트 */ +#sev {} +.sev_admin {margin:0 0 10px;text-align:right} + +/* 쿠폰 */ +#coupon .td_numbig {width:150px} +#coupon .td_datetime {width:180px} \ No newline at end of file diff --git a/css/mobile_shop.css b/css/mobile_shop.css new file mode 100644 index 000000000..97fdcc377 --- /dev/null +++ b/css/mobile_shop.css @@ -0,0 +1,713 @@ +@charset "utf-8"; +/* SIR 지운아빠 */ + +/* 초기화 */ +html {overflow-y:scroll} +body {margin:0;padding:0;font-size:0.75em;height:100%;font-family:sans-serif; } +html, h1, h2, h3, h4, h5, h6, form, fieldset, img {margin:0;padding:0;border:0} +h1, h2, h3, h4, h5, h6 {font-size:1em} +article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {display:block} +header ul, nav ul, footer ul {margin:0;padding:0;list-style:none} +legend {position:absolute;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden} +label, input, button, select, img {vertical-align:middle} +input, button {margin:0;padding:0;font-size:1em;} +button,input[type=submit]{cursor:pointer;} +input[type=text], input[type=password], input[type=submit], input[type=image], button {border-radius:0;font-size:1em;-webkit-appearance:none} +textarea, select {font-size:1em;font-family:dotum} +textarea {border-radius:0;-webkit-appearance:none} +p {margin:0;padding:0;word-break:break-all} +hr {display:none} +pre {overflow-x:scroll;font-size:1.1em} +a:link, a:visited {color:#000;text-decoration:none} +ul,li{list-style:none;padding:0;margin:0;} + +/* 팝업레이어 */ +#hd_pop {z-index:1000;position:relative;margin:0 auto;width:100%;height:1px} +#hd_pop h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +.hd_pops {position:absolute;border:1px solid #e9e9e9;background:#fff} +.hd_pops_con {} +.hd_pops_footer {padding:10px 0;background:#000;color:#fff;text-align:right} +.hd_pops_footer button {margin-right:5px;padding:5px 10px;border:0;background:#393939;color:#fff} + +/* 상단 레이아웃 */ +#hd {position:relative;margin:0 0 ;padding: 0;text-align:center} +#hd h1 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} + +#hd_tnb{margin-top:-1px} +#hd_tnb:after {display:block;visibility:hidden;clear:both;content:""} +#hd_tnb li{float:left;width:25%;} +#hd_tnb li a{display:block;color:#a8a8a8;background:#f9f9f9;border:1px solid #e9e9e9;border-right:none;height:30px;line-height:30px;font-size:0.92em} +#hd_tnb li a:hover{background:#f1f1f1} +#hd_tnb li:first-child a{border-left:none} +#hd_tnb li .tnb_cart {color:#34b5a1} +#hd_tnb li .tnb_cart span{background:url(../mobile/shop/img/cart.gif) no-repeat;display:inline-block;width:11px;height:9px;margin-right:2px} +#logo{margin:25px 0} + +#hd_sch_open {overflow:hidden;position:absolute;top:48px;right:10px;padding:0 10px;height:2.6em;border:0;background:url(../mobile/shop/img/sch.gif) no-repeat 50% 50%;color:#fff;font-size:0.01em;width:30px;height:30px;-webkit-appearance:none;text-indent:-999px;} +#hd_sch {display:none;z-index:10;width:100%;height:100%;background:#f8f8f8;text-align:center;border-top:1px solid #e9e9e9} +#hd_sch h2 {margin:0 0 10px} +#hd_sch .sch_inner {padding:10px;position:relative;} +#hd_sch .sch_inner h2{position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#hd_sch .frm_input {height:30px;border-color:#c2c2c2;background:#fff;line-height:30px;width:100%;text-indent:5px} +#hd_sch .btn_submit {height:2.7em;position:absolute;top:10px;right:15px;background:url(../mobile/shop/img/sch2.gif) no-repeat 50% 50%;text-indent:-999px;width:30px;height:30px;} +#hd_sch .pop_close {text-align:center;padding:5px;border:0;background:#626870;color:#fff;margin-top:5px} + +#hd_ct {position:absolute;top:48px;left:10px;width:30px;height:30px;border:0;background:url(../mobile/shop/img/cate.gif) no-repeat 50% 50%;color:#fff;font-size:1em;text-indent:-9999px;-webkit-appearance:none;} + +#hd_mb:after {display:block;visibility:hidden;clear:both;content:""} +#hd_mb li{float:left;width:25%;} +#hd_mb li a{display:block;background:#34b5a1;color:#fff;height:40px;line-height:40px;border-left:1px solid #2d9e8c;font-weight:bold} +#hd_mb li a:hover{background:#2d9e8c} +#hd_mb li:first-child a{border-left:none} + +/*카테고리*/ +#category{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0, 0, 0,0.8);z-index:99999;-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; -webkit-backface-visibility: hidden;} +#category .ct_wr{width:250px;height:100%;overflow-y:auto;background:#fff;} +#category ul.cate_tab{width:100%;} +#category ul.cate_tab:after{display:block;visibility:hidden;clear:both;content:""} +#category ul.cate_tab li{float:left;width:33.3%;font-size:0.92em;} +#category ul.cate_tab li a{display:block;height:30px;line-height:30px;color:#a8a8a8;background:#f9f9f9;border:1px solid #e9e9e9;border-left:none} +#category ul.cate_tab li a.ct_tab_sl{background:#fff;border-bottom-color:#fff;color:#545454} +#category ul.cate{background:#fff;;width:100%;text-align:left;text-indent:10px;} +#category ul.cate>li{line-height:35px;border-bottom:1px solid #e9e9e9;} +#category ul.cate li{position:relative;font-weight:bold;} +#category ul.cate li a{color:#545454;display:block; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;padding-right:30px;} +#category ul.cate li .ct_op{display:inline-block;text-indent:-999px;background:url(../mobile/shop/img/cate_op.gif) no-repeat 10px 50% ;height:35px; width:30px;position:absolute;top:0;right:0;border:none} +#category ul.cate li a:hover{color:#34b5a1} +#category ul.cate li .ct_cl{background-position:-12px 50%} +#category ul.sub_cate{display:none} +#category ul.sub_cate1 li{text-indent:14px;background:#fafafa;border-top:1px solid #e9e9e9;font-weight:normal} +#category ul.sub_cate2 li{text-indent:25px;background:#f6f6f6;} +#category ul.sub_cate3 li{text-indent:40px;background:#f3f3f3;} +#category ul.sub_cate4 li{text-indent:55px;background:#efefef;} +#category .pop_close{position:absolute;top:10px;left:260px;width:30px;height:30px; background:url(../mobile/shop/img/close.png) no-repeat 50% 50%;;border:none;text-indent:-99999px} + +/* 중간 레이아웃 */ +#container {padding:0 } +#container_title {margin:0 ;padding:0;font-size:1.083em;text-align:center;letter-spacing:0.2em;font-weight:bold;border-bottom:1px solid #e9e9e9;padding:13px;} + +/* 내용관리 */ +#ctt {margin:10px 0;padding:10px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9} +.ctt_admin {margin:0 5px;text-align:right} +#ctt header h1 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#ctt_con {padding:10px 0} +.ctt_img {text-align:center} + +/* 하단 레이아웃 */ +#ft {margin:20px 0 0;padding:15px 0 0;border-top:1px solid #e9e9e9;font-size:0.917em;color:#7c7b7b;text-align:center;letter-spacing:-0.1em} +#ft h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#ft p {margin:0;padding:10px 0;line-height:1.8em} +#ft_to_top {display:block;margin:10px 10px ;padding:10px;background:#f2f5f9} + +/* 목록 바로가기 */ +.sanchor {margin:0 0 5px;padding:0} +.sanchor:after {display:block;visibility:hidden;clear:both;content:""} +.sanchor li {float:left;list-style:none;width:25%;border-top:2px solid #000;text-align:center; overflow: hidden; white-space: nowrap;letter-spacing:0.2em;font-size:0.93em} +.sanchor a {display:block;padding:10px;border-left:1px solid #ededed;border-bottom:1px solid #ededed;background:#fcfcfc;text-decoration:none;color:#484848} +.sanchor a:focus, .sanchor a:hover {background:#eee;text-decoration:none} +.sanchor a.sanchor_on {background:#fff;text-decoration:none;border-bottom:1px solid #fff;} + +/* ########## 쇼핑몰 컨텐츠 ########## */ +/*메인배너*/ +#main_bn{position:relative;margin:0 0 20px;height:auto} +#main_bn .bn_img li{width:100%} +#main_bn .bn_img li img{width:100%} +#main_bn .bn_img{overflow:hidden} +#main_bn .bn_img li {position:relative;float:left;} +#main_bn .bn_img li.bn_first{display:block} +#main_bn .bn_silde_btn{width:100%;text-align:center;margin-top:5px} +#main_bn .bn_silde_btn button{background:url(../mobile/shop/img/best_btn.gif) no-repeat 5px 5px;border:none;text-indent:-9999px;width:20px;height:20px;} +#main_bn .bn_silde_btn button.bn_sl{background-position:-11px 5px;border:none;text-indent:-9999px;width:20px;height:20px} + +/* 인덱스 이미지 출력 */ +#sidx {padding:0;margin-bottom:20px;margin-top:10px} +#slide_tab {display:none} +#sidx_slide {position:relative;top:0;left:0;width:100%;overflow:hidden} +.sidx_slide {position:absolute;top:0;left:0;width:100%} + +.swipe { + overflow: hidden; + visibility: hidden; + position: relative; +} +.swipe-wrap { + overflow: hidden; + position: relative; +} +.swipe-wrap > div { + float:left; + width:100%; + position: relative; +} + +/* 사용후기 모음 */ +#sps_sch {margin: 10px} +#sps_sch a {display:inline-block;padding:0 8px;height:23px;background:#333;color:#fff;text-decoration:none;vertical-align:middle;line-height:23px} +#sps_sch .btn_submit {padding:0 8px;height:23px;vertical-align:middle} + +#sps {zoom:1} +#sps ol {margin:0;padding:0 10px;border-top:1px solid #e9e9e9;list-style:none} +#sps li {position:relative;padding:10px 0;border-bottom:1px solid #e9e9e9} +#sps li:after {display:block;visibility:hidden;clear:both;content:""} + +.sps_img {position:absolute;top:10px;left:0px} +.sps_img span {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} + +#sps dl {margin:5px 0 10px; color: #888; font-size: 0.917em;overflow:hidden} +#sps dt {float:left;margin:0 0 5px} +#sps dd {float:left;margin:0 15px 5px 5px} +#sps dd img {position:relative;top:-2px} + +.sps_section {margin-left:80px;display:block;} +.sps_section p {padding:0;width:100%} +.sps_con_full {padding:0;height:auto !important} +.sps_con_btn {margin:5px 0 0;text-align:right} +.sps_con_btn button {margin:0;padding:5px;border:0;background:#565e60;color:#fff} + +/* 상품문의 모음 */ +#sqa_sch {margin:10px 10px} +#sqa_sch #sfl{height:24px} +#sqa_sch a {display:inline-block;padding:0 8px;height:2em;background:#333;color:#fff;text-decoration:none;vertical-align:middle;line-height:1.9em} +#sqa_sch .btn_submit {padding:0 8px;height:23px;vertical-align:middle} + +#sqa {zoom:1;} +#sqa ol {margin:0;padding:0;border-top:1px solid #e9e9e9;list-style:none;padding:0 10px} +#sqa li {position:relative;padding:10px 0;border-bottom:1px solid #e9e9e9} +#sqa li:after {display:block;visibility:hidden;clear:both;content:""} + +.sqa_img {position:absolute;top:10px;left:0px} +.sqa_img span {position:absolute;font-size:0;line-height:0;overflow:hidden;width:0;} + +#sqa dl {margin:5px 0 10px; color: #888; font-size: 0.917em;overflow:hidden} +#sqa dt {float:left;margin:0 0 5px} +#sqa dd {float:left;margin:0 15px 5px 5px} +#sqa dd img {position:relative;top:-2px} + +.sqa_section {margin-left:80px;display:block} +.sqa_section .sqa_con {padding:10px;background:#f2f5f9;line-height:1.7em} +.sqa_section p {padding:0;width:100%} +.sqa_con_full {padding:0;height:auto !important} +.sqa_con_btn {margin:5px 0 0;text-align:right} +.sqa_con_btn button {margin:0;padding:5px;border:0;background:#565e60;color:#fff} + +#sqa .sit_qa_qaq,#sqa .sit_qa_qaa {padding:10px 5px 10px ;position:relative} + +/* 마이페이지 */ +#smb_my {padding:10px;} + +#smb_my_ov {margin:0 0 20px} +#smb_my_ov ul:after {display:block;visibility:hidden;clear:both;content:''} +#smb_my_ov ul li{width:48.5%;float:left;padding:10px 0;background:#f2f2f2;text-indent:10px;height:55px;position:relative;border:1px solid #dbdbdb;margin-bottom:5px} +#smb_my_ov ul li:first-child{float:right;} +#smb_my_ov ul li a{position:absolute;bottom:10px;right:10px;color:#ff3e5e;font-weight:bold;font-size:1.3em} +#smb_my_ov h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#smb_my_ov dl {margin:0;border:1px solid #dbdbdb;font-size:0.92em;color:#666} +#smb_my_ov dl:after {display:block;visibility:hidden;clear:both;content:''} +#smb_my_ov dt {float:left;height:34px ;line-height:34px;width:35%;border-bottom:1px solid #e9e9e9;font-weight:bold;text-indent:10px;} +#smb_my_ov dd {float:left;margin:0;height:34px ;line-height:34px;width:65%;border-bottom:1px solid #e9e9e9} +#smb_my_ov dt.my_point{background:#f2f2f2;width:49%;} +#smb_my_ov .ov_addr {border-bottom:0;height:auto;line-height:24px;padding: 5px 0} + +#smb_my_od {margin:0 0 20px} +#smb_my_od h2 {margin:0 0 10px} +#smb_my_od .td_stat {width:100px} + +#smb_my_wish h2 {margin:0 0 10px} +#smb_my_wish ul {margin:0;padding:0;list-style:none} +#smb_my_wish li {position:relative;padding:5px 0 30px;min-height:35px;border:1px solid #e9e9e9;margin-bottom:5px;} +#smb_my_wish li:nth-of-type(1) {border-top:1px solid #e9e9e9} +#smb_my_wish .wish_img {position:absolute;top:10px;left:10px} +#smb_my_wish .info_link {display:block;padding:5px 0;font-size:1.2em;} +#smb_my_wish .info_date {position:absolute;bottom:10px;right:10px;color:#737373} + +/* 장바구니 주문서 공통 */ +#sod_chk {padding:0 0 5px;} +.sod_list {position:relative;margin:0;padding:0;list-style:none} +.sod_list .sod_li {position:relative;padding:0;border:1px solid #e9e9e9;margin:10px 0} +.sod_list .sod_li:after {display:block;visibility:hidden;clear:both;content:""} +.sod_list .li_chk{position:absolute;top:10px;left:10px;} +.sod_list .li_name{min-height:130px} +.sod_list .li_name a,.sod_list .li_name strong{display:block;padding: 0 10px 0 25px;border-bottom:1px solid #e9e9e9;height:35px;line-height:35px} +.sod_list .li_name strong{padding-left:10px} +.sod_list .total_img{position:absolute;top:45px;left:10px;} +.sod_list .sod_opt{padding:10px 10px 5px;margin-left:90px;color:#9e9e9e;font-size:0.93em} +.sod_list .sod_opt li{margin-bottom:3px} +.sod_list .li_cp{position:relative} +.sod_list .li_cp .cp_btn, .sod_list .li_cp .cp_cancel, .sod_list .li_mod .mod_btn {margin:0;padding:5px 8px;border:0;background:#000;color:#fff;font-size:0.93em} +.sod_list .li_cp .cp_cancel,.odf_tbl #od_coupon_cancel,.odf_tbl #sc_coupon_cancel{border:1px solid #999;color:#777;background:#fafafa;margin-left:3px;padding:4px 5px} +.sod_list .li_prqty{margin:10px;} +.sod_list .li_prqty:after {display:block;visibility:hidden;clear:both;content:""} +.sod_list .li_prqty .li_prqty_sp{width:33%;display:inline-block;float:left;text-align:center;line-height:2.2em;border-top:1px solid #d3d3d3;border-bottom:1px solid #d3d3d3;border-left:1px solid #e9e9e9;color:#9e9e9e;font-size:0.93em;margin-left:-1px} +.sod_list .li_prqty .prqty_price{border-left:1px solid #d3d3d3;} +.sod_list .li_prqty .prqty_sc{border-right:1px solid #d3d3d3;} +.sod_list .li_prqty .li_prqty_sp span{display:block;background:#f2f2f2;} +.sod_list .li_total {position:relative;border-top:1px solid #e9e9e9;margin:10px 10px 0;} +.sod_list .total_span {display:block;position:relative;padding:5px 0;text-align:right;color:#343434} +.sod_list .total_span span{position:absolute;top:5px;left:0} +.sod_list .total_span strong{font-size:1.2em} +#sit_opt_added {margin:0;padding:0;border:1px solid #e9e9e9;border-bottom:0;background:#fff;list-style:none;} +#sit_opt_added li {padding:10px ;border-bottom:1px solid #e9e9e9;margin-bottom:5px} +#sit_opt_added li:after {display:block;visibility:hidden;clear:both;content:""} +#sit_opt_added li div {height:25px;margin:5px 0 0;text-align:right;position:relative;width:111px;float:right} +#sit_opt_added .btn_frmline {height:1.85em;line-height:1.85em;background:url(../mobile/shop/img/del_btn.gif) no-repeat 1px 2px;position:absolute;top:0;right:0 ;text-indent:-999px;width:25px;height:25px;padding:0} +#sit_opt_added li div .sit_qty_plus{overflow:hidden;position:absolute;top:0;left:57px;background:url(../mobile/shop/img/add.gif) no-repeat -1px -1px;text-indent:-999px;border:1px solid #ccc;width:25px;height:25px} +#sit_opt_added li div .sit_qty_minus{overflow:hidden;position:absolute;top:0;left:0;background:url(../mobile/shop/img/add.gif) no-repeat -26px -1px ;text-indent:-999px;border:1px solid #ccc;width:25px;height:25px} +#sit_opt_added li div .sit_opt_del{background:url(../mobile/shop/img/del_btn.gif) no-repeat 1px 2px;position:absolute;top:0;right:0 ;text-indent:-999px;width:25px;height:25px;padding:0} +#sit_opt_added li div .frm_input{width:32px;border:1px solid #ccc;height:23px;padding:0 !important;line-height:25px;text-align:center;background:#fff;position:absolute;top:0;left:24px} +#sit_tot_price {margin:15px 0;font-size:1.3em;font-weight:bold;text-align:right;position:relative} +#sit_tot_price span{position:absolute;top:0;left:10px} +select.it_option,select.it_supply { width: 100%;padding: 5px;border: 0;border-radius: 5px;height: 28px;-webkit-appearance: none;border:1px solid #aaa;background: url(../mobile/shop/img/select.gif) no-repeat right #fafafa;} + +/*수량*/ +#sit_opt_added li .sit_opt_qty{position:relative;width:81px;float:right;text-align:center !important;} +#sit_opt_added li .sit_opt_qty .frm_input{width:32px;border:1px solid #ccc;height:23px;padding:0 !important;line-height:25px;text-align:center;background:#fff} +#sit_opt_added li .sit_opt_qty .sit_qty_plus{position:absolute;top:0;right:0;background:url(../mobile/shop/img/add.gif) no-repeat -1px -1px;text-indent:-999px;border:1px solid #ccc;width:25px;height:25px} +#sit_opt_added li .sit_opt_qty .sit_qty_minus{position:absolute;top:0;left:0;background:url(../mobile/shop/img/add.gif) no-repeat -26px -1px ;text-indent:-999px;border:1px solid #ccc;width:25px;height:25px} + +/* 장바구니 */ +#sod_bsk {margin:10px} + +#sod_bsk_list {position:relative} +#sod_bsk_list #mod_option_frm {z-index:10000;position:absolute;top:0;left:0;width:100%} +#sod_bsk_list #mod_option_frm form{border:2px solid #34b5a1;background:#fff;padding:10px;max-height:500px;overflow-y:scroll} +html.no-overflowscrolling #mod_option_frm {height:auto;max-height:10000px !important} /* overflow 미지원 기기 대응 */ +#sod_bsk_list #mod_option_frm .sit_ov_tbl{background:#ededed;margin-top:5px} +#sod_bsk_list #mod_option_frm .sit_ov_tbl th,#sod_bsk_list #mod_option_frm .sit_ov_tbl td{border:none;padding-left:5px;font-weight:normal;text-align:left} +#sod_bsk_list #mod_option_frm .sit_ov_tbl th{width:90px} +#sod_bsk_list #mod_option_frm#sit_tot_price{font-size:1.2em} +#sod_bsk_list #mod_option_frm #sit_tot_price span{left:0;} +#sod_bsk_list #mod_option_frm .btn_confirm{overflow:hidden;} +#sod_bsk_list #mod_option_frm .btn_submit{width:49%;float:left;background:#34b5a1;padding:8px 0} +#sod_bsk_list #mod_option_frm .btn_cancel{width:49%;float:right;background:#fff;border:1px solid #34b5a1;color:#34b5a1} + +#sod_bsk_tot {margin:0 0 8px;;border:1px solid #e9e9e9;background:#f2f2f2} +#sod_bsk_tot:after {display:block;visibility:hidden;clear:both;content:""} +#sod_bsk_tot dt, #sod_bsk_tot dd {float:left;padding:10px 0;border-bottom:1px solid #e9e9e9} +#sod_bsk_tot dt {padding-left:2%;width:48%;font-weight:bold} +#sod_bsk_tot dd {margin:0;padding-right:2%;width:48%;text-align:right} +.sod_bsk_cnt {background:#373737;color:#fff} +.sod_bsk_point {border-bottom:0 !important} + +#sod_bsk_act {margin:0 0 20px;padding-top:40px;text-align:center;position:relative} +#sod_bsk_act:after {display:block;visibility:hidden;clear:both;content:""} +#sod_bsk_act a.btn01 {width:49%;padding:10px 0;border:1px solid #34b5a1;background:none;color:#34b5a1} +#sod_bsk_act .btn_submit{width:49%;padding:10px 0;;background:#34b5a1;border:1px solid #34b5a1;} +#sod_bsk_act div{position:absolute;top:0;right:0;} +#sod_bsk_act div .btn01 {background:#fff;color:#999;padding:5px;font-size:0.93em} + +/* 위시리스트 */ +#sod_ws {margin:10px;} +#sod_ws li{position:relative;padding:10px 0 10px 90px;min-height:35px;border:1px solid #e9e9e9;margin-bottom:5px;height:50px} +#sod_ws .wish_img {position:absolute;top:10px;left:30px} +#sod_ws .info_link {display:block;padding:5px 0;font-size:1.2em;font-weight:bold} +#sod_ws .info_date {position:absolute;bottom:10px;right:10px;color:#737373} +#sod_ws .wish_chk{position:absolute;top:10px;left:10px;color:#737373} +#sod_ws .sold_out{position:absolute;top:20px;left:80px;display:inline-block;width:100px;color:#ff3e5e} +#sod_ws .wish_del a{position:absolute;top:10px;right:10px;text-indent:-999px;overflow:hidden;width:25px;height:25px;background:url(../mobile/shop/img/del_btn.gif) no-repeat top right;} +#sod_ws_act {text-align:center;} +#sod_ws_act button{width:49%;height: 40px;letter-spacing: 0.2em; line-height: 40px;padding:0;border:1px solid #34b5a1} +#sod_ws_act .btn01{background: #fff; color: #34b5a1;border:1px solid #34b5a1;} +#sod_ws_act .btn02{background: #34b5a1; color: #fff;} + +/* 쿠폰 */ +#scp_list .win_desc{padding:10px;padding-top:0} +#scp_list ul {margin:0;padding:0;list-style:none} +#scp_list li {position:relative;border:1px solid #e9e9e9;margin-bottom:5px;border-radius:8px} +#scp_list .li_title {display:block;padding:8px 10px;font-size:1.2em;font-weight:bold;background:#f2f2f2} +#scp_list .li_pd {margin:0 0 5px;zoom:1} +#scp_list .li_pd:after {display:block;visibility:hidden;clear:both;content:""} +#scp_list .pd_price {padding:10px;display:inline-block} +#scp_list .pd_date {float:right;padding:10px;color:#a4a4a4} +#scp_list .li_target {padding:0 10px 10px;color:#029d9f;display:inline-block} + +/* 주문서 작성 */ +#sod_frm {margin:10px;} +#sod_frm section{margin-bottom:10px} +#sod_frm p#sod_frm_pt_alert {margin:20px 0;text-align:center } +#sod_bsk_list #mod_option_frm .sit_ov_tbl{background:#ededed;margin-top:5px} +#sod_bsk_list #mod_option_frm .sit_ov_tbl th,#sod_bsk_list #mod_option_frm .sit_ov_tbl td{border:none;padding-left:5px;font-weight:normal} +#sod_bsk_list #mod_option_frm .sit_ov_tbl th{width:90px} +html.no-overflowscrolling #cp_frm {height:auto;max-height:10000px !important} /* overflow 미지원 기기 대응 */ +#sod_frm_deli {position:relative;line-height:2em} +#sod_frm_deli #order_address {display:block;;width:100px;background:#333;color:#fff;text-align:center} +#sod_frm_orderer {margin:15px 0 30px} +#sod_frm_orderer #od_addr_jibeon, #sod_frm_taker #od_b_addr_jibeon {display:inline-block;margin:5px 0 0} +#sod_frm h2{background:#f2f2f2;border:1px solid #e9e9e9;padding:10px;} +#sod_frm .odf_tbl table{width:100%;margin:0;padding:0;border-left:1px solid #e9e9e9;border-right:1px solid #e9e9e9;border-collapse:collapse} +#sod_frm .odf_tbl table tbody td,#sod_frm .odf_tbl table tbody th{;border-bottom:1px solid #e9e9e9;padding:5px 0px 5px 10px ;text-align:left;line-height:26px;position:relative;} +#sod_frm .odf_tbl table th{width:90px;color:#343434;font-weight:normal;letter-spacing:-0.1em} +#sod_frm .odf_tbl table .frm_input{background-color:#fff !important;height:24px;line-height:24px;text-indent:5px} +#sod_frm .odf_tbl table .frm_address{margin-top:5px} +#sod_frm .odf_tbl button.btn_frmline{font-size:0.92em;padding:0 8px;height:26px;line-height:26px} +#sod_frm .odf_tbl textarea{width:99%;border:1px solid #e4eaec;} +#sod_frm_same {margin:0 0 10px} +#sod_frm_pay {position:relative} +#sod_frm_pay .tbl_head01 caption {font-size:0;line-height:0;overflow:hidden} +#sod_frm_pay .tbl_head01 th {width:auto !important;font-weight:bold;text-align:center !important} +#sod_frm_pay .tbl_head01 td {border-top:1px solid #e9e9e9 !important;border-bottom:1px solid #e9e9e9 !important;line-height:1.5em !important;word-break:break-all !important} + +html.no-overflowscrolling #sc_coupon_frm, html.no-overflowscrolling #od_coupon_frm {height:auto;max-height:10000px !important} /* overflow 미지원 기기 대응 */ +#sod_frm_pay_info {margin:0 0 10px} +#sod_frm_paysel {margin:10px 0 ;padding:10px;background:#f2f2f2;border:1px solid #e0e0e0} +#sod_frm_paysel ul {margin:0;padding:0;} +#sod_frm_paysel ul:after {display:block;visibility:hidden;clear:both;content:""} +#sod_frm_paysel li {float:left;padding:5px 2%;width:46%} +#sod_frm_paysel .KPAY{background:url('../img/kpay_logo.png') no-repeat;padding-left:37px;} +#sod_frm_paysel .PAYNOW{background:url('../img/paynow_logo.png') no-repeat;padding-left:46px;} +#sod_frm_paysel .PAYCO{background:url('../img/payco_logo.png') no-repeat 1px ;padding-left:46px;} + +#sod_frm_paysel #settle_bank {padding:10px;background:#fff;line-height:2em;border:1px solid #dbdbdb} +#sod_frm_paysel #settle_bank label {display:inline-block;margin:0 10px 0 0;font-weight:bold} +#sod_frm_paysel #settle_bank .frm_input {background:#fff;text-align:center} +#sod_frm_escrow {margin:30px 0 0} + +#od_addr1, #od_addr2, #od_addr3, #od_email, #od_b_addr1, #od_b_addr2, #od_b_addr3 {width:100%} +#sod_frm #od_memo {height:70px} +#sod_frm_pt {margin:10px 0 5px} +#sod_frm_pt_alert, #sod_frm_pt_info {margin:0 0 10px} +#sod_frm #show_progress {text-align:center} +#sod_frm #show_progress span {display:block;margin:5px 0 0} +#sod_frm #cp_frm,#od_coupon_frm,#sc_coupon_frm{z-index:10000;position:absolute;top:25px;left:0;width:100%;border:2px solid #34b5a1;background:#fff;} +#od_coupon_frm,#sc_coupon_frm{top:33px;left:10px;width:95%} +#sod_frm .odf_tbl button.sc_cp_apply,#sod_frm .odf_tbl button.od_cp_apply{font-size:1em} +#sod_frm #cp_frm .tbl_head02,#od_coupon_frm .tbl_head02,#sc_coupon_frm .tbl_head02{padding:15px;margin:0;} +#sod_frm #cp_frm .tbl_head02 caption,#od_coupon_frm .tbl_head02 caption,#sc_coupon_frm .tbl_head02 caption{background:#34b5a1;color:#fff;position:absolute;top:0;left:0;width:100%;text-indent:10px;padding:0 0 ;height:30px;line-height:28px;} +#sod_frm #cp_frm .tbl_head02 table,#od_coupon_frm .tbl_head02 table,#sc_coupon_frm .tbl_head02 table{margin-top:30px;border:1px solid #d3d3d3;} +#sod_frm #cp_frm .tbl_head02 th,#od_coupon_frm .tbl_head02 thead th,#sc_coupon_frm .tbl_head02 thead th{border-bottom:1px solid #e5e5e5;background:#ededed;text-align:center !important;padding:5px 0;line-height:1.5em !important} +#sod_frm #cp_frm .tbl_head02 th+th+th, #od_coupon_frm .tbl_head02 th+th+th,#sc_coupon_frm .tbl_head02 th+th+th{width:60px} +#sod_frm #cp_frm .tbl_head02 td,#od_coupon_frm .tbl_head02 td,#sc_coupon_frm .tbl_head02 td{border:none;line-height:1.5em !important} +#od_coupon_frm .tbl_head02 td.td_numbig,#od_coupon_frm .tbl_head02 td.td_mngsmall,#sc_coupon_frm .tbl_head02 td.td_mngsmall{text-align:center} +#sod_frm #cp_frm .tbl_head02 td .btn_frmline,#od_coupon_frm .tbl_head02 td,#sc_coupon_frm .tbl_head02 td {font-size:0.92em} +#sod_frm #cp_frm .tbl_head02 td.td_numbig,#od_coupon_frmtd .tbl_head02 .td_numbig,#sc_coupon_frm .tbl_head02 td.td_numbig{width:90px;text-align:center} +#sod_frm #cp_frm .btn_confirm .btn_submit,#od_coupon_frm .btn_confirm .btn_submit,#sc_coupon_frm .btn_confirm .btn_submit{position:absolute;top:0;right:0;background:url(../mobile/shop/img/close_op.jpg) no-repeat 0 10px;text-indent:-9999px; width:25px;height:25px} +#sod_frm #display_pay_button .btn_submit,#sod_frm #display_pay_button .btn_cancel,#sc_coupon_frm #display_pay_button .btn_cancel{width:49%;text-align:center; padding: 10px 0; background: #34b5a1; border:1px solid #34b5a1;-webkit-appearance: none;border-radius:0} +#sod_frm #display_pay_button .btn_cancel{border:1px solid #34b5a1;background:#fff;color:#34b5a1} + +/* 배송지 목록 */ +#sod_addr {} +#sod_addr ul {margin:0;padding:0;list-style:none} +#sod_addr li {position:relative;padding:5px 0 5px 20px;min-height:35px;border-bottom:1px solid #e9e9e9} +#sod_addr .addr_chk {position:absolute;top:9px;left:0} +#sod_addr .addr_default {position:absolute;top:9px;right:0} +#sod_addr .addr_addr {margin:10px 0 5px} +#sod_addr .addr_name {float:left;margin:0 0 10px} +#sod_addr .addr_tel {float:right;margin:0 0 10px} +#sod_addr .addr_btn {clear:both;text-align:right} +#sod_addr .addr_btn:after {display:block;visibility:hidden;clear:both;content:""} +#sod_addr #btn_sel {width:25%;border:0;line-height:2.5em;background:#626870;color:#fff} +#sod_addr #btn_del {display:inline-block;width:15%;line-height:2.5em;background:#f2f5f9;color:#ff3061;text-align:center} + +/* 주문내역 */ +#sod_v {margin:10px} +#sod_v .td_stat {width:100px} +#sod_v_info {margin:0 0 10px} + +/* 주문상세내역 */ +#sod_fin {margin:10px} +#sod_fin .sod_list .li_name_od a{display: block; padding: 10px; } +#sod_fin .sod_list .li_opt{padding:10px;padding-bottom:0;border-top:1px solid #e9e9e9} +#sod_fin .sod_list .li_opt:first-child{border:none} +#sod_fin .sod_list .total_img{top:10px;left:0} +#sod_fin .sod_list .total_span{padding:10px;display:block} +#sod_fin .sod_list .total_span span{top:10px} +#sod_fin .sod_list .li_prqty .li_prqty_sp{width:24.5%;} +#sod_fin .sod_list .li_prqty .prqty_stat{ border-right: 1px solid #d3d3d3;} +#sod_fin section{margin-bottom:20px} +#sod_fin_no {margin:0 0 20px;padding:10px; background:#eaf7f5} +#sod_fin_list h2 {margin:0 0 10px} +#sod_sts_wrap {margin:0 0 10px;text-align:right} +#sod_sts_explan {display:none} +#sod_fin_legend {margin:10px 0;padding:10px 10px ;text-align:left;background:#f6f6f6} +#sod_fin_legend:after {display:block;visibility:hidden;clear:both;content:''} +#sod_fin_legend dt {clear:both;float:left;margin:0 0 5px;width:50px;font-weight:bold} +#sod_fin_legend dd {float:left;margin:0} + +#request_form {position:relative} +#request_form div {display:none;z-index:10000;position:absolute;top:31px;left:0;padding:10px 0;width:290px;border:1px solid #000;background:#f2f5f9;text-align:center} +#request_form label {letter-spacing:-0.1em} +#request_form .frm_input {width:170px;background:#fff !important} +#request_form .btn_frmline, #request_form .btn_cancel {margin:5px 0 0;padding:0 5px;height:1.9em;vertical-align:middle !important;line-height:1.9em} + +#sod_req_btn {margin:0 0 10px} +#sod_req_btn button {background:#626870} + +#sod_req_log {margin:0 0 20px} +#sod_req_log ul {margin:0;padding:0;border-top:1px solid #e9e9e9;background:#f2f5f9;list-style:none} +#sod_req_log li {padding:10px 10px 20px;border:1px solid #e9e9e9;border-top:0} +#sod_req_log h3 {margin:20px 0 10px} +.sod_req_log_view table {margin:0} +.sod_req_log_view caption {padding:10px 0;font-size:1em;font-weight:bold;text-align:left;line-height:1em} +.sod_req_log_view caption span {color:#ff3061} +.sod_req_log_view th {border-top:1px solid #e9e9e9;background:#f7f7f7 !important;color:#000 !important;text-align:center} +.sod_req_log_view td {background:#fff;color:#000} +.sod_req_log_view p {padding:10px 15px;border-bottom:1px solid #e9e9e9;background:#fff;color:#000} +.sod_req_log_view button {margin:0;padding:0;border:0;background:transparent;color:#ff3061;text-decoration:underline;vertical-align:middle} + +#sod_fin_view h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#sod_fin_view h3 {margin:0 0 10px} +#sod_fin_view .tbl_head01 th {padding:0 10px;border-top:1px solid #eee;border-bottom:1px solid #eee;background:#f2f5f9;text-align:left} +#sod_fin_dvr .dvr_link {color:#ff3061;text-decoration:underline} + +#sod_fin_tot {margin:0 0 30px;;border:1px solid #e9e9e9;border-top:0;background:#373737;color:#fff} +#sod_fin_tot h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#sod_fin_tot ul {margin:0;padding:0;list-style:none} +#sod_fin_tot li {padding:10px;border-bottom:1px solid #5d5d5d;padding:10px} +#sod_fin_tot li:after {display:block;visibility:hidden;clear:both;content:""} +#sod_fin_tot #alrdy {border-bottom:0 !important} +#sod_fin_tot strong {float:right} + +#sod_fin_cancel {text-align:center} +#sod_fin_cancel h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#sod_fin_cancel button {padding:8px;border:0;border:1px solid #029d9f;color:#029d9f;background:#fff;} +#sod_fin_cancelfrm {display:none;margin:10px 0 0;padding:20px 0;background:#f6f6f6} +#sod_fin_cancelfrm label{color:#888} +#sod_fin_cancelfrm .frm_input {background:#fff !important; height: 24px; line-height: 24px; text-indent: 5px;width:190px} +#sod_fin_cancelfrm .btn_frmline{border:none;background:#3a3a3a;color:#fff;padding:4px} + +#sod_fin_test {padding:10px} +#sod_fin h3,#kcp_acc_test table caption{ background: #f2f2f2; border: 1px solid #e9e9e9; padding: 10px;margin:10px 0 0;text-align:left} +#sod_fin .odf_tbl table{width:100%;margin:0;padding:0;border-left:1px solid #e9e9e9;border-right:1px solid #e9e9e9;border-collapse:collapse;} +#sod_fin .odf_tbl table tbody td,#sod_fin .odf_tbl table tbody th{;border-bottom:1px solid #e9e9e9;padding:6px 10px;text-align:left;line-height:20px} +#sod_fin .odf_tbl table th{width:80px;color:#343434;font-weight:normal} +#sod_fin .odf_tbl table tbody td.empty_table{text-align:center} +#sod_fin .odf_tbl textarea{width:99%;border:1px solid #e4eaec;} +#sod_fin .odf_tbl table input[type="text"]{background-color:#fff !important;height:24px;line-height:24px;text-indent:5px;border:1px solid #e4eaec} + +/* 주문내역 include */ +#sod_inquiry li {border:1px solid #e9e9e9;margin-bottom:5px;position:relative} +#sod_inquiry li .inquiry_idtime{background:#f2f2f2;padding:10px;position:relative} +#sod_inquiry li .inquiry_idtime a{font-weight:bold} +#sod_inquiry li .inquiry_idtime .idtime_time{position:absolute;top:10px;right:10px} +#sod_inquiry li .inquiry_name{clear:both;padding:10px;color:#696969} +#sod_inquiry li .inquiry_price{padding:10px;font-size:1.167em;font-weight:bold;} +#sod_inquiry li .inquiry_inv{position:absolute;bottom:10px;right:10px;color:#34b5a1;text-align:right} +#sod_inquiry li .inquiry_inv .inv_status{display:block;font-weight:bold} + +/* 주문상세내역 중 현금영수증 발급 */ +#scash {} +#scash section {padding:10px 0} +#scash h2 {margin:0 0 10px;text-align:center} +#scash .tbl_head01 th {padding:0 10px;border-top:1px solid #eee;border-bottom:1px solid #eee;background:#f2f5f9;text-align:left;} +#scash_apply {padding:10px 0 15px;text-align:center} +#scash_apply button {padding:10px;border:0;background:#565e60;color:#fff} +#scash_copy {text-align:center} + +/* 상품검색 */ +#ssch{} +#ssch_frm {padding:10px;border:1px solid #e9e9e9;background:#f2f5f9;margin:10px} +#ssch_frm:after {display:block;visibility:hidden;clear:both;content:""} +#ssch_frm div {margin:0 0 5px} +#ssch_frm strong, #ssch_frm .ssch_lbl {display:inline-block;width:100px;font-weight:bold;vertical-align:middle} +#ssch_frm .frm_input {background:#fff} +#ssch_frm .btn_submit {padding:0 8px;height:23px;background:#34b5a1;} +#ssch_frm p {padding:10px 0;border-top:1px solid #e9e9e9;line-height:1.5em} +#ssch_frm #ssch_qfrom {width:50px} +#ssch_frm #ssch_qto {width:50px} +#ssch_frm #ssch_q {width:40%} +#ssch_frm #ssch_sort {margin:0 0 10px;padding:1px 0 0 1px;list-style:none} +#ssch_frm #ssch_sort:after {display:block;visibility:hidden;clear:both;content:""} +#ssch_frm #ssch_sort li {position:relative;float:left;margin:0 0 -1px -1px;width:33%} +#ssch_frm #ssch_sort li:nth-of-type(3n) {width:34%} +#ssch_frm #ssch_sort a {display:block;text-align:center} +#ssch_frm #ssch_ov {text-align:right} + +#ssch_cate {} +#ssch_cate ul {margin:10px 0;padding:10px 20px 20px;border-bottom:1px solid #e9e9e9;list-style:none} +#ssch_cate ul:after {display:block;visibility:hidden;clear:both;content:""} +#ssch_cate li {float:left;margin:0 10px 0 0;padding:0 10px 0 0;border-right:1px solid #e9e9e9} +#ssch_cate a span {font-weight:bold} + +/* 화면낭독기 사용자용 */ +#hd_login_msg {position:absolute;top:0;left:0;width:1px;height:1px;overflow:hidden} +.msg_sound_only, .sound_only {display:inline-block !important;position:absolute;top:0;left:0;margin:0 !important;padding:0 !important;width:1px !important;height:1px !important;font-size:0;text-indent:-9999em;line-height:0;border:0 !important;overflow:hidden !important} + +/* 본문 바로가기 */ +#skip_to_container a {z-index:100000;position:absolute;font-size:0;line-height:0;overflow:hidden;left:0} +#skip_to_container a:focus, #skip_to_container a:active {width:100%;height:75px;background:#21272e;color:#fff;font-size:1.5em;font-weight:bold;text-align:center;text-decoration:none;line-height:3.3em} + +/* 이미지 등비율 리사이징 */ +.img_fix {width:100%;height:auto} + +/* 캡챠 자동등록(입력)방지 기본 */ +#captcha {display:inline-block;position:relative} +#captcha legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden} +#captcha audio {display:block;margin:0 0 5px;width:187px} +#captcha #captcha_img {width:60px;height:30px;border:1px solid #e9e9e9} +#captcha #captcha_reload {margin:0;padding:0 5px;height:32px;border:0;background:#e4eaec;vertical-align:middle;overflow:hidden;cursor:pointer} +#captcha #captcha_key {margin:0 0 0 4px;padding:0 5px;width:50px;height:30px;border:1px solid #b8c9c2;background:#f7f7f7;font-size:1.333em;font-weight:bold;text-align:center;line-height:2.8em} +#captcha #captcha_info {display:block;margin:5px 0 0;font-size:0.95em;letter-spacing:-0.1em} + +/* Mobile화면으로 */ +#mobile_cng {display:block;margin:5px;padding:5px 0;border:1px solid #eee;border-radius:2em;background:#fff;color:#000;font-size:2em;text-decoration:none;text-align:center} + +/* ckeditor 단축키 */ +.cke_sc {margin:0 0 5px;text-align:right} +.btn_cke_sc{display:inline-block;padding:0 10px;height:23px;border:1px solid #ccc !important;background:#fafafa !important;color:#000 !important;text-decoration:none !important;line-height:1.9em;vertical-align:middle} +.cke_sc_def {margin:0 0 5px;padding:10px;border:1px solid #ccc;background:#f2f5f9;text-align:center} +.cke_sc_def dl {margin:0 0 5px;text-align:left} +.cke_sc_def dl:after {display:block;visibility:hidden;clear:both;content:""} +.cke_sc_def dt, .cke_sc_def dd {float:left;margin:0;padding:5px 0;border-bottom:1px solid #e9e9e9} +.cke_sc_def dt {width:20%;font-weight:bold} +.cke_sc_def dd {width:30%} + +/* 콘텐츠별 스타일 */ +.cnt_cmt {display:inline-block;margin:0 0 0 5px;font-weight:bold} + +/* 버튼 */ +a.btn01 {display:inline-block;padding:8px 7px 7px;border:1px solid #ccc;background:#fafafa;color:#000;text-decoration:none;vertical-align:middle} +a.btn01:focus, a.btn01:hover {text-decoration:none} +button.btn01 {display:inline-block;margin:0;padding:7px;border:1px solid #ccc;background:#fafafa;color:#000;text-decoration:none} +a.btn02 {display:inline-block;padding:8px 7px 7px;border:1px solid #3b3c3f;background:#4b545e;color:#fff;text-decoration:none;vertical-align:middle} +a.btn02:focus, .btn02:hover {text-decoration:none} +button.btn02 {display:inline-block;margin:0;padding:7px;border:1px solid #3b3c3f;background:#4b545e;color:#fff;text-decoration:none} +.btn_confirm {text-align:center} /* 서식단계 진행 */ +.btn_submit {padding:5px;border:0;background:#ff3061;color:#fff;letter-spacing:-0.1em} +fieldset .btn_submit {padding:0 7px;height:24px;line-height:1em} +a.btn_cancel {display:inline-block;padding:8px 7px 7px;border:1px solid #ccc;background:#fafafa;color:#000;text-decoration:none;vertical-align:middle} +button.btn_cancel {display:inline-block;padding:7px;border:1px solid #ccc;background:#fafafa;color:#000;vertical-align:top;text-decoration:none} +a.btn_frmline, button.btn_frmline {display:inline-block;padding:0 5px;height:1.9em;border:0;background:#333;color:#fff;letter-spacing:-0.1em;text-decoration:none;vertical-align:top;line-height:1.9em} /* 우편번호검색버튼 등 */ +button.btn_frmline {font-size:1em} + +/* 게시판용 버튼 */ +a.btn_b01 {display:inline-block;margin:0 0 3px;padding:8px 7px 7px;border:1px solid #d9ded9;background:#f2f5f9;color:#000;text-decoration:none;vertical-align:middle} +a.btn_b01:focus, .btn_b01:hover {text-decoration:none} +a.btn_b02 {display:inline-block;margin:0 0 3px;padding:8px 7px 7px;border:1px solid #3b3c3f;background:#4b545e;color:#fff;text-decoration:none;vertical-align:middle} +a.btn_b02:focus, .btn_b02:hover {text-decoration:none} +a.btn_admin {display:inline-block;margin:0 0 3px ;padding:8px 7px 7px;border:1px solid #e8180c;background:#e8180c;color:#fff;text-decoration:none;vertical-align:middle} /* 관리자 전용 버튼 */ +a.btn_admin:focus, a.btn_admin:hover {text-decoration:none} + +/* 기본테이블 */ +.tbl_wrap {margin:0 0 10px} +.tbl_wrap table {width:100%;border-collapse:collapse;border-spacing:0} +.tbl_wrap caption {padding:10px 0;color:#4b8b99;font-weight:bold;text-align:left} + +.tbl_head01 {} +.tbl_head01 caption {padding:0 0 10px;color:#777;text-align:left} +.tbl_head01 thead th {padding:12px 0;border-top:1px solid #d1dee2;border-bottom:1px solid #d1dee2;background:#e5ecef;color:#383838;font-size:0.95em;text-align:center;letter-spacing:-0.1em} +.tbl_head01 thead a {color:#383838} +.tbl_head01 thead th input {vertical-align:top} /* middle 로 하면 게시판 읽기에서 목록 사용시 체크박스 라인 깨짐 */ +.tbl_head01 tfoot th {border-top:1px solid #666;border-bottom:1px solid #666;background:#484848;color:#fff} +.tbl_head01 tfoot td {border-color:#666;background:#484848;color:#fff;font-weight:bold;text-align:center} +.tbl_head01 tbody th {padding:5px 0;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9} +.tbl_head01 td {padding:5px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;line-height:1.5em;word-break:break-all} + +.tbl_head02 {} +.tbl_head02 caption {padding:0 0 10px;color:#777;text-align:left} +.tbl_head02 thead th {padding:5px 0;border-top:1px solid #d1dee2;border-bottom:1px solid #d1dee2;background:#e5ecef;color:#383838;font-size:0.95em;text-align:center;letter-spacing:-0.1em} +.tbl_head02 thead a {color:#383838} +.tbl_head02 thead th input {vertical-align:top} /* middle 로 하면 게시판 읽기에서 목록 사용시 체크박스 라인 깨짐 */ +.tbl_head02 tfoot th {border-top:1px solid #666;border-bottom:1px solid #666;background:#484848;color:#fff} +.tbl_head02 tfoot td {border-color:#666;background:#484848;color:#fff;font-weight:bold;text-align:center} +.tbl_head02 tbody th {padding:5px 0;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9} +.tbl_head02 td {padding:5px 3px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;line-height:1.4em;word-break:break-all} + +/* 폼 테이블 */ +.tbl_frm01 {} +.tbl_frm01 th {padding:10px 0;width:90px;border:1px solid #e9e9e9;border-left:0;text-align:left} +.tbl_frm01 td {padding:10px 5px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;background:transparent} +.tbl_frm01 textarea, .frm_input {border:1px solid #e4eaec;background:#f7f7f7;vertical-align:middle;line-height:1.8em;-webkit-appearance:none} +.tbl_frm01 textarea {width:100%;height:100px} +.tbl_frm01 a {text-decoration:none} +.tbl_frm01 .frm_address {margin-top:5px} +.tbl_frm01 .frm_file {display:block;margin-bottom:5px;width:100%} +.tbl_frm01 .frm_info {display:block;padding:5px 0 0;color:#666;line-height:1.3em} + +/* 자료 없는 목록 */ +.empty_table {padding:20px 0 !important;text-align:center} +.empty_list {padding:20px 0 !important;text-align:center} + +/* 필수입력 */ +.required, textarea.required {background:url('../img/wrest.gif') #f7f7f7 top right no-repeat !important} + +/* 테이블 그리드 padding 0 5px 고려한 넓이 */ +.grid_1 {width:40px} +.grid_2 {width:90px} +.grid_3 {width:120px} +.grid_4 {width:190px} +.grid_5 {width:240px} +.grid_6 {width:290px} +.grid_7 {width:340px} +.grid_8 {width:390px} +.grid_9 {width:440px} +.grid_10 {width:490px} +.grid_11 {width:540px} +.grid_12 {width:590px} +.grid_13 {width:640px} +.grid_14 {width:690px} +.grid_15 {width:740px} +.grid_16 {width:790px} +.grid_17 {width:840px} +.grid_18 {width:890px} + +/* 테이블 항목별 정의 */ +.td_chk {width:50px;text-align:center} +.td_group {width:100px;text-align:center} +.td_board {width:120px;text-align:center} +.td_statsmall {width:50px;text-align:center} +.td_num {width:50px;text-align:center} +.td_numbig {width:120px;text-align:center} +.td_mb_id {width:100px;text-align:center} +.td_nick {width:100px;text-align:center} +.td_name {width:100px;text-align:left} +.td_namesmall {width:100px;text-align:left} +.td_date {width:50px;text-align:center} +.td_datetime {width:170px;text-align:center} +.td_mngsmall {width:50px;text-align:center} +.td_mng {width:80px;text-align:center} +.td_stat {text-align:center} + +/* 새창 기본 스타일 */ +.new_win #win_title{padding:15px 20px;border-bottom:1px solid #e9e9e9;font-size:1.12em;margin-bottom:10px} +.new_win .tbl_wrap {margin:0 20px} +.new_win .win_btn {clear:both;margin:20px;text-align:center} +.new_win .win_btn a {display:inline-block;padding:0 10px;height:2.5em;background:#666;color:#fff;text-decoration:none;vertical-align:middle;line-height:2.5em} +.new_win .win_btn button {display:inline-block;padding:0 10px;height:2.5em;border:0;background:#666;color:#fff;text-decoration:none;line-height:2.5em} +.new_win .win_btn input {padding:0 10px;height:2.5em;line-height:2.5em} + +/* 자바스크립트 alert 대안 */ +#validation_check {margin:100px auto;width:500px} +#validation_check h1 {margin-bottom:20px;font-size:1.3em} +#validation_check p {margin-bottom:20px;padding:30px 20px;border:1px solid #e9e9e9;background:#fff} + +/* 사이드뷰*/ +.sv_wrap {display:inline-block;position:relative;font-weight:normal} +.sv_wrap .sv {z-index:1000;display:none;margin:5px 0 0;border:1px solid #283646;background:#111} +.sv_wrap .sv a {display:inline-block !important;margin:0 !important;padding:5px !important;width:94px;border-bottom:1px solid #283646;color:#fff !important} +.sv_wrap a:focus, .sv_wrap a:hover, .sv_wrap a:active {text-decoration:none !important} +.sv_on {display:block !important;position:absolute;top:10px;left:20px;width:auto;height:auto !important} +.sv_nojs .sv {display:block} + +/* 페이징 */ +.pg_wrap {clear:both;margin:0 0 20px;padding:20px 0 0;text-align:center} +.pg {} +.pg_page, .pg_current, .qa_page {display:inline-block;padding:0 8px;height:25px;color:#888 !important;letter-spacing:0;line-height:25px;vertical-align:middle;font-size:1.2em} +.pg a:focus, .pg a:hover {text-decoration:none} +.pg_page, .qa_page {text-decoration:none} +.pg_start, .pg_prev {background:url(../mobile/shop/img/paging.gif) no-repeat 0 0 ;text-indent:-999px;overflow:hidden;width:25px;height:25px;padding:0;} +.pg_prev{background-position:-28px 0} +.pg_end, .pg_next {background:url(../mobile/shop/img/paging.gif) no-repeat -55px 0;width:25px;height:25px;;width:25px;height:25px;padding:0;text-indent:-999px;overflow:hidden} +.pg_end{background-position:-83px 0} +.pg_current {display:inline-block;margin:0 4px 0 0;;color:#34b5a1 !important;font-weight:bold;} + +/* 상품상세 메뉴 floating */ +#info_top_layer {display:none;position:absolute; top:0; left:0; width:100%; background-color: #eee;} +#form_btn_layer { display:none;position:absolute; top:0; left: 0; width: 100%; height: 60px; background-color: #eee;} + +/*현금영수증*/ +#kcp_req_rx .tbl_head01 tbody th {text-align:left;} + +/*배송지목록*/ +#sod_addr .win_desc{padding:10px 20px} + +/*쇼핑몰레이아웃*/ +#mb_login .btn_submit{background:#34b5a1 !important} +#bo_list,#bo_cate{margin-top:10px !important} +#fregisterform{margin:10px} +#bo_w .btn_submit{padding:8px 7px} +#bo_w {padding:10px} +#fqalist {padding:0 10px} +#sit_sms_new #sms_agree{padding:10px 20px !important} + +/*이벤트*/ +#sev_hhtml,#sev_thtml{padding:10px} +#sev_hhtml img,#sev_thtml img{width:100%} \ No newline at end of file diff --git a/extend/shop.extend.php b/extend/shop.extend.php new file mode 100644 index 000000000..8512e1156 --- /dev/null +++ b/extend/shop.extend.php @@ -0,0 +1,70 @@ + \ No newline at end of file diff --git a/head.php b/head.php index ea90c579d..2ab6f0d86 100644 --- a/head.php +++ b/head.php @@ -95,10 +95,15 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
  • 회원가입
  • 로그인
  • +
  • FAQ
  • +
  • 1:1문의
  • 접속자
  • 새글
  • + +
  • 쇼핑몰
  • + diff --git a/head.sub.php b/head.sub.php index 208c20c38..5166a8130 100644 --- a/head.sub.php +++ b/head.sub.php @@ -40,7 +40,7 @@ header("Pragma: no-cache"); // HTTP/1.0 '.PHP_EOL; + echo ''.PHP_EOL; echo ''.PHP_EOL; echo ''.PHP_EOL; } else { @@ -57,7 +57,9 @@ if (defined('G5_IS_ADMIN')) { if(!defined('_THEME_PREVIEW_')) echo ''.PHP_EOL; } else { - echo ''.PHP_EOL; + $shop_css = ''; + if (defined('_SHOP_')) $shop_css = '_shop'; + echo ''.PHP_EOL; } ?> +
    +

    + +
    +
      + +
    • +
      +
      + + ~ +
      +
      + +
      +
    • + 사용할 수 있는 쿠폰이 없습니다.'; + ?> +
    +
    + +
    +
    + + \ No newline at end of file diff --git a/mobile/shop/event.php b/mobile/shop/event.php new file mode 100644 index 000000000..d98de9846 --- /dev/null +++ b/mobile/shop/event.php @@ -0,0 +1,86 @@ +이벤트 관리'; +?> + + +'.conv_content($ev['ev_head_html'], 1).''; + +// 상품 출력순서가 있다면 +if ($sort != "") + $order_by = $sort.' '.$sortodr.' , b.it_order, b.it_id desc'; +else + $order_by = 'b.it_order, b.it_id desc'; + +if ($skin) + $ev['ev_skin'] = $skin; + +define('G5_SHOP_CSS_URL', G5_MSHOP_SKIN_URL); + +// 리스트 유형별로 출력 +$list_file = G5_SHOP_SKIN_PATH."/{$ev['ev_mobile_skin']}"; +if (file_exists($list_file)) +{ + include G5_MSHOP_SKIN_PATH.'/list.sort.skin.php'; + + // 총몇개 = 한줄에 몇개 * 몇줄 + $items = $ev['ev_mobile_list_mod'] * $ev['ev_mobile_list_row']; + // 페이지가 없으면 첫 페이지 (1 페이지) + if ($page < 1) $page = 1; + // 시작 레코드 구함 + $from_record = ($page - 1) * $items; + + $list = new item_list(G5_MSHOP_SKIN_PATH.'/'.$ev['ev_mobile_skin'], $ev['ev_mobile_list_mod'], $ev['ev_mobile_list_row'], $ev['ev_mobile_img_width'], $ev['ev_mobile_img_height']); + $list->set_event($ev['ev_id']); + $list->set_is_page(true); + $list->set_mobile(true); + $list->set_order_by($order_by); + $list->set_from_record($from_record); + $list->set_view('it_img', true); + $list->set_view('it_id', false); + $list->set_view('it_name', true); + $list->set_view('it_cust_price', false); + $list->set_view('it_price', true); + $list->set_view('it_icon', true); + $list->set_view('sns', true); + echo $list->run(); + + // where 된 전체 상품수 + $total_count = $list->total_count; + // 전체 페이지 계산 + $total_page = ceil($total_count / $items); +} +else +{ + echo '
    '.$ev['ev_mobile_skin'].' 파일을 찾을 수 없습니다.
    관리자에게 알려주시면 감사하겠습니다.
    '; +} +?> + + + +'.conv_content($ev['ev_tail_html'], 1).''; +?> + + + diff --git a/mobile/shop/img/add.gif b/mobile/shop/img/add.gif new file mode 100644 index 000000000..fc7639eba Binary files /dev/null and b/mobile/shop/img/add.gif differ diff --git a/mobile/shop/img/best_btn.gif b/mobile/shop/img/best_btn.gif new file mode 100644 index 000000000..eee0d0c29 Binary files /dev/null and b/mobile/shop/img/best_btn.gif differ diff --git a/mobile/shop/img/cart.gif b/mobile/shop/img/cart.gif new file mode 100644 index 000000000..3169b6dac Binary files /dev/null and b/mobile/shop/img/cart.gif differ diff --git a/mobile/shop/img/cate.gif b/mobile/shop/img/cate.gif new file mode 100644 index 000000000..076449e0c Binary files /dev/null and b/mobile/shop/img/cate.gif differ diff --git a/mobile/shop/img/cate_op.gif b/mobile/shop/img/cate_op.gif new file mode 100644 index 000000000..f1b885818 Binary files /dev/null and b/mobile/shop/img/cate_op.gif differ diff --git a/mobile/shop/img/close.png b/mobile/shop/img/close.png new file mode 100644 index 000000000..2db6af945 Binary files /dev/null and b/mobile/shop/img/close.png differ diff --git a/mobile/shop/img/close_op.jpg b/mobile/shop/img/close_op.jpg new file mode 100644 index 000000000..3850f72e1 Binary files /dev/null and b/mobile/shop/img/close_op.jpg differ diff --git a/mobile/shop/img/del_btn.gif b/mobile/shop/img/del_btn.gif new file mode 100644 index 000000000..6a576483a Binary files /dev/null and b/mobile/shop/img/del_btn.gif differ diff --git a/mobile/shop/img/loading.gif b/mobile/shop/img/loading.gif new file mode 100644 index 000000000..93dc39709 Binary files /dev/null and b/mobile/shop/img/loading.gif differ diff --git a/mobile/shop/img/paging.gif b/mobile/shop/img/paging.gif new file mode 100644 index 000000000..9584474de Binary files /dev/null and b/mobile/shop/img/paging.gif differ diff --git a/mobile/shop/img/prd_icon.gif b/mobile/shop/img/prd_icon.gif new file mode 100644 index 000000000..391f4980e Binary files /dev/null and b/mobile/shop/img/prd_icon.gif differ diff --git a/mobile/shop/img/prd_icon.png b/mobile/shop/img/prd_icon.png new file mode 100644 index 000000000..83c7ad03b Binary files /dev/null and b/mobile/shop/img/prd_icon.png differ diff --git a/mobile/shop/img/sch.gif b/mobile/shop/img/sch.gif new file mode 100644 index 000000000..72ae70bec Binary files /dev/null and b/mobile/shop/img/sch.gif differ diff --git a/mobile/shop/img/sch2.gif b/mobile/shop/img/sch2.gif new file mode 100644 index 000000000..966f971e8 Binary files /dev/null and b/mobile/shop/img/sch2.gif differ diff --git a/mobile/shop/img/select.gif b/mobile/shop/img/select.gif new file mode 100644 index 000000000..b6acfa95f Binary files /dev/null and b/mobile/shop/img/select.gif differ diff --git a/mobile/shop/index.php b/mobile/shop/index.php new file mode 100644 index 000000000..3569c785b --- /dev/null +++ b/mobile/shop/index.php @@ -0,0 +1,140 @@ + + + + + + + +
    +
    + +
    +
    +

    HIT ITEM

    +

    히트상품 모음

    +
    + set_mobile(true); + $list->set_type(1); + $list->set_view('it_id', false); + $list->set_view('it_name', true); + $list->set_view('it_cust_price', false); + $list->set_view('it_price', true); + $list->set_view('it_icon', false); + $list->set_view('sns', false); + echo $list->run(); + ?> +
    + + + +
    +
    +

    RECOMMEND ITEM

    +

    추천상품 모음

    +
    + set_mobile(true); + $list->set_type(2); + $list->set_view('it_id', false); + $list->set_view('it_name', true); + $list->set_view('it_cust_price', false); + $list->set_view('it_price', true); + $list->set_view('it_icon', false); + $list->set_view('sns', false); + echo $list->run(); + ?> +
    + + + +
    +
    +

    NEW ITEM

    +

    최신상품 모음

    +
    + set_mobile(true); + $list->set_type(3); + $list->set_view('it_id', false); + $list->set_view('it_name', true); + $list->set_view('it_cust_price', false); + $list->set_view('it_price', true); + $list->set_view('it_icon', false); + $list->set_view('sns', false); + echo $list->run(); + ?> +
    + + + +
    +
    +

    BEST ITEM

    +

    인기상품 모음

    +
    + set_mobile(true); + $list->set_type(4); + $list->set_view('it_id', false); + $list->set_view('it_name', true); + $list->set_view('it_cust_price', false); + $list->set_view('it_price', true); + $list->set_view('it_icon', false); + $list->set_view('sns', false); + echo $list->run(); + ?> +
    + + + +
    +
    +

    SALE ITEM

    +

    할인상품 모음

    +
    + set_mobile(true); + $list->set_type(5); + $list->set_view('it_id', false); + $list->set_view('it_name', true); + $list->set_view('it_cust_price', false); + $list->set_view('it_price', true); + $list->set_view('it_icon', false); + $list->set_view('sns', false); + echo $list->run(); + ?> +
    + + +
    + +
    + + + + + + \ No newline at end of file diff --git a/mobile/shop/inicis/_common.php b/mobile/shop/inicis/_common.php new file mode 100644 index 000000000..7e0b90e75 --- /dev/null +++ b/mobile/shop/inicis/_common.php @@ -0,0 +1,7 @@ +쇼핑몰 설치 후 이용해 주십시오.

    '); +define('_SHOP_', true); +?> \ No newline at end of file diff --git a/mobile/shop/inicis/orderform.1.php b/mobile/shop/inicis/orderform.1.php new file mode 100644 index 000000000..8573e7300 --- /dev/null +++ b/mobile/shop/inicis/orderform.1.php @@ -0,0 +1,27 @@ + + +
    + + + + + + + + + + + + + + + + + + + + + +
    \ No newline at end of file diff --git a/mobile/shop/inicis/orderform.2.php b/mobile/shop/inicis/orderform.2.php new file mode 100644 index 000000000..63a618fa3 --- /dev/null +++ b/mobile/shop/inicis/orderform.2.php @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + +
    + + + 취소 +
    \ No newline at end of file diff --git a/mobile/shop/inicis/orderform.3.php b/mobile/shop/inicis/orderform.3.php new file mode 100644 index 000000000..d054abec9 --- /dev/null +++ b/mobile/shop/inicis/orderform.3.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/mobile/shop/inicis/pay_approval.php b/mobile/shop/inicis/pay_approval.php new file mode 100644 index 000000000..82e4eecaa --- /dev/null +++ b/mobile/shop/inicis/pay_approval.php @@ -0,0 +1,100 @@ + $default['de_inicis_mid'], + 'P_TID' => $_REQUEST['P_TID'] + ); + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $_REQUEST['P_REQ_URL']); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + $return = curl_exec($ch); + + if(!$return) + alert('KG이니시스와 통신 오류로 결제등록 요청을 완료하지 못했습니다.\\n결제등록 요청을 다시 시도해 주십시오.', $page_return_url); + + // 결과를 배열로 변환 + parse_str($return, $ret); + $PAY = array_map('trim', $ret); + + if($PAY['P_STATUS'] != '00') + alert('오류 : '.iconv_utf8($PAY['P_RMESG1']).' 코드 : '.$PAY['P_STATUS'], $page_return_url); + + // TID, AMT 를 세션으로 주문완료 페이지 전달 + $hash = md5($PAY['P_TID'].$PAY['P_MID'].$PAY['P_AMT']); + set_session('P_TID', $PAY['P_TID']); + set_session('P_AMT', $PAY['P_AMT']); + set_session('P_HASH', $hash); +} + +$g5['title'] = 'KG 이니시스 결제'; +$g5['body_script'] = ' onload="setPAYResult();"'; +include_once(G5_PATH.'/head.sub.php'); + +$exclude = array('res_cd', 'P_HASH', 'P_TYPE', 'P_AUTH_DT', 'P_AUTH_NO', 'P_HPP_CORP', 'P_APPL_NUM', 'P_VACT_NUM', 'P_VACT_NAME', 'P_VACT_BANK', 'P_CARD_ISSUER', 'P_UNAME'); + +echo '
    '.PHP_EOL; + +echo make_order_field($data, $exclude); + +echo ''.PHP_EOL; +echo ''.PHP_EOL; +echo ''.PHP_EOL; +echo ''.PHP_EOL; +echo ''.PHP_EOL; +echo ''.PHP_EOL; +echo ''.PHP_EOL; +echo ''.PHP_EOL; +echo ''.PHP_EOL; +echo ''.PHP_EOL; +echo ''.PHP_EOL; +echo ''.PHP_EOL; + +echo '
    '.PHP_EOL; +?> + +
    + + 주문완료 중입니다. 잠시만 기다려 주십시오. +
    + + + + \ No newline at end of file diff --git a/mobile/shop/inicis/pay_result.php b/mobile/shop/inicis/pay_result.php new file mode 100644 index 000000000..61c361b02 --- /dev/null +++ b/mobile/shop/inicis/pay_result.php @@ -0,0 +1,41 @@ + \ No newline at end of file diff --git a/mobile/shop/inicis/pay_return.php b/mobile/shop/inicis/pay_return.php new file mode 100644 index 000000000..6ec615650 --- /dev/null +++ b/mobile/shop/inicis/pay_return.php @@ -0,0 +1,79 @@ +'.PHP_EOL; + +echo make_order_field($data, $exclude); + +echo ''.PHP_EOL; +echo ''.PHP_EOL; +echo ''.PHP_EOL; +echo ''.PHP_EOL; +echo ''.PHP_EOL; + +echo ''.PHP_EOL; +?> + + + + + + \ No newline at end of file diff --git a/mobile/shop/inicis/settle_common.php b/mobile/shop/inicis/settle_common.php new file mode 100644 index 000000000..4d9ca8b99 --- /dev/null +++ b/mobile/shop/inicis/settle_common.php @@ -0,0 +1,218 @@ + $PageCall_time, + "P_TID" => $P_TID, + "P_MID" => $P_MID, + "P_AUTH_DT" => $P_AUTH_DT, + "P_STATUS" => $P_STATUS, + "P_TYPE" => $P_TYPE, + "P_OID" => $P_OID, + "P_FN_CD1" => $P_FN_CD1, + "P_FN_CD2" => $P_FN_CD2, + "P_FN_NM" => $P_FN_NM, + "P_AMT" => $P_AMT, + "P_UNAME" => $P_UNAME, + "P_RMESG1" => $P_RMESG1, + "P_RMESG2" => $P_RMESG2, + "P_NOTI" => $P_NOTI, + "P_AUTH_NO" => $P_AUTH_NO, + "P_SRC_CODE" => $P_SRC_CODE + ); + + // 결과 incis log 테이블 기록 + if($P_TYPE == 'BANK' || $P_SRC_CODE == 'A') { + $sql = " insert into {$g5['g5_shop_inicis_log_table']} + set oid = '$P_OID', + P_TID = '$P_TID', + P_MID = '$P_MID', + P_AUTH_DT = '$P_AUTH_DT', + P_STATUS = '$P_STATUS', + P_TYPE = '$P_TYPE', + P_OID = '$P_OID', + P_FN_NM = '".iconv_utf8($P_FN_NM)."', + P_AMT = '$P_AMT', + P_RMESG1 = '".iconv_utf8($P_RMESG1)."' "; + @sql_query($sql); + } + + // 결제처리에 관한 로그 기록 + //writeLog($value); + + /*********************************************************************************** + ' 위에서 상점 데이터베이스에 등록 성공유무에 따라서 성공시에는 "OK"를 이니시스로 실패시는 "FAIL" 을 + ' 리턴하셔야합니다. 아래 조건에 데이터베이스 성공시 받는 FLAG 변수를 넣으세요 + ' (주의) OK를 리턴하지 않으시면 이니시스 지불 서버는 "OK"를 수신할때까지 계속 재전송을 시도합니다 + ' 기타 다른 형태의 echo "" 는 하지 않으시기 바랍니다 + '***********************************************************************************/ + + echo 'OK'; + +} + +function writeLog($msg) +{ + $file = G5_SHOP_PATH."/inicis/log/noti_input_".date("Ymd").".log"; + + if(!($fp = fopen($path.$file, "a+"))) return 0; + + ob_start(); + print_r($msg); + $ob_msg = ob_get_contents(); + ob_clean(); + + if(fwrite($fp, " ".$ob_msg."\n") === FALSE) + { + fclose($fp); + return 0; + } + fclose($fp); + return 1; +} +?> diff --git a/mobile/shop/item.php b/mobile/shop/item.php new file mode 100644 index 000000000..f1effa851 --- /dev/null +++ b/mobile/shop/item.php @@ -0,0 +1,221 @@ + 0) { + for ($i=1; $i<=$tv_idx; $i++) { + if (get_session("ss_tv[$i]") == $it_id) { + $saved = true; + break; + } + } +} + +if (!$saved) { + $tv_idx++; + set_session("ss_tv_idx", $tv_idx); + set_session("ss_tv[$tv_idx]", $it_id); +} +// 오늘 본 상품 저장 끝 + +// 조회수 증가 +if (get_cookie('ck_it_id') != $it_id) { + sql_query(" update {$g5['g5_shop_item_table']} set it_hit = it_hit + 1 where it_id = '$it_id' "); // 1증가 + set_cookie("ck_it_id", $it_id, time() + 3600); // 1시간동안 저장 +} + +// 이전 상품보기 +$sql = " select it_id, it_name from {$g5['g5_shop_item_table']} + where it_id > '$it_id' + and SUBSTRING(ca_id,1,4) = '".substr($it['ca_id'],0,4)."' + and it_use = '1' + order by it_id asc + limit 1 "; +$row = sql_fetch($sql); +if ($row['it_id']) { + $prev_title = '이전상품 '.$row['it_name'].''; + $prev_href = ''; + $prev_href2 = ''; +} else { + $prev_title = ''; + $prev_href = ''; + $prev_href2 = ''; +} + +// 다음 상품보기 +$sql = " select it_id, it_name from {$g5['g5_shop_item_table']} + where it_id < '$it_id' + and SUBSTRING(ca_id,1,4) = '".substr($it['ca_id'],0,4)."' + and it_use = '1' + order by it_id desc + limit 1 "; +$row = sql_fetch($sql); +if ($row['it_id']) { + $next_title = '다음 상품 '.$row['it_name'].''; + $next_href = ''; + $next_href2 = ''; +} else { + $next_title = ''; + $next_href = ''; + $next_href2 = ''; +} + +// 관리자가 확인한 사용후기의 개수를 얻음 +$sql = " select count(*) as cnt from `{$g5['g5_shop_item_use_table']}` where it_id = '{$it_id}' and is_confirm = '1' "; +$row = sql_fetch($sql); +$item_use_count = $row['cnt']; + +// 상품문의의 개수를 얻음 +$sql = " select count(*) as cnt from `{$g5['g5_shop_item_qa_table']}` where it_id = '{$it_id}' "; +$row = sql_fetch($sql); +$item_qa_count = $row['cnt']; + +if ($default['de_mobile_rel_list_use']) { + // 관련상품의 개수를 얻음 + $sql = " select count(*) as cnt + from {$g5['g5_shop_item_relation_table']} a + left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id and b.it_use='1') + where a.it_id = '{$it['it_id']}' "; + $row = sql_fetch($sql); + $item_relation_count = $row['cnt']; +} + +// 상품품절체크 +if(G5_SOLDOUT_CHECK) + $is_soldout = is_soldout($it['it_id']); + +// 주문가능체크 +$is_orderable = true; +if(!$it['it_use'] || $it['it_tel_inq'] || $is_soldout) + $is_orderable = false; + +if($is_orderable) { + // 선택 옵션 + $option_item = get_item_options($it['it_id'], $it['it_option_subject']); + + // 추가 옵션 + $supply_item = get_item_supply($it['it_id'], $it['it_supply_subject']); + + // 상품 선택옵션 수 + $option_count = 0; + if($it['it_option_subject']) { + $temp = explode(',', $it['it_option_subject']); + $option_count = count($temp); + } + + // 상품 추가옵션 수 + $supply_count = 0; + if($it['it_supply_subject']) { + $temp = explode(',', $it['it_supply_subject']); + $supply_count = count($temp); + } +} + +// 스킨경로 +$skin_dir = G5_MSHOP_SKIN_PATH; +$ca_dir_check = true; + +if($it['it_mobile_skin']) { + if(preg_match('#^theme/(.+)$#', $it['it_mobile_skin'], $match)) + $skin_dir = G5_THEME_MOBILE_PATH.'/'.G5_SKIN_DIR.'/shop/'.$match[1]; + else + $skin_dir = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/shop/'.$it['it_skin']; + + if(is_dir($skin_dir)) { + $form_skin_file = $skin_dir.'/item.form.skin.php'; + + if(is_file($form_skin_file)) + $ca_dir_check = false; + } +} + +if($ca_dir_check) { + if($ca['ca_mobile_skin_dir']) { + if(preg_match('#^theme/(.+)$#', $ca['ca_mobile_skin_dir'], $match)) + $skin_dir = G5_THEME_MOBILE_PATH.'/'.G5_SKIN_DIR.'/shop/'.$match[1]; + else + $skin_dir = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/shop/'.$ca['ca_mobile_skin_dir']; + + if(is_dir($skin_dir)) { + $form_skin_file = $skin_dir.'/item.form.skin.php'; + + if(!is_file($form_skin_file)) + $skin_dir = G5_MSHOP_SKIN_PATH; + } else { + $skin_dir = G5_MSHOP_SKIN_PATH; + } + } +} + +define('G5_SHOP_CSS_URL', str_replace(G5_PATH, G5_URL, $skin_dir)); + +$g5['title'] = $it['it_name'].' > '.$it['ca_name']; + +include_once(G5_MSHOP_PATH.'/_head.php'); + + +// 상단 HTML +echo '
    '.conv_content($it['it_mobile_head_html'], 1).'
    '; +?> + + + + + + + +
    + + + +
    + + diff --git a/mobile/shop/iteminfo.php b/mobile/shop/iteminfo.php new file mode 100644 index 000000000..2356e67ae --- /dev/null +++ b/mobile/shop/iteminfo.php @@ -0,0 +1,87 @@ + + + + + +
    + +
    +
    + + \ No newline at end of file diff --git a/mobile/shop/itemqa.php b/mobile/shop/itemqa.php new file mode 100644 index 000000000..8168f8b84 --- /dev/null +++ b/mobile/shop/itemqa.php @@ -0,0 +1,31 @@ + \ No newline at end of file diff --git a/mobile/shop/itemqaform.php b/mobile/shop/itemqaform.php new file mode 100644 index 000000000..e0e338263 --- /dev/null +++ b/mobile/shop/itemqaform.php @@ -0,0 +1,64 @@ + \ No newline at end of file diff --git a/mobile/shop/itemqalist.php b/mobile/shop/itemqalist.php new file mode 100644 index 000000000..7a81fee65 --- /dev/null +++ b/mobile/shop/itemqalist.php @@ -0,0 +1,67 @@ + diff --git a/mobile/shop/itemrecommend.php b/mobile/shop/itemrecommend.php new file mode 100644 index 000000000..ded891541 --- /dev/null +++ b/mobile/shop/itemrecommend.php @@ -0,0 +1,67 @@ + + +
    +

    + +
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    +
    + +
    + + 창닫기 +
    +
    + +
    + + + + \ No newline at end of file diff --git a/mobile/shop/itemuse.php b/mobile/shop/itemuse.php new file mode 100644 index 000000000..a2d98a42c --- /dev/null +++ b/mobile/shop/itemuse.php @@ -0,0 +1,31 @@ + \ No newline at end of file diff --git a/mobile/shop/itemuseform.php b/mobile/shop/itemuseform.php new file mode 100644 index 000000000..3792c9463 --- /dev/null +++ b/mobile/shop/itemuseform.php @@ -0,0 +1,59 @@ + \ No newline at end of file diff --git a/mobile/shop/itemuselist.php b/mobile/shop/itemuselist.php new file mode 100644 index 000000000..d237812e8 --- /dev/null +++ b/mobile/shop/itemuselist.php @@ -0,0 +1,67 @@ + diff --git a/mobile/shop/kcp/KCPComLibrary.php b/mobile/shop/kcp/KCPComLibrary.php new file mode 100644 index 000000000..2ba7dd5cc --- /dev/null +++ b/mobile/shop/kcp/KCPComLibrary.php @@ -0,0 +1,193 @@ + 'ApproveReq', + 'ApproveRes' => 'ApproveRes', + 'approve' => 'approve', + 'approveResponse' => 'approveResponse', + 'AccessCredentialType' => 'AccessCredentialType', + 'BaseRequestType' => 'BaseRequestType', + 'BaseResponseType' => 'BaseResponseType', + 'ErrorType' => 'ErrorType', + ); + + var $chatsetType; + var $accessCredentialType; + var $baseRequestType; + var $approveReq; + var $approveResponse; + var $resCD; + var $resMsg; + + + public function PayService( $wsdl = "", $options = array() ) + { + foreach( self::$classmap as $key => $value ) + { + if ( !isset( $options[ 'classmap' ][ $key ] ) ) + { + $options[ 'classmap' ][ $key ] = $value; + } + } + + parent::__construct( $wsdl, $options ); + + $accessCredentialType = null; + $baseRequestType = null; + $approveReq = null; + $resCD = "95XX"; + $resMsg = "연동 오류"; + } + + public function setCharSet( $charsetType ) + { + $this->chatsetType = $charsetType; + } + + public function setAccessCredentialType( $accessLicense, + $signature, + $timestamp ) + { + $this->accessCredentialType = new AccessCredentialType(); + + $this->accessCredentialType->accessLicense = $accessLicense; + $this->accessCredentialType->signature = $signature; + $this->accessCredentialType->timestamp = $timestamp; + } + + public function setBaseRequestType( $detailLevel, + $requestApp, + $requestID, + $userAgent, + $version ) + { + $this->baseRequestType = new BaseRequestType(); + + $this->baseRequestType->detailLevel = $detailLevel; + $this->baseRequestType->requestApp = $requestApp; + $this->baseRequestType->requestID = $requestID; + $this->baseRequestType->userAgent = $userAgent; + $this->baseRequestType->version = $version; + } + + public function setApproveReq( $escrow, + $orderID, + $paymentAmount, + $paymentMethod, + $productName, + $returnUrl, + $siteCode ) + { + $this->approveReq = new ApproveReq(); + + $productName_utf8 = ( $this->chatsetType == "euc-kr" ) ? iconv( "EUC-KR", "UTF-8", $productName ) : $productName; + + $this->approveReq->accessCredentialType = $this->accessCredentialType; + $this->approveReq->baseRequestType = $this->baseRequestType; + $this->approveReq->escrow = $escrow; + $this->approveReq->orderID = $orderID; + $this->approveReq->paymentAmount = $paymentAmount; + $this->approveReq->paymentMethod = $paymentMethod; + $this->approveReq->productName = $productName_utf8; + $this->approveReq->returnUrl = $returnUrl; + $this->approveReq->siteCode = $siteCode; + } + + public function approve() + { + $approve = new approve(); + + $approve->req = $this->approveReq; + + $this->approveResponse = $this->__soapCall( "approve", array( $approve ), + array( 'uri' => 'http://webservice.act.webpay.service.kcp.kr', + 'soapaction' => '' + ) + ); + + $this->resCD = $this->approveResponse->return->baseResponseType->error->code; + $this->resMsg = $this->approveResponse->return->baseResponseType->error->message; + + return $this->approveResponse->return; + } +} +?> \ No newline at end of file diff --git a/mobile/shop/kcp/KCPPaymentService.wsdl b/mobile/shop/kcp/KCPPaymentService.wsdl new file mode 100644 index 000000000..2d6a4ee00 --- /dev/null +++ b/mobile/shop/kcp/KCPPaymentService.wsdl @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mobile/shop/kcp/_common.php b/mobile/shop/kcp/_common.php new file mode 100644 index 000000000..7e0b90e75 --- /dev/null +++ b/mobile/shop/kcp/_common.php @@ -0,0 +1,7 @@ +쇼핑몰 설치 후 이용해 주십시오.

    '); +define('_SHOP_', true); +?> \ No newline at end of file diff --git a/mobile/shop/kcp/approval_key.js b/mobile/shop/kcp/approval_key.js new file mode 100644 index 000000000..c9a99fb10 --- /dev/null +++ b/mobile/shop/kcp/approval_key.js @@ -0,0 +1,112 @@ + var isIE = false; + var req01_AJAX; + var READY_STATE_UNINITIALIZED = 0; + var READY_STATE_LOADING = 1; + var READY_STATE_LOADED = 2; + var READY_STATE_INTERACTIVE = 3; + var READY_STATE_COMPLETE = 4; + var PayUrl =""; + + + function displayElement( targetObj, targetText, targetColor ) + { + if ( targetObj.childNodes.length > 0 ) + { + targetObj.replaceChild( document.createTextNode( targetText ), targetObj.childNodes[ 0 ] ); + } else + { + targetObj.appendChild( document.createTextNode( targetText ) ); + } + targetObj.style.color = targetColor; + } + + function clearElement( targetObj ) + { + for ( i = ( targetObj.childNodes.length - 1 ); i >= 0; i-- ) + { + targetObj.removeChild( targetObj.childNodes[ i ] ); + } + } + + function initRequest() + { + if ( window.XMLHttpRequest ) + { + return new XMLHttpRequest(); + } else if ( window.ActiveXObject ) + { + isIE = true; + return new ActiveXObject( "Microsoft.XMLHTTP" ); + } + } + + function sendRequest( url ) + { + req01_AJAX = null; + req01_AJAX = initRequest(); + + if ( req01_AJAX ) + { + req01_AJAX.onreadystatechange = process_AJAX; + req01_AJAX.open( "POST", url, true ); + req01_AJAX.send( null ); + } + } + + function kcp_AJAX() + { + var url = "./order_approval.php"; + var form = document.sm_form; + var params = "?site_cd=" + form.site_cd.value + + "&ordr_idxx=" + form.ordr_idxx.value + + "&good_mny=" + form.good_mny.value + + "&pay_method=" + form.pay_method.value + + "&escw_used=" + form.escw_used.value + + "&good_name=" + form.good_name.value + + "&Ret_URL=" + form.Ret_URL.value; + sendRequest( url + params ); + } + + function process_AJAX() + { + if ( req01_AJAX.readyState == READY_STATE_COMPLETE ) + { + if ( req01_AJAX.status == 200 ) + { + var result = null; + + if ( req01_AJAX.responseText != null ) + { + var txt = req01_AJAX.responseText.split(","); + + if( txt[0].replace(/^\s*/,'').replace(/\s*$/,'') == '0000' ) + { + document.getElementById("approval").value = txt[1].replace(/^\s*/,'').replace(/\s*$/,''); + PayUrl = txt[2].replace(/^\s*/,'').replace(/\s*$/,''); + //alert("성공적으로 거래가 등록 되었습니다."); + call_pay_form(); + } + else + { + alert("실패 되었습니다.[" + txt[3].replace(/^\s*/,'').replace(/\s*$/,'') + "]"); + } + } + } + else + { + alert( req01_AJAX.responseText ); + } + } + else if ( req01_AJAX.readyState == READY_STATE_UNINITIALIZED ) + { + } + else if ( req01_AJAX.readyState == READY_STATE_LOADING ) + { + } + else if ( req01_AJAX.readyState == READY_STATE_LOADED ) + { + } + else if ( req01_AJAX.readyState == READY_STATE_INTERACTIVE ) + { + } + } \ No newline at end of file diff --git a/mobile/shop/kcp/order_approval.php b/mobile/shop/kcp/order_approval.php new file mode 100644 index 000000000..ce6b22abf --- /dev/null +++ b/mobile/shop/kcp/order_approval.php @@ -0,0 +1,54 @@ + +setCharSet( $charSetType ); + + $payService->setAccessCredentialType( $accessLicense, $signature, $timestamp ); + $payService->setBaseRequestType( $detailLevel, $requestApp, $requestID, $userAgent, $version ); + $payService->setApproveReq( $escrow, $orderID, $paymentAmount, $paymentMethod, $productName, $returnUrl, $siteCode ); + + $approveRes = $payService->approve(); + + printf( "%s,%s,%s,%s", $payService->resCD, $approveRes->approvalKey, + $approveRes->payUrl, $payService->resMsg ); + + } + catch (SoapFault $ex ) + { + printf( "%s,%s,%s,%s", "95XX", "", "", "연동 오류 (PHP SOAP 모듈 설치 필요)" ); + } +?> \ No newline at end of file diff --git a/mobile/shop/kcp/order_approval_form.php b/mobile/shop/kcp/order_approval_form.php new file mode 100644 index 000000000..07ecbbbe3 --- /dev/null +++ b/mobile/shop/kcp/order_approval_form.php @@ -0,0 +1,374 @@ + + + + + + + +스마트폰 웹 결제창 + + + + + + + + + + + + + + + + +
    + +'.PHP_EOL; + + echo make_order_field($data, $exclude); + + foreach($_POST as $key=>$value) { + echo ''.PHP_EOL; + } + + echo ''.PHP_EOL; +} +?> + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    +

    결제가 실패한 경우 아래 돌아가기 버튼을 클릭해주세요.

    + 돌아가기 +
    + +
    + + + + + diff --git a/mobile/shop/kcp/orderform.1.php b/mobile/shop/kcp/orderform.1.php new file mode 100644 index 000000000..312629b3e --- /dev/null +++ b/mobile/shop/kcp/orderform.1.php @@ -0,0 +1,95 @@ + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    \ No newline at end of file diff --git a/mobile/shop/kcp/orderform.2.php b/mobile/shop/kcp/orderform.2.php new file mode 100644 index 000000000..b17aef4b3 --- /dev/null +++ b/mobile/shop/kcp/orderform.2.php @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + 취소 +
    + + + + \ No newline at end of file diff --git a/mobile/shop/kcp/orderform.3.php b/mobile/shop/kcp/orderform.3.php new file mode 100644 index 000000000..57a7db3fc --- /dev/null +++ b/mobile/shop/kcp/orderform.3.php @@ -0,0 +1,48 @@ + + +
    +

    에스크로 안내

    +
    + + + + + + + + +
    +
    + 에스크로(escrow) 제도란? +
    상거래 시에, 판매자와 구매자의 사이에 신뢰할 수 있는 중립적인 제삼자(여기서는 KCP)가 중개하여 + 금전 또는 물품을 거래를 하도록 하는 것, 또는 그러한 서비스를 말한다. 거래의 안전성을 확보하기 위해 이용된다. + (2006.4.1 전자상거래 소비자보호법에 따른 의무 시행) +

    + 현금 거래에만 해당(에스크로 결제를 선택했을 경우에만 해당)되며, + 신용카드로 구매하는 거래, 배송이 필요하지 않은 재화 등을 구매하는 거래(컨텐츠 등)에는 해당되지 않는다. +
    +
    +
    + + 가입사실확인 + +
    +
    + + + + \ No newline at end of file diff --git a/mobile/shop/kcp/pp_ax_hub.php b/mobile/shop/kcp/pp_ax_hub.php new file mode 100644 index 000000000..09ccc7bbd --- /dev/null +++ b/mobile/shop/kcp/pp_ax_hub.php @@ -0,0 +1,276 @@ + + +mf_clear(); + /* ------------------------------------------------------------------------------ */ + /* = 02. 인스턴스 생성 및 초기화 END = */ + /* ============================================================================== */ + + + /* ============================================================================== */ + /* = 03. 처리 요청 정보 설정 = */ + /* = -------------------------------------------------------------------------- = */ + + /* = -------------------------------------------------------------------------- = */ + /* = 03-1. 승인 요청 = */ + /* = -------------------------------------------------------------------------- = */ + if ( $req_tx == "pay" ) + { + $c_PayPlus->mf_set_encx_data( $_POST[ "enc_data" ], $_POST[ "enc_info" ] ); + } + + /* = -------------------------------------------------------------------------- = */ + /* = 03-2. 취소/매입 요청 = */ + /* = -------------------------------------------------------------------------- = */ + else if ( $req_tx == "mod" ) + { + $tran_cd = "00200000"; + + $c_PayPlus->mf_set_modx_data( "tno", $tno ); // KCP 원거래 거래번호 + $c_PayPlus->mf_set_modx_data( "mod_type", $mod_type ); // 원거래 변경 요청 종류 + $c_PayPlus->mf_set_modx_data( "mod_ip", $cust_ip ); // 변경 요청자 IP + $c_PayPlus->mf_set_modx_data( "mod_desc", $mod_desc ); // 변경 사유 + } + /* ------------------------------------------------------------------------------ */ + /* = 03. 처리 요청 정보 설정 END = */ + /* ============================================================================== */ + + + + /* ============================================================================== */ + /* = 04. 실행 = */ + /* = -------------------------------------------------------------------------- = */ + if ( $tran_cd != "" ) + { + $c_PayPlus->mf_do_tx( $trace_no, $g_conf_home_dir, $g_conf_site_cd, $g_conf_site_key, $tran_cd, "", + $g_conf_gw_url, $g_conf_gw_port, "payplus_cli_slib", $ordr_idxx, + $cust_ip, $g_conf_log_level, 0, 0, $g_conf_key_dir, $g_conf_log_dir ); // 응답 전문 처리 + + $res_cd = $c_PayPlus->m_res_cd; // 결과 코드 + $res_msg = $c_PayPlus->m_res_msg; // 결과 메시지 + } + else + { + $c_PayPlus->m_res_cd = "9562"; + $c_PayPlus->m_res_msg = "연동 오류|tran_cd값이 설정되지 않았습니다."; + } + + if ($res_cd != '0000') + { + $res_msg = iconv("euc-kr", "utf-8", $res_msg); + + /* + echo ""; + */ + if(isset($_POST['pp_id']) && $_POST['pp_id']) { + $page_return_url = G5_SHOP_URL.'/personalpayform.php?pp_id='.get_session('ss_personalpay_id'); + } else { + $page_return_url = G5_SHOP_URL.'/orderform.php'; + if(get_session('ss_direct')) + $page_return_url .= '?sw_direct=1'; + } + + alert("$res_cd : $res_msg", $page_return_url); + exit; + } + + + /* = -------------------------------------------------------------------------- = */ + /* = 04. 실행 END = */ + /* ============================================================================== */ + + + /* ============================================================================== */ + /* = 05. 승인 결과 값 추출 = */ + /* = -------------------------------------------------------------------------- = */ + if ( $req_tx == "pay" ) + { + if( $res_cd == "0000" ) + { + $tno = $c_PayPlus->mf_get_res_data( "tno" ); // KCP 거래 고유 번호 + $amount = $c_PayPlus->mf_get_res_data( "amount" ); // KCP 실제 거래 금액 + $pnt_issue = $c_PayPlus->mf_get_res_data( "pnt_issue" ); // 결제 포인트사 코드 + + /* = -------------------------------------------------------------------------- = */ + /* = 05-1. 신용카드 승인 결과 처리 = */ + /* = -------------------------------------------------------------------------- = */ + if ( $use_pay_method == "100000000000" ) + { + $card_cd = $c_PayPlus->mf_get_res_data( "card_cd" ); // 카드사 코드 + $card_name = $c_PayPlus->mf_get_res_data( "card_name" ); // 카드 종류 + $app_time = $c_PayPlus->mf_get_res_data( "app_time" ); // 승인 시간 + $app_no = $c_PayPlus->mf_get_res_data( "app_no" ); // 승인 번호 + $noinf = $c_PayPlus->mf_get_res_data( "noinf" ); // 무이자 여부 ( 'Y' : 무이자 ) + $quota = $c_PayPlus->mf_get_res_data( "quota" ); // 할부 개월 수 + } + + /* = -------------------------------------------------------------------------- = */ + /* = 05-2. 계좌이체 승인 결과 처리 = */ + /* = -------------------------------------------------------------------------- = */ + if ( $use_pay_method == "010000000000" ) + { + $app_time = $c_PayPlus->mf_get_res_data( "app_time" ); // 승인시간 + $bank_name = $c_PayPlus->mf_get_res_data( "bank_name" ); // 은행명 + $bank_code = $c_PayPlus->mf_get_res_data( "bank_code" ); // 은행코드 + } + + /* = -------------------------------------------------------------------------- = */ + /* = 05-3. 가상계좌 승인 결과 처리 = */ + /* = -------------------------------------------------------------------------- = */ + if ( $use_pay_method == "001000000000" ) + { + $bankname = $c_PayPlus->mf_get_res_data( "bankname" ); // 입금할 은행 이름 + $depositor = $c_PayPlus->mf_get_res_data( "depositor" ); // 입금할 계좌 예금주 + $account = $c_PayPlus->mf_get_res_data( "account" ); // 입금할 계좌 번호 + } + + /* = -------------------------------------------------------------------------- = */ + /* = 05-4. 포인트 승인 결과 처리 = */ + /* = -------------------------------------------------------------------------- = */ + if ( $use_pay_method == "000100000000" ) + { + $pt_idno = $c_PayPlus->mf_get_res_data( "pt_idno" ); // 결제 및 인증 아이디 + $pnt_amount = $c_PayPlus->mf_get_res_data( "pnt_amount" ); // 적립금액 or 사용금액 + $pnt_app_time = $c_PayPlus->mf_get_res_data( "pnt_app_time" ); // 승인시간 + $pnt_app_no = $c_PayPlus->mf_get_res_data( "pnt_app_no" ); // 승인번호 + $add_pnt = $c_PayPlus->mf_get_res_data( "add_pnt" ); // 발생 포인트 + $use_pnt = $c_PayPlus->mf_get_res_data( "use_pnt" ); // 사용가능 포인트 + $rsv_pnt = $c_PayPlus->mf_get_res_data( "rsv_pnt" ); // 적립 포인트 + } + + /* = -------------------------------------------------------------------------- = */ + /* = 05-5. 휴대폰 승인 결과 처리 = */ + /* = -------------------------------------------------------------------------- = */ + if ( $use_pay_method == "000010000000" ) + { + $app_time = $c_PayPlus->mf_get_res_data( "hp_app_time" ); // 승인 시간 + $commid = $c_PayPlus->mf_get_res_data( "commid" ); // 통신사 코드 + $mobile_no = $c_PayPlus->mf_get_res_data( "mobile_no" ); // 휴대폰 번호 + } + + /* = -------------------------------------------------------------------------- = */ + /* = 05-6. 상품권 승인 결과 처리 = */ + /* = -------------------------------------------------------------------------- = */ + if ( $use_pay_method == "000000001000" ) + { + $app_time = $c_PayPlus->mf_get_res_data( "tk_app_time" ); // 승인 시간 + $tk_van_code = $c_PayPlus->mf_get_res_data( "tk_van_code" ); // 발급사 코드 + $tk_app_no = $c_PayPlus->mf_get_res_data( "tk_app_no" ); // 승인 번호 + } + + /* = -------------------------------------------------------------------------- = */ + /* = 05-7. 현금영수증 결과 처리 = */ + /* = -------------------------------------------------------------------------- = */ + $cash_authno = $c_PayPlus->mf_get_res_data( "cash_authno" ); // 현금 영수증 승인 번호 + $cash_authno = $c_PayPlus->mf_get_res_data( "cash_authno" ); // 현금 영수증 승인 번호 + $cash_tr_code = $c_PayPlus->mf_get_res_data( "cash_tr_code" ); // 현금영수증 등록구분 + + /* = -------------------------------------------------------------------------- = */ + /* = 05-8. 에스크로 여부 결과 처리 = */ + /* = -------------------------------------------------------------------------- = */ + $escw_yn = $c_PayPlus->mf_get_res_data( "escw_yn" ); // 에스크로 여부 + } + } + /* = -------------------------------------------------------------------------- = */ + /* = 05. 승인 결과 처리 END = */ + /* ============================================================================== */ +?> \ No newline at end of file diff --git a/mobile/shop/kcp/pp_ax_hub_cancel.php b/mobile/shop/kcp/pp_ax_hub_cancel.php new file mode 100644 index 000000000..5d1442e2d --- /dev/null +++ b/mobile/shop/kcp/pp_ax_hub_cancel.php @@ -0,0 +1,54 @@ +mf_clear(); + + $tran_cd = "00200000"; + + $c_PayPlus->mf_set_modx_data( "tno", $tno ); // KCP 원거래 거래번호 + $c_PayPlus->mf_set_modx_data( "mod_type", "STSC" ); // 원거래 변경 요청 종류 + $c_PayPlus->mf_set_modx_data( "mod_ip", $cust_ip ); // 변경 요청자 IP + $c_PayPlus->mf_set_modx_data( "mod_desc", $cancel_msg ); // 변경 사유 + + $c_PayPlus->mf_do_tx( "", $g_conf_home_dir, $g_conf_site_cd, + $g_conf_site_key, $tran_cd, "", + $g_conf_gw_url, $g_conf_gw_port, "payplus_cli_slib", + $ordr_idxx, $cust_ip, $g_conf_log_level, + 0, 0 ); + + $res_cd = $c_PayPlus->m_res_cd; + $res_msg = $c_PayPlus->m_res_msg; + } + } +} // End of [res_cd = "0000"] +/* ============================================================================== */ + +// locale 설정 초기화 +setlocale(LC_CTYPE, ''); +?> \ No newline at end of file diff --git a/mobile/shop/kcp/pp_ax_hub_lib.php b/mobile/shop/kcp/pp_ax_hub_lib.php new file mode 100644 index 000000000..764ccdd97 --- /dev/null +++ b/mobile/shop/kcp/pp_ax_hub_lib.php @@ -0,0 +1,295 @@ +m_payx_common = ""; + $this->m_payx_card = ""; + $this->m_ordr_data = ""; + $this->m_rcvr_data = ""; + $this->m_escw_data = ""; + $this->m_modx_data = ""; + $this->m_encx_data = ""; + $this->m_encx_info = ""; + } + + function mf_init( $mode ) + { + if ( $mode == "1" ) + { + if ( !extension_loaded( 'pp_cli_dl_php' ) ) + { + dl( "pp_cli_dl_php.so" ); + } + } + } + + function mf_clear() + { + $this->m_payx_common = ""; + $this->m_payx_card = ""; + $this->m_ordr_data = ""; + $this->m_rcvr_data = ""; + $this->m_escw_data = ""; + $this->m_modx_data = ""; + $this->m_encx_data = ""; + $this->m_encx_info = ""; + } + + function mf_gen_trace_no( $site_cd, $ip, $mode ) + { + if ( $mode == "1" ) + { + $trace_no = lfPP_CLI_DL__gen_trace_no( $site_cd, $ip ); + } + else + { + $trace_no = ""; + } + + return $trace_no; + } + + /* -------------------------------------------------------------------- */ + /* - FUNC : ENC DATA 정보 설정 함수 - */ + /* -------------------------------------------------------------------- */ + function mf_set_payx_common_data( $name, $val ) + { + if ( $val != "" ) + { + $this->m_payx_common .= ( $name . '=' . $val . chr( 31 ) ); + } + } + + function mf_set_payx_card_data( $name, $val ) + { + if ( $val != "" ) + { + $this->m_payx_card .= ( $name . '=' . $val . chr( 31 ) ); + } + } + + function mf_set_ordr_data( $name, $val ) + { + if ( $val != "" ) + { + $this->m_ordr_data .= ( $name . '=' . $val . chr( 31 ) ); + } + } + + function mf_set_rcvr_data( $name, $val ) + { + if ( $val != "" ) + { + $this->m_rcvr_data .= ( $name . '=' . $val . chr( 31 ) ); + } + } + + function mf_set_escw_data( $name, $val ) + { + if ( $val != "" ) + { + $this->m_escw_data .= ( $name . '=' . $val . chr( 29 ) ); + } + } + + function mf_set_modx_data( $name, $val ) + { + if ( $val != "" ) + { + $this->m_modx_data .= ( $name . '=' . $val . chr( 31 ) ); + } + } + + function mf_set_encx_data( $encx_data, $encx_info ) + { + $this->m_encx_data = $encx_data; + $this->m_encx_info = $encx_info; + } + + /* -------------------------------------------------------------------- */ + /* - FUNC : 지불 처리 함수 - */ + /* -------------------------------------------------------------------- */ + function mf_do_tx( $trace_no, $home_dir, $site_cd, + $site_key, $tx_cd, $pub_key_str, + $pa_url, $pa_port, $user_agent, + $ordr_idxx, $cust_ip, + $log_level, $opt, $mode, + $key_dir, $log_dir) + { + $payx_data = $this->mf_get_payx_data(); + + $ordr_data = $this->mf_get_data( "ordr_data", $this->m_ordr_data ); + $rcvr_data = $this->mf_get_data( "rcvr_data", $this->m_rcvr_data ); + $escw_data = $this->mf_get_data( "escw_data", $this->m_escw_data ); + $modx_data = $this->mf_get_data( "mod_data", $this->m_modx_data ); + + if ( $mode == "1" ) + { + $res_data = lfPP_CLI_DL__do_tx_2( $trace_no, $home_dir, $site_cd, + $site_key, $tx_cd, $pub_key_str, + $pa_url, $pa_port, $user_agent, + $ordr_idxx, + $payx_data, $ordr_data, + $rcvr_data, $escw_data, + $modx_data, + $this->m_encx_data, $this->m_encx_info, + $log_level, $opt ); + } + else + { + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') + { + $bin_exe = $home_dir.'/bin/pp_cli_exe '; + + $res_data = $this->mf_exec($bin_exe . "\"". + "site_cd=" . $site_cd . "," . + "site_key=" . $site_key . "," . + "tx_cd=" . $tx_cd . "," . + "pa_url=" . $pa_url . "," . + "pa_port=" . $pa_port . "," . + "ordr_idxx=" . $ordr_idxx . "," . + "enc_data=" . $this->m_encx_data . "," . + "enc_info=" . $this->m_encx_info . "," . + "trace_no=" . $trace_no . "," . + "cust_ip=" . $cust_ip . "," . + "key_path=" . $key_dir . "," . + "log_path=" . $log_dir . "," . + "log_level=" . $log_level . "," . + "plan_data=" . $payx_data . + $ordr_data . + $rcvr_data . + $escw_data . + $modx_data . + "\"") ; + } + else + { + if(PHP_INT_MAX == 2147483647) // 32-bit + $bin_exe = $home_dir.'/bin/pp_cli'; + else + $bin_exe = $home_dir.'/bin/pp_cli_x64'; + + $res_data = $this->mf_exec( $bin_exe, + "-h", + "home=" . $home_dir . "," . + "site_cd=" . $site_cd . "," . + "site_key=" . $site_key . "," . + "tx_cd=" . $tx_cd . "," . + "pa_url=" . $pa_url . "," . + "pa_port=" . $pa_port . "," . + "ordr_idxx=" . $ordr_idxx . "," . + "payx_data=" . $payx_data . "," . + "ordr_data=" . $ordr_data . "," . + "rcvr_data=" . $rcvr_data . "," . + "escw_data=" . $escw_data . "," . + "modx_data=" . $modx_data . "," . + "enc_data=" . $this->m_encx_data . "," . + "enc_info=" . $this->m_encx_info . "," . + "trace_no=" . $trace_no . "," . + "cust_ip=" . $cust_ip . "," . + "log_level=" . $log_level . "," . + "opt=" . $opt . "" ); + } + + if ( $res_data == "" ) + { + $res_data = "res_cd=9502" . chr( 31 ) . "res_msg=연동 모듈 호출 오류"; + } + } + + parse_str( str_replace( chr( 31 ), "&", $res_data ), $this->m_res_data ); + + $this->m_res_cd = $this->m_res_data[ "res_cd" ]; + $this->m_res_msg = $this->m_res_data[ "res_msg" ]; + } + + /* -------------------------------------------------------------------- */ + /* - FUNC : 처리 결과 값을 리턴하는 함수 - */ + /* -------------------------------------------------------------------- */ + function mf_get_res_data( $name ) + { + return $this->m_res_data[ $name ]; + } + + function mf_get_payx_data() + { + if ( $this->m_payx_common != "" || $this->m_payx_card != "" ) + { + $my_data = "payx_data="; + } + + if ( $this->m_payx_common != "" ) + { + $my_data .= "common=" . $this->m_payx_common . chr( 30 ); + } + + if ( $this->m_payx_card != "" ) + { + $my_data .= ( "card=" . $this->m_payx_card . chr( 30 ) ); + } + + return $my_data; + } + + function mf_get_data( $data_name, $data ) + { + if ( $data != "" ) + { + $my_data = $data_name . "=" . $data; + } + else + { + $my_data = ""; + } + + return $my_data; + } + + function mf_exec() + { + $arg = func_get_args(); + + if ( is_array( $arg[0] ) ) $arg = $arg[0]; + + $exec_cmd = array_shift( $arg ); + + while ( list(,$i) = each($arg) ) + { + $exec_cmd .= " " . escapeshellarg( $i ); + } + + $rt = exec( $exec_cmd ); + + return $rt; + } + } +?> \ No newline at end of file diff --git a/mobile/shop/kcp/real_KCPPaymentService.wsdl b/mobile/shop/kcp/real_KCPPaymentService.wsdl new file mode 100644 index 000000000..6a463bb32 --- /dev/null +++ b/mobile/shop/kcp/real_KCPPaymentService.wsdl @@ -0,0 +1,145 @@ + + + + KCP Payment Service + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mobile/shop/largeimage.php b/mobile/shop/largeimage.php new file mode 100644 index 000000000..dad3c2fde --- /dev/null +++ b/mobile/shop/largeimage.php @@ -0,0 +1,29 @@ +'.str_replace(G5_PATH.'/', '', $skin).'파일이 존재하지 않습니다.

    '; + +include_once(G5_PATH.'/tail.sub.php'); +?> \ No newline at end of file diff --git a/mobile/shop/lg/_common.php b/mobile/shop/lg/_common.php new file mode 100644 index 000000000..7e0b90e75 --- /dev/null +++ b/mobile/shop/lg/_common.php @@ -0,0 +1,7 @@ +쇼핑몰 설치 후 이용해 주십시오.

    '); +define('_SHOP_', true); +?> \ No newline at end of file diff --git a/mobile/shop/lg/cancel_url.php b/mobile/shop/lg/cancel_url.php new file mode 100644 index 000000000..a459731d6 --- /dev/null +++ b/mobile/shop/lg/cancel_url.php @@ -0,0 +1,3 @@ + + +사용자가 ISP(국민/BC) 카드결제을 중단하였습니다. \ No newline at end of file diff --git a/mobile/shop/lg/mispwapurl.php b/mobile/shop/lg/mispwapurl.php new file mode 100644 index 000000000..ff41306e6 --- /dev/null +++ b/mobile/shop/lg/mispwapurl.php @@ -0,0 +1,22 @@ + \ No newline at end of file diff --git a/mobile/shop/lg/note_url.php b/mobile/shop/lg/note_url.php new file mode 100644 index 000000000..412b8e6cc --- /dev/null +++ b/mobile/shop/lg/note_url.php @@ -0,0 +1,153 @@ + diff --git a/mobile/shop/lg/orderform.1.php b/mobile/shop/lg/orderform.1.php new file mode 100644 index 000000000..1fd1a22e6 --- /dev/null +++ b/mobile/shop/lg/orderform.1.php @@ -0,0 +1,19 @@ + + +
    + + + + + + + + + + + + + +
    \ No newline at end of file diff --git a/mobile/shop/lg/orderform.2.php b/mobile/shop/lg/orderform.2.php new file mode 100644 index 000000000..055618c13 --- /dev/null +++ b/mobile/shop/lg/orderform.2.php @@ -0,0 +1,20 @@ + + + + + + + + + + + + + +
    + + + 취소 +
    \ No newline at end of file diff --git a/mobile/shop/lg/orderform.3.php b/mobile/shop/lg/orderform.3.php new file mode 100644 index 000000000..d054abec9 --- /dev/null +++ b/mobile/shop/lg/orderform.3.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/mobile/shop/lg/returnurl.php b/mobile/shop/lg/returnurl.php new file mode 100644 index 000000000..f37dec4fd --- /dev/null +++ b/mobile/shop/lg/returnurl.php @@ -0,0 +1,80 @@ + + +'.PHP_EOL; + +echo make_order_field($data, $exclude); + +echo ''.PHP_EOL; +echo ''.PHP_EOL; + +echo ''.PHP_EOL; +?> + +
    +
    + + 주문완료 중입니다. 잠시만 기다려 주십시오. +
    +
    + + + + \ No newline at end of file diff --git a/mobile/shop/lg/xpay_approval.php b/mobile/shop/lg/xpay_approval.php new file mode 100644 index 000000000..c81ce3371 --- /dev/null +++ b/mobile/shop/lg/xpay_approval.php @@ -0,0 +1,170 @@ + 계약정보 -> 상점정보관리에서 확인하실수 있습니다) + * + * MD5 해쉬데이터 암호화 검증을 위해 + * LG유플러스에서 발급한 상점키(MertKey)를 환경설정 파일(lgdacom/conf/mall.conf)에 반드시 입력하여 주시기 바랍니다. + */ + +$xpay = new XPay($configPath, $CST_PLATFORM); + +// Mert Key 설정 +$xpay->set_config_value('t'.$LGD_MID, $config['cf_lg_mert_key']); +$xpay->set_config_value($LGD_MID, $config['cf_lg_mert_key']); + +$xpay->Init_TX($LGD_MID); +$LGD_HASHDATA = md5($LGD_MID.$LGD_OID.$LGD_AMOUNT.$LGD_TIMESTAMP.$xpay->config[$LGD_MID]); +$LGD_CUSTOM_PROCESSTYPE = "TWOTR"; +/* + ************************************************* + * 2. MD5 해쉬암호화 (수정하지 마세요) - END + ************************************************* + */ +$CST_WINDOW_TYPE = "submit"; // 수정불가 +$payReqMap['CST_PLATFORM'] = $CST_PLATFORM; // 테스트, 서비스 구분 +$payReqMap['CST_WINDOW_TYPE'] = $CST_WINDOW_TYPE; // 수정불가 +$payReqMap['CST_MID'] = $CST_MID; // 상점아이디 +$payReqMap['LGD_MID'] = $LGD_MID; // 상점아이디 +$payReqMap['LGD_OID'] = $LGD_OID; // 주문번호 +$payReqMap['LGD_BUYER'] = $LGD_BUYER; // 구매자 +$payReqMap['LGD_PRODUCTINFO'] = $LGD_PRODUCTINFO; // 상품정보 +$payReqMap['LGD_AMOUNT'] = $LGD_AMOUNT; // 결제금액 +$payReqMap['LGD_BUYEREMAIL'] = $LGD_BUYEREMAIL; // 구매자 이메일 +$payReqMap['LGD_CUSTOM_SKIN'] = $LGD_CUSTOM_SKIN; // 결제창 SKIN +$payReqMap['LGD_CUSTOM_PROCESSTYPE'] = $LGD_CUSTOM_PROCESSTYPE; // 트랜잭션 처리방식 +$payReqMap['LGD_TIMESTAMP'] = $LGD_TIMESTAMP; // 타임스탬프 +$payReqMap['LGD_HASHDATA'] = $LGD_HASHDATA; // MD5 해쉬암호값 +$payReqMap['LGD_RETURNURL'] = $LGD_RETURNURL; // 응답수신페이지 +$payReqMap['LGD_VERSION'] = "PHP_SmartXPay_1.0"; // 버전정보 (삭제하지 마세요) +$payReqMap['LGD_CUSTOM_FIRSTPAY'] = $LGD_CUSTOM_FIRSTPAY; // 디폴트 결제수단 +$payReqMap['LGD_CUSTOM_SWITCHINGTYPE'] = "SUBMIT"; // 신용카드 카드사 인증 페이지 연동 방식 +$payReqMap['LGD_ENCODING'] = "UTF-8"; +$payReqMap['LGD_ENCODING_NOTEURL'] = "UTF-8"; +$payReqMap['LGD_ENCODING_RETURNURL'] = "UTF-8"; +$payReqMap['LGD_TAXFREEAMOUNT'] = $LGD_TAXFREEAMOUNT; +$payReqMap['LGD_CASHRECEIPTYN'] = $LGD_CASHRECEIPTYN; +$payReqMap['LGD_BUYERPHONE'] = $LGD_BUYERPHONE; +$payReqMap['LGD_BUYERID'] = $LGD_BUYERID; +$payReqMap['LGD_EASYPAY_ONLY'] = $LGD_EASYPAY_ONLY; + +/* +**************************************************** +* 안드로이드폰 신용카드 ISP(국민/BC)결제에만 적용 (시작)* +**************************************************** + +(주의)LGD_CUSTOM_ROLLBACK 의 값을 "Y"로 넘길 경우, LG U+ 전자결제에서 보낸 ISP(국민/비씨) 승인정보를 고객서버의 note_url에서 수신시 "OK" 리턴이 안되면 해당 트랜잭션은 무조건 롤백(자동취소)처리되고, +LGD_CUSTOM_ROLLBACK 의 값 을 "C"로 넘길 경우, 고객서버의 note_url에서 "ROLLBACK" 리턴이 될 때만 해당 트랜잭션은 롤백처리되며 그외의 값이 리턴되면 정상 승인완료 처리됩니다. +만일, LGD_CUSTOM_ROLLBACK 의 값이 "N" 이거나 null 인 경우, 고객서버의 note_url에서 "OK" 리턴이 안될시, "OK" 리턴이 될 때까지 3분간격으로 2시간동안 승인결과를 재전송합니다. +*/ + +$payReqMap['LGD_CUSTOM_ROLLBACK'] = ""; // 비동기 ISP에서 트랜잭션 처리여부 +$payReqMap['LGD_KVPMISPNOTEURL'] = $LGD_KVPMISPNOTEURL; // 비동기 ISP(ex. 안드로이드) 승인결과를 받는 URL +$payReqMap['LGD_KVPMISPWAPURL'] = $LGD_KVPMISPWAPURL; // 비동기 ISP(ex. 안드로이드) 승인완료후 사용자에게 보여지는 승인완료 URL +$payReqMap['LGD_KVPMISPCANCELURL'] = $LGD_KVPMISPCANCELURL; // ISP 앱에서 취소시 사용자에게 보여지는 취소 URL + +/* +**************************************************** +* 안드로이드폰 신용카드 ISP(국민/BC)결제에만 적용 (끝) * +**************************************************** +*/ + +// 안드로이드 에서 신용카드 적용 ISP(국민/BC)결제에만 적용 (선택) +// $payReqMap['LGD_KVPMISPAUTOAPPYN'] = "Y"; +// Y: 안드로이드에서 ISP신용카드 결제시, 고객사에서 'App To App' 방식으로 국민, BC카드사에서 받은 결제 승인을 받고 고객사의 앱을 실행하고자 할때 사용 + +// 가상계좌(무통장) 결제연동을 하시는 경우 할당/입금 결과를 통보받기 위해 반드시 LGD_CASNOTEURL 정보를 LG 유플러스에 전송해야 합니다 . +$payReqMap['LGD_CASNOTEURL'] = $LGD_CASNOTEURL; // 가상계좌 NOTEURL + +// 계좌이체 파라미터 +//$payReqMap['LGD_MTRANSFERWAPURL'] = $LGD_MTRANSFERWAPURL; +//$payReqMap['LGD_MTRANSFERCANCELURL'] = $LGD_MTRANSFERCANCELURL; +$payReqMap['LGD_MTRANSFERNOTEURL'] = $LGD_MTRANSFERNOTEURL; +$payReqMap['LGD_MTRANSFERAUTOAPPYN'] = $LGD_MTRANSFERAUTOAPPYN; + +//Return URL에서 인증 결과 수신 시 셋팅될 파라미터 입니다.*/ +$payReqMap['LGD_RESPCODE'] = ""; +$payReqMap['LGD_RESPMSG'] = ""; +$payReqMap['LGD_PAYKEY'] = ""; + +$_SESSION['PAYREQ_MAP'] = $payReqMap; + +$g5['title'] = 'LG 유플러스 eCredit서비스 결제'; +$g5['body_script'] = ' onload="launchCrossPlatform();"'; +include_once(G5_PATH.'/head.sub.php'); +?> + + + +
    + $value) { + echo'"'; + } +?> +
    + + \ No newline at end of file diff --git a/mobile/shop/list.php b/mobile/shop/list.php new file mode 100644 index 000000000..5c65802e5 --- /dev/null +++ b/mobile/shop/list.php @@ -0,0 +1,172 @@ + + + + + +
    + + '.conv_content($ca['ca_mobile_head_html'], 1).'
    '; + + $cate_skin = $skin_dir.'/listcategory.skin.php'; + if(!is_file($cate_skin)) + $cate_skin = G5_MSHOP_SKIN_PATH.'/listcategory.skin.php'; + include $cate_skin; + + // 테마미리보기 베스트상품 재설정 + if(defined('_THEME_PREVIEW_') && _THEME_PREVIEW_ === true) { + if(isset($theme_config['ca_mobile_list_best_mod'])) + $theme_config['ca_mobile_list_best_mod'] = (isset($tconfig['ca_mobile_list_best_mod']) && $tconfig['ca_mobile_list_best_mod']) ? $tconfig['ca_mobile_list_best_mod'] : 0; + if(isset($theme_config['ca_mobile_list_best_row'])) + $theme_config['ca_mobile_list_best_row'] = (isset($tconfig['ca_mobile_list_best_row']) && $tconfig['ca_mobile_list_best_row']) ? $tconfig['ca_mobile_list_best_row'] : 0; + } + + // 분류 Best Item + $list_mod = (isset($theme_config['ca_mobile_list_best_mod']) && $theme_config['ca_mobile_list_best_mod']) ? (int)$theme_config['ca_mobile_list_best_mod'] : $ca['ca_mobile_list_mod']; + $list_row = (isset($theme_config['ca_mobile_list_best_row']) && $theme_config['ca_mobile_list_best_row']) ? (int)$theme_config['ca_mobile_list_best_row'] : $ca['ca_mobile_list_row']; + $limit = $list_mod * $list_row; + $best_skin = G5_MSHOP_SKIN_PATH.'/list.best.10.skin.php'; + + $sql = " select * + from {$g5['g5_shop_item_table']} + where ( ca_id like '$ca_id%' or ca_id2 like '$ca_id%' or ca_id3 like '$ca_id%' ) + and it_use = '1' + and it_type4 = '1' + order by it_order, it_id desc + limit 0, $limit "; + + $list = new item_list($best_skin, $list_mod, $list_row, $ca['ca_mobile_img_width'], $ca['ca_mobile_img_height']); + $list->set_query($sql); + $list->set_mobile(true); + $list->set_view('it_img', true); + $list->set_view('it_id', false); + $list->set_view('it_name', true); + $list->set_view('it_price', true); + echo $list->run(); + + // 상품 출력순서가 있다면 + if ($sort != "") + $order_by = $sort.' '.$sortodr.' , it_order, it_id desc'; + else + $order_by = 'it_order, it_id desc'; + + $error = '

    등록된 상품이 없습니다.

    '; + + // 리스트 스킨 + $skin_file = $skin_dir.'/'.$ca['ca_mobile_skin']; + + if (file_exists($skin_file)) { + $sort_skin = $skin_dir.'/list.sort.skin.php'; + if(!is_file($sort_skin)) + $sort_skin = G5_MSHOP_SKIN_PATH.'/list.sort.skin.php'; + include $sort_skin; + + // 총몇개 + $items = $ca['ca_mobile_list_mod'] * $ca['ca_mobile_list_row']; + // 페이지가 없으면 첫 페이지 (1 페이지) + if ($page < 1) $page = 1; + // 시작 레코드 구함 + $from_record = ($page - 1) * $items; + + $list = new item_list($skin_file, $ca['ca_mobile_list_mod'], $ca['ca_mobile_list_row'], $ca['ca_mobile_img_width'], $ca['ca_mobile_img_height']); + $list->set_category($ca['ca_id'], 1); + $list->set_category($ca['ca_id'], 2); + $list->set_category($ca['ca_id'], 3); + $list->set_is_page(true); + $list->set_mobile(true); + $list->set_order_by($order_by); + $list->set_from_record($from_record); + $list->set_view('it_img', true); + $list->set_view('it_id', false); + $list->set_view('it_name', true); + $list->set_view('it_price', true); + echo $list->run(); + + // where 된 전체 상품수 + $total_count = $list->total_count; + } + else + { + echo '
    '.str_replace(G5_PATH.'/', '', $skin_file).' 파일을 찾을 수 없습니다.
    관리자에게 알려주시면 감사하겠습니다.
    '; + } + ?> + + 0 && $total_count > $items) { + $qstr1 .= 'ca_id='.$ca_id; + $qstr1 .='&sort='.$sort.'&sortodr='.$sortodr; + $ajax_url = G5_SHOP_URL.'/ajax.list.php?'.$qstr1; + ?> +
    +

    로딩이미지
    잠시만 기다려주세요.

    +
    + +
    +
    + + + '.conv_content($ca['ca_mobile_tail_html'], 1).''; + ?> + + +\n"; +?> diff --git a/mobile/shop/listtype.php b/mobile/shop/listtype.php new file mode 100644 index 000000000..67e12e272 --- /dev/null +++ b/mobile/shop/listtype.php @@ -0,0 +1,77 @@ +\'\"\\\'\\\"\%\=\(\)\s]/", "", $_REQUEST['type']); +if ($type == 1) $g5['title'] = '히트상품'; +else if ($type == 2) $g5['title'] = '추천상품'; +else if ($type == 3) $g5['title'] = '최신상품'; +else if ($type == 4) $g5['title'] = '인기상품'; +else if ($type == 5) $g5['title'] = '세일상품'; +else + alert('상품유형이 아닙니다.'); + +include_once(G5_MSHOP_PATH.'/_head.php'); + +// 한페이지에 출력하는 이미지수 = $list_mod * $list_row +// 모바일에서는 계산된 이미지수가 중요함 +$list_mod = 3; // 한줄에 이미지 몇개씩 출력? 단, 모바일환경에서는 사용되지 않음. +$list_row = 5; // 한 페이지에 몇라인씩 출력? + +$img_width = 230; // 출력이미지 폭 +$img_height = 230; // 출력이미지 높이 +?> + +set_type($type); + $list->set_list_skin($list_file); + $list->set_list_mod($list_mod); + $list->set_list_row($list_row); + $list->set_img_size($img_width, $img_height); + $list->set_is_page(true); + $list->set_mobile(true); + $list->set_order_by($order_by); + $list->set_from_record($from_record); + echo $list->run(); + + // where 된 전체 상품수 + $total_count = $list->total_count; + // 전체 페이지 계산 + $total_page = ceil($total_count / $items); +} +else +{ + echo '
    '.$skin.' 파일을 찾을 수 없습니다.
    관리자에게 알려주시면 감사하겠습니다.
    '; +} +?> + + + + diff --git a/mobile/shop/mypage.php b/mobile/shop/mypage.php new file mode 100644 index 000000000..d6865727f --- /dev/null +++ b/mobile/shop/mypage.php @@ -0,0 +1,117 @@ += '".G5_TIME_YMD."' "; +$res = sql_query($sql); + +for($k=0; $cp=sql_fetch_array($res); $k++) { + if(!is_used_coupon($member['mb_id'], $cp['cp_id'])) + $cp_count++; +} +?> + +
    + +
    +

    회원정보 개요

    +
      +
    • 보유쿠폰
    • +
    • 보유포인트 + 점
    • + +
    +
    +
    연락처
    +
    +
    E-Mail
    +
    +
    최종접속일시
    +
    +
    회원가입일시
    +
    +
    주소
    +
    +
    +
    + +
    +

    최근 주문내역

    + +
    + +
    +

    최근 위시리스트

    + +
      + + +
    • +
      +
      + + +
      +
    • + + 보관 내역이 없습니다.'; + ?> +
    +
    + +
    + + + + \ No newline at end of file diff --git a/mobile/shop/orderaddress.php b/mobile/shop/orderaddress.php new file mode 100644 index 000000000..c4297c767 --- /dev/null +++ b/mobile/shop/orderaddress.php @@ -0,0 +1,115 @@ + + +
    +
    +

    배송지 목록

    + +
    +
      + +
    • +
      + + + +
      +
      + + +
      +
      + > + +
      +
      +
      +
      /
      +
      + + + 삭제 +
      +
    • + +
    +
    + +
    + + +
    +
    +
    + + + + + + \ No newline at end of file diff --git a/mobile/shop/orderform.php b/mobile/shop/orderform.php new file mode 100644 index 000000000..f71ffcd8d --- /dev/null +++ b/mobile/shop/orderform.php @@ -0,0 +1,1506 @@ + + +
    + +

    주문하실 상품을 확인하세요.

    + +
      + 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_price'].chr(31); + } + + $a1 = ''; + $a2 = ''; + $image_width = 80; + $image_height = 80; + $image = get_it_image($row['it_id'], $image_width, $image_height); + + $it_name = $a1 . stripslashes($row['it_name']) . $a2; + $it_options = print_item_options($row['it_id'], $s_cart_id); + if($it_options) { + $it_name .= '
      '.$it_options.'
      '; + } + + // 복합과세금액 + if($default['de_tax_flag_use']) { + if($row['it_notax']) { + $comm_free_mny += $sum['price']; + } else { + $tot_tax_mny += $sum['price']; + } + } + + $point = $sum['point']; + $sell_price = $sum['price']; + + // 쿠폰 + if($is_member) { + $cp_button = ''; + $cp_count = 0; + + $sql = " select cp_id + from {$g5['g5_shop_coupon_table']} + where mb_id IN ( '{$member['mb_id']}', '전체회원' ) + and cp_start <= '".G5_TIME_YMD."' + and cp_end >= '".G5_TIME_YMD."' + and cp_minimum <= '$sell_price' + and ( + ( cp_method = '0' and cp_target = '{$row['it_id']}' ) + OR + ( cp_method = '1' and ( cp_target IN ( '{$row['ca_id']}', '{$row['ca_id2']}', '{$row['ca_id3']}' ) ) ) + ) "; + $res = sql_query($sql); + + for($k=0; $cp=sql_fetch_array($res); $k++) { + if(is_used_coupon($member['mb_id'], $cp['cp_id'])) + continue; + + $cp_count++; + } + + if($cp_count) { + $cp_button = '
      '; + $it_cp_count++; + } + } + + // 배송비 + switch($row['ct_send_cost']) + { + case 1: + $ct_send_cost = '착불'; + break; + case 2: + $ct_send_cost = '무료'; + break; + default: + $ct_send_cost = '선불'; + break; + } + + // 조건부무료 + if($row['it_sc_type'] == 2) { + $sendcost = get_item_sendcost($row['it_id'], $sum['price'], $sum['qty'], $s_cart_id); + + if($sendcost == 0) + $ct_send_cost = '무료'; + } + ?> + +
    • + + + + + + + + +
      + +
      + + +
      +
      + 판매가 + 수량 + 배송비 +
      +
      + 주문금액 + 적립포인트 +
      + +
    • + + 장바구니에 담긴 상품이 없습니다.'; + alert('장바구니가 비어 있습니다.', G5_SHOP_URL.'/cart.php'); + } else { + // 배송비 계산 + $send_cost = get_sendcost($s_cart_id); + } + + // 복합과세처리 + if($default['de_tax_flag_use']) { + $comm_tax_mny = round(($tot_tax_mny + $send_cost) / 1.1); + $comm_vat_mny = ($tot_tax_mny + $send_cost) - $comm_tax_mny; + } + ?> +
    + + + +
    +
    주문
    +
    원
    + 0) { ?> +
    쿠폰
    +
    0 원
    + +
    배송비
    +
    원
    +
    총계
    +
    + + 원 +
    +
    포인트
    +
    점
    +
    + + +
    + +
    +
    + + + + + + + + + + +
    +

    주문하시는 분

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + 영,숫자 3~20자 (주문서 조회시 필요) +
    주소 + + +
    + + + + + + +
    +
    + + 이후로 배송 바랍니다. +
    +
    +
    + +
    +

    받으시는 분

    + +
    + + + '.PHP_EOL; + $addr_list .= ''.PHP_EOL; + + // 기본배송지 + $sql = " select * + from {$g5['g5_shop_order_address_table']} + where mb_id = '{$member['mb_id']}' + and ad_default = '1' "; + $row = sql_fetch($sql); + if($row['ad_id']) { + $val1 = $row['ad_name'].$sep.$row['ad_tel'].$sep.$row['ad_hp'].$sep.$row['ad_zip1'].$sep.$row['ad_zip2'].$sep.$row['ad_addr1'].$sep.$row['ad_addr2'].$sep.$row['ad_addr3'].$sep.$row['ad_jibeon'].$sep.$row['ad_subject']; + $addr_list .= '
    '.PHP_EOL; + $addr_list .= ''.PHP_EOL; + } + + // 최근배송지 + $sql = " select * + from {$g5['g5_shop_order_address_table']} + where mb_id = '{$member['mb_id']}' + and ad_default = '0' + order by ad_id desc + limit 1 "; + $result = sql_query($sql); + for($i=0; $row=sql_fetch_array($result); $i++) { + $val1 = $row['ad_name'].$sep.$row['ad_tel'].$sep.$row['ad_hp'].$sep.$row['ad_zip1'].$sep.$row['ad_zip2'].$sep.$row['ad_addr1'].$sep.$row['ad_addr2'].$sep.$row['ad_addr3'].$sep.$row['ad_jibeon'].$sep.$row['ad_subject']; + $val2 = ''; + $addr_list .= '
    '.PHP_EOL.$val2.PHP_EOL; + } + + $addr_list .= '
    '.PHP_EOL; + $addr_list .= ''.PHP_EOL; + + $addr_list .='배송지목록'; + } else { + // 주문자와 동일 + $addr_list .= ''.PHP_EOL; + $addr_list .= ''.PHP_EOL; + } + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    배송지선택 + +
    + + + +
    주소 + + +
    + + + + + + + +
    +
    +
    + + = '".G5_TIME_YMD."' + and cp_minimum <= '$tot_sell_price' "; + $res = sql_query($sql); + + for($k=0; $cp=sql_fetch_array($res); $k++) { + if(is_used_coupon($member['mb_id'], $cp['cp_id'])) + continue; + + $oc_cnt++; + } + + if($send_cost > 0) { + // 배송비쿠폰 + $sql = " select cp_id + from {$g5['g5_shop_coupon_table']} + where mb_id IN ( '{$member['mb_id']}', '전체회원' ) + and cp_method = '3' + and cp_start <= '".G5_TIME_YMD."' + and cp_end >= '".G5_TIME_YMD."' + and cp_minimum <= '$tot_sell_price' "; + $res = sql_query($sql); + + for($k=0; $cp=sql_fetch_array($res); $k++) { + if(is_used_coupon($member['mb_id'], $cp['cp_id'])) + continue; + + $sc_cnt++; + } + } + } + ?> + +
    +

    결제정보 입력

    + +
    + + + 0) { ?> + + + + + + + + + + 0) { ?> + + + + + + + + + + + + + + + + + + +
    주문할인쿠폰 + + +
    주문할인금액0원
    배송비할인쿠폰 + + +
    배송비할인금액0원
    총 주문금액원
    추가배송비0원 (지역에 따라 추가되는 도선료 등의 배송비입니다.)
    +
    + + 무통장입금 이외의 결제 수단으로 결제하시는 경우 포인트를 적립해드리지 않습니다.

    '; + + $multi_settle == 0; + $checked = ''; + + $escrow_title = ""; + if ($default['de_escrow_use']) { + $escrow_title = "에스크로 "; + } + + if ($default['de_bank_use'] || $default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_use'] || $default['de_easy_pay_use']) { + echo '
      '; + } + + // 무통장입금 사용 + if ($default['de_bank_use']) { + $multi_settle++; + echo '
    • '.PHP_EOL; + $checked = ''; + } + + // 가상계좌 사용 + if ($default['de_vbank_use']) { + $multi_settle++; + echo '
    • '.PHP_EOL; + $checked = ''; + } + + // 계좌이체 사용 + if ($default['de_iche_use']) { + $multi_settle++; + echo '
    • '.PHP_EOL; + $checked = ''; + } + + // 휴대폰 사용 + if ($default['de_hp_use']) { + $multi_settle++; + echo '
    • '.PHP_EOL; + $checked = ''; + } + + // 신용카드 사용 + if ($default['de_card_use']) { + $multi_settle++; + echo '
    • '.PHP_EOL; + $checked = ''; + } + + // PG 간편결제 + if($default['de_easy_pay_use']) { + switch($default['de_pg_service']) { + case 'lg': + $pg_easy_pay_name = 'PAYNOW'; + break; + case 'inicis': + $pg_easy_pay_name = 'KPAY'; + break; + default: + $pg_easy_pay_name = 'PAYCO'; + break; + } + + $multi_settle++; + echo '
    • '.PHP_EOL; + $checked = ''; + } + + echo '
    '; + + $temp_point = 0; + // 회원이면서 포인트사용이면 + if ($is_member && $config['cf_use_point']) + { + // 포인트 결제 사용 포인트보다 회원의 포인트가 크다면 + if ($member['mb_point'] >= $default['de_settle_min_point']) + { + $temp_point = (int)$default['de_settle_max_point']; + + if($temp_point > (int)$tot_sell_price) + $temp_point = (int)$tot_sell_price; + + if($temp_point > (int)$member['mb_point']) + $temp_point = (int)$member['mb_point']; + + $point_unit = (int)$default['de_settle_point_unit']; + $temp_point = (int)((int)($temp_point / $point_unit) * $point_unit); + + echo '
    결제포인트 : 점 ('.$point_unit.'점 단위로 입력하세요.)
    '; + echo '

    회원님의 보유포인트('.display_point($member['mb_point']).')중 '.display_point($temp_point).'까지 사용 가능합니다.

    '; + $multi_settle++; + } + } + + if ($default['de_bank_use']) { + // 은행계좌를 배열로 만든후 + $str = explode("\n", trim($default['de_bank_account'])); + if (count($str) <= 1) + { + $bank_account = ''.$str[0].PHP_EOL; + } + else + { + $bank_account = ''.PHP_EOL; + } + echo ''; + } + + if ($default['de_bank_use'] || $default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_use'] || $default['de_easy_pay_use']) { + echo '
    '; + } + + if ($multi_settle == 0) + echo '

    결제할 방법이 없습니다.
    운영자에게 알려주시면 감사하겠습니다.

    '; + ?> +
    + + + + +
    + + + +
    + + + + \ No newline at end of file diff --git a/mobile/shop/orderformupdate.php b/mobile/shop/orderformupdate.php new file mode 100644 index 000000000..9c337949f --- /dev/null +++ b/mobile/shop/orderformupdate.php @@ -0,0 +1,809 @@ + $it_stock_qty) + $error .= "{$row['ct_option']} 의 재고수량이 부족합니다. 현재고수량 : $it_stock_qty 개\\n\\n"; +} + +if($i == 0) + alert('장바구니가 비어 있습니다.\\n\\n이미 주문하셨거나 장바구니에 담긴 상품이 없는 경우입니다.', G5_SHOP_URL.'/cart.php'); + +if ($error != "") +{ + $error .= "다른 고객님께서 {$od_name}님 보다 먼저 주문하신 경우입니다. 불편을 끼쳐 죄송합니다."; + alert($error, $page_return_url); +} + +$i_price = (int)$_POST['od_price']; +$i_send_cost = (int)$_POST['od_send_cost']; +$i_send_cost2 = (int)$_POST['od_send_cost2']; +$i_send_coupon = (int)$_POST['od_send_coupon']; +$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_price, + COUNT(distinct it_id) as cart_count + from {$g5['g5_shop_cart_table']} where od_id = '$tmp_cart_id' and ct_select = '1' "; +$row = sql_fetch($sql); +$tot_ct_price = $row['od_price']; +$cart_count = $row['cart_count']; +$tot_od_price = $tot_ct_price; + +// 쿠폰금액계산 +$tot_cp_price = 0; +if($is_member) { + // 상품쿠폰 + $tot_it_cp_price = $tot_od_cp_price = 0; + $it_cp_cnt = count($_POST['cp_id']); + $arr_it_cp_prc = array(); + for($i=0; $i<$it_cp_cnt; $i++) { + $cid = $_POST['cp_id'][$i]; + $it_id = $_POST['it_id'][$i]; + $sql = " select cp_id, cp_method, cp_target, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum + from {$g5['g5_shop_coupon_table']} + where cp_id = '$cid' + and mb_id IN ( '{$member['mb_id']}', '전체회원' ) + and cp_start <= '".G5_TIME_YMD."' + and cp_end >= '".G5_TIME_YMD."' + and cp_method IN ( 0, 1 ) "; + $cp = sql_fetch($sql); + if(!$cp['cp_id']) + continue; + + // 사용한 쿠폰인지 + if(is_used_coupon($member['mb_id'], $cp['cp_id'])) + continue; + + // 분류할인인지 + if($cp['cp_method']) { + $sql2 = " select it_id, ca_id, ca_id2, ca_id3 + from {$g5['g5_shop_item_table']} + where it_id = '$it_id' "; + $row2 = sql_fetch($sql2); + + if(!$row2['it_id']) + continue; + + if($row2['ca_id'] != $cp['cp_target'] && $row2['ca_id2'] != $cp['cp_target'] && $row2['ca_id3'] != $cp['cp_target']) + continue; + } else { + if($cp['cp_target'] != $it_id) + continue; + } + + // 상품금액 + $sql = " select SUM( IF(io_type = '1', io_price * ct_qty, (ct_price + io_price) * ct_qty)) as sum_price + from {$g5['g5_shop_cart_table']} + where od_id = '$tmp_cart_id' + and it_id = '$it_id' + and ct_select = '1' "; + $ct = sql_fetch($sql); + $item_price = $ct['sum_price']; + + if($cp['cp_minimum'] > $item_price) + continue; + + $dc = 0; + if($cp['cp_type']) { + $dc = floor(($item_price * ($cp['cp_price'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc']; + } else { + $dc = $cp['cp_price']; + } + + if($cp['cp_maximum'] && $dc > $cp['cp_maximum']) + $dc = $cp['cp_maximum']; + + if($item_price < $dc) + continue; + + $tot_it_cp_price += $dc; + $arr_it_cp_prc[$it_id] = $dc; + } + + $tot_od_price -= $tot_it_cp_price; + + // 주문쿠폰 + if($_POST['od_cp_id']) { + $sql = " select cp_id, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum + from {$g5['g5_shop_coupon_table']} + where cp_id = '{$_POST['od_cp_id']}' + and mb_id IN ( '{$member['mb_id']}', '전체회원' ) + and cp_start <= '".G5_TIME_YMD."' + and cp_end >= '".G5_TIME_YMD."' + and cp_method = '2' "; + $cp = sql_fetch($sql); + + // 사용한 쿠폰인지 + $cp_used = is_used_coupon($member['mb_id'], $cp['cp_id']); + + $dc = 0; + if(!$cp_used && $cp['cp_id'] && ($cp['cp_minimum'] <= $tot_od_price)) { + if($cp['cp_type']) { + $dc = floor(($tot_od_price * ($cp['cp_price'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc']; + } else { + $dc = $cp['cp_price']; + } + + if($cp['cp_maximum'] && $dc > $cp['cp_maximum']) + $dc = $cp['cp_maximum']; + + if($tot_od_price < $dc) + die('Order coupon error.'); + + $tot_od_cp_price = $dc; + $tot_od_price -= $tot_od_cp_price; + } + } + + $tot_cp_price = $tot_it_cp_price + $tot_od_cp_price; +} + +if ((int)($row['od_price'] - $tot_cp_price) !== $i_price) { + die("Error."); +} + +// 배송비가 상이함 +$send_cost = get_sendcost($tmp_cart_id); + +$tot_sc_cp_price = 0; +if($is_member && $send_cost > 0) { + // 배송쿠폰 + if($_POST['sc_cp_id']) { + $sql = " select cp_id, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum + from {$g5['g5_shop_coupon_table']} + where cp_id = '{$_POST['sc_cp_id']}' + and mb_id IN ( '{$member['mb_id']}', '전체회원' ) + and cp_start <= '".G5_TIME_YMD."' + and cp_end >= '".G5_TIME_YMD."' + and cp_method = '3' "; + $cp = sql_fetch($sql); + + // 사용한 쿠폰인지 + $cp_used = is_used_coupon($member['mb_id'], $cp['cp_id']); + + $dc = 0; + if(!$cp_used && $cp['cp_id'] && ($cp['cp_minimum'] <= $tot_od_price)) { + if($cp['cp_type']) { + $dc = floor(($send_cost * ($cp['cp_price'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc']; + } else { + $dc = $cp['cp_price']; + } + + if($cp['cp_maximum'] && $dc > $cp['cp_maximum']) + $dc = $cp['cp_maximum']; + + if($dc > $send_cost) + $dc = $send_cost; + + $tot_sc_cp_price = $dc; + } + } +} + +if ((int)($send_cost - $tot_sc_cp_price) !== (int)($i_send_cost - $i_send_coupon)) { + die("Error.."); +} + +// 추가배송비가 상이함 +$od_b_zip = preg_replace('/[^0-9]/', '', $od_b_zip); +$od_b_zip1 = substr($od_b_zip, 0, 3); +$od_b_zip2 = substr($od_b_zip, 3); +$zipcode = $od_b_zip1 . $od_b_zip2; +$sql = " select sc_id, sc_price from {$g5['g5_shop_sendcost_table']} where sc_zip1 <= '$zipcode' and sc_zip2 >= '$zipcode' "; +$tmp = sql_fetch($sql); +if(!$tmp['sc_id']) + $send_cost2 = 0; +else + $send_cost2 = (int)$tmp['sc_price']; +if($send_cost2 !== $i_send_cost2) + die("Error..."); + +// 결제포인트가 상이함 +// 회원이면서 포인트사용이면 +$temp_point = 0; +if ($is_member && $config['cf_use_point']) +{ + if($member['mb_point'] >= $default['de_settle_min_point']) { + $temp_point = (int)$default['de_settle_max_point']; + + if($temp_point > (int)$tot_od_price) + $temp_point = (int)$tot_od_price; + + if($temp_point > (int)$member['mb_point']) + $temp_point = (int)$member['mb_point']; + + $point_unit = (int)$default['de_settle_point_unit']; + $temp_point = (int)((int)($temp_point / $point_unit) * $point_unit); + } +} + +if (($i_temp_point > (int)$temp_point || $i_temp_point < 0) && $config['cf_use_point']) + die("Error...."); + +if ($od_temp_point) +{ + if ($member['mb_point'] < $od_temp_point) + alert('회원님의 포인트가 부족하여 포인트로 결제 할 수 없습니다.', $page_return_url); +} + +$i_price = $i_price + $i_send_cost + $i_send_cost2 - $i_temp_point - $i_send_coupon; +$order_price = $tot_od_price + $send_cost + $send_cost2 - $tot_sc_cp_price - $od_temp_point; + +$od_status = '주문'; +if ($od_settle_case == "무통장") +{ + $od_receipt_point = $i_temp_point; + $od_receipt_price = 0; + $od_misu = $i_price - $od_receipt_price; + if($od_misu == 0) { + $od_status = '입금'; + $od_receipt_time = G5_TIME_YMDHIS; + } +} +else if ($od_settle_case == "계좌이체") +{ + switch($default['de_pg_service']) { + case 'lg': + include G5_SHOP_PATH.'/lg/xpay_result.php'; + break; + case 'inicis': + include G5_MSHOP_PATH.'/inicis/pay_result.php'; + break; + default: + include G5_MSHOP_PATH.'/kcp/pp_ax_hub.php'; + $bank_name = iconv("cp949", "utf-8", $bank_name); + break; + } + + $od_tno = $tno; + $od_receipt_price = $amount; + $od_receipt_point = $i_temp_point; + $od_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time); + $od_bank_account = $od_settle_case; + $od_deposit_name = $od_name; + $od_bank_account = $bank_name; + $pg_price = $amount; + $od_misu = $i_price - $od_receipt_price; + if($od_misu == 0) + $od_status = '입금'; +} +else if ($od_settle_case == "가상계좌") +{ + switch($default['de_pg_service']) { + case 'lg': + include G5_SHOP_PATH.'/lg/xpay_result.php'; + break; + case 'inicis': + include G5_MSHOP_PATH.'/inicis/pay_result.php'; + break; + default: + include G5_MSHOP_PATH.'/kcp/pp_ax_hub.php'; + $bankname = iconv("cp949", "utf-8", $bankname); + $depositor = iconv("cp949", "utf-8", $depositor); + break; + } + + $od_receipt_point = $i_temp_point; + $od_tno = $tno; + $od_app_no = $app_no; + $od_receipt_price = 0; + $od_bank_account = $bankname.' '.$account; + $od_deposit_name = $depositor; + $pg_price = $amount; + $od_misu = $i_price - $od_receipt_price; +} +else if ($od_settle_case == "휴대폰") +{ + switch($default['de_pg_service']) { + case 'lg': + include G5_SHOP_PATH.'/lg/xpay_result.php'; + break; + case 'inicis': + include G5_MSHOP_PATH.'/inicis/pay_result.php'; + break; + default: + include G5_MSHOP_PATH.'/kcp/pp_ax_hub.php'; + break; + } + + $od_tno = $tno; + $od_receipt_price = $amount; + $od_receipt_point = $i_temp_point; + $od_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time); + $od_bank_account = $commid.' '.$mobile_no; + $pg_price = $amount; + $od_misu = $i_price - $od_receipt_price; + if($od_misu == 0) + $od_status = '입금'; +} +else if ($od_settle_case == "신용카드") +{ + switch($default['de_pg_service']) { + case 'lg': + include G5_SHOP_PATH.'/lg/xpay_result.php'; + break; + case 'inicis': + include G5_MSHOP_PATH.'/inicis/pay_result.php'; + break; + default: + include G5_MSHOP_PATH.'/kcp/pp_ax_hub.php'; + $card_name = iconv("cp949", "utf-8", $card_name); + break; + } + + $od_tno = $tno; + $od_app_no = $app_no; + $od_receipt_price = $amount; + $od_receipt_point = $i_temp_point; + $od_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time); + $od_bank_account = $card_name; + $pg_price = $amount; + $od_misu = $i_price - $od_receipt_price; + if($od_misu == 0) + $od_status = '입금'; +} +else if ($od_settle_case == "간편결제") +{ + switch($default['de_pg_service']) { + case 'lg': + include G5_SHOP_PATH.'/lg/xpay_result.php'; + break; + case 'inicis': + include G5_MSHOP_PATH.'/inicis/pay_result.php'; + break; + default: + include G5_MSHOP_PATH.'/kcp/pp_ax_hub.php'; + $card_name = iconv("cp949", "utf-8", $card_name); + break; + } + + $od_tno = $tno; + $od_app_no = $app_no; + $od_receipt_price = $amount; + $od_receipt_point = $i_temp_point; + $od_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time); + $od_bank_account = $card_name; + $pg_price = $amount; + $od_misu = $i_price - $od_receipt_price; + if($od_misu == 0) + $od_status = '입금'; +} +else +{ + die("od_settle_case Error!!!"); +} + +// 주문금액과 결제금액이 일치하는지 체크 +if($tno) { + if((int)$order_price !== (int)$pg_price) { + $cancel_msg = '결제금액 불일치'; + switch($default['de_pg_service']) { + case 'lg': + include G5_SHOP_PATH.'/lg/xpay_cancel.php'; + break; + case 'inicis': + include G5_SHOP_PATH.'/inicis/inipay_cancel.php'; + break; + default: + include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; + break; + } + + die("Receipt Amount Error"); + } +} + +if ($is_member) + $od_pwd = $member['mb_password']; +else + $od_pwd = get_encrypt_string($_POST['od_pwd']); + +// 주문번호를 얻는다. +$od_id = get_session('ss_order_id'); + +$od_escrow = 0; +if($escw_yn == 'Y') + $od_escrow = 1; + +// 복합과세 금액 +$od_tax_mny = round($i_price / 1.1); +$od_vat_mny = $i_price - $od_tax_mny; +$od_free_mny = 0; +if($default['de_tax_flag_use']) { + $od_tax_mny = (int)$_POST['comm_tax_mny']; + $od_vat_mny = (int)$_POST['comm_vat_mny']; + $od_free_mny = (int)$_POST['comm_free_mny']; +} + +$od_pg = $default['de_pg_service']; +$od_email = get_email_address($od_email); +$od_name = clean_xss_tags($od_name); +$od_tel = clean_xss_tags($od_tel); +$od_hp = clean_xss_tags($od_hp); +$od_zip = preg_replace('/[^0-9]/', '', $od_zip); +$od_zip1 = substr($od_zip, 0, 3); +$od_zip2 = substr($od_zip, 3); +$od_addr1 = clean_xss_tags($od_addr1); +$od_addr2 = clean_xss_tags($od_addr2); +$od_addr3 = clean_xss_tags($od_addr3); +$od_addr_jibeon = preg_match("/^(N|R)$/", $od_addr_jibeon) ? $od_addr_jibeon : ''; +$od_b_name = clean_xss_tags($od_b_name); +$od_b_tel = clean_xss_tags($od_b_tel); +$od_b_hp = clean_xss_tags($od_b_hp); +$od_b_addr1 = clean_xss_tags($od_b_addr1); +$od_b_addr2 = clean_xss_tags($od_b_addr2); +$od_b_addr3 = clean_xss_tags($od_b_addr3); +$od_b_addr_jibeon = preg_match("/^(N|R)$/", $od_b_addr_jibeon) ? $od_b_addr_jibeon : ''; +$od_memo = clean_xss_tags($od_memo); +$od_deposit_name = clean_xss_tags($od_deposit_name); + +// 주문서에 입력 +$sql = " insert {$g5['g5_shop_order_table']} + set od_id = '$od_id', + mb_id = '{$member['mb_id']}', + od_pwd = '$od_pwd', + od_name = '$od_name', + od_email = '$od_email', + od_tel = '$od_tel', + od_hp = '$od_hp', + od_zip1 = '$od_zip1', + od_zip2 = '$od_zip2', + od_addr1 = '$od_addr1', + od_addr2 = '$od_addr2', + od_addr3 = '$od_addr3', + od_addr_jibeon = '$od_addr_jibeon', + od_b_name = '$od_b_name', + od_b_tel = '$od_b_tel', + od_b_hp = '$od_b_hp', + od_b_zip1 = '$od_b_zip1', + od_b_zip2 = '$od_b_zip2', + od_b_addr1 = '$od_b_addr1', + od_b_addr2 = '$od_b_addr2', + od_b_addr3 = '$od_b_addr3', + od_b_addr_jibeon = '$od_b_addr_jibeon', + od_deposit_name = '$od_deposit_name', + od_memo = '$od_memo', + od_cart_count = '$cart_count', + od_cart_price = '$tot_ct_price', + od_cart_coupon = '$tot_it_cp_price', + od_send_cost = '$od_send_cost', + od_send_coupon = '$tot_sc_cp_price', + od_send_cost2 = '$od_send_cost2', + od_coupon = '$tot_od_cp_price', + od_receipt_price = '$od_receipt_price', + od_receipt_point = '$od_receipt_point', + od_bank_account = '$od_bank_account', + od_receipt_time = '$od_receipt_time', + od_misu = '$od_misu', + od_pg = '$od_pg', + od_tno = '$od_tno', + od_app_no = '$od_app_no', + od_escrow = '$od_escrow', + od_tax_flag = '{$default['de_tax_flag_use']}', + od_tax_mny = '$od_tax_mny', + od_vat_mny = '$od_vat_mny', + od_free_mny = '$od_free_mny', + od_status = '$od_status', + od_shop_memo = '', + od_hope_date = '$od_hope_date', + od_time = '".G5_TIME_YMDHIS."', + od_mobile = '1', + od_ip = '$REMOTE_ADDR', + od_settle_case = '$od_settle_case' + "; +$result = sql_query($sql, false); + +// 주문정보 입력 오류시 결제 취소 +if(!$result) { + if($tno) { + $cancel_msg = '주문정보 입력 오류'; + switch($default['de_pg_service']) { + case 'lg': + include G5_SHOP_PATH.'/lg/xpay_cancel.php'; + break; + case 'inicis': + include G5_SHOP_PATH.'/inicis/inipay_cancel.php'; + break; + default: + include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; + break; + } + } + + // 관리자에게 오류 알림 메일발송 + $error = 'order'; + include G5_SHOP_PATH.'/ordererrormail.php'; + + die('

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

    '.strtoupper($default['de_pg_service']).'를 이용한 전자결제(신용카드, 계좌이체, 가상계좌 등)은 자동 취소되었습니다.'); +} + +// 장바구니 상태변경 +// 신용카드로 주문하면서 신용카드 포인트 사용하지 않는다면 포인트 부여하지 않음 +$cart_status = $od_status; +$sql_card_point = ""; +if ($od_receipt_price > 0 && !$default['de_card_point']) { + $sql_card_point = " , ct_point = '0' "; +} +$sql = "update {$g5['g5_shop_cart_table']} + set od_id = '$od_id', + ct_status = '$cart_status' + $sql_card_point + where od_id = '$tmp_cart_id' + and ct_select = '1' "; +$result = sql_query($sql, false); + +// 주문정보 입력 오류시 결제 취소 +if(!$result) { + if($tno) { + $cancel_msg = '주문상태 변경 오류'; + switch($default['de_pg_service']) { + case 'lg': + include G5_SHOP_PATH.'/lg/xpay_cancel.php'; + break; + case 'inicis': + include G5_SHOP_PATH.'/inicis/inipay_cancel.php'; + break; + default: + include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; + break; + } + } + + // 관리자에게 오류 알림 메일발송 + $error = 'status'; + include G5_SHOP_PATH.'/ordererrormail.php'; + + // 주문삭제 + sql_query(" delete from {$g5['g5_shop_order_table']} where od_id = '$od_id' "); + + die('

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

    '.strtoupper($default['de_pg_service']).'를 이용한 전자결제(신용카드, 계좌이체, 가상계좌 등)은 자동 취소되었습니다.'); +} + +// 회원이면서 포인트를 사용했다면 포인트 테이블에 사용을 추가 +if ($is_member && $od_receipt_point) + insert_point($member['mb_id'], (-1) * $od_receipt_point, "주문번호 $od_id 결제"); + +$od_memo = nl2br(htmlspecialchars2(stripslashes($od_memo))) . " "; + +// 쿠폰사용내역기록 +if($is_member) { + $it_cp_cnt = count($_POST['cp_id']); + for($i=0; $i<$it_cp_cnt; $i++) { + $cid = $_POST['cp_id'][$i]; + $cp_it_id = $_POST['it_id'][$i]; + $cp_prc = (int)$arr_it_cp_prc[$cp_it_id]; + + if(trim($cid)) { + $sql = " insert into {$g5['g5_shop_coupon_log_table']} + set cp_id = '$cid', + mb_id = '{$member['mb_id']}', + od_id = '$od_id', + cp_price = '$cp_prc', + cl_datetime = '".G5_TIME_YMDHIS."' "; + sql_query($sql); + } + + // 쿠폰사용금액 cart에 기록 + $cp_prc = (int)$arr_it_cp_prc[$cp_it_id]; + $sql = " update {$g5['g5_shop_cart_table']} + set cp_price = '$cp_prc' + where od_id = '$od_id' + and it_id = '$cp_it_id' + and ct_select = '1' + order by ct_id asc + limit 1 "; + sql_query($sql); + } + + if($_POST['od_cp_id']) { + $sql = " insert into {$g5['g5_shop_coupon_log_table']} + set cp_id = '{$_POST['od_cp_id']}', + mb_id = '{$member['mb_id']}', + od_id = '$od_id', + cp_price = '$tot_od_cp_price', + cl_datetime = '".G5_TIME_YMDHIS."' "; + sql_query($sql); + } + + if($_POST['sc_cp_id']) { + $sql = " insert into {$g5['g5_shop_coupon_log_table']} + set cp_id = '{$_POST['sc_cp_id']}', + mb_id = '{$member['mb_id']}', + od_id = '$od_id', + cp_price = '$tot_sc_cp_price', + cl_datetime = '".G5_TIME_YMDHIS."' "; + sql_query($sql); + } +} + + +include_once(G5_SHOP_PATH.'/ordermail1.inc.php'); +include_once(G5_SHOP_PATH.'/ordermail2.inc.php'); + +// SMS BEGIN -------------------------------------------------------- +// 주문고객과 쇼핑몰관리자에게 SMS 전송 +if($config['cf_sms_use'] && ($default['de_sms_use2'] || $default['de_sms_use3'])) { + $is_sms_send = false; + + // 충전식일 경우 잔액이 있는지 체크 + if($config['cf_icode_id'] && $config['cf_icode_pw']) { + $userinfo = get_icode_userinfo($config['cf_icode_id'], $config['cf_icode_pw']); + + if($userinfo['code'] == 0) { + if($userinfo['payment'] == 'C') { // 정액제 + $is_sms_send = true; + } else { + $minimum_coin = 100; + if(defined('G5_ICODE_COIN')) + $minimum_coin = intval(G5_ICODE_COIN); + + if((int)$userinfo['coin'] >= $minimum_coin) + $is_sms_send = true; + } + } + } + + if($is_sms_send) { + $sms_contents = array($default['de_sms_cont2'], $default['de_sms_cont3']); + $recv_numbers = array($od_hp, $default['de_sms_hp']); + $send_numbers = array($default['de_admin_company_tel'], $od_hp); + + include_once(G5_LIB_PATH.'/icode.sms.lib.php'); + + $SMS = new SMS; // SMS 연결 + $SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']); + $sms_count = 0; + + for($s=0; $sAdd($recv_number, $send_number, $config['cf_icode_id'], iconv("utf-8", "euc-kr", stripslashes($sms_content)), ""); + $sms_count++; + } + } + + // 무통장 입금 때 고객에게 계좌정보 보냄 + if($od_settle_case == '무통장' && $default['de_sms_use2'] && $od_misu > 0) { + $sms_content = $od_name."님의 입금계좌입니다.\n금액:".number_format($od_misu)."원\n계좌:".$od_bank_account."\n".$default['de_admin_company_name']; + + $recv_number = preg_replace("/[^0-9]/", "", $od_hp); + $send_number = preg_replace("/[^0-9]/", "", $default['de_admin_company_tel']); + $SMS->Add($recv_number, $send_number, $config['cf_icode_id'], iconv("utf-8", "euc-kr", $sms_content), ""); + $sms_count++; + } + + if($sms_count > 0) + $SMS->Send(); + } +} +// SMS END -------------------------------------------------------- + + +// orderview 에서 사용하기 위해 session에 넣고 +$uid = md5($od_id.G5_TIME_YMDHIS.$REMOTE_ADDR); +set_session('ss_orderview_uid', $uid); + +// 주문 정보 임시 데이터 삭제 +$sql = " delete from {$g5['g5_shop_order_data_table']} where od_id = '$od_id' and dt_pg = '$od_pg' "; +sql_query($sql); + +// 주문번호제거 +set_session('ss_order_id', ''); + +// 기존자료 세션에서 제거 +if (get_session('ss_direct')) + set_session('ss_cart_direct', ''); + +// 배송지처리 +if($is_member) { + $sql = " select * from {$g5['g5_shop_order_address_table']} + where mb_id = '{$member['mb_id']}' + and ad_name = '$od_b_name' + and ad_tel = '$od_b_tel' + and ad_hp = '$od_b_hp' + and ad_zip1 = '$od_b_zip1' + and ad_zip2 = '$od_b_zip2' + and ad_addr1 = '$od_b_addr1' + and ad_addr2 = '$od_b_addr2' + and ad_addr3 = '$od_b_addr3' "; + $row = sql_fetch($sql); + + // 기본배송지 체크 + if($ad_default) { + $sql = " update {$g5['g5_shop_order_address_table']} + set ad_default = '0' + where mb_id = '{$member['mb_id']}' "; + sql_query($sql); + } + + if($row['ad_id']){ + $sql = " update {$g5['g5_shop_order_address_table']} + set ad_default = '$ad_default', + ad_subject = '$ad_subject', + ad_jibeon = '$od_b_addr_jibeon' + where mb_id = '{$member['mb_id']}' + and ad_id = '{$row['ad_id']}' "; + } else { + $sql = " insert into {$g5['g5_shop_order_address_table']} + set mb_id = '{$member['mb_id']}', + ad_subject = '$ad_subject', + ad_default = '$ad_default', + ad_name = '$od_b_name', + ad_tel = '$od_b_tel', + ad_hp = '$od_b_hp', + ad_zip1 = '$od_b_zip1', + ad_zip2 = '$od_b_zip2', + ad_addr1 = '$od_b_addr1', + ad_addr2 = '$od_b_addr2', + ad_addr3 = '$od_b_addr3', + ad_jibeon = '$od_b_addr_jibeon' "; + } + + sql_query($sql); +} + +goto_url(G5_SHOP_URL.'/orderinquiryview.php?od_id='.$od_id.'&uid='.$uid); +?> diff --git a/mobile/shop/orderinquiry.php b/mobile/shop/orderinquiry.php new file mode 100644 index 000000000..f04296818 --- /dev/null +++ b/mobile/shop/orderinquiry.php @@ -0,0 +1,72 @@ + + +

    +

    주문서번호 링크를 누르시면 주문상세내역을 조회하실 수 있습니다.

    + + + + +
    + + diff --git a/mobile/shop/orderinquiry.sub.php b/mobile/shop/orderinquiry.sub.php new file mode 100644 index 000000000..b0463ce45 --- /dev/null +++ b/mobile/shop/orderinquiry.sub.php @@ -0,0 +1,90 @@ + + +총 건 + + +
    +
      + 1) + $ct_name .= ' 외 '.($ct2['cnt'] - 1).'건'; + + switch($row['od_status']) { + case '주문': + $od_status = '입금확인중'; + break; + case '입금': + $od_status = '입금완료'; + break; + case '준비': + $od_status = '상품준비중'; + break; + case '배송': + $od_status = '상품배송'; + break; + case '완료': + $od_status = '배송완료'; + break; + default: + $od_status = '주문취소'; + break; + } + + $od_invoice = ''; + if($row['od_delivery_company'] && $row['od_invoice']) + $od_invoice = get_text($row['od_delivery_company']).' '.get_text($row['od_invoice']); + + $uid = md5($row['od_id'].$row['od_time'].$row['od_ip']); + ?> + +
    • +
      + + +
      +
      + +
      +
      + +
      +
      + + +
      +
    • + + 주문 내역이 없습니다.'; + ?> +
    +
    diff --git a/mobile/shop/orderinquiryview.php b/mobile/shop/orderinquiryview.php new file mode 100644 index 000000000..26c885469 --- /dev/null +++ b/mobile/shop/orderinquiryview.php @@ -0,0 +1,728 @@ +'.PHP_EOL; + } else { + echo ''.PHP_EOL; + } +} +?> + +
    + +
    주문번호
    + +
    +

    주문하신 상품

    + + +
      + +
    • +
      + +
      + +
      +
      + 판매가 + 수량 + 배송비 + 상태 +
      +
      + + 주문금액 + 적립포인트 +
      + + +
    • + 0 && $st_count1 == $st_count2) + $custom_cancel = true; + ?> +
    + +
    + 상품 상태 설명 + +
    +
    +
    주문
    +
    주문이 접수되었습니다.
    +
    입금
    +
    입금(결제)이 완료 되었습니다.
    +
    준비
    +
    상품 준비 중입니다.
    +
    배송
    +
    상품 배송 중입니다.
    +
    완료
    +
    상품 배송이 완료 되었습니다.
    +
    + +
    +
    + + + +
    +
    주문총액
    +
    원
    + + 0) { ?> +
    상품할인
    +
    원
    + + + 0) { ?> +
    결제할인
    +
    원
    + + + 0) { ?> +
    배송비
    +
    원
    + + + 0) { ?> +
    배송비할인
    +
    원
    + + + 0) { ?> +
    추가배송비
    +
    원
    + + + 0) { ?> +
    취소금액
    +
    원
    + + +
    총계
    +
    원
    + +
    포인트
    +
    점
    +
    +
    + +
    +

    결제/배송 정보

    + $od['od_cancel_price'])) { + $wanbul = " (완불)"; + $misu = false; // 미수금 없음 + } + else + { + $wanbul = display_price($receipt_price); + } + + // 결제정보처리 + if($od['od_receipt_price'] > 0) + $od_receipt_price = display_price($od['od_receipt_price']); + else + $od_receipt_price = '아직 입금되지 않았거나 입금정보를 입력하지 못하였습니다.'; + + $app_no_subj = ''; + $disp_bank = true; + $disp_receipt = false; + $easy_pay_name = ''; + if($od['od_settle_case'] == '신용카드') { + $app_no_subj = '승인번호'; + $app_no = $od['od_app_no']; + $disp_bank = false; + $disp_receipt = true; + } else if($od['od_settle_case'] == '간편결제') { + $app_no_subj = '승인번호'; + $app_no = $od['od_app_no']; + $disp_bank = false; + switch($od['od_pg']) { + case 'lg': + $easy_pay_name = 'PAYNOW'; + break; + case 'inicis': + $easy_pay_name = 'KPAY'; + break; + case 'kcp': + $easy_pay_name = 'PAYCO'; + break; + default: + break; + } + } else if($od['od_settle_case'] == '휴대폰') { + $app_no_subj = '휴대폰번호'; + $app_no = $od['od_bank_account']; + $disp_bank = false; + $disp_receipt = true; + } else if($od['od_settle_case'] == '가상계좌' || $od['od_settle_case'] == '계좌이체') { + $app_no_subj = '거래번호'; + $app_no = $od['od_tno']; + } + ?> + +
    +

    결제정보

    + +
    + + + + + + + + + + + + + + + + + + + + + + + 0) + { + ?> + + + + + + + + + + + + + + + + + + + + + + + + 0) + { + ?> + + + + + + 0) + { + ?> + + + + + + + + + + + +
    주문번호
    주문일시
    결제방식
    결제금액
    결제일시
    입금자명
    입금계좌
    영수증 + + 영수증 출력 + + 영수증 출력 + + +
    포인트사용
    환불 금액
    현금영수증 + + 현금영수증 확인하기 + + 현금영수증을 발급하시려면 클릭하십시오. + +
    +
    +
    + +
    +

    주문하신 분

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    이 름
    전화번호
    핸드폰
    주 소
    E-mail
    +
    + +
    + +
    +

    받으시는 분

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    이 름
    전화번호
    핸드폰
    주 소
    희망배송일
    전하실 말씀
    +
    +
    + +
    +

    배송정보

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    배송회사
    운송장번호
    배송일시
    아직 배송하지 않았거나 배송정보를 입력하지 못하였습니다.
    +
    +
    +
    + +
    +

    결제합계

    + +
      +
    • + 총 구매액 + +
    • + 0) { + echo '
    • '; + echo '미결제액'.PHP_EOL; + echo ''.display_price($misu_price).''; + echo '
    • '; + } + ?> +
    • + 결제액 + +
    • +
    +
    + +
    +

    주문취소

    + + + +
    +
    + + + + + + + +
    +
    + +

    주문 취소, 반품, 품절된 내역이 있습니다.

    + +
    + + 0 && $default['de_card_test'] && $is_admin && $od['od_pg'] == 'kcp') { + preg_match("/\s{1}([^\s]+)\s?/", $od['od_bank_account'], $matchs); + $deposit_no = trim($matchs[1]); + ?> +

    관리자가 가상계좌 테스트를 한 경우에만 보입니다.

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    모의입금처리
    +
    + +
    +
    +
    + + +
    + + + + \ No newline at end of file diff --git a/mobile/shop/personalpay.php b/mobile/shop/personalpay.php new file mode 100644 index 000000000..ccbd339af --- /dev/null +++ b/mobile/shop/personalpay.php @@ -0,0 +1,59 @@ + + + +
    + + personalpay.skin.php 파일을 찾을 수 없습니다.
    관리자에게 알려주시면 감사하겠습니다.

    '; + } + + echo get_paging($config['cf_mobile_pages'], $page, $total_page, $_SERVER['SCRIPT_NAME'].'?'.$qstr.'&page='); + ?> +
    + + + diff --git a/mobile/shop/personalpayform.php b/mobile/shop/personalpayform.php new file mode 100644 index 000000000..e53a2e13e --- /dev/null +++ b/mobile/shop/personalpayform.php @@ -0,0 +1,357 @@ + 0 "; +$pp = sql_fetch($sql); + +if(!$pp['pp_id']) + alert('개인결제 정보가 존재하지 않습니다.'); + +if($pp['pp_tno']) + alert('이미 결제하신 개인결제 내역입니다.'); + +$g5['title'] = $pp['pp_name'].'님 개인결제'; +include_once(G5_MSHOP_PATH.'/_head.php'); + +$action_url = G5_HTTPS_MSHOP_URL.'/personalpayformupdate.php'; + +require_once(G5_MSHOP_PATH.'/settle_'.$default['de_pg_service'].'.inc.php'); + +// 결제등록 요청시 사용할 입금마감일 +$ipgm_date = date("Ymd", (G5_SERVER_TIME + 86400 * 5)); +$tablet_size = "1.0"; // 화면 사이즈 조정 - 기기화면에 맞게 수정(갤럭시탭,아이패드 - 1.85, 스마트폰 - 1.0) + +// 개인결제 체크를 위한 hash +$hash_data = md5($pp['pp_id'].$pp['pp_price'].$pp['pp_time']); +set_session('ss_personalpay_id', $pp['pp_id']); +set_session('ss_personalpay_hash', $hash_data); + +// 에스크로 상품정보 +if($default['de_escrow_use']) { + $good_info .= "seq=1".chr(31); + $good_info .= "ordr_numb={$pp_id}_".sprintf("%04d", 1).chr(31); + $good_info .= "good_name=".addslashes($pp['pp_name'].'님 개인결제').chr(31); + $good_info .= "good_cntx=1".chr(31); + $good_info .= "good_amtx=".$pp['pp_price'].chr(31); +} + +// 주문폼과 공통 사용을 위해 추가 +$od_id = $pp_id; +$tot_price = $pp['pp_price']; +$goods = $pp['pp_name'].'님 개인결제'; +?> + +
    + +
    + +
    +
    + +
    +

    개인결제정보

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    상세내용
    결제금액
    +
    + + '; + echo '결제방법 선택'; + echo '
      '; + } + + // 가상계좌 사용 + if ($default['de_vbank_use']) { + $multi_settle++; + echo '
    • '.PHP_EOL; + $checked = ''; + } + + // 계좌이체 사용 + if ($default['de_iche_use']) { + $multi_settle++; + echo '
    • '.PHP_EOL; + $checked = ''; + } + + // 휴대폰 사용 + if ($default['de_hp_use']) { + $multi_settle++; + echo '
    • '.PHP_EOL; + $checked = ''; + } + + // 신용카드 사용 + if ($default['de_card_use']) { + $multi_settle++; + echo '
    • '.PHP_EOL; + $checked = ''; + } + + if ($default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_use']) { + echo '
    '; + echo ''; + + } + ?> + + 결제할 방법이 없습니다.
    운영자에게 알려주시면 감사하겠습니다.

    '; + ?> +
    + + + + +
    + + +
    + + + + \ No newline at end of file diff --git a/mobile/shop/personalpayformupdate.php b/mobile/shop/personalpayformupdate.php new file mode 100644 index 000000000..ff04e8fcf --- /dev/null +++ b/mobile/shop/personalpayformupdate.php @@ -0,0 +1,241 @@ +$sql

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

    error file : {$_SERVER['SCRIPT_NAME']}"); +} + +// 주문번호가 있으면 결제정보 반영 +if($pp_receipt_price > 0 && $pp['pp_id'] && $pp['od_id']) { + $od_escrow = 0; + if($escw_yn == 'Y') + $od_escrow = 1; + + $sql = " update {$g5['g5_shop_order_table']} + set od_receipt_price = od_receipt_price + '$pp_receipt_price', + od_receipt_time = '$pp_receipt_time', + od_pg = '$pp_pg', + od_tno = '$pp_tno', + od_app_no = '$app_no', + od_escrow = '$od_escrow', + od_settle_case = '$pp_settle_case', + od_deposit_name = '$pp_deposit_name', + od_bank_account = '$pp_bank_account', + od_shop_memo = concat(od_shop_memo, \"\\n개인결제 ".$pp['pp_id']." 로 결제완료 - ".$pp_receipt_time."\") + where od_id = '{$pp['od_id']}' "; + $result = sql_query($sql, false); + + // 결제정보 입력 오류시 kcp 결제 취소 + if(!$result) { + $cancel_msg = '결제정보 입력 오류'; + switch($default['de_pg_service']) { + case 'lg': + include G5_SHOP_PATH.'/lg/xpay_cancel.php'; + break; + case 'inicis': + include G5_SHOP_PATH.'/inicis/inipay_cancel.php'; + break; + default: + include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; + break; + } + + die("

    $sql

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

    error file : {$_SERVER['SCRIPT_NAME']}"); + } + + // 미수금 정보 업데이트 + $info = get_order_info($pp['od_id']); + + $sql = " update {$g5['g5_shop_order_table']} + set od_misu = '{$info['od_misu']}' "; + if($info['od_misu'] == 0) + $sql .= " , od_status = '입금' "; + $sql .= " where od_id = '{$pp['od_id']}' "; + sql_query($sql, FALSE); + + // 장바구니 상태변경 + if($info['od_misu'] == 0) { + $sql = " update {$g5['g5_shop_cart_table']} + set ct_status = '입금' + where od_id = '{$pp['od_id']}' "; + sql_query($sql, FALSE); + } +} + +// 주문 정보 임시 데이터 삭제 +$sql = " delete from {$g5['g5_shop_order_data_table']} where od_id = '{$pp['pp_id']}' and dt_pg = '$pp_pg' "; +sql_query($sql); + +// 개인결제번호제거 +set_session('ss_personalpay_id', ''); +set_session('ss_personalpay_hash', ''); + +$uid = md5($pp['pp_id'].$pp['pp_time'].$_SERVER['REMOTE_ADDR']); +set_session('ss_personalpay_uid', $uid); + +goto_url(G5_SHOP_URL.'/personalpayresult.php?pp_id='.$pp['pp_id'].'&uid='.$uid); +?> diff --git a/mobile/shop/personalpayresult.php b/mobile/shop/personalpayresult.php new file mode 100644 index 000000000..507cb4d4a --- /dev/null +++ b/mobile/shop/personalpayresult.php @@ -0,0 +1,313 @@ +'.PHP_EOL; + } else { + echo ''.PHP_EOL; + } +} +?> + +

    + +

    개인결제번호

    + +
    +

    결제 정보

    + 0) + $pp_receipt_price = display_price($pp['pp_receipt_price']); + else + $pp_receipt_price = '아직 입금되지 않았거나 입금정보를 입력하지 못하였습니다.'; + + $app_no_subj = ''; + $disp_bank = true; + $disp_receipt = false; + if($pp['pp_settle_case'] == '신용카드') { + $app_no_subj = '승인번호'; + $app_no = $pp['pp_app_no']; + $disp_bank = false; + $disp_receipt = true; + } else if($pp['pp_settle_case'] == '휴대폰') { + $app_no_subj = '휴대폰번호'; + $app_no = $pp['pp_bank_account']; + $disp_bank = false; + $disp_receipt = true; + } else if($pp['pp_settle_case'] == '가상계좌' || $pp['pp_settle_case'] == '계좌이체') { + $app_no_subj = '거래번호'; + $app_no = $pp['pp_tno']; + } + ?> + +
    +

    결제정보

    + +
    + + + + + + + + + + + + + + + + + 0) { ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0) + $is_cash_receipt = false; + } + + // 미수금이 없고 현금일 경우에만 현금영수증을 발급 할 수 있습니다. + if ($is_cash_receipt && $misu_price == 0 && $pp['pp_receipt_price'] && ($pp['pp_settle_case'] == '계좌이체' || $pp['pp_settle_case'] == '가상계좌')) { + ?> + + + + + + +
    주문번호
    결제방식
    결제금액
    결제일시
    입금자명
    입금계좌
    영수증 + + 영수증 출력 + + 영수증 출력 + + +
    현금영수증 + + 현금영수증 확인하기 + + 현금영수증을 발급하시려면 클릭하십시오. + +
    +
    +
    +
    + +
    +

    결제합계

    + +
      +
    • + 총 주문액 + +
    • + 0) { + echo '
    • '; + echo '미결제액'.PHP_EOL; + echo ''.display_price($misu_price).''; + echo '
    • '; + } + ?> +
    • + 결제액 + +
    • +
    +
    + + +

    관리자가 가상계좌 테스트를 한 경우에만 보입니다.

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    모의입금처리
    +
    + +
    +
    +
    + + +
    + + + \ No newline at end of file diff --git a/mobile/shop/search.php b/mobile/shop/search.php new file mode 100644 index 000000000..b5deff178 --- /dev/null +++ b/mobile/shop/search.php @@ -0,0 +1,245 @@ +\'\"\\\'\\\"\%\=\(\)\s]/", "", $qsort); +} else { + $qsort = ''; +} +if (isset($_GET['qorder'])) { + $qorder = preg_match("/^(asc|desc)$/i", $qorder) ? $qorder : ''; +} else { + $qorder = ''; +} + +if(!($qname || $qexplan || $qid)) + $search_all = true; + +// 검색범위 checkbox 처리 +$qname_check = false; +$qexplan_check = false; +$qid_check = false; + +if($search_all) { + $qname_check = true; + $qexplan_check = true; + $qid_check = true; +} else { + if($qname) + $qname_check = true; + if($qexplan) + $qexplan_check = true; + if($qid) + $qid_check = true; +} + +if ($q) { + $arr = explode(" ", $q); + $detail_where = array(); + for ($i=0; $i + + + +
    + + +
    +
    + + + +
    + 검색범위 + > + > + >
    +
    +
    + 상품가격 (원) + + ~ + + 까지
    +
    +
    + + + +
    +

    + 상세검색을 선택하지 않거나, 상품가격을 입력하지 않으면 전체에서 검색합니다.
    + 검색어는 최대 30글자까지, 여러개의 검색어를 공백으로 구분하여 입력 할수 있습니다. +

    +
    + + + +
    + 검색 결과 건 +
    +
    + + + +
    + +
    + + + +
    + set_query(" select * $sql_common $sql_where {$order_by} limit $from_record, $items "); + $list->set_is_page(true); + $list->set_mobile(true); + $list->set_view('it_img', true); + $list->set_view('it_id', false); + $list->set_view('it_name', true); + $list->set_view('it_basic', true); + $list->set_view('it_cust_price', false); + $list->set_view('it_price', true); + $list->set_view('it_icon', true); + $list->set_view('sns', true); + echo $list->run(); + } + else + { + $i = 0; + $error = '

    '.$list_file.' 파일을 찾을 수 없습니다.
    관리자에게 알려주시면 감사하겠습니다.

    '; + } + + if ($i==0) + { + echo '
    '.$error.'
    '; + } + + $query_string = 'qname='.$qname.'&qexplan='.$qexplan.'&qid='.$qid; + if($qfrom && $qto) $query_string .= '&qfrom='.$qfrom.'&qto='.$qto; + $query_string .= '&qcaid='.$qcaid.'&q='.urlencode($q); + $query_string .='&qsort='.$qsort.'&qorder='.$qorder; + echo get_paging($config['cf_mobile_pages'], $page, $total_page, $_SERVER['SCRIPT_NAME'].'?'.$query_string.'&page='); + ?> +
    + + +
    + + + + + diff --git a/mobile/shop/settle_inicis.inc.php b/mobile/shop/settle_inicis.inc.php new file mode 100644 index 000000000..0c8ea4265 --- /dev/null +++ b/mobile/shop/settle_inicis.inc.php @@ -0,0 +1,97 @@ + '기업은행', + '04' => '국민은행', + '05' => '외환은행', + '07' => '수협중앙회', + '11' => '농협중앙회', + '20' => '우리은행', + '23' => 'SC 제일은행', + '31' => '대구은행', + '32' => '부산은행', + '34' => '광주은행', + '37' => '전북은행', + '39' => '경남은행', + '53' => '한국씨티은행', + '71' => '우체국', + '81' => '하나은행', + '88' => '신한은행', + 'D1' => '동양종합금융증권', + 'D2' => '현대증권', + 'D3' => '미래에셋증권', + 'D4' => '한국투자증권', + 'D5' => '우리투자증권', + 'D6' => '하이투자증권', + 'D7' => 'HMC 투자증권', + 'D8' => 'SK 증권', + 'D9' => '대신증권', + 'DA' => '하나대투증권', + 'DB' => '굿모닝신한증권', + 'DC' => '동부증권', + 'DD' => '유진투자증권', + 'DE' => '메리츠증권', + 'DF' => '신영증권' +); + +$CARD_CODE = array( + '01' => '외환', + '03' => '롯데', + '04' => '현대', + '06' => '국민', + '11' => 'BC', + '12' => '삼성', + '14' => '신한', + '15' => '한미', + '16' => 'NH', + '17' => '하나 SK', + '21' => '해외비자', + '22' => '해외마스터', + '23' => 'JCB', + '24' => '해외아멕스', + '25' => '해외다이너스' +); + +$PAY_METHOD = array( + 'ISP' => '신용카드', + 'CARD' => '신용카드', + 'BANK' => '계좌이체', + 'MOBILE' => '휴대폰', + 'VBANK' => '가상계좌' +); + +$noti_url = G5_MSHOP_URL.'/inicis/settle_common.php'; +$next_url = G5_MSHOP_URL.'/inicis/pay_approval.php'; +$return_url = G5_MSHOP_URL.'/inicis/pay_return.php?oid='; +?> \ No newline at end of file diff --git a/mobile/shop/settle_kcp.inc.php b/mobile/shop/settle_kcp.inc.php new file mode 100644 index 000000000..9db76f2d3 --- /dev/null +++ b/mobile/shop/settle_kcp.inc.php @@ -0,0 +1,57 @@ + diff --git a/mobile/shop/settle_lg.inc.php b/mobile/shop/settle_lg.inc.php new file mode 100644 index 000000000..d52c9c29a --- /dev/null +++ b/mobile/shop/settle_lg.inc.php @@ -0,0 +1,35 @@ +config[$key] = $val; + } +} + +/* + * 1. 기본결제 인증요청 정보 변경 + * + * 기본정보를 변경하여 주시기 바랍니다.(파라미터 전달시 POST를 사용하세요) + */ +$CST_PLATFORM = $default['de_card_test'] ? 'test' : 'service'; //LG유플러스 결제 서비스 선택(test:테스트, service:서비스) +$CST_MID = 'si_'.$config['cf_lg_mid']; //상점아이디(LG유플러스으로 부터 발급받으신 상점아이디를 입력하세요) + //테스트 아이디는 't'를 반드시 제외하고 입력하세요. +$LGD_MID = (('test' == $CST_PLATFORM) ? 't' : '').$CST_MID; //상점아이디(자동생성) +$LGD_TIMESTAMP = date('YmdHis'); //타임스탬프 +$LGD_BUYERIP = $_SERVER['REMOTE_ADDR']; //구매자IP +$LGD_BUYERID = ''; //구매자ID +$LGD_CUSTOM_SKIN = 'SMART_XPAY2'; //상점정의 결제창 스킨 (red, purple, yellow) +$LGD_MERTKEY = ''; //상점MertKey(mertkey는 상점관리자 -> 계약정보 -> 상점정보관리에서 확인하실수 있습니다) + +$configPath = G5_LGXPAY_PATH.'/lgdacom'; //LG유플러스에서 제공한 환경파일("/conf/lgdacom.conf") 위치 지정. + +/* + * 가상계좌(무통장) 결제 연동을 하시는 경우 아래 LGD_CASNOTEURL 을 설정하여 주시기 바랍니다. + */ +$LGD_CASNOTEURL = G5_SHOP_URL.'/settle_lg_common.php'; +?> \ No newline at end of file diff --git a/mobile/shop/shop.head.php b/mobile/shop/shop.head.php new file mode 100644 index 000000000..52311b77f --- /dev/null +++ b/mobile/shop/shop.head.php @@ -0,0 +1,93 @@ + + +
    +

    + + + + + + + + + + + +
    + +
    + + + +
    + +
    +

    diff --git a/mobile/shop/shop.tail.php b/mobile/shop/shop.tail.php new file mode 100644 index 000000000..394956601 --- /dev/null +++ b/mobile/shop/shop.tail.php @@ -0,0 +1,49 @@ + + +
    + +
    +

    정보

    +

    + 회사명 + 주소
    + 사업자 등록번호
    + 대표 + 전화 + 팩스
    + + 통신판매업신고번호
    + 개인정보관리책임자 + + 부가통신사업신고번호 '.$default['de_admin_buga_no'].''; ?>
    + Copyright © 2001-2013 . All Rights Reserved. +

    + 상단으로 +
    + + + + + + diff --git a/mobile/shop/wishlist.php b/mobile/shop/wishlist.php new file mode 100644 index 000000000..30ac75839 --- /dev/null +++ b/mobile/shop/wishlist.php @@ -0,0 +1,130 @@ + + +
    + +
    + + + +
      + + +
    • +
      +
      + + 보관일 +
      +
      + + 품절 + + + + + + + + +
      + 삭제 + +
    • + 위시리스트가 비었습니다.'; + ?> +
    + + +
    + + + +
    +
    +
    + + + + \ No newline at end of file diff --git a/mobile/skin/member/basic/login.skin.php b/mobile/skin/member/basic/login.skin.php index 3d704f392..532d71675 100644 --- a/mobile/skin/member/basic/login.skin.php +++ b/mobile/skin/member/basic/login.skin.php @@ -35,12 +35,79 @@ add_stylesheet('', + + + + + + + + +
    +

    비회원 구매

    + +

    + 비회원으로 주문하시는 경우 포인트는 지급하지 않습니다. +

    + +
    + +
    + + + + + + + +
    + + + +
    + 비회원 주문조회 + +
    + + + + + + + +
    +
    + +
    +

    비회원 주문조회 안내

    +

    메일로 발송해드린 주문서의 주문번호 및 주문 시 입력하신 비밀번호를 정확히 입력해주십시오.

    +
    + + + + + + - - + + + + +
    + + + + +
    + '; + $thumb_img .= ''.$thumb.''; + $thumb_img .= ''.PHP_EOL; + } + if ($thumb_img) + { + echo '
    '.PHP_EOL; + echo ''.PHP_EOL; + echo ''.PHP_EOL; + echo '
      '.PHP_EOL; + echo $thumb_img; + echo '
    '.PHP_EOL; + echo '
    '; + } + ?> + +
    +

    상품간략정보 및 구매기능

    + + +

    + 상품 선택옵션 개, 추가옵션 개 +

    + +
    + + 고객선호도 별개 + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ + ?> + + + + + + + + 배송비결제'; + $sc_method = ''; + } + else + $sc_method = '주문시 결제'; + } + ?> + + + + + + + + + + + + + + + + + +
    제조사
    원산지
    브랜드
    모델
    판매가격판매중지
    판매가격전화문의
    시중가격
    판매가격 + + +
    재고수량 개
    + +
    최소구매수량 개
    최대구매수량 개
    +
    + +
    +

    선택옵션

    + + + + + + + + +
    +
    + + + +
    +

    추가옵션

    + + + + + + + + +
    +
    + + + +
    + +
      +
    • + + + + + + + (+0원) +
      + + + +
      +
    • +
    + + +
    + +
    + + + +

    상품의 재고가 부족하여 구매할 수 없습니다.

    + + +
    + + + + + + 재입고알림 + + WISH + +
    +
    +
    +
    + + + + + 추천하기 + +
    + + + + +
    + + + +
    +

    WITH ITEM

    +
    + set_query($sql); + echo $list->run(); + ?> +
    +
    + + + + + \ No newline at end of file diff --git a/mobile/skin/shop/basic/iteminfo.change.skin.php b/mobile/skin/shop/basic/iteminfo.change.skin.php new file mode 100644 index 000000000..9a0cb847c --- /dev/null +++ b/mobile/skin/shop/basic/iteminfo.change.skin.php @@ -0,0 +1,12 @@ +', 0); +?> + +

    교환/반품

    + +
    + +
    \ No newline at end of file diff --git a/mobile/skin/shop/basic/iteminfo.delivery.skin.php b/mobile/skin/shop/basic/iteminfo.delivery.skin.php new file mode 100644 index 000000000..00895309d --- /dev/null +++ b/mobile/skin/shop/basic/iteminfo.delivery.skin.php @@ -0,0 +1,18 @@ +', 0); +?> + +

    배송정보

    + +
    + +
    + +

    교환/반품

    + +
    + +
    \ No newline at end of file diff --git a/mobile/skin/shop/basic/iteminfo.info.skin.php b/mobile/skin/shop/basic/iteminfo.info.skin.php new file mode 100644 index 000000000..c024423af --- /dev/null +++ b/mobile/skin/shop/basic/iteminfo.info.skin.php @@ -0,0 +1,57 @@ +', 0); +?> + +

    상품설명

    + +
    + +
    + +
    + + + +
    + +
    + + + +

    상품 정보 고시

    + +
      + $val) { + $ii_title = $info_array[$key][0]; + $ii_value = $val; + ?> +
    • + + +
    • + +
    + + 상품 정보 고시 정보가 올바르게 저장되지 않았습니다.
    config.php 파일의 G5_ESCAPE_FUNCTION 설정을 addslashes 로
    변경하신 후 관리자 > 상품정보 수정에서 상품 정보를 다시 저장해주세요.

    '; + } + } + } //if + ?> + +
    + \ No newline at end of file diff --git a/mobile/skin/shop/basic/iteminfo.itemqa.skin.php b/mobile/skin/shop/basic/iteminfo.itemqa.skin.php new file mode 100644 index 000000000..bcf9179ae --- /dev/null +++ b/mobile/skin/shop/basic/iteminfo.itemqa.skin.php @@ -0,0 +1,12 @@ +', 0); +?> + +

    상품문의

    + +
    + +
    \ No newline at end of file diff --git a/mobile/skin/shop/basic/iteminfo.itemuse.skin.php b/mobile/skin/shop/basic/iteminfo.itemuse.skin.php new file mode 100644 index 000000000..7308f143e --- /dev/null +++ b/mobile/skin/shop/basic/iteminfo.itemuse.skin.php @@ -0,0 +1,12 @@ +', 0); +?> + +

    사용후기

    + +
    + +
    \ No newline at end of file diff --git a/mobile/skin/shop/basic/iteminfo.relation.skin.php b/mobile/skin/shop/basic/iteminfo.relation.skin.php new file mode 100644 index 000000000..9a877ea99 --- /dev/null +++ b/mobile/skin/shop/basic/iteminfo.relation.skin.php @@ -0,0 +1,66 @@ +', 0); +?> + +

    관련상품

    + +
    + set_mobile(true); + $list->set_query($sql); + $list->set_view('sns', true); + echo $list->run(); + ?> +
    + + \ No newline at end of file diff --git a/mobile/skin/shop/basic/itemqa.skin.php b/mobile/skin/shop/basic/itemqa.skin.php new file mode 100644 index 000000000..f73f2dfdc --- /dev/null +++ b/mobile/skin/shop/basic/itemqa.skin.php @@ -0,0 +1,152 @@ +', 0); +?> + + +상품문의 쓰기 새 창 + + +
    + + '; + + if($is_admin || $member['mb_id' ] == $row['mb_id']) { + $iq_question = get_view_thumbnail(conv_content($row['iq_question'], 1), $thumbnail_width); + } else { + $iq_question = '비밀글로 보호된 문의입니다.'; + $is_secret = true; + } + } else { + $iq_question = get_view_thumbnail(conv_content($row['iq_question'], 1), $thumbnail_width); + } + $iq_time = substr($row['iq_time'], 2, 8); + + $hash = md5($row['iq_id'].$row['iq_time'].$row['iq_ip']); + + $iq_stats = ''; + $iq_style = ''; + $iq_answer = ''; + + if ($row['iq_answer']) + { + $iq_answer = get_view_thumbnail(conv_content($row['iq_answer'], 1), $thumbnail_width); + $iq_stats = '답변완료'; + $iq_style = 'sit_qaa_done'; + $is_answer = true; + } else { + $iq_stats = '답변전'; + $iq_style = 'sit_qaa_yet'; + $iq_answer = '답변이 등록되지 않았습니다.'; + $is_answer = false; + } + + if ($i == 0) echo '
      '; + ?> + +
    1. + +
      +
      작성자
      +
      +
      작성일
      +
      +
      상태
      +
      +
      + +
      +
      +
      + Q + 문의내용
      + +
      + +
      + A + 답변
      + +
      + +
      + + + + +
      +
    2. + + 0) echo '
    '; + + if (!$i) echo '

    상품문의가 없습니다.

    '; + ?> +
    + + + + + + + \ No newline at end of file diff --git a/mobile/skin/shop/basic/itemqaform.skin.php b/mobile/skin/shop/basic/itemqaform.skin.php new file mode 100644 index 000000000..e47c33f75 --- /dev/null +++ b/mobile/skin/shop/basic/itemqaform.skin.php @@ -0,0 +1,67 @@ +', 0); +?> + + +
    +

    상품문의 쓰기

    + +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    옵션 + > + +
    이메일을 입력하시면 답변 등록 시 답변이 이메일로 전송됩니다.
    휴대폰번호를 입력하시면 답변 등록 시 답변등록 알림이 SMS로 전송됩니다.
    +
    + +
    + + +
    +
    +
    + + + \ No newline at end of file diff --git a/mobile/skin/shop/basic/itemqalist.skin.php b/mobile/skin/shop/basic/itemqalist.skin.php new file mode 100644 index 000000000..ffe042013 --- /dev/null +++ b/mobile/skin/shop/basic/itemqalist.skin.php @@ -0,0 +1,145 @@ +', 0); +?> + + + + +
    +
    + 전체보기 + + + + + + +
    +
    + +
    + + + + '; + + if($is_admin || $member['mb_id' ] == $row['mb_id']) { + $iq_question = get_view_thumbnail(conv_content($row['iq_question'], 1), $thumbnail_width); + } else { + $iq_question = '비밀글로 보호된 문의입니다.'; + $is_secret = true; + } + } else { + $iq_question = get_view_thumbnail(conv_content($row['iq_question'], 1), $thumbnail_width); + } + + $it_href = G5_SHOP_URL.'/item.php?it_id='.$row['it_id']; + + if ($row['iq_answer']) + { + $iq_answer = get_view_thumbnail(conv_content($row['iq_answer'], 1), $thumbnail_width); + $iq_stats = '답변완료'; + $iq_style = 'sit_qaa_done'; + $is_answer = true; + } else { + $iq_stats = '답변전'; + $iq_style = 'sit_qaa_yet'; + $iq_answer = '답변이 등록되지 않았습니다.'; + $is_answer = false; + } + + if ($i == 0) echo '
      '; + ?> +
    1. + + + +
      +

      + +
      +
      작성자
      +
      +
      작성일
      +
      +
      상태
      +
      +
      + + + +
      +
      + +
    2. + 0) echo '
    '; + if ($i == 0) echo '

    자료가 없습니다.

    '; + ?> +
    + + + + + \ No newline at end of file diff --git a/mobile/skin/shop/basic/itemuse.skin.php b/mobile/skin/shop/basic/itemuse.skin.php new file mode 100644 index 000000000..04a3cf7f9 --- /dev/null +++ b/mobile/skin/shop/basic/itemuse.skin.php @@ -0,0 +1,116 @@ +', 0); +?> + + +사용후기 쓰기 새 창 + + +
    + + '; + ?> + +
  • + +
    +
    작성자
    +
    +
    작성일
    +
    +
    선호도
    +
    별<?php echo $is_star; ?>개
    +
    + + +
  • + + 0) echo ''; + + if (!$i) echo '

    사용후기가 없습니다.

    '; + ?> +
    + + + + + + + \ No newline at end of file diff --git a/mobile/skin/shop/basic/itemuseform.skin.php b/mobile/skin/shop/basic/itemuseform.skin.php new file mode 100644 index 000000000..942f5893a --- /dev/null +++ b/mobile/skin/shop/basic/itemuseform.skin.php @@ -0,0 +1,85 @@ +', 0); +?> + + +
    +

    사용후기 쓰기

    + +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    평가 +
      +
    • + > + + +
    • +
    • + > + + +
    • +
    • + > + + +
    • +
    • + > + + +
    • +
    • + > + + +
    • +
    +
    +
    + +
    + + +
    + +
    +
    + + + \ No newline at end of file diff --git a/mobile/skin/shop/basic/itemuselist.skin.php b/mobile/skin/shop/basic/itemuselist.skin.php new file mode 100644 index 000000000..3505ec561 --- /dev/null +++ b/mobile/skin/shop/basic/itemuselist.skin.php @@ -0,0 +1,108 @@ +', 0); +?> + + + + +
    +
    + 전체보기 + + + + + +
    +
    + +
    + + + + '; + ?> +
  • + + + +
    +

    + +
    +
    작성자
    +
    +
    작성일
    +
    +
    평가점수
    +
    별<?php echo $star; ?>개
    +
    + + + +
    +
    + +
  • + 0) echo ''; + if ($i == 0) echo '

    자료가 없습니다.

    '; + ?> +
    + + + + + \ No newline at end of file diff --git a/mobile/skin/shop/basic/largeimage.skin.php b/mobile/skin/shop/basic/largeimage.skin.php new file mode 100644 index 000000000..720f964de --- /dev/null +++ b/mobile/skin/shop/basic/largeimage.skin.php @@ -0,0 +1,91 @@ +', 0); +?> + +
    +

    상품 이미지 새창 보기

    + +
    + + + + <?php echo $row['it_name']; ?> + + + +
    + + 0) { + echo '
      '; + foreach($thumbnails as $key=>$val) { + echo '
    • '.$val.'
    • '; + } + echo '
    '; + } + ?> + +
    + +
    +
    + + \ No newline at end of file diff --git a/mobile/skin/shop/basic/list.10.skin.php b/mobile/skin/shop/basic/list.10.skin.php new file mode 100644 index 000000000..52641339a --- /dev/null +++ b/mobile/skin/shop/basic/list.10.skin.php @@ -0,0 +1,80 @@ +', 0); +?> + + + + + + + + +list_mod); +$li_width_style = ' style="width:'.$li_width.'%;"'; + +for ($i=0; $row=sql_fetch_array($result); $i++) { + if ($i == 0) { + if ($this->css) { + echo "
      css}\">\n"; + } else { + echo "\n"; + +if($i == 0) echo "

      등록된 상품이 없습니다.

      \n"; +?> + diff --git a/mobile/skin/shop/basic/list.best.10.skin.php b/mobile/skin/shop/basic/list.best.10.skin.php new file mode 100644 index 000000000..0beae55fb --- /dev/null +++ b/mobile/skin/shop/basic/list.best.10.skin.php @@ -0,0 +1,173 @@ +', 0); +?> + +total_count > 0) { + $li_width = intval(100 / $this->list_mod); + $li_width_style = ' style="width:'.$li_width.'%;"'; + $k = 1; + $slide_btn = ''; + + for ($i=0; $row=sql_fetch_array($result); $i++) { + if($i == 0) { + echo ''.PHP_EOL; + echo '
      '.PHP_EOL; + echo '

      베스트상품

      '.PHP_EOL; + echo '
      '.PHP_EOL; + echo '
      '.PHP_EOL; + echo '
        '.PHP_EOL; + } + + if($i > 0 && ($i % $this->list_mod == 0)) { + echo '
      '.PHP_EOL; + echo ''.PHP_EOL; + echo '
      '.PHP_EOL; + echo '
      '.$slide_btn.'
      '.PHP_EOL; + echo '
      '.PHP_EOL; + echo '
      '.PHP_EOL; + } +?> + + + + \ No newline at end of file diff --git a/mobile/skin/shop/basic/list.sort.skin.php b/mobile/skin/shop/basic/list.sort.skin.php new file mode 100644 index 000000000..fbb21ecfb --- /dev/null +++ b/mobile/skin/shop/basic/list.sort.skin.php @@ -0,0 +1,27 @@ +', 0); +?> + + +
      +

      상품 정렬

      + + +
      + \ No newline at end of file diff --git a/mobile/skin/shop/basic/listcategory.skin.php b/mobile/skin/shop/basic/listcategory.skin.php new file mode 100644 index 000000000..be650c45c --- /dev/null +++ b/mobile/skin/shop/basic/listcategory.skin.php @@ -0,0 +1,36 @@ +'.$row['ca_name'].' ('.$row2['cnt'].')'; + $exists = true; +} + +if ($exists) { + + // add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨 + add_stylesheet('', 0); +?> + + + + + + \ No newline at end of file diff --git a/mobile/skin/shop/basic/main.10.skin.php b/mobile/skin/shop/basic/main.10.skin.php new file mode 100644 index 000000000..5e91de45f --- /dev/null +++ b/mobile/skin/shop/basic/main.10.skin.php @@ -0,0 +1,81 @@ +', 0); +?> + + + + + + + + + +list_mod); +$li_width_style = ' style="width:'.$li_width.'%;"'; + +for ($i=0; $row=sql_fetch_array($result); $i++) { + if ($i == 0) { + if ($this->css) { + echo "
        css}\">\n"; + } else { + echo "\n"; + +if($i == 0) echo "

        등록된 상품이 없습니다.

        \n"; +?> + diff --git a/mobile/skin/shop/basic/main.event.skin.php b/mobile/skin/shop/basic/main.event.skin.php new file mode 100644 index 000000000..0c7a478ab --- /dev/null +++ b/mobile/skin/shop/basic/main.event.skin.php @@ -0,0 +1,48 @@ +', 0); +?> +
        +
        +

        EVENT

        +

        이벤트 모음

        +
        + + +
        + \ No newline at end of file diff --git a/mobile/skin/shop/basic/mainbanner.10.skin.php b/mobile/skin/shop/basic/mainbanner.10.skin.php new file mode 100644 index 000000000..a1f80c066 --- /dev/null +++ b/mobile/skin/shop/basic/mainbanner.10.skin.php @@ -0,0 +1,76 @@ +', 0); +?> + +'.PHP_EOL.'
          '.PHP_EOL; + //print_r2($row); + // 테두리 있는지 + $bn_border = ($row['bn_border']) ? ' class="sbn_border"' : '';; + // 새창 띄우기인지 + $bn_new_win = ($row['bn_new_win']) ? ' target="_blank"' : ''; + + $bimg = G5_DATA_PATH.'/banner/'.$row['bn_id']; + if (file_exists($bimg)) + { + $banner = ''; + $size = getimagesize($bimg); + + if($size[2] < 1 || $size[2] > 16) + continue; + + if($max_width < $size[0]) + $max_width = $size[0]; + + if($max_height < $size[1]) + $max_height = $size[1]; + + echo ''.PHP_EOL; + if ($row['bn_url'][0] == '#') + $banner .= ''; + else if ($row['bn_url'] && $row['bn_url'] != 'http://') { + $banner .= ''; + } + echo $banner.''.$row['bn_alt'].''; + if($banner) + echo ''.PHP_EOL; + echo ''.PHP_EOL; + + $bn_first_class = ''; + $bn_slide_btn .= ''.PHP_EOL; + $bn_sl = ''; + } +} + +if ($i > 0) { + echo '
        '.PHP_EOL; + echo '
        '.$bn_slide_btn.'
        '.PHP_EOL; + echo ''.PHP_EOL; +?> + + + + \ No newline at end of file diff --git a/mobile/skin/shop/basic/navigation.skin.php b/mobile/skin/shop/basic/navigation.skin.php new file mode 100644 index 000000000..96db9baae --- /dev/null +++ b/mobile/skin/shop/basic/navigation.skin.php @@ -0,0 +1,38 @@ +'.$row['ca_name'].''; + } +} +else + $str = $g5['title']; + +//if ($it_id) $str .= " > $it[it_name]"; + +// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨 +add_stylesheet('', 0); +?> + +
        + Home + +
        diff --git a/mobile/skin/shop/basic/personalpay.skin.php b/mobile/skin/shop/basic/personalpay.skin.php new file mode 100644 index 000000000..70df094fc --- /dev/null +++ b/mobile/skin/shop/basic/personalpay.skin.php @@ -0,0 +1,37 @@ +', 0); +?> + + +\n"; + } + + if($i % $list_mod == 0) + $li_clear = ' sct_clear'; + else + $li_clear = ''; + + $href = G5_SHOP_URL.'/personalpayform.php?pp_id='.$row['pp_id'].'&page='.$page; +?> +
      • > +
        +
        +
        +
      • + 0) echo "
      \n"; + +if($i == 0) echo "

      등록된 개인결제가 없습니다.

      \n"; +?> + diff --git a/mobile/skin/shop/basic/relation.10.skin.php b/mobile/skin/shop/basic/relation.10.skin.php new file mode 100644 index 000000000..60e9867d7 --- /dev/null +++ b/mobile/skin/shop/basic/relation.10.skin.php @@ -0,0 +1,81 @@ +', 0); +?> + + + + + + + + + +list_mod); +$li_width_style = ' style="width:'.$li_width.'%;"'; + +for ($i=0; $row=sql_fetch_array($result); $i++) { + if ($i == 0) { + if ($this->css) { + echo "
        css}\">\n"; + } else { + echo "\n"; + +if($i == 0) echo "

        등록된 관련상품이 없습니다.

        \n"; +?> + diff --git a/mobile/skin/shop/basic/style.css b/mobile/skin/shop/basic/style.css new file mode 100644 index 000000000..4c89f26f3 --- /dev/null +++ b/mobile/skin/shop/basic/style.css @@ -0,0 +1,318 @@ +@charset "utf-8"; +/* SIR 지운아빠 */ + +/* ##### maint.(nn).skin.php, list.(nn).skin.php 공통 적용 시작 ##### */ +/* 공통 */ +.sct_wrap {margin:0 0 30px;zoom:1} +.sct_wrap:after {display:block;visibility:hidden;clear:both;content:""} +.sct_wrap header {margin:0 0 20px;zoom:1} +.sct_wrap header:after {display:block;visibility:hidden;clear:both;content:""} +.sct_wrap h2 {padding:10px 0 0;line-height:1em;text-align:center;font-weight:bold; letter-spacing:0.3em} +.sct_wrap h2 a {text-decoration:none} +.sct_wrap h2 a:hover{color:#34b5a1} +.sct_wrap_hdesc {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} + +.sct {margin:10px 5px 0 ;padding:0;list-style:none;zoom:1;clear:both;} +.sct:after {display:block;visibility:hidden;clear:both;content:""} +.sct_li {position:relative;text-align:center} +.sct_noitem {padding:50px 0;text-align:center} +.sct_icon img {margin:0 1px 0 0} +.sct_sns a {display:inline-block;margin:0 4px 0 0} +.sct_sns button {margin:0 4px 0 0;padding:0;border:0} + +.mli_btn button{background:url(img/mainlist_btn.gif) no-repeat; width:30px; height:30px;border:none;text-indent:-9999px} +.mli_btn button.mli_pre{position:absolute;top:0;left:10px} +.mli_btn button.mli_next{background-position: -33px 0;position:absolute;top:0;right:10px} + +/* 상품 목록 스킨 10 */ +.sct_10 .sct_li {position:relative;float:left;margin-bottom:10px} +.sct_10 .sct_last {margin:0 0 15px !important} +.sct_10 .sct_clear {clear:both;} +.sct_10 .sct_a {display:block;text-decoration:none;font-weight:bold; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;line-height:20px} +.sct_10 .sct_a img{width:100%;height:auto} +.sct_10 .sct_id {display:block;margin:0 0 5px} +.sct_10 .sct_basic {margin:0 0 10px} +.sct_10 .sct_cost {display:block;margin:0 0 5px;font-size:0.917em} +.sct_10 .sct_cost strike {display:block;margin:0 0 5px;color:#999;font-weight:normal} +.sct_10 .sct_icon {margin:0 0 10px} +.sct_10 .sct_sns {margin:15px 0 0} +.sct_10 .sct_img{margin:0 5px 5px ;} +.li_more{text-align:center} +.li_more img{width:30px;margin:5px 0} +.li_more p{color:#aaa;margin-top:5px;display:none;} +.li_more button{background:#fff;border:3px double #e9e9e9;width:205px;padding:8px 0 ;font-size:0.917em;color:#797979;margin-top:15px} + +/* 관련상품 목록 스킨 10 */ +#sit_rel h2{text-align:center;margin:20px 0;letter-spacing:0.3em} + +/* 베스트상품 스킨 10 */ +#best_item{border-bottom:1px solid #e9e9e9;padding:20px 0 10px 5px;overflow:hidden;position:relative} +#best_item h2{position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#best_item #sbest_list{width:100%;overflow:hidden;} +#best_item .slide-wrap{margin:0px;overflow:hidden;position:relative;top:0;left:0;float:left;} +#best_item .sct_best{width:100%;position:relative;padding:0;float:left;} +#best_item .best_on{} +.sct_best .sct_li {position:relative;float:left;} +.sct_best .sct_last {margin:0 0 15px !important} +.sct_best .sct_clear {clear:both;margin-left:0} +.sct_best .sct_a {display:block;position:relative;text-decoration:none;font-weight:bold; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;} +.sct_best .sct_txt .sct_a {margin:0 0 5px;} +.sct_best .sct_a img{width:100%;height:auto} +.sct_best .sct_id {display:block;margin:0 0 5px} +.sct_best .sct_basic {margin:0 0 10px} +.sct_best .sct_cost {display:block;margin:0 0 10px;font-size:0.917em} +.sct_best .sct_icon {margin:0 0 10px} +.sct_best .sct_sns {margin:15px 0 0} +.sct_best .sct_img{position:relative;margin:0 5px 5px ;} +.sct_best .best_icon{background:url(img/prd_icon.png) no-repeat;position:absolute;top:0;left:0;font-size:0;width:25px;height:25px; display:inline-block;z-index:999;overflow:hidden;text-indent:-99999px} +.bst_silde_btn{text-align:center;margin:5px 0 10px} +.bst_silde_btn button{background:url(img/best_btn.gif) no-repeat 5px 5px; width:20px;height:20px;text-indent:-999px;font-size:0;border:none;} +.bst_silde_btn button.bst_sl{background-position:-11px 5px } + +/* 개인결제 목록 */ +.sct_pv {margin-top:10px} +.sct_pv .sct_li {position:relative;float:left;position:relative;float:left;margin-bottom:10px;} +.sct_pv .sct_img{padding:0 5px} +.sct_pv .sct_img a{border:1px solid #e2edef} +.sct_pv .sct_img img{width:100%;} +.sct_pv .sct_last {margin:0 0 15px !important} +.sct_pv .sct_clear {clear:both} +.sct_pv .sct_a {display:block;position:relative;margin:0 0 5px;text-decoration:none; font-weight: bold; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; line-height: 20px;} +.sct_pv .sct_id {display:block;margin:0 0 5px} +.sct_pv .sct_basic {margin:0 0 10px} +.sct_pv .sct_cost {display:block;margin:0 0 10px;} +.sct_pv .sct_cost strike {display:block;margin:0 0 5px;color:#999;font-weight:normal} +.sct_pv .sct_icon {margin:0 0 10px} +/* ##### maint.(nn).skin.php, list.(nn).skin.php 공통 적용 끝 ##### */ + +/* 상품 목록 */ +#sct {} +.sct_admin {margin:0 0 10px;text-align:right} + +/* 상품 목록 현재 위치 */ +#sct_location {border:1px solid #e9e9e9;background:#f2f5f9;letter-spacing:-4px} +#sct_location a {display:inline-block;padding:5px 10px;text-decoration:none;letter-spacing:0 !important} +.sct_here {font-weight:bold} +.sct_bg {padding-right:13px !important;background:url('img/sct_bg_toright.gif') right 8px no-repeat} + +/* 상품 목록 카테고리 목록 */ +.sct_ct {text-align:center;width:100%;border-bottom:1px solid #e9e9e9; background:#f9f9f9;} +.sct_ct h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +.sct_ct ul {list-style:none;display:inline-block;margin:0;padding:5px 0} +.sct_ct ul:after {display:block;visibility:hidden;clear:both;content:""} +.sct_ct ul li {display:inline-block;background:url(img/sbmn_bg.gif) no-repeat left 50%;padding:0 15px 0 20px;letter-spacing:0.2em;font-size:0.917em;line-height:30px} +.sct_ct ul li:first-child{background:none} +.sct_ct a {text-decoration:none;color:#656565} +.sct_ct_parent {font-weight:bold} +.sct_ct_here {color:#ff3600 !important} + +#sct_ct_2 li {margin:0 0 10px} +#sct_ct_2 a {display:inline-block;width:120px} +#sct_ct_3 li {float:left;margin:0 10px 10px 0;width:120px} + +/* 상품 정렬 */ +#sct_sort {padding:10px 10px 0;clear:both} +#sct_sort:after {display:block;visibility:hidden;clear:both;content:""} +#sct_sort h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#sct_sort ul {margin:0;padding:0 0 0 1px;list-style:none;} +#sct_sort ul:after {display:block;visibility:hidden;clear:both;content:""} +#sct_sort li {float:left;position:relative;margin-left:-1px;width:33.33%} +#sct_sort li a{display:block;text-align:center;color:#8d8d8d;background:#fff;border-color:#e9e9e9;font-size:0.917em} + +/* 상품 리스트 스타일 선택 */ +#sct_lst {float:right;margin:10px 0;padding:0;list-style:none} +#sct_lst:after {display:block;visibility:hidden;clear:both;content:""} +#sct_lst li {position:relative;float:left;margin:0 0 0 -1px} +#sct_lst button {position:relative;margin:0 0 0 -1px;padding:0;width:25px;height:25px;border:1px solid #ccc} +#sct_lst button span {position:absolute;top:0;left:0;width:100%;height:100%;background:url('../shop/img/is_button.gif')} +#sct_lst button.sct_lst_list span {background-position:0 0} +#sct_lst button.sct_lst_list span.sct_lst_on {background-position:0 -30px} +#sct_lst button.sct_lst_gallery span {background-position:-30px 0} +#sct_lst button.sct_lst_gallery span.sct_lst_on {background-position:-30px -30px} + +/* 상품 상세보기 */ +#sit {margin: 0;border-top:1px solid #e9e9e9} +.sit_admin {margin:10px 10px 0;text-align:right} +.sit_empty {padding:30px 0;text-align:center} + +/* 상품상세 */ +#info_content {padding:0 10px 30px;zoom:1} +#info_content:after {display:block;visibility:hidden;clear:both;content:""} +#info_content h3 {margin:0 0 10px} +.if_tit{text-align:center;margin-top:10px;padding:10px;background:#f5f5f5;border:1px solid #e9e9e9;} +.win_desc_if{border:1px solid #e9e9e9;padding:10px;border-top:none;} +.win_desc{margin-top:10px} + +/* 상품 상세보기 - 개요 */ +#sit_ov_wrap {margin:0 0 20px;} +#sit_ov_wrap:after {display:block;visibility:hidden;clear:both;content:""} + +/* 상품 상세보기 - 이미지 미리보기 */ +#sit_pvi {position:relative;border-bottom:1px solid #e9e9e9;text-align:center} +#sit_pvi_prev {position:absolute;top:50%;left:0;background:url(img/item_btn.png) no-repeat;width:27px;height:45px;text-indent:-9999px;margin-top:-20px;} +#sit_pvi_next {position:absolute;top:50%;right:0;background:url(img/item_btn.png) no-repeat -40px 0;margin-top:-20px;width:27px;height:45px;text-indent:-9999px} +.sit_pvi_btn {display:none;z-index:10;width:20px;border:0;background:#f2f5f9} +#sit_pvi_slide {position:relative;margin:0 auto;padding:0;list-style:none;overflow-x:hidden} +#sit_pvi_slide li {display:none;position:absolute;left:0;top:0} +#sit_pvi_nw h1 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#sit_pvi_nwbig {padding:10px 0;text-align:center} +#sit_pvi_nwbig span {display:none} +#sit_pvi_nwbig span.visible {display:inline} +#sit_pvi_nw ul {margin:0 0 20px;padding:0 10px;list-style:none;zoom:1} +#sit_pvi_nw ul:after {display:block;visibility:hidden;clear:both;content:""} +#sit_pvi_nw li {float:left;margin:0 0 1px 1px} +#sit_pvi_nw li img {width:60px;height:60px} + +/* 상품 상세보기 - 간략정보 및 구매기능 */ +#sit_ov {position:relative;padding: 0;height:auto !important;} +#sit_ov h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#sit_ov h3 {margin:0 0 10px} +#sit_ov section{margin: 10px;padding-bottom:10px} + +#sit_title {display:block;margin:10px 10px 0;font-size:1.2em;} +#sit_desc {display:inline-block;margin:0 0 10px;color:#999} +#sit_opt_info {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +.sit_icon {display:block;margin: 0 0;} +.sit_icon img {margin:0 1px 0 0;vertical-align:top;margin:0 1px} + +#sit_star {color:#b8afa2;font-size:0.95em;padding:0 10px;line-height:2.2em} +#sit_star span {display:inline-block;margin:0 5px 0 0;color:#666;letter-spacing:0} +#sit_star .sit_star {position:relative;top:-2px;margin:0 5px 0 0} +#sit_star a {display:inline-block;vertical-align:middle} +#sit_star button {margin:0;padding:0;border:0} + +.sit_ov_tbl {margin:10px 10px;background:#f6f6f6;padding:0 10px;border-top:1px solid #e9e9e9;border:1px solid #e9e9e9;} +.sit_ov_tbl table{border-collapse:collapse;width:100%;border:0;font-size:0.917em} +.sit_ov_tbl th {border-top:1px solid #e9e9e9;font-weight:normal;text-align:left;padding:9px 0;} +.sit_ov_tbl td {padding:5px 0;border-top:1px solid #e9e9e9} +.sit_ov_tbl tr:first-child td,.sit_ov_tbl tr:first-child th{border:none} +.sit_ov_ro {padding:2px 2px 3px;border:0;background:transparent;text-align:right;vertical-align:middle} +.sit_ov_opt {padding:2px 2px 3px;border:0;background:transparent;vertical-align:middle} +.sit_ov_input {height:1.8em;border:1px solid #b8c9c2;background:transparent;vertical-align:middle} +.sit_ov_tbl button {margin:0} + +.sit_op_sl{width:100%;border-collapse:collapse;border:1px solid #e9e9e9;} +.sit_op_sl th{font-weight:normal;text-align:left;padding:0 0 0 10px;} +.sit_op_sl td{text-align:left;padding:9px 10px 9px 0} + +.sit_sel_btn {position:relative;top:-15px;right:-2px} /* 선택옵션용 추가 버튼 */ +.sit_sel_btn button {width:100%} + +#sit_ov_soldout {margin:0 0 20px;color:#ff3061;font-weight:bold;text-align:center} +#sit_ov_btn {margin:0;padding:0 10px;text-align:center;} +#sit_ov_btn:after {display:block;visibility:hidden;clear:both;content:""} +#sit_ov_btn a {display:inline-block;padding: 0;vertical-align:middle;text-decoration:none;letter-spacing:0.3em;line-height:40px;height:40px} +#sit_ov_btn input {padding:0;border:none;letter-spacing:0.3em;height:42px;line-height:42px} + #sit_btn_cart{background:#34b5a1;color:#fff;width:100%} +#sit_btn_buy, #sit_btn_wish {border:1px solid #34b5a1 !important;color:#34b5a1;width:49%;background:#fff;margin-top:5px} +#sit_btn_buy{float:left} +#sit_btn_wish{float:right } +#sit_btn_rec {background:#333;font-size:0.92em;color:#fff;padding:0 3px;height:25px;line-height:25px;display:inline-block;vertical-align:middle} +#sit_sns{text-align:center; padding-bottom:20px;border-bottom:1px solid #e9e9e9;} +#sit_sel_option,#sit_tot_price{padding:0 10px} + +/* 상품 상세보기 - 다른 상품 보기 */ +#sit_siblings {text-align:center;position:relative} +#sit_siblings h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#sit_siblings a {display:inline-block;background:#383838;color:#fff} +#sit_siblings a#siblings_prev {position:absolute;bottom:20px;left:10px;background: url(img/mainlist_btn.gif) no-repeat; width: 30px; height: 30px;text-indent:-999px;overflow:hidden} +#sit_siblings a#siblings_next {position:absolute;bottom:20px;right:10px;background: url(img/mainlist_btn.gif) no-repeat -33px 0; width: 30px; height: 30px;text-indent:-999px;overflow:hidden} +#sit_siblings a span {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} + +/* 상품 상세보기 하단 버튼 */ +#sit_more {-webkit-backface-visibility: hidden;padding:0;background-color: rgba(0, 0, 0, 0.8);position:fixed;bottom:0;left:0;width:100%;z-index:9999} +#sit_more:after {display:block;visibility:hidden;clear:both;content:""} +#sit_more li {position:relative;width:25%;float:left;letter-spacing:0.2em;background:url(img/item_bg.gif) no-repeat left 17px;} +#sit_more li:first-child{background:none} +#sit_more a {display:block;padding:15px 0 15px 2px;text-align:center;color:#fff} +.item_use_count,.item_qa_count{color:#999;padding-left:2px} + +/* 상품 상세보기 - 상품정보 */ +.close_btn{margin:30px 10px 10px;} +#iteminfo_close{width:100%;background:#000;border:none;color:#fff;padding:10px 0;} +#sit_inf_basic {margin:0 0 20px} +#sit_inf_explan {margin:0 0 10px;line-height:1.5em} +#sit_inf_explan img {max-width:100%;height:auto} +#sit_inf_open {margin:0;padding:0;list-style:none} +#sit_inf_open li {margin:0 0 1px;padding:8px 0;background:#fff;border:1px solid #f2f2f2;border-top:none;color:#727272} +#sit_inf_open li:after {display:block;visibility:hidden;clear:both;content:""} +#sit_inf_open strong {clear:both;float:left;padding:0 1%;width:28%;letter-spacing:-0.1em} +#sit_inf_open span {float:left;margin:0;padding:0 1%;width:68%} +#sit_inf h2{background:#f5f5f5;color:#444;padding:10px; border:1px solid #e9e9e9;text-align:center;} + +/* 상품 상세보기 - 사용후기 */ +.tit_no{position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#sit_use {margin:0 0 10px;padding:10px 10px 20px;border-bottom:1px solid #e9e9e9} +#sit_use_ol {margin:0 0 5px;padding:0;border-top:1px solid #e9e9e9;list-style:none} +.sit_use_li {position:relative;padding:0 0 10px;border-bottom:1px solid #e9e9e9;} +.sit_use_li_title {display:block;margin:0;padding:10px;width:100%;border:0;background:transparent;text-align:left} +.sit_use_li_title b{font-weight:normal;margin-right:2px} +.sit_use_dl {margin:0;padding:0 10px;position:relative} +.sit_use_dl:after {display:block;visibility:hidden;clear:both;content:""} +.sit_use_dl dt {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +.sit_use_dl dd {float:left;margin:0 10px 0 0;color:#888;font-size:0.917em} +.sit_use_star {margin:0 !important;position:absolute;bottom:0;right:10px} +.sit_use_con {display:none;padding:10px 10px 0} +.sit_use_p {margin:0 0 10px;padding:10px;background:#f2f2f2} +.sit_use_cmd {text-align:right} +.sit_use_cmd a.btn01{padding: 5px;} +#sit_use_wbtn {margin:0 0 5px;text-align:center} +#sit_use_write {} +#sit_use_write #is_subject {width:100%} +#sit_use_write ul {margin:5px 0 0} +#sit_use_write li {margin:0 0 5px} +#sit_use_write li label {display:inline-block;width:80px} +#sit_use_write_star {margin:0;padding:0;list-style:none} + +/* 상품 상세보기 - 상품문의 */ +#sit_qa {margin:0 0 10px;padding:10px 10px 20px;border-bottom:1px solid #e9e9e9} +#sit_qa_ol {margin:0 0 5px;padding:0;border-top:1px solid #e9e9e9;list-style:none} +.sit_qa_li {position:relative;padding:0 0 10px;border-bottom:1px solid #e9e9e9;} +.sit_qa_li_title {display:block;margin:0;padding:10px;width:100%;border:0;background:transparent;text-align:left} +.sit_qa_li_title b{font-weight:normal;margin-right:2px} +.sit_qa_dl {margin:0;padding:0 10px;position:relative} +.sit_qa_dl:after {display:block;visibility:hidden;clear:both;content:""} +.sit_qa_dl dt {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +.sit_qa_dl dd {float:left;margin:0 10px 0 0;color:#888;font-size:0.917em} +.sit_qa_dl dd.sit_qaa_yet,.sit_qa_dl dd.sit_qaa_done{position:absolute;bottom:0;right:0;background:#eee;padding:5px 8px;color:#888;border-radius:15px} +.sit_qa_dl dd.sit_qaa_done{background:#ff3e5e;color:#fff} +.sit_qa_con {display:none;padding:10px 10px 0} +.sit_qa_p {margin:0 0 10px;border:1px solid #e9e9e9;background:#fff;padding:0 10px;background:#f2f2f2;} +.sit_qa_p strong {display:inline-block;margin:0 0 10px;} +.sit_qa_p span.sit_alp{position:absolute;top:10px;left:0;background:#000;color:#fff;color:#fff;font-size:1.2em;font-weight:bold;width:25px;height:25px;line-height:25px;display:inline-block;border-radius:15px;text-align:center;} +.sit_qa_qaq,.sit_qa_qaa {padding:10px 0 10px 30px;position:relative} +.sit_qa_qaa {border-top:1px dotted #ddd} +.sit_qa_qaa span.sit_alp{background:#5b5b5b} +.sit_qa_con textarea {display:none} +.sit_qa_cmd {text-align:right} +.sit_qa_cmd a.btn01{padding:5px;} +.sit_qa_pw {display:none;position:absolute;top:30px;left:175px;padding:10px;width:348px;border:1px solid #000;background:#fff;text-align:center} +.sit_qa_pw span {display:block;margin:0 0 5px} + +#sit_qa_wbtn {margin:0 0 5px;text-align:center} +#sit_qa_w {display:none} +a.qa_wr{padding:10px 0;display:block;width:100%;text-align:center;background:#34b5a1;color:#fff;margin:10px 0} +#itemqa_list,#itemuse_list{ background: #fff; border: 3px double #e9e9e9; width: 205px; padding: 8px 0; font-size: 0.917em; color: #797979; margin-top: 15px;} + +/* 쇼핑몰 이벤트 */ +#sev {margin:0 10px;padding:0 15px;list-style:none;border:3px double #d6d6d6} +#sev li {border-top:1px solid #f2f2f2;padding:10px 0 ;text-align:center} +#sev li:first-child{border:none} +#sev li a{display:block} +#sev li a:hover{color:#34b5a1;} +#sev li img{width:100%} +.sev_admin{padding:10px 10px 0} + +/* 로딩안내 레이어 */ +#loading_message {z-index:10000;position:absolute;top:0;left:0;background:#fff;opacity:0.7} +#loading_message img {position:relative;opacity:1.0} + +/* 알림 box */ +#fancyalert {display:block;z-index:10000;position:absolute;top:0;left:0} +#fancyalert_inner {display:table;z-index:2;position:relative} +#fancyalert_inner div {display:table-cell;vertical-align:middle;text-align:center} +#fancyalert_inner span {display:block;margin:0 auto;padding:30px;width:200px;background:#1f1f1f;color:#f0f1f2} +#fancyalert_inner button {margin:15px 0 0;padding:10px 30px;border:0;background:#000;color:#fff} +#fancyalert_bg {z-index:0;position:absolute;top:0;left:0;width:100%;height:100%;vertical-align:middle;background:#000;text-align:center;opacity: 0.7} + +#sit_sms_new .tbl_frm01 th {width:100px} \ No newline at end of file diff --git a/orderupgrade.php b/orderupgrade.php new file mode 100644 index 000000000..16ba05bec --- /dev/null +++ b/orderupgrade.php @@ -0,0 +1,87 @@ +테이블 업그레이드 완료!

        '; + +include_once(G5_PATH.'/tail.sub.php'); +?> \ No newline at end of file diff --git a/plugin/kcaptcha/kcaptcha.lib.php b/plugin/kcaptcha/kcaptcha.lib.php index 74d9054fb..f52db1544 100644 --- a/plugin/kcaptcha/kcaptcha.lib.php +++ b/plugin/kcaptcha/kcaptcha.lib.php @@ -31,10 +31,10 @@ class KCAPTCHA{ } } closedir($handle); - } - + } + $alphabet_length=strlen($alphabet); - + do{ /* // generating random keystring @@ -132,7 +132,7 @@ class KCAPTCHA{ $img2=imagecreatetruecolor($width, $height+($show_credits?12:0)); $foreground=imagecolorallocate($img2, $foreground_color[0], $foreground_color[1], $foreground_color[2]); $background=imagecolorallocate($img2, $background_color[0], $background_color[1], $background_color[2]); - imagefilledrectangle($img2, 0, 0, $width-1, $height-1, $background); + imagefilledrectangle($img2, 0, 0, $width-1, $height-1, $background); imagefilledrectangle($img2, 0, $height, $width-1, $height+12, $foreground); $credits=empty($credits)?$_SERVER['HTTP_HOST']:$credits; imagestring($img2, 2, $width/2-imagefontwidth(2)*strlen($credits)/2, $height-2, $credits, $background); @@ -203,12 +203,12 @@ class KCAPTCHA{ imagesetpixel($img2, $x, $y, imagecolorallocate($img2, $newred, $newgreen, $newblue)); } } - - header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); - header('Cache-Control: no-store, no-cache, must-revalidate'); - header('Cache-Control: post-check=0, pre-check=0', FALSE); + + header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); + header('Cache-Control: no-store, no-cache, must-revalidate'); + header('Cache-Control: post-check=0, pre-check=0', FALSE); header('Pragma: no-cache'); - + if(function_exists("imagejpeg")){ header("Content-Type: image/jpeg"); imagejpeg($img2, null, $jpeg_quality); diff --git a/plugin/okname/index.php b/plugin/okname/index.php new file mode 100644 index 000000000..dc2009f0f --- /dev/null +++ b/plugin/okname/index.php @@ -0,0 +1,2 @@ +git 에서 빈 디렉토리는 push 되지 않으므로 일부러 생성한 파일입니다. +이 디렉토리에 다른 파일이 하나라도 있다면 나중에 삭제하세요. \ No newline at end of file diff --git a/shop.config.php b/shop.config.php new file mode 100644 index 000000000..cbaac7fa6 --- /dev/null +++ b/shop.config.php @@ -0,0 +1,106 @@ + \ No newline at end of file diff --git a/shop/_common.php b/shop/_common.php new file mode 100644 index 000000000..31f78b72c --- /dev/null +++ b/shop/_common.php @@ -0,0 +1,21 @@ +\'\"\\\'\\\"\%\=\(\)\s]/", "", $sort); +} else { + $sort = ''; +} + +if (isset($_REQUEST['sortodr'])) { + $sortodr = preg_match("/^(asc|desc)$/i", $sortodr) ? $sortodr : ''; +} else { + $sortodr = ''; +} + +if (!defined('G5_USE_SHOP') || !G5_USE_SHOP) + die('

        쇼핑몰 설치 후 이용해 주십시오.

        '); + +define('_SHOP_', true); +?> \ No newline at end of file diff --git a/shop/_head.php b/shop/_head.php new file mode 100644 index 000000000..96f125286 --- /dev/null +++ b/shop/_head.php @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/shop/_tail.php b/shop/_tail.php new file mode 100644 index 000000000..d2327ec8a --- /dev/null +++ b/shop/_tail.php @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/shop/ajax.list.php b/shop/ajax.list.php new file mode 100644 index 000000000..7c0884853 --- /dev/null +++ b/shop/ajax.list.php @@ -0,0 +1,73 @@ +set_category($ca['ca_id'], 1); +$list->set_category($ca['ca_id'], 2); +$list->set_category($ca['ca_id'], 3); +$list->set_is_page(true); +$list->set_mobile(true); +$list->set_order_by($order_by); +$list->set_from_record($from_record); +$list->set_view('it_img', true); +$list->set_view('it_id', false); +$list->set_view('it_name', true); +$list->set_view('it_price', true); +echo $list->run(); + +$content = ob_get_contents(); +ob_end_clean(); + +$data['item'] = $content; +$data['error'] = ''; +$data['page'] = $page; + +die(json_encode($data)); +?> \ No newline at end of file diff --git a/shop/ajax.orderdatasave.php b/shop/ajax.orderdatasave.php new file mode 100644 index 000000000..615723e3d --- /dev/null +++ b/shop/ajax.orderdatasave.php @@ -0,0 +1,35 @@ + \ No newline at end of file diff --git a/shop/ajax.orderstock.php b/shop/ajax.orderstock.php new file mode 100644 index 000000000..a2bb40502 --- /dev/null +++ b/shop/ajax.orderstock.php @@ -0,0 +1,67 @@ + 0) { + if($cart_stock_limit > $keep_term * 24) + $cart_stock_limit = $keep_term * 24; + + $stocktime = G5_SERVER_TIME - (3600 * $cart_stock_limit); + + $sql = " select count(*) as cnt + from {$g5['g5_shop_cart_table']} + where od_id = '$tmp_cart_id' + and ct_status = '쇼핑' + and ct_select = '1' + and UNIX_TIMESTAMP(ct_select_time) > '$stocktime' "; + $row = sql_fetch($sql); + + if(!$row['cnt']) + die("주문 요청 때까지 ".$cart_stock_limit."시간 이상 경과되어 주문 상품이 초기화 됐습니다.\n\n 장바구니에서 주문하실 상품을 다시 확인해 주십시오."); +} + +// 재고체크 +$sql = " select * + from {$g5['g5_shop_cart_table']} + where od_id = '$tmp_cart_id' + and ct_select = '1' + and ct_status = '쇼핑' "; +$result = sql_query($sql); + +for($i=0; $row=sql_fetch_array($result); $i++) { + $ct_qty = $row['ct_qty']; + + if(!$row['io_id']) + $it_stock_qty = get_it_stock_qty($row['it_id']); + else + $it_stock_qty = get_option_stock_qty($row['it_id'], $row['io_id'], $row['io_type']); + + if ($ct_qty > $it_stock_qty) + { + $item_option = $row['it_name']; + if($row['io_id']) + $item_option .= '('.$row['ct_option'].')'; + + die($item_option." 의 재고수량이 부족합니다.\n\n현재 재고수량 : " . number_format($it_stock_qty) . " 개"); + } +} + +die(""); +?> \ No newline at end of file diff --git a/shop/bannerhit.php b/shop/bannerhit.php new file mode 100644 index 000000000..ee19b4315 --- /dev/null +++ b/shop/bannerhit.php @@ -0,0 +1,13 @@ + diff --git a/shop/cart.php b/shop/cart.php new file mode 100644 index 000000000..096a21408 --- /dev/null +++ b/shop/cart.php @@ -0,0 +1,279 @@ + + + + + +
        + +
        +
        + + + + + + + + + + + + + + + '; + $a2 = ''; + $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_cart_id); + if($it_options) { + $mod_options = '
        '; + $it_name .= '
        '.$it_options.'
        '; + } + + // 배송비 + switch($row['ct_send_cost']) + { + case 1: + $ct_send_cost = '착불'; + break; + case 2: + $ct_send_cost = '무료'; + break; + default: + $ct_send_cost = '선불'; + break; + } + + // 조건부무료 + if($row['it_sc_type'] == 2) { + $sendcost = get_item_sendcost($row['it_id'], $sum['price'], $sum['qty'], $s_cart_id); + + if($sendcost == 0) + $ct_send_cost = '무료'; + } + + $point = $sum['point']; + $sell_price = $sum['price']; + ?> + + + + + + + + + + + + + '; + } else { + // 배송비 계산 + $send_cost = get_sendcost($s_cart_id, 0); + } + ?> + +
        상품이미지상품명총수량판매가소계포인트배송비 + + +
        + + + + + + +
        장바구니에 담긴 상품이 없습니다.
        +
        + + 0 || $send_cost > 0) { + ?> +
        + 0) { // 배송비가 0 보다 크다면 (있다면) ?> +
        배송비
        +
        원
        + + + 0) { + ?> + +
        총계 가격/포인트
        +
        원 / 점
        + + +
        + + +
        + + 쇼핑 계속하기 + + + + + 쇼핑 계속하기 + + + + +
        + +
        + +
        + + + + + \ No newline at end of file diff --git a/shop/cartoption.php b/shop/cartoption.php new file mode 100644 index 000000000..599850bc6 --- /dev/null +++ b/shop/cartoption.php @@ -0,0 +1,177 @@ + + + +
        + + + + + + +
        +

        선택옵션

        + + + + + + + + +
        +
        + + + +
        +

        추가옵션

        + + + + + + + + +
        +
        + + +
        +
          + +
        • + + + + + + + +
          + + + + + +
          +
        • + +
        +
        + +
        + +
        + + +
        +
        + + + \ No newline at end of file diff --git a/shop/cartupdate.php b/shop/cartupdate.php new file mode 100644 index 000000000..0ad974e54 --- /dev/null +++ b/shop/cartupdate.php @@ -0,0 +1,344 @@ + '$tmp_cart_id' + and it_id = '$it_id' + and io_id = '{$row['io_id']}' + and io_type = '{$row['io_type']}' + and ct_stock_use = 0 + and ct_status = '쇼핑' + and ct_select = '1' "; + $sum = sql_fetch($sql); + $sum_qty = $sum['cnt']; + + // 재고 구함 + $ct_qty = $row['ct_qty']; + if(!$row['io_id']) + $it_stock_qty = get_it_stock_qty($it_id); + else + $it_stock_qty = get_option_stock_qty($it_id, $row['io_id'], $row['io_type']); + + if ($ct_qty + $sum_qty > $it_stock_qty) + { + $item_option = $row['it_name']; + if($row['io_id']) + $item_option .= '('.$row['ct_option'].')'; + + alert($item_option." 의 재고수량이 부족합니다.\\n\\n현재 재고수량 : " . number_format($it_stock_qty - $sum_qty) . " 개"); + } + } + + $sql = " update {$g5['g5_shop_cart_table']} + set ct_select = '1', + ct_select_time = '".G5_TIME_YMDHIS."' + where od_id = '$tmp_cart_id' + and it_id = '$it_id' "; + sql_query($sql); + } + } + + if ($is_member) // 회원인 경우 + goto_url(G5_SHOP_URL.'/orderform.php'); + else + goto_url(G5_BBS_URL.'/login.php?url='.urlencode(G5_SHOP_URL.'/orderform.php')); +} +else if ($act == "alldelete") // 모두 삭제이면 +{ + $sql = " delete from {$g5['g5_shop_cart_table']} + where od_id = '$tmp_cart_id' "; + sql_query($sql); +} +else if ($act == "seldelete") // 선택삭제 +{ + if(!count($_POST['ct_chk'])) + alert("삭제하실 상품을 하나이상 선택해 주십시오."); + + $fldcnt = count($_POST['it_id']); + for($i=0; $i<$fldcnt; $i++) { + $ct_chk = $_POST['ct_chk'][$i]; + if($ct_chk) { + $it_id = $_POST['it_id'][$i]; + $sql = " delete from {$g5['g5_shop_cart_table']} where it_id = '$it_id' and od_id = '$tmp_cart_id' "; + sql_query($sql); + } + } +} +else // 장바구니에 담기 +{ + $count = count($_POST['it_id']); + if ($count < 1) + alert('장바구니에 담을 상품을 선택하여 주십시오.'); + + $ct_count = 0; + for($i=0; $i<$count; $i++) { + // 보관함의 상품을 담을 때 체크되지 않은 상품 건너뜀 + if($act == 'multi' && !$_POST['chk_it_id'][$i]) + continue; + + $it_id = $_POST['it_id'][$i]; + $opt_count = count($_POST['io_id'][$it_id]); + + if($opt_count && $_POST['io_type'][$it_id][0] != 0) + alert('상품의 선택옵션을 선택해 주십시오.'); + + for($k=0; $k<$opt_count; $k++) { + if ($_POST['ct_qty'][$it_id][$k] < 1) + alert('수량은 1 이상 입력해 주십시오.'); + } + + // 상품정보 + $sql = " select * from {$g5['g5_shop_item_table']} where it_id = '$it_id' "; + $it = sql_fetch($sql); + if(!$it['it_id']) + alert('상품정보가 존재하지 않습니다.'); + + // 바로구매에 있던 장바구니 자료를 지운다. + if($i == 0 && $sw_direct) + sql_query(" delete from {$g5['g5_shop_cart_table']} where od_id = '$tmp_cart_id' and ct_direct = 1 ", false); + + // 최소, 최대 수량 체크 + if($it['it_buy_min_qty'] || $it['it_buy_max_qty']) { + $sum_qty = 0; + for($k=0; $k<$opt_count; $k++) { + if($_POST['io_type'][$it_id][$k] == 0) + $sum_qty += $_POST['ct_qty'][$it_id][$k]; + } + + if($it['it_buy_min_qty'] > 0 && $sum_qty < $it['it_buy_min_qty']) + alert($it['it_name'].'의 선택옵션 개수 총합 '.number_format($it['it_buy_min_qty']).'개 이상 주문해 주십시오.'); + + if($it['it_buy_max_qty'] > 0 && $sum_qty > $it['it_buy_max_qty']) + alert($it['it_name'].'의 선택옵션 개수 총합 '.number_format($it['it_buy_max_qty']).'개 이하로 주문해 주십시오.'); + + // 기존에 장바구니에 담긴 상품이 있는 경우에 최대 구매수량 체크 + if($it['it_buy_max_qty'] > 0) { + $sql4 = " select sum(ct_qty) as ct_sum + from {$g5['g5_shop_cart_table']} + where od_id = '$tmp_cart_id' + and it_id = '$it_id' + and io_type = '0' + and ct_status = '쇼핑' "; + $row4 = sql_fetch($sql4); + + if(($sum_qty + $row4['ct_sum']) > $it['it_buy_max_qty']) + alert($it['it_name'].'의 선택옵션 개수 총합 '.number_format($it['it_buy_max_qty']).'개 이하로 주문해 주십시오.', './cart.php'); + } + } + + // 옵션정보를 얻어서 배열에 저장 + $opt_list = array(); + $sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '$it_id' order by io_no asc "; + $result = sql_query($sql); + $lst_count = 0; + for($k=0; $row=sql_fetch_array($result); $k++) { + $opt_list[$row['io_type']][$row['io_id']]['id'] = $row['io_id']; + $opt_list[$row['io_type']][$row['io_id']]['use'] = $row['io_use']; + $opt_list[$row['io_type']][$row['io_id']]['price'] = $row['io_price']; + $opt_list[$row['io_type']][$row['io_id']]['stock'] = $row['io_stock_qty']; + + // 선택옵션 개수 + if(!$row['io_type']) + $lst_count++; + } + + //-------------------------------------------------------- + // 재고 검사, 바로구매일 때만 체크 + //-------------------------------------------------------- + // 이미 주문폼에 있는 같은 상품의 수량합계를 구한다. + if($sw_direct) { + for($k=0; $k<$opt_count; $k++) { + $io_id = $_POST['io_id'][$it_id][$k]; + $io_type = $_POST['io_type'][$it_id][$k]; + $io_value = $_POST['io_value'][$it_id][$k]; + + $sql = " select SUM(ct_qty) as cnt from {$g5['g5_shop_cart_table']} + where od_id <> '$tmp_cart_id' + and it_id = '$it_id' + and io_id = '$io_id' + and io_type = '$io_type' + and ct_stock_use = 0 + and ct_status = '쇼핑' + and ct_select = '1' "; + $row = sql_fetch($sql); + $sum_qty = $row['cnt']; + + // 재고 구함 + $ct_qty = $_POST['ct_qty'][$it_id][$k]; + if(!$io_id) + $it_stock_qty = get_it_stock_qty($it_id); + else + $it_stock_qty = get_option_stock_qty($it_id, $io_id, $io_type); + + if ($ct_qty + $sum_qty > $it_stock_qty) + { + alert($io_value." 의 재고수량이 부족합니다.\\n\\n현재 재고수량 : " . number_format($it_stock_qty - $sum_qty) . " 개"); + } + } + } + //-------------------------------------------------------- + + // 옵션수정일 때 기존 장바구니 자료를 먼저 삭제 + if($act == 'optionmod') + sql_query(" delete from {$g5['g5_shop_cart_table']} where od_id = '$tmp_cart_id' and it_id = '$it_id' "); + + // 장바구니에 Insert + // 바로구매일 경우 장바구니가 체크된것으로 강제 설정 + if($sw_direct) { + $ct_select = 1; + $ct_select_time = G5_TIME_YMDHIS; + } else { + $ct_select = 0; + $ct_select_time = '0000-00-00 00:00:00'; + } + + // 장바구니에 Insert + $comma = ''; + $sql = " INSERT INTO {$g5['g5_shop_cart_table']} + ( od_id, mb_id, it_id, it_name, it_sc_type, it_sc_method, it_sc_price, it_sc_minimum, it_sc_qty, ct_status, ct_price, ct_point, ct_point_use, ct_stock_use, ct_option, ct_qty, ct_notax, io_id, io_type, io_price, ct_time, ct_ip, ct_send_cost, ct_direct, ct_select, ct_select_time ) + VALUES "; + + for($k=0; $k<$opt_count; $k++) { + $io_id = $_POST['io_id'][$it_id][$k]; + $io_type = $_POST['io_type'][$it_id][$k]; + $io_value = $_POST['io_value'][$it_id][$k]; + + // 선택옵션정보가 존재하는데 선택된 옵션이 없으면 건너뜀 + if($lst_count && $io_id == '') + continue; + + // 구매할 수 없는 옵션은 건너뜀 + if($io_id && !$opt_list[$io_type][$io_id]['use']) + continue; + + $io_price = $opt_list[$io_type][$io_id]['price']; + $ct_qty = $_POST['ct_qty'][$it_id][$k]; + + // 구매가격이 음수인지 체크 + if($io_type) { + if((int)$io_price < 0) + alert('구매금액이 음수인 상품은 구매할 수 없습니다.'); + } else { + if((int)$it['it_price'] + (int)$io_price < 0) + alert('구매금액이 음수인 상품은 구매할 수 없습니다.'); + } + + // 동일옵션의 상품이 있으면 수량 더함 + $sql2 = " select ct_id, io_type, ct_qty + from {$g5['g5_shop_cart_table']} + where od_id = '$tmp_cart_id' + and it_id = '$it_id' + and io_id = '$io_id' + and ct_status = '쇼핑' "; + $row2 = sql_fetch($sql2); + if($row2['ct_id']) { + // 재고체크 + $tmp_ct_qty = $row2['ct_qty']; + if(!$io_id) + $tmp_it_stock_qty = get_it_stock_qty($it_id); + else + $tmp_it_stock_qty = get_option_stock_qty($it_id, $io_id, $row2['io_type']); + + if ($tmp_ct_qty + $ct_qty > $tmp_it_stock_qty) + { + alert($io_value." 의 재고수량이 부족합니다.\\n\\n현재 재고수량 : " . number_format($tmp_it_stock_qty) . " 개"); + } + + $sql3 = " update {$g5['g5_shop_cart_table']} + set ct_qty = ct_qty + '$ct_qty' + where ct_id = '{$row2['ct_id']}' "; + sql_query($sql3); + continue; + } + + // 포인트 + $point = 0; + if($config['cf_use_point']) { + if($io_type == 0) { + $point = get_item_point($it, $io_id); + } else { + $point = $it['it_supply_point']; + } + + if($point < 0) + $point = 0; + } + + // 배송비결제 + if($it['it_sc_type'] == 1) + $ct_send_cost = 2; // 무료 + else if($it['it_sc_type'] > 1 && $it['it_sc_method'] == 1) + $ct_send_cost = 1; // 착불 + + $sql .= $comma."( '$tmp_cart_id', '{$member['mb_id']}', '{$it['it_id']}', '".addslashes($it['it_name'])."', '{$it['it_sc_type']}', '{$it['it_sc_method']}', '{$it['it_sc_price']}', '{$it['it_sc_minimum']}', '{$it['it_sc_qty']}', '쇼핑', '{$it['it_price']}', '$point', '0', '0', '$io_value', '$ct_qty', '{$it['it_notax']}', '$io_id', '$io_type', '$io_price', '".G5_TIME_YMDHIS."', '$REMOTE_ADDR', '$ct_send_cost', '$sw_direct', '$ct_select', '$ct_select_time' )"; + $comma = ' , '; + $ct_count++; + } + + if($ct_count > 0) + sql_query($sql); + } +} + +// 바로 구매일 경우 +if ($sw_direct) +{ + if ($is_member) + { + goto_url(G5_SHOP_URL."/orderform.php?sw_direct=$sw_direct"); + } + else + { + goto_url(G5_BBS_URL."/login.php?url=".urlencode(G5_SHOP_URL."/orderform.php?sw_direct=$sw_direct")); + } +} +else +{ + goto_url(G5_SHOP_URL.'/cart.php'); +} +?> diff --git a/shop/coupon.php b/shop/coupon.php new file mode 100644 index 000000000..275e1f7ee --- /dev/null +++ b/shop/coupon.php @@ -0,0 +1,87 @@ += '".G5_TIME_YMD."' + order by cp_no "; +$result = sql_query($sql); +?> + + +
        +

        + +
        + + + + + + + + + + + + + + + + + + '; + ?> + +
        쿠폰명적용대상할인금액사용기한
        ~
        사용할 수 있는 쿠폰이 없습니다.
        +
        + +
        +
        + + \ No newline at end of file diff --git a/shop/event.php b/shop/event.php new file mode 100644 index 000000000..0c47236f1 --- /dev/null +++ b/shop/event.php @@ -0,0 +1,106 @@ +이벤트 관리'; +?> + + + + + +'; + +// 상단 HTML +echo '
        '.conv_content($ev['ev_head_html'], 1).'
        '; + +// 상품 출력순서가 있다면 +if ($sort != "") + $order_by = $sort.' '.$sortodr.' , b.it_order, b.it_id desc'; +else + $order_by = 'b.it_order, b.it_id desc'; + +if ($skin) + $ev['ev_skin'] = $skin; + +define('G5_SHOP_CSS_URL', G5_SHOP_SKIN_URL); + +// 리스트 유형별로 출력 +$list_file = G5_SHOP_SKIN_PATH."/{$ev['ev_skin']}"; +if (file_exists($list_file)) +{ + include G5_SHOP_SKIN_PATH.'/list.sort.skin.php'; + + // 상품 보기 타입 변경 버튼 + include G5_SHOP_SKIN_PATH.'/list.sub.skin.php'; + + // 총몇개 = 한줄에 몇개 * 몇줄 + $items = $ev['ev_list_mod'] * $ev['ev_list_row']; + // 페이지가 없으면 첫 페이지 (1 페이지) + if ($page < 1) $page = 1; + // 시작 레코드 구함 + $from_record = ($page - 1) * $items; + + $list = new item_list(G5_SHOP_SKIN_PATH.'/'.$ev['ev_skin'], $ev['ev_list_mod'], $ev['ev_list_row'], $ev['ev_img_width'], $ev['ev_img_height']); + $list->set_event($ev['ev_id']); + $list->set_is_page(true); + $list->set_order_by($order_by); + $list->set_from_record($from_record); + $list->set_view('it_img', true); + $list->set_view('it_id', false); + $list->set_view('it_name', true); + $list->set_view('it_cust_price', false); + $list->set_view('it_price', true); + $list->set_view('it_icon', true); + $list->set_view('sns', true); + echo $list->run(); + + // where 된 전체 상품수 + $total_count = $list->total_count; + // 전체 페이지 계산 + $total_page = ceil($total_count / $items); +} +else +{ + echo '
        '.$ev['ev_skin'].' 파일을 찾을 수 없습니다.
        관리자에게 알려주시면 감사하겠습니다.
        '; +} +?> + + + +'.conv_content($ev['ev_tail_html'], 1).''; + +$timg = G5_DATA_PATH.'/event/'.$ev_id.'_t'; +if (file_exists($timg)) + echo '
        '; +?> + + + diff --git a/shop/img/gnb_2dbg.gif b/shop/img/gnb_2dbg.gif new file mode 100644 index 000000000..238fcfbfe Binary files /dev/null and b/shop/img/gnb_2dbg.gif differ diff --git a/shop/img/hd_nb_cart.gif b/shop/img/hd_nb_cart.gif new file mode 100644 index 000000000..3ec101f63 Binary files /dev/null and b/shop/img/hd_nb_cart.gif differ diff --git a/shop/img/hd_nb_deli.gif b/shop/img/hd_nb_deli.gif new file mode 100644 index 000000000..79d1de8e0 Binary files /dev/null and b/shop/img/hd_nb_deli.gif differ diff --git a/shop/img/hd_nb_help.gif b/shop/img/hd_nb_help.gif new file mode 100644 index 000000000..91a274f03 Binary files /dev/null and b/shop/img/hd_nb_help.gif differ diff --git a/shop/img/hd_nb_wish.gif b/shop/img/hd_nb_wish.gif new file mode 100644 index 000000000..a9783387b Binary files /dev/null and b/shop/img/hd_nb_wish.gif differ diff --git a/shop/img/icon_arw_toleft.gif b/shop/img/icon_arw_toleft.gif new file mode 100644 index 000000000..a9d338b5e Binary files /dev/null and b/shop/img/icon_arw_toleft.gif differ diff --git a/shop/img/icon_best.gif b/shop/img/icon_best.gif new file mode 100644 index 000000000..508f48f5e Binary files /dev/null and b/shop/img/icon_best.gif differ diff --git a/shop/img/icon_cp.gif b/shop/img/icon_cp.gif new file mode 100644 index 000000000..61a3d233c Binary files /dev/null and b/shop/img/icon_cp.gif differ diff --git a/shop/img/icon_discount.gif b/shop/img/icon_discount.gif new file mode 100644 index 000000000..d5bda31d4 Binary files /dev/null and b/shop/img/icon_discount.gif differ diff --git a/shop/img/icon_hit.gif b/shop/img/icon_hit.gif new file mode 100644 index 000000000..3712ed10f Binary files /dev/null and b/shop/img/icon_hit.gif differ diff --git a/shop/img/icon_new.gif b/shop/img/icon_new.gif new file mode 100644 index 000000000..bf0ebd832 Binary files /dev/null and b/shop/img/icon_new.gif differ diff --git a/shop/img/icon_rec.gif b/shop/img/icon_rec.gif new file mode 100644 index 000000000..8a6a6c4a7 Binary files /dev/null and b/shop/img/icon_rec.gif differ diff --git a/shop/img/icon_soldout.gif b/shop/img/icon_soldout.gif new file mode 100644 index 000000000..cd8ca8b7a Binary files /dev/null and b/shop/img/icon_soldout.gif differ diff --git a/shop/img/loading.gif b/shop/img/loading.gif new file mode 100644 index 000000000..93dc39709 Binary files /dev/null and b/shop/img/loading.gif differ diff --git a/shop/img/marks_escrow/01.jpg b/shop/img/marks_escrow/01.jpg new file mode 100644 index 000000000..ac574e300 Binary files /dev/null and b/shop/img/marks_escrow/01.jpg differ diff --git a/shop/img/marks_escrow/01_s.jpg b/shop/img/marks_escrow/01_s.jpg new file mode 100644 index 000000000..5b69eb14a Binary files /dev/null and b/shop/img/marks_escrow/01_s.jpg differ diff --git a/shop/img/marks_escrow/02.jpg b/shop/img/marks_escrow/02.jpg new file mode 100644 index 000000000..4e067a03f Binary files /dev/null and b/shop/img/marks_escrow/02.jpg differ diff --git a/shop/img/marks_escrow/02_s.jpg b/shop/img/marks_escrow/02_s.jpg new file mode 100644 index 000000000..54f72bb5b Binary files /dev/null and b/shop/img/marks_escrow/02_s.jpg differ diff --git a/shop/img/marks_escrow/03.jpg b/shop/img/marks_escrow/03.jpg new file mode 100644 index 000000000..8ae161a9f Binary files /dev/null and b/shop/img/marks_escrow/03.jpg differ diff --git a/shop/img/marks_escrow/03_s.jpg b/shop/img/marks_escrow/03_s.jpg new file mode 100644 index 000000000..23d896bfb Binary files /dev/null and b/shop/img/marks_escrow/03_s.jpg differ diff --git a/shop/img/marks_escrow/04.jpg b/shop/img/marks_escrow/04.jpg new file mode 100644 index 000000000..27eb671b2 Binary files /dev/null and b/shop/img/marks_escrow/04.jpg differ diff --git a/shop/img/marks_escrow/04_s.jpg b/shop/img/marks_escrow/04_s.jpg new file mode 100644 index 000000000..38caa25bf Binary files /dev/null and b/shop/img/marks_escrow/04_s.jpg differ diff --git a/shop/img/marks_escrow/escrow_foot.gif b/shop/img/marks_escrow/escrow_foot.gif new file mode 100644 index 000000000..6de73c44b Binary files /dev/null and b/shop/img/marks_escrow/escrow_foot.gif differ diff --git a/shop/img/marks_escrow/escrow_side.gif b/shop/img/marks_escrow/escrow_side.gif new file mode 100644 index 000000000..c91e6f62e Binary files /dev/null and b/shop/img/marks_escrow/escrow_side.gif differ diff --git a/shop/img/marks_escrow/txt2_3_2.gif b/shop/img/marks_escrow/txt2_3_2.gif new file mode 100644 index 000000000..61235df0c Binary files /dev/null and b/shop/img/marks_escrow/txt2_3_2.gif differ diff --git a/shop/img/no_image.gif b/shop/img/no_image.gif new file mode 100644 index 000000000..1ca45c78c Binary files /dev/null and b/shop/img/no_image.gif differ diff --git a/shop/img/s_star1.png b/shop/img/s_star1.png new file mode 100644 index 000000000..1538fc40c Binary files /dev/null and b/shop/img/s_star1.png differ diff --git a/shop/img/s_star2.png b/shop/img/s_star2.png new file mode 100644 index 000000000..f4e553984 Binary files /dev/null and b/shop/img/s_star2.png differ diff --git a/shop/img/s_star3.png b/shop/img/s_star3.png new file mode 100644 index 000000000..6706f6adb Binary files /dev/null and b/shop/img/s_star3.png differ diff --git a/shop/img/s_star4.png b/shop/img/s_star4.png new file mode 100644 index 000000000..7ff12b48d Binary files /dev/null and b/shop/img/s_star4.png differ diff --git a/shop/img/s_star5.png b/shop/img/s_star5.png new file mode 100644 index 000000000..2816c91f1 Binary files /dev/null and b/shop/img/s_star5.png differ diff --git a/shop/img/ts01.gif b/shop/img/ts01.gif new file mode 100644 index 000000000..a65a70bae Binary files /dev/null and b/shop/img/ts01.gif differ diff --git a/shop/img/ts02.gif b/shop/img/ts02.gif new file mode 100644 index 000000000..c826d741f Binary files /dev/null and b/shop/img/ts02.gif differ diff --git a/shop/img/ts03.gif b/shop/img/ts03.gif new file mode 100644 index 000000000..dcff6b6e3 Binary files /dev/null and b/shop/img/ts03.gif differ diff --git a/shop/index.php b/shop/index.php new file mode 100644 index 000000000..78957a6ce --- /dev/null +++ b/shop/index.php @@ -0,0 +1,154 @@ + + + + + + + + +
        +
        +

        히트상품

        +

        히트상품 모음

        +
        + set_type(1); + $list->set_view('it_img', true); + $list->set_view('it_id', true); + $list->set_view('it_name', true); + $list->set_view('it_basic', true); + $list->set_view('it_cust_price', true); + $list->set_view('it_price', true); + $list->set_view('it_icon', true); + $list->set_view('sns', true); + echo $list->run(); + ?> +
        + + + + + +
        +
        +

        추천상품

        +

        추천상품 모음

        +
        + set_type(2); + $list->set_view('it_id', false); + $list->set_view('it_name', true); + $list->set_view('it_basic', true); + $list->set_view('it_cust_price', true); + $list->set_view('it_price', true); + $list->set_view('it_icon', true); + $list->set_view('sns', true); + echo $list->run(); + ?> +
        + + + + + +
        +
        +

        최신상품

        +

        최신상품 모음

        +
        + set_type(3); + $list->set_view('it_id', false); + $list->set_view('it_name', true); + $list->set_view('it_basic', true); + $list->set_view('it_cust_price', true); + $list->set_view('it_price', true); + $list->set_view('it_icon', true); + $list->set_view('sns', true); + echo $list->run(); + ?> +
        + + + + + +
        +
        +

        인기상품

        +

        인기상품 모음

        +
        + set_type(4); + $list->set_view('it_id', false); + $list->set_view('it_name', true); + $list->set_view('it_basic', true); + $list->set_view('it_cust_price', true); + $list->set_view('it_price', true); + $list->set_view('it_icon', true); + $list->set_view('sns', true); + echo $list->run(); + ?> +
        + + + + + +
        +
        +

        할인상품

        +

        할인상품 모음

        +
        + set_type(5); + $list->set_view('it_id', false); + $list->set_view('it_name', true); + $list->set_view('it_basic', true); + $list->set_view('it_cust_price', true); + $list->set_view('it_price', true); + $list->set_view('it_icon', true); + $list->set_view('sns', true); + echo $list->run(); + ?> +
        + + + + +
        +

        커뮤니티 최신글

        + + + +
        + + + + + + + \ No newline at end of file diff --git a/shop/inicis/_common.php b/shop/inicis/_common.php new file mode 100644 index 000000000..bad54a5d7 --- /dev/null +++ b/shop/inicis/_common.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/shop/inicis/encryptdata.php b/shop/inicis/encryptdata.php new file mode 100644 index 000000000..d46924982 --- /dev/null +++ b/shop/inicis/encryptdata.php @@ -0,0 +1,65 @@ +SetField("type", "chkfake"); // 고정 (절대 수정 불가) +$inipay->SetField("enctype","asym"); //asym:비대칭, symm:대칭(현재 asym으로 고정) +/************************************************************************************************** + * admin 은 키패스워드 변수명입니다. 수정하시면 안됩니다. 1111의 부분만 수정해서 사용하시기 바랍니다. + * 키패스워드는 상점관리자 페이지(https://iniweb.inicis.com)의 비밀번호가 아닙니다. 주의해 주시기 바랍니다. + * 키패스워드는 숫자 4자리로만 구성됩니다. 이 값은 키파일 발급시 결정됩니다. + * 키패스워드 값을 확인하시려면 상점측에 발급된 키파일 안의 readme.txt 파일을 참조해 주십시오. + **************************************************************************************************/ +$inipay->SetField("admin", $default['de_inicis_admin_key']); // 키패스워드(키발급시 생성, 상점관리자 패스워드와 상관없음) +$inipay->SetField("checkopt", "false"); //base64함:false, base64안함:true(현재 false로 고정) + +//필수항목 : mid, price, nointerest, quotabase +//추가가능 : INIregno, oid +//*주의* : 추가가능한 항목중 암호화 대상항목에 추가한 필드는 반드시 hidden 필드에선 제거하고 +// SESSION이나 DB를 이용해 다음페이지(INIsecureresult.php)로 전달/셋팅되어야 합니다. +$inipay->SetField("mid", $default['de_inicis_mid']); // 상점아이디 +$inipay->SetField("price", $price); // 가격 +$inipay->SetField("nointerest", $inipay_nointerest); // 무이자여부(no:일반, yes:무이자) +$inipay->SetField("quotabase", iconv_euckr($inipay_quotabase));//할부기간 + +/******************************** + * 4. 암호화 대상/값을 암호화함 * + ********************************/ +$inipay->startAction(); + +/********************* + * 5. 암호화 결과 * + *********************/ +if( $inipay->GetResult("ResultCode") != "00" ) +{ + die('{"error":"'.$inipay->GetResult("ResultMsg").'"}'); +} + +/********************* + * 6. 세션정보 저장 * + *********************/ +set_session('INI_MID', $default['de_inicis_mid']); //상점ID +set_session('INI_ADMIN', $default['de_inicis_admin_key']); // 키패스워드(키발급시 생성, 상점관리자 패스워드와 상관없음) +set_session('INI_PRICE', $price); //가격 +set_session('INI_RN', $inipay->GetResult("rn")); //고정 (절대 수정 불가) +set_session('INI_ENCTYPE', $inipay->GetResult("enctype")); //고정 (절대 수정 불가) + +$ini_encfield = $inipay->GetResult("encfield"); +$ini_certid = $inipay->GetResult("certid"); + +$result = array( + 'error' => '', + 'ini_encfield' => $ini_encfield, + 'ini_certid' => $ini_certid +); + +die(json_encode($result)); + +//die('{"error":"", "ini_encfield":"'.$ini_encfield.'", "ini_certid":"'.$ini_certid.'"}'); +?> \ No newline at end of file diff --git a/shop/inicis/escrow.register.php b/shop/inicis/escrow.register.php new file mode 100644 index 000000000..01a804d57 --- /dev/null +++ b/shop/inicis/escrow.register.php @@ -0,0 +1,115 @@ + 'korex', + '아주택배' => 'ajutb', + 'KT로지스' => 'ktlogistics', + '현대택배' => 'hyundai', + 'CJ대한통운' => 'cjgls', + '한진택배' => 'hanjin', + '트라넷' => 'tranet', + '하나로택배' => 'Hanaro', + '사가와익스프레스' => 'Sagawa', + 'SEDEX' => 'sedex', + 'KGB택배' => 'kgbls', + '로젠택배' => 'kgb', + 'KG옐로우캡택배' => 'yellow', + '삼성HTH' => 'hth', + '동부택배' => 'dongbu', + '우체국' => 'EPOST', + '우편등기' => 'registpost', + '기타택배' => '9999' +); + +$dlv_exName = $escrow_corp; +$dlv_exCode = $exCode[$dlv_exName]; +if(!$dlv_exCode) + $dlv_exCode = '9999'; + +/********************* + * 3. 지불 정보 설정 * + *********************/ +$inipay->SetField("tid", $escrow_tno); // 거래아이디 +$inipay->SetField("mid", $default['de_inicis_mid']); // 상점아이디 +/************************************************************************************************** + * admin 은 키패스워드 변수명입니다. 수정하시면 안됩니다. 1111의 부분만 수정해서 사용하시기 바랍니다. + * 키패스워드는 상점관리자 페이지(https://iniweb.inicis.com)의 비밀번호가 아닙니다. 주의해 주시기 바랍니다. + * 키패스워드는 숫자 4자리로만 구성됩니다. 이 값은 키파일 발급시 결정됩니다. + * 키패스워드 값을 확인하시려면 상점측에 발급된 키파일 안의 readme.txt 파일을 참조해 주십시오. + **************************************************************************************************/ +$inipay->SetField("admin", $default['de_inicis_admin_key']); // 키패스워드(상점아이디에 따라 변경) +$inipay->SetField("type", "escrow"); // 고정 (절대 수정 불가) +$inipay->SetField("escrowtype", "dlv"); // 고정 (절대 수정 불가) +$inipay->SetField("dlv_ip", getenv("REMOTE_ADDR")); // 고정 + +$inipay->SetField("oid", $oid); +$inipay->SetField("soid", "1"); +//$inipay->SetField("dlv_date", $dlv_date); +//$inipay->SetField("dlv_time", $dlv_time); +$inipay->SetField("dlv_report", $EscrowType); +$inipay->SetField("dlv_invoice", $invoice); +$inipay->SetField("dlv_name", $member['mb_id']); + +$inipay->SetField("dlv_excode", $dlv_exCode); +$inipay->SetField("dlv_exname", $dlv_exName); +$inipay->SetField("dlv_charge", $dlv_charge); + +$inipay->SetField("dlv_invoiceday", G5_TIME_YMDHIS); +$inipay->SetField("dlv_sendname", $sendName); +$inipay->SetField("dlv_sendpost", $sendPost); +$inipay->SetField("dlv_sendaddr1", $sendAddr1); +$inipay->SetField("dlv_sendaddr2", $sendAddr2); +$inipay->SetField("dlv_sendtel", $sendTel); + +$inipay->SetField("dlv_recvname", $recvName); +$inipay->SetField("dlv_recvpost", $recvPost); +$inipay->SetField("dlv_recvaddr", $recvAddr); +$inipay->SetField("dlv_recvtel", $recvTel); + +$inipay->SetField("dlv_goodscode", $goodsCode); +$inipay->SetField("dlv_goods", $goods); +$inipay->SetField("dlv_goodscnt", $goodCnt); +$inipay->SetField("price", $price); +$inipay->SetField("dlv_reserved1", $reserved1); +$inipay->SetField("dlv_reserved2", $reserved2); +$inipay->SetField("dlv_reserved3", $reserved3); + +$inipay->SetField("pgn", $pgn); + +/********************* + * 3. 배송 등록 요청 * + *********************/ +$inipay->startAction(); + + +/********************** + * 4. 배송 등록 결과 * + **********************/ + + $tid = $inipay->GetResult("tid"); // 거래번호 + $resultCode = $inipay->GetResult("ResultCode"); // 결과코드 ("00"이면 지불 성공) + $resultMsg = $inipay->GetResult("ResultMsg"); // 결과내용 (지불결과에 대한 설명) + $dlv_date = $inipay->GetResult("DLV_Date"); + $dlv_time = $inipay->GetResult("DLV_Time"); +?> \ No newline at end of file diff --git a/shop/inicis/inipay_cancel.php b/shop/inicis/inipay_cancel.php new file mode 100644 index 000000000..14315e98b --- /dev/null +++ b/shop/inicis/inipay_cancel.php @@ -0,0 +1,31 @@ +SetField("type", "cancel"); // 고정 + $inipay->SetField("tid", $TID); // 고정 + $inipay->SetField("cancelmsg", "DB FAIL"); // 취소사유 + $inipay->startAction(); + if($inipay->GetResult('ResultCode') == "00") + { + $inipay->MakeTXErrMsg(MERCHANT_DB_ERR,"Merchant DB FAIL"); + } +} +?> \ No newline at end of file diff --git a/shop/inicis/inipay_result.php b/shop/inicis/inipay_result.php new file mode 100644 index 000000000..a43f53b29 --- /dev/null +++ b/shop/inicis/inipay_result.php @@ -0,0 +1,216 @@ + 구매자의 세션을 반드시 체크하도록하여 부정거래를 방지하여 주십시요. + * + * http://www.inicis.com + * Copyright (C) 2006 Inicis Co., Ltd. All rights reserved. + */ + + include_once(G5_SHOP_PATH.'/settle_inicis.inc.php'); + +/********************* + * 3. 지불 정보 설정 * +*********************/ +if($default['de_tax_flag_use']) { // 복합과세 사용 때 + $inipay->SetXPath("INIpay/GoodsInfo/Tax", $_POST['comm_vat_mny']); // 부가세 금액 + $inipay->SetXPath("INIpay/GoodsInfo/TaxFree", $_POST['comm_free_mny']); // 면세 금액 +} +$inipay->SetField("type", "securepay"); // 고정 (절대 수정 불가) +$inipay->SetField("pgid", "INIphp".$pgid); // 고정 (절대 수정 불가) +$inipay->SetField("subpgip", "203.238.3.10"); // 고정 (절대 수정 불가) +$inipay->SetField("admin", get_session('INI_ADMIN')); // 키패스워드(상점아이디에 따라 변경) +$inipay->SetField("uid", $uid); // INIpay User ID (절대 수정 불가) +$inipay->SetField("goodname", iconv_euckr($goodname)); // 상품명 +$inipay->SetField("currency", $currency); // 화폐단위 + +$inipay->SetField("mid", get_session('INI_MID')); // 상점아이디 +$inipay->SetField("rn", get_session('INI_RN')); // 웹페이지 위변조용 RN값 +$inipay->SetField("price", get_session('INI_PRICE')); // 가격 +$inipay->SetField("enctype", get_session('INI_ENCTYPE')); // 고정 (절대 수정 불가) + + + /*---------------------------------------------------------------------------------------- +price 등의 중요데이터는 +브라우저상의 위변조여부를 반드시 확인하셔야 합니다. + +결제 요청페이지에서 요청된 금액과 +실제 결제가 이루어질 금액을 반드시 비교하여 처리하십시오. + +설치 메뉴얼 2장의 결제 처리페이지 작성부분의 보안경고 부분을 확인하시기 바랍니다. +적용참조문서: 이니시스홈페이지->가맹점기술지원자료실->기타자료실 의 + '결제 처리 페이지 상에 결제 금액 변조 유무에 대한 체크' 문서를 참조하시기 바랍니다. +예제) +원 상품 가격 변수를 OriginalPrice 하고 원 가격 정보를 리턴하는 함수를 Return_OrgPrice()라 가정하면 +다음 같이 적용하여 원가격과 웹브라우저에서 Post되어 넘어온 가격을 비교 한다. + +$OriginalPrice = Return_OrgPrice(); +$PostPrice = $_SESSION['INI_PRICE']; +if ( $OriginalPrice != $PostPrice ) +{ + //결제 진행을 중단하고 금액 변경 가능성에 대한 메시지 출력 처리 + //처리 종료 +} + +----------------------------------------------------------------------------------------*/ +$inipay->SetField("buyername", iconv_euckr($buyername)); // 구매자 명 +$inipay->SetField("buyertel", $buyertel); // 구매자 연락처(휴대폰 번호 또는 유선전화번호) +$inipay->SetField("buyeremail", $buyeremail); // 구매자 이메일 주소 +$inipay->SetField("paymethod", $paymethod); // 지불방법 (절대 수정 불가) +$inipay->SetField("encrypted", $encrypted); // 암호문 +$inipay->SetField("sessionkey", $sessionkey); // 암호문 +$inipay->SetField("url", G5_URL); // 실제 서비스되는 상점 SITE URL로 변경할것 +$inipay->SetField("cardcode", $cardcode); // 카드코드 리턴 +$inipay->SetField("parentemail", $parentemail); // 보호자 이메일 주소(핸드폰 , 전화결제시에 14세 미만의 고객이 결제하면 부모 이메일로 결제 내용통보 의무, 다른결제 수단 사용시에 삭제 가능) + +/*-----------------------------------------------------------------* + * 수취인 정보 * * + *-----------------------------------------------------------------* + * 실물배송을 하는 상점의 경우에 사용되는 필드들이며 * + * 아래의 값들은 INIsecurepay.html 페이지에서 포스트 되도록 * + * 필드를 만들어 주도록 하십시요. * + * 컨텐츠 제공업체의 경우 삭제하셔도 무방합니다. * + *-----------------------------------------------------------------*/ +$inipay->SetField("recvname", iconv_euckr($recvname)); // 수취인 명 +$inipay->SetField("recvtel", $recvtel); // 수취인 연락처 +$inipay->SetField("recvaddr", iconv_euckr($recvaddr)); // 수취인 주소 +$inipay->SetField("recvpostnum", $recvpostnum); // 수취인 우편번호 +$inipay->SetField("recvmsg", $recvmsg); // 전달 메세지 + +$inipay->SetField("joincard", $joincard); // 제휴카드코드 +$inipay->SetField("joinexpire", $joinexpire); // 제휴카드유효기간 +$inipay->SetField("id_customer", $id_customer); //user_id + + +/**************** + * 4. 지불 요청 * + ****************/ +$inipay->startAction(); + +/**************************************************************************************************************** + * 5. 결제 결과 + * + * 1 모든 결제 수단에 공통되는 결제 결과 데이터 + * 거래번호 : $inipay->GetResult('TID') + * 결과코드 : $inipay->GetResult('ResultCode') ("00"이면 지불 성공) + * 결과내용 : $inipay->GetResult('ResultMsg') (지불결과에 대한 설명) + * 지불방법 : $inipay->GetResult('PayMethod') (매뉴얼 참조) + * 상점주문번호 : $inipay->GetResult('MOID') + * 결제완료금액 : $inipay->GetResult('TotPrice') + * + * 결제 되는 금액 =>원상품가격과 결제결과금액과 비교하여 금액이 동일하지 않다면 + * 결제 금액의 위변조가 의심됨으로 정상적인 처리가 되지않도록 처리 바랍니다. (해당 거래 취소 처리) + * + * + * 2. 신용카드,ISP,핸드폰, 전화 결제, 은행계좌이체, OK CASH BAG Point 결제 결과 데이터 + * (무통장입금 , 문화 상품권 포함) + * 이니시스 승인날짜 : $inipay->GetResult('ApplDate') (YYYYMMDD) + * 이니시스 승인시각 : $inipay->GetResult('ApplTime') (HHMMSS) + * + * 3. 신용카드 결제 결과 데이터 + * + * 신용카드 승인번호 : $inipay->GetResult('ApplNum') + * 할부기간 : $inipay->GetResult('CARD_Quota') + * 무이자할부 여부 : $inipay->GetResult('CARD_Interest') ("1"이면 무이자할부) + * 신용카드사 코드 : $inipay->GetResult('CARD_Code') (매뉴얼 참조) + * 카드발급사 코드 : $inipay->GetResult('CARD_BankCode') (매뉴얼 참조) + * 본인인증 수행여부 : $inipay->GetResult('CARD_AuthType') ("00"이면 수행) + * 각종 이벤트 적용 여부 : $inipay->GetResult('EventCode') + * + * ** 달러결제 시 통화코드와 환률 정보 ** + * 해당 통화코드 : $inipay->GetResult('OrgCurrency') + * 환율 : $inipay->GetResult('ExchangeRate') + * + * 아래는 "신용카드 및 OK CASH BAG 복합결제" 또는"신용카드 지불시에 OK CASH BAG적립"시에 추가되는 데이터 + * OK Cashbag 적립 승인번호 : $inipay->GetResult('OCB_SaveApplNum') + * OK Cashbag 사용 승인번호 : $inipay->GetResult('OCB_PayApplNum') + * OK Cashbag 승인일시 : $inipay->GetResult('OCB_ApplDate') (YYYYMMDDHHMMSS) + * OCB 카드번호 : $inipay->GetResult('OCB_Num') + * OK Cashbag 복합결재시 신용카드 지불금액 : $inipay->GetResult('CARD_ApplPrice') + * OK Cashbag 복합결재시 포인트 지불금액 : $inipay->GetResult('OCB_PayPrice') + * + * 4. 실시간 계좌이체 결제 결과 데이터 + * + * 은행코드 : $inipay->GetResult('ACCT_BankCode') + * 현금영수증 발행결과코드 : $inipay->GetResult('CSHR_ResultCode') + * 현금영수증 발행구분코드 : $inipay->GetResult('CSHR_Type') + * * + * 5. OK CASH BAG 결제수단을 이용시에만 결제 결과 데이터 + * OK Cashbag 적립 승인번호 : $inipay->GetResult('OCB_SaveApplNum') + * OK Cashbag 사용 승인번호 : $inipay->GetResult('OCB_PayApplNum') + * OK Cashbag 승인일시 : $inipay->GetResult('OCB_ApplDate') (YYYYMMDDHHMMSS) + * OCB 카드번호 : $inipay->GetResult('OCB_Num') + * + * 6. 무통장 입금 결제 결과 데이터 * + * 가상계좌 채번에 사용된 주민번호 : $inipay->GetResult('VACT_RegNum') * + * 가상계좌 번호 : $inipay->GetResult('VACT_Num') * + * 입금할 은행 코드 : $inipay->GetResult('VACT_BankCode') * + * 입금예정일 : $inipay->GetResult('VACT_Date') (YYYYMMDD) * + * 송금자 명 : $inipay->GetResult('VACT_InputName') * + * 예금주 명 : $inipay->GetResult('VACT_Name') * + * * + * 7. 핸드폰, 전화 결제 결과 데이터( "실패 내역 자세히 보기"에서 필요 , 상점에서는 필요없는 정보임) * + * 전화결제 사업자 코드 : $inipay->GetResult('HPP_GWCode') * + * * + * 8. 핸드폰 결제 결과 데이터 * + * 휴대폰 번호 : $inipay->GetResult('HPP_Num') (핸드폰 결제에 사용된 휴대폰번호) * + * * + * 9. 전화 결제 결과 데이터 * +* 전화번호 : $inipay->GetResult('ARSB_Num') (전화결제에 사용된 전화번호) * +* * +* 10. 문화 상품권 결제 결과 데이터 * +* 컬쳐 랜드 ID : $inipay->GetResult('CULT_UserID') * +* * +* 11. K-merce 상품권 결제 결과 데이터 (K-merce ID, 틴캐시 아이디 공통사용) * +* K-merce ID : $inipay->GetResult('CULT_UserID') * +* * +* 12. 모든 결제 수단에 대해 결제 실패시에만 결제 결과 데이터 * +* 에러코드 : $inipay->GetResult('ResultErrorCode') * +* * +* 13.현금영수증 발급 결과코드 (은행계좌이체시에만 리턴) * +* $inipay->GetResult('CSHR_ResultCode') * +* * +* 14.틴캐시 잔액 데이터 * +* $inipay->GetResult('TEEN_Remains') * +* 틴캐시 ID : $inipay->GetResult('CULT_UserID') * +* 15.게임문화 상품권 * +* 사용 카드 갯수 : $inipay->GetResult('GAMG_Cnt') * +* * +****************************************************************************************************************/ + +if( $inipay->GetResult("ResultCode") == "00" ) { + //최종결제요청 결과 성공 DB처리 + $tno = $inipay->GetResult('TID'); + $amount = $inipay->GetResult('TotPrice'); + $app_time = $inipay->GetResult('ApplDate').$inipay->GetResult('ApplTime'); + $pay_method = $inipay->GetResult('PayMethod'); + $pay_type = $PAY_METHOD[$pay_method]; + $depositor = iconv_utf8($inipay->GetResult('VACT_InputName')); + $commid = ''; + $mobile_no = $inipay->GetResult('HPP_Num'); + $app_no = $inipay->GetResult('ApplNum'); + $card_name = $CARD_CODE[$inipay->GetResult('CARD_Code')]; + if ($default['de_escrow_use'] == 1) + $escw_yn = 'Y'; + switch($pay_type) { + case '계좌이체': + $bank_name = $BANK_CODE[$inipay->GetResult('ACCT_BankCode')]; + break; + case '가상계좌': + $bankname = $BANK_CODE[$inipay->GetResult('VACT_BankCode')]; + $account = $inipay->GetResult('VACT_Num').' '.iconv_utf8($inipay->GetResult('VACT_Name')); + $app_no = $inipay->GetResult('VACT_Num'); + break; + default: + break; + } +} else { + alert(iconv_utf8($inipay->GetResult("ResultMsg")).' 코드 : '.$inipay->GetResult("ResultCode")); +} + +?> \ No newline at end of file diff --git a/shop/inicis/key/INIpayTest/keypass.enc b/shop/inicis/key/INIpayTest/keypass.enc new file mode 100644 index 000000000..d6583cb9a --- /dev/null +++ b/shop/inicis/key/INIpayTest/keypass.enc @@ -0,0 +1 @@ +pm/4rSNJdLw= diff --git a/shop/inicis/key/INIpayTest/mcert.pem b/shop/inicis/key/INIpayTest/mcert.pem new file mode 100644 index 000000000..00ce5d78a --- /dev/null +++ b/shop/inicis/key/INIpayTest/mcert.pem @@ -0,0 +1,16 @@ +-----BEGIN CERTIFICATE----- +MIICmzCCAgQCAQAwDQYJKoZIhvcNAQEEBQAwgZUxCzAJBgNVBAYTAktSMRUwEwYD +VQQIDAzrjIDtlZzrr7zqta0xDTALBgNVBAcTBG51bGwxGjAYBgNVBAoMESjso7wp +7J2064uI7Iuc7IqkMQswCQYDVQQLEwJFQzETMBEGA1UEAxMKSU5JcGF5VGVzdDEi +MCAGCgmSJomT8ixkAQMUEmx5dGFrNzFAaW5pY2lzLmNvbTAeFw0wNDAzMTUxMDAx +MjNaFw0wNTAzMTUxMDAxMjNaMIGVMQswCQYDVQQGEwJLUjEVMBMGA1UECAwM64yA +7ZWc66+86rWtMQ0wCwYDVQQHEwRudWxsMRowGAYDVQQKDBEo7KO8KeydtOuLiOyL +nOyKpDELMAkGA1UECxMCRUMxEzARBgNVBAMTCklOSXBheVRlc3QxIjAgBgoJkiaJ +k/IsZAEDFBJseXRhazcxQGluaWNpcy5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0A +MIGJAoGBAP6a/WaRyDMxHDgKHtahbZTnv+cayR0b052y2sCAGdgMc6CK0GxyvudV +KR7mltKhexur/ikaPKXXApK+SlXUvwNS7pdQ13BTNCeLlEg0WLjGoVi9n96AcjR/ +QqlmkFaVAQQe9X95uwAcCoIrkErrpFJNPhppTXfsPH8YpzegogPnAgMBAAEwDQYJ +KoZIhvcNAQEEBQADgYEAvmKuNAD7oPxOfRxj1EyBrKt2YdrhzMTvZXz7IIGCeKf0 +tsAKiuxuh20i6zWbD4N+twZvDYG23DFBsLb5Iw3pft5RK9OOVZJ8+ChAaDFHBa4a +RzLDmsdD9NsF7UfYb0KXFUnZMTW5ZKirWUq21MdQiqVNhuLs0zy2hAqABBwhICk= +-----END CERTIFICATE----- diff --git a/shop/inicis/key/INIpayTest/mpriv.pem b/shop/inicis/key/INIpayTest/mpriv.pem new file mode 100644 index 000000000..39f960a71 --- /dev/null +++ b/shop/inicis/key/INIpayTest/mpriv.pem @@ -0,0 +1,18 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,1E6B60D94624128F + ++9VjCYsbhvQIrQVWRmTV1dBc3HpHbjDrnwEu8znuxO9dgN7ZKKahSOo/iZv9tzWr +SpEnbaGiRivO7/jTfJxgcy7wqjV+jYiwpBzL640JdOditUMoIxx3Rzxq+Dheuz13 +1dwt6f3d11zzXjIA5eQQXf1dBTjNCrxhAHqtHccWc5eP1QScQA+KdDAT+vQ6qTVq +aZOI+7BkfWt5YMYBienXwEZSK5ZJ0GU91xSwDApIwsq7E7JGBExPIXGJeZ/RDAVN +sKuO5Ny0JBNJN2Lym39Nb9lF0sKAedMiQNfaEnRqG37fh4H1ONo9NTYilENCIrg6 +tgYw/G9FrY8UvNLBsdUEUSV3bSqlRXZxP2TcPPrpYVbYZ1CQAH3fhVjAo9dpSNeI +KuGv3x+JAkuJ+SjhANUU+ChOm27tF7scUxDTfwzTGfyB3P1UFHDwf0nWMU5cuJRY +1+DLxEVL9FaZmonf5SZdf14Ln8a0cVdm+5rujFpFecSaw9K6gNFUvu6qF6CLx9/O +UgcL90Ga+EvMG1iWyCFGvbr53r4i776JG+rVergIcgT5winvYpKiOS9AOV5NXPPI +ev5PCXmDbnalmK6IrgrV0bAJD3d+NcN9JGFSx+GYKlw4OTrz/hxxuojPW6em4cfi +mEIl5JIiLoC2BqM+Jcs8UMq0TOS8Pcki4O05H9Juws5nh6+d5d2p2BcvkXc+SWF7 +ClfjMZDaniMzPZr1dQj5XFZwptN6jATYL/4u1CpXYKi3N6TwHbOtQD/2l4e+DNPR +JsSAW8ftyLAK0QJUTLhvA9Np9pzmO4hE7LfeRKBKpoU2PwKyXoO+PA== +-----END RSA PRIVATE KEY----- diff --git a/shop/inicis/key/INIpayTest/readme.txt b/shop/inicis/key/INIpayTest/readme.txt new file mode 100644 index 000000000..d7174692a --- /dev/null +++ b/shop/inicis/key/INIpayTest/readme.txt @@ -0,0 +1,10 @@ +Ű ÆÄÀÏ 3°³ - mcert.pem, mpriv.pem, keypass.enc - ¸¦ +"key/{»óÁ¡¾ÆÀ̵ð}/" ·Î º¹»çÇϽÅ ÈÄ ÇÁ·α׷¥ ¼ҽºÀÇ ¼öÁ¤ +»çÇ×À» ¹ݿµÇϽʽÿÀ(¸޴º¾ó ÂüÁ¶). + +»óÁ¡¾ÆÀ̵ð : INIpayTest +ŰÆнº¿öµå : 1111 +»óÁ¡ °ü¸® ½ÎÀÌƮ Æнº¿öµå : 1111 + +»óÁ¡ °ü¸® ½ÎÀÌƮ´Â https://iniweb.inicis.comÀ̸ç, +·α×ÀÎ ¾ÆÀ̵ð´Â »óÁ¡¾ÆÀ̵ðÀԴϴÙ. diff --git a/shop/inicis/key/iniescrow0/keypass.enc b/shop/inicis/key/iniescrow0/keypass.enc new file mode 100644 index 000000000..e4205d8ef --- /dev/null +++ b/shop/inicis/key/iniescrow0/keypass.enc @@ -0,0 +1 @@ +pm/4rSNJdLw= diff --git a/shop/inicis/key/iniescrow0/mcert.pem b/shop/inicis/key/iniescrow0/mcert.pem new file mode 100644 index 000000000..77304aebd --- /dev/null +++ b/shop/inicis/key/iniescrow0/mcert.pem @@ -0,0 +1,17 @@ +-----BEGIN CERTIFICATE----- +MIICnTCCAgYCAQAwDQYJKoZIhvcNAQEEBQAwgZYxCzAJBgNVBAYTAktSMRUwEwYD +VQQIDAzrjIDtlZzrr7zqta0xDTALBgNVBAcTBG51bGwxGjAYBgNVBAoMESjso7wp +7J2064uI7Iuc7IqkMQswCQYDVQQLEwJFQzETMBEGA1UEAxMKaW5pZXNjcm93MDEj +MCEGCgmSJomT8ixkAQMUE2RkYWVtaXJpQGluaWNpcy5jb20wHhcNMDgwMTE2MDQ0 +MTU1WhcNMDkwMTE1MDQ0MTU1WjCBljELMAkGA1UEBhMCS1IxFTATBgNVBAgMDOuM +gO2VnOuvvOq1rTENMAsGA1UEBxMEbnVsbDEaMBgGA1UECgwRKOyjvCnsnbTri4js +i5zsiqQxCzAJBgNVBAsTAkVDMRMwEQYDVQQDEwppbmllc2Nyb3cwMSMwIQYKCZIm +iZPyLGQBAxQTZGRhZW1pcmlAaW5pY2lzLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOB +jQAwgYkCgYEAxElWzHNgDFZpwNvPGbWtA0PKTDPfeP1r7xE/k2n2XMzBFQFxbjSC +EBKbQzFRVbNJv4Jyon/OzlywSR3A1DYMm5Oy9Vh3OOrH2FiYxMXClp7MynnmFEug +ysHuYOHlMnoEfI5k8h9hIXlYbRFDLdY7IxVzqkaYJ37HX01Apuxo8sUCAwEAATAN +BgkqhkiG9w0BAQQFAAOBgQCPrVeBW8+anq3CORMYU5TX1tfrYeCzLFH2hkDJF0Rr +1xWxgjhdFZxtBtYSbxr3UKFe6/EWrlv7k37LoM8ORYcNZun+Rd1jz5xwTOjLBTsd +UGwgUpgBLB1z9GoZgaeJJOm7BFUE0Jp7laI0zWkpWeova2RUT1PODnQMvRNi2d88 +vQ== +-----END CERTIFICATE----- diff --git a/shop/inicis/key/iniescrow0/mpriv.pem b/shop/inicis/key/iniescrow0/mpriv.pem new file mode 100644 index 000000000..ba54f77b2 --- /dev/null +++ b/shop/inicis/key/iniescrow0/mpriv.pem @@ -0,0 +1,18 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,FBB268FC75417BD4 + +G4/3WRZg/9peL3ym0S2LsTWvFkSCT/Co+qcCeKBunQ1UPH/pVyQjW0oxtmjBpBfp +YFNJmc5mEhwV30uKXLEYP6bhpHKlLDQWv926+UBIkSZ4cOkm9JNZUETlb+tlSgIN +i5l5KLaX198rGlQAEYX+TxTaxlfXxoBiXkoqxs64Jn0RApy1SPTXKjLffXHP2Yk5 +q3jOZ4z4REdnmkH5NYuRHz6cyRr4XdmvPFMwBpzOL08go6yToYfYRvyO4hf2T1Kl +ug1ws6e1HNSm1t3PrZP2kj1oIQef80/DQf9eu1mOP0VQD1GlQSydt2+kAdEBba4d +FIlpO3oGCbCB1UhBOBCllFlXvd4sqj1inZhHS/g9R0vAwAPVpsssXYnWL2qnb+zj +gfSyk+ao56sOBIwhyFXX9IdLcFKMGVQDrxZhDxVieStwk9iVK4zGZW+clS+TzFY7 +8qPDP53vXenumSnVq11Mj5gKwJzy40wGm61bQR1B5ldJJW7978Njahh0T0ZCxu48 +n5H0FbVu9wrILehWxEI5IrXAAGbRYDlurSSvHtOX1qL0WvJa4EQD9De3u8kqD3Yx +soKJqII277UQBpPuyyE+eP1F+7i4cQdfCU31sK1LMz/wiJxRrG1CiOpV1FH22ABy +vxAh1gpTRgYHvNVWG37P9rYbrW2UcM4cjhbgOzTLhrThxteAgosaXWowc/lcobSB +G444RQXVPZEetqt2In2kBr7UmE2WuvM0CrC6sD336K2t0q/5HLPLntGozdadZ4F5 +OS8Oi8I9Ygiqwz95JSUaOfETGZ6RpGRJXL9ysimBeEDuQmQ2lxtkZA== +-----END RSA PRIVATE KEY----- diff --git a/shop/inicis/key/iniescrow0/readme.txt b/shop/inicis/key/iniescrow0/readme.txt new file mode 100644 index 000000000..f4b770416 --- /dev/null +++ b/shop/inicis/key/iniescrow0/readme.txt @@ -0,0 +1,19 @@ + +please read this README.TXT file + +ZIP file contains following 3 files. + - mcert.pem + - mpriv.pem + - keypass.enc + +Copy these 3 files to directory [key/iniescrow0]. + +Merchant ID : iniescrow0 +Key Password : 1111 +Admin Password: 1111 + +please visit https://iniweb.inicis.com +for your Merchant Administration. +This site provides your payment transaction details and account details by calculation period. + +You can also log on this site using your Merchant ID(iniescrow0). diff --git a/shop/inicis/key/keypass.enc b/shop/inicis/key/keypass.enc new file mode 100644 index 000000000..e4205d8ef --- /dev/null +++ b/shop/inicis/key/keypass.enc @@ -0,0 +1 @@ +pm/4rSNJdLw= diff --git a/shop/inicis/key/mcert.pem b/shop/inicis/key/mcert.pem new file mode 100644 index 000000000..70baf94e5 --- /dev/null +++ b/shop/inicis/key/mcert.pem @@ -0,0 +1,17 @@ +-----BEGIN CERTIFICATE----- +MIICtDCCAhwCAQAwDQYJKoZIhvcNAQEEBQAwgaExCzAJBgNVBAYTAktSMRUwEwYD +VQQIDAzrjIDtlZzrr7zqta0xDTALBgNVBAcTBG51bGwxJTAjBgNVBAoMHFNL7Luk +666k64uI7LyA7J207IWY7KaIKOyjvCkxCzAJBgNVBAsTAkVDMRMwEQYDVQQDEwpD +eXdvcmxkMDE0MSMwIQYKCZImiZPyLGQBAxQTc3VuZ21vY2tAaW5pY2lzLmNvbTAe +Fw0wNzExMTIwNjExMzBaFw0wODExMTEwNjExMzBaMIGhMQswCQYDVQQGEwJLUjEV +MBMGA1UECAwM64yA7ZWc66+86rWtMQ0wCwYDVQQHEwRudWxsMSUwIwYDVQQKDBxT +S+y7pOuupOuLiOy8gOydtOyFmOymiCjso7wpMQswCQYDVQQLEwJFQzETMBEGA1UE +AxMKQ3l3b3JsZDAxNDEjMCEGCgmSJomT8ixkAQMUE3N1bmdtb2NrQGluaWNpcy5j +b20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAV0zuTBHq1SZWArRHCNz1jlU +WUyTK3Gv6BGq3J6Tly/o6g51Nbjcu2TYMXLIhMgsqDPeJzOnXbSvnh3FWgAMcFm/ +EZEs9oKw+jkiPfIEeSc7KZThqDm1oG4FgJZrXim6Y3jlLLaW1h0WyapCV2u60759 +LX8YzmmFmUuXGZOb5s7DAgMBAAEwDQYJKoZIhvcNAQEEBQADgYIAAN4AumokztkK +z5UBScG4Ccvu3nwcuFlCqzDUm9xnZyfy96RIjTJjVelkLwk6NFPqbDEyDLmHm6fe +Zus+fvZBKQAyHigfuS/RVitcup52OkWCZerbcWsziX8Pzqb/MHu19Elt+y/QYe5x +ysyIsZn47Bp+7kbQtlMjJecXGEFfmoi1 +-----END CERTIFICATE----- diff --git a/shop/inicis/key/mpriv.pem b/shop/inicis/key/mpriv.pem new file mode 100644 index 000000000..3d30395f3 --- /dev/null +++ b/shop/inicis/key/mpriv.pem @@ -0,0 +1,18 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,6B92FB59B7AB8A00 + +NSplji6yUKrk1LXAid9TcBIOSkA+oE+5b52s7GaebioGsGSMIW7RrK8VHWlTOpxs +GnFkTNg3ALZucdhYiAdm6vzaGmmJogoPnmpevs2JIDl3rkgcQH0AVU6nkKg9EcuP +QP/2DknfqzNO46fTMjUIRSrJ7AauDz6836Mm3GVNl7cA42ecM7xHSVK3ZvCvpTrJ +A9ik1zWZbzCIKg/mgMJkHu8xO8K9GKQAY1OM0KxK+oqS/Txmi6RplCHlrTAR+Ahb +J3W8vG3tCu6orlczvPYEnB0a1E/dycDPziBFm6nVAk8cb+yPbZnl/Nqfu6nvPsSx +iJYJR9YZ6L5i/IIhBc8tjNWeDB1KLsXZY41B//D/pjr9nfFUcJex8uPpOA0+GnGz +EhDT8j/WMylgAxKKIYjFqE7HnMQ+n+ZZqLKO6JLdu3HHNz0QC7nz/SZtEMw/of4e +1DlFHDTLTg0vJxwuLSBHVQN3H7SiFbxc/U5UmZEEVPprwbS9m0ok9JmBdfCv8iqu +vuJiYc3HCdJaTRu0U3fJM33yr//BrZxXw0RjABePprcQDf590Vws8tygc/L5voF6 +lw8JYXuWKuRn4soNKwhrLL9YvQ0FNy1ITS2MpKGNYRPp5l3YCKO19y1dLMwrA33k +SL1laFxrXLDaaE7MJZ8VD9hIymnn0aivtJHelW9DNoWJdI/DgTNKRhgT2TWBqR09 +VVCCKF3RLAQMvOFq/49A68px8/xHKxd6pYis/l8BONlZBMYRyIgjZ0IU81pmvHm+ +8UphsgRGx1ZvNtP0ApnTMF9DdpPN6vkxmpDWTe93HWJTp3TV1wyZPA== +-----END RSA PRIVATE KEY----- diff --git a/shop/inicis/key/pgcert.pem b/shop/inicis/key/pgcert.pem new file mode 100644 index 000000000..745cd7c38 --- /dev/null +++ b/shop/inicis/key/pgcert.pem @@ -0,0 +1,21 @@ +-----BEGIN CERTIFICATE----- +MIIDcTCCAtqgAwIBAgIBHjANBgkqhkiG9w0BAQQFADCBiDELMAkGA1UEBhMCS1Ix +DjAMBgNVBAgTBVNlb3VsMRgwFgYDVQQKEw9JbmljaXMgQ28sIEx0ZC4xDzANBgNV +BAsTBklOSXBheTEfMB0GA1UEAxMWSU5JcGF5IFBheW1lbnQgR2F0ZXdheTEdMBsG +CSqGSIb3DQEJARYOZGV2QGluaWNpcy5jb20wHhcNMDcwOTA2MDYxNTI0WhcNMTcw +OTAzMDYxNTI0WjCBiDELMAkGA1UEBhMCS1IxDjAMBgNVBAgTBVNlb3VsMRgwFgYD +VQQKEw9JbmljaXMgQ28sIEx0ZC4xDzANBgNVBAsTBklOSXBheTEfMB0GA1UEAxMW +SU5JcGF5IFBheW1lbnQgR2F0ZXdheTEdMBsGCSqGSIb3DQEJARYOZGV2QGluaWNp +cy5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOC8v1rxqoo7tonq7t4d +c3FVfIlLyA9ku+l9+d5pUQrbiUXDe8NoJZnoSyud4WhOUrN2ZpzNmjGxuPquYrT/ +LkXoR+ib9OAhFBp7izstjHEA+oUNTVO24MRRvOHWWaLrCeTNX9PeaZl9ploojyHc +Uxm5/gIlPEojiaWNc3HVnb55AgMBAAGjgegwgeUwHQYDVR0OBBYEFGgqMfJUMSUQ +pjyGnurepI+NUf6JMIG1BgNVHSMEga0wgaqAFGgqMfJUMSUQpjyGnurepI+NUf6J +oYGOpIGLMIGIMQswCQYDVQQGEwJLUjEOMAwGA1UECBMFU2VvdWwxGDAWBgNVBAoT +D0luaWNpcyBDbywgTHRkLjEPMA0GA1UECxMGSU5JcGF5MR8wHQYDVQQDExZJTklw +YXkgUGF5bWVudCBHYXRld2F5MR0wGwYJKoZIhvcNAQkBFg5kZXZAaW5pY2lzLmNv +bYIBHjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUAA4GBANUj8vYzU2Q9pebQ +yX+6U9e36DeO/+15iDgU2PRK63uPaEa6vMqN2ibI8twolZB2t2oqIRgO44Hf3Nyf +1XKNzCP1eRF1XreGOnrPZtJ5UeUs3RNBqvQkIAdSW80jkXw0i/7i95BYxRIJWSIE +2fLjemy6r8gAQgWRAPv32F0xwRRT +-----END CERTIFICATE----- \ No newline at end of file diff --git a/shop/inicis/key/readme.txt b/shop/inicis/key/readme.txt new file mode 100644 index 000000000..d8d53d59f --- /dev/null +++ b/shop/inicis/key/readme.txt @@ -0,0 +1,19 @@ + +please read this README.TXT file + +ZIP file contains following 3 files. + - mcert.pem + - mpriv.pem + - keypass.enc + +Copy these 3 files to directory [key/Cyworld014]. + +Merchant ID : Cyworld014 +Key Password : 1111 +Admin Password: 1111 + +please visit https://iniweb.inicis.com +for your Merchant Administration. +This site provides your payment transaction details and account details by calculation period. + +You can also log on this site using your Merchant ID(Cyworld014). diff --git a/shop/inicis/key/rndseed.binary b/shop/inicis/key/rndseed.binary new file mode 100644 index 000000000..6d7bc5219 Binary files /dev/null and b/shop/inicis/key/rndseed.binary differ diff --git a/shop/inicis/libs/INICls.php b/shop/inicis/libs/INICls.php new file mode 100644 index 000000000..088d41a57 --- /dev/null +++ b/shop/inicis/libs/INICls.php @@ -0,0 +1,1339 @@ +debug_msg = array("", "CRITICAL", "ERROR", "NOTICE", "4", "INFO", "6", "DEBUG", "8"); + $this->debug_mode = $request["debug"]; + $this->type = $request["type"]; + $this->log = $request["log"]; + $this->homedir = $request["inipayhome"]; + $this->mid = $request["mid"]; + $this->starttime = GetMicroTime(); + $this->mergelog = $request["mergelog"]; + } + + function StartLog() { + if ($this->log == "false") + return true; + + if ($this->type == "chkfake") + $type = "securepay"; + else + $type = $this->type; + if ($this->mergelog == "1") + $logfile = $this->homedir . "/log/" . PROGRAM . "_" . $type . "_mergelog_" . date("ymd") . ".log"; + else + $logfile = $this->homedir . "/log/" . PROGRAM . "_" . $type . "_" . $this->mid . "_" . date("ymd") . ".log"; + $this->handle = fopen($logfile, "a+"); + if (!$this->handle) + return false; + $this->WriteLog(INFO, "START " . PROGRAM . " " . $this->type . " (V" . VERSION . "-" . BUILDDATE . ")(OS:" . php_uname('s') . php_uname('r') . ",PHP:" . phpversion() . ")"); + return true; + } + + function WriteLog($debug, $data) { + if ($this->log == "false" || !$this->handle) + return; + + if (!$this->debug_mode && $debug >= DEBUG) + return; + + $pfx = $this->debug_msg[$debug] . "\t[" . SetTimestamp() . "] <" . getmypid() . "> "; + if (is_array($data)) { + foreach ($data as $key => $val) { + fwrite($this->handle, $pfx . $key . ":" . $val . "\r\n"); + } + } else { + fwrite($this->handle, $pfx . $data . "\r\n"); + } + fflush($this->handle); + } + + function CloseLog($msg) { + if ($this->log == "false") + return; + + $laptime = GetMicroTime() - $this->starttime; + $this->WriteLog(INFO, "END " . $this->type . " " . $msg . " Laptime:[" . round($laptime, 3) . "sec]"); + $this->WriteLog(INFO, "==============================================================="); + fclose($this->handle); + } + +} + +/* ----------------------------------------------------- */ +/* Data Class */ +/* -TID Generate Function */ +/* -Data Encrypt Function */ +/* -Check Field Function */ +/* ----------------------------------------------------- */ + +class INIData { + + //---------------------------- + //Common + //---------------------------- + var $m_Type; + var $m_EscrowType; + var $m_ErrCode; + var $m_ErrMsg; + var $m_EncBody; + var $m_PG1; + var $m_PG2; + var $m_PG1IP; + var $m_PG2IP; + //---------------------------- + //IFD ¿äûÇʵå + //---------------------------- + var $m_sCmd; + var $m_sCrypto; + var $m_sTID; + var $m_sPayMethod; + var $m_MPubSN; + var $m_PIPGPubSN; + var $m_TXPGPubSN; + var $m_TXVersion; + var $m_sMsg; + var $m_sHead; + var $m_sBody; + var $m_sTail; + var $m_sEncrypted; + var $m_sSessionKey; + //---------------------------- + //IFD ÀÀ´äÇì´õ Çʵå + //---------------------------- + var $m_FlgCrypto; + var $m_FlgSign; + var $m_Cmd; + var $m_Body; + //Xml Data + var $m_Xml = array(); + var $m_REQUEST = array(); + var $m_REQUEST2 = array(); //User Defined Entity + var $m_RESULT = array(); //Encrypted Çʵå hash table + var $m_RESULT2 = array(); //PG Added Entity + + function INIData($request, $request2) { + $this->m_Xml = NULL; + + $this->m_REQUEST = $request; + $this->m_REQUEST2 = $request2; + + $this->m_Type = $this->m_REQUEST["type"]; + if ($this->m_Type == TYPE_SECUREPAY || $this->m_Type == TYPE_AUTH) { + $this->m_sCmd = CMD_REQ_PAY; + $this->m_sCrypto = FLAG_CRYPTO_RC4; + } else if ($this->m_Type == TYPE_CANCEL) { + $this->m_sCmd = CMD_REQ_CAN; + $this->m_sCrypto = FLAG_CRYPTO_3DES; + } else if ($this->m_Type == TYPE_INQUIRY) { + $this->m_sCmd = CMS_REQ_INQR; + $this->m_sCrypto = FLAG_CRYPTO_3DES; + } else if ($this->m_Type == TYPE_OPENSUB) { + $this->m_sCmd = CMS_REQ_OPEN_SUB; + $this->m_sCrypto = FLAG_CRYPTO_3DES; + } + //°¡»ó°èÁ ºκÐȯºÒ Ã߰¡ + else if (( $this->m_Type == TYPE_REPAY) || ( $this->m_Type == TYPE_VACCTREPAY)) { + $this->m_sCmd = CMD_REQ_PRTC; + $this->m_sCrypto = FLAG_CRYPTO_3DES; + } else if ($this->m_Type == TYPE_CAPTURE) { + $this->m_sCmd = CMD_REQ_CAP; + $this->m_sCrypto = FLAG_CRYPTO_3DES; + } else if ($this->m_Type == TYPE_ESCROW) { + $this->m_EscrowType = $this->m_REQUEST["escrowtype"]; + if ($this->m_EscrowType == TYPE_ESCROW_DLV) { + $this->m_sCmd = CMD_REQ_DLV; + $this->m_sCrypto = FLAG_CRYPTO_3DES; + } else if ($this->m_EscrowType == TYPE_ESCROW_CNF) { + parse_str($this->m_REQUEST["encrypted"]); + if ($iniescr_type == "1") {//confirm + $this->m_EscrowType = TYPE_ESCROW_CNF; + $this->m_sCmd = CMD_REQ_CNF; + $this->m_sCrypto = FLAG_CRYPTO_RC4; + } else if ($iniescr_type == "2") {//deny + $this->m_EscrowType = TYPE_ESCROW_DNY; + $this->m_sCmd = CMD_REQ_DNY; + $this->m_sCrypto = FLAG_CRYPTO_RC4; + } + } else if ($this->m_EscrowType == TYPE_ESCROW_DNY_CNF) { + $this->m_sCmd = CMD_REQ_DNY_CNF; + $this->m_sCrypto = FLAG_CRYPTO_3DES; + } + } else if ($this->m_Type == TYPE_REFUND) { //°¡»ó°èÁÂȯºÒ(09.08.05) + $this->m_sCmd = CMD_REQ_RFD; + $this->m_sCrypto = FLAG_CRYPTO_3DES; + } else { + $this->m_sCmd = CMD_REQ_PAY; + $this->m_sCrypto = FLAG_CRYPTO_3DES; + } + $this->m_sPayMethod = $this->m_REQUEST["paymethod"]; + + $this->m_TXVersion = sprintf("%-4.4s", VERSION) . + sprintf("B%-6.6s", BUILDDATE) . + sprintf("%-5.5s", $this->m_Type) . + sprintf("%-10.10s", php_uname('s')) . + sprintf("%-3.3s", "PHP") . //modulescript + sprintf("%-10.10s", "chkfake") . //moduledesc + sprintf("%-30.30s", php_uname('r') . "PHP:" . phpversion()) //ETCINFO + ; + } + + function CheckField() { + //--------------------------------- + //°øÅë + //--------------------------------- + if (trim($this->m_REQUEST["inipayhome"]) == "") { + $this->m_ErrCode = NULL_DIR_ERR; + $this->m_ErrMsg = "inipayhome"; + return false; + } + if (trim($this->m_REQUEST["mid"]) == "") { + $this->m_ErrCode = NULL_MID_ERR; + $this->m_ErrMsg = "mid"; + return false; + } + if (trim($this->m_REQUEST["type"]) == "") { + $this->m_ErrCode = NULL_TYPE_ERR; + $this->m_ErrMsg = "type"; + return false; + } + if (trim($this->m_REQUEST["admin"]) == "") { + $this->m_ErrCode = NULL_KEYPW_ERR; + $this->m_ErrMsg = "admin"; + return false; + } + //--------------------------------- + //typeº°·Î + //--------------------------------- + if ($this->m_Type == TYPE_SECUREPAY) { + /* + //delete UIP(2009.01.21) + if( trim($this->m_REQUEST["uip"]) == "") + { + $this->m_ErrCode = NULL_UIP_ERR; + $this->m_ErrMsg = "uip"; + return false; + } + */ + if (trim($this->m_REQUEST["url"]) == "") { + $this->m_ErrCode = NULL_URL_ERR; + $this->m_ErrMsg = "url"; + return false; + } + if (trim($this->m_REQUEST["price"]) == "") { + $this->m_ErrCode = NULL_PRICE_ERR; + $this->m_ErrMsg = "price"; + return false; + } + if (trim($this->m_REQUEST["currency"]) == "") { + $this->m_ErrCode = NULL_CURRENCY_ERR; + $this->m_ErrMsg = "currency"; + return false; + } + if (trim($this->m_REQUEST["paymethod"]) == "") { + $this->m_ErrCode = NULL_PAYMETHOD_ERR; + $this->m_ErrMsg = "paymethod"; + return false; + } + if (trim($this->m_REQUEST["goodname"]) == "") { + $this->m_ErrCode = NULL_GOODNAME_ERR; + $this->m_ErrMsg = "goodname"; + return false; + } + if (trim($this->m_REQUEST["buyername"]) == "") { + $this->m_ErrCode = NULL_BUYERNAME_ERR; + $this->m_ErrMsg = "buyername"; + return false; + } + if (trim($this->m_REQUEST["buyertel"]) == "") { + $this->m_ErrCode = NULL_BUYERTEL_ERR; + $this->m_ErrMsg = "buyertel"; + return false; + } + if (trim($this->m_REQUEST["buyeremail"]) == "") { + $this->m_ErrCode = NULL_BUYEREMAIL_ERR; + $this->m_ErrMsg = "buyeremail"; + return false; + } + if (trim($this->m_REQUEST["sessionkey"]) == "") { + $this->m_ErrCode = NULL_SESSIONKEY_ERR; + $this->m_ErrMsg = "sessionkey"; + return false; + } + if (trim($this->m_REQUEST["encrypted"]) == "") { + $this->m_ErrCode = NULL_ENCRYPTED_ERR; + $this->m_ErrMsg = "encrypted"; + return false; + } + } else if ($this->m_Type == TYPE_CANCEL) { + if (trim($this->m_REQUEST["tid"]) == "") { + $this->m_ErrCode = NULL_TID_ERR; + $this->m_ErrMsg = "tid"; + return false; + } + } + //°¡»ó°èÁ ºκÐȯºҵµ ºκÐȯºÒ ·ÎÁ÷¿¡ Ã߰¡ + else if (( $this->m_Type == TYPE_REPAY ) || ( $this->m_Type == TYPE_VACCTREPAY )) { + if (trim($this->m_REQUEST["oldtid"]) == "") { + $this->m_ErrCode = NULL_TID_ERR; + $this->m_ErrMsg = "oldtid"; + return false; + } + if (trim($this->m_REQUEST["price"]) == "") { + $this->m_ErrCode = NULL_PRICE_ERR; + $this->m_ErrMsg = "price"; + return false; + } + if (trim($this->m_REQUEST["confirm_price"]) == "") { + $this->m_ErrCode = NULL_CONFIRM_PRICE_ERR; + $this->m_ErrMsg = "confirm_price"; + return false; + } + + //°¡»ó°èÁ ºκÐȯºÒ ·ÎÁ÷¿¡¼­´Â °èÁ¶¹øȣ,ÀºÇàÄڵå,°èÁÂÁָíÀÌ Çʼö + if ($this->m_Type == TYPE_VACCTREPAY) { + if (trim($this->m_REQUEST["refundacctnum"]) == "") { + $this->m_ErrCode = NULL_FIELD_REFUNDACCTNUM; + $this->m_ErrMsg = "ȯºҰèÁ¹øȣ"; + return false; + } + if (trim($this->m_REQUEST["refundbankcode"]) == "") { + $this->m_ErrCode = NULL_FIELD_REFUNDBANKCODE; + $this->m_ErrMsg = "ȯºÒÀºÇàÄڵå"; + return false; + } + if (trim($this->m_REQUEST["refundacctname"]) == "") { + $this->m_ErrCode = NULL_FIELD_REFUNDACCTNAME; + $this->m_ErrMsg = "ȯºҰèÁÂÁּº¸í"; + return false; + } + } + } else if ($this->m_Type == TYPE_CHKFAKE) { + if (trim($this->m_REQUEST["nointerest"]) == "") { + $this->m_ErrCode = NULL_NOINTEREST_ERR; + $this->m_ErrMsg = "nointerest"; + return false; + } + if (trim($this->m_REQUEST["quotabase"]) == "") { + $this->m_ErrCode = NULL_QUOTABASE_ERR; + $this->m_ErrMsg = "quotabase"; + return false; + } + } else if ($this->m_Type == TYPE_REFUND) { + if (trim($this->m_REQUEST["tid"]) == "") { + $this->m_ErrCode = NULL_TID_ERR; + $this->m_ErrMsg = "tid"; + return false; + } + if (trim($this->m_REQUEST["racctnum"]) == "") { + $this->m_ErrCode = NULL_FIELD_REFUNDACCTNUM; + $this->m_ErrMsg = "ȯºҰèÁ¹øȣ"; + return false; + } + if (trim($this->m_REQUEST["rbankcode"]) == "") { + $this->m_ErrCode = NULL_FIELD_REFUNDBANKCODE; + $this->m_ErrMsg = "ȯºÒÀºÇàÄڵå"; + return false; + } + if (trim($this->m_REQUEST["racctname"]) == "") { + $this->m_ErrCode = NULL_FIELD_REFUNDACCTNAME; + $this->m_ErrMsg = "ȯºҰèÁÂÁּº¸í"; + return false; + } + } + return true; + } + + function MakeRN() { + list($usec, $sec) = explode(" ", microtime()); + $datestr = date("YmdHis", $sec) . substr($usec, 2, 3); //YYYYMMDDHHMMSSSSS + return Base64Encode($datestr . rand(10000, 99999)); + } + + function MakeTID() { + list($usec, $sec) = explode(" ", microtime()); + $datestr = date("YmdHis", $sec) . substr($usec, 2, 3); //YYYYMMDDHHMMSSSSS + + $datestr_con = substr($datestr, 0, 14) . substr($datestr, 15, 2); //YYYYMMDDHHMMSSxSS Á߰£ÀÇ x°ªÀº ¹ö¸²(milli secondÀÇ ù¹ø° Àڸ®¼ö) + + mt_srand(getmypid() * mt_rand(1, 999)); //mt_rand ÇϱâÀü¿¡ srand ·Î seed Àû¿ë , seed key = pid * mt_rand(1,999) + //pgid + mid + 16Àڸ® ³¯¥¹× ½ð£ + random_key 4Àڸ® (seedÀû¿ë) + $this->m_sTID = $this->m_REQUEST["pgid"] . $this->m_REQUEST["mid"] . $datestr_con . mt_rand(1000, 9999); + if (strlen($this->m_sTID) != TID_LEN) { + return false; + } + $this->m_REQUEST["tid"] = $this->m_sTID; + return true; + } + + function GenRand($length, $nullOk, $ascii = false) { + # mt_srand( 99999 ); + $out = ''; + for ($i = 0; $i < $length; $i++) + $out .= chr(mt_rand($nullOk ? 0 : 1, $ascii ? 127 : 255 )); + return $out; + } + + function MakeEncrypt($INICrypto) { + //generate key/iv + $key = $this->GenRand(MAX_KEY_LEN, true); + $iv = $this->GenRand(MAX_IV_LEN, true); + + //make XML + $xml = new XML(); + if ($this->m_Type == TYPE_FORMPAY) { + + } else if ($this->m_Type == TYPE_RECEIPT) { + $PI = $xml->add_node("", PAYMENTINFO); + $PM = $xml->add_node($PI, PAYMENT); + $CS = $xml->add_node($PM, NM_CSHR); + $PD = $xml->add_node($CS, TX_CSHR_APPLPRICE, $this->m_REQUEST["cr_price"]); + $PD = $xml->add_node($CS, TX_CSHR_SUPPLYPRICE, $this->m_REQUEST["sup_price"]); + $PD = $xml->add_node($CS, TX_CSHR_TAX, $this->m_REQUEST["tax"]); + $PD = $xml->add_node($CS, TX_CSHR_SERVICEPRICE, $this->m_REQUEST["srvc_price"]); + $PD = $xml->add_node($CS, TX_CSHR_TYPE, $this->m_REQUEST["useopt"]); + $PD = $xml->add_node($CS, TX_CSHR_REGNUM, $this->m_REQUEST["reg_num"]); + $PD = $xml->add_node($CS, TX_CSHR_COMPANYNUM, $this->m_REQUEST["companynumber"]); + /* + $PD = $xml->add_node($CS, TX_CSHR_OPENMARKET, $this->m_REQUEST[""] ); + $PD = $xml->add_node($CS, TX_CSHR_SUBCNT, $this->m_REQUEST[""] ); + $PD = $xml->add_node($CS, TX_CSHR_SUBCOMPANYNAME1, $this->m_REQUEST[""] ); + $PD = $xml->add_node($CS, TX_CSHR_SUBCOMPANYNUM1, $this->m_REQUEST[""] ); + $PD = $xml->add_node($CS, TX_CSHR_SUBREGNUM1, $this->m_REQUEST[""] ); + $PD = $xml->add_node($CS, TX_CSHR_SUBMID1, $this->m_REQUEST[""] ); + $PD = $xml->add_node($CS, TX_CSHR_SUBAPPLPRICE1, $this->m_REQUEST[""] ); + $PD = $xml->add_node($CS, TX_CSHR_SUBSERVICEPRICE1, $this->m_REQUEST[""] ); + */ + } else if ($this->m_Type == TYPE_CANCEL) { + $CI = $xml->add_node("", CANCELINFO); + $CD = $xml->add_node($CI, TX_CANCELTID, $this->m_REQUEST["tid"]); + $CD = $xml->add_node($CI, TX_CANCELMSG, $this->m_REQUEST["cancelmsg"], array("urlencode" => "1")); + $CD = $xml->add_node($CI, TX_CANCELREASON, $this->m_REQUEST["cancelcode"]); + $this->AddUserDefinedEntity(CANCELINFO, "", $xml, $CI); + } else if ($this->m_Type == TYPE_REPAY) { + //PartCancelInfo(ROOT) + $CI = $xml->add_node("", PARTCANCELINFO); + $CD = $xml->add_node($CI, TX_PRTC_TID, $this->m_REQUEST["oldtid"]); + $CD = $xml->add_node($CI, TX_PRTC_PRICE, $this->m_REQUEST["price"]); + $CD = $xml->add_node($CI, TX_PRTC_REMAINS, $this->m_REQUEST["confirm_price"]); + $CD = $xml->add_node($CI, TX_PRTC_QUOTA, $this->m_REQUEST["cardquota"]); + $CD = $xml->add_node($CI, TX_PRTC_INTEREST, $this->m_REQUEST["quotainterest"]); + //I°èÁÂÀÌü ±¹¹ÎÀºÇà ºκÐÃë¼ҽà °èÁ¹øȣ °èÁÂÁּº¸íÀ» ¹ÞÀ½ 2011-10-06 + $CD = $xml->add_node($CI, TX_PRTC_NOACCT, $this->m_REQUEST["no_acct"]); + $CD = $xml->add_node($CI, TX_PRTC_NMACCT, $this->m_REQUEST["nm_acct"], array("urlencode" => "1")); + //°ú¼¼,ºñ°ú¼¼ Ã߰¡ 2014-07-23 by jung.ks + //$CD = $xml->add_node($CI, TX_PRTC_TAX, $this->m_REQUEST["tax"] ); + //$CD = $xml->add_node($CI, TX_PRTC_TAXFREE, $this->m_REQUEST["taxfree"] ); + + $this->AddUserDefinedEntity(PARTCANCELINFO, "", $xml, $CI); + } + //°¡»ó°èÁ ºκÐȯºÒ + else if ($this->m_Type == TYPE_VACCTREPAY) { + //PartCancelInfo(ROOT) + $CI = $xml->add_node("", PARTCANCELINFO); + $CD = $xml->add_node($CI, TX_PRTC_TID, $this->m_REQUEST["oldtid"]); + $CD = $xml->add_node($CI, TX_PRTC_PRICE, $this->m_REQUEST["price"]); + $CD = $xml->add_node($CI, TX_PRTC_REMAINS, $this->m_REQUEST["confirm_price"]); + $CD = $xml->add_node($CI, TX_PRTC_QUOTA, $this->m_REQUEST["cardquota"]); + $CD = $xml->add_node($CI, TX_PRTC_INTEREST, $this->m_REQUEST["quotainterest"]); + $CD = $xml->add_node($CI, TX_PRTC_NOACCT, $this->m_REQUEST["refundacctnum"]); + $CD = $xml->add_node($CI, TX_PRTC_NMACCT, $this->m_REQUEST["refundacctname"], array("urlencode" => "1")); + $CD = $xml->add_node($CI, TX_PRTC_REFUNDFLGREMIT, $this->m_REQUEST["refundflgremit"]); + $CD = $xml->add_node($CI, TX_PRTC_REFUNDBANKCODE, $this->m_REQUEST["refundbankcode"]); + $this->AddUserDefinedEntity(PARTCANCELINFO, "", $xml, $CI); + } else if ($this->m_Type == TYPE_CAPTURE) { + $CI = $xml->add_node("", CAPTUREINFO); + $CD = $xml->add_node($CI, TX_CAPTURETID, $this->m_REQUEST["tid"]); + $this->AddUserDefinedEntity(CAPTUREINFO, "", $xml, $CI); + } else if ($this->m_Type == TYPE_ESCROW) { + if ($this->m_EscrowType == TYPE_ESCROW_DLV) { + $EI = $xml->add_node("", ESCROWINFO); + $EC = $xml->add_node($EI, ESCROW_DELIVERY); + $ED = $xml->add_node($EC, "DLV_Oid", $this->m_REQUEST["oid"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_SOid", $this->m_REQUEST["soid"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_Name", $this->m_REQUEST["dlv_name"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_IP", $this->m_REQUEST["dlv_ip"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_MAC", $this->m_REQUEST["dlv_mac"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_Report", $this->m_REQUEST["dlv_report"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_SendName", $this->m_REQUEST["dlv_sendname"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_SendPost", $this->m_REQUEST["dlv_sendpost"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_SendAddr1", $this->m_REQUEST["dlv_sendaddr1"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_SendAddr2", $this->m_REQUEST["dlv_sendaddr2"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_SendTel", $this->m_REQUEST["dlv_sendtel"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_RecvName", $this->m_REQUEST["dlv_recvname"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_RecvPost", $this->m_REQUEST["dlv_recvpost"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_RecvAddr", $this->m_REQUEST["dlv_recvaddr"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_RecvTel", $this->m_REQUEST["dlv_recvtel"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_ExCode", $this->m_REQUEST["dlv_excode"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_ExName", $this->m_REQUEST["dlv_exname"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_Invoice", $this->m_REQUEST["dlv_invoice"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_Charge", $this->m_REQUEST["dlv_charge"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_InvoiceDay", $this->m_REQUEST["dlv_invoiceday"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_GoodsCode", $this->m_REQUEST["dlv_goodscode"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_Goods", $this->m_REQUEST["dlv_goods"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_GoodsCnt", $this->m_REQUEST["dlv_goodscnt"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_Price", $this->m_REQUEST["price"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_Reserved1", $this->m_REQUEST["dlv_reserved1"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_Reserved2", $this->m_REQUEST["dlv_reserved2"], array("urlencode" => "1")); + $ED = $xml->add_node($EC, "DLV_Reserved3", $this->m_REQUEST["dlv_reserved3"], array("urlencode" => "1")); + } else if ($this->m_EscrowType == TYPE_ESCROW_CNF) { + //PluginIn!! + } else if ($this->m_EscrowType == TYPE_ESCROW_DNY) { + //PluginIn!! + } else if ($this->m_EscrowType == TYPE_ESCROW_DNY_CNF) { + $EI = $xml->add_node("", ESCROWINFO); + $EC = $xml->add_node($EI, ESCROW_DENYCONFIRM); + $ED = $xml->add_node($EC, "DCNF_Name", $this->m_REQUEST["dcnf_name"], array("urlencode" => "1")); + } + } else if ($this->m_Type == TYPE_REFUND) { + $CI = $xml->add_node("", CANCELINFO); + $CD = $xml->add_node($CI, TX_CANCELTID, $this->m_REQUEST["tid"]); + $CD = $xml->add_node($CI, TX_CANCELMSG, $this->m_REQUEST["cancelmsg"], array("urlencode" => "1")); + $CD = $xml->add_node($CI, TX_REFUNDACCTNUM, $this->m_REQUEST["racctnum"]); + $CD = $xml->add_node($CI, TX_REFUNDBANKCODE, $this->m_REQUEST["rbankcode"]); + $CD = $xml->add_node($CI, TX_REFUNDACCTNAME, $this->m_REQUEST["racctname"], array("urlencode" => "1")); + $this->AddUserDefinedEntity(CANCELINFO, "", $xml, $CI); + } else if ($this->m_Type == TYPE_INQUIRY) { + $CI = $xml->add_node("", INQUIRYINFO); + $CD = $xml->add_node($CI, TX_INQR_TID, $this->m_REQUEST["tid"]); + //$this->AddUserDefinedEntity( INQUIRYINFO, "", $xml, $CI ); + } else if ($this->m_Type == TYPE_OPENSUB) { + $OI = $xml->add_node("", OPENSUBINFO); + $OD = $xml->add_node($OI, TX_OPENREG_TID, $this->m_REQUEST["oldtid"]); + $OD = $xml->add_node($OI, TX_OPENREG_MID, $this->m_REQUEST["mid"]); + //$this->AddUserDefinedEntity( INQUIRYINFO, "", $xml, $CI ); + } + $this->m_EncBody = $xml->make_xml(); + + //encrypt body by SYMM + if (( $rtv = $INICrypto->SymmEncrypt($this->m_EncBody, $this->m_sEncrypted, $key, $iv)) != OK) + return $rtv; + + //encrypt key/iv by ASYMM + if (!$INICrypto->RSAPGPubEncrypt($key, $this->m_sSessionKey)) + return ENC_RSA_ERR; + + $this->m_sSessionKey = Base64Encode($this->m_sSessionKey . $iv); + + return OK; + } + + function MakeHead() { + $this->m_sHead = sprintf("%05d", strlen($this->m_sBody)); + $this->m_sHead .= sprintf("%05d", strlen($this->m_sTail)); + $this->m_sHead .= sprintf("%s", $this->m_sCrypto); + $this->m_sHead .= sprintf("%5s", FLAG_SIGN_SHA1); + $this->m_sHead .= sprintf("%20s", $this->m_MPubSN); + $this->m_sHead .= sprintf("%20s", $this->m_PIPGPubSN); + $this->m_sHead .= sprintf("%20s", $this->m_TXPGPubSN); + $this->m_sHead .= sprintf("%4s", $this->m_sCmd); + $this->m_sHead .= sprintf("%10s", $this->m_REQUEST["mid"]); + if ($this->m_Type == TYPE_RECEIPT) + $this->m_sHead .= sprintf("%20s", $this->m_REQUEST["cr_price"]); + else + $this->m_sHead .= sprintf("%20s", $this->m_REQUEST["price"]); + $this->m_sHead .= sprintf("%40s", $this->m_REQUEST["tid"]); + + $this->m_sMsg = $this->m_sHead . $this->m_sBody . $this->m_sTail; + return true; + } + + /* + /* Add User Defined Entity + /* Sample + /* $inipay->SetXPath("INIpay/GoodsInfo/UserDefined1","value1"); + /* $inipay->SetXPath("INIpay/GoodsInfo/UserDefined2","value2"); + /* $inipay->SetXPath("INIpay/GoodsInfo/Goods/UserDefined3","value3"); + /* $inipay->SetXPath("INIpay/GoodsInfo/Goods/UserDefined4","value4"); + /* $inipay->SetXPath("INIpay/BuyerInfo/UserDefined5","value5"); + /* $inipay->SetXPath("INIpay/BuyerInfo/UserDefined6","value6"); + /* $inipay->SetXPath("INIpay/PaymentInfo/Payment/UserDefined7","value7"); + /* $inipay->SetXPath("INIpay/PaymentInfo/Payment/UserDefined8","value8"); + /* $inipay->SetXPath("INIpay/ManageInfo/UserDefined9","value9"); + /* $inipay->SetXPath("INIpay/ReservedInfo/UserDefined10","value10"); + */ + + // + function AddUserDefinedEntity($info_node, $downnode, $xml, $upnode) { + foreach ($this->m_REQUEST2 as $key => $val) { + $node = explode('/', $key); + $node_cnt = count($node); + + if ($node_cnt < 3) + continue; //minumum 3 + if ($node[1] != $info_node) + continue; + if ($node_cnt == 3 && $downnode != "") + continue; + if ($node_cnt == 4 && $downnode != $node[2]) + continue; + + $last_node = substr(strrchr($key, '/'), 1); + $xml->add_node($upnode, $last_node, $val, array("urlencode" => "1")); + } + } + + function MakeBody() { + $xml = new XML(); + + //ROOT(INIpay) ROOT¸¦ ROOTINFO·Î ¼öÁ¤ 2011-05-23 + $root = $xml->add_node("", ROOTINFO); + + if ($this->m_Type == TYPE_SECUREPAY || $this->m_Type == TYPE_RECEIPT) { + //GoodsInfo + //Àå¹ٱ¸´Ï ±â´É Ã߰¡(2010.04.13) + //==goodscnt°¡ ¾øÀ» °æ¿ì(Àå¹ٱ¸´Ï ±â´ÉÀÌ ¾ƴҰæ¿ì) ±⺻ °ª 1·Î ¼³Á¤ + $tGoodCnt = ($this->m_REQUEST["goodscnt"] != null && (int) $this->m_REQUEST["goodscnt"] > 0 ) ? $this->m_REQUEST["goodscnt"] : 1; + + $GI = $xml->add_node($root, GOODSINFO); + //Àå¹ٱ¸´Ï ±â´É Ã߰¡(2010.04.13) + //==TX_GOOSCNT´Â $tGoodCnt·Î ºÎÅÍ ÀԷ + //$GP = $xml->add_node($GI, TX_GOOSCNT, "1" ); + $GP = $xml->add_node($GI, TX_GOOSCNT, $tGoodCnt); + $GP = $xml->add_node($GI, TX_MOID, $this->m_REQUEST["oid"], array("urlencode" => "1")); + $GP = $xml->add_node($GI, TX_CURRENCY, $this->m_REQUEST["currency"]); + $GP = $xml->add_node($GI, TX_TAX, $this->m_REQUEST["tax"]); + $GP = $xml->add_node($GI, TX_TAXFREE, $this->m_REQUEST["taxfree"]); + $this->AddUserDefinedEntity(GOODSINFO, "", $xml, $GI); + + //Àå¹ٱ¸´Ï ±â´É Ã߰¡(2010.04.13) [START] + //==Àå¹ٱ¸´Ï XML Àü¹® Ã߰¡ + $iGoodCnt = 1; + while ($iGoodCnt <= $tGoodCnt) { + if ($this->m_REQUEST["smid_" . $iGoodCnt] != "" && strlen($this->m_REQUEST["smid_" . $iGoodCnt]) > 0) { + $GS = $xml->add_node($GI, GOODS); + $GD = $xml->add_node($GS, TX_SMID, $this->m_REQUEST["smid_" . $iGoodCnt]); + $GD = $xml->add_node($GS, TX_GOODSNAME, $this->m_REQUEST["goodsname_" . $iGoodCnt], array("urlencode" => "1")); + $GD = $xml->add_node($GS, TX_GOODSCNTS, $this->m_REQUEST["goodscnts_" . $iGoodCnt]); + if ($this->m_Type == TYPE_SECUREPAY) + $GD = $xml->add_node($GS, TX_GOODSPRICE, $this->m_REQUEST["goodsprice_" . $iGoodCnt]); + if ($this->m_Type == TYPE_RECEIPT) + $GD = $xml->add_node($GS, TX_GOODSPRICE, $this->m_REQUEST["cr_price"]); + } + else { + $GS = $xml->add_node($GI, GOODS); + $GD = $xml->add_node($GS, TX_SMID, $this->m_REQUEST["mid"]); + $GD = $xml->add_node($GS, TX_GOODSNAME, $this->m_REQUEST["goodname"], array("urlencode" => "1")); + + if ($this->m_Type == TYPE_SECUREPAY) + $GD = $xml->add_node($GS, TX_GOODSPRICE, $this->m_REQUEST["price"]); + if ($this->m_Type == TYPE_RECEIPT) + $GD = $xml->add_node($GS, TX_GOODSPRICE, $this->m_REQUEST["cr_price"]); + } + $iGoodCnt++; + } + //Àå¹ٱ¸´Ï ±â´É Ã߰¡(2010.04.13) [END] + + $this->AddUserDefinedEntity(GOODSINFO, GOODS, $xml, $GS); + //BuyerInfo + $BI = $xml->add_node($root, BUYERINFO); + $BP = $xml->add_node($BI, TX_BUYERNAME, $this->m_REQUEST["buyername"], array("urlencode" => "1")); + $BP = $xml->add_node($BI, TX_BUYERTEL, $this->m_REQUEST["buyertel"]); + $BP = $xml->add_node($BI, TX_BUYEREMAIL, $this->m_REQUEST["buyeremail"], array("urlencode" => "1")); + $BP = $xml->add_node($BI, TX_PARENTEMAIL, $this->m_REQUEST["parentemail"], array("urlencode" => "1")); + $BP = $xml->add_node($BI, TX_RECVNAME, $this->m_REQUEST["recvname"], array("urlencode" => "1")); + $BP = $xml->add_node($BI, TX_RECVTEL, $this->m_REQUEST["recvtel"], array("urlencode" => "1")); + $BP = $xml->add_node($BI, TX_RECVMSG, $this->m_REQUEST["recvmsg"], array("urlencode" => "1")); + $BP = $xml->add_node($BI, TX_RECVADDR, $this->m_REQUEST["recvaddr"], array("urlencode" => "1")); + $BP = $xml->add_node($BI, TX_RECVPOSTNUM, $this->m_REQUEST["recvpostnum"], array("urlencode" => "1")); + $this->AddUserDefinedEntity(BUYERINFO, "", $xml, $BI); + //PaymentInfo + $PI = $xml->add_node($root, PAYMENTINFO); + $PM = $xml->add_node($PI, PAYMENT); + $PD = $xml->add_node($PM, TX_PAYMETHOD, $this->m_REQUEST["paymethod"]); + $PD = $xml->add_node($PM, TX_JOINCARD, $this->m_REQUEST["joincard"]); + $PD = $xml->add_node($PM, TX_JOINEXPIRE, $this->m_REQUEST["joinexpire"]); + $PD = $xml->add_node($PM, TX_MAILORDER, $this->m_REQUEST["mailorder"]); + if ($this->m_Type == TYPE_SECUREPAY) { + $PD = $xml->add_node($PM, TX_SESSIONKEY, $this->m_REQUEST["sessionkey"]); + $PD = $xml->add_node($PM, TX_ENCRYPTED, $this->m_REQUEST["encrypted"], array("urlencode" => "1")); + } + if ($this->m_Type == TYPE_RECEIPT) { + $PD = $xml->add_node($PM, TX_SESSIONKEY, $this->m_sSessionKey); + $PD = $xml->add_node($PM, TX_ENCRYPTED, $this->m_sEncrypted); + } + $this->AddUserDefinedEntity(PAYMENTINFO, PAYMENT, $xml, $PM); + } else if ($this->m_Type == TYPE_CANCEL) { + //CancelInfo + $CI = $xml->add_node($root, CANCELINFO); + $CD = $xml->add_node($CI, TX_SESSIONKEY, $this->m_sSessionKey); + $CD = $xml->add_node($CI, TX_ENCRYPTED, $this->m_sEncrypted); + } + //°¡»ó°èÁ ºκÐȯºÒÃ߰¡ + else if (( $this->m_Type == TYPE_REPAY ) || ( $this->m_Type == TYPE_VACCTREPAY )) { + //PartCancelInfo + $CI = $xml->add_node($root, PARTCANCELINFO); + $CD = $xml->add_node($CI, TX_SESSIONKEY, $this->m_sSessionKey); + $CD = $xml->add_node($CI, TX_ENCRYPTED, $this->m_sEncrypted); + if ($this->m_Type == TYPE_REPAY) { + $CIG = $xml->add_node($root, GOODSINFO); + $CDG = $xml->add_node($CIG, TX_PRTC_TAX, $this->m_REQUEST["tax"]); + $CDG = $xml->add_node($CIG, TX_PRTC_TAXFREE, $this->m_REQUEST["taxfree"]); + $CDG = $xml->add_node($CIG, TX_PRTC_CURRENCY, $this->m_REQUEST["currency"]); + } + } else if ($this->m_Type == TYPE_CAPTURE) { + //CaptureInfo + $CI = $xml->add_node($root, CAPTUREINFO); + $CD = $xml->add_node($CI, TX_SESSIONKEY, $this->m_sSessionKey); + $CD = $xml->add_node($CI, TX_ENCRYPTED, $this->m_sEncrypted); + } else if ($this->m_Type == TYPE_ESCROW) { + //EscrowInfo + $CI = $xml->add_node($root, ESCROWINFO); + if ($this->m_EscrowType == TYPE_ESCROW_DLV || $this->m_EscrowType == TYPE_ESCROW_DNY_CNF) { + $CD = $xml->add_node($CI, TX_SESSIONKEY, $this->m_sSessionKey); + $CD = $xml->add_node($CI, TX_ENCRYPTED, $this->m_sEncrypted); + } else if ($this->m_EscrowType == TYPE_ESCROW_CNF || $this->m_EscrowType == TYPE_ESCROW_DNY) { + $CD = $xml->add_node($CI, TX_SESSIONKEY, $this->m_REQUEST["sessionkey"]); + $CD = $xml->add_node($CI, TX_ENCRYPTED, $this->m_REQUEST["encrypted"], array("urlencode" => "1")); + } + } else if ($this->m_Type == TYPE_REFUND) { + //CancelInfo + $CI = $xml->add_node($root, CANCELINFO); + $CD = $xml->add_node($CI, TX_SESSIONKEY, $this->m_sSessionKey); + $CD = $xml->add_node($CI, TX_ENCRYPTED, $this->m_sEncrypted); + } else if ($this->m_Type == TYPE_INQUIRY) { + //CancelInfo + $CI = $xml->add_node($root, INQUIRYINFO); + $CD = $xml->add_node($CI, TX_SESSIONKEY, $this->m_sSessionKey); + $CD = $xml->add_node($CI, TX_ENCRYPTED, $this->m_sEncrypted); + } else if ($this->m_Type == TYPE_OPENSUB) { + //GoodsInfo + //Àå¹ٱ¸´Ï ±â´É Ã߰¡(2010.04.13) + //==goodscnt°¡ ¾øÀ» °æ¿ì(Àå¹ٱ¸´Ï ±â´ÉÀÌ ¾ƴҰæ¿ì) ±⺻ °ª 1·Î ¼³Á¤ + $tSubCnt = ($this->m_REQUEST["subcnt"] != null && (int) $this->m_REQUEST["subcnt"] > 0 ) ? $this->m_REQUEST["subcnt"] : 1; + + $OI = $xml->add_node($root, OPENSUBINFO); + + $OD = $xml->add_node($OI, TX_SESSIONKEY, $this->m_sSessionKey); + $OD = $xml->add_node($OI, TX_ENCRYPTED, $this->m_sEncrypted); + + $OD = $xml->add_node($OI, TX_OPENREG_SUBCNT, $tSubCnt); + + $iSubCnt = 1; + while ($iSubCnt <= $tSubCnt) { + $SG = $xml->add_node($OI, TX_OPENREG_SUBGOODS, "", array("no" => $iSubCnt)); + + $SD = $xml->add_node($SG, TX_OPENREG_SUBCOMPNO, $this->m_REQUEST["subcompno_" . $iSubCnt]); + $SD = $xml->add_node($SG, TX_OPENREG_SUBCOMPNM, $this->m_REQUEST["subcompnm_" . $iSubCnt], array("urlencode" => "1")); + $SD = $xml->add_node($SG, TX_OPENREG_SUBPRSUPPLY, $this->m_REQUEST["subprsupply_" . $iSubCnt]); + $SD = $xml->add_node($SG, TX_OPENREG_SUBPRFREE, $this->m_REQUEST["subprfree_" . $iSubCnt]); + $SD = $xml->add_node($SG, TX_OPENREG_SUBPRTAX, $this->m_REQUEST["subprtax_" . $iSubCnt]); + $SD = $xml->add_node($SG, TX_OPENREG_SUBPRSERVICE, $this->m_REQUEST["subprservice_" . $iSubCnt]); + $SD = $xml->add_node($SG, TX_OPENREG_SUBPRICE, $this->m_REQUEST["subprice_" . $iSubCnt]); + + $iSubCnt++; + } + //Àå¹ٱ¸´Ï ±â´É Ã߰¡(2010.04.13) [END] + $this->AddUserDefinedEntity(OPENSUBINFO, "", $xml, $OI); + } + //ReservedInfo + $RI = $xml->add_node($root, RESERVEDINFO); + $RD = $xml->add_node($RI, TX_MRESERVED1, $this->m_REQUEST["mreserved1"]); + $RD = $xml->add_node($RI, TX_MRESERVED2, $this->m_REQUEST["mreserved2"]); + $RD = $xml->add_node($RI, TX_MRESERVED3, $this->m_REQUEST["mreserved3"]); + $this->AddUserDefinedEntity(RESERVEDINFO, "", $xml, $RI); + + //ManageInfo + $MI = $xml->add_node($root, MANAGEINFO); + $MD = $xml->add_node($MI, TX_LANGUAGE, $this->m_REQUEST["language"]); + $MD = $xml->add_node($MI, TX_URL, $this->m_REQUEST["url"], array("urlencode" => "1")); + $MD = $xml->add_node($MI, TX_TXVERSION, $this->m_TXVersion); + //delete UIP(2009.01.21) + //$MD = $xml->add_node($MI, TX_TXUSERIP, $this->m_REQUEST["uip"] ); + $MD = $xml->add_node($MI, TX_TXUSERID, $this->m_REQUEST["id_customer"], array("urlencode" => "1")); + $MD = $xml->add_node($MI, TX_TXREGNUM, $this->m_REQUEST["id_regnum"]); + + //Ack, rn + if ($this->m_Type == TYPE_SECUREPAY || $this->m_Type == TYPE_OCBSAVE || + $this->m_Type == TYPE_FORMPAY || $this->m_Type == TYPE_RECEIPT + ) { + $MD = $xml->add_node($MI, TX_ACK, "1"); + if ($this->m_REQUEST["rn"] != "") + $MD = $xml->add_node($MI, TX_RN, $this->m_REQUEST["rn"]); + } + $this->AddUserDefinedEntity(MANAGEINFO, "", $xml, $MI); + + $this->m_sBody = $xml->make_xml(); + + return true; + } + + function ParseHead($head) { + $iLen = BODY_LEN + TAIL_LEN; + if (strlen($head) != MSGHEADER_LEN) + return RESULT_MSG_FORMAT_ERR; + + $this->m_FlgCrypto = substr($head, $iLen, FLGCRYPTO_LEN); + $iLen += FLGCRYPTO_LEN; + $this->m_FlgSign = substr($head, $iLen, FLGSIGN_LEN); + $iLen += FLGSIGN_LEN; + $this->m_MPubSN = substr($head, $iLen, MPUBSN_LEN); + $iLen += MPUBSN_LEN; + $this->m_PIPGPubSN = substr($head, $iLen, PIPGPUBSN_LEN); + $iLen += PIPGPUBSN_LEN; + $this->m_TXPGPubSN = substr($head, $iLen, TXPGPUBSN_LEN); + $iLen += TXPGPUBSN_LEN; + $this->m_Cmd = substr($head, $iLen, CMD_LEN); + $iLen += CMD_LEN; + $this->m_RESULT[NM_MID] = substr($head, $iLen, MID_LEN); + $iLen += MID_LEN; + $this->m_RESULT[NM_TOTPRICE] = substr($head, $iLen, TOTPRICE_LEN); + $iLen += TOTPRICE_LEN; + $this->m_RESULT[NM_TID] = substr($head, $iLen, TID_LEN); + + return OK; + } + + function ParseBody($body, &$encrypted, &$sessionkey) { + $xml = new XML(); + if (($rtv = $xml->load_xml("", $body)) != OK) + return $rtv; + + $this->m_Xml = $xml->xml_node; + + //GOODSINFO + $this->m_RESULT[NM_MOID] = $this->GetXMLData(MOID); + + //PAYMENTINFO + //±âŸÁöºҼö´ÜÀÌ paymethod¸¦ ÁÖÁö ¾ʾÆ Àӽ÷Î ¿äû Paymethod·Î ´ëü + //PG¿¡¼­ Áִ PayMethod¿Í ¿äûPaymethod´Â °°´Ù! + $this->m_RESULT[NM_PAYMETHOD] = $this->m_sPayMethod; + + $ResultCode = $this->GetXMLData("ResultCode"); + //if( substr($ResultCode,2, 4) == "0000" ) + if (strcmp(substr($ResultCode, 2, 4), "0000") == 0) { + $this->m_RESULT[NM_RESULTCODE] = "00"; + $this->m_RESULT[NM_RESULTMSG] = $this->GetXMLData("ResultMsg"); + } else { + $this->m_RESULT[NM_RESULTCODE] = "01"; + $this->m_RESULT[NM_ERRORCODE] = $ResultCode; + $this->m_RESULT[NM_RESULTMSG] = "[" . $ResultCode . "|" . $this->GetXMLData("ResultMsg") . "]"; + } + $encrypted = $this->GetXMLData("Encrypted"); + $sessionkey = $this->GetXMLData("SessionKey"); + return OK; + } + + function ParseDecrypt($decrypted) { + $xml = new XML(); + if (($rtv = $xml->load_xml("", $decrypted)) != OK) + return $rtv; + + $this->m_Xml = array_merge($this->m_Xml, $xml->xml_node); + + if ($this->m_Type == TYPE_SECUREPAY || $this->m_Type == TYPE_RECEIPT) { + //½ÂÀγ¯¥(ApplDate), ½ÂÀνð£(ApplTime), ½ÂÀιøȣ(ApplNum)´Â °øÅë!!(OCB, Çö±ݿµ¼öÁõ Á¦¿Ü) + //ISP, CARD´Â CARD·Î assign. °í°´/»óÁ¡Àº ISP°¡ ¹ºÁö, CARD°¡ ¹ºÁö ¾˰Ô ¹¹¾ß!!!-_- + if ($this->m_sPayMethod == NM_TX_CARD) { + $this->m_RESULT[APPLDATE] = $this->GetXMLData(CARD_APPLDATE); + $this->m_RESULT[APPLTIME] = $this->GetXMLData(CARD_APPLTIME); + $this->m_RESULT[APPLNUM] = $this->GetXMLData(CARD_APPLNUM); + $this->m_RESULT[CARD_NUM] = $this->GetXMLData(CARD_NUM); + $this->m_RESULT[CARD_EXPIRE] = $this->GetXMLData(CARD_EXPIRE); + $this->m_RESULT[CARD_BANKCODE] = $this->GetXMLData(CARD_BANKCODE); + $this->m_RESULT[CARD_CODE] = $this->GetXMLData(CARD_CODE); + $this->m_RESULT[CARD_APPLPRICE] = $this->GetXMLData(CARD_APPLPRICE); + $this->m_RESULT[CARD_QUOTA] = $this->GetXMLData(CARD_QUOTA); + $this->m_RESULT[CARD_INTEREST] = $this->GetXMLData(CARD_INTEREST); + $this->m_RESULT[CARD_POINT] = $this->GetXMLData(CARD_POINT); + $this->m_RESULT[CARD_AUTHTYPE] = $this->GetXMLData(CARD_AUTHTYPE); + $this->m_RESULT[CARD_REGNUM] = $this->GetXMLData(CARD_REGNUM); + $this->m_RESULT[CARD_TERMINALNUM] = $this->GetXMLData(CARD_TERMINALNUM); + $this->m_RESULT[CARD_MEMBERNUM] = $this->GetXMLData(CARD_MEMBERNUM); + $this->m_RESULT[CARD_PURCHASECODE] = $this->GetXMLData(CARD_PURCHASECODE); + } else if ($this->m_sPayMethod == NM_TX_ISP) { + $this->m_RESULT[APPLDATE] = $this->GetXMLData(ISP_APPLDATE); + $this->m_RESULT[APPLTIME] = $this->GetXMLData(ISP_APPLTIME); + $this->m_RESULT[APPLNUM] = $this->GetXMLData(ISP_APPLNUM); + $this->m_RESULT[CARD_NUM] = $this->GetXMLData(ISP_CARDNUM); + $this->m_RESULT[CARD_EXPIRE] = $this->GetXMLData(ISP_EXPIRE); + $this->m_RESULT[CARD_BANKCODE] = $this->GetXMLData(ISP_BANKCODE); + $this->m_RESULT[CARD_CODE] = $this->GetXMLData(ISP_CARDCODE); + $this->m_RESULT[CARD_APPLPRICE] = $this->GetXMLData(ISP_APPLPRICE); + $this->m_RESULT[CARD_QUOTA] = $this->GetXMLData(ISP_QUOTA); + $this->m_RESULT[CARD_INTEREST] = $this->GetXMLData(ISP_INTEREST); + $this->m_RESULT[CARD_POINT] = $this->GetXMLData(ISP_POINT); + $this->m_RESULT[CARD_TERMINALNUM] = $this->GetXMLData(ISP_TERMINALNUM); + $this->m_RESULT[CARD_MEMBERNUM] = $this->GetXMLData(ISP_MEMBERNUM); + $this->m_RESULT[CARD_PURCHASECODE] = $this->GetXMLData(ISP_PURCHASECODE); + } else if ($this->m_sPayMethod == NM_TX_CSHR) { + $this->m_RESULT[APPLDATE] = $this->GetXMLData(CSHR_APPLDATE); + $this->m_RESULT[APPLTIME] = $this->GetXMLData(CSHR_APPLTIME); + $this->m_RESULT[APPLNUM] = $this->GetXMLData(CSHR_APPLNUM); + } else if ($this->m_sPayMethod == NM_TX_ACCT) { + $this->m_RESULT[APPLDATE] = $this->GetXMLData(ACCT_APPLDATE); + $this->m_RESULT[APPLTIME] = $this->GetXMLData(ACCT_APPLTIME); + $this->m_RESULT[APPLNUM] = $this->GetXMLData(ACCT_APPLNUM); + } else if ($this->m_sPayMethod == NM_TX_HPP) { + $this->m_RESULT[APPLDATE] = $this->GetXMLData(HPP_APPLDATE); + $this->m_RESULT[APPLTIME] = $this->GetXMLData(HPP_APPLTIME); + $this->m_RESULT[APPLNUM] = $this->GetXMLData(HPP_APPLNUM); + } else if ($this->m_sPayMethod == NM_TX_VACT) { + $this->m_RESULT[APPLDATE] = $this->GetXMLData(VACT_APPLDATE); + $this->m_RESULT[APPLTIME] = $this->GetXMLData(VACT_APPLTIME); + } else if ($this->m_sPayMethod == NM_TX_ARSB) { + $this->m_RESULT[APPLDATE] = $this->GetXMLData(ARSB_APPLDATE); + $this->m_RESULT[APPLTIME] = $this->GetXMLData(ARSB_APPLTIME); + $this->m_RESULT[APPLNUM] = $this->GetXMLData(ARSB_APPLNUM); + } else if ($this->m_sPayMethod == NM_TX_PHNB) { + $this->m_RESULT[APPLDATE] = $this->GetXMLData(PHNB_APPLDATE); + $this->m_RESULT[APPLTIME] = $this->GetXMLData(PHNB_APPLTIME); + $this->m_RESULT[APPLNUM] = $this->GetXMLData(PHNB_APPLNUM); + } else if ($this->m_sPayMethod == NM_TX_CULT) { + $this->m_RESULT[APPLDATE] = $this->GetXMLData(CULT_APPLDATE); + $this->m_RESULT[APPLTIME] = $this->GetXMLData(CULT_APPLTIME); + $this->m_RESULT[APPLNUM] = $this->GetXMLData(CULT_APPLNUM); + } else if ($this->m_sPayMethod == NM_TX_GAMG) { + $this->m_RESULT[APPLDATE] = $this->GetXMLData(GAMG_APPLDATE); + $this->m_RESULT[APPLTIME] = $this->GetXMLData(GAMG_APPLTIME); + $this->m_RESULT[APPLNUM] = $this->GetXMLData(GAMG_APPLNUM); + $this->m_RESULT[GAMG_CNT] = $this->GetXMLData(GAMG_CNT); + //°ÔÀӹ®ȭ»óǰ±ÇÀº Multi°áÁ¦ °¡´É + MakePathGAMG($this->m_RESULT[GAMG_CNT]); + for ($i = 1; $i <= $this->m_RESULT[GAMG_CNT]; $i++) { + $this->m_RESULT[constant("GAMG_NUM$i")] = $this->GetXMLData(constant("GAMG_NUM$i")); + $this->m_RESULT[constant("GAMG_REMAINS$i")] = $this->GetXMLData(constant("GAMG_REMAINS$i")); + $this->m_RESULT[constant("GAMG_ERRMSG$i")] = $this->GetXMLData(constant("GAMG_ERRMSG$i")); + } + $this->m_RESULT[GAMG_APPLPRICE] = $this->GetXMLData(GAMG_APPLPRICE); + $this->m_RESULT[GAMG_NUM] = $this->GetXMLData(GAMG_NUM); + $this->m_RESULT[GAMG_RESULTCODE] = $this->GetXMLData(GAMG_RESULTCODE); + $this->m_RESULT[GAMG_RESULTMSG] = $this->GetXMLData(GAMG_RESULTMSG); + } else if ($this->m_sPayMethod == NM_TX_EDUG) { + $this->m_RESULT[APPLDATE] = $this->GetXMLData(EDUG_APPLDATE); + $this->m_RESULT[APPLTIME] = $this->GetXMLData(EDUG_APPLTIME); + $this->m_RESULT[APPLNUM] = $this->GetXMLData(EDUG_APPLNUM); + } else if ($this->m_sPayMethod == NM_TX_TEEN) { + $this->m_RESULT[APPLDATE] = $this->GetXMLData(TEEN_APPLDATE); + $this->m_RESULT[APPLTIME] = $this->GetXMLData(TEEN_APPLTIME); + $this->m_RESULT[APPLNUM] = $this->GetXMLData(TEEN_APPLNUM); + } + } else if ($this->m_Type == TYPE_INQUIRY) { + $this->m_RESULT[INQR_TID] = $this->GetXMLData(INQR_TID); + $this->m_RESULT[INQR_PRICE] = $this->GetXMLData(INQR_Price); + $this->m_RESULT[INQR_STATUS] = $this->GetXMLData(INQR_Status); + } + + return OK; + } + + function GTHR($err_code, $err_msg) { + //Set + $data["mid"] = $this->m_REQUEST["mid"]; + $data["paymethod"] = $this->m_REQUEST["paymethod"]; + //delete UIP(2009.01.21) + //$data["user_ip"] = $this->m_REQUEST["uip"]; + $data["tx_version"] = $this->m_TXVersion; + $data["err_code"] = $err_code; + $data["err_msg"] = $err_msg; + + // add tid / type (2014-12-09 by jungc) + $data["tid"] = $this->m_sTID; + $data["type"] = $this->m_Type; + + //Send + $qs = "ctype=TX&"; + foreach ($data as $key => $val) + $qs .= $key . '=' . urlencode($val) . '&'; + + $fp = fsockopen(G_SERVER, G_PORT, $errno, $errstr, G_TIMEOUT_CONNECT); + if ($fp) { + $out = "GET " . G_CGI . "?" . $qs . " HTTP/1.0\r\n"; + $out .= "Host: " . G_SERVER . "\r\n"; + $out .= "Connection: Close\r\n\r\n"; + fwrite($fp, $out); + fclose($fp); + } + } + + function ParsePIEncrypted() { + parse_str($this->m_REQUEST["encrypted"]); + $this->m_PIPGPubSN = $CertVer; + $this->m_PG1 = $pg1; + $this->m_PG2 = $pg2; + $this->m_PG1IP = $pg1ip; + $this->m_PG2IP = $pg2ip; + } + + // Xpath·Î ¾Ȱ¡Á®¿´Ù. ÇѴÞÀ» ÇêÁö¶ö ÇߴÙ!! + // added by ddaemiri, 2007.09.03 + function GetXMLData($node) { + $content = $this->m_Xml[$node . "[1]"]["text"]; + if ($this->m_Xml[$node . "[1]"]["attr"]["urlencode"] == "1") + $content = urldecode($content); + return $content; + } + +} + +/* ----------------------------------------------------- */ +/* Crypto Class */ +/* PHP4.2 & OpenSSL Çʿä) */ +/* ----------------------------------------------------- */ + +class INICrypto { + + var $homedir; + var $mid; + var $admin; + var $pgpubkeyid = NULL; + var $mprivkeyid = NULL; + var $mkey; + + function INICrypto($request) { + $this->homedir = $request["inipayhome"]; + $this->mid = $request["mid"]; + $this->admin = $request["admin"]; + $this->mkey = $request["mkey"]; + } + + function LoadPGPubKey(&$pg_pubcert_SN) { + $fp = fopen($this->homedir . "/key/pgcert.pem", "r"); + if (!$fp) + return NULL_PGCERT_FP_ERR; + $pub_key = fread($fp, 8192); + if (!$pub_key) { + fclose($fp); + return NULL_PGCERT_FP_ERR; + } + fclose($fp); + + $this->pgpubkeyid = openssl_get_publickey($pub_key); + if (!$this->pgpubkeyid) + return NULL_PGCERT_ERR; + + $pg_pubcert = openssl_x509_parse($pub_key); + if (!$pg_pubcert) + return NULL_X509_ERR; //The structure of the returned data is (deliberately) not yet documented + $pg_pubcert_SN = $pg_pubcert["serialNumber"]; + + return OK; + } + + function UpdatePGPubKey($pgpubkey) { + $f_org = $this->homedir . "/key/pgcert.pem"; + $f_new = $this->homedir . "/key/.pgcert.pem.tmp"; + $fp = fopen($f_new, "w"); + if (!$fp) + return PGPUB_UPDATE_ERR; + fwrite($fp, $pgpubkey); + fclose($fp); + + //rename + if (!rename($f_new, $f_org)) + return PGPUB_UPDATE_ERR; + return OK; + } + + function LoadMPubKey(&$m_pubcert_SN) { + if ($this->mkey == "1") + $fp = fopen($this->homedir . "/key/mkey/mcert.pem", "r"); + else + $fp = fopen($this->homedir . "/key/" . $this->mid . "/mcert.pem", "r"); + if (!$fp) + return NULL_MCERT_FP_ERR; + $pub_key = fread($fp, 8192); + if (!$pub_key) { + fclose($fp); + return NULL_MCERT_FP_ERR; + } + fclose($fp); + + $m_pubcert = openssl_x509_parse($pub_key); + if (!$m_pubcert) + return NULL_X509_ERR; //The structure of the returned data is (deliberately) not yet documented + $m_pubcert_SN = $m_pubcert["serialNumber"]; + + return OK; + } + + function LoadMPrivKey() { + /* + //get keypw + $fp=fopen( $this->homedir . "/key/" . $this->mid . "/keypass.enc", "r"); + if( !$fp ) return GET_KEYPW_FILE_OPEN_ERR; + $enckey=fread($fp, 8192); + if( !$enckey ) return GET_KEYPW_FILE_OPEN_ERR; + fclose($fp); + if( !$this->SymmDecrypt( base64_decode($enckey), &$keypwd, $this->admin, IV ) ) + return GET_KEYPW_DECRYPT_FINAL_ERR; + */ + $keypwd = $this->admin; + + //load mpriv key + if ($this->mkey == "1") + $fp = fopen($this->homedir . "/key/mkey/mpriv.pem", "r"); + else + $fp = fopen($this->homedir . "/key/" . $this->mid . "/mpriv.pem", "r"); + if (!$fp) + return PRIVKEY_FILE_OPEN_ERR; + $priv_key = fread($fp, 8192); + if (!$priv_key) { + fclose($fp); + return PRIVKEY_FILE_OPEN_ERR; + } + fclose($fp); + $this->mprivkeyid = openssl_get_privatekey($priv_key, $keypwd); + if (!$this->mprivkeyid) + //return INVALID_KEYPASS_ERR; + return GET_KEYPW_DECRYPT_FINAL_ERR; + return OK; + } + + function Sign($body, &$sign) { + if (!openssl_sign($body, $sign, $this->mprivkeyid)) //default:SHA1 + return SIGN_FINAL_ERR; + $sign = Base64Encode($sign); + return OK; + } + + function Verify($body, $tail) { + $rtv = openssl_verify($body, base64_decode($tail), $this->pgpubkeyid); + if (!$rtv) + return SIGN_CHECK_ERR; + return OK; + } + + function Decrypt($sessionkey, $encrypted, &$decrypted) { + $dec_sesskey = base64_decode($sessionkey); + $src = substr($dec_sesskey, 0, strlen($dec_sesskey) - MAX_IV_LEN); + if (!$this->RSAMPrivDecrypt($src, $key)) + return DEC_RSA_ERR; + $iv = substr($dec_sesskey, strlen($dec_sesskey) - MAX_IV_LEN, MAX_IV_LEN); + if (!$this->SymmDecrypt(base64_decode($encrypted), $decrypted, $key, $iv)) + return DEC_FINAL_ERR; + return OK; + } + + function SymmEncrypt($src_data, &$enc_data, $key, $iv) { + $size = mcrypt_get_block_size(MCRYPT_3DES, MCRYPT_MODE_CBC); + $src_data = $this->pkcs5_pad($src_data, $size); + $cipher = mcrypt_module_open(MCRYPT_3DES, '', MCRYPT_MODE_CBC, ''); + mcrypt_generic_init($cipher, $key, $iv); + $enc_data = mcrypt_generic($cipher, $src_data); + mcrypt_generic_deinit($cipher); + mcrypt_module_close($cipher); + + if (!$enc_data) + return ENC_FINAL_ERR; + $enc_data = Base64Encode($enc_data); + + return OK; + } + + function SymmDecrypt($enc_data, &$dec_data, $key, $iv) { + $cipher = mcrypt_module_open(MCRYPT_3DES, '', MCRYPT_MODE_CBC, ''); + mcrypt_generic_init($cipher, $key, $iv); + $dec_data = mdecrypt_generic($cipher, $enc_data); + mcrypt_generic_deinit($cipher); + mcrypt_module_close($cipher); + + if (!$dec_data) + return false; + $dec_data = $this->remove_ctrl($dec_data); + return true; + } + + function RSAMPrivDecrypt($enc_data, &$dec_data) { + return openssl_private_decrypt($enc_data, $dec_data, $this->mprivkeyid); + } + + function RSAMPrivEncrypt($org_data, &$enc_data) { + if (!openssl_private_encrypt($org_data, $enc_data, $this->mprivkeyid)) + return false; + $enc_data = Base64Encode($enc_data); + return true; + } + + function RSAPGPubEncrypt($org_data, &$enc_data) { + return openssl_public_encrypt($org_data, $enc_data, $this->pgpubkeyid); + } + + function FreePubKey() { + if ($this->pgpubkeyid) + openssl_free_key($this->pgpubkeyid); + } + + function FreePrivKey() { + if ($this->mprivkeyid) + openssl_free_key($this->mprivkeyid); + } + + function FreeAllKey() { + $this->FreePubKey(); + $this->FreePrivKey(); + } + + function remove_ctrl($string) { + for ($i = 0; $i < strlen($string); $i++) { + $chr = $string{$i}; + $ord = ord($chr); + if ($ord < 10) + $string{$i} = ""; + else + $string{$i} = $chr; + } + return trim($string); + } + + function pkcs5_pad($text, $blocksize) { + $pad = $blocksize - (strlen($text) % $blocksize); + return $text . str_repeat(chr($pad), $pad); + } + + function pkcs5_unpad($text) { + $pad = ord($text{strlen($text) - 1}); + if ($pad > strlen($text)) + return false; + if (strspn($text, chr($pad), strlen($text) - $pad) != $pad) + return false; + return substr($text, 0, -1 * $pad); + } + + function MakeIMStr($pt, $key) { + if (get_magic_quotes_gpc()) { + $key = stripslashes($key); + $pt = stripslashes($pt); + } + return substr(chunk_split(base64_encode($this->IMstr($key, $pt)), 64, "\n"), 0, -1); + } + + function IMstr($pwd, $data) { + $key[] = ''; + $box[] = ''; + $cipher = ''; + + $pwd_length = strlen($pwd); + $data_length = strlen($data); + + for ($i = 0; $i < 256; $i++) { + $key[$i] = ord($pwd[$i % $pwd_length]); + $box[$i] = $i; + } + for ($j = $i = 0; $i < 256; $i++) { + $j = ($j + $box[$i] + $key[$i]) % 256; + $tmp = $box[$i]; + $box[$i] = $box[$j]; + $box[$j] = $tmp; + } + for ($a = $j = $i = 0; $i < $data_length; $i++) { + $a = ($a + 1) % 256; + $j = ($j + $box[$a]) % 256; + $tmp = $box[$a]; + $box[$a] = $box[$j]; + $box[$j] = $tmp; + $k = $box[(($box[$a] + $box[$j]) % 256)]; + $cipher .= chr(ord($data[$i]) ^ $k); + } + return $cipher; + } + +} +?> + diff --git a/shop/inicis/libs/INIDFN.php b/shop/inicis/libs/INIDFN.php new file mode 100644 index 000000000..b26026231 --- /dev/null +++ b/shop/inicis/libs/INIDFN.php @@ -0,0 +1,671 @@ +5001Àº ¸ÁÃë¼ҽà ¼­¹öÃø¿¡¼­ ¼­¸í¿À·ù°¡ ³²,±׷¡µµ ¸ÁÃë¼Ò󸮴 µÊ) + * @date 2008.03.12 + * @buildno 5016 + * @note pg1ip, pg2ip Ã߰¡/Ãë¼Ò ¿ø°ŷ¡¾øÀ½½Ã drpg·Î Àç½õµ + * @date 2008.04.02 + * @buildno 5017 + * @note 1)chkfake½Ã ÆĶó¹ÌÅÍ ·αë »èÁ¦(Áߺ¹) + * 2)call-time pass-by-reference => pass-by-value·Î ¼öÁ¤ + * @date 2009.01.12 + * @buildno 5019 + * @note delete UIP + * @date 2009.01.21 + * @note add mkey/mergelog ( for Makeshop ) + * @date 2009.02.24 + * @note 1)define MKEY deprecated 2009.02.19 ( Makeshop Ãʱâ Çѹø³ª°¨. ¼­º񽺵ǰí ÀִÂÁö´Â ¸ð¸§) + * 2)Makeshop PG Updrade¿ëÀ¸·Î »õ·γª°¨ 2009.02.19 (interface¿¡¼­ mkey°ªÀ» ¹޾Æ ó¸®ÇϰÔ º¯°æ) + * 3)Makeshop PG Updrade¿ëÀ¸·Î »õ·γª°¨ 2009.02.24 (interface¿¡¼­ mergelog°ªÀ» ¹޾Æ ó¸®ÇϰÔ º¯°æ) + * @date 2009.05.07 + * @note add BUILDDATE in TXVersion + * @date 2009.08.05 + * @buildno 5030 + * @note add vacct refund + * @date 2009.12.16 + * @buildno 5030 + * @note add recv info + * @date 2010.07.14 + * @note add Tax, TaxFree info(TX_TAX, TX_TAXFREE) + * @date 2010.09.09 + * @note Ãë¼ҿäû½Ã PG ¼³Á¤ º¯°æ(µµ¸ÞÀÎ->IP, INILib.php) + * @note BUILDDATE update(100414 -> 100909) + * @note 2011.05.23 5030 XML ELEMENT Áß ROOT ¸¦ ROOTINFO·Î ¼öÁ¤ + * @buildno 5032 + * @note 2012.07.09 °ŷ¡Á¶ȸ Ã߰¡ (TYPE_INQUIRY) + * @note 2012.07.09 PHP ini ÆÄÀÏ error display setting Ã߰¡ + * @buildno 5036 + * @note 2014.12.09 add gather parameter tid, type + */ +ini_set('error_reporting', E_ALL ^ E_NOTICE); +ini_set('display_errors', 'Off'); + +/* GLOBAL */ +define("PROGRAM", "INIPHP"); +define("LANG", "PHP"); +define("VERSION", "5036"); +define("BUILDDATE", "141209"); +define("TID_LEN", 40); +define("MAX_KEY_LEN", 24); +define("MAX_IV_LEN", 8); + +/* TIMEOUT */ +define("TIMEOUT_CONNECT", 5); +define("TIMEOUT_WRITE", 2); +define("TIMEOUT_READ", 20); +define("G_TIMEOUT_CONNECT", 2); +define("DNS_LOOKUP_TIMEOUT", 5); + +/* LOG LEVEL */ +define("CRITICAL", 1); +define("ERROR", 2); +define("NOTICE", 3); +define("INFO", 5); +define("DEBUG", 7); + +/* SERVER INFO */ +define("PG_HOST", "pg.inicis.com"); +define("DRPG_HOST", "drpg.inicis.com"); +define("PG_IP", "203.238.37.3"); +define("DRPG_IP", "211.219.96.180"); +define("PG_PORT", 34049); +define("G_SERVER", "gthr.inicis.com"); +define("G_CGI", "/cgi-bin/g.cgi"); +define("G_PORT", 80); + +define("OK", "0"); + +define("IV", "Initiative Tech"); +define("IMHK", "SFBQSU5JTkZPUk1BVElPTg=="); +define("IMHV", "SU5JQ0lTIENJUEhFUi4uLg=="); +define("IMJK", "UkVHSVNUX05PX1JDNEtFWQ=="); +define("IMJV", "UkVHSVNUX05PX1JDNElW"); + +//define for mkey +//deprecated 2009.02.19 ( Makeshop Ãʱâ Çѹø³ª°¨. ¼­º񽺵ǰí ÀִÂÁö´Â ¸ð¸§) +//Makeshop PG Updrade¿ëÀ¸·Î »õ·γª°¨ 2009.02.19 (interface¿¡¼­ mkey°ªÀ» ¹޾Æ ó¸®ÇϰÔ º¯°æ) +//define("MKEY", 1); +//non block connect immediate return check code/str +define("ERRSTR_INPROGRESS", "Operation now in progress"); +define("ERRCODE_INPROGRESS_LINUX", 115); +define("ERRCODE_INPROGRESS_FREEBSD", 36); +define("ERRCODE_INPROGRESS_WIN", 10035); + +//------------------------------------------------------ +// IFD Header +//------------------------------------------------------ +define("MSGHEADER_LEN", 150); +define("BODY_LEN", 5); +define("TAIL_LEN", 5); +define("FLGCRYPTO_LEN", 1); +define("FLGSIGN_LEN", 5); +define("MPUBSN_LEN", 20); +define("PIPGPUBSN_LEN", 20); +define("TXPGPUBSN_LEN", 20); +define("CMD_LEN", 4); +define("MID_LEN", 10); +define("TOTPRICE_LEN", 20); +define("TID_LEN", 40); + + +//------------------------------------------------------ +// IFD CMD +//------------------------------------------------------ +define("CMD_REQ_PAY", "0200"); +define("CMD_RES_PAY", "0210"); +define("CMD_REQ_CAP", "0300"); +define("CMD_RES_CAP", "0310"); +define("CMD_REQ_CAN", "0420"); +define("CMD_RES_CAN", "0430"); +define("CMD_REQ_NETC", "0520"); +define("CMD_RES_NETC", "0530"); +define("CMD_REQ_PRTC", "0620"); +define("CMD_RES_PRTC", "0630"); +define("CMD_REQ_ACK", "0800"); +define("CMD_RES_ACK", "0810"); +//ÀÚü¿¡½ºũ·Î +//added 2008.01.08 +define("CMD_REQ_DLV", "3020"); //¹è¼۵î·Ï +define("CMD_REQ_CNF", "3030"); //±¸¸ÅȮÀÎ +define("CMD_REQ_DNY", "3040"); //±¸¸ŰÅÀý +define("CMD_REQ_DNY_CNF", "3080"); //°ÅÀýȮÀÎ +define("CMD_REQ_DLV_NETC", "3520"); //¹è¼۵î·ϸÁ»óÃë¼Ò +define("CMD_REQ_CNF_NETC", "3530"); //±¸¸ÅȮÀθÁ»óÃë¼Ò +define("CMD_REQ_DNY_NETC", "3540"); //±¸¸ŰÅÀý¸Á»óÃë¼Ò +//°¡»ó°èÁÂȯºÒ(09.08.05) +define("CMD_REQ_RFD", "0421"); +define("CMD_RES_RFD", "0431"); + +//°ŷ¡Á¶ȸ(12.04.20) +define("CMS_REQ_INQR", "0900"); +define("CMS_RES_INQR", "0910"); + +//¼­ºê¸ôÇÏÀ§°¡¸ÍÁ¡µî·Ï(14.03.06) +define("CMS_REQ_OPEN_SUB", "1040"); +define("CMS_RES_OPEN_SUB", "1041"); + +//------------------------------------------------------ +// HEADER FLAGS +//------------------------------------------------------ +define("FLAG_TEST", "T"); +define("FLAG_REAL", "R"); +define("FLAG_CRYPTO_NONE", "N"); +define("FLAG_CRYPTO_SEED", "S"); +define("FLAG_CRYPTO_RC4", "R"); +define("FLAG_CRYPTO_3DES", "D"); +define("FLAG_SIGN_SHA", "SHA"); +define("FLAG_SIGN_SHA1", "SHA1"); +define("FLAG_SIGN_MD5", "MD5"); + +//------------------------------------------------------ +//TYPE(¼­º񽺺°) +//------------------------------------------------------ +define("TYPE_SECUREPAY", "securepay"); +define("TYPE_CANCEL", "cancel"); +define("TYPE_FORMPAY", "formpay"); +define("TYPE_RECEIPT", "receipt"); +define("TYPE_REPAY", "repay"); +define("TYPE_ESCROW", "escrow"); //ÀÚü¿¡½ºũ·Î! +define("TYPE_CONFIRM", "confirm"); +define("TYPE_OCBQUERY", "ocbquery"); +define("TYPE_OCBSAVE", "ocbsave"); +define("TYPE_OCBPOINT", "OCBPoint"); +define("TYPE_AUTH", "auth"); +define("TYPE_AUTHBILL", "auth_bill"); +define("TYPE_CAPTURE", "capture"); +define("TYPE_CMS", "CMS"); +define("TYPE_VBANK", "VBank"); +define("TYPE_REQREALBILL", "reqrealbill"); +define("TYPE_FORMAUTH", "formauth"); +define("TYPE_CHKFAKE", "chkfake"); +//°¡»ó°èÁÂȯºÒ(09.08.05) +define("TYPE_REFUND", "refund"); +//°¡»ó°èÁºκÐȯºÒ(12.06.05) +define("TYPE_VACCTREPAY", "vacctrepay"); +//°ŷ¡Á¶ȸ(12.04.20) +define("TYPE_INQUIRY", "inquiry"); +//¼­ºê¸ôÇÏÀ§°¡¸ÍÁ¡µî·Ï(14.03.06) +define("TYPE_OPENSUB", "opensub"); +//------------------------------------------------------ +//EscrowType(ÀÚü¿¡½ºũ·Î ŸÀÔ) +//added 2008.01.08 +//------------------------------------------------------ +define("TYPE_ESCROW_DLV", "dlv"); +define("TYPE_ESCROW_CNF", "confirm"); //±¸¸ÅȮÀÎ/°ÅÀý(Ç÷¯±×ÀÎ) +define("TYPE_ESCROW_DNY", "deny"); //À§¿¡¼­ 󸮵Ê,Àǹ̾øÀ½ +define("TYPE_ESCROW_DNY_CNF", "dcnf"); + + +//------------------------------------------------------ +//PayMethod(¼­º񽺺°, TX) +//------------------------------------------------------ +define("NM_TX_ISP", "VCard"); +define("NM_TX_CARD", "Card"); +define("NM_TX_HPP", "HPP"); +define("NM_TX_ACCT", "DirectBank"); +define("NM_TX_VACT", "VBank"); +define("NM_TX_OCB", "OCBPoint"); +define("NM_TX_CSHR", "CASH"); +define("NM_TX_ARSB", "Ars1588Bill"); +define("NM_TX_PHNB", "PhoneBill"); +define("NM_TX_CULT", "Culture"); +define("NM_TX_GAMG", "DGCL"); +define("NM_TX_EDUG", "EDCL"); +define("NM_TX_TEEN", "TEEN"); +define("NM_TX_ESCR", "Escrow"); + +//------------------------------------------------------ +//PayMethod(¼­º񽺺°, PG) +//------------------------------------------------------ +define("NM_ISP", "ISP"); +define("NM_CARD", "CARD"); +define("NM_HPP", "HPP"); +define("NM_ACCT", "ACCT"); +define("NM_VACT", "VACT"); +define("NM_OCB", "OCB"); +define("NM_CSHR", "CASH"); +define("NM_ARSB", "ARSB"); +define("NM_PHNB", "PHNB"); +define("NM_CULT", "CULT"); +define("NM_GAMG", "DGCL"); +define("NM_EDUG", "EDCL"); +define("NM_TEEN", "TEEN"); +define("NM_ESCR", "Escrow"); + +//------------------------------------------------------ +//Charset +//------------------------------------------------------ +define("EUCKR", "EUC-KR"); +define("UTF8", "UTF-8"); + +//------------------------------------------------------ +//URL Encoding/Decoding Name +//------------------------------------------------------ +define("URLENCODE", "urlencode"); +define("URLDECODE", "urldecode"); + +//------------------------------------------------------ +//¿äûÀü¹® +//------------------------------------------------------ +define("TX_GOOSCNT", "GoodsCnt"); +define("TX_MOID", "MOID"); +define("TX_CURRENCY", "Currency"); +define("TX_SMID", "SMID"); +define("TX_GOODSCNTS", "GoodsCnts"); +define("TX_GOODSNAME", "GoodsName"); +define("TX_GOODSPRICE", "GoodsPrice"); +define("TX_BUYERNAME", "BuyerName"); +define("TX_BUYEREMAIL", "BuyerEmail"); +define("TX_BUYERTEL", "BuyerTel"); +define("TX_PARENTEMAIL", "ParentEmail"); +define("TX_RECVNAME", "RecvName"); +define("TX_RECVTEL", "RecvTel"); +define("TX_RECVMSG", "RecvMsg"); +define("TX_RECVADDR", "RecvAddr"); +define("TX_RECVPOSTNUM", "RecvPostNum"); +define("TX_TAXFREE", "TaxFree"); +define("TX_TAX", "Tax"); +//PaymentInfo +define("TX_PAYMETHOD", "PayMethod"); +define("TX_JOINCARD", "JoinCard"); +define("TX_JOINEXPIRE", "JoinExpire"); +define("TX_MAILORDER", "MailOrder"); +define("TX_SESSIONKEY", "SessionKey"); +define("TX_ENCRYPTED", "Encrypted"); +//ReservedInfo +define("TX_MRESERVED1", "MReserved1"); +define("TX_MRESERVED2", "MReserved2"); +define("TX_MRESERVED3", "MReserved3"); +//ManageInfo +define("TX_LANGUAGE", "Language"); +define("TX_URL", "URL"); +define("TX_TXVERSION", "TXVersion"); +define("TX_TXUSERIP", "TXUserIP"); +define("TX_TXUSERID", "TXUserID"); +define("TX_TXREGNUM", "TXRegNum"); +define("TX_ACK", "Ack"); +define("TX_RN", "TXRN"); +//CancelInfo +define("TX_CANCELTID", "CancelTID"); +define("TX_CANCELMSG", "CancelMsg"); +define("TX_CANCELREASON", "CancelReason"); //2012-10-19 Ãë¼һçÀ¯Äڵå Ã߰¡ +//°¡»ó°èÁÂȯºÒ(09.08.05) +define("TX_REFUNDACCTNUM", "RefundAcctNum"); +define("TX_REFUNDBANKCODE", "RefundBankCode"); +define("TX_REFUNDACCTNAME", "RefundAcctName"); +//PartCancelInfo +define("TX_PRTC_TID", "PRTC_TID"); +define("TX_PRTC_PRICE", "PRTC_Price"); +define("TX_PRTC_REMAINS", "PRTC_Remains"); +define("TX_PRTC_QUOTA", "PRTC_Quota"); +define("TX_PRTC_INTEREST", "PRTC_Interest"); +define("TX_PRTC_TAX", "Tax"); +define("TX_PRTC_TAXFREE", "TaxFree"); + +define("TX_PRTC_CURRENCY", "Currency"); + +//±¹¹ÎÀºÇà I°èÁÂÀÌü ºκÐÃë¼ҽà °èÁ¹øȣ/°èÁÂÁּº¸íÃ߰¡ 2011-10-06 +define("TX_PRTC_NOACCT", "PRTC_NoAcctFNBC"); +define("TX_PRTC_NMACCT", "PRTC_NmAcctFNBC"); +//°¡»ó°èÁ ºκÐȯºÒ °ü·Ã Ã߰¡ +define("TX_PRTC_REFUNDFLGREMIT", "PRTC_RefundFlgRemit"); +define("TX_PRTC_REFUNDBANKCODE", "PRTC_RefundBankCode"); +//CaptureInfo +define("TX_CAPTURETID", "CaptureTID"); +//Çö±ݿµ¼öÁõ +define("TX_CSHR_APPLPRICE", "CSHR_ApplPrice"); +define("TX_CSHR_SUPPLYPRICE", "CSHR_SupplyPrice"); +define("TX_CSHR_TAX", "CSHR_Tax"); +define("TX_CSHR_SERVICEPRICE", "CSHR_ServicePrice"); +define("TX_CSHR_REGNUM", "CSHR_RegNum"); +define("TX_CSHR_TYPE", "CSHR_Type"); +define("TX_CSHR_COMPANYNUM", "CSHR_CompanyNum"); +define("TX_CSHR_OPENMARKET", "CSHR_OpenMarket"); +define("TX_CSHR_SUBCNT", "CSHR_SubCnt"); +define("TX_CSHR_SUBCOMPANYNAME1", "CSHR_SubCompanyName1"); +define("TX_CSHR_SUBCOMPANYNUM1", "CSHR_SubCompanyNum1"); +define("TX_CSHR_SUBREGNUM1", "CSHR_SubRegNum1"); +define("TX_CSHR_SUBMID1", "CSHR_SubMID1"); +define("TX_CSHR_SUBAPPLPRICE1", "CSHR_SubApplPrice1"); +define("TX_CSHR_SUBSERVICEPRICE1", "CSHR_SubServicePrice1"); +//°ŷ¡Á¶ȸ(12.04.20) +define("TX_INQR_TID", "INQR_TID"); +//¼­ºê¸ôÇÏÀ§°¡¸ÍÁ¡µî·Ï(14.03.06) +define("TX_OPENREG_TID", "OrgTID"); +define("TX_OPENREG_MID", "MID"); +define("TX_OPENREG_SUBCNT", "SubCnt"); +define("TX_OPENREG_SUBGOODS", "SubGoods"); +define("TX_OPENREG_SUBCOMPNO", "SubCompNo"); +define("TX_OPENREG_SUBCOMPNM", "SubCompNm"); +define("TX_OPENREG_SUBPRSUPPLY", "SubPrSupply"); +define("TX_OPENREG_SUBPRFREE", "SubPrFree"); +define("TX_OPENREG_SUBPRTAX", "SubPrTax"); +define("TX_OPENREG_SUBPRSERVICE", "SubPrService"); +define("TX_OPENREG_SUBPRICE", "SubPrice"); + +//------------------------------------------------------ +// +//ÀÀ´äÀü¹® +// +//------------------------------------------------------ +//HEAD +define("NM_MID", "MID"); +define("NM_TID", "TID"); +define("NM_TOTPRICE", "TotPrice"); + +//BODY +define("NM_GOODSCNT", "GoodsCnt"); +define("NM_MOID", "MOID"); +define("NM_CURRENCY", "Currency"); +define("NM_SMID", "SMID"); +define("NM_GOODSNAME", "GoodsName"); +define("NM_GOODSPRICE", "GoodsPrice"); +define("NM_PAYMETHOD", "PayMethod"); +define("NM_RESULTCODE", "ResultCode"); +define("NM_RESULTERRORCODE", "ResultErrorCode"); +define("NM_RESULTMSG", "ResultMsg"); +define("NM_SESSIONKEY", "SessionKey"); +define("NM_ENCRYPTED", "Encrypted"); +define("NM_CANCELDATE", "CancelDate"); +define("NM_CANCELTIME", "CancelTime"); +define("NM_EVENTCODE", "EventCode"); +define("NM_ORGCURRENCY", "OrgCurrency"); +define("NM_ORGPRICE", "OrgPrice"); +define("NM_EXCHANGERATE", "ExchangeRate"); +define("NM_RESERVEDINFO", "ReservedInfo"); +define("NM_MRESERVED1", "MReserved1"); +define("NM_MRESERVED2", "MReserved2"); +define("NM_MRESERVED3", "MReserved3"); +define("PRTC_TID", "PRTC_TID"); +define("PRTC_PRICE", "PRTC_Price"); +define("PRTC_REMAINS", "PRTC_Remains"); +define("PRTC_QUOTA", "PRTC_Quota"); +define("PRTC_INTEREST", "PRTC_Interest"); +define("PRTC_TYPE", "PRTC_Type"); +define("PRTC_CNT", "PRTC_Cnt"); +define("NM_CAPTUREDATE", "CaptureDate"); +define("NM_CAPTURETIME", "CaptureTime"); + +define("NM_PGPUBKEY", "PGcertKey"); + +//RECV DATA XPATH +//XML XPATH +define("ROOTINFO", "INIpay"); +define("GOODSINFO", "GoodsInfo"); +define("GOODS", "Goods"); +define("BUYERINFO", "BuyerInfo"); +define("PAYMENTINFO", "PaymentInfo"); +define("PAYMENT", "Payment"); +define("MANAGEINFO", "ManageInfo"); +define("RESERVEDINFO", "ReservedInfo"); +//Cancel(NetCancel) +define("CANCELINFO", "CancelInfo"); +//PartCancel Encrypt +define("PARTCANCELINFO", "PartCancelInfo"); +//Capture +define("CAPTUREINFO", "CaptureInfo"); +//°ŷ¡Á¶ȸ(12.04.20) +define("INQUIRYINFO", "InquiryInfo"); +//¼­ºê¸ôÇÏÀ§°¡¸ÍÁ¡µî·Ï(14.03.06) +define("OPENSUBINFO", "OpenSubInfo"); +//Escrow +//added 2008.01.09 +define("ESCROWINFO", "EscrowInfo"); +define("ESCROW_DELIVERY", "Delivery"); +define("ESCROW_CONFIRM", "Confirm"); +define("ESCROW_DENY", "Deny"); +define("ESCROW_DENYCONFIRM", "DenyConfirm"); + + +//------------------------------------------------------ +//Auth Encrypt XPATH +//------------------------------------------------------ +//CARD COMMON +define("APPLDATE", "ApplDate"); +define("APPLTIME", "ApplTime"); +define("APPLNUM", "ApplNum"); +//CARD +define("CARD_NUM", "CARD_Num"); +define("CARD_EXPIRE", "CARD_Expire"); +define("CARD_CODE", "CARD_Code"); +define("CARD_APPLPRICE", "CARD_ApplPrice"); +define("CARD_BANKCODE", "CARD_BankCode"); +define("CARD_QUOTA", "CARD_Quota"); +define("CARD_INTEREST", "CARD_Interest"); +define("CARD_POINT", "CARD_Point"); +define("CARD_AUTHTYPE", "CARD_AuthType"); +define("CARD_REGNUM", "CARD_RegNum"); +define("CARD_APPLDATE", "CARD_ApplDate"); +define("CARD_APPLTIME", "CARD_ApplTime"); +define("CARD_APPLNUM", "CARD_ApplNum"); +define("CARD_RESULTCODE", "CARD_ResultCode"); +define("CARD_RESULTMSG", "CARD_ResultMsg"); +define("CARD_TERMINALNUM", "CARD_TerminalNum"); +define("CARD_MEMBERNUM", "CARD_MemberNum"); +define("CARD_PURCHASECODE", "CARD_PurchaseCode"); +//ISP +define("ISP_BANKCODE", "ISP_BankCode"); +define("ISP_QUOTA", "ISP_Quota"); +define("ISP_INTEREST", "ISP_Interest"); +define("ISP_APPLPRICE", "ISP_ApplPrice"); +define("ISP_CARDCODE", "ISP_CardCode"); +define("ISP_CARDNUM", "ISP_CardNum"); +define("ISP_POINT", "ISP_Point"); +define("ISP_APPLDATE", "ISP_ApplDate"); +define("ISP_APPLTIME", "ISP_ApplTime"); +define("ISP_APPLNUM", "ISP_ApplNum"); +define("ISP_RESULTCODE", "ISP_ResultCode"); +define("ISP_RESULTMSG", "ISP_ResultMsg"); +define("ISP_TERMINALNUM", "ISP_TerminalNum"); +define("ISP_MEMBERNUM", "ISP_MemberNum"); +define("ISP_PURCHASECODE", "ISP_PurchaseCode"); +//ACCT +define("ACCT_APPLDATE", "ACCT_ApplDate"); +define("ACCT_APPLTIME", "ACCT_ApplTime"); +define("ACCT_APPLNUM", "ACCT_ApplNum"); +//HPP +define("HPP_APPLDATE", "HPP_ApplDate"); +define("HPP_APPLTIME", "HPP_ApplTime"); +define("HPP_APPLNUM", "HPP_ApplNum"); +//VACT +define("VACT_APPLDATE", "VACT_ApplDate"); +define("VACT_APPLTIME", "VACT_ApplTime"); +//CASH +define("CSHR_APPLDATE", "CSHR_ApplDate"); +define("CSHR_APPLTIME", "CSHR_ApplTime"); +define("CSHR_APPLNUM", "CSHR_ApplNum"); +//ARSB +define("ARSB_APPLDATE", "ARSB_ApplDate"); +define("ARSB_APPLTIME", "ARSB_ApplTime"); +define("ARSB_APPLNUM", "ARSB_ApplNum"); +//PHNB +define("PHNB_APPLDATE", "PHNB_ApplDate"); +define("PHNB_APPLTIME", "PHNB_ApplTime"); +define("PHNB_APPLNUM", "PHNB_ApplNum"); +//CULT +define("CULT_APPLDATE", "CULT_ApplDate"); +define("CULT_APPLTIME", "CULT_ApplTime"); +define("CULT_APPLNUM", "CULT_ApplNum"); +//DGCL +define("GAMG_CNT", "GAMG_Cnt"); +define("GAMG_APPLDATE", "GAMG_ApplDate"); +define("GAMG_APPLTIME", "GAMG_ApplTime"); +define("GAMG_APPLNUM", "GAMG_ApplNum"); + +function MakePathGAMG($cnt) { + for ($i = 1; $i <= $cnt; $i++) { + define("GAMG_NUM$i", "GAMG_Num$i"); + define("GAMG_REMAINS$i", "GAMG_Remains$i"); + define("GAMG_ERRMSG$i", "GAMG_ErrMsg$i"); + } +} + +//EDUG +define("EDUG_APPLDATE", "EDUG_ApplDate"); +define("EDUG_APPLTIME", "EDUG_ApplTime"); +define("EDUG_APPLNUM", "EDUG_ApplNum"); +//TEEN +define("TEEN_APPLDATE", "TEEN_ApplDate"); +define("TEEN_APPLTIME", "TEEN_ApplTime"); +define("TEEN_APPLNUM", "TEEN_ApplNum"); + +//---------------------------------- +//ERROR CODE +//---------------------------------- +//!!½ÅTX¿¡ Ã߰¡µÈ ¿¡·¯!!! +define("NULL_DIR_ERR", "TX9001"); +define("NULL_TYPE_ERR", "TX9002"); +define("NULL_NOINTEREST_ERR", "TX9003"); +define("NULL_QUOTABASE_ERR", "TX9004"); +define("DNS_LOOKUP_ERR", "TX9005"); +define("MERCHANT_DB_ERR", "TX9006"); +define("DNS_LOOKUP_TIMEOUT_ERR", "TX9007"); +define("PGPUB_UPDATE_ERR", "TX9612"); + +//¾Ϻ¹ȣȭ ¿¡·¯ +define("B64DECODE_UPDATE_ERR", "TX9101"); +define("B64DECODE_FINAL_ERR", "TX9102"); +define("B64DECODE_LENGTH_ERR", "TX9103"); +define("GET_KEYPW_EVP_B2K_ERR", "TX9104"); +define("GET_KEYPW_FILE_OPEN_ERR", "TX9105"); +define("GET_KEYPW_FILE_READ_ERR", "TX9106"); +define("GET_KEYPW_DECRYPT_INIT_ERR", "TX9107"); +define("GET_KEYPW_DECRYPT_UPDATE_ERR", "TX9108"); +define("GET_KEYPW_DECRYPT_FINAL_ERR", "TX9109"); +define("ENC_RAND_BYTES_ERR", "TX9110"); +define("ENC_INIT_ERR", "TX9111"); +define("ENC_UPDATE_ERR", "TX9112"); +define("ENC_FINAL_ERR", "TX9113"); +define("ENC_RSA_ERR", "TX9114"); +define("DEC_RSA_ERR", "TX9115"); +define("DEC_CIPHER_ERR", "TX9116"); +define("DEC_INIT_ERR", "TX9117"); +define("DEC_UPDATE_ERR", "TX9118"); +define("DEC_FINAL_ERR", "TX9119"); +define("SIGN_FINAL_ERR", "TX9120"); +define("SIGN_CHECK_ERR", "TX9121"); +define("ENC_NULL_F_ERR", "TX9122"); +define("ENC_INIT_RAND_ERR", "TX9123"); +define("ENC_PUTENV_ERR", "TX9124"); +//Çʵåüũ +define("NULL_KEYPW_ERR", "TX9201"); +define("NULL_MID_ERR", "TX9202"); +define("NULL_PGID_ERR", "TX9203"); +define("NULL_TID_ERR", "TX9204"); +define("NULL_UIP_ERR", "TX9205"); +define("NULL_URL_ERR", "TX9206"); +define("NULL_PRICE_ERR", "TX9207"); +define("NULL_PRICE1_ERR", "TX9208"); +define("NULL_PRICE2_ERR", "TX9209"); +define("NULL_CARDNUMBER_ERR", "TX9210"); +define("NULL_CARDEXPIRE_ERR", "TX9211"); +define("NULL_ENCRYPTED_ERR", "TX9212"); +define("NULL_CARDQUOTA_ERR", "TX9213"); +define("NULL_QUOTAINTEREST_ERR", "TX9214"); +define("NULL_AUTHENTIFICATION_ERR", "TX9215"); +define("NULL_AUTHFIELD1_ERR", "TX9216"); +define("NULL_AUTHFIELD2_ERR", "TX9217"); +define("NULL_BANKCODE_ERR", "TX9218"); +define("NULL_BANKACCOUNT_ERR", "TX9219"); +define("NULL_REGNUMBER_ERR", "TX9220"); +define("NULL_OCBCARDNUM_ERR", "TX9221"); +define("NULL_OCBPASSWD_ERR", "TX9222"); +define("NULL_PASSWD_ERR", "TX9223"); +define("NULL_CURRENCY_ERR", "TX9224"); +define("NULL_PAYMETHOD_ERR", "TX9225"); +define("NULL_GOODNAME_ERR", "TX9226"); +define("NULL_BUYERNAME_ERR", "TX9227"); +define("NULL_BUYERTEL_ERR", "TX9228"); +define("NULL_BUYEREMAIL_ERR", "TX9229"); +define("NULL_SESSIONKEY_ERR", "TX9230"); +//pg°ø°³Ű ·εå ¿À·ù +define("NULL_PGCERT_FP_ERR", "TX9231"); +define("NULL_X509_ERR", "TX9232"); +define("NULL_PGCERT_ERR", "TX9233"); + +define("RESULT_MSG_FORMAT_ERR", "TX9234"); + +// °¡»ó °èÁ ÀÌü ¿¹¾à +define("NULL_PERNO_ERR", "TX9235"); // Áֹιøȣ ºüÁü +define("NULL_OID_ERR", "TX9236"); // Áֹ®¹øȣ ºüÁü +define("NULL_VCDBANK_ERR", "TX9237"); // ÀºÇàÄڵå ºüÁü +define("NULL_DTINPUT_ERR", "TX9238"); // ÀԱÝ ¿¹Á¤ÀÏ ºüÁü +define("NULL_NMINPUT_ERR", "TX9239"); // ¼۱ÝÀÚ ¼º¸í ºüÁü +//½ǽ𣠺ô¸µ +define("NULL_BILLKEY_ERR", "TX9240"); // ºôŰ ºüÁü +define("NULL_CARDPASS_ERR", "TX9241"); // īµå ºñ¹ø ºüÁü +define("NULL_BILLTYPE_ERR", "TX9242"); // ºôŸÀÔ ´©¶ô +// CMS °èÁÂÀÌü +define("NULL_PRICE_ORG_ERR", "TX9250"); // CMS Ãâ±ÝÃѱݾ× ºüÁü +define("NULL_CMSDAY_ERR", "TX9251"); // CMS Ãâ±ÝÀÏÀÚ ºüÁü +define("NULL_CMSDATEFROM_ERR", "TX9252"); // CMS Ãâ±ݽÃÀۿù ºüÁü +define("NULL_CMSDATETO_ERR", "TX9253"); // CMS Ãâ±ÝÁ¾·á¿ù ºüÁü +// ºκÐÃë¼Ò +define("NULL_CONFIRM_PRICE_ERR", "TX9260"); // Àç½ÂÀÎ ¿äû±ݾ× ´©¶ô ¿¡·¯ +// Çö±ݿµ¼öÁõ ¹ßÇà +define("NULL_CR_PRICE_ERR", "TX9270"); // Çö±ݰáÁ¦ ±ݾ× ºüÁü +define("NULL_SUP_PRICE_ERR", "TX9271"); // °ø±ް¡¾× ºüÁü +define("NULL_TAX_ERR", "TX9272"); // ºΰ¡¼¼ ºüÁü +define("NULL_SRVC_PRICE_ERR", "TX9273"); // ºÀ»ç·á ºüÁü +define("NULL_REG_NUM_ERR", "TX9274"); // Áֹιøȣ(»ç¾÷Àڹøȣ) +define("NULL_USEOPT_ERR", "TX9275"); // Çö±ݿµ¼öÁõ ¿뵵 ±¸ºÐÀÚ ºüÁü + +define("PRIVKEY_FILE_OPEN_ERR", "TX9301"); +define("INVALID_KEYPASS_ERR", "TX9302"); + +define("MAKE_TID_ERR", "TX9401"); +define("ACK_CHECKSUM_ERR", "TX9402"); +define("NETCANCEL_SOCK_CREATE_ERR", "TX9403"); +define("NETCANCEL_SOCK_SEND_ERR", "TX9404"); +define("NETCANCEL_SOCK_RECV_ERR", "TX9405"); +define("LOG_OPEN_ERR", "TX9406"); +define("LOG_WRITE_ERR", "TX9407"); + +define("SOCK_MAKE_EP_ERR", "TX9501"); +define("SOCK_CONN_ERR", "TX9502"); +define("SOCK_SEND1_ERR", "TX9503"); +define("SOCK_SEND2_ERR", "TX9504"); +define("SOCK_CLOSED_BY_PEER_ERR", "TX9505"); +define("SOCK_RECV1_ERR", "TX9506"); +define("SOCK_RECV2_ERR", "TX9507"); +define("SOCK_RECV_LEN_ERR", "TX9508"); +define("SOCK_TIMEO_ERR", "TX9509"); +define("SOCK_ETC1_ERR", "TX9510"); +define("SOCK_ETC2_ERR", "TX9511"); + +define("NULL_ESCROWTYPE_ERR", "TX6000"); +define("NULL_ESCROWMSG_ERR", "TX6001"); + +define("NULL_FIELD_REFUNDACCTNUM", "TX9245"); +define("NULL_FIELD_REFUNDBANKCODE", "TX9243"); +define("NULL_FIELD_REFUNDACCTNAME", "TX9244"); +?> \ No newline at end of file diff --git a/shop/inicis/libs/INILib.php b/shop/inicis/libs/INILib.php new file mode 100644 index 000000000..e8968ad28 --- /dev/null +++ b/shop/inicis/libs/INILib.php @@ -0,0 +1,795 @@ +UnsetField(); + } + + function UnsetField() + { + unset($this->m_REQUEST); + unset($this->m_RESULT); + } + + /*--------------------------------------------------*/ + /* */ + /* °áÁ¦/Ãë¼Ò ¿äû°ª Set or Add */ + /* */ + /*--------------------------------------------------*/ + function SetField( $key, $val ) //Default Entity + { + $this->m_REQUEST[$key] = $val; + } + function SetXPath( $xpath, $val ) //User Defined Entity + { + $this->m_REQUEST2[$xpath] = $val; + } + + /*--------------------------------------------------*/ + /* */ + /* °áÁ¦/Ãë¼Ò °á°ú°ª fetch */ + /* */ + /*--------------------------------------------------*/ + function GetResult( $name ) //Default Entity + { + $result = $this->m_RESULT[$name]; + if( $result == "" ) + $result = $this->m_Data->GetXMLData( $name ); + if( $result == "" ) + $result = $this->m_Data->m_RESULT[$name]; + return $result; + } + + /*--------------------------------------------------*/ + /* */ + /* °áÁ¦/Ãë¼Ò ó¸® ¸ÞÀÎ */ + /* */ + /*--------------------------------------------------*/ + function startAction() + { + + /*--------------------------------------------------*/ + /* Overhead Operation */ + /*--------------------------------------------------*/ + $this->m_Data = new INIData( $this->m_REQUEST, $this->m_REQUEST2 ); + + /*--------------------------------------------------*/ + /* Log Start */ + /*--------------------------------------------------*/ + $this->m_Log = new INILog( $this->m_REQUEST ); + if(!$this->m_Log->StartLog()) + { + $this->MakeTXErrMsg( LOG_OPEN_ERR, "·αׯÄÀÏÀ» ¿­¼ö°¡ ¾ø½À´ϴÙ.[".$this->m_REQUEST["inipayhome"]."]"); + return; + } + + /*--------------------------------------------------*/ + /* Logging Request Parameter */ + /*--------------------------------------------------*/ + $this->m_Log->WriteLog( DEBUG, $this->m_REQUEST ); + + /*--------------------------------------------------*/ + /* Set Type */ + /*--------------------------------------------------*/ + $this->m_type = $this->m_REQUEST["type"]; + + /*--------------------------------------------------*/ + /* Check Field */ + /*--------------------------------------------------*/ + if( !$this->m_Data->CheckField() ) + { + $err_msg = "ÇʼöÇ׸ñ(".$this->m_Data->m_ErrMsg.")ÀÌ ´©¶ôµǾú½À´ϴÙ."; + $this->MakeTXErrMsg( $this->m_Data->m_ErrCode, $err_msg ); + $this->m_Log->WriteLog( ERROR, $err_msg ); + $this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) ); + return; + } + $this->m_Log->WriteLog( INFO, "Check Field OK" ); + + /*--------------------------------------------------*/ + //À¥ÆäÀÌÁöÀ§º¯Á¶¿ë Ű»ý¼º. ¿©±⼭ ³¡!! + /*--------------------------------------------------*/ + if( $this->m_type == TYPE_CHKFAKE ) + { + return $this->MakeChkFake(); + } + + /*--------------------------------------------------*/ + //Generate TID + /*--------------------------------------------------*/ + if( $this->m_type == TYPE_SECUREPAY || $this->m_type == TYPE_FORMPAY || $this->m_type == TYPE_OCBSAVE || + $this->m_type == TYPE_AUTHBILL || $this->m_type == TYPE_FORMAUTH || $this->m_type == TYPE_REQREALBILL || + $this->m_type == TYPE_REPAY || $this->m_type == TYPE_VACCTREPAY || $this->m_type == TYPE_RECEIPT || $this->m_type == TYPE_AUTH + ) + { + if(!$this->m_Data->MakeTID()) + { + $err_msg = "TID»ý¼º¿¡ ½ÇÆÐÇ߽À´ϴÙ.::".$this->m_Data->m_sTID; + $this->m_Log->WriteLog( ERROR, $err_msg ); + $this->MakeTXErrMsg( MAKE_TID_ERR, $err_msg ); + $this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) ); + return; + } + $this->m_Log->WriteLog( INFO, 'Make TID OK '.$this->m_Data->m_sTID ); + } + + $this->m_Crypto = new INICrypto( $this->m_REQUEST ); + + /*--------------------------------------------------*/ + //PI°ø°³Ű ·εå + /*--------------------------------------------------*/ + $this->m_Data->ParsePIEncrypted(); + $this->m_Log->WriteLog( INFO, "PI PUB KEY LOAD OK [".$this->m_Data->m_PIPGPubSN."]" ); + + /*--------------------------------------------------*/ + //PG°ø°³Ű ·εå + /*--------------------------------------------------*/ + if( ($rtv = $this->m_Crypto->LoadPGPubKey( $pg_cert_SN )) != OK) + { + $err_msg = "PG°ø°³Ű ·εå¿À·ù"; + $this->m_Log->WriteLog( ERROR, $err_msg ); + $this->MakeTXErrMsg( $rtv, $err_msg ); + $this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) ); + return; + } + $this->m_Data->m_TXPGPubSN = $pg_cert_SN; + $this->m_Log->WriteLog( INFO, "PG PUB KEY LOAD OK [".$this->m_Data->m_TXPGPubSN."]" ); + + /*--------------------------------------------------*/ + //»óÁ¡°³ÀÎŰ ·εå + /*--------------------------------------------------*/ + if( ($rtv = $this->m_Crypto->LoadMPrivKey()) != OK ) + { + $err_msg = "»óÁ¡°³ÀÎŰ ·εå¿À·ù"; + $this->m_Log->WriteLog( ERROR, $err_msg ); + $this->MakeTXErrMsg( $rtv, $err_msg ); + $this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) ); + $this->m_Crypto->FreePubKey(); + return; + } + $this->m_Log->WriteLog( INFO, "MERCHANT PRIV KEY LOAD OK" ); + + /*--------------------------------------------------*/ + //»óÁ¡ °ø°³Ű ·εå(SN ¸¦ ¾˱âÀ§ÇØ!!) + /*--------------------------------------------------*/ + if( ($rtv = $this->m_Crypto->LoadMPubKey( $m_cert_SN )) != OK) + { + $err_msg = "»óÁ¡°ø°³Ű ·εå¿À·ù"; + $this->m_Log->WriteLog( ERROR, $err_msg ); + $this->MakeTXErrMsg( $rtv, $err_msg ); + $this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) ); + return; + } + $this->m_Data->m_MPubSN = $m_cert_SN; + $this->m_Log->WriteLog( INFO, "MERCHANT PUB KEY LOAD OK [".$this->m_Data->m_MPubSN."]" ); + + /*--------------------------------------------------*/ + //ÆûÆäÀÌ ¾Ïȣȭ( formpay, cancel, repay, recept, inquiry, opensub) + /*--------------------------------------------------*/ + if( $this->m_type == TYPE_CANCEL || $this->m_type == TYPE_REPAY || $this->m_type == TYPE_VACCTREPAY || + $this->m_type == TYPE_FORMPAY || $this->m_type == TYPE_RECEIPT || + $this->m_type == TYPE_CAPTURE || $this->m_type == TYPE_INQUIRY || $this->m_type == TYPE_OPENSUB || + ($this->m_type == TYPE_ESCROW && $this->m_Data->m_EscrowType == TYPE_ESCROW_DLV ) || + ($this->m_type == TYPE_ESCROW && $this->m_Data->m_EscrowType == TYPE_ESCROW_DNY_CNF ) || + $this->m_type == TYPE_REFUND + ) + { + if( ($rtv = $this->m_Data->MakeEncrypt( $this->m_Crypto )) != OK ) + { + $err_msg = "¾Ïȣȭ ¿À·ù"; + $this->m_Log->WriteLog( ERROR, $err_msg ); + $this->MakeTXErrMsg( $rtv, $err_msg ); + $this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) ); + return; + } + //$this->m_Log->WriteLog( DEBUG, "MAKE ENCRYPT OK" ); + $this->m_Log->WriteLog( DEBUG, "MAKE ENCRYPT OK[".$this->m_Data->m_EncBody."]" ); + } + + /*--------------------------------------------------*/ + //Àü¹®»ý¼º(Body) + /*--------------------------------------------------*/ + $this->m_Data->MakeBody(); + $this->m_Log->WriteLog( INFO, "MAKE BODY OK" ); + //$this->m_Log->WriteLog( INFO, "MAKE BODY OK[".$this->m_Data->m_sBody."]" ); + + /*--------------------------------------------------*/ + //¼­¸í(sign) + /*--------------------------------------------------*/ + if( ($rtv = $this->m_Crypto->Sign( $this->m_Data->m_sBody, $sign )) != OK ) + { + $err_msg = "½ÎÀνÇÆÐ"; + $this->m_Log->WriteLog( ERROR, $err_msg ); + $this->MakeTXErrMsg( $rtv, $err_msg ); + $this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) ); + $this->m_Crypto->FreeAllKey(); + return; + } + $this->m_Data->m_sTail = $sign; + $this->m_Log->WriteLog( INFO, "SIGN OK" ); + //$this->m_Log->WriteLog( INFO, "SIGN OK[".$sign."]" ); + + /*--------------------------------------------------*/ + //Àü¹®»ý¼º(Head) + /*--------------------------------------------------*/ + $this->m_Data->MakeHead(); + $this->m_Log->WriteLog( INFO, "MAKE HEAD OK" ); + //$this->m_Log->WriteLog( INFO, "MAKE HEAD OK[".$head."]" ); + + $this->m_Log->WriteLog( INFO, "MSG_TO_PG:[".$this->m_Data->m_sMsg."]" ); + + /*--------------------------------------------------*/ + //¼ÒÄϻý¼º + /*--------------------------------------------------*/ + //DRPG ¼ÂÆÃ, added 07.11.15 + //Ãë¼ҽÃ-PG¼³Á¤ º¯°æ(µµ¸ÞÀÎ->IP), edited 10.09.09 + if( $this->m_type == TYPE_SECUREPAY ) + { + if( $this->m_REQUEST["pgn"] == "" ) + $host = $this->m_Data->m_PG1; + else + $host = $this->m_REQUEST["pgn"]; + } + else + { + if( $this->m_REQUEST["pgn"] == "" ) + { + if( $this->m_cancelRC == 1 ) + $host = DRPG_IP; + else + $host = PG_IP; + } + else + $host = $this->m_REQUEST["pgn"]; + } + + $this->m_Socket = new INISocket($host); + if( ($rtv = $this->m_Socket->DNSLookup()) != OK ) + { + $err_msg = "[".$host."]DNS LOOKUP ½ÇÆÐ(MAIN)".$this->m_Socket->getErr(); + $this->m_Log->WriteLog( ERROR, $err_msg ); + $this->MakeTXErrMsg( $rtv, $err_msg ); + if( $this->m_type == TYPE_SECUREPAY ) //PIÀϰæ¿ì, PI°¡ ³»·ÁÁִ pg1ip·Î! + { + $this->m_Socket->ip = $this->m_Data->m_PG1IP; + } + else + { + if( $this->m_cancelRC == 1 ) + $this->m_Socket->ip = DRPG_IP; + else + $this->m_Socket->ip = PG_IP; + } + } + $this->m_Log->WriteLog( INFO, "DNS LOOKUP OK(".$this->m_Socket->host.":".$this->m_Socket->ip.":".$this->m_Socket->port.") laptime:".$this->m_Socket->dns_laptime ); + if( ($rtv = $this->m_Socket->open()) != OK ) + { + $this->m_Socket->close(); + + //PG2·Î Àüȯ + $err_msg = "[".$host."¼ÒÄϿ¬°á¿À·ù(MAIN)::PG2·Î Àüȯ"; + $this->m_Log->WriteLog( ERROR, $err_msg ); + $this->MakeTXErrMsg( $rtv, $err_msg ); + if( $this->m_type == TYPE_SECUREPAY ) + { + $host = $this->m_Data->m_PG2; + } + else + { + $host = DRPG_HOST; + } + $this->m_Socket = new INISocket($host); + if( ($rtv = $this->m_Socket->DNSLookup()) != OK ) + { + $err_msg = "[".$host."]DNS LOOKUP ½ÇÆÐ(MAIN)".$this->m_Socket->getErr(); + $this->m_Log->WriteLog( ERROR, $err_msg ); + $this->MakeTXErrMsg( $rtv, $err_msg ); + if( $this->m_type == TYPE_SECUREPAY ) //PIÀϰæ¿ì, PI°¡ ³»·ÁÁִ pg2ip·Î! + { + $this->m_Socket->ip = $this->m_Data->m_PG2IP; + } + else + { + $this->m_Socket->ip = DRPG_IP; + } + } + $this->m_Log->WriteLog( INFO, "DNS LOOKUP OK(".$this->m_Socket->host.":".$this->m_Socket->ip.":".$this->m_Socket->port.") laptime:".$this->m_Socket->dns_laptime ); + if( ($rtv = $this->m_Socket->open()) != OK ) + { + $err_msg = "[".$host."¼ÒÄϿ¬°á¿À·ù(MAIN)::".$this->m_Socket->getErr(); + $this->m_Log->WriteLog( ERROR, $err_msg ); + $this->MakeTXErrMsg( $rtv, $err_msg ); + $this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) ); + $this->m_Socket->close(); + $this->m_Crypto->FreeAllKey(); + return; + } + } + $this->m_connIP = $this->m_Socket->ip; + $this->m_Log->WriteLog( INFO, "SOCKET CONNECT OK" ); + + /*--------------------------------------------------*/ + //Àü¹®¼۽Å + /*--------------------------------------------------*/ + if( ($rtv = $this->m_Socket->send($this->m_Data->m_sMsg)) != OK ) + { + $err_msg = "¼ÒÄϼ۽ſÀ·ù(MAIN)::".$this->m_Socket->getErr(); + $this->m_Log->WriteLog( ERROR, $err_msg ); + $this->MakeTXErrMsg( $rtv, $err_msg ); + $this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) ); + $this->m_Crypto->FreeAllKey(); + $this->m_Socket->close(); + return; + } + $this->m_Log->WriteLog( INFO, "SEND OK" ); + + /*--------------------------------------------------*/ + //Àü¹®¼ö½Å + /*--------------------------------------------------*/ + if( ($rtv = $this->m_Socket->recv($head, $body, $tail)) != OK ) + { + $err_msg = "¼ÒÄϼö½ſÀ·ù(MAIN)::".$this->m_Socket->getErr(); + $this->m_Log->WriteLog( ERROR, $err_msg ); + $this->MakeTXErrMsg( $rtv, $err_msg ); + $this->m_Socket->close(); + $this->NetCancel(); + $this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) ); + $this->m_Crypto->FreeAllKey(); + return; + } + $this->m_Log->WriteLog( INFO, "RECV OK" ); + $this->m_Log->WriteLog( INFO, "MSG_FROM_PG:[".$head.$body.$tail."]" ); + $this->m_Data->m_Body = $body; + + /*--------------------------------------------------*/ + //¼­¸íȮÀÎ + /*--------------------------------------------------*/ + if( ($rtv = $this->m_Crypto->Verify( $body, $tail )) != OK ) + { + $err_msg = "VERIFY FAIL"; + $this->m_Log->WriteLog( ERROR, $err_msg ); + $this->MakeTXErrMsg( $rtv, $err_msg ); + $this->m_Socket->close(); + $this->NetCancel(); + $this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) ); + $this->m_Crypto->FreeAllKey(); + return; + } + $this->m_Log->WriteLog( INFO, "VERIFY OK" ); + + /*--------------------------------------------------*/ + //Head ÆĽÌ + /*--------------------------------------------------*/ + if( ($rtv = $this->m_Data->ParseHead( $head )) != OK ) + { + $err_msg = "¼ö½ÅÀü¹®(HEAD) ÆĽÌ ¿À·ù"; + $this->m_Log->WriteLog( ERROR, $err_msg ); + $this->MakeTXErrMsg( $rtv, $err_msg ); + $this->m_Socket->close(); + $this->NetCancel(); + $this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) ); + $this->m_Crypto->FreeAllKey(); + return; + } + $this->m_Log->WriteLog( INFO, "PARSE HEAD OK" ); + + /*--------------------------------------------------*/ + //Body ÆĽÌ + /*--------------------------------------------------*/ + if( ($rtv = $this->m_Data->ParseBody( $body, $encrypted, $sessionkey )) != OK ) + { + $err_msg = "¼ö½ÅÀü¹®(Body) ÆĽÌ ¿À·ù"; + $this->m_Log->WriteLog( ERROR, $err_msg ); + $this->MakeTXErrMsg( $rtv, $err_msg ); + $this->m_Socket->close(); + $this->NetCancel(); + $this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) ); + $this->m_Crypto->FreeAllKey(); + return; + } + $this->m_Log->WriteLog( INFO, "PARSE BODY OK" ); + + /*--------------------------------------------------*/ + //º¹ȣȭ + /*--------------------------------------------------*/ + if( $this->m_type == TYPE_SECUREPAY || $this->m_type == TYPE_FORMPAY || $this->m_type == TYPE_OCBSAVE || + $this->m_type == TYPE_CANCEL || $this->m_type == TYPE_AUTHBILL || $this->m_type == TYPE_FORMAUTH || + $this->m_type == TYPE_REQREALBILL || $this->m_type == TYPE_REPAY || $this->m_type == TYPE_VACCTREPAY || $this->m_type == TYPE_RECEIPT || + $this->m_type == TYPE_AUTH || $this->m_type == TYPE_CAPTURE || $this->m_type == TYPE_ESCROW || + $this->m_type == TYPE_REFUND || $this->m_type == TYPE_INQUIRY || $this->m_type == TYPE_OPENSUB + ) + { + if( ($rtv = $this->m_Crypto->Decrypt( $sessionkey, $encrypted, $decrypted )) != OK ) + { + $err_msg = "º¹ȣȭ ½ÇÆÐ[".$this->GetResult(NM_RESULTMSG)."]"; + $this->m_Log->WriteLog( ERROR, $err_msg ); + $this->MakeTXErrMsg( $rtv, $err_msg ); + $this->m_Socket->close(); + $this->NetCancel(); + $this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) ); + $this->m_Crypto->FreeAllKey(); + return; + } + $this->m_Log->WriteLog( INFO, "DECRYPT OK" ); + $this->m_Log->WriteLog( DEBUG, "DECRYPT MSG:[".$decrypted."]" ); + + //Parse Decrypt + $this->m_Data->ParseDecrypt( $decrypted ); + $this->m_Log->WriteLog( INFO, "DECRYPT PARSE OK" ); + } + + /*--------------------------------------------------*/ + //Assign Interface Variables + /*--------------------------------------------------*/ + $this->m_RESULT = $this->m_Data->m_RESULT; + + /*--------------------------------------------------*/ + //ACK + /*--------------------------------------------------*/ + //if( $this->GetResult(NM_RESULTCODE) == "00" && + if( (strcmp($this->GetResult(NM_RESULTCODE),"00") == 0) && + ( $this->m_type == TYPE_SECUREPAY || $this->m_type == TYPE_OCBSAVE || + $this->m_type == TYPE_FORMPAY || $this->m_type == TYPE_RECEIPT + ) + ) + { + $this->m_Log->WriteLog( INFO, "WAIT ACK INVOKING" ); + if( ($rtv = $this->Ack()) != OK ) + { + //ERROR + $err_msg = "ACK ½ÇÆÐ"; + $this->m_Log->WriteLog( ERROR, $err_msg ); + $this->MakeTXErrMsg( $rtv, $err_msg ); + $this->m_Socket->close(); + $this->NetCancel(); + $this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) ); + $this->m_Crypto->FreeAllKey(); + return; + } + $this->m_Log->WriteLog( INFO, "SUCCESS ACK INVOKING" ); + } + /*--------------------------------------------------*/ + //PG °ø°³Ű°¡ ¹ٲî¾úÀ¸¸é °ø°³Ű UPDATE + /*--------------------------------------------------*/ + $pgpubkey = $this->m_Data->GetXMLData( NM_PGPUBKEY ); + if( $pgpubkey != "" ) + { + if( ($rtv = $this->m_Crypto->UpdatePGPubKey( $pgpubkey )) != OK ) + { + $err_msg = "PG°ø°³Ű ¾÷µ¥ÀÌƮ ½ÇÆÐ"; + $this->m_Log->WriteLog( ERROR, $err_msg ); + $this->m_Data->GTHR( $rtv, $err_msg ); + } + else + $this->m_Log->WriteLog( INFO, "PGPubKey UPDATED!!" ); + } + + $this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) ); + $this->m_Crypto->FreeAllKey(); + $this->m_Socket->close(); + + /*--------------------------------------------------*/ + //Ãë¼ҽÇÆÐ-¿ø°ŷ¡¾øÀ½½ÿ¡ DRPG·Î Àç½õµ + //2008.04.01 + /*--------------------------------------------------*/ + if( $this->GetResult(NM_RESULTCODE) == "01" && ($this->m_type == TYPE_CANCEL || $this->m_type == TYPE_INQUIRY) && $this->m_cancelRC == 0 ) + { + if( intval($this->GetResult(NM_ERRORCODE)) > 400000 && substr( $this->GetResult(NM_ERRORCODE), 3, 3 ) == "623" ) + { + $this->m_cancelRC = 1; + $this->startAction(); + } + } + + return; + + } // End of StartAction + + /*--------------------------------------------------*/ + /* */ + /* À¥ÆäÀÌÁö À§º¯Á¶ ¹æÁö¿ë µ¥ÀÌŸ »ý¼º */ + /* */ + /*--------------------------------------------------*/ + function MakeChkFake() + { + $this->m_Crypto = new INICrypto( $this->m_REQUEST ); + + /*--------------------------------------------------*/ + //»óÁ¡°³ÀÎŰ ·εå + /*--------------------------------------------------*/ + if( ($rtv = $this->m_Crypto->LoadMPrivKey()) != OK ) + { + $err_msg = "»óÁ¡°³ÀÎŰ ·εå¿À·ù"; + $this->m_Log->WriteLog( ERROR, $err_msg ); + $this->MakeTXErrMsg( $rtv, $err_msg ); + $this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) ); + $this->m_Crypto->FreePubKey(); + return; + } + $this->m_Log->WriteLog( INFO, "MERCHANT PRIV KEY LOAD OK" ); + + /*--------------------------------------------------*/ + //»óÁ¡ °ø°³Ű ·εå(SN ¸¦ ¾˱âÀ§ÇØ!!) + /*--------------------------------------------------*/ + if( ($rtv = $this->m_Crypto->LoadMPubKey( $m_cert_SN )) != OK) + { + $err_msg = "»óÁ¡°ø°³Ű ·εå¿À·ù"; + $this->m_Log->WriteLog( ERROR, $err_msg ); + $this->MakeTXErrMsg( $rtv, $err_msg ); + $this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) ); + return; + } + $this->m_Log->WriteLog( INFO, "MERCHANT PUB KEY LOAD OK [".$this->m_Data->m_MPubSN."]" ); + + foreach ($this->m_REQUEST as $key => $val) + { + if( $key == "inipayhome" || $key == "type" || $key == "debug" || + $key == "admin" || $key == "checkopt" || $key == "enctype" ) + continue; + if( $key == "mid" ) + $temp1 .= $key."=".$val."&"; //msg + else + $temp2 .= $key."=".$val."&"; //hashmsg + } + //Make RN + $this->m_RESULT["rn"] = $this->m_Data->MakeRN(); + $temp1 .= "rn=".$this->m_RESULT["rn"]."&"; + + $checkMsg = $temp1; + $checkHashMsg = $temp2; + + $retHashStr = Base64Encode(sha1( $checkHashMsg, TRUE )); + $checkMsg .= "data=".$retHashStr; + + $HashMid = Base64Encode(sha1( $this->m_REQUEST["mid"], TRUE )); + + $this->m_Crypto->RSAMPrivEncrypt( $checkMsg, $RSATemp ); + $this->m_RESULT["encfield"] = "enc=".$RSATemp."&src=".Base64Encode($checkHashMsg); + $this->m_RESULT["certid"] = $HashMid.$m_cert_SN; + + $this->m_Log->WriteLog( INFO, "CHKFAKE KEY MAKE OK:".$this->m_RESULT["rn"] ); + + $this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) ); + $this->m_Crypto->FreeAllKey(); + $this->m_RESULT[NM_RESULTCODE] = "00"; + return; + } + + /*--------------------------------------------------*/ + /* */ + /* °áÁ¦ó¸® ȮÀÎ ¸޼¼Áö Àü¼Û */ + /* */ + /*--------------------------------------------------*/ + function Ack() + { + //ACK¿ë Data + $this->m_Data->m_sBody = ""; + $this->m_Data->m_sTail = ""; + $this->m_Data->m_sCmd = CMD_REQ_ACK; + + //Àü¹®»ý¼º(Head) + $this->m_Data->MakeHead(); + $this->m_Log->WriteLog( DEBUG, "MAKE HEAD OK" ); + //$this->m_Log->WriteLog( DEBUG, "MSG_TO_PG:[".$this->m_Data->m_sMsg."]" ); + + //Send + if( ($rtv = $this->m_Socket->send($this->m_Data->m_sMsg)) != OK ) + { + $err_msg = "ACK Àü¼ۿÀ·ù"; + $this->m_Log->WriteLog( ERROR, $err_msg ); + return ACK_CHECKSUM_ERR; + } + //$this->m_Log->WriteLog( DEBUG, "SEND OK" ); + + if( ($rtv = $this->m_Socket->recv($head, $body, $tail)) != OK ) + { + $err_msg = "ACK ¼ö½ſÀ·ù(ACK)"; + $this->m_Log->WriteLog( ERROR, $err_msg ); + return ACK_CHECKSUM_ERR; + } + //$this->m_Log->WriteLog( DEBUG, "RECV OK" ); + //$this->m_Log->WriteLog( INFO, "MSG_FROM_PG:[".$recv."]" ); + return OK; + } + + /*--------------------------------------------------*/ + /* */ + /* ¸ÁÃë¼Ò ¸޼¼Áö Àü¼Û */ + /* */ + /*--------------------------------------------------*/ + function NetCancel() + { + $this->m_Log->WriteLog( INFO, "WAIT NETCANCEL INVOKING" ); + + if ( $this->m_type == TYPE_CANCEL || $this->m_type == TYPE_REPAY || $this->m_type == TYPE_VACCTREPAY || $this->m_type == TYPE_RECEIPT || + $this->m_type == TYPE_CONFIRM || $this->m_type == TYPE_OCBQUERY || $this->m_type == TYPE_ESCROW || + $this->m_type == TYPE_CAPTURE || $this->m_type == TYPE_AUTH || $this->m_type == TYPE_AUTHBILL || + ($this->m_type == TYPE_ESCROW && $this->m_Data->m_EscrowType == TYPE_ESCROW_DNY_CNF ) || + $this->m_type == TYPE_NETCANCEL + ) + { + $this->m_Log->WriteLog( INFO, "DON'T NEED NETCANCEL" ); + return true; + } + + //NetCancel¿ë Data + $this->m_Data->m_REQUEST["cancelmsg"] = "¸ÁÃë¼Ò"; + $body = ""; + $sign = ""; + + $this->m_Data->m_Type = TYPE_CANCEL; //¸ÁÃë¼Ò Àü¹®Àº Ãë¼ÒÀü¹®°ú °°À½.Çì´õ¸¸Ʋ¸®°í..ÂÁ~ + + //added escrow netcancel, 08.03.11 + if( $this->m_type == TYPE_ESCROW && $this->m_Data->m_EscrowType == TYPE_ESCROW_DLV ) + $this->m_Data->m_sCmd = CMD_REQ_DLV_NETC; + else if($this->m_type == TYPE_ESCROW && $this->m_Data->m_EscrowType == TYPE_ESCROW_CNF ) + $this->m_Data->m_sCmd = CMD_REQ_CNF_NETC; + else if($this->m_type == TYPE_ESCROW && $this->m_Data->m_EscrowType == TYPE_ESCROW_DNY ) + $this->m_Data->m_sCmd = CMD_REQ_DNY_NETC; + else + $this->m_Data->m_sCmd = CMD_REQ_NETC; + + $this->m_Data->m_sCrypto = FLAG_CRYPTO_3DES; + + //¾Ïȣȭ + if( ($rtv = $this->m_Data->MakeEncrypt( $this->m_Crypto )) != OK ) + { + $err_msg = "¾Ïȣȭ ¿À·ù"; + $this->m_Log->WriteLog( ERROR, $err_msg ); + //$this->MakeTXErrMsg( $rtv, $err_msg ); + return; + } + $this->m_Log->WriteLog( DEBUG, "MAKE ENCRYPT OK[".$this->m_Data->m_EncBody."]" ); + + //Àü¹®»ý¼º(Body) + $this->m_Data->MakeBody(); + $this->m_Log->WriteLog( INFO, "MAKE BODY OK" ); + + //¼­¸í(sign) + if( ($rtv = $this->m_Crypto->Sign( $this->m_Data->m_sBody, $sign )) != OK ) + { + $err_msg = "½ÎÀνÇÆÐ"; + $this->m_Log->WriteLog( ERROR, $err_msg ); + //$this->MakeTXErrMsg( $rtv, $err_msg ); + return false; + } + $this->m_Data->m_sTail = $sign; + $this->m_Log->WriteLog( INFO, "SIGN OK" ); + + //Àü¹®»ý¼º(Head) + $this->m_Data->MakeHead(); + $this->m_Log->WriteLog( INFO, "MAKE HEAD OK" ); + + $this->m_Log->WriteLog( DEBUG, "MSG_TO_PG:[".$this->m_Data->m_sMsg."]" ); + + //¼ÒÄϻý¼º + $this->m_Socket = new INISocket(""); + $this->m_Socket->ip = $this->m_connIP; //±âÁ¸¿¬°áµÈ IP »ç¿ë, 08.03.12 + if( ($rtv = $this->m_Socket->open()) != OK ) + { + $err_msg = "[".$this->m_Socket->ip."]¼ÒÄϿ¬°á¿À·ù(NETC)::".$this->m_Socket->getErr(); + $this->m_Log->WriteLog( ERROR, $err_msg ); + //$this->MakeTXErrMsg( $rtv, $err_msg ); + $this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) ); + $this->m_Socket->close(); + $this->m_Crypto->FreeAllKey(); + return; + } + $this->m_Log->WriteLog( INFO, "SOCKET CONNECT OK::".$this->m_Socket->ip ); + + //Àü¹®¼۽Å + if( ($rtv = $this->m_Socket->send($this->m_Data->m_sMsg)) != OK ) + { + $err_msg = "¼ÒÄϼ۽ſÀ·ù(NETC)".$this->m_Socket->getErr(); + $this->m_Log->WriteLog( ERROR, $err_msg ); + //$this->MakeTXErrMsg( $rtv, $err_msg ); + $this->m_Socket->close(); + return false; + } + $this->m_Log->WriteLog( INFO, "SEND OK" ); + + //Àü¹®¼ö½Å + if( ($rtv = $this->m_Socket->recv($head, $body, $tail)) != OK ) + { + $err_msg = "¼ÒÄϼö½ſÀ·ù(NETC)"; + $this->m_Log->WriteLog( ERROR, $err_msg ); + //$this->MakeTXErrMsg( $rtv, $err_msg ); + $this->m_Socket->close(); + return false; + } + $this->m_Log->WriteLog( INFO, "RECV OK" ); + $this->m_Log->WriteLog( DEBUG, "MSG_FROM_PG:[".$head.$body.$tail."]" ); + + //¼­¸íȮÀÎ + if( ($rtv = $this->m_Crypto->Verify( $body, $tail )) != OK ) + { + $err_msg = "VERIFY FAIL"; + $this->m_Log->WriteLog( ERROR, $err_msg ); + //$this->MakeTXErrMsg( $rtv, $err_msg ); + $this->m_Socket->close(); + return false; + } + $this->m_Log->WriteLog( INFO, "VERIFY OK" ); + + //ÀÌÇÏ Çì´õ³ª º»¹®Àº ÆĽÌÇÏÁö ¾ʴ´Ù!!!! + //±׳É ¿©±⼭ ³¡³»ÀÚ ÇǰïÇϴÙ.-_-;; + //Head ÆĽÌ + if( ($rtv = $this->m_Data->ParseHead( $head )) != OK ) + { + $err_msg = "¼ö½ÅÀü¹®(HEAD) ÆĽÌ ¿À·ù"; + $this->m_Log->WriteLog( ERROR, $err_msg ); + //$this->MakeTXErrMsg( $rtv, $err_msg ); + $this->m_Socket->close(); + return; + } + //Body ÆĽÌ + if( ($rtv = $this->m_Data->ParseBody( $body, $encrypted, $sessionkey )) != OK ) + { + $err_msg = "¼ö½ÅÀü¹®(Body) ÆĽÌ ¿À·ù"; + $this->m_Log->WriteLog( ERROR, $err_msg ); + //$this->MakeTXErrMsg( $rtv, $err_msg ); + $this->m_Socket->close(); + return; + } + + //if( $this->GetResult(NM_RESULTCODE) == "00" ) + if(strcmp($this->GetResult(NM_RESULTCODE),"00") == 0) + $this->m_Log->WriteLog( INFO, "SUCCESS NETCANCEL" ); + else + $this->m_Log->WriteLog( ERROR, "ERROR NETCANCEL[".$this->GetResult(NM_RESULTMSG)."]" ); + return true; + } + + function MakeIMStr($s, $t) + { + $this->m_Crypto = new INICrypto( $this->m_REQUEST ); + if( $t == "H" ) + return $this->m_Crypto->MakeIMStr($s, base64_decode(IMHK)); + else if( $t == "J" ) + return $this->m_Crypto->MakeIMStr($s, base64_decode(IMJK)); + } + + /*--------------------------------------------------*/ + /* */ + /* ¿¡·¯¸޼¼Áö Make */ + /* */ + /*--------------------------------------------------*/ + function MakeTXErrMsg($err_code, $err_msg) + { + $this->m_RESULT[NM_RESULTCODE] = "01"; + $this->m_RESULT[NM_RESULTERRORCODE] = $err_code; + $this->m_RESULT[NM_RESULTMSG] = "[".$err_code."|".$err_msg."]"; + $this->m_Data->GTHR( $err_code, $err_msg ); + return; + } + +} + +?> diff --git a/shop/inicis/libs/INISoc.php b/shop/inicis/libs/INISoc.php new file mode 100644 index 000000000..23d607957 --- /dev/null +++ b/shop/inicis/libs/INISoc.php @@ -0,0 +1,251 @@ +hnd); + if($errCode!=0) + { + //Connection reset by peer + if($errCode==104) + $this->bConnected = false; + $errMsg = socket_strerror($errCode); + $this->sSocErr = "(".$errCode.")(".$errMsg.")"; + socket_clear_error($this->hnd); + } + elseif (strlen($msg)) + { + $this->sSocErr = $errMsg; + } + return false; + } + + function INISocket($host) + { + $this->family = AF_INET; + $this->type = SOCK_STREAM; + $this->protocol = SOL_TCP; + $this->hnd = @socket_create($this->family,$this->type,$this->protocol); + $this->error(); + $this->sBuffer = false; + $this->ip = null; + $this->host = $host; + $this->port = PG_PORT; + } + + function DNSLookUP() + { + $starttime=GetMicroTime(); + $ip = @gethostbyname($this->host); + if($ip) + { + $this->ip = $ip; + } + else + { + $this->error("Hostname ".$this->host." could not be resolved"); + return DNS_LOOKUP_ERR; + } + + $this->dns_laptime=round(GetMicroTime()-$starttime, 3); + if( $this->dns_laptime > DNS_LOOKUP_TIMEOUT ) + return DNS_LOOKUP_TIMEOUT_ERR; + + return OK; + } + + function open() + { + //Connect timeout Trickkkkkkkkk ##2. NONBLOCKING NEED , less CPU clocking!!^^ + //modified by ddaemiri, 2007.08.30 + + socket_set_nonblock($this->hnd); + if (!@socket_connect($this->hnd, $this->ip, $this->port)) + { + $err = socket_last_error($this->hnd); + $err_str = socket_strerror($err); + if ($err == 106) //EISCONN + { + $this->bConnected = true; + socket_set_block($this->hnd); + return OK; + } + //EINPROGRESS( Linux:115, Window Socket:10035, FreeBSD4.10:36, ¸ðµç OS üũ ºҰ¡´ÉÇؼ­ strÀ¸·εµ °˻ö ) + if ($err != ERRCODE_INPROGRESS_LINUX && $err != ERRCODE_INPROGRESS_WIN && + $err != ERRCODE_INPROGRESS_FREEBSD && $err_str != ERRSTR_INPROGRESS ) + { + $this->error(); + socket_close($this->hnd); + return SOCK_CONN_ERR; + } + } + + $read = array($this->hnd); + $write = array($this->hnd); + $rtv = @socket_select($read,$write,$except=NULL,TIMEOUT_CONNECT); + if( $rtv == 0 ) //TIMEOUT + { + $this->error(); + socket_close($this->hnd); + return SOCK_TIMEO_ERR; + } + else if ( $rtv === FALSE ) + { + $this->error(); + socket_close($this->hnd); + return SOCK_ETC1_ERR; + } + if( in_array($this->hnd,$read) || in_array($this->hnd,$write)) + { + if(@socket_get_option($this->hnd, SOL_SOCKET, SO_ERROR) === FALSE) + { + $this->error(); + socket_close($this->hnd); + return SOCK_ETC2_ERR; + } + } + $this->bConnected = true; + socket_set_block($this->hnd); + return OK; + } + function close() + { + //if(!$this->bConnected) return; + @socket_shutdown($this->hnd,2); + @socket_close($this->hnd); + } + + function send($sBuf) + { + if(!$this->bConnected) + { + $this->error("Socket error. Cannot send data on a closed socket."); + return SOCK_SEND1_ERR; + } + + $vWrite = array($this->hnd); + + while(($rtv = @socket_select($vRead = null,$vWrite ,$vExcept = null, TIMEOUT_WRITE)) === FALSE); + + if( $rtv == 0 ) + { + $this->error(); + //return SOCK_TIMEO_ERR; + return SOCK_CONN_ERR; //modify 2008.04.01 + } + if( $rtv === FALSE ) + { + $this->error(); + return SOCK_SEND2_ERR; + } + + $tmpBuf = strlen($sBuf) ? $sBuf : $this->sBuffer; + $iBufLen = strlen($tmpBuf); + $res = @socket_send($this->hnd,$tmpBuf,$iBufLen,0); + + if($res === FALSE) + { + $this->error(); + return SOCK_SEND2_ERR; + } + elseif ($res < $iBufLen) + { + $tmpBuf = substr($tmpBuf,$res); + $this->send($tmpBuf); + } + return OK; + } + function WaitRecv( &$recv_buf, $nleft ) + { + $recv_buf = null; + $read = array($this->hnd); + $buf = null; + while( $nleft > 0 ) + { + $rtv = @socket_select($read,$write=NULL,$except=NULL,TIMEOUT_READ); + if( $rtv == 0 ) + { + $this->error(); + return SOCK_TIMEO_ERR; + } + else if ( $rtv === FALSE ) + { + $this->error(); + return SOCK_ETC1_ERR; + } + + if(!in_array($this->hnd,$read)) + { + $this->error(); + return SOCK_RECV1_ERR; + } + if($buf = @socket_read($this->hnd, $nleft)) + { + $recv_buf .= $buf; + } + else + { + $this->error(); + return SOCK_RECV1_ERR; + } + $nleft -= strlen( $buf ); + } + return OK; + } + function recv(&$head, &$body, &$tail) + { + if(!$this->bConnected) + { + $this->error("Socket error. Cannot read any data on a closed socket."); + return SOCK_RECV1_ERR; + } + + //------------------------------------------------------ + //head + //------------------------------------------------------ + if( ($rtv = $this->WaitRecv( $head, MSGHEADER_LEN)) != OK ) return $rtv; + + if( $head == "" ) return SOCK_RECV2_ERR; + $body_len = intval(substr( $head, 0, BODY_LEN )); + $tail_len = intval(substr( $head, BODY_LEN, TAIL_LEN )); + + //------------------------------------------------------ + //body + //------------------------------------------------------ + if( ($rtv = $this->WaitRecv( $body, $body_len)) != OK ) return $rtv; + + //------------------------------------------------------ + //tail + //------------------------------------------------------ + if( ($rtv = $this->WaitRecv( $tail, $tail_len)) != OK ) return $rtv; + + return OK; + } + function getErr() + { + return $this->sSocErr; + } + +} + + +?> diff --git a/shop/inicis/libs/INIXml.php b/shop/inicis/libs/INIXml.php new file mode 100644 index 000000000..2a0a20614 --- /dev/null +++ b/shop/inicis/libs/INIXml.php @@ -0,0 +1,3495 @@ + version 1.0 | +// | Copyright (c) 2001 Michael P. Mehl. All rights reserved. | +// +----------------------------------------------------------------------+ +// | Latest releases are available at http://phpxml.org/. For feedback or | +// | bug reports, please contact the author at mpm@phpxml.org. Thanks! | +// +----------------------------------------------------------------------+ +// | The contents of this file are subject to the Mozilla Public License | +// | Version 1.1 (the "License"); you may not use this file except in | +// | compliance with the License. You may obtain a copy of the License at | +// | http://www.mozilla.org/MPL/ | +// | | +// | Software distributed under the License is distributed on an "AS IS" | +// | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See | +// | the License for the specific language governing rights and | +// | limitations under the License. | +// | | +// | The Original Code is . | +// | | +// | The Initial Developer of the Original Code is Michael P. Mehl. | +// | Portions created by Michael P. Mehl are Copyright (C) 2001 Michael | +// | P. Mehl. All Rights Reserved. | +// +----------------------------------------------------------------------+ +// | Authors: | +// | Michael P. Mehl | +// +----------------------------------------------------------------------+ +// + +/** +* Class for accessing XML data through the XPath language. +* +* This class offers methods for accessing the nodes of a XML document using +* the XPath language. You can add or remove nodes, set or modify their +* content and their attributes. No additional PHP extensions like DOM XML +* or something similar are required to use these features. +* +* @link http://www.phpxml.org/ Latest release of this class +* @link http://www.w3.org/TR/xpath W3C XPath Recommendation +* @copyright Copyright (c) 2001 Michael P. Mehl. All rights reserved. +* @author Michael P. Mehl +* @version 1.0 (2001-03-08) +* @access public +*/ + +/** + * + * Çشç ¶óÀ̺귯¸®´Â Àý´ë ¼öÁ¤µǾ´Â ¾ȵ˴ϴÙ. + * ÀÓÀǷÎ ¼öÁ¤µÈ Äڵ忡 ´ëÇÑ åÀÓÀº ÀüÀûÀ¸·Î ¼öÁ¤Àڿ¡°Ô ÀÖÀ½À» ¾˷Áµ帳´ϴÙ. + * + */ + +class XML +{ + /** + * List of all document nodes. + * + * This array contains a list of all document nodes saved as an + * associative array. + * + * @access private + * @var array + */ + var $nodes = array(); + + /** + * List of document node IDs. + * + * This array contains a list of all IDs of all document nodes that + * are used for counting when adding a new node. + * + * @access private + * @var array + */ + var $ids = array(); + + /** + * Current document path. + * + * This variable saves the current path while parsing a XML file and adding + * the nodes being read from the file. + * + * @access private + * @var string + */ + var $path = ""; + + /** + * Current document position. + * + * This variable counts the current document position while parsing a XML + * file and adding the nodes being read from the file. + * + * @access private + * @var int + */ + var $position = 0; + + /** + * Path of the document root. + * + * This string contains the full path to the node that acts as the root + * node of the whole document. + * + * @access private + * @var string + */ + var $root = ""; + + /** + * Current XPath expression. + * + * This string contains the full XPath expression being parsed currently. + * + * @access private + * @var string + */ + var $xpath = ""; + + /** + * List of entities to be converted. + * + * This array contains a list of entities to be converted when an XPath + * expression is evaluated. + * + * @access private + * @var array + */ + var $entities = array ( "&" => "&", "<" => "<", ">" => ">", + "'" => "&apos", '"' => """ ); + + /** + * List of supported XPath axes. + * + * This array contains a list of all valid axes that can be evaluated in an + * XPath expression. + * + * @access private + * @var array + */ + var $axes = array ( "child", "descendant", "parent", "ancestor", + "following-sibling", "preceding-sibling", "following", "preceding", + "attribute", "namespace", "self", "descendant-or-self", + "ancestor-or-self" ); + + /** + * List of supported XPath functions. + * + * This array contains a list of all valid functions that can be evaluated + * in an XPath expression. + * + * @access private + * @var array + */ + var $functions = array ( "last", "position", "count", "id", "name", + "string", "concat", "starts-with", "contains", "substring-before", + "substring-after", "substring", "string-length", "translate", + "boolean", "not", "true", "false", "lang", "number", "sum", "floor", + "ceiling", "round", "text" ); + + /** + * List of supported XPath operators. + * + * This array contains a list of all valid operators that can be evaluated + * in a predicate of an XPath expression. The list is ordered by the + * precedence of the operators (lowest precedence first). + * + * @access private + * @var array + */ + var $operators = array( " or ", " and ", "=", "!=", "<=", "<", ">=", ">", + "+", "-", "*", " div ", " mod " ); + + + var $xml_node = array(); + + /** + * Constructor of the class. + * + * This constructor initializes the class and, when a filename is given, + * tries to read and parse the given file. + * + * @access public + * @author Michael P. Mehl + * @param string $file Path and name of the file to read and parsed. + * @see load_xml() + */ + //modify by ddaemiri, 2007.05.28 + //load_file -> load_xml·Î ÆÄÀÏ ¹× string À¸·Î ¸ðµÎ ÀԷ¹ÞÀ» ¼ö ÀÖÀ½. + function XML ( $file = "" ) + { + // Check whether a file was given. + if ( !empty($file) ) + { + // Load the XML file. + return $this->load_xml($file, ""); + } + } + + /** + * Reads a file and parses the XML data. + * + * This method reads the content of a XML file, tries to parse its + * content and upon success stores the information retrieved from + * the file into an array. + * + * @access public + * @author Michael P. Mehl + * @param string $file Path and name of the file to be read and parsed. + * @see handle_start_element(), handle_end_element(), + * handle_character_data() + */ + //modify by ddaemiri, 2007.05.28 + //load_file -> load_xml·Î ÆÄÀÏ ¹× string À¸·Î ¸ðµÎ ÀԷ¹ÞÀ» ¼ö ÀÖÀ½. + function load_xml ( $file, $str ) + { + // Check whether the file exists and is readable. + if ( (file_exists($file) && is_readable($file)) || $str != "") + { + // Read the content of the file. + if( $str == "" ) + $content = implode("", file($file)); + else + $content = $str; + + // Check whether content has been read. + if ( !empty($content) ) + { + // Create an XML parser. + $parser = xml_parser_create(); + + // Set the options for parsing the XML data. + xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); + xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); + + // Set the object for the parser. + xml_set_object($parser, $this); + + // Set the element handlers for the parser. + xml_set_element_handler($parser, "handle_start_element", "handle_end_element"); + xml_set_character_data_handler($parser, "handle_character_data"); + + // Parse the XML file. + if ( !xml_parse($parser, $content, true) ) + { + // Display an error message. + $this->display_error("XML error in file %s, line %d: %s", + $file, xml_get_current_line_number($parser), + xml_error_string(xml_get_error_code($parser))); + } + + // Free the parser. + xml_parser_free($parser); + + return OK; + } + } + else + { + // Display an error message. + //$this->display_error("File %s could not be found or read.", $file); + return RESULT_MSG_FORMAT_ERR; + } + } + + //modify by ddaemiri, 2007.05.28 + //charset Ã߰¡( header »ý¼º ) + function make_xml ( $highlight = array(), $root = "", $level = 0, $charset = "UTF-8" ) + { + // header Ã߰¡ + $header = ""."\n"; + $body = $this->get_xml( $highlight, $root, $level ); + return $header.$body; + } + + /** + * Generates a XML file with the content of the current document. + * + * This method creates a string containing the XML data being read + * and modified by this class before. This string can be used to save + * a modified document back to a file or doing other nice things with + * it. + * + * @access public + * @author Michael P. Mehl + * @param array $highlight Array containing a list of full document + * paths of nodes to be highlighted by ... tags + * in the generated XML string. + * @param string $root While doing a recursion with this method, this + * parameter is used for internal purpose. + * @param int $level While doing a recursion with this method, this + * parameter is used for internal purpose. + * @return string The returned string contains well-formed XML data + * representing the content of this document. + * @see load_xml(), evaluate(), get_content() + */ + //modify by ddaemiri, 2007.05.28 + //get_file -> get_xml ·Î ÇԼöÀ̸§ º¯°æ. + function get_xml ( $highlight = array(), $root = "", $level = 0 ) + { + + // Create a string to save the generated XML data. + $xml = ""; + + // Create two strings containing the tags for highlighting a node. + $highlight_start = ""; + $highlight_end = ""; + + // Generate a string to be displayed before the tags. + $before = ""; + + // Calculate the amount of whitespaces to display. + for ( $i = 0; $i < ( $level * 2 ); $i++ ) + { + // Add a whitespaces to the string. + $before .= " "; + } + + // Check whether a root node is given. + if ( empty($root) ) + { + // Set it to the document root. + $root = $this->root; + } + + // Check whether the node is selected. + $selected = in_array($root, $highlight); + + // Now add the whitespaces to the XML data. + $xml .= $before; + + // Check whether the node is selected. + if ( $selected ) + { + // Add the highlight code to the XML data. + $xml .= $highlight_start; + } + + // Now open the tag. + $xml .= "<".$this->nodes[$root]["name"]; + + // Check whether there are attributes for this node. + if ( count($this->nodes[$root]["attributes"]) > 0 ) + { + // Run through all attributes. + foreach ( $this->nodes[$root]["attributes"] as $key => $value ) + { + // Check whether this attribute is highlighted. + if ( in_array($root."/attribute::".$key, $highlight) ) + { + // Add the highlight code to the XML data. + $xml .= $highlight_start; + } + + // Add the attribute to the XML data. + $xml .= " ".$key."=\"".trim(stripslashes($value))."\""; + + // Check whether this attribute is highlighted. + if ( in_array($root."/attribute::".$key, $highlight) ) + { + // Add the highlight code to the XML data. + $xml .= $highlight_end; + } + } + } + + // Check whether the node contains character data or has children. + if ( $this->nodes[$root]["text"] == "" && + !isset($this->nodes[$root]["children"]) ) + { + // Add the end to the tag. + $xml .= "/"; + } + + // Close the tag. + //$xml .= ">\n"; + $xml .= ">"; + + // Check whether the node is selected. + if ( $selected ) + { + // Add the highlight code to the XML data. + $xml .= $highlight_end; + } + + // Check whether the node contains character data. + if ( $this->nodes[$root]["text"] != "" ) + { + // Add the character data to the XML data. + //$xml .= $before." ".$this->nodes[$root]["text"]."\n"; + //$xml .= $before.$this->nodes[$root]["text"]; + $xml .= $this->nodes[$root]["text"]; + } + + // Check whether the node has children. + if ( isset($this->nodes[$root]["children"]) ) + { + // Run through all children with different names. + foreach ( $this->nodes[$root]["children"] as $child => $pos ) + { + // Run through all children with the same name. + for ( $i = 1; $i <= $pos; $i++ ) + { + // Generate the full path of the child. + $fullchild = $root."/".$child."[".$i."]"; + + // Add the child's XML data to the existing data. + $xml .= "\n\t".$this->get_xml($highlight, $fullchild, $level + 1); + } + } + } + + // Check whether there are attributes for this node. + if ( $this->nodes[$root]["text"] != "" || + isset($this->nodes[$root]["children"]) ) + { + // Add the whitespaces to the XML data. + //$xml .= $before; + + // Check whether the node is selected. + if ( $selected ) + { + // Add the highlight code to the XML data. + $xml .= $highlight_start; + } + + // Add the closing tag. + $xml .= "nodes[$root]["name"].">"; + + // Check whether the node is selected. + if ( $selected ) + { + // Add the highlight code to the XML data. + $xml .= $highlight_end; + } + + // Add a linebreak. + //$xml .= "\n"; + } + + // Return the XML data. + return $xml; + } + + /** + * Adds a new node to the XML document. + * + * This method adds a new node to the tree of nodes of the XML document + * being handled by this class. The new node is created according to the + * parameters passed to this method. + * + * @access public + * @author Michael P. Mehl + * @param string $content Full path of the parent, to which the new + * node should be added as a child. + * @param string $name Name of the new node. + * @return string The string returned by this method will contain the + * full document path of the created node. + * @see remove_node(), evaluate() + */ + function add_node ( $context, $name, $value="", $attr_arr=NULL ) + { + // Check whether a name for this element is already set. + if ( empty($this->root) ) + { + // Use this tag as the root element. + $this->root = "/".$name."[1]"; + } + + // Calculate the full path for this element. + $path = $context."/".$name; + + // Set the relative context and the position. + $position = ++$this->ids[$path]; + $relative = $name."[".$position."]"; + + // Calculate the full path. + $fullpath = $context."/".$relative; + + // Calculate the context position, which is the position of this + // element within elements of the same name in the parent node. + $this->nodes[$fullpath]["context-position"] = $position; + + // Calculate the position for the following and preceding axis + // detection. + $this->nodes[$fullpath]["document-position"] = + $this->nodes[$context]["document-position"] + 1; + + // Save the information about the node. + $this->nodes[$fullpath]["name"] = $name; + $this->nodes[$fullpath]["text"] = ""; + $this->nodes[$fullpath]["parent"] = $context; + + // Add this element to the element count array. + if ( !$this->nodes[$context]["children"][$name] ) + { + // Set the default name. + $this->nodes[$context]["children"][$name] = 1; + } + else + { + // Calculate the name. + $this->nodes[$context]["children"][$name] = + $this->nodes[$context]["children"][$name] + 1; + } + + if( $value != "" && is_array($attr_arr) ) + { + $this->set_attributes($fullpath, $attr_arr); + if( $attr_arr["urlencode"] == "1" ) + $value = urlencode( $value); + } + if( $value != "" ) + { + $this->set_content($fullpath, $value); + } + + // Return the path of the new node. + return $fullpath; + } + + /** + * Removes a node from the XML document. + * + * This method removes a node from the tree of nodes of the XML document. + * If the node is a document node, all children of the node and its + * character data will be removed. If the node is an attribute node, + * only this attribute will be removed, the node to which the attribute + * belongs as well as its children will remain unmodified. + * + * @access public + * @author Michael P. Mehl + * @param string $node Full path of the node to be removed. + * @see add_node(), evaluate() + */ + function remove_node ( $node ) + { + // Check whether the node is an attribute node. + if ( preg_match("/attribute::/", $node) ) + { + // Get the path to the attribute node's parent. + $parent = $this->prestr($node, "/attribute::"); + + // Get the name of the attribute. + $attribute = $this->afterstr($node, "/attribute::"); + + // Check whether the attribute exists. + if ( isset($this->nodes[$parent]["attributes"][$attribute]) ) + { + // Create a new array. + $new = array(); + + // Run through the existing attributes. + foreach ( $this->nodes[$parent]["attributes"] + as $key => $value ) + { + // Check whether it's the attribute to remove. + if ( $key != $attribute ) + { + // Add it to the new array again. + $new[$key] = $value; + } + } + + // Save the new attributes. + $this->nodes[$parent]["attributes"] = $new; + } + } + else + { + // Create an associative array, which contains information about + // all nodes that required to be renamed. + $rename = array(); + + // Get the name, the parent and the siblings of current node. + $name = $this->nodes[$node]["name"]; + $parent = $this->nodes[$node]["parent"]; + $siblings = $this->nodes[$parent]["children"][$name]; + + // Decrease the number of children. + $this->nodes[$parent]["children"][$name]--; + + // Create a counter for renumbering the siblings. + $counter = 1; + + // Now run through the siblings. + for ( $i = 1; $i <= $siblings; $i++ ) + { + // Create the name of the sibling. + $sibling = $parent."/".$name."[".$i."]"; + + // Check whether it's the name of the current node. + if ( $sibling != $node ) + { + // Create the new name for the sibling. + $new = $parent."/".$name."[".$counter."]"; + + // Increase the counter. + $counter++; + + // Add the old and the new name to the list of nodes + // to be renamed. + $rename[$sibling] = $new; + } + } + + // Create an array for saving the new node-list. + $nodes = array(); + + // Now run through through the existing nodes. + foreach ( $this->nodes as $name => $values ) + { + // Check the position of the path of the node to be deleted + // in the path of the current node. + $position = strpos($name, $node); + + // Check whether it's not the node to be deleted. + if ( $position === false ) + { + // Run through the array of nodes to be renamed. + foreach ( $rename as $old => $new ) + { + // Check whether this node and it's parent requires to + // be renamed. + $name = str_replace($old, $new, $name); + $values["parent"] = str_replace($old, $new, + $values["parent"]); + } + + // Add the node to the list of nodes. + $nodes[$name] = $values; + } + } + + // Save the new array of nodes. + $this->nodes = $nodes; + } + } + + /** + * Add content to a node. + * + * This method adds content to a node. If it's an attribute node, then + * the value of the attribute will be set, otherwise the character data of + * the node will be set. The content is appended to existing content, + * so nothing will be overwritten. + * + * @access public + * @author Michael P. Mehl + * @param string $path Full document path of the node. + * @param string $value String containing the content to be added. + * @see get_content(), evaluate() + */ + function add_content ( $path, $value ) + { + // Check whether it's an attribute node. + if ( preg_match("/attribute::/", $path) ) + { + // Get the path to the attribute node's parent. + $parent = $this->prestr($path, "/attribute::"); + + // Get the parent node. + $parent = $this->nodes[$parent]; + + // Get the name of the attribute. + $attribute = $this->afterstr($path, "/attribute::"); + + // Set the attribute. + $parent["attributes"][$attribute] .= $value; + } + else + { + // Set the character data of the node. + $this->nodes[$path]["text"] .= $value; + } + } + + /** + * Set the content of a node. + * + * This method sets the content of a node. If it's an attribute node, then + * the value of the attribute will be set, otherwise the character data of + * the node will be set. Existing content will be overwritten. + * + * @access public + * @author Michael P. Mehl + * @param string $path Full document path of the node. + * @param string $value String containing the content to be set. + * @see get_content(), evaluate() + */ + function set_content ( $path, $value ) + { + // Check whether it's an attribute node. + if ( preg_match("/attribute::/", $path) ) + { + // Get the path to the attribute node's parent. + $parent = $this->prestr($path, "/attribute::"); + + // Get the parent node. + $parent = $this->nodes[$parent]; + + // Get the name of the attribute. + $attribute = $this->afterstr($path, "/attribute::"); + + // Set the attribute. + $parent["attributes"][$attribute] = $value; + } + else + { + // Set the character data of the node. + $this->nodes[$path]["text"] = strtr($value, $this->entities); + } + } + + /** + * Retrieves the content of a node. + * + * This method retrieves the content of a node. If it's an attribute + * node, then the value of the attribute will be retrieved, otherwise + * it'll be the character data of the node. + * + * @access public + * @author Michael P. Mehl + * @param string $path Full document path of the node, from which the + * content should be retrieved. + * @return string The returned string contains either the value or the + * character data of the node. + * @see set_content(), evaluate() + */ + function get_content ( $path ) + { + // Check whether it's an attribute node. + if ( preg_match("/attribute::/", $path) ) + { + // Get the path to the attribute node's parent. + $parent = $this->prestr($path, "/attribute::"); + + // Get the parent node. + $parent = $this->nodes[$parent]; + + // Get the name of the attribute. + $attribute = $this->afterstr($path, "/attribute::"); + + // Get the attribute. + $attribute = $parent["attributes"][$attribute]; + + // Return the value of the attribute. + return $attribute; + } + else + { + // Return the cdata of the node. + return stripslashes($this->nodes[$path]["text"]); + } + } + + /** + * Add attributes to a node. + * + * This method adds attributes to a node. Existing attributes will not be + * overwritten. + * + * @access public + * @author Michael P. Mehl + * @param string $path Full document path of the node, the attributes + * should be added to. + * @param array $attributes Associative array containing the new + * attributes for the node. + * @see set_content(), get_content() + */ + function add_attributes ( $path, $attributes ) + { + // Add the attributes to the node. + $this->nodes[$path]["attributes"] = array_merge($attributes, + $this->nodes[$path]["attributes"]); + } + + /** + * Sets the attributes of a node. + * + * This method sets the attributes of a node and overwrites all existing + * attributes by doing this. + * + * @access public + * @author Michael P. Mehl + * @param string $path Full document path of the node, the attributes + * of which should be set. + * @param array $attributes Associative array containing the new + * attributes for the node. + * @see set_content(), get_content() + */ + function set_attributes ( $path, $attributes ) + { + // Set the attributes of the node. + $this->nodes[$path]["attributes"] = $attributes; + } + + /** + * Retrieves a list of all attributes of a node. + * + * This method retrieves a list of all attributes of the node specified in + * the argument. + * + * @access public + * @author Michael P. Mehl + * @param string $path Full document path of the node, from which the + * list of attributes should be retrieved. + * @return array The returned associative array contains the all + * attributes of the specified node. + * @see get_content(), $nodes, $ids + */ + function get_attributes ( $path ) + { + // Return the attributes of the node. + return $this->nodes[$path]["attributes"]; + } + + /** + * Retrieves the name of a document node. + * + * This method retrieves the name of document node specified in the + * argument. + * + * @access public + * @author Michael P. Mehl + * @param string $path Full document path of the node, from which the + * name should be retrieved. + * @return string The returned array contains the name of the specified + * node. + * @see get_content(), $nodes, $ids + */ + function get_name ( $path ) + { + // Return the name of the node. + return $this->nodes[$path]["name"]; + } + + /** + * Evaluates an XPath expression. + * + * This method tries to evaluate an XPath expression by parsing it. A + * XML document has to be read before this method is able to work. + * + * @access public + * @author Michael P. Mehl + * @param string $path XPath expression to be evaluated. + * @param string $context Full path of a document node, starting + * from which the XPath expression should be evaluated. + * @return array The returned array contains a list of the full + * document paths of all nodes that match the evaluated + * XPath expression. + * @see $nodes, $ids + */ + function evaluate ( $path, $context = "" ) + { + // Remove slashes and quote signs. + $path = stripslashes($path); + $path = str_replace("\"", "", $path); + $path = str_replace("'", "", $path); + + // Split the paths into different paths. + $paths = $this->split_paths($path); + + // Create an empty set to save the result. + $result = array(); + + // Run through all paths. + foreach ( $paths as $path ) + { + // Trim the path. + $path = trim($path); + + // Save the current path. + $this->xpath = $path; + + // Convert all entities. + $path = strtr($path, array_flip($this->entities)); + + // Split the path at every slash. + $steps = $this->split_steps($path); + + // Check whether the first element is empty. + if ( empty($steps[0]) ) + { + // Remove the first and empty element. + array_shift($steps); + } + + // Start to evaluate the steps. + $nodes = $this->evaluate_step($context, $steps); + + // Remove duplicated nodes. + $nodes = array_unique($nodes); + + // Add the nodes to the result set. + $result = array_merge($result, $nodes); + } + + // Return the result. + return $result; + } + + /** + * Handles opening XML tags while parsing. + * + * While parsing a XML document for each opening tag this method is + * called. It'll add the tag found to the tree of document nodes. + * + * @access private + * @author Michael P. Mehl + * @param int $parser Handler for accessing the current XML parser. + * @param string $name Name of the opening tag found in the document. + * @param array $attributes Associative array containing a list of + * all attributes of the tag found in the document. + * @see handle_end_element(), handle_character_data(), $nodes, $ids + */ + function handle_start_element ( $parser, $name, $attributes ) + { + // Add a node. + $this->path = $this->add_node($this->path, $name); + + // Set the attributes. + // Xpath·Î ¾Ȱ¡Á®¿´Ù. ÇѴÞÀ» ÇêÁö¶ö ÇߴÙ!! + // modifyed by ddaemiri, 2007.09.03 + // $this->set_attributes($this->path, $attributes); + + // add array, added by ddaemiri, 2007.09.03 + $arr = preg_split( "/[\/]+/", $this->path, -1, PREG_SPLIT_NO_EMPTY ); + $this->xml_node[$arr[count($arr)-1]]["attr"] = $attributes; + } + + /** + * Handles closing XML tags while parsing. + * + * While parsing a XML document for each closing tag this method is + * called. + * + * @access private + * @author Michael P. Mehl + * @param int $parser Handler for accessing the current XML parser. + * @param string $name Name of the closing tag found in the document. + * @see handle_start_element(), handle_character_data(), $nodes, $ids + */ + function handle_end_element ( $parser, $name ) + { + // Jump back to the parent element. + $this->path = substr($this->path, 0, strrpos($this->path, "/")); + } + + /** + * Handles character data while parsing. + * + * While parsing a XML document for each character data this method + * is called. It'll add the character data to the document tree. + * + * @access private + * @author Michael P. Mehl + * @param int $parser Handler for accessing the current XML parser. + * @param string $text Character data found in the document. + * @see handle_start_element(), handle_end_element(), $nodes, $ids + */ + function handle_character_data ( $parser, $text ) + { + // Replace entities. + $text = strtr($text, $this->entities); + + // Save the text. + // Xpath·Î ¾Ȱ¡Á®¿´Ù. ÇѴÞÀ» ÇêÁö¶ö ÇߴÙ!! + // modifyed by ddaemiri, 2007.09.03 + //$this->add_content($this->path, addslashes(trim($text))); + + // add array, added by ddaemiri, 2007.09.03 + $arr = preg_split( "/[\/]+/", $this->path, -1, PREG_SPLIT_NO_EMPTY ); + //edited by ddaemiri. libexpatÀº \nÀ» ºи®ÀڷÎ ÀνÄ + //$this->xml_node[$arr[count($arr)-1]]["text"] = addslashes(trim($text)); + $this->xml_node[$arr[count($arr)-1]]["text"] = $this->xml_node[$arr[count($arr)-1]]["text"].addslashes(trim($text)); + } + + /** + * Splits an XPath expression into its different expressions. + * + * This method splits an XPath expression. Each expression can consists of + * list of expression being separated from each other by a | character. + * + * @access private + * @author Michael P. Mehl + * @param string $expression The complete expression to be splitted + * into its different expressions. + * @return array The array returned from this method contains a list + * of all expressions found in the expression passed to this + * method as a parameter. + * @see evalute() + */ + function split_paths ( $expression ) + { + // Create an empty array. + $paths = array(); + + // Save the position of the slash. + $position = -1; + + // Run through the expression. + do + { + // Search for a slash. + $position = $this->search_string($expression, "|"); + + // Check whether a | was found. + if ( $position >= 0 ) + { + // Get the left part of the expression. + $left = substr($expression, 0, $position); + $right = substr($expression, $position + 1); + + // Add the left value to the steps. + $paths[] = $left; + + // Reduce the expression to the right part. + $expression = $right; + } + } + while ( $position > -1 ); + + // Add the remaing expression to the list of steps. + $paths[] = $expression; + + // Return the steps. + return $paths; + } + + /** + * Splits an XPath expression into its different steps. + * + * This method splits an XPath expression. Each expression can consists of + * list of steps being separated from each other by a / character. + * + * @access private + * @author Michael P. Mehl + * @param string $expression The complete expression to be splitted + * into its different steps. + * @return array The array returned from this method contains a list + * of all steps found in the expression passed to this + * method as a parameter. + * @see evalute() + */ + function split_steps ( $expression ) + { + // Create an empty array. + $steps = array(); + + // Replace a double slashes, because they'll cause problems otherwise. + $expression = str_replace("//@", "/descendant::*/@", $expression); + $expression = str_replace("//", "/descendant::", $expression); + + // Save the position of the slash. + $position = -1; + + // Run through the expression. + do + { + // Search for a slash. + $position = $this->search_string($expression, "/"); + + // Check whether a slash was found. + if ( $position >= 0 ) + { + // Get the left part of the expression. + $left = substr($expression, 0, $position); + $right = substr($expression, $position + 1); + + // Add the left value to the steps. + $steps[] = $left; + + // Reduce the expression to the right part. + $expression = $right; + } + } + while ( $position > -1 ); + + // Add the remaing expression to the list of steps. + $steps[] = $expression; + + // Return the steps. + return $steps; + } + + /** + * Retrieves axis information from an XPath expression step. + * + * This method tries to extract the name of the axis and its node-test + * from a given step of an XPath expression at a given node. + * + * @access private + * @author Michael P. Mehl + * @param string $step String containing a step of an XPath expression. + * @param string $node Full document path of the node on which the + * step is executed. + * @return array This method returns an array containing information + * about the axis found in the step. + * @see evaluate_step() + */ + function get_axis ( $step, $node ) + { + // Create an array to save the axis information. + $axis = array( + "axis" => "", + "node-test" => "", + "predicate" => array() + ); + + // Check whether there are predicates. + if ( preg_match("/\[/", $step) ) + { + // Get the predicates. + $predicates = substr($step, strpos($step, "[")); + + // Reduce the step. + $step = $this->prestr($step, "["); + + // Try to split the predicates. + $predicates = str_replace("][", "]|[", $predicates); + $predicates = explode("|", $predicates); + + // Run through all predicates. + foreach ( $predicates as $predicate ) + { + // Remove the brackets. + $predicate = substr($predicate, 1, strlen($predicate) - 2); + + // Add the predicate to the list of predicates. + $axis["predicate"][] = $predicate; + } + } + + // Check whether the axis is given in plain text. + if ( $this->search_string($step, "::") > -1 ) + { + // Split the step to extract axis and node-test. + $axis["axis"] = $this->prestr($step, "::"); + $axis["node-test"] = $this->afterstr($step, "::"); + } + else + { + // Check whether the step is empty. + if ( empty($step) ) + { + // Set it to the default value. + $step = "."; + } + + // Check whether is an abbreviated syntax. + if ( $step == "*" ) + { + // Use the child axis and select all children. + $axis["axis"] = "child"; + $axis["node-test"] = "*"; + } + //elseif ( ereg("\(", $step) ) + //elseif ( preg_match("\(", $step) ) + elseif ( preg_match("/\(/", $step) ) + { + // Check whether it's a function. + if ( $this->is_function($this->prestr($step, "(")) ) + { + // Get the position of the first bracket. + $start = strpos($step, "("); + $end = strpos($step, ")", $start); + + // Get everything before, between and after the brackets. + $before = substr($step, 0, $start); + $between = substr($step, $start + 1, $end - $start - 1); + $after = substr($step, $end + 1); + + // Trim each string. + $before = trim($before); + $between = trim($between); + $after = trim($after); + + // Save the evaluated function. + $axis["axis"] = "function"; + $axis["node-test"] = $this->evaluate_function($before, + $between, $node); + } + else + { + // Use the child axis and a function. + $axis["axis"] = "child"; + $axis["node-test"] = $step; + } + } + //elseif ( eregi("^@", $step) ) + //elseif ( preg_match("^@/i", $step) ) + elseif ( preg_match("/^@/i", $step) ) + { + // Use the attribute axis and select the attribute. + $axis["axis"] = "attribute"; + $axis["node-test"] = substr($step, 1); + } + //elseif ( eregi("\]$", $step) ) + //elseif ( preg_match("\]$/i", $step) ) + elseif ( preg_match("/\]$/i", $step) ) + { + // Use the child axis and select a position. + $axis["axis"] = "child"; + $axis["node-test"] = substr($step, strpos($step, "[")); + } + elseif ( $step == "." ) + { + // Select the self axis. + $axis["axis"] = "self"; + $axis["node-test"] = "*"; + } + elseif ( $step == ".." ) + { + // Select the parent axis. + $axis["axis"] = "parent"; + $axis["node-test"] = "*"; + } + //elseif ( ereg("^[a-zA-Z0-9\-_]+$", $step) ) + //elseif ( preg_match("^[a-zA-Z0-9\-_]+$", $step) ) + elseif ( preg_match("/^[a-zA-Z0-9\-_]+$/", $step) ) + { + // Select the child axis and the child. + $axis["axis"] = "child"; + $axis["node-test"] = $step; + } + else + { + // Use the child axis and a name. + $axis["axis"] = "child"; + $axis["node-test"] = $step; + } + } + + // Check whether it's a valid axis. + if ( !in_array($axis["axis"], array_merge($this->axes, + array("function"))) ) + { + // Display an error message. + $this->display_error("While parsing an XPath expression, in ". + "the step \"%s\" the invalid axis \"%s\" was found.", + str_replace($step, "".$step."", $this->xpath),# + $axis["axis"]); + } + + // Return the axis information. + return $axis; + } + + /** + * Looks for a string within another string. + * + * This method looks for a string within another string. Brackets in the + * string the method is looking through will be respected, which means that + * only if the string the method is looking for is located outside of + * brackets, the search will be successful. + * + * @access private + * @author Michael P. Mehl + * @param string $term String in which the search shall take place. + * @param string $expression String that should be searched. + * @return int This method returns -1 if no string was found, otherwise + * the offset at which the string was found. + * @see evaluate_step() + */ + function search_string ( $term, $expression ) + { + // Create a new counter for the brackets. + $brackets = 0; + + // Run through the string. + for ( $i = 0; $i < strlen($term); $i++ ) + { + // Get the character at the position of the string. + $character = substr($term, $i, 1); + + // Check whether it's a breacket. + if ( ( $character == "(" ) || ( $character == "[" ) ) + { + // Increase the number of brackets. + $brackets++; + } + elseif ( ( $character == ")" ) || ( $character == "]" ) ) + { + // Decrease the number of brackets. + $brackets--; + } + elseif ( $brackets == 0 ) + { + // Check whether we can find the expression at this index. + if ( substr($term, $i, strlen($expression)) == $expression ) + { + // Return the current index. + return $i; + } + } + } + + // Check whether we had a valid number of brackets. + if ( $brackets != 0 ) + { + // Display an error message. + $this->display_error("While parsing an XPath expression, in the ". + "predicate \"%s\", there was an invalid number of brackets.", + str_replace($term, "".$term."", $this->xpath)); + } + + // Nothing was found. + return (-1); + } + + /** + * Checks for a valid function name. + * + * This method check whether an expression contains a valid name of an + * XPath function. + * + * @access private + * @author Michael P. Mehl + * @param string $expression Name of the function to be checked. + * @return boolean This method returns true if the given name is a valid + * XPath function name, otherwise false. + * @see evaluate() + */ + function is_function ( $expression ) + { + // Check whether it's in the list of supported functions. + if ( in_array($expression, $this->functions) ) + { + // It's a function. + return true; + } + else + { + // It's not a function. + return false; + } + } + + /** + * Evaluates a step of an XPath expression. + * + * This method tries to evaluate a step from an XPath expression at a + * specific context. + * + * @access private + * @author Michael P. Mehl + * @param string $context Full document path of the context from + * which starting the step should be evaluated. + * @param array $steps Array containing the remaining steps of the + * current XPath expression. + * @return array This method returns an array containing all nodes + * that are the result of evaluating the given XPath step. + * @see evaluate() + */ + function evaluate_step ( $context, $steps ) + { + // Create an empty array for saving the nodes found. + $nodes = array(); + + // Check whether the context is an array of contexts. + if ( is_array($context) ) + { + // Run through the array. + foreach ( $context as $path ) + { + // Call this method for this single path. + $nodes = array_merge($nodes, + $this->evaluate_step($path, $steps)); + } + } + else + { + // Get this step. + $step = array_shift($steps); + + // Create an array to save the new contexts. + $contexts = array(); + + // Get the axis of the current step. + $axis = $this->get_axis($step, $context); + + // Check whether it's a function. + if ( $axis["axis"] == "function" ) + { + // Check whether an array was return by the function. + if ( is_array($axis["node-test"]) ) + { + // Add the results to the list of contexts. + $contexts = array_merge($contexts, $axis["node-test"]); + } + else + { + // Add the result to the list of contexts. + $contexts[] = $axis["node-test"]; + } + } + else + { + // Create the name of the method. + $method = "handle_axis_".str_replace("-", "_", $axis["axis"]); + + // Check whether the axis handler is defined. + if ( !method_exists($this, $method) ) + { + // Display an error message. + $this->display_error("While parsing an XPath expression, ". + "the axis \"%s\" could not be handled, because this ". + "version does not support this axis.", $axis["axis"]); + } + + // Perform an axis action. + $contexts = call_user_method($method, $this, $axis, $context); + + // Check whether there are predicates. + if ( count($axis["predicate"]) > 0 ) + { + // Check whether each node fits the predicates. + $contexts = $this->check_predicates($contexts, + $axis["predicate"]); + } + } + + // Check whether there are more steps left. + if ( count($steps) > 0 ) + { + // Continue the evaluation of the next steps. + $nodes = $this->evaluate_step($contexts, $steps); + } + else + { + // Save the found contexts. + $nodes = $contexts; + } + } + + // Return the nodes found. + return $nodes; + } + + /** + * Evaluates an XPath function + * + * This method evaluates a given XPath function with its arguments on a + * specific node of the document. + * + * @access private + * @author Michael P. Mehl + * @param string $function Name of the function to be evaluated. + * @param string $arguments String containing the arguments being + * passed to the function. + * @param string $node Full path to the document node on which the + * function should be evaluated. + * @return mixed This method returns the result of the evaluation of + * the function. Depending on the function the type of the + * return value can be different. + * @see evaluate() + */ + function evaluate_function ( $function, $arguments, $node ) + { + // Remove whitespaces. + $function = trim($function); + $arguments = trim($arguments); + + // Create the name of the function handling function. + $method = "handle_function_".str_replace("-", "_", $function); + + // Check whether the function handling function is available. + if ( !method_exists($this, $method) ) + { + // Display an error message. + $this->display_error("While parsing an XPath expression, ". + "the function \"%s\" could not be handled, because this ". + "version does not support this function.", $function); + } + + // Return the result of the function. + return call_user_method($method, $this, $node, $arguments); + } + + /** + * Evaluates a predicate on a node. + * + * This method tries to evaluate a predicate on a given node. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the predicate + * should be evaluated. + * @param string $predicate String containing the predicate expression + * to be evaluated. + * @return mixed This method is called recursively. The first call should + * return a boolean value, whether the node matches the predicate + * or not. Any call to the method being made during the recursion + * may also return other types for further processing. + * @see evaluate() + */ + function evaluate_predicate ( $node, $predicate ) + { + // Set the default position and the type of the operator. + $position = 0; + $operator = ""; + + // Run through all operators and try to find them. + foreach ( $this->operators as $expression ) + { + // Check whether a position was already found. + if ( $position <= 0 ) + { + // Try to find the operator. + $position = $this->search_string($predicate, $expression); + + // Check whether a operator was found. + if ( $position > 0 ) + { + // Save the operator. + $operator = $expression; + + // Check whether it's the equal operator. + if ( $operator == "=" ) + { + // Also look for other operators containing the + // equal sign. + if ( $this->search_string($predicate, "!=") == + ( $position - 1 ) ) + { + // Get the new position. + $position = $this->search_string($predicate, "!="); + + // Save the new operator. + $operator = "!="; + } + if ( $this->search_string($predicate, "<=") == + ( $position - 1 ) ) + { + // Get the new position. + $position = $this->search_string($predicate, "<="); + + // Save the new operator. + $operator = "<="; + } + if ( $this->search_string($predicate, ">=") == + ( $position - 1 ) ) + { + // Get the new position. + $position = $this->search_string($predicate, ">="); + + // Save the new operator. + $operator = ">="; + } + } + } + } + } + + // Check whether the operator is a - sign. + if ( $operator == "-" ) + { + // Check whether it's not a function containing a - in its name. + foreach ( $this->functions as $function ) + { + // Check whether there's a - sign in the function name. + //if ( ereg("-", $function) ) + //if ( preg_match("-", $function) ) + if ( preg_match("/-/", $function) ) + { + // Get the position of the - in the function name. + $sign = strpos($function, "-"); + + // Extract a substring from the predicate. + $sub = substr($predicate, $position - $sign, + strlen($function)); + + // Check whether it's the function. + if ( $sub == $function ) + { + // Don't use the operator. + $operator = ""; + $position = -1; + } + } + } + } + elseif ( $operator == "*" ) + { + // Get some substrings. + $character = substr($predicate, $position - 1, 1); + $attribute = substr($predicate, $position - 11, 11); + + // Check whether it's an attribute selection. + if ( ( $character == "@" ) || ( $attribute == "attribute::" ) ) + { + // Don't use the operator. + $operator = ""; + $position = -1; + } + } + + // Check whether an operator was found. + if ( $position > 0 ) + { + // Get the left and the right part of the expression. + $left = substr($predicate, 0, $position); + $right = substr($predicate, $position + strlen($operator)); + + // Remove whitespaces. + $left = trim($left); + $right = trim($right); + + // Evaluate the left and the right part. + $left = $this->evaluate_predicate($node, $left); + $right = $this->evaluate_predicate($node, $right); + + // Check the kind of operator. + switch ( $operator ) + { + case " or ": + // Return the two results connected by an "or". + return ( $left or $right ); + + case " and ": + // Return the two results connected by an "and". + return ( $left and $right ); + + case "=": + // Compare the two results. + return ( $left == $right ); + + case "!=": + // Check whether the two results are not equal. + return ( $left != $right ); + + case "<=": + // Compare the two results. + return ( $left <= $right ); + + case "<": + // Compare the two results. + return ( $left < $right ); + + case ">=": + // Compare the two results. + return ( $left >= $right ); + + case ">": + // Compare the two results. + return ( $left > $right ); + + case "+": + // Return the result by adding one result to the other. + return ( $left + $right ); + + case "-": + // Return the result by decrease one result by the other. + return ( $left - $right ); + + case "*": + // Return a multiplication of the two results. + return ( $left * $right ); + + case " div ": + // Return a division of the two results. + if ( $right == 0 ) + { + // Display an error message. + $this->display_error("While parsing an XPath ". + "predicate, a error due a division by zero ". + "occured."); + } + else + { + // Return the result of the division. + return ( $left / $right ); + } + break; + + case " mod ": + // Return a modulo of the two results. + return ( $left % $right ); + } + } + + // Check whether the predicate is a function. + //if ( ereg("\(", $predicate) ) + //if ( preg_match("\(", $predicate) ) + if ( preg_match("/\(/", $predicate) ) + { + // Get the position of the first bracket. + $start = strpos($predicate, "("); + $end = strpos($predicate, ")", $start); + + // Get everything before, between and after the brackets. + $before = substr($predicate, 0, $start); + $between = substr($predicate, $start + 1, $end - $start - 1); + $after = substr($predicate, $end + 1); + + // Trim each string. + $before = trim($before); + $between = trim($between); + $after = trim($after); + + // Check whether there's something after the bracket. + if ( !empty($after) ) + { + // Display an error message. + $this->display_error("While parsing an XPath expression ". + "there was found an error in the predicate \"%s\", ". + "because after a closing bracket there was found ". + "something unknown.", str_replace($predicate, + "".$predicate."", $this->xpath)); + } + + // Check whether it's a function. + if ( empty($before) && empty($after) ) + { + // Evaluate the content of the brackets. + return $this->evaluate_predicate($node, $between); + } + elseif ( $this->is_function($before) ) + { + // Return the evaluated function. + return $this->evaluate_function($before, $between, $node); + } + else + { + // Display an error message. + $this->display_error("While parsing a predicate in an XPath ". + "expression, a function \"%s\" was found, which is not ". + "yet supported by the parser.", str_replace($before, + "".$before."", $this->xpath)); + } + } + + // Check whether the predicate is just a digit. + //if ( ereg("^[0-9]+(\.[0-9]+)?$", $predicate) || ereg("^\.[0-9]+$", $predicate) ) + //if ( preg_match("^[0-9]+(\.[0-9]+)?$", $predicate) || preg_match("^\.[0-9]+$", $predicate) ) + if ( preg_match("/^[0-9]+(\.[0-9]+)?$/", $predicate) || preg_match("/^\.[0-9]+$/", $predicate) ) + { + // Return the value of the digit. + return doubleval($predicate); + } + + // Check whether it's an XPath expression. + $result = $this->evaluate($predicate, $node); + if ( count($result) > 0 ) + { + // Convert the array. + $result = explode("|", implode("|", $result)); + + // Get the value of the first result. + $value = $this->get_content($result[0]); + + // Return the value. + return $value; + } + + // Return the predicate as a string. + return $predicate; + } + + /** + * Checks whether a node matches predicates. + * + * This method checks whether a list of nodes passed to this method match + * a given list of predicates. + * + * @access private + * @author Michael P. Mehl + * @param array $nodes Array of full paths of all nodes to be tested. + * @param array $predicates Array of predicates to use. + * @return array The array returned by this method contains a list of + * all nodes matching the given predicates. + * @see evaluate_step() + */ + function check_predicates ( $nodes, $predicates ) + { + // Create an empty set of nodes. + $result = array(); + + // Run through all nodes. + foreach ( $nodes as $node ) + { + // Create a variable whether to add this node to the node-set. + $add = true; + + // Run through all predicates. + foreach ( $predicates as $predicate ) + { + // Check whether the predicate is just an number. + //if ( ereg("^[0-9]+$", $predicate) ) + //if ( preg_match("^[0-9]+$", $predicate) ) + if ( preg_match("/^[0-9]+$/", $predicate) ) + { + // Enhance the predicate. + $predicate .= "=position()"; + } + + // Do the predicate check. + $check = $this->evaluate_predicate($node, $predicate); + + // Check whether it's a string. + if ( is_string($check) && ( ( $check == "" ) || + ( $check == $predicate ) ) ) + { + // Set the result to false. + $check = false; + } + + // Check whether it's an integer. + if ( is_int($check) ) + { + // Check whether it's the current position. + if ( $check == $this->handle_function_position($node, "") ) + { + // Set it to true. + $check = true; + } + else + { + // Set it to false. + $check = false; + } + } + + // Check whether the predicate is OK for this node. + $add = $add && $check; + } + + // Check whether to add this node to the node-set. + if ( $add ) + { + // Add the node to the node-set. + $result[] = $node; + } + } + + // Return the array of nodes. + return $result; + } + + /** + * Checks whether a node matches a node-test. + * + * This method checks whether a node in the document matches a given + * node-test. + * + * @access private + * @author Michael P. Mehl + * @param string $context Full path of the node, which should be tested + * for matching the node-test. + * @param string $node_test String containing the node-test for the + * node. + * @return boolean This method returns true if the node matches the + * node-test, otherwise false. + * @see evaluate() + */ + function check_node_test ( $context, $node_test ) + { + // Check whether it's a function. + //if ( ereg("\(", $node_test) ) + if ( preg_match("/\(/", $node_test) ) + { + // Get the type of function to use. + $function = $this->prestr($node_test, "("); + + // Check whether the node fits the method. + switch ( $function ) + { + case "node": + // Add this node to the list of nodes. + return true; + + case "text": + // Check whether the node has some text. + if ( !empty($this->nodes[$context]["text"]) ) + { + // Add this node to the list of nodes. + return true; + } + break; + + case "comment": + // Check whether the node has some comment. + if ( !empty($this->nodes[$context]["comment"]) ) + { + // Add this node to the list of nodes. + return true; + } + break; + + case "processing-instruction": + // Get the literal argument. + $literal = $this->afterstr($axis["node-test"], "("); + + // Cut the literal. + $literal = substr($literal, 0, strlen($literal) - 1); + + // Check whether a literal was given. + if ( !empty($literal) ) + { + // Check whether the node's processing instructions + // are matching the literals given. + if ( $this->nodes[$context] + ["processing-instructions"] == $literal ) + { + // Add this node to the node-set. + return true; + } + } + else + { + // Check whether the node has processing + // instructions. + if ( !empty($this->nodes[$context] + ["processing-instructions"]) ) + { + // Add this node to the node-set. + return true; + } + } + break; + + default: + // Display an error message. + $this->display_error("While parsing an XPath ". + "expression there was found an undefined ". + "function called \"%s\".", + str_replace($function, "".$function."", + $this->xpath)); + } + } + elseif ( $node_test == "*" ) + { + // Add this node to the node-set. + return true; + } + //elseif ( ereg("^[a-zA-Z0-9\-_]+", $node_test) ) + //elseif ( preg_match("^[a-zA-Z0-9\-_]+", $node_test) ) + elseif ( preg_match("/^[a-zA-Z0-9\-_]+/", $node_test) ) + { + // Check whether the node-test can be fulfilled. + if ( $this->nodes[$context]["name"] == $node_test ) + { + // Add this node to the node-set. + return true; + } + } + else + { + // Display an error message. + $this->display_error("While parsing the XPath expression \"%s\" ". + "an empty and therefore invalid node-test has been found.", + $this->xpath); + } + + // Don't add this context. + return false; + } + + /** + * Handles the XPath child axis. + * + * This method handles the XPath child axis. + * + * @access private + * @author Michael P. Mehl + * @param array $axis Array containing information about the axis. + * @param string $context Node from which starting the axis should + * be processed. + * @return array This method returns an array containing all nodes + * that were found during the evaluation of the given axis. + * @see evaluate() + */ + function handle_axis_child ( $axis, $context ) + { + // Create an empty node-set. + $nodes = array(); + + // Get a list of all children. + $children = $this->nodes[$context]["children"]; + + // Check whether there are children. + if ( !empty($children) ) + { + // Run through all children. + foreach ( $children as $child_name => $child_position ) + { + // Run through all childs with this name. + for ( $i = 1; $i <= $child_position; $i++ ) + { + // Create the path of the child. + $child = $context."/".$child_name."[".$i."]"; + + // Check whether + if ( $this->check_node_test($child, $axis["node-test"]) ) + { + // Add the child to the node-set. + $nodes[] = $child; + } + } + } + } + + // Return the nodeset. + return $nodes; + } + + /** + * Handles the XPath parent axis. + * + * This method handles the XPath parent axis. + * + * @access private + * @author Michael P. Mehl + * @param array $axis Array containing information about the axis. + * @param string $context Node from which starting the axis should + * be processed. + * @return array This method returns an array containing all nodes + * that were found during the evaluation of the given axis. + * @see evaluate() + */ + function handle_axis_parent ( $axis, $context ) + { + // Create an empty node-set. + $nodes = array(); + + // Check whether the parent matches the node-test. + if ( $this->check_node_test($this->nodes[$context]["parent"], + $axis["node-test"]) ) + { + // Add this node to the list of nodes. + $nodes[] = $this->nodes[$context]["parent"]; + } + + // Return the nodeset. + return $nodes; + } + + /** + * Handles the XPath attribute axis. + * + * This method handles the XPath attribute axis. + * + * @access private + * @author Michael P. Mehl + * @param array $axis Array containing information about the axis. + * @param string $context Node from which starting the axis should + * be processed. + * @return array This method returns an array containing all nodes + * that were found during the evaluation of the given axis. + * @see evaluate() + */ + function handle_axis_attribute ( $axis, $context ) + { + // Create an empty node-set. + $nodes = array(); + + // Check whether all nodes should be selected. + if ( $axis["node-test"] == "*" ) + { + // Check whether there are attributes. + if ( count($this->nodes[$context]["attributes"]) > 0 ) + { + // Run through the attributes. + foreach ( $this->nodes[$context]["attributes"] as + $key => $value ) + { + // Add this node to the node-set. + $nodes[] = $context."/attribute::".$key; + } + } + } + elseif ( !empty($this->nodes[$context]["attributes"] + [$axis["node-test"]]) ) + { + // Add this node to the node-set. + $nodes[] = $context."/attribute::".$axis["node-test"]; + } + + // Return the nodeset. + return $nodes; + } + + /** + * Handles the XPath self axis. + * + * This method handles the XPath self axis. + * + * @access private + * @author Michael P. Mehl + * @param array $axis Array containing information about the axis. + * @param string $context Node from which starting the axis should + * be processed. + * @return array This method returns an array containing all nodes + * that were found during the evaluation of the given axis. + * @see evaluate() + */ + function handle_axis_self ( $axis, $context ) + { + // Create an empty node-set. + $nodes = array(); + + // Check whether the context match the node-test. + if ( $this->check_node_test($context, $axis["node-test"]) ) + { + // Add this node to the node-set. + $nodes[] = $context; + } + + // Return the nodeset. + return $nodes; + } + + /** + * Handles the XPath descendant axis. + * + * This method handles the XPath descendant axis. + * + * @access private + * @author Michael P. Mehl + * @param array $axis Array containing information about the axis. + * @param string $context Node from which starting the axis should + * be processed. + * @return array This method returns an array containing all nodes + * that were found during the evaluation of the given axis. + * @see evaluate() + */ + function handle_axis_descendant ( $axis, $context ) + { + // Create an empty node-set. + $nodes = array(); + + // Check whether the current node has children. + if ( count($this->nodes[$context]["children"]) > 0 ) + { + // Get a list of children. + $children = $this->nodes[$context]["children"]; + + // Run through all children. + foreach ( $children as $child_name => $child_position ) + { + // Run through all children of this name. + for ( $i = 1; $i <= $child_position; $i++ ) + { + // Create the full path for the children. + $child = $context."/".$child_name."[".$i."]"; + + // Check whether the child matches the node-test. + if ( $this->check_node_test($child, $axis["node-test"]) ) + { + // Add the child to the list of nodes. + $nodes[] = $child; + } + + // Recurse to the next level. + $nodes = array_merge($nodes, + $this->handle_axis_descendant($axis, $child)); + } + } + } + + // Return the nodeset. + return $nodes; + } + + /** + * Handles the XPath ancestor axis. + * + * This method handles the XPath ancestor axis. + * + * @access private + * @author Michael P. Mehl + * @param array $axis Array containing information about the axis. + * @param string $context Node from which starting the axis should + * be processed. + * @return array This method returns an array containing all nodes + * that were found during the evaluation of the given axis. + * @see evaluate() + */ + function handle_axis_ancestor ( $axis, $context ) + { + // Create an empty node-set. + $nodes = array(); + + // Get the parent of the current node. + $parent = $this->nodes[$context]["parent"]; + + // Check whether the parent isn't empty. + if ( !empty($parent) ) + { + // Check whether the parent matches the node-test. + if ( $this->check_node_test($parent, $axis["node-test"]) ) + { + // Add the parent to the list of nodes. + $nodes[] = $parent; + } + + // Handle all other ancestors. + $nodes = array_merge($nodes, + $this->handle_axis_ancestor($axis, $parent)); + } + + // Return the nodeset. + return $nodes; + } + + /** + * Handles the XPath namespace axis. + * + * This method handles the XPath namespace axis. + * + * @access private + * @author Michael P. Mehl + * @param array $axis Array containing information about the axis. + * @param string $context Node from which starting the axis should + * be processed. + * @return array This method returns an array containing all nodes + * that were found during the evaluation of the given axis. + * @see evaluate() + */ + function handle_axis_namespace ( $axis, $context ) + { + // Create an empty node-set. + $nodes = array(); + + // Check whether all nodes should be selected. + if ( !empty($this->nodes[$context]["namespace"]) ) + { + // Add this node to the node-set. + $nodes[] = $context; + } + + // Return the nodeset. + return $nodes; + } + + /** + * Handles the XPath following axis. + * + * This method handles the XPath following axis. + * + * @access private + * @author Michael P. Mehl + * @param array $axis Array containing information about the axis. + * @param string $context Node from which starting the axis should + * be processed. + * @return array This method returns an array containing all nodes + * that were found during the evaluation of the given axis. + * @see evaluate() + */ + function handle_axis_following ( $axis, $context ) + { + // Create an empty node-set. + $nodes = array(); + + // Get the current document position. + $position = $this->nodes[$context]["document-position"]; + + // Create a flag, whether we already found the context node. + $found = false; + + // Run through all nodes of the document. + foreach ( $this->nodes as $node => $data ) + { + // Check whether the context node has already been found. + if ( $found ) + { + // Check whether the position is correct. + if ( $this->nodes[$node]["document-position"] == $position ) + { + // Check whether the node fits the node-test. + if ( $this->check_node_test($node, $axis["node-test"]) ) + { + // Add the node to the list of nodes. + $nodes[] = $node; + } + } + } + + // Check whether this is the context node. + if ( $node == $context ) + { + // After this we'll look for more nodes. + $found = true; + } + } + + // Return the nodeset. + return $nodes; + } + + /** + * Handles the XPath preceding axis. + * + * This method handles the XPath preceding axis. + * + * @access private + * @author Michael P. Mehl + * @param array $axis Array containing information about the axis. + * @param string $context Node from which starting the axis should + * be processed. + * @return array This method returns an array containing all nodes + * that were found during the evaluation of the given axis. + * @see evaluate() + */ + function handle_axis_preceding ( $axis, $context ) + { + // Create an empty node-set. + $nodes = array(); + + // Get the current document position. + $position = $this->nodes[$context]["document-position"]; + + // Create a flag, whether we already found the context node. + $found = true; + + // Run through all nodes of the document. + foreach ( $this->nodes as $node => $data ) + { + // Check whether this is the context node. + if ( $node == $context ) + { + // After this we won't look for more nodes. + $found = false; + } + + // Check whether the context node has already been found. + if ( $found ) + { + // Check whether the position is correct. + if ( $this->nodes[$node]["document-position"] == $position ) + { + // Check whether the node fits the node-test. + if ( $this->check_node_test($node, $axis["node-test"]) ) + { + // Add the node to the list of nodes. + $nodes[] = $node; + } + } + } + } + + // Return the nodeset. + return $nodes; + } + + /** + * Handles the XPath following-sibling axis. + * + * This method handles the XPath following-sibling axis. + * + * @access private + * @author Michael P. Mehl + * @param array $axis Array containing information about the axis. + * @param string $context Node from which starting the axis should + * be processed. + * @return array This method returns an array containing all nodes + * that were found during the evaluation of the given axis. + * @see evaluate() + */ + function handle_axis_following_sibling ( $axis, $context ) + { + // Create an empty node-set. + $nodes = array(); + + // Get all children from the parent. + $siblings = $this->handle_axis_child($axis, + $this->nodes[$context]["parent"]); + + // Create a flag whether the context node was already found. + $found = false; + + // Run through all siblings. + foreach ( $siblings as $sibling ) + { + // Check whether the context node was already found. + if ( $found ) + { + // Check whether the sibling is a real sibling. + if ( $this->nodes[$sibling]["name"] == + $this->nodes[$context]["name"] ) + { + // Check whether the sibling matches the node-test. + if ( $this->check_node_test($sibling, $axis["node-test"]) ) + { + // Add the sibling to the list of nodes. + $nodes[] = $sibling; + } + } + } + + // Check whether this is the context node. + if ( $sibling == $context ) + { + // Continue looking for other siblings. + $found = true; + } + } + + // Return the nodeset. + return $nodes; + } + + /** + * Handles the XPath preceding-sibling axis. + * + * This method handles the XPath preceding-sibling axis. + * + * @access private + * @author Michael P. Mehl + * @param array $axis Array containing information about the axis. + * @param string $context Node from which starting the axis should + * be processed. + * @return array This method returns an array containing all nodes + * that were found during the evaluation of the given axis. + * @see evaluate() + */ + function handle_axis_preceding_sibling ( $axis, $context ) + { + // Create an empty node-set. + $nodes = array(); + + // Get all children from the parent. + $siblings = $this->handle_axis_child($axis, + $this->nodes[$context]["parent"]); + + // Create a flag whether the context node was already found. + $found = true; + + // Run through all siblings. + foreach ( $siblings as $sibling ) + { + // Check whether this is the context node. + if ( $sibling == $context ) + { + // Don't continue looking for other siblings. + $found = false; + } + + // Check whether the context node was already found. + if ( $found ) + { + // Check whether the sibling is a real sibling. + if ( $this->nodes[$sibling]["name"] == + $this->nodes[$context]["name"] ) + { + // Check whether the sibling matches the node-test. + if ( $this->check_node_test($sibling, $axis["node-test"]) ) + { + // Add the sibling to the list of nodes. + $nodes[] = $sibling; + } + } + } + } + + // Return the nodeset. + return $nodes; + } + + /** + * Handles the XPath descendant-or-self axis. + * + * This method handles the XPath descendant-or-self axis. + * + * @access private + * @author Michael P. Mehl + * @param array $axis Array containing information about the axis. + * @param string $context Node from which starting the axis should + * be processed. + * @return array This method returns an array containing all nodes + * that were found during the evaluation of the given axis. + * @see evaluate() + */ + function handle_axis_descendant_or_self ( $axis, $context ) + { + // Create an empty node-set. + $nodes = array(); + + // Read the nodes. + $nodes = array_merge( + $this->handle_axis_descendant($axis, $context), + $this->handle_axis_self($axis, $context)); + + // Return the nodeset. + return $nodes; + } + + /** + * Handles the XPath ancestor-or-self axis. + * + * This method handles the XPath ancestor-or-self axis. + * + * @access private + * @author Michael P. Mehl + * @param array $axis Array containing information about the axis. + * @param string $context Node from which starting the axis should + * be processed. + * @return array This method returns an array containing all nodes + * that were found during the evaluation of the given axis. + * @see evaluate() + */ + function handle_axis_ancestor_or_self ( $axis, $context ) + { + // Create an empty node-set. + $nodes = array(); + + // Read the nodes. + $nodes = array_merge( + $this->handle_axis_ancestor($axis, $context), + $this->handle_axis_self($axis, $context)); + + // Return the nodeset. + return $nodes; + } + + /** + * Handles the XPath function last. + * + * This method handles the XPath function last. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the function + * should be processed. + * @param string $arguments String containing the arguments that were + * passed to the function. + * @return mixed Depending on the type of function being processed this + * method returns different types. + * @see evaluate() + */ + function handle_function_last ( $node, $arguments ) + { + // Calculate the size of the context. + $parent = $this->nodes[$node]["parent"]; + $children = $this->nodes[$parent]["children"]; + $context = $children[$this->nodes[$node]["name"]]; + + // Return the size. + return $context; + } + + /** + * Handles the XPath function position. + * + * This method handles the XPath function position. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the function + * should be processed. + * @param string $arguments String containing the arguments that were + * passed to the function. + * @return mixed Depending on the type of function being processed this + * method returns different types. + * @see evaluate() + */ + function handle_function_position ( $node, $arguments ) + { + // return the context-position. + return $this->nodes[$node]["context-position"]; + } + + /** + * Handles the XPath function count. + * + * This method handles the XPath function count. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the function + * should be processed. + * @param string $arguments String containing the arguments that were + * passed to the function. + * @return mixed Depending on the type of function being processed this + * method returns different types. + * @see evaluate() + */ + function handle_function_count ( $node, $arguments ) + { + // Evaluate the argument of the method as an XPath and return + // the number of results. + return count($this->evaluate($arguments, $node)); + } + + /** + * Handles the XPath function id. + * + * This method handles the XPath function id. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the function + * should be processed. + * @param string $arguments String containing the arguments that were + * passed to the function. + * @return mixed Depending on the type of function being processed this + * method returns different types. + * @see evaluate() + */ + function handle_function_id ( $node, $arguments ) + { + // Trim the arguments. + $arguments = trim($arguments); + + // Now split the arguments. + $arguments = explode(" ", $arguments); + + // Check whether + + // Create a list of nodes. + $nodes = array(); + + // Run through all document node. + foreach ( $this->nodes as $node => $position ) + { + // Check whether the node has the ID we're looking for. + if ( in_array($this->nodes[$node]["attributes"]["id"], + $arguments) ) + { + // Add this node to the list of nodes. + $nodes[] = $node; + } + } + + // Return the list of nodes. + return $nodes; + } + + /** + * Handles the XPath function name. + * + * This method handles the XPath function name. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the function + * should be processed. + * @param string $arguments String containing the arguments that were + * passed to the function. + * @return mixed Depending on the type of function being processed this + * method returns different types. + * @see evaluate() + */ + function handle_function_name ( $node, $arguments ) + { + // Return the name of the node. + return $this->nodes[$node]["name"]; + } + + /** + * Handles the XPath function string. + * + * This method handles the XPath function string. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the function + * should be processed. + * @param string $arguments String containing the arguments that were + * passed to the function. + * @return mixed Depending on the type of function being processed this + * method returns different types. + * @see evaluate() + */ + function handle_function_string ( $node, $arguments ) + { + // Check what type of parameter is given + //if ( ereg("^[0-9]+(\.[0-9]+)?$", $arguments) || ereg("^\.[0-9]+$", $arguments) ) + //if ( preg_match("^[0-9]+(\.[0-9]+)?$", $arguments) || preg_match("^\.[0-9]+$", $arguments) ) + if ( preg_match("/^[0-9]+(\.[0-9]+)?$/", $arguments) || preg_match("/^\.[0-9]+$/", $arguments) ) + { + // Convert the digits to a number. + $number = doubleval($arguments); + + // Return the number. + return strval($number); + } + elseif ( is_bool($arguments) ) + { + // Check whether it's true. + if ( $arguments == true ) + { + // Return true as a string. + return "true"; + } + else + { + // Return false as a string. + return "false"; + } + } + elseif ( !empty($arguments) ) + { + // Use the argument as an XPath. + $result = $this->evaluate($arguments, $node); + + // Get the first argument. + $result = explode("|", implode("|", $result)); + + // Return the first result as a string. + return $result[0]; + } + elseif ( empty($arguments) ) + { + // Return the current node. + return $node; + } + else + { + // Return an empty string. + return ""; + } + } + + /** + * Handles the XPath function concat. + * + * This method handles the XPath function concat. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the function + * should be processed. + * @param string $arguments String containing the arguments that were + * passed to the function. + * @return mixed Depending on the type of function being processed this + * method returns different types. + * @see evaluate() + */ + function handle_function_concat ( $node, $arguments ) + { + // Split the arguments. + $arguments = explode(",", $arguments); + + // Run through each argument and evaluate it. + for ( $i = 0; $i < sizeof($arguments); $i++ ) + { + // Trim each argument. + $arguments[$i] = trim($arguments[$i]); + + // Evaluate it. + $arguments[$i] = $this->evaluate_predicate($node, $arguments[$i]); + } + + // Put the string together. + $arguments = implode("", $arguments); + + // Return the string. + return $arguments; + } + + /** + * Handles the XPath function starts-with. + * + * This method handles the XPath function starts-with. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the function + * should be processed. + * @param string $arguments String containing the arguments that were + * passed to the function. + * @return mixed Depending on the type of function being processed this + * method returns different types. + * @see evaluate() + */ + function handle_function_starts_with ( $node, $arguments ) + { + // Get the arguments. + $first = trim($this->prestr($arguments, ",")); + $second = trim($this->afterstr($arguments, ",")); + + // Evaluate each argument. + $first = $this->evaluate_predicate($node, $first); + $second = $this->evaluate_predicate($node, $second); + + // Check whether the first string starts with the second one. + //if ( ereg("^".$second, $first) ) + //if ( preg_match("^".$second, $first) ) + if ( preg_match("/^".$second."/", $first) ) + { + // Return true. + return true; + } + else + { + // Return false. + return false; + } + } + + /** + * Handles the XPath function contains. + * + * This method handles the XPath function contains. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the function + * should be processed. + * @param string $arguments String containing the arguments that were + * passed to the function. + * @return mixed Depending on the type of function being processed this + * method returns different types. + * @see evaluate() + */ + function handle_function_contains ( $node, $arguments ) + { + // Get the arguments. + $first = trim($this->prestr($arguments, ",")); + $second = trim($this->afterstr($arguments, ",")); + + // Evaluate each argument. + $first = $this->evaluate_predicate($node, $first); + $second = $this->evaluate_predicate($node, $second); + + // Check whether the first string starts with the second one. + //if ( ereg($second, $first) ) + //if ( preg_match($second, $first) ) + if ( preg_match("/^".$second."/", $first) ) + { + // Return true. + return true; + } + else + { + // Return false. + return false; + } + } + + /** + * Handles the XPath function substring-before. + * + * This method handles the XPath function substring-before. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the function + * should be processed. + * @param string $arguments String containing the arguments that were + * passed to the function. + * @return mixed Depending on the type of function being processed this + * method returns different types. + * @see evaluate() + */ + function handle_function_substring_before ( $node, $arguments ) + { + // Get the arguments. + $first = trim($this->prestr($arguments, ",")); + $second = trim($this->afterstr($arguments, ",")); + + // Evaluate each argument. + $first = $this->evaluate_predicate($node, $first); + $second = $this->evaluate_predicate($node, $second); + + // Return the substring. + return $this->prestr(strval($first), strval($second)); + } + + /** + * Handles the XPath function substring-after. + * + * This method handles the XPath function substring-after. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the function + * should be processed. + * @param string $arguments String containing the arguments that were + * passed to the function. + * @return mixed Depending on the type of function being processed this + * method returns different types. + * @see evaluate() + */ + function handle_function_substring_after ( $node, $arguments ) + { + // Get the arguments. + $first = trim($this->prestr($arguments, ",")); + $second = trim($this->afterstr($arguments, ",")); + + // Evaluate each argument. + $first = $this->evaluate_predicate($node, $first); + $second = $this->evaluate_predicate($node, $second); + + // Return the substring. + return $this->afterstr(strval($first), strval($second)); + } + + /** + * Handles the XPath function substring. + * + * This method handles the XPath function substring. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the function + * should be processed. + * @param string $arguments String containing the arguments that were + * passed to the function. + * @return mixed Depending on the type of function being processed this + * method returns different types. + * @see evaluate() + */ + function handle_function_substring ( $node, $arguments ) + { + // Split the arguments. + $arguments = explode(",", $arguments); + + // Run through all arguments. + for ( $i = 0; $i < sizeof($arguments); $i++ ) + { + // Trim the string. + $arguments[$i] = trim($arguments[$i]); + + // Evaluate each argument. + $arguments[$i] = $this->evaluate_predicate($node, $arguments[$i]); + } + + // Check whether a third argument was given. + if ( !empty($arguments[2]) ) + { + // Return the substring. + return substr(strval($arguments[0]), $arguments[1] - 1, + $arguments[2]); + } + else + { + // Return the substring. + return substr(strval($arguments[0]), $arguments[1] - 1); + } + } + + /** + * Handles the XPath function string-length. + * + * This method handles the XPath function string-length. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the function + * should be processed. + * @param string $arguments String containing the arguments that were + * passed to the function. + * @return mixed Depending on the type of function being processed this + * method returns different types. + * @see evaluate() + */ + function handle_function_string_length ( $node, $arguments ) + { + // Trim the argument. + $arguments = trim($arguments); + + // Evaluate the argument. + $arguments = $this->evaluate_predicate($node, $arguments); + + // Return the length of the string. + return strlen(strval($arguments)); + } + + /** + * Handles the XPath function translate. + * + * This method handles the XPath function translate. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the function + * should be processed. + * @param string $arguments String containing the arguments that were + * passed to the function. + * @return mixed Depending on the type of function being processed this + * method returns different types. + * @see evaluate() + */ + function handle_function_translate ( $node, $arguments ) + { + // Split the arguments. + $arguments = explode(",", $arguments); + + // Run through all arguments. + for ( $i = 0; $i < sizeof($arguments); $i++ ) + { + // Trim the argument. + $arguments[$i] = trim($arguments[$i]); + + // Evaluate the argument. + $arguments[$i] = $this->evaluate_predicate($node, $arguments[$i]); + } + + // Return the translated string. + return strtr($arguments[0], $arguments[1], $arguments[2]); + } + + /** + * Handles the XPath function boolean. + * + * This method handles the XPath function boolean. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the function + * should be processed. + * @param string $arguments String containing the arguments that were + * passed to the function. + * @return mixed Depending on the type of function being processed this + * method returns different types. + * @see evaluate() + */ + function handle_function_boolean ( $node, $arguments ) + { + // Trim the arguments. + $arguments = trim($arguments); + + // Check what type of parameter is given + //if ( ereg("^[0-9]+(\.[0-9]+)?$", $arguments) || ereg("^\.[0-9]+$", $arguments) ) + //if ( preg_match("^[0-9]+(\.[0-9]+)?$", $arguments) || preg_match("^\.[0-9]+$", $arguments) ) + if ( preg_match("/^[0-9]+(\.[0-9]+)?$/", $arguments) || preg_match("/^\.[0-9]+$/", $arguments) ) + { + // Convert the digits to a number. + $number = doubleval($arguments); + + // Check whether the number zero. + if ( $number == 0 ) + { + // Return false. + return false; + } + else + { + // Return true. + return true; + } + } + elseif ( empty($arguments) ) + { + // Sorry, there were no arguments. + return false; + } + else + { + // Try to evaluate the argument as an XPath. + $result = $this->evaluate($arguments, $node); + + // Check whether we found something. + if ( count($result) > 0 ) + { + // Return true. + return true; + } + else + { + // Return false. + return false; + } + } + } + + /** + * Handles the XPath function not. + * + * This method handles the XPath function not. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the function + * should be processed. + * @param string $arguments String containing the arguments that were + * passed to the function. + * @return mixed Depending on the type of function being processed this + * method returns different types. + * @see evaluate() + */ + function handle_function_not ( $node, $arguments ) + { + // Trim the arguments. + $arguments = trim($arguments); + + // Return the negative value of the content of the brackets. + return !$this->evaluate_predicate($node, $arguments); + } + + /** + * Handles the XPath function true. + * + * This method handles the XPath function true. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the function + * should be processed. + * @param string $arguments String containing the arguments that were + * passed to the function. + * @return mixed Depending on the type of function being processed this + * method returns different types. + * @see evaluate() + */ + function handle_function_true ( $node, $arguments ) + { + // Return true. + return true; + } + + /** + * Handles the XPath function false. + * + * This method handles the XPath function false. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the function + * should be processed. + * @param string $arguments String containing the arguments that were + * passed to the function. + * @return mixed Depending on the type of function being processed this + * method returns different types. + * @see evaluate() + */ + function handle_function_false ( $node, $arguments ) + { + // Return false. + return false; + } + + /** + * Handles the XPath function lang. + * + * This method handles the XPath function lang. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the function + * should be processed. + * @param string $arguments String containing the arguments that were + * passed to the function. + * @return mixed Depending on the type of function being processed this + * method returns different types. + * @see evaluate() + */ + function handle_function_lang ( $node, $arguments ) + { + // Trim the arguments. + $arguments = trim($arguments); + + // Check whether the node has an language attribute. + if ( empty($this->nodes[$node]["attributes"]["xml:lang"]) ) + { + // Run through the ancestors. + while ( !empty($node) ) + { + // Select the parent node. + $node = $this->nodes[$node]["parent"]; + + // Check whether there's a language definition. + if ( !empty($this->nodes[$node]["attributes"]["xml:lang"]) ) + { + // Check whether it's the language, the user asks for. + //if ( eregi("^".$arguments, $this->nodes[$node] + // ["attributes"]["xml:lang"]) ) + //if ( preg_match("^/i".$arguments, $this->nodes[$node] + if ( preg_match("/^".$arguments."/i", $this->nodes[$node] + ["attributes"]["xml:lang"]) ) + { + // Return true. + return true; + } + else + { + // Return false. + return false; + } + } + } + + // Return false. + return false; + } + else + { + // Check whether it's the language, the user asks for. + //if ( eregi("^".$arguments, $this->nodes[$node]["attributes"] + // ["xml:lang"]) ) + //if ( preg_match("^/i".$arguments, $this->nodes[$node]["attributes"] + if ( preg_match("/^".$arguments."/i", $this->nodes[$node]["attributes"] + ["xml:lang"]) ) + { + // Return true. + return true; + } + else + { + // Return false. + return false; + } + } + } + + /** + * Handles the XPath function number. + * + * This method handles the XPath function number. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the function + * should be processed. + * @param string $arguments String containing the arguments that were + * passed to the function. + * @return mixed Depending on the type of function being processed this + * method returns different types. + * @see evaluate() + */ + function handle_function_number ( $node, $arguments ) + { + // Check the type of argument. + //if ( ereg("^[0-9]+(\.[0-9]+)?$", $arguments) || + // ereg("^\.[0-9]+$", $arguments) ) + //if ( preg_match("^[0-9]+(\.[0-9]+)?$", $arguments) || preg_match("^\.[0-9]+$", $arguments) ) + if ( preg_match("/^[0-9]+(\.[0-9]+)?$/", $arguments) || preg_match("/^\.[0-9]+$/", $arguments) ) + { + // Return the argument as a number. + return doubleval($arguments); + } + elseif ( is_bool($arguments) ) + { + // Check whether it's true. + if ( $arguments == true ) + { + // Return 1. + return 1; + } + else + { + // Return 0. + return 0; + } + } + } + + /** + * Handles the XPath function sum. + * + * This method handles the XPath function sum. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the function + * should be processed. + * @param string $arguments String containing the arguments that were + * passed to the function. + * @return mixed Depending on the type of function being processed this + * method returns different types. + * @see evaluate() + */ + function handle_function_sum ( $node, $arguments ) + { + // Trim the arguments. + $arguments = trim($arguments); + + // Evaluate the arguments as an XPath expression. + $results = $this->evaluate($arguments, $node); + + // Create a variable to save the sum. + $sum = 0; + + // Run through all results. + foreach ( $results as $result ) + { + // Get the value of the node. + $result = $this->get_content($result); + + // Add it to the sum. + $sum += doubleval($result); + } + + // Return the sum. + return $sum; + } + + /** + * Handles the XPath function floor. + * + * This method handles the XPath function floor. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the function + * should be processed. + * @param string $arguments String containing the arguments that were + * passed to the function. + * @return mixed Depending on the type of function being processed this + * method returns different types. + * @see evaluate() + */ + function handle_function_floor ( $node, $arguments ) + { + // Trim the arguments. + $arguments = trim($arguments); + + // Convert the arguments to a number. + $arguments = doubleval($arguments); + + // Return the result + return floor($arguments); + } + + /** + * Handles the XPath function ceiling. + * + * This method handles the XPath function ceiling. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the function + * should be processed. + * @param string $arguments String containing the arguments that were + * passed to the function. + * @return mixed Depending on the type of function being processed this + * method returns different types. + * @see evaluate() + */ + function handle_function_ceiling ( $node, $arguments ) + { + // Trim the arguments. + $arguments = trim($arguments); + + // Convert the arguments to a number. + $arguments = doubleval($arguments); + + // Return the result + return ceil($arguments); + } + + /** + * Handles the XPath function round. + * + * This method handles the XPath function round. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the function + * should be processed. + * @param string $arguments String containing the arguments that were + * passed to the function. + * @return mixed Depending on the type of function being processed this + * method returns different types. + * @see evaluate() + */ + function handle_function_round ( $node, $arguments ) + { + // Trim the arguments. + $arguments = trim($arguments); + + // Convert the arguments to a number. + $arguments = doubleval($arguments); + + // Return the result + return round($arguments); + } + + /** + * Handles the XPath function text. + * + * This method handles the XPath function text. + * + * @access private + * @author Michael P. Mehl + * @param string $node Full path of the node on which the function + * should be processed. + * @param string $arguments String containing the arguments that were + * passed to the function. + * @return mixed Depending on the type of function being processed this + * method returns different types. + * @see evaluate() + */ + function handle_function_text ( $node, $arguments ) + { + // Return the character data of the node. + return $this->nodes[$node]["text"]; + } + + /** + * Retrieves a substring before a delimiter. + * + * This method retrieves everything from a string before a given delimiter, + * not including the delimiter. + * + * @access private + * @author Michael P. Mehl + * @param string $string String, from which the substring should be + * extracted. + * @param string $delimiter String containing the delimiter to use. + * @return string Substring from the original string before the + * delimiter. + * @see afterstr() + */ + function prestr ( $string, $delimiter ) + { + // Return the substring. + return substr($string, 0, strlen($string) - strlen(strstr($string, + "$delimiter"))); + } + + /** + * Retrieves a substring after a delimiter. + * + * This method retrieves everything from a string after a given delimiter, + * not including the delimiter. + * + * @access private + * @author Michael P. Mehl + * @param string $string String, from which the substring should be + * extracted. + * @param string $delimiter String containing the delimiter to use. + * @return string Substring from the original string after the + * delimiter. + * @see prestr() + */ + function afterstr ( $string, $delimiter ) + { + // Return the substring. + return substr($string, + strpos($string, $delimiter) + strlen($delimiter)); + } + + /** + * Displays an error message. + * + * This method displays an error messages and stops the execution of the + * script. This method is called exactly in the same way as the printf + * function. The first argument contains the message and additional + * arguments of various types may be passed to this method to be inserted + * into the message. + * + * @access private + * @author Michael P. Mehl + * @param string $message Error message to be displayed. + */ + function display_error ( $message ) + { + // Check whether more than one argument was given. + if ( func_num_args() > 1 ) + { + // Read all arguments. + $arguments = func_get_args(); + + // Create a new string for the inserting command. + $command = "\$message = sprintf(\$message, "; + + // Run through the array of arguments. + for ( $i = 1; $i < sizeof($arguments); $i++ ) + { + // Add the number of the argument to the command. + $command .= "\$arguments[".$i."], "; + } + + // Replace the last separator. + //$command = eregi_replace(", $", ");", $command); + $command = preg_replace("/, $/i", ");", $command); + + // Execute the command. + eval($command); + } + + // Display the error message. + echo "phpXML error: ".$message; + + // End the execution of this script. + exit; + } + + //added by ddaemiri, 2007.05.28 + //entity °¡ Çϳª¸¸ Àִٰí °¡Á¤!! ¹迭ÀÇ ù¹ø°¸¸ °¡Á®¿È. + function get_content_fetch ( $path ) + { + $e = $this->evaluate($path); + $content = $this->get_content($e[0]); + $a = $this->get_attributes_patch( $path, "urlencode" ); + if( $a != "" ) + $content = urldecode( $content ); + return $content; + } + function get_attributes_patch ( $path, $attr ) + { + $e = $this->evaluate($path); + $a = $this->get_attributes($e[0]); + return $a[$attr]; + } + +} + +?> \ No newline at end of file diff --git a/shop/inicis/orderform.1.php b/shop/inicis/orderform.1.php new file mode 100644 index 000000000..859b3d343 --- /dev/null +++ b/shop/inicis/orderform.1.php @@ -0,0 +1,127 @@ + + + + + + + + \ No newline at end of file diff --git a/shop/inicis/orderform.2.php b/shop/inicis/orderform.2.php new file mode 100644 index 000000000..81eb3b188 --- /dev/null +++ b/shop/inicis/orderform.2.php @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/shop/inicis/orderform.3.php b/shop/inicis/orderform.3.php new file mode 100644 index 000000000..8d46ff60c --- /dev/null +++ b/shop/inicis/orderform.3.php @@ -0,0 +1,20 @@ + + + + + + + \ No newline at end of file diff --git a/shop/inicis/orderform.4.php b/shop/inicis/orderform.4.php new file mode 100644 index 000000000..d054abec9 --- /dev/null +++ b/shop/inicis/orderform.4.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/shop/inicis/orderform.5.php b/shop/inicis/orderform.5.php new file mode 100644 index 000000000..d054abec9 --- /dev/null +++ b/shop/inicis/orderform.5.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/shop/inicis/orderpartcancel.inc.php b/shop/inicis/orderpartcancel.inc.php new file mode 100644 index 000000000..23d127167 --- /dev/null +++ b/shop/inicis/orderpartcancel.inc.php @@ -0,0 +1,79 @@ +SetField("type", "repay"); // 고정 (절대 수정 불가) +$inipay->SetField("pgid", "INIphpRPAY"); // 고정 (절대 수정 불가) +$inipay->SetField("subpgip", "203.238.3.10"); // 고정 +$inipay->SetField("mid", $default['de_inicis_mid']); // 상점아이디 +$inipay->SetField("admin", $default['de_inicis_admin_key']); //비대칭 사용키 키패스워드 +$inipay->SetField("oldtid", $oldtid); // 취소할 거래의 거래아이디 +$inipay->SetField("currency", $currency); // 화폐단위 +$inipay->SetField("price", $price); // 취소금액 +$inipay->SetField("confirm_price", $confirm_price); // 승인요청금액 +$inipay->SetField("buyeremail", $buyeremail); // 구매자 이메일 주소 +$inipay->SetField("tax", $tax); // 부가세금액 +$inipay->SetField("taxfree", $taxfree); // 비과세금액 + +/****************** + * 4. 재승인 요청 * + ******************/ +$inipay->startAction(); + + +/******************************************************************* + * 5. 재승인 결과 * + * * + * 신거래번호 : $inipay->getResult('TID') * + * 결과코드 : $inipay->getResult('ResultCode') ("00"이면 재승인 성공) * + * 결과내용 : $inipay->getResult('ResultMsg') (재승인결과에 대한 설명) * + * 원거래 번호 : $inipay->getResult('PRTC_TID') * + * 최종결제 금액 : $inipay->getResult('PRTC_Remains') * + * 부분취소 금액 : $inipay->getResult('PRTC_Price') * + * 부분취소,재승인 구분값 : $inipay->getResult('PRTC_Type') * + * ("0" : 재승인, "1" : 부분취소) * + * 부분취소(재승인) 요청횟수 : $inipay->getResult('PRTC_Cnt') * + *******************************************************************/ + + if($inipay->getResult('ResultCode') == '00') { + // 환불금액기록 + $tno = $inipay->getResult('PRTC_TID'); + $re_price = $inipay->getResult('PRTC_Price'); + + $sql = " update {$g5['g5_shop_order_table']} + set od_refund_price = od_refund_price + '$re_price', + od_shop_memo = concat(od_shop_memo, \"$mod_memo\") + where od_id = '{$od['od_id']}' + and od_tno = '$tno' "; + sql_query($sql); + + // 미수금 등의 정보 업데이트 + $info = get_order_info($od_id); + + $sql = " update {$g5['g5_shop_order_table']} + set od_misu = '{$info['od_misu']}', + od_tax_mny = '{$info['od_tax_mny']}', + od_vat_mny = '{$info['od_vat_mny']}', + od_free_mny = '{$info['od_free_mny']}' + where od_id = '$od_id' "; + sql_query($sql); + } else { + alert(iconv_utf8($inipay->GetResult("ResultMsg")).' 코드 : '.$inipay->GetResult("ResultCode")); + } +?> \ No newline at end of file diff --git a/shop/inicis/taxsave_form.php b/shop/inicis/taxsave_form.php new file mode 100644 index 000000000..dc49112a8 --- /dev/null +++ b/shop/inicis/taxsave_form.php @@ -0,0 +1,197 @@ + + + + +
        +

        + +
        +

        주문정보

        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        주문 번호
        상품 정보
        주문자 이름
        주문자 E-Mail
        주문자 전화번호
        +
        +
        + +
        +

        현금영수증 발급 정보

        + +
        + + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        원 거래 시각
        발행 용도 + + + + +
        + + + ("-" 생략) +
        거래금액 총합원
        공급가액원
        봉사료원
        부가가치세원
        +
        + +
        + + + + +
        + +
        +
        + +
        \ No newline at end of file diff --git a/shop/inicis/taxsave_result.php b/shop/inicis/taxsave_result.php new file mode 100644 index 000000000..f3db4bbdf --- /dev/null +++ b/shop/inicis/taxsave_result.php @@ -0,0 +1,193 @@ +개인결제 내역이 존재하지 않습니다.

        '); + + if($od['pp_cash'] == 1) + alert('이미 등록된 현금영수증 입니다.'); + + $buyername = $od['pp_name']; + $goodname = $od['pp_name'].'님 개인결제'; + $amt_tot = (int)$od['pp_receipt_price']; + $amt_sup = (int)round(($amt_tot * 10) / 11); + $amt_svc = 0; + $amt_tax = (int)($amt_tot - $amt_sup); +} else { + $od = sql_fetch(" select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' "); + if (!$od) + die('

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

        '); + + if($od['od_cash'] == 1) + alert('이미 등록된 현금영수증 입니다.'); + + $buyername = $od['od_name']; + $goods = get_goods($od['od_id']); + $goodname = $goods['full_name']; + $amt_tot = (int)$od['od_tax_mny'] + (int)$od['od_vat_mny'] + (int)$od['od_free_mny']; + $amt_sup = (int)$od['od_tax_mny'] + (int)$od['od_free_mny']; + $amt_tax = (int)$od['od_vat_mny']; + $amt_svc = 0; +} + + +$reg_num = $id_info; +$useopt = $tr_code; +$currency = 'WON'; + +/********************* + * 3. 발급 정보 설정 * + *********************/ +$inipay->SetField("type" ,"receipt"); // 고정 +$inipay->SetField("pgid" ,"INIphpRECP"); // 고정 +$inipay->SetField("paymethod" ,"CASH"); // 고정 (요청분류) +$inipay->SetField("currency" ,$currency); // 화폐단위 (고정) +/************************************************************************************************** +* admin 은 키패스워드 변수명입니다. 수정하시면 안됩니다. 1111의 부분만 수정해서 사용하시기 바랍니다. +* 키패스워드는 상점관리자 페이지(https://iniweb.inicis.com)의 비밀번호가 아닙니다. 주의해 주시기 바랍니다. +* 키패스워드는 숫자 4자리로만 구성됩니다. 이 값은 키파일 발급시 결정됩니다. +* 키패스워드 값을 확인하시려면 상점측에 발급된 키파일 안의 readme.txt 파일을 참조해 주십시오. +**************************************************************************************************/ +$inipay->SetField("admin" ,$default['de_inicis_admin_key']); // 키패스워드(상점아이디에 따라 변경) +$inipay->SetField("mid" ,$default['de_inicis_mid']); // 상점아이디 +$inipay->SetField("goodname" ,iconv_euckr($goodname)); // 상품명 +$inipay->SetField("cr_price" ,$amt_tot); // 총 현금결제 금액 +$inipay->SetField("sup_price" ,$amt_sup); // 공급가액 +$inipay->SetField("tax" ,$amt_tax); // 부가세 +$inipay->SetField("srvc_price" ,$amt_svc); // 봉사료 +$inipay->SetField("buyername" ,iconv_euckr($buyername)); // 구매자 성명 +$inipay->SetField("buyeremail" ,$buyeremail); // 구매자 이메일 주소 +$inipay->SetField("buyertel" ,$buyertel); // 구매자 전화번호 +$inipay->SetField("reg_num" ,$reg_num); // 현금결제자 주민등록번호 +$inipay->SetField("useopt" ,$useopt); // 현금영수증 발행용도 ("1" - 소비자 소득공제용, "2" - 사업자 지출증빙용) +$inipay->SetField("companynumber" ,$companynumber); // 서브몰 사업자번호 + + +/**************** + * 4. 발급 요청 * + ****************/ +$inipay->startAction(); + + +/******************************************************************************** + * 5. 발급 결과 * + * * + * 결과코드 : $inipay->GetResult('ResultCode') ("00" 이면 발행 성공) * + * 승인번호 : $inipay->GetResult('ApplNum') (현금영수증 발행 승인번호) * + * 승인날짜 : $inipay->GetResult('ApplDate') (YYYYMMDD) * + * 승인시각 : $inipay->GetResult('ApplTime') (HHMMSS) * + * 거래번호 : $inipay->GetResult('TID') * + * 총현금결제 금액 : $inipay->GetResult('CSHR_ApplPrice') * + * 공급가액 : $inipay->GetResult('CSHR_SupplyPrice') * + * 부가세 : $inipay->GetResult('CSHR_Tax') * + * 봉사료 : $inipay->GetResult('CSHR_ServicePrice') * + * 사용구분 : $inipay->GetResult('CSHR_Type') * + ********************************************************************************/ + + +// DB 반영 +if($inipay->GetResult('ResultCode') == '00') { + $cash_no = $inipay->GetResult('ApplNum'); + + $cash = array(); + $cash['TID'] = $inipay->GetResult('TID'); + $cash['ApplNum'] = $inipay->GetResult('ApplNum'); + $cash['ApplDate'] = $inipay->GetResult('ApplDate'); + $cash['ApplTime'] = $inipay->GetResult('ApplTime'); + $cash['CSHR_Type'] = $inipay->GetResult('CSHR_Type'); + $cash_info = serialize($cash); + + if($tx == 'personalpay') { + $sql = " update {$g5['g5_shop_personalpay_table']} + set pp_cash = '1', + pp_cash_no = '$cash_no', + pp_cash_info = '$cash_info' + where pp_id = '$od_id' "; + } else { + $sql = " update {$g5['g5_shop_order_table']} + set od_cash = '1', + od_cash_no = '$cash_no', + od_cash_info = '$cash_info' + where od_id = '$od_id' "; + } + + $result = sql_query($sql, false); + + if(!$result) + include G5_SHOP_PATH.'/inicis/inipay_cancel.php'; +} + +$g5['title'] = '현금영수증 발급'; +include_once(G5_PATH.'/head.sub.php'); +?> + + + +
        +

        현금영수증 - KG이니시스

        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        결과코드GetResult('ResultCode'); ?>
        결과 메세지GetResult('ResultMsg')); ?>
        현금영수증 거래번호GetResult('TID'); ?>
        현금영수증 승인번호GetResult('ApplNum'); ?>
        승인시간GetResult('ApplDate').$inipay->GetResult('ApplTime')); ?>
        현금영수증 URL + +

        영수증 확인은 실 등록의 경우에만 가능합니다.

        +
        +
        + +
        + + \ No newline at end of file diff --git a/shop/item.php b/shop/item.php new file mode 100644 index 000000000..d6949499d --- /dev/null +++ b/shop/item.php @@ -0,0 +1,269 @@ + 0) { + for ($i=1; $i<=$tv_idx; $i++) { + if (get_session("ss_tv[$i]") == $it_id) { + $saved = true; + break; + } + } +} + +if (!$saved) { + $tv_idx++; + set_session("ss_tv_idx", $tv_idx); + set_session("ss_tv[$tv_idx]", $it_id); +} +// 오늘 본 상품 저장 끝 + +// 조회수 증가 +if (get_cookie('ck_it_id') != $it_id) { + sql_query(" update {$g5['g5_shop_item_table']} set it_hit = it_hit + 1 where it_id = '$it_id' "); // 1증가 + set_cookie("ck_it_id", $it_id, time() + 3600); // 1시간동안 저장 +} + +// 스킨경로 +$skin_dir = G5_SHOP_SKIN_PATH; +$ca_dir_check = true; + +if($it['it_skin']) { + if(preg_match('#^theme/(.+)$#', $it['it_skin'], $match)) + $skin_dir = G5_THEME_PATH.'/'.G5_SKIN_DIR.'/shop/'.$match[1]; + else + $skin_dir = G5_PATH.'/'.G5_SKIN_DIR.'/shop/'.$it['it_skin']; + + if(is_dir($skin_dir)) { + $form_skin_file = $skin_dir.'/item.form.skin.php'; + + if(is_file($form_skin_file)) + $ca_dir_check = false; + } +} + +if($ca_dir_check) { + if($ca['ca_skin_dir']) { + if(preg_match('#^theme/(.+)$#', $ca['ca_skin_dir'], $match)) + $skin_dir = G5_THEME_PATH.'/'.G5_SKIN_DIR.'/shop/'.$match[1]; + else + $skin_dir = G5_PATH.'/'.G5_SKIN_DIR.'/shop/'.$ca['ca_skin_dir']; + + if(is_dir($skin_dir)) { + $form_skin_file = $skin_dir.'/item.form.skin.php'; + + if(!is_file($form_skin_file)) + $skin_dir = G5_SHOP_SKIN_PATH; + } else { + $skin_dir = G5_SHOP_SKIN_PATH; + } + } +} + +define('G5_SHOP_CSS_URL', str_replace(G5_PATH, G5_URL, $skin_dir)); + +$g5['title'] = $it['it_name'].' > '.$it['ca_name']; + +// 분류 상단 코드가 있으면 출력하고 없으면 기본 상단 코드 출력 +if ($ca['ca_include_head']) + @include_once($ca['ca_include_head']); +else + include_once(G5_SHOP_PATH.'/_head.php'); + +// 분류 위치 +// HOME > 1단계 > 2단계 ... > 6단계 분류 +$ca_id = $it['ca_id']; +$nav_skin = $skin_dir.'/navigation.skin.php'; +if(!is_file($nav_skin)) + $nav_skin = G5_SHOP_SKIN_PATH.'/navigation.skin.php'; +include $nav_skin; + +// 이 분류에 속한 하위분류 출력 +$cate_skin = $skin_dir.'/listcategory.skin.php'; +if(!is_file($cate_skin)) + $cate_skin = G5_SHOP_SKIN_PATH.'/listcategory.skin.php'; +include $cate_skin; + +if ($is_admin) { + echo ''; +} +?> + + +'.conv_content($it['it_head_html'], 1).''; + +// 보안서버경로 +if (G5_HTTPS_DOMAIN) + $action_url = G5_HTTPS_DOMAIN.'/'.G5_SHOP_DIR.'/cartupdate.php'; +else + $action_url = './cartupdate.php'; + +// 이전 상품보기 +$sql = " select it_id, it_name from {$g5['g5_shop_item_table']} where it_id > '$it_id' and SUBSTRING(ca_id,1,4) = '".substr($it['ca_id'],0,4)."' and it_use = '1' order by it_id asc limit 1 "; +$row = sql_fetch($sql); +if ($row['it_id']) { + $prev_title = '이전상품 '.$row['it_name'].''; + $prev_href = ''; + $prev_href2 = ''.PHP_EOL; +} else { + $prev_title = ''; + $prev_href = ''; + $prev_href2 = ''; +} + +// 다음 상품보기 +$sql = " select it_id, it_name from {$g5['g5_shop_item_table']} where it_id < '$it_id' and SUBSTRING(ca_id,1,4) = '".substr($it['ca_id'],0,4)."' and it_use = '1' order by it_id desc limit 1 "; +$row = sql_fetch($sql); +if ($row['it_id']) { + $next_title = '다음 상품 '.$row['it_name'].''; + $next_href = ''; + $next_href2 = ''.PHP_EOL; +} else { + $next_title = ''; + $next_href = ''; + $next_href2 = ''; +} + +// 고객선호도 별점수 +$star_score = get_star_image($it['it_id']); + +// 관리자가 확인한 사용후기의 개수를 얻음 +$sql = " select count(*) as cnt from `{$g5['g5_shop_item_use_table']}` where it_id = '{$it_id}' and is_confirm = '1' "; +$row = sql_fetch($sql); +$item_use_count = $row['cnt']; + +// 상품문의의 개수를 얻음 +$sql = " select count(*) as cnt from `{$g5['g5_shop_item_qa_table']}` where it_id = '{$it_id}' "; +$row = sql_fetch($sql); +$item_qa_count = $row['cnt']; + +// 관련상품의 개수를 얻음 +if($default['de_rel_list_use']) { + $sql = " select count(*) as cnt from {$g5['g5_shop_item_relation_table']} a left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id and b.it_use='1') where a.it_id = '{$it['it_id']}' "; + $row = sql_fetch($sql); + $item_relation_count = $row['cnt']; +} + +// 소셜 관련 +$sns_title = get_text($it['it_name']).' | '.get_text($config['cf_title']); +$sns_url = G5_SHOP_URL.'/item.php?it_id='.$it['it_id']; +$sns_share_links .= get_sns_share_link('facebook', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/sns_fb_s.png').' '; +$sns_share_links .= get_sns_share_link('twitter', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/sns_twt_s.png').' '; +$sns_share_links .= get_sns_share_link('googleplus', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/sns_goo_s.png'); + +// 상품품절체크 +if(G5_SOLDOUT_CHECK) + $is_soldout = is_soldout($it['it_id']); + +// 주문가능체크 +$is_orderable = true; +if(!$it['it_use'] || $it['it_tel_inq'] || $is_soldout) + $is_orderable = false; + +if($is_orderable) { + // 선택 옵션 + $option_item = get_item_options($it['it_id'], $it['it_option_subject']); + + // 추가 옵션 + $supply_item = get_item_supply($it['it_id'], $it['it_supply_subject']); + + // 상품 선택옵션 수 + $option_count = 0; + if($it['it_option_subject']) { + $temp = explode(',', $it['it_option_subject']); + $option_count = count($temp); + } + + // 상품 추가옵션 수 + $supply_count = 0; + if($it['it_supply_subject']) { + $temp = explode(',', $it['it_supply_subject']); + $supply_count = count($temp); + } +} + +function pg_anchor($anc_id) { + global $default; + global $item_use_count, $item_qa_count, $item_relation_count; +?> + + + + + + + +
        + + + + + +
        + + + + diff --git a/shop/itembuy.php b/shop/itembuy.php new file mode 100644 index 000000000..e5b1e278f --- /dev/null +++ b/shop/itembuy.php @@ -0,0 +1,73 @@ + 1) + alert(get_text($it['it_name']).' 상품은 최소 '.number_format($it['it_buy_min_qty']).' 이상 구매하셔야 합니다.\\n상품페이지에서 다시 주문해 주십시오.', G5_SHOP_URL.'/item.php?it_id='.$it_id); + +// 옵션정보 +if($io_id && $it['it_option_subject']) { + $sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '$it_id' and io_id = '$io_id' "; + $opt = sql_fetch($sql); + + $subj = explode(',', $it['it_option_subject']); + $arr_opt = explode(chr(30), $io_id); + + if(count($subj) != count($arr_opt)) + alert('상품의 옵션정보가 올바르지 않습니다.\\n상품페이지에서 다시 주문해 주십시오.', G5_SHOP_URL.'/item.php?it_id='.$it_id); + + $io_value = ''; + $sep = ''; + for($n=0; $n 1 && $it['it_sc_method'] == 1) + $ct_send_cost = 1; // 착불 + +$_POST['it_id'][0] = $it['it_id']; +$_POST['io_id'][$it['it_id']][0] = $opt['io_id']; +$_POST['io_type'][$it['it_id']][0] = 0; +$_POST['ct_qty'][$it['it_id']][0] = 1; +$_POST['io_value'][$it['it_id']][0] = $io_value; +$_POST['ct_send_cost'] = $ct_send_cost; + +include_once(G5_SHOP_PATH.'/cartupdate.php'); +?> \ No newline at end of file diff --git a/shop/iteminfo.php b/shop/iteminfo.php new file mode 100644 index 000000000..f9eefe675 --- /dev/null +++ b/shop/iteminfo.php @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/shop/itemoption.php b/shop/itemoption.php new file mode 100644 index 000000000..0ffe287eb --- /dev/null +++ b/shop/itemoption.php @@ -0,0 +1,59 @@ +선택'; +$opt = array(); + +for($i=0; $row=sql_fetch_array($result); $i++) { + $val = explode(chr(30), $row['io_id']); + $key = $idx + 1; + + if(!strlen($val[$key])) + continue; + + $continue = false; + foreach($opt as $v) { + if(strval($v) === strval($val[$key])) { + $continue = true; + break; + } + } + if($continue) + continue; + + $opt[] = strval($val[$key]); + + if($key + 1 < $sel_count) { + $str .= PHP_EOL.''; + } else { + if($row['io_price'] >= 0) + $price = '  + '.number_format($row['io_price']).'원'; + else + $price = '   '.number_format($row['io_price']).'원'; + + $io_stock_qty = get_option_stock_qty($it_id, $row['io_id'], $row['io_type']); + + if($io_stock_qty < 1) + $soldout = '  [품절]'; + else + $soldout = ''; + + $str .= PHP_EOL.''; + } +} + +echo $str; +?> \ No newline at end of file diff --git a/shop/itemqa.php b/shop/itemqa.php new file mode 100644 index 000000000..274131f88 --- /dev/null +++ b/shop/itemqa.php @@ -0,0 +1,76 @@ + 1) { + $str .= '처음'.PHP_EOL; + } + + $start_page = ( ( (int)( ($cur_page - 1 ) / $write_pages ) ) * $write_pages ) + 1; + $end_page = $start_page + $write_pages - 1; + + if ($end_page >= $total_page) $end_page = $total_page; + + if ($start_page > 1) $str .= '이전'.PHP_EOL; + + if ($total_page > 1) { + for ($k=$start_page;$k<=$end_page;$k++) { + if ($cur_page != $k) + $str .= ''.$k.'페이지'.PHP_EOL; + else + $str .= '열린'.$k.'페이지'.PHP_EOL; + } + } + + if ($total_page > $end_page) $str .= '다음'.PHP_EOL; + + if ($cur_page < $total_page) { + $str .= '맨끝'.PHP_EOL; + } + + if ($str) + return ""; + else + return ""; +} + +$itemqa_list = "./itemqalist.php"; +$itemqa_form = "./itemqaform.php?it_id=".$it_id; +$itemqa_formupdate = "./itemqaformupdate.php?it_id=".$it_id; + +$sql_common = " from `{$g5['g5_shop_item_qa_table']}` where it_id = '{$it_id}' "; + +// 테이블의 전체 레코드수만 얻음 +$sql = " select COUNT(*) as cnt " . $sql_common; +$row = sql_fetch($sql); +$total_count = $row['cnt']; + +$rows = 5; +$total_page = ceil($total_count / $rows); // 전체 페이지 계산 +if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) +$from_record = ($page - 1) * $rows; // 시작 레코드 구함 + +$sql = "select * $sql_common order by iq_id desc limit $from_record, $rows "; +$result = sql_query($sql); + +$itemqa_skin = G5_SHOP_SKIN_PATH.'/itemqa.skin.php'; + +if(!file_exists($itemqa_skin)) { + echo str_replace(G5_PATH.'/', '', $itemqa_skin).' 스킨 파일이 존재하지 않습니다.'; +} else { + include_once($itemqa_skin); +} +?> \ No newline at end of file diff --git a/shop/itemqaform.php b/shop/itemqaform.php new file mode 100644 index 000000000..0ac3e9dfb --- /dev/null +++ b/shop/itemqaform.php @@ -0,0 +1,70 @@ + \ No newline at end of file diff --git a/shop/itemqaformupdate.php b/shop/itemqaformupdate.php new file mode 100644 index 000000000..71c313050 --- /dev/null +++ b/shop/itemqaformupdate.php @@ -0,0 +1,123 @@ + diff --git a/shop/itemqalist.php b/shop/itemqalist.php new file mode 100644 index 000000000..3cf9227a3 --- /dev/null +++ b/shop/itemqalist.php @@ -0,0 +1,72 @@ + diff --git a/shop/itemrecommend.php b/shop/itemrecommend.php new file mode 100644 index 000000000..48b4b7811 --- /dev/null +++ b/shop/itemrecommend.php @@ -0,0 +1,74 @@ + + + +
        +

        + +
        + + + +
        + + + + + + + + + + + + + + + + + + + +
        +
        + +
        + + 창닫기 +
        +
        + +
        + + + + + \ No newline at end of file diff --git a/shop/itemrecommendmail.php b/shop/itemrecommendmail.php new file mode 100644 index 000000000..b3504754b --- /dev/null +++ b/shop/itemrecommendmail.php @@ -0,0 +1,58 @@ + 3) alert("최대 3명까지만 메일을 발송할 수 있습니다."); +if (substr_count($to_email, "@") > 1) alert('메일 주소는 하나씩만 입력해 주십시오.'); + +if ($_SESSION["ss_recommend_datetime"] >= (G5_SERVER_TIME - 120)) + alert("너무 빠른 시간내에 메일을 연속해서 보낼 수 없습니다."); +set_session("ss_recommend_datetime", G5_SERVER_TIME); + +$recommendmail_count = (int)get_session('ss_recommendmail_count') + 1; +if ($recommendmail_count > 3) + alert_close('한번 접속후 일정수의 메일만 발송할 수 있습니다.\\n\\n계속해서 메일을 보내시려면 다시 로그인 또는 접속하여 주십시오.'); +set_session('ss_recommendmail_count', $recommendmail_count); + +// 세션에 저장된 토큰과 폼값으로 넘어온 토큰을 비교하여 틀리면 메일을 발송할 수 없다. +if ($_POST["token"] && get_session("ss_token") == $_POST["token"]) { + // 맞으면 세션을 지워 다시 입력폼을 통해서 들어오도록 한다. + set_session("ss_token", ""); +} else { + alert_close("메일 발송시 오류가 발생하였습니다."); + exit; +} + +// 상품 +$sql = " select * from {$g5['g5_shop_item_table']} where it_id = '$it_id' "; +$it = sql_fetch($sql); +if (!$it['it_id']) + alert("등록된 상품이 아닙니다."); + +$subject = stripslashes($subject); +$content = nl2br(stripslashes($content)); + +$from_name = get_text($member['mb_name']); +$from_email = $member['mb_email']; +$it_id = $it['it_id']; +$it_name = $it['it_name']; +$it_mimg = get_it_image($it_id, $default['de_mimg_width'], $default['de_mimg_height']); + +ob_start(); +include G5_SHOP_PATH.'/mail/itemrecommend.mail.php'; +$content = ob_get_contents(); +ob_end_clean(); + +mailer($from_name, $from_email, $to_email, $subject, $content, 1); + +echo ""; +?> + + diff --git a/shop/itemstocksms.php b/shop/itemstocksms.php new file mode 100644 index 000000000..f7cdfacba --- /dev/null +++ b/shop/itemstocksms.php @@ -0,0 +1,81 @@ +', 0); +?> + +
        +

        + +
        + + +
        + + + + + + + + + + + + + + + + + + + +
        상품
        개인정보처리방침안내
        +
        +
        + + +
        +
        + + +
        +
        +
        + + + + \ No newline at end of file diff --git a/shop/itemstocksmsupdate.php b/shop/itemstocksmsupdate.php new file mode 100644 index 000000000..695660cce --- /dev/null +++ b/shop/itemstocksmsupdate.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/shop/itemuse.php b/shop/itemuse.php new file mode 100644 index 000000000..12f86d471 --- /dev/null +++ b/shop/itemuse.php @@ -0,0 +1,76 @@ + 1) { + $str .= '처음'.PHP_EOL; + } + + $start_page = ( ( (int)( ($cur_page - 1 ) / $write_pages ) ) * $write_pages ) + 1; + $end_page = $start_page + $write_pages - 1; + + if ($end_page >= $total_page) $end_page = $total_page; + + if ($start_page > 1) $str .= '이전'.PHP_EOL; + + if ($total_page > 1) { + for ($k=$start_page;$k<=$end_page;$k++) { + if ($cur_page != $k) + $str .= ''.$k.'페이지'.PHP_EOL; + else + $str .= '열린'.$k.'페이지'.PHP_EOL; + } + } + + if ($total_page > $end_page) $str .= '다음'.PHP_EOL; + + if ($cur_page < $total_page) { + $str .= '맨끝'.PHP_EOL; + } + + if ($str) + return ""; + else + return ""; +} + +$itemuse_list = "./itemuselist.php"; +$itemuse_form = "./itemuseform.php?it_id=".$it_id; +$itemuse_formupdate = "./itemuseformupdate.php?it_id=".$it_id; + +$sql_common = " from `{$g5['g5_shop_item_use_table']}` where it_id = '{$it_id}' and is_confirm = '1' "; + +// 테이블의 전체 레코드수만 얻음 +$sql = " select COUNT(*) as cnt " . $sql_common; +$row = sql_fetch($sql); +$total_count = $row['cnt']; + +$rows = 5; +$total_page = ceil($total_count / $rows); // 전체 페이지 계산 +if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) +$from_record = ($page - 1) * $rows; // 시작 레코드 구함 + +$sql = "select * $sql_common order by is_id desc limit $from_record, $rows "; +$result = sql_query($sql); + +$itemuse_skin = G5_SHOP_SKIN_PATH.'/itemuse.skin.php'; + +if(!file_exists($itemuse_skin)) { + echo str_replace(G5_PATH.'/', '', $itemuse_skin).' 스킨 파일이 존재하지 않습니다.'; +} else { + include_once($itemuse_skin); +} +?> \ No newline at end of file diff --git a/shop/itemuseform.php b/shop/itemuseform.php new file mode 100644 index 000000000..08d9e5933 --- /dev/null +++ b/shop/itemuseform.php @@ -0,0 +1,65 @@ + \ No newline at end of file diff --git a/shop/itemuseformupdate.php b/shop/itemuseformupdate.php new file mode 100644 index 000000000..45ddb11c2 --- /dev/null +++ b/shop/itemuseformupdate.php @@ -0,0 +1,121 @@ + 5 ? 0 : (int)$_POST['is_score']; + +// 사용후기 작성 설정에 따른 체크 +check_itemuse_write($it_id, $member['mb_id']); + +if ($w == "" || $w == "u") { + $is_name = addslashes($member['mb_name']); + $is_password = $member['mb_password']; + + if (!$is_subject) alert("제목을 입력하여 주십시오."); + if (!$is_content) alert("내용을 입력하여 주십시오."); +} + +if($is_mobile_shop) + $url = './iteminfo.php?it_id='.$it_id.'&info=use'; +else + $url = "./item.php?it_id=$it_id&_=".get_token()."#sit_use"; + +if ($w == "") +{ + /* + $sql = " select max(is_id) as max_is_id from {$g5['g5_shop_item_use_table']} "; + $row = sql_fetch($sql); + $max_is_id = $row['max_is_id']; + + $sql = " select max(is_id) as max_is_id from {$g5['g5_shop_item_use_table']} where it_id = '$it_id' and mb_id = '{$member['mb_id']}' "; + $row = sql_fetch($sql); + if ($row['max_is_id'] && $row['max_is_id'] == $max_is_id) + alert("같은 상품에 대하여 계속해서 평가하실 수 없습니다."); + */ + + $sql = "insert {$g5['g5_shop_item_use_table']} + set it_id = '$it_id', + mb_id = '{$member['mb_id']}', + is_score = '$is_score', + is_name = '$is_name', + is_password = '$is_password', + is_subject = '$is_subject', + is_content = '$is_content', + is_time = '".G5_TIME_YMDHIS."', + is_ip = '{$_SERVER['REMOTE_ADDR']}' "; + if (!$default['de_item_use_use']) + $sql .= ", is_confirm = '1' "; + sql_query($sql); + + if ($default['de_item_use_use']) { + $alert_msg = "평가하신 글은 관리자가 확인한 후에 출력됩니다."; + } else { + $alert_msg = "사용후기가 등록 되었습니다."; + } +} +else if ($w == "u") +{ + $sql = " select is_password from {$g5['g5_shop_item_use_table']} where is_id = '$is_id' "; + $row = sql_fetch($sql); + if ($row['is_password'] != $is_password) + alert("비밀번호가 틀리므로 수정하실 수 없습니다."); + + $sql = " update {$g5['g5_shop_item_use_table']} + set is_subject = '$is_subject', + is_content = '$is_content', + is_score = '$is_score' + where is_id = '$is_id' "; + sql_query($sql); + + $alert_msg = "사용후기가 수정 되었습니다."; +} +else if ($w == "d") +{ + if (!$is_admin) + { + $sql = " select count(*) as cnt from {$g5['g5_shop_item_use_table']} where mb_id = '{$member['mb_id']}' and is_id = '$is_id' "; + $row = sql_fetch($sql); + if (!$row['cnt']) + alert("자신의 사용후기만 삭제하실 수 있습니다."); + } + + // 에디터로 첨부된 이미지 삭제 + $sql = " select is_content from {$g5['g5_shop_item_use_table']} where is_id = '$is_id' and md5(concat(is_id,is_time,is_ip)) = '{$hash}' "; + $row = sql_fetch($sql); + + $imgs = get_editor_image($row['is_content']); + + for($i=0;$i \ No newline at end of file diff --git a/shop/itemuselist.php b/shop/itemuselist.php new file mode 100644 index 000000000..5f40e216f --- /dev/null +++ b/shop/itemuselist.php @@ -0,0 +1,72 @@ + diff --git a/shop/kcp/_common.php b/shop/kcp/_common.php new file mode 100644 index 000000000..bad54a5d7 --- /dev/null +++ b/shop/kcp/_common.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/shop/kcp/bin/pp_cli b/shop/kcp/bin/pp_cli new file mode 100755 index 000000000..cfe783538 Binary files /dev/null and b/shop/kcp/bin/pp_cli differ diff --git a/shop/kcp/bin/pp_cli_exe.exe b/shop/kcp/bin/pp_cli_exe.exe new file mode 100644 index 000000000..cb05cd57a Binary files /dev/null and b/shop/kcp/bin/pp_cli_exe.exe differ diff --git a/shop/kcp/bin/pp_cli_x64 b/shop/kcp/bin/pp_cli_x64 new file mode 100755 index 000000000..d557b209a Binary files /dev/null and b/shop/kcp/bin/pp_cli_x64 differ diff --git a/shop/kcp/bin/pub.key b/shop/kcp/bin/pub.key new file mode 100644 index 000000000..8b0c51e4e --- /dev/null +++ b/shop/kcp/bin/pub.key @@ -0,0 +1,5 @@ +-----BEGIN RSA PUBLIC KEY----- +MIGJAoGBAMEn9niy+ZB7GGn9JOA9csyJo2vTpd3/ieHW8nCfiDf77YJvEtUmudCU +JXMNQ1uBuHq7+IzajoJhhvGXyOHVr9w+Oq/d8XZPPe7X2agh1WAMDV4mjQNaAncr +DU1qxlTFuAdKRkK7qkqyWSHHtq0HaW/zmBmcIoGn4RwY9y7oKFBpAgMBAAE= +-----END RSA PUBLIC KEY----- diff --git a/shop/kcp/css/index.css b/shop/kcp/css/index.css new file mode 100644 index 000000000..52cded481 --- /dev/null +++ b/shop/kcp/css/index.css @@ -0,0 +1,122 @@ +BODY +{ +} + +td {font-family: "µ¸¿ò", "µ¸¿òü", Arial, Verdana;font-size: 9pt;color: #000000;} + +/*À̹ÌÁö*/ +.indexbox {background-image: url('../img/index_bg_box.jpg');padding-top: 58px;padding-right: 27px;padding-bottom: 27px;padding-left: 27px;} +.indexgen {background-image: url(../img/index_gen.jpg);background-repeat: no-repeat;} +.indexescrow {background-image: url(../img/index_escrow.jpg);} +.indexcms {background-image: url(../img/index_cms.jpg);} +.line1 {background-image: url(../img/line_dot1.gif);background-repeat: repeat;height:1px;} +.bulgen {background-image: url(../img/bul_gen.gif);background-repeat: no-repeat;} +.bulescrow {background-image: url(../img/bul_escrow.gif);background-repeat: no-repeat;} +.bulcms {background-image: url(../img/bul_cms.gif);background-repeat: no-repeat;} +.boxtop589 {background-image: url(../img/boxtop589.gif);background-repeat: no-repeat;} +.boxbtm589 {background-image: url(../img/boxbtm589.gif);background-repeat: no-repeat;} +.boxbg589 {background-image: url(../img/boxbg589.gif);background-repeat: repeat;} +.ttbg551 {background-image: url(../img/ttbg551.gif);background-repeat: no-repeat;padding-left: 18px;} +.ttbtm551 {background-image: url(../img/ttbg551.gif);background-repeat: no-repeat;padding-left: 18px;} +.boxbg551 {background-image: url(../img/boxbg551.gif);background-repeat: repeat;padding:18 18 18 18;} +.boxbtm551 {background-image: url(../img/boxbtm551.gif);background-repeat: no-repeat;} +img { border: 0px; margin: 0px; padding: 0px;} /* img border 0 */ + +/*Å×À̺í*/ +.tbtop {background-color: #0f75ac;background-repeat: repeat;} +.tbleft {background-repeat: no-repeat;background-image: url(../img/tb_left.gif);height: 27px;color: #003b7e;width: 139px;padding:3 0 0 25;} +.tbline {background-color: #bbcbdb;background-repeat: repeat;} +.tbline2 {background-color: #a3ccf3;background-repeat: repeat;} +.padding12{padding-left: 12px;} + + +/*ÆùƮ*/ +.bold {font-weight: bold;} +.white {color: #ffffff;} +.orange {color: orange;} +.red {color: red;} +.tt12{ font-size: 12pt; color: #ffffff;font-weight: bold;} + +.linkb{ font-size: 9pt; color: #000000;font-weight: bold;text-decoration: none;} +.linkb a:link{ font-size: 9pt; color: #000000;font-weight: bold;text-decoration: none;} +.linkb a:visited{ font-size: 9pt; color: #000000;font-weight: bold;text-decoration: none;} +.linkb a:hover{ font-size: 9pt; color: #000000;font-weight: bold;text-decoration: none;} + +/*FORM*/ +.form { font-size: 9pt; background-color: #FFFFFF; color: #2c2c2c; border: 1 solid #7f9db9; padding:3 0 0 3; height: 20px} +.formwon {font-size: 9pt;background-color: #FFFFFF;color: #2c2c2c; border: 1 solid #7f9db9; padding:3 0 0 3; height: 20px;text-align: right;} + +/* + ##### title ##### +*/ +#main_link +{ + + top:17%; + left:50%; + + margin-left:-130px; + margin-top:20px; + + position:absolute; +} + +#main_link ul +{ + list-style-type:none; +} + +.title +{ + font-family:"±¼¸²"; + font-size: 12pt; + font-weight: bold; + + padding-left:20px; + background: url(../img/bul_gen.gif) no-repeat 0 50%; +} + +.sub +{ + font-family:"µ¸¿ò"; + font-size: 9pt; + color: #3f3f3f; + padding-left:20px; +} + +/* + ##### background image ##### +*/ +#bg_image +{ + position:absolute; + + width: 602px; + height:400px; + + top:10%; + left:50%; + + margin-left: -301px; + +} + +#left_bg +{ + float: left; + + width:160px; + height:400px; + + background-image: url("../img/index_gen.jpg"); + list-style-type:none; +} + +#right_bg +{ + float: left; + width:432px; + height:400px; + background-image: url("../img/index_bg_box.jpg"); + list-style-type:none; +} \ No newline at end of file diff --git a/shop/kcp/css/sample.css b/shop/kcp/css/sample.css new file mode 100644 index 000000000..59db2e591 --- /dev/null +++ b/shop/kcp/css/sample.css @@ -0,0 +1,81 @@ +body {FONT-FAMILY: ±¼¸²;font-size:12px;} + +/*base link*/ +a {FONT-FAMILY: "Arial", "±¼¸²"; font-size: 12px; TEXT-DECORATION: none} +a:hover {FONT-FAMILY: "Arial",±¼¸²; FONT-SIZE: 12px; color: #4D82A2; TEXT-DECORATION:none} + +img { border:0; } +.bold {font-weight:bold;} +.white {color:white;} +.big {font-size:12pt;} +.align_left {text-align: left;} +.right {text-align: right;} +.red { color:red;} +.blue { color:blue;} +.orange {color:orange;} +.frmselect {font-size:12px;font-family:"Arial",±¼¸²;color:#2c2c2c;border:1 solid #7f9db9;height:20px;margin-left:10px;} +.frminput {font-size:12px;font-family:"Arial",±¼¸²;color:#2c2c2c;border:1 solid #7f9db9;height:15px;margin-left:10px;} +.width95 {width:95px;} +.celpadd {padding: 3 0 3 3;} +.celpadd1 {padding: 3 0 3 13;} + +.line1 { width:1px; background-color:#bbcbdb; } +.line2 { height:1px; background-color:#bbcbdb; } + +.height_1px { height:1px; } +.height_2px { height:2px; } + +.margin_top_20 { margin-top:20px; } +.margin_top_10 { margin-top:10px; } + +.title +{ + height:20px; + font-family:"Arial"; + font-size: 9pt; + font-weight: bold; + + color:#003b7e; + text-align:center; + + border-bottom: 1px solid #0f75ac ; + border-top: 1px solid #0f75ac ; +} + +.sub_title1 { + width:150px; + font-size:12px; + height:20px; + padding: 3 0 3 3; + background-color:#e6f3f4; + background-image:url("./img/bullet.gif") ; + color:#003b7e; + margin-left:10px; + border-bottom: 1px solid #bbcbdb ; + text-align:center; +} + +.sub_input1 { + font-size:12px; + height:20px; + padding: 3 0 3 3; + text-align:left; + border-bottom: 1px solid #bbcbdb ; +} + +.sub_content1 { + font-size:12px; + padding: 3 0 3 3; + text-align:left; + text-indent:10px; + border-bottom: 1px solid #bbcbdb ; +} + +.sub_content1_center { + font-size:12px; + padding: 3 0 3 3; + text-align:center; + border-bottom: 1px solid #bbcbdb ; +} + + diff --git a/shop/kcp/escrow.register.php b/shop/kcp/escrow.register.php new file mode 100644 index 000000000..a33209b22 --- /dev/null +++ b/shop/kcp/escrow.register.php @@ -0,0 +1,40 @@ +mf_clear(); + +$tran_cd = "00200000"; + +// 에스크로 상태변경 +$c_PayPlus->mf_set_modx_data( "tno", $escrow_tno ); +$c_PayPlus->mf_set_modx_data( "mod_type", $mod_type ); +$c_PayPlus->mf_set_modx_data( "mod_ip", $cust_ip ); +$c_PayPlus->mf_set_modx_data( "mod_desc", $mod_desc ); + +$c_PayPlus->mf_set_modx_data( "deli_numb", $escrow_numb ); +$c_PayPlus->mf_set_modx_data( "deli_corp", $escrow_corp ); + +$c_PayPlus->mf_do_tx( $trace_no, $g_conf_home_dir, $g_conf_site_cd, $g_conf_site_key, $tran_cd, "", + $g_conf_gw_url, $g_conf_gw_port, "payplus_cli_slib", $ordr_idxx, + $cust_ip, "3" , 0, 0, $g_conf_key_dir, $g_conf_log_dir); // 응답 전문 처리 + +$res_cd = $c_PayPlus->m_res_cd; // 결과 코드 +$res_msg = $c_PayPlus->m_res_msg; // 결과 메시지 + +// locale 설정 초기화 +setlocale(LC_CTYPE, ''); +?> \ No newline at end of file diff --git a/shop/kcp/img/KcpLogo.jpg b/shop/kcp/img/KcpLogo.jpg new file mode 100644 index 000000000..eb2f3b6b8 Binary files /dev/null and b/shop/kcp/img/KcpLogo.jpg differ diff --git a/shop/kcp/img/Thumbs.db b/shop/kcp/img/Thumbs.db new file mode 100644 index 000000000..b21f40d07 Binary files /dev/null and b/shop/kcp/img/Thumbs.db differ diff --git a/shop/kcp/img/boxbg551.gif b/shop/kcp/img/boxbg551.gif new file mode 100644 index 000000000..5e2f2277d Binary files /dev/null and b/shop/kcp/img/boxbg551.gif differ diff --git a/shop/kcp/img/boxbg589.gif b/shop/kcp/img/boxbg589.gif new file mode 100644 index 000000000..cbd1aee76 Binary files /dev/null and b/shop/kcp/img/boxbg589.gif differ diff --git a/shop/kcp/img/boxbtm551.gif b/shop/kcp/img/boxbtm551.gif new file mode 100644 index 000000000..f4c2183b5 Binary files /dev/null and b/shop/kcp/img/boxbtm551.gif differ diff --git a/shop/kcp/img/boxbtm589.gif b/shop/kcp/img/boxbtm589.gif new file mode 100644 index 000000000..3701958d3 Binary files /dev/null and b/shop/kcp/img/boxbtm589.gif differ diff --git a/shop/kcp/img/boxtop589.gif b/shop/kcp/img/boxtop589.gif new file mode 100644 index 000000000..7598733cf Binary files /dev/null and b/shop/kcp/img/boxtop589.gif differ diff --git a/shop/kcp/img/btn_buy.gif b/shop/kcp/img/btn_buy.gif new file mode 100644 index 000000000..3736cd7d3 Binary files /dev/null and b/shop/kcp/img/btn_buy.gif differ diff --git a/shop/kcp/img/btn_cancel.gif b/shop/kcp/img/btn_cancel.gif new file mode 100644 index 000000000..bf8e79f1e Binary files /dev/null and b/shop/kcp/img/btn_cancel.gif differ diff --git a/shop/kcp/img/btn_certi.gif b/shop/kcp/img/btn_certi.gif new file mode 100644 index 000000000..d122a649f Binary files /dev/null and b/shop/kcp/img/btn_certi.gif differ diff --git a/shop/kcp/img/btn_change.gif b/shop/kcp/img/btn_change.gif new file mode 100644 index 000000000..7b21e3c0f Binary files /dev/null and b/shop/kcp/img/btn_change.gif differ diff --git a/shop/kcp/img/btn_close.gif b/shop/kcp/img/btn_close.gif new file mode 100644 index 000000000..d7bdae52d Binary files /dev/null and b/shop/kcp/img/btn_close.gif differ diff --git a/shop/kcp/img/btn_home.gif b/shop/kcp/img/btn_home.gif new file mode 100644 index 000000000..73d33a79b Binary files /dev/null and b/shop/kcp/img/btn_home.gif differ diff --git a/shop/kcp/img/btn_issue.gif b/shop/kcp/img/btn_issue.gif new file mode 100644 index 000000000..4636c503d Binary files /dev/null and b/shop/kcp/img/btn_issue.gif differ diff --git a/shop/kcp/img/btn_key.gif b/shop/kcp/img/btn_key.gif new file mode 100644 index 000000000..e57d9366e Binary files /dev/null and b/shop/kcp/img/btn_key.gif differ diff --git a/shop/kcp/img/btn_ok.gif b/shop/kcp/img/btn_ok.gif new file mode 100644 index 000000000..630aaea2f Binary files /dev/null and b/shop/kcp/img/btn_ok.gif differ diff --git a/shop/kcp/img/btn_pay.gif b/shop/kcp/img/btn_pay.gif new file mode 100644 index 000000000..7f2bb271d Binary files /dev/null and b/shop/kcp/img/btn_pay.gif differ diff --git a/shop/kcp/img/btn_receipt.gif b/shop/kcp/img/btn_receipt.gif new file mode 100644 index 000000000..f336bfbcc Binary files /dev/null and b/shop/kcp/img/btn_receipt.gif differ diff --git a/shop/kcp/img/btn_regi.gif b/shop/kcp/img/btn_regi.gif new file mode 100644 index 000000000..3baf347ee Binary files /dev/null and b/shop/kcp/img/btn_regi.gif differ diff --git a/shop/kcp/img/btn_save.gif b/shop/kcp/img/btn_save.gif new file mode 100644 index 000000000..353deea8e Binary files /dev/null and b/shop/kcp/img/btn_save.gif differ diff --git a/shop/kcp/img/btn_search.gif b/shop/kcp/img/btn_search.gif new file mode 100644 index 000000000..4fee1800c Binary files /dev/null and b/shop/kcp/img/btn_search.gif differ diff --git a/shop/kcp/img/bul_cms.gif b/shop/kcp/img/bul_cms.gif new file mode 100644 index 000000000..782b7ba60 Binary files /dev/null and b/shop/kcp/img/bul_cms.gif differ diff --git a/shop/kcp/img/bul_escrow.gif b/shop/kcp/img/bul_escrow.gif new file mode 100644 index 000000000..82b51a910 Binary files /dev/null and b/shop/kcp/img/bul_escrow.gif differ diff --git a/shop/kcp/img/bul_gen.gif b/shop/kcp/img/bul_gen.gif new file mode 100644 index 000000000..a178b2a2c Binary files /dev/null and b/shop/kcp/img/bul_gen.gif differ diff --git a/shop/kcp/img/bullet.gif b/shop/kcp/img/bullet.gif new file mode 100644 index 000000000..e9c8a34d4 Binary files /dev/null and b/shop/kcp/img/bullet.gif differ diff --git a/shop/kcp/img/dot_line.gif b/shop/kcp/img/dot_line.gif new file mode 100644 index 000000000..131a8d336 Binary files /dev/null and b/shop/kcp/img/dot_line.gif differ diff --git a/shop/kcp/img/index_bg_box.jpg b/shop/kcp/img/index_bg_box.jpg new file mode 100644 index 000000000..799c63a1d Binary files /dev/null and b/shop/kcp/img/index_bg_box.jpg differ diff --git a/shop/kcp/img/index_cms.jpg b/shop/kcp/img/index_cms.jpg new file mode 100644 index 000000000..f5e3d6af8 Binary files /dev/null and b/shop/kcp/img/index_cms.jpg differ diff --git a/shop/kcp/img/index_escrow.jpg b/shop/kcp/img/index_escrow.jpg new file mode 100644 index 000000000..21f5dc597 Binary files /dev/null and b/shop/kcp/img/index_escrow.jpg differ diff --git a/shop/kcp/img/index_gen.jpg b/shop/kcp/img/index_gen.jpg new file mode 100644 index 000000000..47ce71734 Binary files /dev/null and b/shop/kcp/img/index_gen.jpg differ diff --git a/shop/kcp/img/kcp_ing.gif b/shop/kcp/img/kcp_ing.gif new file mode 100644 index 000000000..e8fbadc71 Binary files /dev/null and b/shop/kcp/img/kcp_ing.gif differ diff --git a/shop/kcp/img/kcp_plug_bg01.gif b/shop/kcp/img/kcp_plug_bg01.gif new file mode 100644 index 000000000..a738b1349 Binary files /dev/null and b/shop/kcp/img/kcp_plug_bg01.gif differ diff --git a/shop/kcp/img/kcp_plug_img01.gif b/shop/kcp/img/kcp_plug_img01.gif new file mode 100644 index 000000000..4e7688343 Binary files /dev/null and b/shop/kcp/img/kcp_plug_img01.gif differ diff --git a/shop/kcp/img/kcp_plug_img02.gif b/shop/kcp/img/kcp_plug_img02.gif new file mode 100644 index 000000000..de3a41634 Binary files /dev/null and b/shop/kcp/img/kcp_plug_img02.gif differ diff --git a/shop/kcp/img/kcp_plug_img03.gif b/shop/kcp/img/kcp_plug_img03.gif new file mode 100644 index 000000000..8a8f66646 Binary files /dev/null and b/shop/kcp/img/kcp_plug_img03.gif differ diff --git a/shop/kcp/img/kcp_plug_img04.gif b/shop/kcp/img/kcp_plug_img04.gif new file mode 100644 index 000000000..c1cd92589 Binary files /dev/null and b/shop/kcp/img/kcp_plug_img04.gif differ diff --git a/shop/kcp/img/kcp_plug_img05.gif b/shop/kcp/img/kcp_plug_img05.gif new file mode 100644 index 000000000..46c639896 Binary files /dev/null and b/shop/kcp/img/kcp_plug_img05.gif differ diff --git a/shop/kcp/img/line_dot1.gif b/shop/kcp/img/line_dot1.gif new file mode 100644 index 000000000..6ec54a481 Binary files /dev/null and b/shop/kcp/img/line_dot1.gif differ diff --git a/shop/kcp/img/processing.gif b/shop/kcp/img/processing.gif new file mode 100644 index 000000000..228795dbd Binary files /dev/null and b/shop/kcp/img/processing.gif differ diff --git a/shop/kcp/img/tb_left.gif b/shop/kcp/img/tb_left.gif new file mode 100644 index 000000000..1d0bcea00 Binary files /dev/null and b/shop/kcp/img/tb_left.gif differ diff --git a/shop/kcp/img/tt_order1.gif b/shop/kcp/img/tt_order1.gif new file mode 100644 index 000000000..9062506c0 Binary files /dev/null and b/shop/kcp/img/tt_order1.gif differ diff --git a/shop/kcp/img/ttbg551.gif b/shop/kcp/img/ttbg551.gif new file mode 100644 index 000000000..df0de35af Binary files /dev/null and b/shop/kcp/img/ttbg551.gif differ diff --git a/shop/kcp/orderform.1.php b/shop/kcp/orderform.1.php new file mode 100644 index 000000000..4680d5a31 --- /dev/null +++ b/shop/kcp/orderform.1.php @@ -0,0 +1,134 @@ + + + + + + +

        + 결제안내 + 결제를 하시려면 상단의 노란색 표시줄을 클릭하시거나, [수동설치]를 눌러 Payplus Plug-in을 설치하시기 바랍니다.
        + [수동설치]를 눌러 설치하신 경우 새로고침(F5)키를 눌러 진행하시기 바랍니다. +

        + + \ No newline at end of file diff --git a/shop/kcp/orderform.2.php b/shop/kcp/orderform.2.php new file mode 100644 index 000000000..46c121255 --- /dev/null +++ b/shop/kcp/orderform.2.php @@ -0,0 +1,241 @@ + + + + + + 카드결제시 결제창에 일시불부터 5개월까지 선택가능 + */ +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "> + + + + + + + + + + + + + */ + + /* 신용카드 결제시 OK캐쉬백 적립 여부를 묻는 창을 설정하는 파라미터 입니다 + OK캐쉬백 포인트 가맹점의 경우에만 창이 보여집니다 + */ + + /* 고정 할부 개월 수 선택 + value값을 "7" 로 설정했을 경우 => 카드결제시 결제창에 할부 7개월만 선택가능 + */ + + /* 무이자 옵션 + ※ 설정할부 (가맹점 관리자 페이지에 설정 된 무이자 설정을 따른다) - "" 로 설정 + ※ 일반할부 (KCP 이벤트 이외에 설정 된 모든 무이자 설정을 무시한다) - "N" 로 설정 + ※ 무이자 할부 (가맹점 관리자 페이지에 설정 된 무이자 이벤트 중 원하는 무이자 설정을 세팅한다) - "Y" 로 설정 + */ + + + /* 무이자 설정 + ※ 주의 1 : 할부는 결제금액이 50,000 원 이상일 경우에만 가능 + ※ 주의 2 : 무이자 설정값은 무이자 옵션이 Y일 경우에만 결제 창에 적용 + 예) 전 카드 2,3,6개월 무이자(국민,비씨,엘지,삼성,신한,현대,롯데,외환) : ALL-02:03:04 + BC 2,3,6개월, 국민 3,6개월, 삼성 6,9개월 무이자 : CCBC-02:03:06,CCKM-03:06,CCSS-03:06:04 + */ + + /* 사용카드 설정 여부 파라미터 입니다.(통합결제창 노출 유무) + + /* 사용카드 설정 파라미터 입니다. (해당 카드만 결제창에 보이게 설정하는 파라미터입니다. used_card_YN 값이 Y일때 적용됩니다. + / + + /* 해외카드 구분하는 파라미터 입니다.(해외비자, 해외마스터, 해외JCB로 구분하여 표시) + + + /* 가상계좌 은행 선택 파라미터 + ※ 해당 은행을 결제창에서 보이게 합니다.(은행코드는 매뉴얼을 참조) */ +?> + + + + + + + + + + + */ + + + /* 가상계좌 입금 시간 설정하는 파라미터 + HHMMSS형식으로 입력하시기 바랍니다 + 설정을 안하시는경우 기본적으로 23시59분59초가 세팅이 됩니다 + */ + + + /* 포인트 결제시 복합 결제(신용카드+포인트) 여부를 결정할 수 있습니다.- N 일경우 복합결제 사용안함 + */ + + + /* 문화상품권 결제시 가맹점 고객 아이디 설정을 해야 합니다.(필수 설정) + */ + + + /* 현금영수증 등록 창을 출력 여부를 설정하는 파라미터 입니다 + ※ Y : 현금영수증 등록 창 출력 + ※ N : 현금영수증 등록 창 출력 안함 + ※ 주의 : 현금영수증 사용 시 KCP 상점관리자 페이지에서 현금영수증 사용 동의를 하셔야 합니다 */ +?> + + + + */ +?> + + + + + */ + + /* = -------------------------------------------------------------------------- = */ + /* = 4. 옵션 정보 END = */ + /* ============================================================================== */ +?> \ No newline at end of file diff --git a/shop/kcp/orderform.3.php b/shop/kcp/orderform.3.php new file mode 100644 index 000000000..357956cce --- /dev/null +++ b/shop/kcp/orderform.3.php @@ -0,0 +1,34 @@ + + + +

        + 결제를 계속 하시려면 상단의 노란색 표시줄을 클릭하시거나 [수동설치]를 눌러 다운로드 된 Payplus Plug-in을 설치하시기 바랍니다.
        + [수동설치]를 눌러 설치하신 경우 새로고침(F5)키를 눌러 진행하시기 바랍니다.
        + 새로고침(F5) 한후에도 계속 설치파일이 다운로드 되거나 결제가 되지 않으면 브라우저를 새로 열어서 주문해 주시기 바랍니다.
        + 브라우저가 익스플로러가 아닌 경우 Payplus Plug-in 설치에 문제가 있을수 있음을 알려 드립니다. +

        + + + + + + + + + \ No newline at end of file diff --git a/shop/kcp/orderform.4.php b/shop/kcp/orderform.4.php new file mode 100644 index 000000000..53addde48 --- /dev/null +++ b/shop/kcp/orderform.4.php @@ -0,0 +1,50 @@ + + + +
        +

        에스크로 안내

        +
        + + + + + + + + +
        + 에스크로(escrow) 제도란? +

        + 상거래 시에, 판매자와 구매자의 사이에 신뢰할 수 있는 중립적인 제삼자(여기서는 KCP)가 중개하여 + 금전 또는 물품을 거래를 하도록 하는 것, 또는 그러한 서비스를 말한다. 거래의 안전성을 확보하기 위해 이용된다. + (2006.4.1 전자상거래 소비자보호법에 따른 의무 시행) +

        +

        + 현금 거래에만 해당(에스크로 결제를 선택했을 경우에만 해당)되며, + 신용카드로 구매하는 거래, 배송이 필요하지 않은 재화 등을 구매하는 거래(컨텐츠 등)에는 해당되지 않는다. +

        +
        + + 가입사실확인 + +
        +
        + + + + + \ No newline at end of file diff --git a/shop/kcp/orderform.5.php b/shop/kcp/orderform.5.php new file mode 100644 index 000000000..66c8ea491 --- /dev/null +++ b/shop/kcp/orderform.5.php @@ -0,0 +1,10 @@ + + + \ No newline at end of file diff --git a/shop/kcp/orderpartcancel.inc.php b/shop/kcp/orderpartcancel.inc.php new file mode 100644 index 000000000..024974e77 --- /dev/null +++ b/shop/kcp/orderpartcancel.inc.php @@ -0,0 +1,144 @@ +mf_clear(); + +if ( $req_tx == "mod" ) +{ + $tran_cd = "00200000"; + + $c_PayPlus->mf_set_modx_data( "tno" , $tno ); // KCP 원거래 거래번호 + $c_PayPlus->mf_set_modx_data( "mod_type" , $mod_type ); // 원거래 변경 요청 종류 + $c_PayPlus->mf_set_modx_data( "mod_ip" , $cust_ip ); // 변경 요청자 IP + $c_PayPlus->mf_set_modx_data( "mod_desc" , $mod_desc ); // 변경 사유 + $c_PayPlus->mf_set_modx_data( "rem_mny" , strval($rem_mny) ); // 취소 가능 잔액 + $c_PayPlus->mf_set_modx_data( "mod_mny" , strval($mod_mny) ); // 취소 요청 금액 + + if($od['od_tax_flag']) + { + $mod_tax_mny = round((int)$tax_mny / 1.1); + $mod_vat_mny = (int)$tax_mny - $mod_tax_mny; + + $c_PayPlus->mf_set_modx_data( "tax_flag" , "TG03" ); // 복합과세 구분 + $c_PayPlus->mf_set_modx_data( "mod_tax_mny" , strval($mod_tax_mny) ); // 공급가 부분 취소 요청 금액 + $c_PayPlus->mf_set_modx_data( "mod_vat_mny" , strval($mod_vat_mny) ); // 부과세 부분 취소 요청 금액 + $c_PayPlus->mf_set_modx_data( "mod_free_mny" , strval($mod_free_mny) ); // 비관세 부분 취소 요청 금액 + } +} + +if ( $tran_cd != "" ) +{ + $c_PayPlus->mf_do_tx( "", $g_conf_home_dir, $g_conf_site_cd, + $g_conf_site_key, $tran_cd, "", + $g_conf_gw_url, $g_conf_gw_port, "payplus_cli_slib", + $ordr_idxx, $cust_ip, $g_conf_log_level, + "", 0, $g_conf_key_dir, + $g_conf_log_dir ); + + $res_cd = $c_PayPlus->m_res_cd; // 결과 코드 + $res_msg = $c_PayPlus->m_res_msg; // 결과 메시지 + /* $res_en_msg = $c_PayPlus->mf_get_res_data( "res_en_msg" ); // 결과 영문 메세지 */ +} +else +{ + $c_PayPlus->m_res_cd = "9562"; + $c_PayPlus->m_res_msg = "연동 오류|Payplus Plugin이 설치되지 않았거나 tran_cd값이 설정되지 않았습니다."; +} + +if ($res_cd != '0000') +{ + $res_msg = iconv("euc-kr", "utf-8", $res_msg); + + alert("$res_cd : $res_msg"); +} + +/* ============================================================================== */ +/* = 취소 결과 처리 = */ +/* = -------------------------------------------------------------------------- = */ +if ( $req_tx == "mod" ) +{ + if ( $res_cd == "0000" ) + { + $tno = $c_PayPlus->mf_get_res_data( "tno" ); // KCP 거래 고유 번호 + $amount = $c_PayPlus->mf_get_res_data( "amount" ); // 원 거래금액 + $mod_mny = $c_PayPlus->mf_get_res_data( "panc_mod_mny" ); // 취소요청된 금액 + $rem_mny = $c_PayPlus->mf_get_res_data( "panc_rem_mny" ); // 취소요청후 잔액 + + // 환불금액기록 + $sql = " update {$g5['g5_shop_order_table']} + set od_refund_price = od_refund_price + '$mod_mny', + od_shop_memo = concat(od_shop_memo, \"$mod_memo\") + where od_id = '{$od['od_id']}' + and od_tno = '$tno' "; + sql_query($sql); + + // 미수금 등의 정보 업데이트 + $info = get_order_info($od_id); + + $sql = " update {$g5['g5_shop_order_table']} + set od_misu = '{$info['od_misu']}', + od_tax_mny = '{$info['od_tax_mny']}', + od_vat_mny = '{$info['od_vat_mny']}', + od_free_mny = '{$info['od_free_mny']}' + where od_id = '$od_id' "; + sql_query($sql); + } // End of [res_cd = "0000"] + +/* = -------------------------------------------------------------------------- = */ +/* = 취소 실패 결과 처리 = */ +/* = -------------------------------------------------------------------------- = */ + else + { + } +} + +// locale 설정 초기화 +setlocale(LC_CTYPE, ''); +?> \ No newline at end of file diff --git a/shop/kcp/pp_ax_hub.php b/shop/kcp/pp_ax_hub.php new file mode 100644 index 000000000..56acb63c9 --- /dev/null +++ b/shop/kcp/pp_ax_hub.php @@ -0,0 +1,350 @@ + + +mf_clear(); +/* ------------------------------------------------------------------------------ */ +/* = 02. 인스턴스 생성 및 초기화 END = */ +/* ============================================================================== */ + + +/* ============================================================================== */ +/* = 03. 처리 요청 정보 설정 = */ +/* = -------------------------------------------------------------------------- = */ + +/* = -------------------------------------------------------------------------- = */ +/* = 03-1. 승인 요청 = */ +/* = -------------------------------------------------------------------------- = */ +if ( $req_tx == "pay" ) +{ + /* 1004원은 실제로 업체에서 결제하셔야 될 원 금액을 넣어주셔야 합니다. 결제금액 유효성 검증 */ + $c_PayPlus->mf_set_ordr_data( "ordr_mony", $good_mny ); + + $c_PayPlus->mf_set_encx_data( $_POST[ "enc_data" ], $_POST[ "enc_info" ] ); +} + +/* = -------------------------------------------------------------------------- = */ +/* = 03-2. 취소/매입 요청 = */ +/* = -------------------------------------------------------------------------- = */ +else if ( $req_tx == "mod" ) +{ + $tran_cd = "00200000"; + + $c_PayPlus->mf_set_modx_data( "tno", $tno ); // KCP 원거래 거래번호 + $c_PayPlus->mf_set_modx_data( "mod_type", $mod_type ); // 원거래 변경 요청 종류 + $c_PayPlus->mf_set_modx_data( "mod_ip", $cust_ip ); // 변경 요청자 IP + $c_PayPlus->mf_set_modx_data( "mod_desc", $mod_desc ); // 변경 사유 +} + +/* = -------------------------------------------------------------------------- = */ +/* = 03-3. 에스크로 상태변경 요청 = */ +/* = -------------------------------------------------------------------------- = */ +else if ($req_tx = "mod_escrow") +{ + $tran_cd = "00200000"; + + $c_PayPlus->mf_set_modx_data( "tno", $tno ); // KCP 원거래 거래번호 + $c_PayPlus->mf_set_modx_data( "mod_type", $mod_type ); // 원거래 변경 요청 종류 + $c_PayPlus->mf_set_modx_data( "mod_ip", $cust_ip ); // 변경 요청자 IP + $c_PayPlus->mf_set_modx_data( "mod_desc", $mod_desc ); // 변경 사유 + + if ($mod_type == "STE1") // 상태변경 타입이 [배송요청]인 경우 + { + $c_PayPlus->mf_set_modx_data( "deli_numb", $_POST[ "deli_numb" ] ); // 운송장 번호 + $c_PayPlus->mf_set_modx_data( "deli_corp", $_POST[ "deli_corp" ] ); // 택배 업체명 + } + else if ($mod_type == "STE2" || $mod_type == "STE4") // 상태변경 타입이 [즉시취소] 또는 [취소]인 계좌이체, 가상계좌의 경우 + { + if ($vcnt_yn == "Y") + { + $c_PayPlus->mf_set_modx_data( "refund_account", $_POST[ "refund_account" ] ); // 환불수취계좌번호 + $c_PayPlus->mf_set_modx_data( "refund_nm", $_POST[ "refund_nm" ] ); // 환불수취계좌주명 + $c_PayPlus->mf_set_modx_data( "bank_code", $_POST[ "bank_code" ] ); // 환불수취은행코드 + } + } +} +/* = -------------------------------------------------------------------------- = */ +/* = 03-3. 에스크로 상태변경 요청 END = */ +/* = -------------------------------------------------------------------------- = */ + +/* ------------------------------------------------------------------------------ */ +/* = 03. 처리 요청 정보 설정 END = */ +/* ============================================================================== */ + + + +/* ============================================================================== */ +/* = 04. 실행 = */ +/* = -------------------------------------------------------------------------- = */ +if ( $tran_cd != "" ) +{ + $c_PayPlus->mf_do_tx( $trace_no, $g_conf_home_dir, $g_conf_site_cd, $g_conf_site_key, $tran_cd, "", + $g_conf_gw_url, $g_conf_gw_port, "payplus_cli_slib", $ordr_idxx, + $cust_ip, "3" , 0, 0, $g_conf_key_dir, $g_conf_log_dir); // 응답 전문 처리 + + $res_cd = $c_PayPlus->m_res_cd; // 결과 코드 + $res_msg = $c_PayPlus->m_res_msg; // 결과 메시지 + /* $res_en_msg = $c_PayPlus->mf_get_res_data( "res_en_msg" ); // 결과 영문 메세지 */ +} +else +{ + $c_PayPlus->m_res_cd = "9562"; + $c_PayPlus->m_res_msg = "연동 오류|Payplus Plugin이 설치되지 않았거나 tran_cd값이 설정되지 않았습니다."; +} + +if ($res_cd != '0000') +{ + $res_msg = iconv("euc-kr", "utf-8", $res_msg); + + /* + echo ""; + */ + alert("$res_cd : $res_msg"); + exit; +} + +/* = -------------------------------------------------------------------------- = */ +/* = 04. 실행 END = */ +/* ============================================================================== */ + + +/* ============================================================================== */ +/* = 05. 승인 결과 값 추출 = */ +/* = -------------------------------------------------------------------------- = */ +if ( $req_tx == "pay" ) +{ + if( $res_cd == "0000" ) + { + $tno = $c_PayPlus->mf_get_res_data( "tno" ); // KCP 거래 고유 번호 + $amount = $c_PayPlus->mf_get_res_data( "amount" ); // KCP 실제 거래 금액 + $pnt_issue = $c_PayPlus->mf_get_res_data( "pnt_issue" ); // 결제 포인트사 코드 + $coupon_mny = $c_PayPlus->mf_get_res_data( "coupon_mny" ); // 쿠폰금액 + +/* = -------------------------------------------------------------------------- = */ +/* = 05-1. 신용카드 승인 결과 처리 = */ +/* = -------------------------------------------------------------------------- = */ + if ( $use_pay_method == "100000000000" ) + { + $card_cd = $c_PayPlus->mf_get_res_data( "card_cd" ); // 카드사 코드 + $card_name = $c_PayPlus->mf_get_res_data( "card_name" ); // 카드 종류 + $app_time = $c_PayPlus->mf_get_res_data( "app_time" ); // 승인 시간 + $app_no = $c_PayPlus->mf_get_res_data( "app_no" ); // 승인 번호 + $noinf = $c_PayPlus->mf_get_res_data( "noinf" ); // 무이자 여부 ( 'Y' : 무이자 ) + $quota = $c_PayPlus->mf_get_res_data( "quota" ); // 할부 개월 수 + $partcanc_yn = $c_PayPlus->mf_get_res_data( "partcanc_yn" ); // 부분취소 가능유무 + $card_bin_type_01 = $c_PayPlus->mf_get_res_data( "card_bin_type_01" ); // 카드구분1 + $card_bin_type_02 = $c_PayPlus->mf_get_res_data( "card_bin_type_02" ); // 카드구분2 + $card_mny = $c_PayPlus->mf_get_res_data( "card_mny" ); // 카드결제금액 + + /* = -------------------------------------------------------------- = */ + /* = 05-1.1. 복합결제(포인트+신용카드) 승인 결과 처리 = */ + /* = -------------------------------------------------------------- = */ + if ( $pnt_issue == "SCSK" || $pnt_issue == "SCWB" ) + { + $pt_idno = $c_PayPlus->mf_get_res_data ( "pt_idno" ); // 결제 및 인증 아이디 + $pnt_amount = $c_PayPlus->mf_get_res_data ( "pnt_amount" ); // 적립금액 or 사용금액 + $pnt_app_time = $c_PayPlus->mf_get_res_data ( "pnt_app_time" ); // 승인시간 + $pnt_app_no = $c_PayPlus->mf_get_res_data ( "pnt_app_no" ); // 승인번호 + $add_pnt = $c_PayPlus->mf_get_res_data ( "add_pnt" ); // 발생 포인트 + $use_pnt = $c_PayPlus->mf_get_res_data ( "use_pnt" ); // 사용가능 포인트 + $rsv_pnt = $c_PayPlus->mf_get_res_data ( "rsv_pnt" ); // 총 누적 포인트 + $total_amount = $amount + $pnt_amount; // 복합결제시 총 거래금액 + } + } + +/* = -------------------------------------------------------------------------- = */ +/* = 05-2. 계좌이체 승인 결과 처리 = */ +/* = -------------------------------------------------------------------------- = */ + if ( $use_pay_method == "010000000000" ) + { + $app_time = $c_PayPlus->mf_get_res_data( "app_time" ); // 승인 시간 + $bank_name = $c_PayPlus->mf_get_res_data( "bank_name" ); // 은행명 + $bank_code = $c_PayPlus->mf_get_res_data( "bank_code" ); // 은행코드 + $bk_mny = $c_PayPlus->mf_get_res_data( "bk_mny" ); // 계좌이체결제금액 + } + +/* = -------------------------------------------------------------------------- = */ +/* = 05-3. 가상계좌 승인 결과 처리 = */ +/* = -------------------------------------------------------------------------- = */ + if ( $use_pay_method == "001000000000" ) + { + $bankname = $c_PayPlus->mf_get_res_data( "bankname" ); // 입금할 은행 이름 + $depositor = $c_PayPlus->mf_get_res_data( "depositor" ); // 입금할 계좌 예금주 + $account = $c_PayPlus->mf_get_res_data( "account" ); // 입금할 계좌 번호 + $va_date = $c_PayPlus->mf_get_res_data( "va_date" ); // 가상계좌 입금마감시간 + } + +/* = -------------------------------------------------------------------------- = */ +/* = 05-4. 포인트 승인 결과 처리 = */ +/* = -------------------------------------------------------------------------- = */ + if ( $use_pay_method == "000100000000" ) + { + $pt_idno = $c_PayPlus->mf_get_res_data( "pt_idno" ); // 결제 및 인증 아이디 + $pnt_amount = $c_PayPlus->mf_get_res_data( "pnt_amount" ); // 적립금액 or 사용금액 + $pnt_app_time = $c_PayPlus->mf_get_res_data( "pnt_app_time" ); // 승인시간 + $pnt_app_no = $c_PayPlus->mf_get_res_data( "pnt_app_no" ); // 승인번호 + $add_pnt = $c_PayPlus->mf_get_res_data( "add_pnt" ); // 발생 포인트 + $use_pnt = $c_PayPlus->mf_get_res_data( "use_pnt" ); // 사용가능 포인트 + $rsv_pnt = $c_PayPlus->mf_get_res_data( "rsv_pnt" ); // 적립 포인트 + } + +/* = -------------------------------------------------------------------------- = */ +/* = 05-5. 휴대폰 승인 결과 처리 = */ +/* = -------------------------------------------------------------------------- = */ + if ( $use_pay_method == "000010000000" ) + { + $app_time = $c_PayPlus->mf_get_res_data( "hp_app_time" ); // 승인 시간 + $commid = $c_PayPlus->mf_get_res_data( "commid" ); // 통신사 코드 + $mobile_no = $c_PayPlus->mf_get_res_data( "mobile_no" ); // 휴대폰 번호 + } + +/* = -------------------------------------------------------------------------- = */ +/* = 05-6. 상품권 승인 결과 처리 = */ +/* = -------------------------------------------------------------------------- = */ + if ( $use_pay_method == "000000001000" ) + { + $app_time = $c_PayPlus->mf_get_res_data( "tk_app_time" ); // 승인 시간 + $tk_van_code = $c_PayPlus->mf_get_res_data( "tk_van_code" ); // 발급사 코드 + $tk_app_no = $c_PayPlus->mf_get_res_data( "tk_app_no" ); // 승인 번호 + } + +/* = -------------------------------------------------------------------------- = */ +/* = 05-7. 현금영수증 결과 처리 = */ +/* = -------------------------------------------------------------------------- = */ + $cash_yn = $c_PayPlus->mf_get_res_data( "cash_yn" ); // 현금영수증 등록여부 + $cash_authno = $c_PayPlus->mf_get_res_data( "cash_authno" ); // 현금 영수증 승인 번호 + $cash_tr_code = $c_PayPlus->mf_get_res_data( "cash_tr_code" ); // 현금영수증 등록구분 + +/* = -------------------------------------------------------------------------- = */ +/* = 05-8. 에스크로 여부 결과 처리 = */ +/* = -------------------------------------------------------------------------- = */ + $escw_yn = $c_PayPlus->mf_get_res_data( "escw_yn" ); // 에스크로 여부 + } +} + +/* = -------------------------------------------------------------------------- = */ +/* = 05. 승인 결과 처리 END = */ +/* ============================================================================== */ +?> \ No newline at end of file diff --git a/shop/kcp/pp_ax_hub_cancel.php b/shop/kcp/pp_ax_hub_cancel.php new file mode 100644 index 000000000..f5c14d89c --- /dev/null +++ b/shop/kcp/pp_ax_hub_cancel.php @@ -0,0 +1,79 @@ +mf_clear(); + + $tran_cd = "00200000"; + + /* ============================================================================== */ + /* = 07-1.자동취소시 에스크로 거래인 경우 = */ + /* = -------------------------------------------------------------------------- = */ + // 취소시 사용하는 mod_type + $bSucc_mod_type = ""; + + // 에스크로 가상계좌 건의 경우 가상계좌 발급취소(STE5) + if ( $escw_yn == "Y" && $use_pay_method == "001000000000" ) + { + $bSucc_mod_type = "STE5"; + } + // 에스크로 가상계좌 이외 건은 즉시취소(STE2) + else if ( $escw_yn == "Y" ) + { + $bSucc_mod_type = "STE2"; + } + // 에스크로 거래 건이 아닌 경우(일반건)(STSC) + else + { + $bSucc_mod_type = "STSC"; + } + /* = -------------------------------------------------------------------------- = */ + /* = 07-1. 자동취소시 에스크로 거래인 경우 처리 END = */ + /* = ========================================================================== = */ + + $c_PayPlus->mf_set_modx_data( "tno", $tno ); // KCP 원거래 거래번호 + $c_PayPlus->mf_set_modx_data( "mod_type", $bSucc_mod_type ); // 원거래 변경 요청 종류 + $c_PayPlus->mf_set_modx_data( "mod_ip", $cust_ip ); // 변경 요청자 IP + $c_PayPlus->mf_set_modx_data( "mod_desc", iconv_euckr($cancel_msg) ); // 변경 사유 + + $c_PayPlus->mf_do_tx( $tno, $g_conf_home_dir, $g_conf_site_cd, + $g_conf_site_key, $tran_cd, "", + $g_conf_gw_url, $g_conf_gw_port, "payplus_cli_slib", + $ordr_idxx, $cust_ip, "3" , + 0, 0, $g_conf_key_dir, $g_conf_log_dir); + + $res_cd = $c_PayPlus->m_res_cd; + $res_msg = $c_PayPlus->m_res_msg; + } + } +} // End of [res_cd = "0000"] +/* ============================================================================== */ + +// locale 설정 초기화 +setlocale(LC_CTYPE, ''); +?> \ No newline at end of file diff --git a/shop/kcp/pp_ax_hub_lib.php b/shop/kcp/pp_ax_hub_lib.php new file mode 100644 index 000000000..764ccdd97 --- /dev/null +++ b/shop/kcp/pp_ax_hub_lib.php @@ -0,0 +1,295 @@ +m_payx_common = ""; + $this->m_payx_card = ""; + $this->m_ordr_data = ""; + $this->m_rcvr_data = ""; + $this->m_escw_data = ""; + $this->m_modx_data = ""; + $this->m_encx_data = ""; + $this->m_encx_info = ""; + } + + function mf_init( $mode ) + { + if ( $mode == "1" ) + { + if ( !extension_loaded( 'pp_cli_dl_php' ) ) + { + dl( "pp_cli_dl_php.so" ); + } + } + } + + function mf_clear() + { + $this->m_payx_common = ""; + $this->m_payx_card = ""; + $this->m_ordr_data = ""; + $this->m_rcvr_data = ""; + $this->m_escw_data = ""; + $this->m_modx_data = ""; + $this->m_encx_data = ""; + $this->m_encx_info = ""; + } + + function mf_gen_trace_no( $site_cd, $ip, $mode ) + { + if ( $mode == "1" ) + { + $trace_no = lfPP_CLI_DL__gen_trace_no( $site_cd, $ip ); + } + else + { + $trace_no = ""; + } + + return $trace_no; + } + + /* -------------------------------------------------------------------- */ + /* - FUNC : ENC DATA 정보 설정 함수 - */ + /* -------------------------------------------------------------------- */ + function mf_set_payx_common_data( $name, $val ) + { + if ( $val != "" ) + { + $this->m_payx_common .= ( $name . '=' . $val . chr( 31 ) ); + } + } + + function mf_set_payx_card_data( $name, $val ) + { + if ( $val != "" ) + { + $this->m_payx_card .= ( $name . '=' . $val . chr( 31 ) ); + } + } + + function mf_set_ordr_data( $name, $val ) + { + if ( $val != "" ) + { + $this->m_ordr_data .= ( $name . '=' . $val . chr( 31 ) ); + } + } + + function mf_set_rcvr_data( $name, $val ) + { + if ( $val != "" ) + { + $this->m_rcvr_data .= ( $name . '=' . $val . chr( 31 ) ); + } + } + + function mf_set_escw_data( $name, $val ) + { + if ( $val != "" ) + { + $this->m_escw_data .= ( $name . '=' . $val . chr( 29 ) ); + } + } + + function mf_set_modx_data( $name, $val ) + { + if ( $val != "" ) + { + $this->m_modx_data .= ( $name . '=' . $val . chr( 31 ) ); + } + } + + function mf_set_encx_data( $encx_data, $encx_info ) + { + $this->m_encx_data = $encx_data; + $this->m_encx_info = $encx_info; + } + + /* -------------------------------------------------------------------- */ + /* - FUNC : 지불 처리 함수 - */ + /* -------------------------------------------------------------------- */ + function mf_do_tx( $trace_no, $home_dir, $site_cd, + $site_key, $tx_cd, $pub_key_str, + $pa_url, $pa_port, $user_agent, + $ordr_idxx, $cust_ip, + $log_level, $opt, $mode, + $key_dir, $log_dir) + { + $payx_data = $this->mf_get_payx_data(); + + $ordr_data = $this->mf_get_data( "ordr_data", $this->m_ordr_data ); + $rcvr_data = $this->mf_get_data( "rcvr_data", $this->m_rcvr_data ); + $escw_data = $this->mf_get_data( "escw_data", $this->m_escw_data ); + $modx_data = $this->mf_get_data( "mod_data", $this->m_modx_data ); + + if ( $mode == "1" ) + { + $res_data = lfPP_CLI_DL__do_tx_2( $trace_no, $home_dir, $site_cd, + $site_key, $tx_cd, $pub_key_str, + $pa_url, $pa_port, $user_agent, + $ordr_idxx, + $payx_data, $ordr_data, + $rcvr_data, $escw_data, + $modx_data, + $this->m_encx_data, $this->m_encx_info, + $log_level, $opt ); + } + else + { + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') + { + $bin_exe = $home_dir.'/bin/pp_cli_exe '; + + $res_data = $this->mf_exec($bin_exe . "\"". + "site_cd=" . $site_cd . "," . + "site_key=" . $site_key . "," . + "tx_cd=" . $tx_cd . "," . + "pa_url=" . $pa_url . "," . + "pa_port=" . $pa_port . "," . + "ordr_idxx=" . $ordr_idxx . "," . + "enc_data=" . $this->m_encx_data . "," . + "enc_info=" . $this->m_encx_info . "," . + "trace_no=" . $trace_no . "," . + "cust_ip=" . $cust_ip . "," . + "key_path=" . $key_dir . "," . + "log_path=" . $log_dir . "," . + "log_level=" . $log_level . "," . + "plan_data=" . $payx_data . + $ordr_data . + $rcvr_data . + $escw_data . + $modx_data . + "\"") ; + } + else + { + if(PHP_INT_MAX == 2147483647) // 32-bit + $bin_exe = $home_dir.'/bin/pp_cli'; + else + $bin_exe = $home_dir.'/bin/pp_cli_x64'; + + $res_data = $this->mf_exec( $bin_exe, + "-h", + "home=" . $home_dir . "," . + "site_cd=" . $site_cd . "," . + "site_key=" . $site_key . "," . + "tx_cd=" . $tx_cd . "," . + "pa_url=" . $pa_url . "," . + "pa_port=" . $pa_port . "," . + "ordr_idxx=" . $ordr_idxx . "," . + "payx_data=" . $payx_data . "," . + "ordr_data=" . $ordr_data . "," . + "rcvr_data=" . $rcvr_data . "," . + "escw_data=" . $escw_data . "," . + "modx_data=" . $modx_data . "," . + "enc_data=" . $this->m_encx_data . "," . + "enc_info=" . $this->m_encx_info . "," . + "trace_no=" . $trace_no . "," . + "cust_ip=" . $cust_ip . "," . + "log_level=" . $log_level . "," . + "opt=" . $opt . "" ); + } + + if ( $res_data == "" ) + { + $res_data = "res_cd=9502" . chr( 31 ) . "res_msg=연동 모듈 호출 오류"; + } + } + + parse_str( str_replace( chr( 31 ), "&", $res_data ), $this->m_res_data ); + + $this->m_res_cd = $this->m_res_data[ "res_cd" ]; + $this->m_res_msg = $this->m_res_data[ "res_msg" ]; + } + + /* -------------------------------------------------------------------- */ + /* - FUNC : 처리 결과 값을 리턴하는 함수 - */ + /* -------------------------------------------------------------------- */ + function mf_get_res_data( $name ) + { + return $this->m_res_data[ $name ]; + } + + function mf_get_payx_data() + { + if ( $this->m_payx_common != "" || $this->m_payx_card != "" ) + { + $my_data = "payx_data="; + } + + if ( $this->m_payx_common != "" ) + { + $my_data .= "common=" . $this->m_payx_common . chr( 30 ); + } + + if ( $this->m_payx_card != "" ) + { + $my_data .= ( "card=" . $this->m_payx_card . chr( 30 ) ); + } + + return $my_data; + } + + function mf_get_data( $data_name, $data ) + { + if ( $data != "" ) + { + $my_data = $data_name . "=" . $data; + } + else + { + $my_data = ""; + } + + return $my_data; + } + + function mf_exec() + { + $arg = func_get_args(); + + if ( is_array( $arg[0] ) ) $arg = $arg[0]; + + $exec_cmd = array_shift( $arg ); + + while ( list(,$i) = each($arg) ) + { + $exec_cmd .= " " . escapeshellarg( $i ); + } + + $rt = exec( $exec_cmd ); + + return $rt; + } + } +?> \ No newline at end of file diff --git a/shop/kcp/pp_cli_hub.php b/shop/kcp/pp_cli_hub.php new file mode 100644 index 000000000..a66dd6c4f --- /dev/null +++ b/shop/kcp/pp_cli_hub.php @@ -0,0 +1,390 @@ + +mf_clear(); + /* ============================================================================== */ + + + /* ============================================================================== */ + /* = 03. 처리 요청 정보 설정, 실행 = */ + /* = -------------------------------------------------------------------------- = */ + + /* = -------------------------------------------------------------------------- = */ + /* = 03-1. 승인 요청 = */ + /* = -------------------------------------------------------------------------- = */ + // 업체 환경 정보 + if ( $req_tx == "pay" ) + { + $tx_cd = "07010000"; // 현금영수증 등록 요청 + + // 현금영수증 정보 + $rcpt_data_set .= $c_PayPlus->mf_set_data_us( "user_type", $g_conf_user_type ); + $rcpt_data_set .= $c_PayPlus->mf_set_data_us( "trad_time", $trad_time ); + $rcpt_data_set .= $c_PayPlus->mf_set_data_us( "tr_code", $tr_code ); + $rcpt_data_set .= $c_PayPlus->mf_set_data_us( "id_info", $id_info ); + $rcpt_data_set .= $c_PayPlus->mf_set_data_us( "amt_tot", $amt_tot ); + $rcpt_data_set .= $c_PayPlus->mf_set_data_us( "amt_sup", $amt_sup ); + $rcpt_data_set .= $c_PayPlus->mf_set_data_us( "amt_svc", $amt_svc ); + $rcpt_data_set .= $c_PayPlus->mf_set_data_us( "amt_tax", $amt_tax ); + $rcpt_data_set .= $c_PayPlus->mf_set_data_us( "pay_type", "PAXX" ); // 선 결제 서비스 구분(PABK - 계좌이체, PAVC - 가상계좌, PAXX - 기타) + //$rcpt_data_set .= $c_PayPlus->mf_set_data_us( "pay_trade_no", $pay_trade_no ); // 결제 거래번호(PABK, PAVC일 경우 필수) + //$rcpt_data_set .= $c_PayPlus->mf_set_data_us( "pay_tx_id", $pay_tx_id ); // 가상계좌 입금통보 TX_ID(PAVC일 경우 필수) + + // 주문 정보 + $c_PayPlus->mf_set_ordr_data( "ordr_idxx", $ordr_idxx ); + $c_PayPlus->mf_set_ordr_data( "good_name", $good_name ); + $c_PayPlus->mf_set_ordr_data( "buyr_name", $buyr_name ); + $c_PayPlus->mf_set_ordr_data( "buyr_tel1", $buyr_tel1 ); + $c_PayPlus->mf_set_ordr_data( "buyr_mail", $buyr_mail ); + $c_PayPlus->mf_set_ordr_data( "comment", $comment ); + + // 가맹점 정보 + $corp_data_set .= $c_PayPlus->mf_set_data_us( "corp_type", $corp_type ); + + if ( $corp_type == "1" ) // 입점몰인 경우 판매상점 DATA 전문 생성 + { + $corp_data_set .= $c_PayPlus->mf_set_data_us( "corp_tax_type", $corp_tax_type ); + $corp_data_set .= $c_PayPlus->mf_set_data_us( "corp_tax_no", $corp_tax_no ); + $corp_data_set .= $c_PayPlus->mf_set_data_us( "corp_sell_tax_no",$corp_tax_no ); + $corp_data_set .= $c_PayPlus->mf_set_data_us( "corp_nm", $corp_nm ); + $corp_data_set .= $c_PayPlus->mf_set_data_us( "corp_owner_nm", $corp_owner_nm ); + $corp_data_set .= $c_PayPlus->mf_set_data_us( "corp_addr", $corp_addr ); + $corp_data_set .= $c_PayPlus->mf_set_data_us( "corp_telno", $corp_telno ); + } + + $c_PayPlus->mf_set_ordr_data( "rcpt_data", $rcpt_data_set ); + $c_PayPlus->mf_set_ordr_data( "corp_data", $corp_data_set ); + } + + /* = -------------------------------------------------------------------------- = */ + /* = 03-2. 취소 요청 = */ + /* = -------------------------------------------------------------------------- = */ + else if ( $req_tx == "mod" ) + { + if ( $mod_type == "STSQ" ) + { + $tx_cd = "07030000"; // 조회 요청 + } + else + { + $tx_cd = "07020000"; // 취소 요청 + } + + $c_PayPlus->mf_set_modx_data( "mod_type", $mod_type ); // 원거래 변경 요청 종류 + $c_PayPlus->mf_set_modx_data( "mod_value", $mod_value ); + $c_PayPlus->mf_set_modx_data( "mod_gubn", $mod_gubn ); + $c_PayPlus->mf_set_modx_data( "trad_time", $trad_time ); + + if ( $mod_type == "STPC" ) // 부분취소 + { + $c_PayPlus->mf_set_modx_data( "mod_mny", $mod_mny ); + $c_PayPlus->mf_set_modx_data( "rem_mny", $rem_mny ); + } + } + /* ============================================================================== */ + + + /* ============================================================================== */ + /* = 03-3. 실행 = */ + /* ------------------------------------------------------------------------------ */ + if ( strlen($tx_cd) > 0 ) + { + $c_PayPlus->mf_do_tx( "", $g_conf_home_dir, $g_conf_site_id, + $g_conf_site_key, $tx_cd, "", + $g_conf_pa_url, $g_conf_pa_port, "payplus_cli_slib", + $ordr_idxx, $cust_ip, $g_conf_log_level, + "", $g_conf_tx_mode, $g_conf_key_dir, $g_conf_log_dir ); + } + else + { + $c_PayPlus->m_res_cd = "9562"; + $c_PayPlus->m_res_msg = "연동 오류"; + } + $res_cd = $c_PayPlus->m_res_cd; // 결과 코드 + $res_msg = $c_PayPlus->m_res_msg; // 결과 메시지 + /* ============================================================================== */ + + + /* ============================================================================== */ + /* = 04. 승인 결과 처리 = */ + /* = -------------------------------------------------------------------------- = */ + if ( $req_tx == "pay" ) + { + if ( $res_cd == "0000" ) + { + $cash_no = $c_PayPlus->mf_get_res_data( "cash_no" ); // 현금영수증 거래번호 + $receipt_no = $c_PayPlus->mf_get_res_data( "receipt_no" ); // 현금영수증 승인번호 + $app_time = $c_PayPlus->mf_get_res_data( "app_time" ); // 승인시간(YYYYMMDDhhmmss) + $reg_stat = $c_PayPlus->mf_get_res_data( "reg_stat" ); // 등록 상태 코드 + $reg_desc = $c_PayPlus->mf_get_res_data( "reg_desc" ); // 등록 상태 설명 + + /* = -------------------------------------------------------------------------- = */ + /* = 04-1. 승인 결과를 업체 자체적으로 DB 처리 작업하시는 부분입니다. = */ + /* = -------------------------------------------------------------------------- = */ + /* = 승인 결과를 DB 작업 하는 과정에서 정상적으로 승인된 건에 대해 = */ + /* = DB 작업을 실패하여 DB update 가 완료되지 않은 경우, 자동으로 = */ + /* = 승인 취소 요청을 하는 프로세스가 구성되어 있습니다. = */ + /* = DB 작업이 실패 한 경우, bSucc 라는 변수(String)의 값을 "false" = */ + /* = 로 세팅해 주시기 바랍니다. (DB 작업 성공의 경우에는 "false" 이외의 = */ + /* = 값을 세팅하시면 됩니다.) = */ + /* = -------------------------------------------------------------------------- = */ + $bSucc = ""; // DB 작업 실패일 경우 "false" 로 세팅 + + // 결과값 serialize + $cash = array(); + $cash['receipt_no'] = $receipt_no; + $cash['app_time'] = $app_time; + $cash['reg_stat'] = $reg_stat; + $cash['reg_desc'] = iconv("cp949", "utf-8", $reg_desc); + $cash['tr_code'] = $tr_code; + $cash['id_info'] = $id_info; + $cash_info = serialize($cash); + + if($tx == 'personalpay') { + $sql = " update {$g5['g5_shop_personalpay_table']} + set pp_cash = '1', + pp_cash_no = '$cash_no', + pp_cash_info = '$cash_info' + where pp_id = '$ordr_idxx' "; + } else { + $sql = " update {$g5['g5_shop_order_table']} + set od_cash = '1', + od_cash_no = '$cash_no', + od_cash_info = '$cash_info' + where od_id = '$ordr_idxx' "; + } + + $result = sql_query($sql, false); + if (!$result) $bSucc = "false"; + + /* = -------------------------------------------------------------------------- = */ + /* = 04-2. DB 작업 실패일 경우 자동 승인 취소 = */ + /* = -------------------------------------------------------------------------- = */ + if ( $bSucc == "false" ) + { + $c_PayPlus->mf_clear(); + + $tx_cd = "07020000"; // 취소 요청 + + $c_PayPlus->mf_set_modx_data( "mod_type", "STSC" ); // 원거래 변경 요청 종류 + $c_PayPlus->mf_set_modx_data( "mod_value", $cash_no ); + $c_PayPlus->mf_set_modx_data( "mod_gubn", "MG01" ); + $c_PayPlus->mf_set_modx_data( "trad_time", $trad_time ); + + $c_PayPlus->mf_do_tx( "", $g_conf_home_dir, $g_conf_site_id, + $g_conf_site_key, $tx_cd, "", + $g_conf_pa_url, $g_conf_pa_port, "payplus_cli_slib", + $ordr_idxx, $cust_ip, $g_conf_log_level, + "", $g_conf_tx_mode ); + + $res_cd = $c_PayPlus->m_res_cd; + $res_msg = $c_PayPlus->m_res_msg; + } + + } // End of [res_cd = "0000"] + + /* = -------------------------------------------------------------------------- = */ + /* = 04-3. 등록 실패를 업체 자체적으로 DB 처리 작업하시는 부분입니다. = */ + /* = -------------------------------------------------------------------------- = */ + else + { + } + } + /* ============================================================================== */ + + + /* ============================================================================== */ + /* = 05. 변경 결과 처리 = */ + /* = -------------------------------------------------------------------------- = */ + else if ( $req_tx == "mod" ) + { + if ( $res_cd == "0000" ) + { + $cash_no = $c_PayPlus->mf_get_res_data( "cash_no" ); // 현금영수증 거래번호 + $receipt_no = $c_PayPlus->mf_get_res_data( "receipt_no" ); // 현금영수증 승인번호 + $app_time = $c_PayPlus->mf_get_res_data( "app_time" ); // 승인시간(YYYYMMDDhhmmss) + $reg_stat = $c_PayPlus->mf_get_res_data( "reg_stat" ); // 등록 상태 코드 + $reg_desc = $c_PayPlus->mf_get_res_data( "reg_desc" ); // 등록 상태 설명 + } + + /* = -------------------------------------------------------------------------- = */ + /* = 05-1. 변경 실패를 업체 자체적으로 DB 처리 작업하시는 부분입니다. = */ + /* = -------------------------------------------------------------------------- = */ + else + { + } + } + /* ============================================================================== */ + + + /* ============================================================================== */ + /* = 06. 인스턴스 CleanUp = */ + /* = -------------------------------------------------------------------------- = */ + $c_PayPlus->mf_clear(); + /* ============================================================================== */ + + + /* ============================================================================== */ + /* = 07. 폼 구성 및 결과페이지 호출 = */ + /* ============================================================================== */ +?> + + + + + + +
        + + + + + "> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "> + +
        + + + + \ No newline at end of file diff --git a/shop/kcp/pp_cli_hub_lib.php b/shop/kcp/pp_cli_hub_lib.php new file mode 100644 index 000000000..c7bc1222b --- /dev/null +++ b/shop/kcp/pp_cli_hub_lib.php @@ -0,0 +1,290 @@ +m_payx_data="payx_data="; + $this->m_payx_common=""; + $this->m_payx_card=""; + $this->m_ordr_data=""; + $this->m_rcvr_data=""; + $this->m_escw_data=""; + $this->m_modx_data=""; + $this->m_encx_data=""; + } + + function mf_init( $mode ) + { + if ( $mode == "1" ) + { + if ( !extension_loaded( 'pp_cli_dl_php' ) ) + { + dl( "pp_cli_dl_php.so" ); + } + } + } + + function mf_clear() + { + $this->m_payx_data="payx_data="; + $this->m_payx_common=""; + $this->m_payx_card=""; + $this->m_ordr_data=""; + $this->m_rcvr_data=""; + $this->m_escw_data=""; + $this->m_modx_data=""; + $this->m_encx_data=""; + } + + function mf_gen_trace_no( $site_cd, $ip, $mode ) + { + if ( $mode == "1" ) + { + $trace_no = lfPP_CLI_DL__gen_trace_no( $site_cd, $ip ); + } + else + { + $trace_no = ""; + } + + return $trace_no; + } + + function mf_set_data_us( $name, $val ) + { + $data = ""; + + if ( $name != "" && $val != "" ) + { + $data = $name . '=' . $val . chr( 31 ); + } + + return $data; + } + + function mf_add_payx_data( $pay_type, $payx_data ) + { + $this->m_payx_data .= ( $pay_type . '=' . $payx_data . chr( 30 ) ); + } + + function mf_set_ordr_data( $name, $val ) + { + if ( $val != "" ) + { + $this->m_ordr_data .= ( $name . '=' . $val . chr( 31 ) ); + } + } + + function mf_set_rcvr_data( $name, $val ) + { + if ( $val != "" ) + { + $this->m_rcvr_data .= ( $name . '=' . $val . chr( 31 ) ); + } + } + + function mf_set_escw_data( $name, $val ) + { + if ( $val != "" ) + { + $this->m_escw_data .= ( $name . '=' . $val . chr( 29 ) ); + } + } + + function mf_set_modx_data( $name, $val ) + { + if ( $val != "" ) + { + $this->m_modx_data .= ( $name . '=' . $val . chr( 31 ) ); + } + } + + /* -------------------------------------------------------------------- */ + /* - FUNC : 지불 처리 함수 - */ + /* -------------------------------------------------------------------- */ + function mf_do_tx( $trace_no, $home_dir, $site_cd, + $site_key, $tx_cd, $pub_key_str, + $pa_url, $pa_port, $user_agent, + $ordr_idxx, $cust_ip, + $log_level, $opt, $mode, + $key_dir, $log_dir) + { + $payx_data = $this->m_payx_data; + + $ordr_data = $this->mf_get_data( "ordr_data", $this->m_ordr_data ); + $rcvr_data = $this->mf_get_data( "rcvr_data", $this->m_rcvr_data ); + $escw_data = $this->mf_get_data( "escw_data", $this->m_escw_data ); + $modx_data = $this->mf_get_data( "mod_data", $this->m_modx_data ); + + if ( $mode == "1" ) + { + $res_data = lfPP_CLI_DL__do_tx_2( $trace_no, $home_dir, $site_cd, + $site_key, $tx_cd, $pub_key_str, + $pa_url, $pa_port, $user_agent, + $ordr_idxx, + $payx_data, $ordr_data, + $rcvr_data, $escw_data, + $modx_data, + $this->m_encx_data, $this->m_encx_info, + $log_level, $opt ); + + } + else + { + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') + { + $bin_exe = $home_dir.'/bin/pp_cli_exe '; + + $res_data = $this->mf_exec($bin_exe . "\"". + "site_cd=" . $site_cd . "," . + "site_key=" . $site_key . "," . + "tx_cd=" . $tx_cd . "," . + "pa_url=" . $pa_url . "," . + "pa_port=" . $pa_port . "," . + "ordr_idxx=" . $ordr_idxx . "," . + "enc_data=" . $this->m_encx_data . "," . + "enc_info=" . $this->m_encx_info . "," . + "trace_no=" . $trace_no . "," . + "cust_ip=" . $cust_ip . "," . + "key_path=" . $key_dir . "," . + "log_path=" . $log_dir . "," . + "log_level=" . $log_level . "," . + "plan_data=" . $payx_data . + $ordr_data . + $rcvr_data . + $escw_data . + $modx_data . + "\"") ; + } + else + { + if(PHP_INT_MAX == 2147483647) // 32-bit + $bin_exe = $home_dir.'/bin/pp_cli'; + else + $bin_exe = $home_dir.'/bin/pp_cli_x64'; + + $res_data = $this->mf_exec( $bin_exe, + "-h", + "home=" . $home_dir . "," . + "site_cd=" . $site_cd . "," . + "site_key=" . $site_key . "," . + "tx_cd=" . $tx_cd . "," . + "pa_url=" . $pa_url . "," . + "pa_port=" . $pa_port . "," . + "ordr_idxx=" . $ordr_idxx . "," . + "payx_data=" . $payx_data . "," . + "ordr_data=" . $ordr_data . "," . + "rcvr_data=" . $rcvr_data . "," . + "escw_data=" . $escw_data . "," . + "modx_data=" . $modx_data . "," . + "enc_data=" . $this->m_encx_data . "," . + "enc_info=" . $this->m_encx_info . "," . + "trace_no=" . $trace_no . "," . + "cust_ip=" . $cust_ip . "," . + "log_level=" . $log_level . "," . + "opt=" . $opt . "" ); + } + + if ( $res_data == "" ) + { + $res_data = "res_cd=9502" . chr( 31 ) . "res_msg=연동 모듈 호출 오류"; + } + } + + parse_str( str_replace( chr( 31 ), "&", $res_data ), $this->m_res_data ); + + $this->m_res_cd = $this->m_res_data[ "res_cd" ]; + $this->m_res_msg = $this->m_res_data[ "res_msg" ]; + } + + /* -------------------------------------------------------------------- */ + /* - FUNC : 처리 결과 값을 리턴하는 함수 - */ + /* -------------------------------------------------------------------- */ + function mf_get_res_data( $name ) + { + return $this->m_res_data[ $name ]; + } + + function mf_get_payx_data() + { + $my_data = ""; + + if ( $this->m_payx_common != "" || $this->m_payx_card != "" ) + { + $my_data = "payx_data="; + } + + if ( $this->m_payx_common != "" ) + { + $my_data .= "common=" . $this->m_payx_common . chr( 30 ); + } + + if ( $this->m_payx_card != "" ) + { + $my_data .= ( "card=" . $this->m_payx_card . chr( 30 ) ); + } + + return $my_data; + } + + function mf_get_data( $data_name, $data ) + { + $my_data = ""; + + if ( $data != "" ) + { + $my_data = $data_name . "=" . $data; + } + else + { + $my_data = ""; + } + + return $my_data; + } + + function mf_exec() + { + $arg = func_get_args(); + + if ( is_array( $arg[0] ) ) $arg = $arg[0]; + + $exec_cmd = array_shift( $arg ); + + while ( list(,$i) = each($arg) ) + { + $exec_cmd .= " " . escapeshellarg( $i ); + } + + $rt = exec( $exec_cmd ); + + return $rt; + } +} +?> diff --git a/shop/kcp/pp_cli_result.php b/shop/kcp/pp_cli_result.php new file mode 100644 index 000000000..f49fb0878 --- /dev/null +++ b/shop/kcp/pp_cli_result.php @@ -0,0 +1,276 @@ + + + + + + +현금영수증발급 <?php echo $req_tx_name; ?> | <?php echo $config['cf_title']; ?> +'.PHP_EOL; +?> + + + + + +
        +

        현금영수증 - KCP Online Payment System

        + + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        결과코드
        결과 메세지
        현금영수증 거래번호
        현금영수증 승인번호
        등록 상태 코드
        등록 상태 설명
        승인시간
        현금영수증 URL + +

        영수증 확인은 실 등록의 경우에만 가능합니다.

        +
        결과코드
        결과 메세지
        취소 결과코드
        취소 결과 메세지
        상세메세지 + 쇼핑몰로 전화하여 확인하시기 바랍니다."; + } + else + { + echo "결제는 정상적으로 이루어졌지만 쇼핑몰에서 결제 결과를 처리하는 중 오류가 발생하여 시스템에서 자동으로 취소 요청을 하였으나,
        취소가 실패 되었습니다.
        쇼핑몰로 전화하여 확인하시기 바랍니다."; + } +?> +
        결과코드
        결과 메세지
        현금영수증 거래번호
        현금영수증 승인번호
        등록 상태 코드
        등록 상태 설명
        승인시간
        현금영수증 URL + +

        영수증 확인은 실 등록의 경우에만 가능합니다.

        +
        결과코드
        결과 메세지
        +
        + +
        + + + diff --git a/shop/kcp/proc_win.html b/shop/kcp/proc_win.html new file mode 100644 index 000000000..5ef4443ef --- /dev/null +++ b/shop/kcp/proc_win.html @@ -0,0 +1,17 @@ + + + + 처리중 + + + + + + + \ No newline at end of file diff --git a/shop/kcp/taxsave_form.php b/shop/kcp/taxsave_form.php new file mode 100644 index 000000000..9f782a91e --- /dev/null +++ b/shop/kcp/taxsave_form.php @@ -0,0 +1,240 @@ + + + + + + + + +
        +

        + +
        +

        주문정보

        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        주문 번호
        상품 정보
        주문자 이름
        주문자 E-Mail
        주문자 전화번호
        +
        +
        + +
        +

        현금영수증 발급 정보

        + +
        + + + + + + + + + + + + + + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        원 거래 시각
        발행 용도 + + + + +
        + + + ("-" 생략) +
        거래금액 총합원
        공급가액원
        봉사료원
        부가가치세원
        +
        + +
        + + + + +
        + + + +
        +
        + +

        ⓒ Copyright 2007. KCP Inc. All Rights Reserved.

        + +
        \ No newline at end of file diff --git a/shop/largeimage.php b/shop/largeimage.php new file mode 100644 index 000000000..ffaed37d2 --- /dev/null +++ b/shop/largeimage.php @@ -0,0 +1,34 @@ +'.str_replace(G5_PATH.'/', '', $skin).'파일이 존재하지 않습니다.

        '; + +include_once(G5_PATH.'/tail.sub.php'); +?> \ No newline at end of file diff --git a/shop/lg/_common.php b/shop/lg/_common.php new file mode 100644 index 000000000..bad54a5d7 --- /dev/null +++ b/shop/lg/_common.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/shop/lg/escrow.register.php b/shop/lg/escrow.register.php new file mode 100644 index 000000000..ddfc11e68 --- /dev/null +++ b/shop/lg/escrow.register.php @@ -0,0 +1,117 @@ + 'KE', + '로젠택배' => 'LG', + '아주택배' => 'AJ', + 'KG옐로우캡택배' => 'YC', + '우체국' => 'PO', + '이젠택배' => 'EZ', + '트라넷' => 'TN', + '한진택배' => 'HJ', + '현대택배' => 'HD', + '동부택배' => 'FE', + 'Bell Express' => 'BE', + 'CJ대한통운' => 'CJ', + 'HTH' => 'SS', + 'KGB택배' => 'KB', + 'KT로지스택배' => 'KT', + 'SC로지스택배' => 'SC', + '일양로지스' => 'IY', + '이노지스택배' => 'IN', + '하나로택배' => 'HN', + '대신택배' => 'DS', + '우편등기' => 'RP' +); + +// 발송정보 +$oid = $od['od_id']; // 주문번호 +$productid = ''; // 상품ID +$dlvtype = '03'; // 등록내용구분 +$rcvdate = ''; // 실수령일자 +$rcvname = ''; // 실수령인명 +$rcvrelation = ''; // 관계 +$dlvdate = date("YmdHi", G5_SERVER_TIME); // 발송일자 +$dlvcompcode = $dlvcomcode[$escrow_corp]; // 배송회사코드 +$dlvcomp = str_replace(' ', '||', $escrow_corp); // 배송회사명 +$dlvno = str_replace(' ', '||', $escrow_numb); // 운송장번호 +$dlvworker = ''; // 배송자명 +$dlvworkertel = ''; // 배송자전화번호 + +$mertkey = $config['cf_lg_mert_key']; // 각 상점의 테스트용 상점키와 서비스용 상점키 + +$hashdate; // 인증키 +$datasize = 1; // 여러건 전송일대 상점셋팅 + +$hashdata = md5($mid.$oid.$dlvdate.$dlvcompcode.$dlvno.$mertkey); + + +// LG유플러스의 배송결과등록페이지를 호출하여 배송정보등록함 +/* +* 아래 URL 을 호출시 파라메터의 값에 공백이 발생하면 해당 URL이 비정상적으로 호출됩니다. +* 배송사명등을 파라메터로 등록시 공백을 "||" 으로 변경하여 주시기 바랍니다. +*/ +$str_url = $service_url."?mid=$mid&oid=$oid&productid=$productid&orderdate=$orderdate&dlvtype=$dlvtype&rcvdate=$rcvdate&rcvname=$rcvname&rcvrelation=$rcvrelation&dlvdate=$dlvdate&dlvcompcode=$dlvcompcode&dlvno=$dlvno&dlvworker=$dlvworker&dlvworkertel=$dlvworkertel&hashdata=$hashdata"; + +/* +$ch = curl_init(); + +curl_setopt ($ch, CURLOPT_URL, $str_url); +curl_setopt ($ch, CURLOPT_COOKIEJAR, COOKIE_FILE_PATH); +curl_setopt ($ch, CURLOPT_COOKIEFILE, COOKIE_FILE_PATH); +curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); + +$fp = curl_exec ($ch); + +if(curl_errno($ch)){ + // 연결실패시 DB 처리 로직 추가 +}else{ + if(trim($fp)=="OK"){ + // 정상처리되었을때 DB 처리 + }else{ + // 비정상처리 되었을때 DB 처리 + } +} +curl_close($ch); +*/ +/* +* fopen 방식 +* php 4.3 버전 이전에서 사용가능 +*/ + +$fp = @fopen($str_url,"r"); + +if(!$fp) +{ + // 연결실패시 DB 처리 로직 추가 +} +else +{ + // 해당 페이지 return값 읽기 + while(!feof($fp)) + { + $res .= fgets($fp,3000); + } + + if(trim($res) == "OK") + { + // 정상처리되었을때 DB 처리 + } + else + { + // 비정상처리 되었을때 DB 처리 + } +} +?> \ No newline at end of file diff --git a/shop/lg/makehashdata.php b/shop/lg/makehashdata.php new file mode 100644 index 000000000..0289f09a2 --- /dev/null +++ b/shop/lg/makehashdata.php @@ -0,0 +1,48 @@ + 계약정보 -> 상점정보관리에서 확인하실수 있습니다) + * + * MD5 해쉬데이터 암호화 검증을 위해 + * LG유플러스에서 발급한 상점키(MertKey)를 환경설정 파일(lgdacom/conf/mall.conf)에 반드시 입력하여 주시기 바랍니다. + */ + +$xpay = new XPay($configPath, $CST_PLATFORM); + +// Mert Key 설정 +$xpay->set_config_value('t'.$LGD_MID, $config['cf_lg_mert_key']); +$xpay->set_config_value($LGD_MID, $config['cf_lg_mert_key']); + +$xpay->Init_TX($LGD_MID); +$LGD_HASHDATA = md5($LGD_MID.$LGD_OID.$LGD_AMOUNT.$LGD_TIMESTAMP.$xpay->config[$LGD_MID]); +/* + ************************************************* + * 2. MD5 해쉬암호화 (수정하지 마세요) - END + ************************************************* + */ +die($LGD_HASHDATA); +?> \ No newline at end of file diff --git a/shop/lg/orderform.1.php b/shop/lg/orderform.1.php new file mode 100644 index 000000000..a7acb18cf --- /dev/null +++ b/shop/lg/orderform.1.php @@ -0,0 +1,69 @@ + + + + +
        + + \ No newline at end of file diff --git a/shop/lg/orderform.2.php b/shop/lg/orderform.2.php new file mode 100644 index 000000000..246f82390 --- /dev/null +++ b/shop/lg/orderform.2.php @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/shop/lg/orderform.3.php b/shop/lg/orderform.3.php new file mode 100644 index 000000000..977c1b92e --- /dev/null +++ b/shop/lg/orderform.3.php @@ -0,0 +1,21 @@ + + + + + + + + \ No newline at end of file diff --git a/shop/lg/orderform.4.php b/shop/lg/orderform.4.php new file mode 100644 index 000000000..d054abec9 --- /dev/null +++ b/shop/lg/orderform.4.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/shop/lg/orderform.5.php b/shop/lg/orderform.5.php new file mode 100644 index 000000000..71e5bc1d2 --- /dev/null +++ b/shop/lg/orderform.5.php @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/shop/lg/orderpartcancel.inc.php b/shop/lg/orderpartcancel.inc.php new file mode 100644 index 000000000..8057d5359 --- /dev/null +++ b/shop/lg/orderpartcancel.inc.php @@ -0,0 +1,100 @@ +set_config_value('t'.$LGD_MID, $config['cf_lg_mert_key']); +$xpay->set_config_value($LGD_MID, $config['cf_lg_mert_key']); + +$xpay->Init_TX($LGD_MID); + +$xpay->Set("LGD_TXNAME", "PartialCancel"); +$xpay->Set("LGD_TID", $LGD_TID); +$xpay->Set("LGD_CANCELAMOUNT", $LGD_CANCELAMOUNT); +$xpay->Set("LGD_REMAINAMOUNT", $LGD_REMAINAMOUNT); +$xpay->Set("LGD_CANCELTAXFREEAMOUNT", $LGD_CANCELTAXFREEAMOUNT); +$xpay->Set("LGD_CANCELREASON", $LGD_CANCELREASON); +$xpay->Set("LGD_RFACCOUNTNUM", $LGD_RFACCOUNTNUM); +$xpay->Set("LGD_RFBANKCODE", $LGD_RFBANKCODE); +$xpay->Set("LGD_RFCUSTOMERNAME", $LGD_RFCUSTOMERNAME); +$xpay->Set("LGD_RFPHONE", $LGD_RFPHONE); +$xpay->Set("LGD_REQREMAIN", "0"); +$xpay->Set("LGD_ENCODING", "UTF-8"); + +/* + * 1. 결제 부분취소 요청 결과처리 + * + */ +if ($xpay->TX()) { + //1)결제 부분취소결과 화면처리(성공,실패 결과 처리를 하시기 바랍니다.) + /* + echo "결제 부분취소 요청이 완료되었습니다.
        "; + echo "TX Response_code = " . $xpay->Response_Code() . "
        "; + echo "TX Response_msg = " . $xpay->Response_Msg() . "

        "; + + $keys = $xpay->Response_Names(); + foreach($keys as $name) { + echo $name . " = " . $xpay->Response($name, 0) . "
        "; + } + echo "

        "; + */ + + if( '0000' == $xpay->Response_Code() ) { + // 환불금액기록 + $tno = $xpay->Response("LGD_TID", 0); + $mod_mny = (int)$tax_mny + (int)$free_mny; + + $sql = " update {$g5['g5_shop_order_table']} + set od_refund_price = od_refund_price + '$mod_mny', + od_shop_memo = concat(od_shop_memo, \"$mod_memo\") + where od_id = '{$od['od_id']}' + and od_tno = '$tno' "; + sql_query($sql); + + // 미수금 등의 정보 업데이트 + $info = get_order_info($od_id); + + $sql = " update {$g5['g5_shop_order_table']} + set od_misu = '{$info['od_misu']}', + od_tax_mny = '{$info['od_tax_mny']}', + od_vat_mny = '{$info['od_vat_mny']}', + od_free_mny = '{$info['od_free_mny']}' + where od_id = '$od_id' "; + sql_query($sql); + } else { + alert($xpay->Response_Msg().' 코드 : '.$xpay->Response_Code()); + } +} else { + //2)API 요청 실패 화면처리 + /* + echo "결제 부분취소 요청이 실패하였습니다.
        "; + echo "TX Response_code = " . $xpay->Response_Code() . "
        "; + echo "TX Response_msg = " . $xpay->Response_Msg() . "

        "; + */ + + alert('결제 부분취소 요청이 실패하였습니다.\\n\\n'.$xpay->Response_Code().' : '.$xpay->Response_Msg()); +} +?> \ No newline at end of file diff --git a/shop/lg/taxsave_form.php b/shop/lg/taxsave_form.php new file mode 100644 index 000000000..621ab0513 --- /dev/null +++ b/shop/lg/taxsave_form.php @@ -0,0 +1,189 @@ + + + + +

        +

        + +
        +

        주문정보

        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        주문 번호
        상품 정보
        주문자 이름
        주문자 E-Mail
        주문자 전화번호
        +
        +
        + +
        +

        현금영수증 발급 정보

        + +
        + + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        원 거래 시각
        발행 용도 + + + + +
        + + + ("-" 생략) +
        거래금액 총합원
        공급가액원
        봉사료원
        부가가치세원
        +
        + +
        + + + + +
        + +
        +
        + +
        \ No newline at end of file diff --git a/shop/lg/taxsave_result.php b/shop/lg/taxsave_result.php new file mode 100644 index 000000000..b778f3857 --- /dev/null +++ b/shop/lg/taxsave_result.php @@ -0,0 +1,258 @@ +개인결제 내역이 존재하지 않습니다.

        '); + + $od_tno = $od['pp_tno']; + $goods_name = $od['pp_name'].'님 개인결제'; + $settle_case = $od['pp_settle_case']; + $order_price = $od['pp_receipt_price']; + $od_casseqno = $od['pp_casseqno']; +} else { + $od = sql_fetch(" select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' "); + if (!$od) + die('

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

        '); + + $od_tno = $od['od_tno']; + $goods = get_goods($od['od_id']); + $goods_name = $goods['full_name']; + $settle_case = $od['od_settle_case']; + $order_price = $od['od_tax_mny'] + $od['od_vat_mny'] + $od['od_free_mny']; + $od_casseqno = $od['od_casseqno']; +} + +switch($settle_case) { + case '가상계좌': + $pay_type = 'SC0040'; + break; + case '계좌이체': + $pay_type = 'SC0030'; + break; + case '무통장': + $pay_type = 'SC0100'; + break; + default: + die('

        현금영수증은 무통장, 가상계좌, 계좌이체에 한해 발급요청이 가능합니다.

        '); + break; +} + +$LGD_METHOD = 'AUTH'; //메소드('AUTH':승인, 'CANCEL' 취소) +$LGD_OID = $od_id; //주문번호(상점정의 유니크한 주문번호를 입력하세요) +$LGD_PAYTYPE = $pay_type; //결제수단 코드 (SC0030:계좌이체, SC0040:가상계좌, SC0100:무통장입금 단독) +$LGD_AMOUNT = $order_price; //금액("," 를 제외한 금액을 입력하세요) +$LGD_PRODUCTINFO = $goods_name; //상품명 +$LGD_TID = $od_tno; //LG유플러스 거래번호 +$LGD_CUSTOM_MERTNAME = $default['de_admin_company_name']; //상점명 +$LGD_CUSTOM_CEONAME = $default['de_admin_company_owner']; //대표자명 +$LGD_CUSTOM_BUSINESSNUM = $default['de_admin_company_saupja_no']; //사업자등록번호 +$LGD_CUSTOM_MERTPHONE = $default['de_admin_company_tel']; //상점 전화번호 +$LGD_CASHCARDNUM = $_POST['id_info']; //발급번호(주민등록번호,현금영수증카드번호,휴대폰번호 등등) +$LGD_CASHRECEIPTUSE = $_POST['tr_code']; //현금영수증발급용도('1':소득공제, '2':지출증빙) + +$xpay = new XPay($configPath, $CST_PLATFORM); + +// Mert Key 설정 +$xpay->set_config_value('t'.$LGD_MID, $config['cf_lg_mert_key']); +$xpay->set_config_value($LGD_MID, $config['cf_lg_mert_key']); + +$xpay->Init_TX($LGD_MID); +$xpay->Set("LGD_TXNAME", "CashReceipt"); +$xpay->Set("LGD_METHOD", $LGD_METHOD); +$xpay->Set("LGD_PAYTYPE", $LGD_PAYTYPE); + +if ($LGD_METHOD == "AUTH") { // 현금영수증 발급 요청 + $xpay->Set("LGD_OID", $LGD_OID); + $xpay->Set("LGD_AMOUNT", $LGD_AMOUNT); + $xpay->Set("LGD_CASHCARDNUM", $LGD_CASHCARDNUM); + $xpay->Set("LGD_CUSTOM_MERTNAME", $LGD_CUSTOM_MERTNAME); + $xpay->Set("LGD_CUSTOM_CEONAME", $LGD_CUSTOM_CEONAME); + $xpay->Set("LGD_CUSTOM_BUSINESSNUM", $LGD_CUSTOM_BUSINESSNUM); + $xpay->Set("LGD_CUSTOM_MERTPHONE", $LGD_CUSTOM_MERTPHONE); + $xpay->Set("LGD_CASHRECEIPTUSE", $LGD_CASHRECEIPTUSE); + $xpay->Set("LGD_ENCODING", "UTF-8"); + + if(isset($od['od_tax_flag']) && $od['od_tax_flag'] && $od['od_free_mny'] > 0) { + $xpay->Set("LGD_TAXFREEAMOUNT", $od['od_free_mny']); //비과세 금액 + } + + if ($LGD_PAYTYPE == "SC0030"){ //기결제된 계좌이체건 현금영수증 발급요청시 필수 + $xpay->Set("LGD_TID", $LGD_TID); + } + else if ($LGD_PAYTYPE == "SC0040"){ //기결제된 가상계좌건 현금영수증 발급요청시 필수 + $xpay->Set("LGD_TID", $LGD_TID); + $xpay->Set("LGD_SEQNO", $od_casseqno); + } + else { //무통장입금 단독건 발급요청 + $xpay->Set("LGD_PRODUCTINFO", $LGD_PRODUCTINFO); + } +} + +/* + * 1. 현금영수증 발급/취소 요청 결과처리 + * + * 결과 리턴 파라미터는 연동메뉴얼을 참고하시기 바랍니다. + */ +if ($xpay->TX()) { + //1)현금영수증 발급/취소결과 화면처리(성공,실패 결과 처리를 하시기 바랍니다.) + /* + echo "현금영수증 발급/취소 요청처리가 완료되었습니다.
        "; + echo "TX Response_code = " . $xpay->Response_Code() . "
        "; + echo "TX Response_msg = " . $xpay->Response_Msg() . "

        "; + + echo "결과코드 : " . $xpay->Response("LGD_RESPCODE",0) . "
        "; + echo "결과메세지 : " . $xpay->Response("LGD_RESPMSG",0) . "
        "; + echo "거래번호 : " . $xpay->Response("LGD_TID",0) . "

        "; + + $keys = $xpay->Response_Names(); + foreach($keys as $name) { + echo $name . " = " . $xpay->Response($name, 0) . "
        "; + } + */ + + if($xpay->Response_Code() == '0000') { + $LGD_OID = $xpay->Response("LGD_OID",0); + $cash_no = $xpay->Response("LGD_CASHRECEIPTNUM",0); + + $cash = array(); + $cash['LGD_TID'] = $xpay->Response("LGD_TID",0); + $cash['LGD_TIMESTAMP'] = $xpay->Response("LGD_TIMESTAMP",0); + $cash['LGD_RESPDATE'] = $xpay->Response("LGD_RESPDATE",0); + $cash_info = serialize($cash); + + if($tx == 'personalpay') { + $sql = " update {$g5['g5_shop_personalpay_table']} + set pp_cash = '1', + pp_cash_no = '$cash_no', + pp_cash_info = '$cash_info' + where pp_id = '$LGD_OID' "; + } else { + $sql = " update {$g5['g5_shop_order_table']} + set od_cash = '1', + od_cash_no = '$cash_no', + od_cash_info = '$cash_info' + where od_id = '$LGD_OID' "; + } + + $result = sql_query($sql, false); + + if(!$result) { // DB 정보갱신 실패시 취소 + $xpay->Set("LGD_TXNAME", "CashReceipt"); + $xpay->Set("LGD_METHOD", "CANCEL"); + $xpay->Set("LGD_PAYTYPE", $LGD_PAYTYPE); + $xpay->Set("LGD_TID", $LGD_TID); + + if ($LGD_PAYTYPE == "SC0040"){ //가상계좌건 현금영수증 발급취소시 필수 + $xpay->Set("LGD_SEQNO", $od_casseqno); + } + + if ($xpay->TX()) { + /* + echo "현금영수증 취소 요청처리가 완료되었습니다.
        "; + echo "TX Response_code = " . $xpay->Response_Code() . "
        "; + echo "TX Response_msg = " . $xpay->Response_Msg() . "

        "; + + echo "결과코드 : " . $xpay->Response("LGD_RESPCODE",0) . "
        "; + echo "결과메세지 : " . $xpay->Response("LGD_RESPMSG",0) . "
        "; + echo "거래번호 : " . $xpay->Response("LGD_TID",0) . "

        "; + */ + } else { + $msg = '현금영수증 취소 요청처리가 정상적으로 완료되지 않았습니다.'; + if(!$is_admin) + $msg .= '쇼핑몰 관리자에게 문의해 주십시오.'; + + alert_close($msg); + } + } + } + +} else { + //2)API 요청 실패 화면처리 + /* + echo "현금영수증 발급/취소 요청처리가 실패되었습니다.
        "; + echo "TX Response_code = " . $xpay->Response_Code() . "
        "; + echo "TX Response_msg = " . $xpay->Response_Msg() . "

        "; + */ + + $msg = '현금영수증 발급 요청처리가 정상적으로 완료되지 않았습니다.'; + $msg .= '\\nTX Response_code = '.$xpay->Response_Code(); + $msg .= '\\nTX Response_msg = '.$xpay->Response_Msg(); + + alert($msg); +} + +$g5['title'] = ''; +include_once(G5_PATH.'/head.sub.php'); + +if($default['de_card_test']) { + echo ''.PHP_EOL; +} else { + echo ''.PHP_EOL; +} + +switch($LGD_PAYTYPE) { + case 'SC0030': + $trade_type = 'BANK'; + break; + case 'SC0040': + $trade_type = 'CAS'; + break; + default: + $trade_type = 'CR'; + break; +} +?> + +

        +

        현금영수증 - LG유플러스 eCredit

        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        결과코드Response_Code(); ?>
        결과 메세지Response_Msg(); ?>
        현금영수증 거래번호Response("LGD_TID",0); ?>
        현금영수증 승인번호Response("LGD_CASHRECEIPTNUM",0); ?>
        승인시간Response("LGD_RESPDATE",0)); ?>
        현금영수증 URL + +

        영수증 확인은 실 등록의 경우에만 가능합니다.

        +
        +
        + +
        + + \ No newline at end of file diff --git a/shop/lg/xpay_cancel.php b/shop/lg/xpay_cancel.php new file mode 100644 index 000000000..46882da54 --- /dev/null +++ b/shop/lg/xpay_cancel.php @@ -0,0 +1,18 @@ +Rollback($cancel_msg . " [TID:" . $xpay->Response("LGD_TID",0) . ",MID:" . $xpay->Response("LGD_MID",0) . ",OID:" . $xpay->Response("LGD_OID",0) . "]"); + + /* + echo "TX Rollback Response_code = " . $xpay->Response_Code() . "
        "; + echo "TX Rollback Response_msg = " . $xpay->Response_Msg() . "

        "; + + if( "0000" == $xpay->Response_Code() ) { + echo "자동취소가 정상적으로 완료 되었습니다.
        "; + }else{ + echo "자동취소가 정상적으로 처리되지 않았습니다.
        "; + } + */ +} +?> \ No newline at end of file diff --git a/shop/lg/xpay_result.php b/shop/lg/xpay_result.php new file mode 100644 index 000000000..2553be9d8 --- /dev/null +++ b/shop/lg/xpay_result.php @@ -0,0 +1,120 @@ + 절대불가(웹 디렉토리) +*/ + +/* + ************************************************* + * 1.최종결제 요청 - BEGIN + * (단, 최종 금액체크를 원하시는 경우 금액체크 부분 주석을 제거 하시면 됩니다.) + ************************************************* + */ +$LGD_PAYKEY = $_POST['LGD_PAYKEY']; + +$xpay = new XPay($configPath, $CST_PLATFORM); + +// Mert Key 설정 +$xpay->set_config_value('t'.$LGD_MID, $config['cf_lg_mert_key']); +$xpay->set_config_value($LGD_MID, $config['cf_lg_mert_key']); + +$xpay->Init_TX($LGD_MID); + +$xpay->Set('LGD_TXNAME', 'PaymentByKey'); +$xpay->Set('LGD_PAYKEY', $LGD_PAYKEY); + +//금액을 체크하시기 원하는 경우 아래 주석을 풀어서 이용하십시요. +//$DB_AMOUNT = "DB나 세션에서 가져온 금액"; //반드시 위변조가 불가능한 곳(DB나 세션)에서 금액을 가져오십시요. +//$xpay->Set('LGD_AMOUNTCHECKYN', 'Y'); +//$xpay->Set('LGD_AMOUNT', $DB_AMOUNT); + +/* + ************************************************* + * 1.최종결제 요청(수정하지 마세요) - END + ************************************************* + */ + +/* + * 2. 최종결제 요청 결과처리 + * + * 최종 결제요청 결과 리턴 파라미터는 연동메뉴얼을 참고하시기 바랍니다. + */ +if ($xpay->TX()) { + //1)결제결과 화면처리(성공,실패 결과 처리를 하시기 바랍니다.) + /* + echo "결제요청이 완료되었습니다.
        "; + echo "TX Response_code = " . $xpay->Response_Code() . "
        "; + echo "TX Response_msg = " . $xpay->Response_Msg() . "

        "; + + echo "거래번호 : " . $xpay->Response("LGD_TID",0) . "
        "; + echo "상점아이디 : " . $xpay->Response("LGD_MID",0) . "
        "; + echo "상점주문번호 : " . $xpay->Response("LGD_OID",0) . "
        "; + echo "결제금액 : " . $xpay->Response("LGD_AMOUNT",0) . "
        "; + echo "결과코드 : " . $xpay->Response("LGD_RESPCODE",0) . "
        "; + echo "결과메세지 : " . $xpay->Response("LGD_RESPMSG",0) . "

        "; + + $keys = $xpay->Response_Names(); + foreach($keys as $name) { + echo $name . " = " . $xpay->Response($name, 0) . "
        "; + } + + echo "

        "; + exit; + */ + + if( '0000' == $xpay->Response_Code() ) { + //최종결제요청 결과 성공 DB처리 + $tno = $xpay->Response('LGD_TID',0); + $amount = $xpay->Response('LGD_AMOUNT',0); + $app_time = $xpay->Response('LGD_PAYDATE',0); + $bank_name = $xpay->Response('LGD_FINANCENAME',0); + $depositor = $xpay->Response('LGD_PAYER',0); + $account = $xpay->Response('LGD_FINANCENAME',0).' '.$xpay->Response('LGD_ACCOUNTNUM',0).' '.$xpay->Response('LGD_SAOWNER',0); + $commid = $xpay->Response('LGD_FINANCENAME',0); + $mobile_no = $xpay->Response('LGD_TELNO',0); + $app_no = $xpay->Response('LGD_FINANCEAUTHNUM',0); + $card_name = $xpay->Response('LGD_FINANCENAME',0); + $pay_type = $xpay->Response('LGD_PAYTYPE',0); + $escw_yn = $xpay->Response('LGD_ESCROWYN',0); + } else { + //최종결제요청 결과 실패 DB처리 + //echo "최종결제요청 결과 실패 DB처리하시기 바랍니다.
        "; + + if(G5_IS_MOBILE) { + if(isset($_POST['pp_id']) && $_POST['pp_id']) { + $page_return_url = G5_SHOP_URL.'/personalpayform.php?pp_id='.get_session('ss_personalpay_id'); + } else { + $page_return_url = G5_SHOP_URL.'/orderform.php'; + if(get_session('ss_direct')) + $page_return_url .= '?sw_direct=1'; + } + + alert($xpay->Response_Msg().' 코드 : '.$xpay->Response_Code(), $page_return_url); + } else { + alert($xpay->Response_Msg().' 코드 : '.$xpay->Response_Code()); + } + } +} else { + //2)API 요청실패 화면처리 + /* + echo "결제요청이 실패하였습니다.
        "; + echo "TX Response_code = " . $xpay->Response_Code() . "
        "; + echo "TX Response_msg = " . $xpay->Response_Msg() . "

        "; + + //최종결제요청 결과 실패 DB처리 + echo "최종결제요청 결과 실패 DB처리하시기 바랍니다.
        "; + */ + + alert($xpay->Response_Msg().' 코드 : '.$xpay->Response_Code()); +} +?> diff --git a/shop/list.php b/shop/list.php new file mode 100644 index 000000000..a74e652ec --- /dev/null +++ b/shop/list.php @@ -0,0 +1,166 @@ +분류 관리'; +?> + + + + + +

        + + '.conv_content($ca['ca_head_html'], 1).'
        '; + + $cate_skin = $skin_dir.'/listcategory.skin.php'; + if(!is_file($cate_skin)) + $cate_skin = G5_SHOP_SKIN_PATH.'/listcategory.skin.php'; + include $cate_skin; + + // 상품 출력순서가 있다면 + if ($sort != "") + $order_by = $sort.' '.$sortodr.' , it_order, it_id desc'; + else + $order_by = 'it_order, it_id desc'; + + $error = '

        등록된 상품이 없습니다.

        '; + + // 리스트 스킨 + $skin_file = $skin_dir.'/'.$ca['ca_skin']; + + if (file_exists($skin_file)) { + + echo '
        '; + $sort_skin = $skin_dir.'/list.sort.skin.php'; + if(!is_file($sort_skin)) + $sort_skin = G5_SHOP_SKIN_PATH.'/list.sort.skin.php'; + include $sort_skin; + + // 상품 보기 타입 변경 버튼 + $sub_skin = $skin_dir.'/list.sub.skin.php'; + if(!is_file($sub_skin)) + $sub_skin = G5_SHOP_SKIN_PATH.'/list.sub.skin.php'; + include $sub_skin; + echo '
        '; + + // 총몇개 = 한줄에 몇개 * 몇줄 + $items = $ca['ca_list_mod'] * $ca['ca_list_row']; + // 페이지가 없으면 첫 페이지 (1 페이지) + if ($page < 1) $page = 1; + // 시작 레코드 구함 + $from_record = ($page - 1) * $items; + + $list = new item_list($skin_file, $ca['ca_list_mod'], $ca['ca_list_row'], $ca['ca_img_width'], $ca['ca_img_height']); + $list->set_category($ca['ca_id'], 1); + $list->set_category($ca['ca_id'], 2); + $list->set_category($ca['ca_id'], 3); + $list->set_is_page(true); + $list->set_order_by($order_by); + $list->set_from_record($from_record); + $list->set_view('it_img', true); + $list->set_view('it_id', false); + $list->set_view('it_name', true); + $list->set_view('it_basic', true); + $list->set_view('it_cust_price', true); + $list->set_view('it_price', true); + $list->set_view('it_icon', true); + $list->set_view('sns', true); + echo $list->run(); + + // where 된 전체 상품수 + $total_count = $list->total_count; + // 전체 페이지 계산 + $total_page = ceil($total_count / $items); + } + else + { + echo '
        '.str_replace(G5_PATH.'/', '', $skin_file).' 파일을 찾을 수 없습니다.
        관리자에게 알려주시면 감사하겠습니다.
        '; + } + ?> + + + + '.conv_content($ca['ca_tail_html'], 1).''; + +?> + + + +\n"; +?> diff --git a/shop/listtype.php b/shop/listtype.php new file mode 100644 index 000000000..6f5b2ef36 --- /dev/null +++ b/shop/listtype.php @@ -0,0 +1,87 @@ +\'\"\\\'\\\"\%\=\(\)\s]/", "", $_REQUEST['type']); +if ($type == 1) $g5['title'] = '히트상품'; +else if ($type == 2) $g5['title'] = '추천상품'; +else if ($type == 3) $g5['title'] = '최신상품'; +else if ($type == 4) $g5['title'] = '인기상품'; +else if ($type == 5) $g5['title'] = '할인상품'; +else + alert('상품유형이 아닙니다.'); + +include_once('./_head.php'); + +// 한페이지에 출력하는 이미지수 = $list_mod * $list_row +$list_mod = 3; // 한줄에 이미지 몇개씩 출력? +$list_row = 5; // 한 페이지에 몇라인씩 출력? + +$img_width = 230; // 출력이미지 폭 +$img_height = 230; // 출력이미지 높이 +?> + +set_type($type); + $list->set_list_skin($list_file); + $list->set_list_mod($list_mod); + $list->set_list_row($list_row); + $list->set_img_size($img_width, $img_height); + $list->set_is_page(true); + $list->set_order_by($order_by); + $list->set_from_record($from_record); + $list->set_view('it_img', true); + $list->set_view('it_id', false); + $list->set_view('it_name', true); + $list->set_view('it_cust_price', false); + $list->set_view('it_price', true); + $list->set_view('it_icon', true); + $list->set_view('sns', true); + echo $list->run(); + + // where 된 전체 상품수 + $total_count = $list->total_count; + // 전체 페이지 계산 + $total_page = ceil($total_count / $items); +} +else +{ + echo '
        '.$skin.' 파일을 찾을 수 없습니다.
        관리자에게 알려주시면 감사하겠습니다.
        '; +} +?> + + + + diff --git a/shop/mail/couponmail.mail.php b/shop/mail/couponmail.mail.php new file mode 100644 index 000000000..006c05bef --- /dev/null +++ b/shop/mail/couponmail.mail.php @@ -0,0 +1,36 @@ + + + + + +<?php echo $config['cf_title']; ?> - 쿠폰발행알림 메일 + + + + + + +
        +
        +

        + - 쿠폰발행알림 메일 +

        + +

        님께 발행된 쿠폰입니다.

        + +

        + + 바로가기 + +
        +
        + + + diff --git a/shop/mail/img/mail_bg1.gif b/shop/mail/img/mail_bg1.gif new file mode 100644 index 000000000..aa8a2cccf Binary files /dev/null and b/shop/mail/img/mail_bg1.gif differ diff --git a/shop/mail/img/mail_bg2.gif b/shop/mail/img/mail_bg2.gif new file mode 100644 index 000000000..6dfc85f15 Binary files /dev/null and b/shop/mail/img/mail_bg2.gif differ diff --git a/shop/mail/img/mail_bg3.gif b/shop/mail/img/mail_bg3.gif new file mode 100644 index 000000000..669031415 Binary files /dev/null and b/shop/mail/img/mail_bg3.gif differ diff --git a/shop/mail/img/mail_bg4.gif b/shop/mail/img/mail_bg4.gif new file mode 100644 index 000000000..78a648afd Binary files /dev/null and b/shop/mail/img/mail_bg4.gif differ diff --git a/shop/mail/img/mail_icon1.gif b/shop/mail/img/mail_icon1.gif new file mode 100644 index 000000000..4044e913c Binary files /dev/null and b/shop/mail/img/mail_icon1.gif differ diff --git a/shop/mail/img/mail_left.gif b/shop/mail/img/mail_left.gif new file mode 100644 index 000000000..39a7de7b7 Binary files /dev/null and b/shop/mail/img/mail_left.gif differ diff --git a/shop/mail/img/mail_right.gif b/shop/mail/img/mail_right.gif new file mode 100644 index 000000000..1ed0eec11 Binary files /dev/null and b/shop/mail/img/mail_right.gif differ diff --git a/shop/mail/itemrecommend.mail.php b/shop/mail/itemrecommend.mail.php new file mode 100644 index 000000000..407c22138 --- /dev/null +++ b/shop/mail/itemrecommend.mail.php @@ -0,0 +1,46 @@ + + + + + +<?php echo $config['cf_title']; ?> - <?php echo $from_name; ?> 의 상품 추천 메일 + + + + + + +
        +
        +

        + - 상품 추천 메일 +

        + +

        님께서 추천하신 상품입니다.

        + +
        +
        + +
        + +

        +
        + +

        + +

        + + 상품 자세히 보기 + +
        +
        + + + diff --git a/shop/mail/ordermail.mail.php b/shop/mail/ordermail.mail.php new file mode 100644 index 000000000..4781e9306 --- /dev/null +++ b/shop/mail/ordermail.mail.php @@ -0,0 +1,152 @@ + + + + +<?php echo $config['cf_title'];?> - 주문내역 처리 안내 + + + + + + +
        +
        +

        + - 주문내역 처리 안내 +

        + + + + + + + + + + + + + + + + + + + + + + + + + +
        주문상품 확인
        품명옵션상태
        + + + + + + + + + + + + + + + + + + + +
        신용카드 결제 확인
        승인일시
        승인금액
        + + + + + + + + + + + + + + + + + + + + + + + + +
        무통장 입금 확인 완료
        확인일시
        입금액
        입금자명
        + + + + + + + + + + + + + + + + + + + +
        포인트 결제 확인
        확인일시
        포인트
        + + + + + + + + + + + + + + + + + + + + + + + +
        배송 안내
        배송회사
        운송장번호
        배송일시
        + + + +

        + 전달사항 + +

        + + + +
        +
        + + + diff --git a/shop/mail/orderupdate1.mail.php b/shop/mail/orderupdate1.mail.php new file mode 100644 index 000000000..a8e49d015 --- /dev/null +++ b/shop/mail/orderupdate1.mail.php @@ -0,0 +1,199 @@ + + + + + +<?php echo $config['cf_title']; ?> - 주문 알림 메일 + + + + + + +
        +
        +

        + - 주문이 접수되었습니다. +

        + +

        + 주문번호
        + 본 메일은 ()을 기준으로 작성되었습니다. +

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0) { // 배송비가 있다면 ?> + + + + + + + 0) { // 추가배송비가 있다면 ?> + + + + + + + + + + + + + + + +
        주문 내역
        상품명
        판매가격
        선택옵션
        소계
        포인트
        배송비
        추가배송비
        주문합계
        포인트합계
        + + + + + + + + + 0) { ?> + + + + + + + 0 && $od_settle_case == '신용카드') { ?> + + + + + + + 0 && $od_settle_case == '계좌이체') { ?> + + + + + + + + + + + + + + + + + + + + +
        결제정보
        포인트 입금액
        신용카드 입금액
        입금액
        계좌번호
        입금자 이름
        결제정보가 없습니다.
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        주문하신 분 정보
        이름
        전화번호
        핸드폰
        주소
        희망배송일 ()
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        배송지 정보
        이 름
        전화번호
        핸드폰
        주소
        전하실 말씀
        + + 관리자 모드에서 주문 확인 + +
        +
        + + + diff --git a/shop/mail/orderupdate2.mail.php b/shop/mail/orderupdate2.mail.php new file mode 100644 index 000000000..15e770bb0 --- /dev/null +++ b/shop/mail/orderupdate2.mail.php @@ -0,0 +1,201 @@ + + + + + +<?php echo $config['cf_title']; ?> - 주문 알림 메일 + + + + + + +
        +
        +

        + - 주문이 접수되었습니다. +

        + +

        + 주문번호
        + 본 메일은 ()을 기준으로 작성되었습니다. +

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0) { // 배송비가 있다면 ?> + + + + + + + 0) { // 추가배송비가 있다면 ?> + + + + + + + + + + + + + + + +
        주문 내역
        상품명
        판매가격
        선택옵션
        소계
        포인트
        배송비
        추가배송비
        주문합계
        포인트합계
        + + + + + + + + + 0) { ?> + + + + + + + 0 && $od_settle_case == '신용카드') { ?> + + + + + + + 0 && $od_settle_case == '계좌이체') { ?> + + + + + + + + + + + + + + + + + + + + +
        결제정보
        포인트 입금액
        신용카드 입금액
        입금액
        계좌번호
        입금자 이름
        결제정보가 없습니다.
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        주문하신 분 정보
        이름
        전화번호
        핸드폰
        주소
        희망배송일 ()
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        배송지 정보
        이 름
        전화번호
        핸드폰
        주소
        전하실 말씀
        + +

        배송지를 변경하실 고객님은 로 연락주시기 바랍니다.

        + + 주문상세내역 확인 + +
        +
        + + + diff --git a/shop/mail/orderupdate3.mail.php b/shop/mail/orderupdate3.mail.php new file mode 100644 index 000000000..11ba98f95 --- /dev/null +++ b/shop/mail/orderupdate3.mail.php @@ -0,0 +1,122 @@ + + + + + +<?php echo $config['cf_title']; ?> - 주문 알림 메일 + + + + + + +
        +
        +

        + - 주문이 접수되었습니다. +

        + +

        + 주문번호
        + 본 메일은 ()을 기준으로 작성되었습니다. +

        + + + + + + + + + + + + + + + + + + + + + +
        주문 내역
        상품명
        판매가격
        선택옵션
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        주문하신 분 정보
        이름
        전화번호
        핸드폰
        주소
        희망배송일 ()
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        배송지 정보
        이 름
        전화번호
        핸드폰
        주소
        전하실 말씀
        + +

        이 주문과 관련된 내용은 로 연락주시기 바랍니다.

        + + + + + diff --git a/shop/mypage.php b/shop/mypage.php new file mode 100644 index 000000000..321a47615 --- /dev/null +++ b/shop/mypage.php @@ -0,0 +1,152 @@ += '".G5_TIME_YMD."' "; +$res = sql_query($sql); + +for($k=0; $cp=sql_fetch_array($res); $k++) { + if(!is_used_coupon($member['mb_id'], $cp['cp_id'])) + $cp_count++; +} +?> + + +
        + + +
        +

        회원정보 개요

        + + + +
        +
        보유포인트
        +
        점
        +
        보유쿠폰
        +
        +
        연락처
        +
        +
        E-Mail
        +
        +
        최종접속일시
        +
        +
        회원가입일시
        +
        +
        주소
        +
        +
        +
        + + + +
        +

        최근 주문내역

        + + + +
        + + + +
        +

        최근 위시리스트

        + +
        + + + + + + + + + + + + + + + + + + '; + ?> + +
        이미지상품명보관일시
        보관 내역이 없습니다.
        +
        + + +
        + + +
        + + + + + \ No newline at end of file diff --git a/shop/orderaddress.php b/shop/orderaddress.php new file mode 100644 index 000000000..826e28c38 --- /dev/null +++ b/shop/orderaddress.php @@ -0,0 +1,167 @@ + +
        +
        + +

        배송지 목록

        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + + 배송지명기본
        배송지
        이름전화번호주소관리
        + + + + + + + + + > +
        + + + 삭제 +
        +
        + +
        + + +
        +
        +
        + + + + + + \ No newline at end of file diff --git a/shop/orderaddressupdate.php b/shop/orderaddressupdate.php new file mode 100644 index 000000000..c13491a10 --- /dev/null +++ b/shop/orderaddressupdate.php @@ -0,0 +1,36 @@ + \ No newline at end of file diff --git a/shop/ordercoupon.php b/shop/ordercoupon.php new file mode 100644 index 000000000..df5eba08f --- /dev/null +++ b/shop/ordercoupon.php @@ -0,0 +1,79 @@ += '".G5_TIME_YMD."' + and cp_minimum <= '$price' "; +$result = sql_query($sql); +$count = mysql_num_rows($result); +?> + + +
        + 0) { ?> +
        + + + + + + + + + + + $row['cp_maximum']) + $dc = $row['cp_maximum']; + ?> + + + + + + + +
        쿠폰 선택
        쿠폰명할인금액적용
        + + + + +
        +
        + 사용할 수 있는 쿠폰이 없습니다.

        '; + } + ?> +
        + +
        +
        + \ No newline at end of file diff --git a/shop/ordererrormail.php b/shop/ordererrormail.php new file mode 100644 index 000000000..7f95a8d37 --- /dev/null +++ b/shop/ordererrormail.php @@ -0,0 +1,26 @@ +주문정보를 DB에 입력하는 중 오류가 발생했습니다.

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

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

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

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

        '; + $content .= '

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

        '; +} + +$content .= '

        오류내용

        '; +$content .= '

        '.$sql.'

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

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

        '; + +// 메일발송 +mailer($od_name, $od_email, $config['cf_admin_email'], $subject, $content, 1); + +unset($error); +?> \ No newline at end of file diff --git a/shop/orderform.php b/shop/orderform.php new file mode 100644 index 000000000..9a330b549 --- /dev/null +++ b/shop/orderform.php @@ -0,0 +1,1525 @@ +', 0); + +if (G5_IS_MOBILE) { + include_once(G5_MSHOP_PATH.'/orderform.php'); + return; +} + +set_session("ss_direct", $sw_direct); +// 장바구니가 비어있는가? +if ($sw_direct) { + $tmp_cart_id = get_session('ss_cart_direct'); +} +else { + $tmp_cart_id = get_session('ss_cart_id'); +} + +if (get_cart_count($tmp_cart_id) == 0) + alert('장바구니가 비어 있습니다.', G5_SHOP_URL.'/cart.php'); + +$g5['title'] = '주문서 작성'; + +// 전자결제를 사용할 때만 실행 +if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] || $default['de_card_use'] || $default['de_easy_pay_use']) { + switch($default['de_pg_service']) { + case 'lg': + $g5['body_script'] = ' onload="isActiveXOK();"'; + break; + case 'inicis': + $g5['body_script'] = ' onload="javascript:enable_click()"'; + break; + default: + $g5['body_script'] = ' onload="CheckPayplusInstall();"'; + break; + } +} + +include_once('./_head.php'); +if ($default['de_hope_date_use']) { + include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php'); +} + +// 새로운 주문번호 생성 +$od_id = get_uniqid(); +set_session('ss_order_id', $od_id); +$s_cart_id = $tmp_cart_id; +$order_action_url = G5_HTTPS_SHOP_URL.'/orderformupdate.php'; + +require_once('./settle_'.$default['de_pg_service'].'.inc.php'); + +// 결제대행사별 코드 include (스크립트 등) +require_once('./'.$default['de_pg_service'].'/orderform.1.php'); +?> + +
        +
        + +

        주문하실 상품을 확인하세요.

        + +
        + + + + + + + + + + + + + + + 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_price'].chr(31); + } + + $image = get_it_image($row['it_id'], 50, 50); + + $it_name = '' . stripslashes($row['it_name']) . ''; + $it_options = print_item_options($row['it_id'], $s_cart_id); + if($it_options) { + $it_name .= '
        '.$it_options.'
        '; + } + + // 복합과세금액 + if($default['de_tax_flag_use']) { + if($row['it_notax']) { + $comm_free_mny += $sum['price']; + } else { + $tot_tax_mny += $sum['price']; + } + } + + $point = $sum['point']; + $sell_price = $sum['price']; + + // 쿠폰 + if($is_member) { + $cp_button = ''; + $cp_count = 0; + + $sql = " select cp_id + from {$g5['g5_shop_coupon_table']} + where mb_id IN ( '{$member['mb_id']}', '전체회원' ) + and cp_start <= '".G5_TIME_YMD."' + and cp_end >= '".G5_TIME_YMD."' + and cp_minimum <= '$sell_price' + and ( + ( cp_method = '0' and cp_target = '{$row['it_id']}' ) + OR + ( cp_method = '1' and ( cp_target IN ( '{$row['ca_id']}', '{$row['ca_id2']}', '{$row['ca_id3']}' ) ) ) + ) "; + $res = sql_query($sql); + + for($k=0; $cp=sql_fetch_array($res); $k++) { + if(is_used_coupon($member['mb_id'], $cp['cp_id'])) + continue; + + $cp_count++; + } + + if($cp_count) { + $cp_button = ''; + $it_cp_count++; + } + } + + // 배송비 + switch($row['ct_send_cost']) + { + case 1: + $ct_send_cost = '착불'; + break; + case 2: + $ct_send_cost = '무료'; + break; + default: + $ct_send_cost = '선불'; + break; + } + + // 조건부무료 + if($row['it_sc_type'] == 2) { + $sendcost = get_item_sendcost($row['it_id'], $sum['price'], $sum['qty'], $s_cart_id); + + if($sendcost == 0) + $ct_send_cost = '무료'; + } + ?> + + + + + + + + + + + + + '; + alert('장바구니가 비어 있습니다.', G5_SHOP_URL.'/cart.php'); + } else { + // 배송비 계산 + $send_cost = get_sendcost($s_cart_id); + } + + // 복합과세처리 + if($default['de_tax_flag_use']) { + $comm_tax_mny = round(($tot_tax_mny + $send_cost) / 1.1); + $comm_vat_mny = ($tot_tax_mny + $send_cost) - $comm_tax_mny; + } + ?> + +
        상품이미지상품명총수량판매가쿠폰소계포인트배송비
        + + + + + + + + + +
        장바구니에 담긴 상품이 없습니다.
        +
        + + + + + +
        +
        주문
        +
        원
        + 0) { ?> +
        쿠폰할인
        +
        0 원
        + +
        배송비
        +
        원
        +
        총계
        +
        + + 원 +
        +
        포인트
        +
        점
        +
        + + + + + + + + + + + + + +
        +

        주문하시는 분

        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + 영,숫자 3~20자 (주문서 조회시 필요) + +
        주소 + + +
        + +
        + + +
        + +
        + +
        + + 이후로 배송 바랍니다. +
        +
        +
        + + + +
        +

        받으시는 분

        + +
        + + + '.PHP_EOL; + $addr_list .= ''.PHP_EOL; + + // 기본배송지 + $sql = " select * + from {$g5['g5_shop_order_address_table']} + where mb_id = '{$member['mb_id']}' + and ad_default = '1' "; + $row = sql_fetch($sql); + if($row['ad_id']) { + $val1 = $row['ad_name'].$sep.$row['ad_tel'].$sep.$row['ad_hp'].$sep.$row['ad_zip1'].$sep.$row['ad_zip2'].$sep.$row['ad_addr1'].$sep.$row['ad_addr2'].$sep.$row['ad_addr3'].$sep.$row['ad_jibeon'].$sep.$row['ad_subject']; + $addr_list .= ''.PHP_EOL; + $addr_list .= ''.PHP_EOL; + } + + // 최근배송지 + $sql = " select * + from {$g5['g5_shop_order_address_table']} + where mb_id = '{$member['mb_id']}' + and ad_default = '0' + order by ad_id desc + limit 1 "; + $result = sql_query($sql); + for($i=0; $row=sql_fetch_array($result); $i++) { + $val1 = $row['ad_name'].$sep.$row['ad_tel'].$sep.$row['ad_hp'].$sep.$row['ad_zip1'].$sep.$row['ad_zip2'].$sep.$row['ad_addr1'].$sep.$row['ad_addr2'].$sep.$row['ad_addr3'].$sep.$row['ad_jibeon'].$sep.$row['ad_subject']; + $val2 = ''; + $addr_list .= ' '.PHP_EOL.$val2.PHP_EOL; + } + + $addr_list .= ''.PHP_EOL; + $addr_list .= ''.PHP_EOL; + + $addr_list .='배송지목록'; + } else { + // 주문자와 동일 + $addr_list .= ''.PHP_EOL; + $addr_list .= ''.PHP_EOL; + } + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        배송지선택 + +
        + + + +
        주소 + + +
        + +
        + + +
        + +
        + +
        +
        +
        + + + + = '".G5_TIME_YMD."' + and cp_minimum <= '$tot_sell_price' "; + $res = sql_query($sql); + + for($k=0; $cp=sql_fetch_array($res); $k++) { + if(is_used_coupon($member['mb_id'], $cp['cp_id'])) + continue; + + $oc_cnt++; + } + + if($send_cost > 0) { + // 배송비쿠폰 + $sql = " select cp_id + from {$g5['g5_shop_coupon_table']} + where mb_id IN ( '{$member['mb_id']}', '전체회원' ) + and cp_method = '3' + and cp_start <= '".G5_TIME_YMD."' + and cp_end >= '".G5_TIME_YMD."' + and cp_minimum <= '$tot_sell_price' "; + $res = sql_query($sql); + + for($k=0; $cp=sql_fetch_array($res); $k++) { + if(is_used_coupon($member['mb_id'], $cp['cp_id'])) + continue; + + $sc_cnt++; + } + } + } + ?> + +
        +

        결제정보

        + +
        + + + 0) { ?> + + + + + + + + + + 0) { ?> + + + + + + + + + + + + + + + + + + +
        주문할인쿠폰 + + +
        주문할인금액0원
        배송비할인쿠폰 + + +
        배송비할인금액0원
        총 주문금액원
        추가배송비0원 (지역에 따라 추가되는 도선료 등의 배송비입니다.)
        +
        + + 무통장입금 이외의 결제 수단으로 결제하시는 경우 포인트를 적립해드리지 않습니다.

        '; + + $multi_settle == 0; + $checked = ''; + + $escrow_title = ""; + if ($default['de_escrow_use']) { + $escrow_title = "에스크로 "; + } + + if ($default['de_bank_use'] || $default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_use'] || $default['de_easy_pay_use']) { + echo '
        '; + echo '결제방법 선택'; + } + + // 무통장입금 사용 + if ($default['de_bank_use']) { + $multi_settle++; + echo ' '.PHP_EOL; + $checked = ''; + } + + // 가상계좌 사용 + if ($default['de_vbank_use']) { + $multi_settle++; + echo ' '.PHP_EOL; + $checked = ''; + } + + // 계좌이체 사용 + if ($default['de_iche_use']) { + $multi_settle++; + echo ' '.PHP_EOL; + $checked = ''; + } + + // 휴대폰 사용 + if ($default['de_hp_use']) { + $multi_settle++; + echo ' '.PHP_EOL; + $checked = ''; + } + + // 신용카드 사용 + if ($default['de_card_use']) { + $multi_settle++; + echo ' '.PHP_EOL; + $checked = ''; + } + + // PG 간편결제 + if($default['de_easy_pay_use']) { + switch($default['de_pg_service']) { + case 'lg': + $pg_easy_pay_name = 'PAYNOW'; + break; + case 'inicis': + $pg_easy_pay_name = 'KPAY'; + break; + default: + $pg_easy_pay_name = 'PAYCO'; + break; + } + + $multi_settle++; + echo ' '.PHP_EOL; + $checked = ''; + } + + $temp_point = 0; + // 회원이면서 포인트사용이면 + if ($is_member && $config['cf_use_point']) + { + // 포인트 결제 사용 포인트보다 회원의 포인트가 크다면 + if ($member['mb_point'] >= $default['de_settle_min_point']) + { + $temp_point = (int)$default['de_settle_max_point']; + + if($temp_point > (int)$tot_sell_price) + $temp_point = (int)$tot_sell_price; + + if($temp_point > (int)$member['mb_point']) + $temp_point = (int)$member['mb_point']; + + $point_unit = (int)$default['de_settle_point_unit']; + $temp_point = (int)((int)($temp_point / $point_unit) * $point_unit); + ?> +

        보유포인트()중 최대 까지 사용 가능

        + + + 점 (점 단위로 입력하세요.) + '.$str[0].PHP_EOL; + } + else + { + $bank_account = ''.PHP_EOL; + } + echo ''; + } + + if ($default['de_bank_use'] || $default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_use']) { + echo '
        '; + } + + if ($multi_settle == 0) + echo '

        결제할 방법이 없습니다.
        운영자에게 알려주시면 감사하겠습니다.

        '; + ?> +
        + + + + + + + +
        + + + + \ No newline at end of file diff --git a/shop/orderformupdate.php b/shop/orderformupdate.php new file mode 100644 index 000000000..9bacbb352 --- /dev/null +++ b/shop/orderformupdate.php @@ -0,0 +1,816 @@ + $it_stock_qty) + $error .= "{$row['ct_option']} 의 재고수량이 부족합니다. 현재고수량 : $it_stock_qty 개\\n\\n"; +} + +if($i == 0) + alert('장바구니가 비어 있습니다.\\n\\n이미 주문하셨거나 장바구니에 담긴 상품이 없는 경우입니다.', G5_SHOP_URL.'/cart.php'); + +if ($error != "") +{ + $error .= "다른 고객님께서 {$od_name}님 보다 먼저 주문하신 경우입니다. 불편을 끼쳐 죄송합니다."; + alert($error); +} + +$i_price = (int)$_POST['od_price']; +$i_send_cost = (int)$_POST['od_send_cost']; +$i_send_cost2 = (int)$_POST['od_send_cost2']; +$i_send_coupon = (int)$_POST['od_send_coupon']; +$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_price, + COUNT(distinct it_id) as cart_count + from {$g5['g5_shop_cart_table']} where od_id = '$tmp_cart_id' and ct_select = '1' "; +$row = sql_fetch($sql); +$tot_ct_price = $row['od_price']; +$cart_count = $row['cart_count']; +$tot_od_price = $tot_ct_price; + +// 쿠폰금액계산 +$tot_cp_price = 0; +if($is_member) { + // 상품쿠폰 + $tot_it_cp_price = $tot_od_cp_price = 0; + $it_cp_cnt = count($_POST['cp_id']); + $arr_it_cp_prc = array(); + for($i=0; $i<$it_cp_cnt; $i++) { + $cid = $_POST['cp_id'][$i]; + $it_id = $_POST['it_id'][$i]; + $sql = " select cp_id, cp_method, cp_target, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum + from {$g5['g5_shop_coupon_table']} + where cp_id = '$cid' + and mb_id IN ( '{$member['mb_id']}', '전체회원' ) + and cp_start <= '".G5_TIME_YMD."' + and cp_end >= '".G5_TIME_YMD."' + and cp_method IN ( 0, 1 ) "; + $cp = sql_fetch($sql); + if(!$cp['cp_id']) + continue; + + // 사용한 쿠폰인지 + if(is_used_coupon($member['mb_id'], $cp['cp_id'])) + continue; + + // 분류할인인지 + if($cp['cp_method']) { + $sql2 = " select it_id, ca_id, ca_id2, ca_id3 + from {$g5['g5_shop_item_table']} + where it_id = '$it_id' "; + $row2 = sql_fetch($sql2); + + if(!$row2['it_id']) + continue; + + if($row2['ca_id'] != $cp['cp_target'] && $row2['ca_id2'] != $cp['cp_target'] && $row2['ca_id3'] != $cp['cp_target']) + continue; + } else { + if($cp['cp_target'] != $it_id) + continue; + } + + // 상품금액 + $sql = " select SUM( IF(io_type = '1', io_price * ct_qty, (ct_price + io_price) * ct_qty)) as sum_price + from {$g5['g5_shop_cart_table']} + where od_id = '$tmp_cart_id' + and it_id = '$it_id' + and ct_select = '1' "; + $ct = sql_fetch($sql); + $item_price = $ct['sum_price']; + + if($cp['cp_minimum'] > $item_price) + continue; + + $dc = 0; + if($cp['cp_type']) { + $dc = floor(($item_price * ($cp['cp_price'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc']; + } else { + $dc = $cp['cp_price']; + } + + if($cp['cp_maximum'] && $dc > $cp['cp_maximum']) + $dc = $cp['cp_maximum']; + + if($item_price < $dc) + continue; + + $tot_it_cp_price += $dc; + $arr_it_cp_prc[$it_id] = $dc; + } + + $tot_od_price -= $tot_it_cp_price; + + // 주문쿠폰 + if($_POST['od_cp_id']) { + $sql = " select cp_id, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum + from {$g5['g5_shop_coupon_table']} + where cp_id = '{$_POST['od_cp_id']}' + and mb_id IN ( '{$member['mb_id']}', '전체회원' ) + and cp_start <= '".G5_TIME_YMD."' + and cp_end >= '".G5_TIME_YMD."' + and cp_method = '2' "; + $cp = sql_fetch($sql); + + // 사용한 쿠폰인지 + $cp_used = is_used_coupon($member['mb_id'], $cp['cp_id']); + + $dc = 0; + if(!$cp_used && $cp['cp_id'] && ($cp['cp_minimum'] <= $tot_od_price)) { + if($cp['cp_type']) { + $dc = floor(($tot_od_price * ($cp['cp_price'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc']; + } else { + $dc = $cp['cp_price']; + } + + if($cp['cp_maximum'] && $dc > $cp['cp_maximum']) + $dc = $cp['cp_maximum']; + + if($tot_od_price < $dc) + die('Order coupon error.'); + + $tot_od_cp_price = $dc; + $tot_od_price -= $tot_od_cp_price; + } + } + + $tot_cp_price = $tot_it_cp_price + $tot_od_cp_price; +} + +if ((int)($row['od_price'] - $tot_cp_price) !== $i_price) { + die("Error."); +} + +// 배송비가 상이함 +$send_cost = get_sendcost($tmp_cart_id); + +$tot_sc_cp_price = 0; +if($is_member && $send_cost > 0) { + // 배송쿠폰 + if($_POST['sc_cp_id']) { + $sql = " select cp_id, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum + from {$g5['g5_shop_coupon_table']} + where cp_id = '{$_POST['sc_cp_id']}' + and mb_id IN ( '{$member['mb_id']}', '전체회원' ) + and cp_start <= '".G5_TIME_YMD."' + and cp_end >= '".G5_TIME_YMD."' + and cp_method = '3' "; + $cp = sql_fetch($sql); + + // 사용한 쿠폰인지 + $cp_used = is_used_coupon($member['mb_id'], $cp['cp_id']); + + $dc = 0; + if(!$cp_used && $cp['cp_id'] && ($cp['cp_minimum'] <= $tot_od_price)) { + if($cp['cp_type']) { + $dc = floor(($send_cost * ($cp['cp_price'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc']; + } else { + $dc = $cp['cp_price']; + } + + if($cp['cp_maximum'] && $dc > $cp['cp_maximum']) + $dc = $cp['cp_maximum']; + + if($dc > $send_cost) + $dc = $send_cost; + + $tot_sc_cp_price = $dc; + } + } +} + +if ((int)($send_cost - $tot_sc_cp_price) !== (int)($i_send_cost - $i_send_coupon)) { + die("Error.."); +} + +// 추가배송비가 상이함 +$od_b_zip = preg_replace('/[^0-9]/', '', $od_b_zip); +$od_b_zip1 = substr($od_b_zip, 0, 3); +$od_b_zip2 = substr($od_b_zip, 3); +$zipcode = $od_b_zip; +$sql = " select sc_id, sc_price from {$g5['g5_shop_sendcost_table']} where sc_zip1 <= '$zipcode' and sc_zip2 >= '$zipcode' "; +$tmp = sql_fetch($sql); +if(!$tmp['sc_id']) + $send_cost2 = 0; +else + $send_cost2 = (int)$tmp['sc_price']; +if($send_cost2 !== $i_send_cost2) + die("Error..."); + +// 결제포인트가 상이함 +// 회원이면서 포인트사용이면 +$temp_point = 0; +if ($is_member && $config['cf_use_point']) +{ + if($member['mb_point'] >= $default['de_settle_min_point']) { + $temp_point = (int)$default['de_settle_max_point']; + + if($temp_point > (int)$tot_od_price) + $temp_point = (int)$tot_od_price; + + if($temp_point > (int)$member['mb_point']) + $temp_point = (int)$member['mb_point']; + + $point_unit = (int)$default['de_settle_point_unit']; + $temp_point = (int)((int)($temp_point / $point_unit) * $point_unit); + } +} + +if (($i_temp_point > (int)$temp_point || $i_temp_point < 0) && $config['cf_use_point']) + die("Error...."); + +if ($od_temp_point) +{ + if ($member['mb_point'] < $od_temp_point) + alert('회원님의 포인트가 부족하여 포인트로 결제 할 수 없습니다.'); +} + +$i_price = $i_price + $i_send_cost + $i_send_cost2 - $i_temp_point - $i_send_coupon; +$order_price = $tot_od_price + $send_cost + $send_cost2 - $tot_sc_cp_price - $od_temp_point; + +$od_status = '주문'; +if ($od_settle_case == "무통장") +{ + $od_receipt_point = $i_temp_point; + $od_receipt_price = 0; + $od_misu = $i_price - $od_receipt_price; + if($od_misu == 0) { + $od_status = '입금'; + $od_receipt_time = G5_TIME_YMDHIS; + } +} +else if ($od_settle_case == "계좌이체") +{ + switch($default['de_pg_service']) { + case 'lg': + include G5_SHOP_PATH.'/lg/xpay_result.php'; + break; + case 'inicis': + include G5_SHOP_PATH.'/inicis/inipay_result.php'; + break; + default: + include G5_SHOP_PATH.'/kcp/pp_ax_hub.php'; + $bank_name = iconv("cp949", "utf-8", $bank_name); + break; + } + + $od_tno = $tno; + $od_receipt_price = $amount; + $od_receipt_point = $i_temp_point; + $od_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time); + $od_bank_account = $od_settle_case; + $od_deposit_name = $od_name; + $od_bank_account = $bank_name; + $pg_price = $amount; + $od_misu = $i_price - $od_receipt_price; + if($od_misu == 0) + $od_status = '입금'; +} +else if ($od_settle_case == "가상계좌") +{ + switch($default['de_pg_service']) { + case 'lg': + include G5_SHOP_PATH.'/lg/xpay_result.php'; + break; + case 'inicis': + include G5_SHOP_PATH.'/inicis/inipay_result.php'; + $od_app_no = $app_no; + break; + default: + include G5_SHOP_PATH.'/kcp/pp_ax_hub.php'; + $bankname = iconv("cp949", "utf-8", $bankname); + $depositor = iconv("cp949", "utf-8", $depositor); + break; + } + + $od_receipt_point = $i_temp_point; + $od_tno = $tno; + $od_receipt_price = 0; + $od_bank_account = $bankname.' '.$account; + $od_deposit_name = $depositor; + $pg_price = $amount; + $od_misu = $i_price - $od_receipt_price; +} +else if ($od_settle_case == "휴대폰") +{ + switch($default['de_pg_service']) { + case 'lg': + include G5_SHOP_PATH.'/lg/xpay_result.php'; + break; + case 'inicis': + include G5_SHOP_PATH.'/inicis/inipay_result.php'; + break; + default: + include G5_SHOP_PATH.'/kcp/pp_ax_hub.php'; + break; + } + + $od_tno = $tno; + $od_receipt_price = $amount; + $od_receipt_point = $i_temp_point; + $od_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time); + $od_bank_account = $commid . ($commid ? ' ' : '').$mobile_no; + $pg_price = $amount; + $od_misu = $i_price - $od_receipt_price; + if($od_misu == 0) + $od_status = '입금'; +} +else if ($od_settle_case == "신용카드") +{ + switch($default['de_pg_service']) { + case 'lg': + include G5_SHOP_PATH.'/lg/xpay_result.php'; + break; + case 'inicis': + include G5_SHOP_PATH.'/inicis/inipay_result.php'; + break; + default: + include G5_SHOP_PATH.'/kcp/pp_ax_hub.php'; + $card_name = iconv("cp949", "utf-8", $card_name); + break; + } + + $od_tno = $tno; + $od_app_no = $app_no; + $od_receipt_price = $amount; + $od_receipt_point = $i_temp_point; + $od_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time); + $od_bank_account = $card_name; + $pg_price = $amount; + $od_misu = $i_price - $od_receipt_price; + if($od_misu == 0) + $od_status = '입금'; +} +else if ($od_settle_case == "간편결제") +{ + switch($default['de_pg_service']) { + case 'lg': + include G5_SHOP_PATH.'/lg/xpay_result.php'; + break; + case 'inicis': + include G5_SHOP_PATH.'/inicis/inipay_result.php'; + break; + default: + include G5_SHOP_PATH.'/kcp/pp_ax_hub.php'; + $card_name = iconv("cp949", "utf-8", $card_name); + break; + } + + $od_tno = $tno; + $od_app_no = $app_no; + $od_receipt_price = $amount; + $od_receipt_point = $i_temp_point; + $od_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time); + $od_bank_account = $card_name; + $pg_price = $amount; + $od_misu = $i_price - $od_receipt_price; + if($od_misu == 0) + $od_status = '입금'; +} +else +{ + die("od_settle_case Error!!!"); +} + +// 주문금액과 결제금액이 일치하는지 체크 +if($tno) { + if((int)$order_price !== (int)$pg_price) { + $cancel_msg = '결제금액 불일치'; + switch($default['de_pg_service']) { + case 'lg': + include G5_SHOP_PATH.'/lg/xpay_cancel.php'; + break; + case 'inicis': + include G5_SHOP_PATH.'/inicis/inipay_cancel.php'; + break; + default: + include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; + break; + } + + die("Receipt Amount Error"); + } +} + +if ($is_member) + $od_pwd = $member['mb_password']; +else + $od_pwd = get_encrypt_string($_POST['od_pwd']); + +// 주문번호를 얻는다. +$od_id = get_session('ss_order_id'); + +$od_escrow = 0; +if($escw_yn == 'Y') + $od_escrow = 1; + +// 복합과세 금액 +$od_tax_mny = round($i_price / 1.1); +$od_vat_mny = $i_price - $od_tax_mny; +$od_free_mny = 0; +if($default['de_tax_flag_use']) { + $od_tax_mny = (int)$_POST['comm_tax_mny']; + $od_vat_mny = (int)$_POST['comm_vat_mny']; + $od_free_mny = (int)$_POST['comm_free_mny']; +} + +$od_pg = $default['de_pg_service']; +$od_email = get_email_address($od_email); +$od_name = clean_xss_tags($od_name); +$od_tel = clean_xss_tags($od_tel); +$od_hp = clean_xss_tags($od_hp); +$od_zip = preg_replace('/[^0-9]/', '', $od_zip); +$od_zip1 = substr($od_zip, 0, 3); +$od_zip2 = substr($od_zip, 3); +$od_addr1 = clean_xss_tags($od_addr1); +$od_addr2 = clean_xss_tags($od_addr2); +$od_addr3 = clean_xss_tags($od_addr3); +$od_addr_jibeon = preg_match("/^(N|R)$/", $od_addr_jibeon) ? $od_addr_jibeon : ''; +$od_b_name = clean_xss_tags($od_b_name); +$od_b_tel = clean_xss_tags($od_b_tel); +$od_b_hp = clean_xss_tags($od_b_hp); +$od_b_addr1 = clean_xss_tags($od_b_addr1); +$od_b_addr2 = clean_xss_tags($od_b_addr2); +$od_b_addr3 = clean_xss_tags($od_b_addr3); +$od_b_addr_jibeon = preg_match("/^(N|R)$/", $od_b_addr_jibeon) ? $od_b_addr_jibeon : ''; +$od_memo = clean_xss_tags($od_memo); +$od_deposit_name = clean_xss_tags($od_deposit_name); + +// 주문서에 입력 +$sql = " insert {$g5['g5_shop_order_table']} + set od_id = '$od_id', + mb_id = '{$member['mb_id']}', + od_pwd = '$od_pwd', + od_name = '$od_name', + od_email = '$od_email', + od_tel = '$od_tel', + od_hp = '$od_hp', + od_zip1 = '$od_zip1', + od_zip2 = '$od_zip2', + od_addr1 = '$od_addr1', + od_addr2 = '$od_addr2', + od_addr3 = '$od_addr3', + od_addr_jibeon = '$od_addr_jibeon', + od_b_name = '$od_b_name', + od_b_tel = '$od_b_tel', + od_b_hp = '$od_b_hp', + od_b_zip1 = '$od_b_zip1', + od_b_zip2 = '$od_b_zip2', + od_b_addr1 = '$od_b_addr1', + od_b_addr2 = '$od_b_addr2', + od_b_addr3 = '$od_b_addr3', + od_b_addr_jibeon = '$od_b_addr_jibeon', + od_deposit_name = '$od_deposit_name', + od_memo = '$od_memo', + od_cart_count = '$cart_count', + od_cart_price = '$tot_ct_price', + od_cart_coupon = '$tot_it_cp_price', + od_send_cost = '$od_send_cost', + od_send_coupon = '$tot_sc_cp_price', + od_send_cost2 = '$od_send_cost2', + od_coupon = '$tot_od_cp_price', + od_receipt_price = '$od_receipt_price', + od_receipt_point = '$od_receipt_point', + od_bank_account = '$od_bank_account', + od_receipt_time = '$od_receipt_time', + od_misu = '$od_misu', + od_pg = '$od_pg', + od_tno = '$od_tno', + od_app_no = '$od_app_no', + od_escrow = '$od_escrow', + od_tax_flag = '{$default['de_tax_flag_use']}', + od_tax_mny = '$od_tax_mny', + od_vat_mny = '$od_vat_mny', + od_free_mny = '$od_free_mny', + od_status = '$od_status', + od_shop_memo = '', + od_hope_date = '$od_hope_date', + od_time = '".G5_TIME_YMDHIS."', + od_ip = '$REMOTE_ADDR', + od_settle_case = '$od_settle_case' + "; +$result = sql_query($sql, false); + +// 주문정보 입력 오류시 결제 취소 +if(!$result) { + if($tno) { + $cancel_msg = '주문정보 입력 오류'; + switch($default['de_pg_service']) { + case 'lg': + include G5_SHOP_PATH.'/lg/xpay_cancel.php'; + break; + case 'inicis': + include G5_SHOP_PATH.'/inicis/inipay_cancel.php'; + break; + default: + include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; + break; + } + } + + // 관리자에게 오류 알림 메일발송 + $error = 'order'; + include G5_SHOP_PATH.'/ordererrormail.php'; + + die('

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

        '.strtoupper($default['de_pg_service']).'를 이용한 전자결제(신용카드, 계좌이체, 가상계좌 등)은 자동 취소되었습니다.'); +} + +// 장바구니 상태변경 +// 신용카드로 주문하면서 신용카드 포인트 사용하지 않는다면 포인트 부여하지 않음 +$cart_status = $od_status; +$sql_card_point = ""; +if ($od_receipt_price > 0 && !$default['de_card_point']) { + $sql_card_point = " , ct_point = '0' "; +} +$sql = "update {$g5['g5_shop_cart_table']} + set od_id = '$od_id', + ct_status = '$cart_status' + $sql_card_point + where od_id = '$tmp_cart_id' + and ct_select = '1' "; +$result = sql_query($sql, false); + +// 주문정보 입력 오류시 결제 취소 +if(!$result) { + if($tno) { + $cancel_msg = '주문상태 변경 오류'; + switch($default['de_pg_service']) { + case 'lg': + include G5_SHOP_PATH.'/lg/xpay_cancel.php'; + break; + case 'inicis': + include G5_SHOP_PATH.'/inicis/inipay_cancel.php'; + break; + default: + include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; + break; + } + } + + // 관리자에게 오류 알림 메일발송 + $error = 'status'; + include G5_SHOP_PATH.'/ordererrormail.php'; + + // 주문삭제 + sql_query(" delete from {$g5['g5_shop_order_table']} where od_id = '$od_id' "); + + die('

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

        '.strtoupper($default['de_pg_service']).'를 이용한 전자결제(신용카드, 계좌이체, 가상계좌 등)은 자동 취소되었습니다.'); +} + +// 회원이면서 포인트를 사용했다면 테이블에 사용을 추가 +if ($is_member && $od_receipt_point) + insert_point($member['mb_id'], (-1) * $od_receipt_point, "주문번호 $od_id 결제"); + +$od_memo = nl2br(htmlspecialchars2(stripslashes($od_memo))) . " "; + + +// 쿠폰사용내역기록 +if($is_member) { + $it_cp_cnt = count($_POST['cp_id']); + for($i=0; $i<$it_cp_cnt; $i++) { + $cid = $_POST['cp_id'][$i]; + $cp_it_id = $_POST['it_id'][$i]; + $cp_prc = (int)$arr_it_cp_prc[$cp_it_id]; + + if(trim($cid)) { + $sql = " insert into {$g5['g5_shop_coupon_log_table']} + set cp_id = '$cid', + mb_id = '{$member['mb_id']}', + od_id = '$od_id', + cp_price = '$cp_prc', + cl_datetime = '".G5_TIME_YMDHIS."' "; + sql_query($sql); + } + + // 쿠폰사용금액 cart에 기록 + $cp_prc = (int)$arr_it_cp_prc[$cp_it_id]; + $sql = " update {$g5['g5_shop_cart_table']} + set cp_price = '$cp_prc' + where od_id = '$od_id' + and it_id = '$cp_it_id' + and ct_select = '1' + order by ct_id asc + limit 1 "; + sql_query($sql); + } + + if($_POST['od_cp_id']) { + $sql = " insert into {$g5['g5_shop_coupon_log_table']} + set cp_id = '{$_POST['od_cp_id']}', + mb_id = '{$member['mb_id']}', + od_id = '$od_id', + cp_price = '$tot_od_cp_price', + cl_datetime = '".G5_TIME_YMDHIS."' "; + sql_query($sql); + } + + if($_POST['sc_cp_id']) { + $sql = " insert into {$g5['g5_shop_coupon_log_table']} + set cp_id = '{$_POST['sc_cp_id']}', + mb_id = '{$member['mb_id']}', + od_id = '$od_id', + cp_price = '$tot_sc_cp_price', + cl_datetime = '".G5_TIME_YMDHIS."' "; + sql_query($sql); + } +} + + +include_once(G5_SHOP_PATH.'/ordermail1.inc.php'); +include_once(G5_SHOP_PATH.'/ordermail2.inc.php'); + +// SMS BEGIN -------------------------------------------------------- +// 주문고객과 쇼핑몰관리자에게 SMS 전송 +if($config['cf_sms_use'] && ($default['de_sms_use2'] || $default['de_sms_use3'])) { + $is_sms_send = false; + + // 충전식일 경우 잔액이 있는지 체크 + if($config['cf_icode_id'] && $config['cf_icode_pw']) { + $userinfo = get_icode_userinfo($config['cf_icode_id'], $config['cf_icode_pw']); + + if($userinfo['code'] == 0) { + if($userinfo['payment'] == 'C') { // 정액제 + $is_sms_send = true; + } else { + $minimum_coin = 100; + if(defined('G5_ICODE_COIN')) + $minimum_coin = intval(G5_ICODE_COIN); + + if((int)$userinfo['coin'] >= $minimum_coin) + $is_sms_send = true; + } + } + } + + if($is_sms_send) { + $sms_contents = array($default['de_sms_cont2'], $default['de_sms_cont3']); + $recv_numbers = array($od_hp, $default['de_sms_hp']); + $send_numbers = array($default['de_admin_company_tel'], $od_hp); + + include_once(G5_LIB_PATH.'/icode.sms.lib.php'); + + $SMS = new SMS; // SMS 연결 + $SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']); + $sms_count = 0; + + for($s=0; $sAdd($recv_number, $send_number, $config['cf_icode_id'], iconv("utf-8", "euc-kr", stripslashes($sms_content)), ""); + $sms_count++; + } + } + + // 무통장 입금 때 고객에게 계좌정보 보냄 + if($od_settle_case == '무통장' && $default['de_sms_use2'] && $od_misu > 0) { + $sms_content = $od_name."님의 입금계좌입니다.\n금액:".number_format($od_misu)."원\n계좌:".$od_bank_account."\n".$default['de_admin_company_name']; + + $recv_number = preg_replace("/[^0-9]/", "", $od_hp); + $send_number = preg_replace("/[^0-9]/", "", $default['de_admin_company_tel']); + $SMS->Add($recv_number, $send_number, $config['cf_icode_id'], iconv("utf-8", "euc-kr", $sms_content), ""); + $sms_count++; + } + + if($sms_count > 0) + $SMS->Send(); + } +} +// SMS END -------------------------------------------------------- + + +// orderview 에서 사용하기 위해 session에 넣고 +$uid = md5($od_id.G5_TIME_YMDHIS.$REMOTE_ADDR); +set_session('ss_orderview_uid', $uid); + +// 주문번호제거 +set_session('ss_order_id', ''); + +// 기존자료 세션에서 제거 +if (get_session('ss_direct')) + set_session('ss_cart_direct', ''); + +// 배송지처리 +if($is_member) { + $sql = " select * from {$g5['g5_shop_order_address_table']} + where mb_id = '{$member['mb_id']}' + and ad_name = '$od_b_name' + and ad_tel = '$od_b_tel' + and ad_hp = '$od_b_hp' + and ad_zip1 = '$od_b_zip1' + and ad_zip2 = '$od_b_zip2' + and ad_addr1 = '$od_b_addr1' + and ad_addr2 = '$od_b_addr2' + and ad_addr3 = '$od_b_addr3' "; + $row = sql_fetch($sql); + + // 기본배송지 체크 + if($ad_default) { + $sql = " update {$g5['g5_shop_order_address_table']} + set ad_default = '0' + where mb_id = '{$member['mb_id']}' "; + sql_query($sql); + } + + if($row['ad_id']){ + $sql = " update {$g5['g5_shop_order_address_table']} + set ad_default = '$ad_default', + ad_subject = '$ad_subject', + ad_jibeon = '$od_b_addr_jibeon' + where mb_id = '{$member['mb_id']}' + and ad_id = '{$row['ad_id']}' "; + } else { + $sql = " insert into {$g5['g5_shop_order_address_table']} + set mb_id = '{$member['mb_id']}', + ad_subject = '$ad_subject', + ad_default = '$ad_default', + ad_name = '$od_b_name', + ad_tel = '$od_b_tel', + ad_hp = '$od_b_hp', + ad_zip1 = '$od_b_zip1', + ad_zip2 = '$od_b_zip2', + ad_addr1 = '$od_b_addr1', + ad_addr2 = '$od_b_addr2', + ad_addr3 = '$od_b_addr3', + ad_jibeon = '$od_b_addr_jibeon' "; + } + + sql_query($sql); +} + +goto_url(G5_SHOP_URL.'/orderinquiryview.php?od_id='.$od_id.'&uid='.$uid); +?> + + + + 주문정보 기록 + + + \ No newline at end of file diff --git a/shop/orderinquiry.php b/shop/orderinquiry.php new file mode 100644 index 000000000..7fa770d3c --- /dev/null +++ b/shop/orderinquiry.php @@ -0,0 +1,79 @@ + + + +

        +

        주문서번호 링크를 누르시면 주문상세내역을 조회하실 수 있습니다.

        + + + + +
        + + + diff --git a/shop/orderinquiry.sub.php b/shop/orderinquiry.sub.php new file mode 100644 index 000000000..ad3227a44 --- /dev/null +++ b/shop/orderinquiry.sub.php @@ -0,0 +1,79 @@ + + + +총 건 + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + '; + ?> + +
        주문서번호주문일시상품수주문금액입금액미입금액상태
        + + + ()
        주문 내역이 없습니다.
        +
        + \ No newline at end of file diff --git a/shop/orderinquirycancel.php b/shop/orderinquirycancel.php new file mode 100644 index 000000000..9342ccb38 --- /dev/null +++ b/shop/orderinquirycancel.php @@ -0,0 +1,159 @@ + 0 || $ct['od_count1'] != $ct['od_count2']) { + alert("취소할 수 있는 주문이 아닙니다.", G5_SHOP_URL."/orderinquiryview.php?od_id=$od_id&uid=$uid"); +} + +// PG 결제 취소 +if($od['od_tno']) { + switch($od['od_pg']) { + case 'lg': + require_once('./settle_lg.inc.php'); + $LGD_TID = $od['od_tno']; //LG유플러스으로 부터 내려받은 거래번호(LGD_TID) + + $xpay = new XPay($configPath, $CST_PLATFORM); + + // Mert Key 설정 + $xpay->set_config_value('t'.$LGD_MID, $config['cf_lg_mert_key']); + $xpay->set_config_value($LGD_MID, $config['cf_lg_mert_key']); + $xpay->Init_TX($LGD_MID); + + $xpay->Set("LGD_TXNAME", "Cancel"); + $xpay->Set("LGD_TID", $LGD_TID); + + if ($xpay->TX()) { + //1)결제취소결과 화면처리(성공,실패 결과 처리를 하시기 바랍니다.) + /* + echo "결제 취소요청이 완료되었습니다.
        "; + echo "TX Response_code = " . $xpay->Response_Code() . "
        "; + echo "TX Response_msg = " . $xpay->Response_Msg() . "

        "; + */ + } else { + //2)API 요청 실패 화면처리 + $msg = "결제 취소요청이 실패하였습니다.\\n"; + $msg .= "TX Response_code = " . $xpay->Response_Code() . "\\n"; + $msg .= "TX Response_msg = " . $xpay->Response_Msg(); + + alert($msg); + } + break; + case 'inicis': + include_once(G5_SHOP_PATH.'/settle_inicis.inc.php'); + $cancel_msg = iconv_euckr('주문자 본인 취소-'.$cancel_memo); + + /********************* + * 3. 취소 정보 설정 * + *********************/ + $inipay->SetField("type", "cancel"); // 고정 (절대 수정 불가) + $inipay->SetField("mid", $default['de_inicis_mid']); // 상점아이디 + /************************************************************************************************** + * admin 은 키패스워드 변수명입니다. 수정하시면 안됩니다. 1111의 부분만 수정해서 사용하시기 바랍니다. + * 키패스워드는 상점관리자 페이지(https://iniweb.inicis.com)의 비밀번호가 아닙니다. 주의해 주시기 바랍니다. + * 키패스워드는 숫자 4자리로만 구성됩니다. 이 값은 키파일 발급시 결정됩니다. + * 키패스워드 값을 확인하시려면 상점측에 발급된 키파일 안의 readme.txt 파일을 참조해 주십시오. + **************************************************************************************************/ + $inipay->SetField("admin", $default['de_inicis_admin_key']); //비대칭 사용키 키패스워드 + $inipay->SetField("tid", $od['od_tno']); // 취소할 거래의 거래아이디 + $inipay->SetField("cancelmsg", $cancel_msg); // 취소사유 + + /**************** + * 4. 취소 요청 * + ****************/ + $inipay->startAction(); + + /**************************************************************** + * 5. 취소 결과 * + * * + * 결과코드 : $inipay->getResult('ResultCode') ("00"이면 취소 성공) * + * 결과내용 : $inipay->getResult('ResultMsg') (취소결과에 대한 설명) * + * 취소날짜 : $inipay->getResult('CancelDate') (YYYYMMDD) * + * 취소시각 : $inipay->getResult('CancelTime') (HHMMSS) * + * 현금영수증 취소 승인번호 : $inipay->getResult('CSHR_CancelNum') * + * (현금영수증 발급 취소시에만 리턴됨) * + ****************************************************************/ + + $res_cd = $inipay->getResult('ResultCode'); + $res_msg = $inipay->getResult('ResultMsg'); + + if($res_cd != '00') { + alert(iconv_utf8($res_msg).' 코드 : '.$res_cd); + } + break; + default: + require_once('./settle_kcp.inc.php'); + + $_POST['tno'] = $od['od_tno']; + $_POST['req_tx'] = 'mod'; + $_POST['mod_type'] = 'STSC'; + if($od['od_escrow']) { + $_POST['req_tx'] = 'mod_escrow'; + $_POST['mod_type'] = 'STE2'; + if($od['od_settle_case'] == '가상계좌') + $_POST['mod_type'] = 'STE5'; + } + $_POST['mod_desc'] = iconv("utf-8", "euc-kr", '주문자 본인 취소-'.$cancel_memo); + $_POST['site_cd'] = $default['de_kcp_mid']; + + // 취소내역 한글깨짐방지 + setlocale(LC_CTYPE, 'ko_KR.euc-kr'); + + include G5_SHOP_PATH.'/kcp/pp_ax_hub.php'; + + // locale 설정 초기화 + setlocale(LC_CTYPE, ''); + } +} + +// 장바구니 자료 취소 +sql_query(" update {$g5['g5_shop_cart_table']} set ct_status = '취소' where od_id = '$od_id' "); + +// 주문 취소 +$cancel_memo = addslashes(strip_tags($cancel_memo)); +$cancel_price = $od['od_cart_price']; + +$sql = " update {$g5['g5_shop_order_table']} + set od_send_cost = '0', + od_send_cost2 = '0', + od_receipt_price = '0', + od_receipt_point = '0', + od_misu = '0', + od_cancel_price = '$cancel_price', + od_cart_coupon = '0', + od_coupon = '0', + od_send_coupon = '0', + od_status = '취소', + od_shop_memo = concat(od_shop_memo,\"\\n주문자 본인 직접 취소 - ".G5_TIME_YMDHIS." (취소이유 : {$cancel_memo})\") + where od_id = '$od_id' "; +sql_query($sql); + +// 주문취소 회원의 포인트를 되돌려 줌 +if ($od['od_receipt_point'] > 0) + insert_point($member['mb_id'], $od['od_receipt_point'], "주문번호 $od_id 본인 취소"); + +goto_url(G5_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 new file mode 100644 index 000000000..0bbd8e1fd --- /dev/null +++ b/shop/orderinquiryview.php @@ -0,0 +1,745 @@ +'.PHP_EOL; + } else { + echo ''.PHP_EOL; + } +} +?> + + +

        + +
        주문번호
        + +
        +

        주문하신 상품

        + + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 && $st_count1 == $st_count2) + $custom_cancel = true; + ?> + +
        이미지상품명
        옵션명수량판매가소계포인트배송비상태
        +
        + +
        + 상품 상태 설명 + +
        +
        +
        주문
        +
        주문이 접수되었습니다.
        +
        입금
        +
        입금(결제)이 완료 되었습니다.
        +
        준비
        +
        상품 준비 중입니다.
        +
        배송
        +
        상품 배송 중입니다.
        +
        완료
        +
        상품 배송이 완료 되었습니다.
        +
        + +
        +
        + + + +
        +
        주문총액
        +
        원
        + + 0) { ?> +
        개별상품 쿠폰할인
        +
        원
        + + + 0) { ?> +
        주문금액 쿠폰할인
        +
        원
        + + + 0) { ?> +
        배송비
        +
        원
        + + + 0) { ?> +
        배송비 쿠폰할인
        +
        원
        + + + 0) { ?> +
        추가배송비
        +
        원
        + + + 0) { ?> +
        취소금액
        +
        원
        + + +
        총계
        +
        원
        + +
        포인트
        +
        점
        +
        +
        + +
        +

        결제/배송 정보

        + $od['od_cancel_price'])) { + $wanbul = " (완불)"; + $misu = false; // 미수금 없음 + } + else + { + $wanbul = display_price($receipt_price); + } + + // 결제정보처리 + if($od['od_receipt_price'] > 0) + $od_receipt_price = display_price($od['od_receipt_price']); + else + $od_receipt_price = '아직 입금되지 않았거나 입금정보를 입력하지 못하였습니다.'; + + $app_no_subj = ''; + $disp_bank = true; + $disp_receipt = false; + if($od['od_settle_case'] == '신용카드') { + $app_no_subj = '승인번호'; + $app_no = $od['od_app_no']; + $disp_bank = false; + $disp_receipt = true; + } else if($od['od_settle_case'] == '간편결제') { + $app_no_subj = '승인번호'; + $app_no = $od['od_app_no']; + $disp_bank = false; + switch($od['od_pg']) { + case 'lg': + $easy_pay_name = 'PAYNOW'; + break; + case 'inicis': + $easy_pay_name = 'KPAY'; + break; + case 'kcp': + $easy_pay_name = 'PAYCO'; + break; + default: + break; + } + } else if($od['od_settle_case'] == '휴대폰') { + $app_no_subj = '휴대폰번호'; + $app_no = $od['od_bank_account']; + $disp_bank = false; + $disp_receipt = true; + } else if($od['od_settle_case'] == '가상계좌' || $od['od_settle_case'] == '계좌이체') { + $app_no_subj = '거래번호'; + $app_no = $od['od_tno']; + } + ?> + +
        +

        결제정보

        + +
        + + + + + + + + + + + + + + + + + + + + + + + 0) + { + ?> + + + + + + + + + + + + + + + + + + + + + + + + 0) + { + ?> + + + + + + 0) + { + ?> + + + + + + + + + + + +
        주문번호
        주문일시
        결제방식
        결제금액
        결제일시
        입금자명
        입금계좌
        영수증 + + 영수증 출력 + + 영수증 출력 + + +
        포인트사용
        환불 금액
        현금영수증 + + 현금영수증 확인하기 + + 현금영수증을 발급하시려면 클릭하십시오. + +
        +
        +
        + +
        +

        주문하신 분

        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        이 름
        전화번호
        핸드폰
        주 소
        E-mail
        +
        +
        + +
        +

        받으시는 분

        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        이 름
        전화번호
        핸드폰
        주 소
        희망배송일
        전하실 말씀
        +
        +
        + +
        +

        배송정보

        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + +
        배송회사
        운송장번호
        배송일시
        아직 배송하지 않았거나 배송정보를 입력하지 못하였습니다.
        +
        +
        +
        + +
        +

        결제합계

        + +
          +
        • + 총 구매액 + +
        • + 0) { + echo '
        • '; + echo '미결제액'.PHP_EOL; + echo ''.display_price($misu_price).''; + echo '
        • '; + } + ?> +
        • + 결제액 + +
        • +
        +
        + +
        +

        주문취소

        + + + +
        +
        + + + + + + + +
        +
        + +

        주문 취소, 반품, 품절된 내역이 있습니다.

        + +
        + + 0 && $default['de_card_test'] && $is_admin && $od['od_pg'] == 'kcp') { + preg_match("/\s{1}([^\s]+)\s?/", $od['od_bank_account'], $matchs); + $deposit_no = trim($matchs[1]); + ?> +

        관리자가 가상계좌 테스트를 한 경우에만 보입니다.

        +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + +
        모의입금처리
        +
        + +
        +
        +
        + + +
        + + + + + \ No newline at end of file diff --git a/shop/orderitemcoupon.php b/shop/orderitemcoupon.php new file mode 100644 index 000000000..7bf6ab17b --- /dev/null +++ b/shop/orderitemcoupon.php @@ -0,0 +1,97 @@ += '".G5_TIME_YMD."' + and cp_minimum <= '$item_price' + and ( + ( cp_method = '0' and cp_target = '{$it['it_id']}' ) + OR + ( cp_method = '1' and ( cp_target IN ( '{$it['ca_id']}', '{$it['ca_id2']}', '{$it['ca_id3']}' ) ) ) + ) "; +$result = sql_query($sql); +$count = mysql_num_rows($result); +?> + + +
        + 0) { ?> +
        + + + + + + + + + + + $row['cp_maximum']) + $dc = $row['cp_maximum']; + ?> + + + + + + + +
        쿠폰 선택
        쿠폰명할인금액적용
        + + + + +
        +
        + 사용할 수 있는 쿠폰이 없습니다.
        '; + } + ?> +
        + +
        +
        + \ No newline at end of file diff --git a/shop/ordermail1.inc.php b/shop/ordermail1.inc.php new file mode 100644 index 000000000..ed2604ff3 --- /dev/null +++ b/shop/ordermail1.inc.php @@ -0,0 +1,82 @@ +'.PHP_EOL; + $price_plus = ''; + if($row2['io_price'] >= 0) + $price_plus = '+'; + $options .= ''.$row2['ct_option'].' ('.$price_plus.display_price($row2['io_price']).') '.$row2['ct_qty'].'개'.PHP_EOL; + } + + if($k > 0) + $options .= '
      '; + + $list[$i]['g_dir'] = G5_URL; + $list[$i]['it_id'] = $row['it_id']; + $list[$i]['it_simg'] = get_it_image($row['it_id'], 70, 70); + $list[$i]['it_name'] = $row['it_name']; + $list[$i]['it_origin'] = $row['it_origin']; + $list[$i]['it_opt'] = $options; + $list[$i]['ct_price'] = $row['ct_price']; + $list[$i]['stotal_price'] = $sum['price']; + $list[$i]['stotal_point'] = $sum['point']; + + $ttotal_price += $list[$i]['stotal_price']; + $ttotal_point += $list[$i]['stotal_point']; +} +//------------------------------------------------------------------------------ + +// 배송비가 있다면 총계에 더한다 +if ($od_send_cost) + $ttotal_price += $od_send_cost; + +// 추가배송비가 있다면 총계에 더한다 +if ($od_send_cost2) + $ttotal_price += $od_send_cost2; +?> \ No newline at end of file diff --git a/shop/ordermail2.inc.php b/shop/ordermail2.inc.php new file mode 100644 index 000000000..d5ab9c677 --- /dev/null +++ b/shop/ordermail2.inc.php @@ -0,0 +1,94 @@ + '' + group by a.it_id "; +$result = sql_query($sql); +for ($i=0; $row=sql_fetch_array($result); $i++) +{ + // 합계금액 계산 + $sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price, + SUM(ct_point * ct_qty) as point, + SUM(ct_qty) as qty + from {$g5['g5_shop_cart_table']} + where it_id = '{$row['it_id']}' + and od_id = '$od_id' + and ct_select = '1' "; + $sum = sql_fetch($sql); + + // 옵션정보 + $sql2 = " select ct_option, ct_qty, io_price + from {$g5['g5_shop_cart_table']} + where it_id = '{$row['it_id']}' and od_id = '$od_id' and ct_select = '1' + order by io_type asc, ct_id asc "; + $result2 = sql_query($sql2); + + $options = ''; + $options_ul = ' style="margin:0;padding:0"'; // ul style + $options_li = ' style="padding:5px 0;list-style:none"'; // li style + for($k=0; $row2=sql_fetch_array($result2); $k++) { + if($k == 0) + $options .= ''.PHP_EOL; + $price_plus = ''; + if($row2['io_price'] >= 0) + $price_plus = '+'; + $options .= ''.$row2['ct_option'].' ('.$price_plus.display_price($row2['io_price']).') '.$row2['ct_qty'].'개'.PHP_EOL; + } + + if($k > 0) + $options .= '
    '; + + $list[$i]['it_id'] = $row['it_id']; + $list[$i]['it_simg'] = get_it_image($row['it_id'], 70, 70); + $list[$i]['it_name'] = $row['it_name']; + $list[$i]['it_opt'] = $options; + $list[$i]['ct_price'] = $sum['price']; + + $subject = $config['cf_title'].' - 주문 알림 메일 (주문자 '.$od_name.'님)'; + ob_start(); + include G5_SHOP_PATH.'/mail/orderupdate3.mail.php'; + $content = ob_get_contents(); + ob_end_clean(); + + mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $row['it_sell_email'], $subject, $content, 1); +} +//============================================================================== +?> \ No newline at end of file diff --git a/shop/ordersendcost.php b/shop/ordersendcost.php new file mode 100644 index 000000000..f69c627e4 --- /dev/null +++ b/shop/ordersendcost.php @@ -0,0 +1,19 @@ += $code "; +$row = sql_fetch($sql); + +if(!$row['sc_id']) + die('0'); + +die($row['sc_price']); +?> \ No newline at end of file diff --git a/shop/ordersendcostcoupon.php b/shop/ordersendcostcoupon.php new file mode 100644 index 000000000..a12edafa7 --- /dev/null +++ b/shop/ordersendcostcoupon.php @@ -0,0 +1,80 @@ += '".G5_TIME_YMD."' + and cp_minimum <= '$price' "; +$result = sql_query($sql); +$count = mysql_num_rows($result); +?> + + +
    + 0) { ?> +
    + + + + + + + + + + + $row['cp_maximum']) + $dc = $row['cp_maximum']; + + if($dc > $send_cost) + $dc = $send_cost; + ?> + + + + + + + +
    쿠폰 선택
    쿠폰명할인금액적용
    + + + + +
    +
    + 사용할 수 있는 쿠폰이 없습니다.

    '; + } + ?> +
    + +
    +
    + \ No newline at end of file diff --git a/shop/personalpay.php b/shop/personalpay.php new file mode 100644 index 000000000..221e103ae --- /dev/null +++ b/shop/personalpay.php @@ -0,0 +1,72 @@ + + + +
    + + personalpay.skin.php 파일을 찾을 수 없습니다.
    관리자에게 알려주시면 감사하겠습니다.

    '; + } + + if ($i==0) + { + echo '

    등록된 개인결제가 없습니다.

    '; + } + ?> + + +
    + + + diff --git a/shop/personalpayform.php b/shop/personalpayform.php new file mode 100644 index 000000000..39a3eabf3 --- /dev/null +++ b/shop/personalpayform.php @@ -0,0 +1,340 @@ + 0 "; +$pp = sql_fetch($sql); + +if(!$pp['pp_id']) + alert('개인결제 정보가 존재하지 않습니다.'); + +if($pp['pp_tno']) + alert('이미 결제하신 개인결제 내역입니다.'); + +$g5['title'] = $pp['pp_name'].'님 개인결제'; + +// 전자결제를 사용할 때만 실행 +if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] || $default['de_card_use']) { + switch($default['de_pg_service']) { + case 'lg': + $g5['body_script'] = ' onload="isActiveXOK();"'; + break; + case 'inicis': + $g5['body_script'] = ' onload="javascript:enable_click()"'; + break; + default: + $g5['body_script'] = ' onload="CheckPayplusInstall();"'; + break; + } +} + +include_once('./_head.php'); + +$action_url = G5_HTTPS_SHOP_URL.'/personalpayformupdate.php'; + +// 개인결제 체크를 위한 hash +$hash_data = md5($pp['pp_id'].$pp['pp_price'].$pp['pp_time']); +set_session('ss_personalpay_id', $pp['pp_id']); +set_session('ss_personalpay_hash', $hash_data); + +// 에스크로 상품정보 +if($default['de_escrow_use']) { + $good_info .= "seq=1".chr(31); + $good_info .= "ordr_numb={$pp_id}_".sprintf("%04d", 1).chr(31); + $good_info .= "good_name=".addslashes($pp['pp_name'].'님 개인결제').chr(31); + $good_info .= "good_cntx=1".chr(31); + $good_info .= "good_amtx=".$pp['pp_price'].chr(31); +} + +// 주문폼과 공통 사용을 위해 추가 +$od_id = $pp_id; +$tot_price = $pp['pp_price']; +$goods = $pp['pp_name'].'님 개인결제'; + +require_once('./settle_'.$default['de_pg_service'].'.inc.php'); + +// 결제대행사별 코드 include (스크립트 등) +require_once('./'.$default['de_pg_service'].'/orderform.1.php'); +?> + +
    + + + + +
    +

    개인결제정보

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    상세내용
    결제금액
    +
    + + '; + echo '결제방법 선택'; + } + + // 가상계좌 사용 + if ($default['de_vbank_use']) { + $multi_settle++; + echo ' '.PHP_EOL; + $checked = ''; + } + + // 계좌이체 사용 + if ($default['de_iche_use']) { + $multi_settle++; + echo ' '.PHP_EOL; + $checked = ''; + } + + // 휴대폰 사용 + if ($default['de_hp_use']) { + $multi_settle++; + echo ' '.PHP_EOL; + $checked = ''; + } + + // 신용카드 사용 + if ($default['de_card_use']) { + $multi_settle++; + echo ' '.PHP_EOL; + $checked = ''; + } + + if ($default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_use']) { + echo ''; + + } + + if ($multi_settle == 0) + echo '

    결제할 방법이 없습니다.
    운영자에게 알려주시면 감사하겠습니다.

    '; + ?> +
    + + + +
    + + + + + + \ No newline at end of file diff --git a/shop/personalpayformupdate.php b/shop/personalpayformupdate.php new file mode 100644 index 000000000..59c66dad4 --- /dev/null +++ b/shop/personalpayformupdate.php @@ -0,0 +1,262 @@ +$sql

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

    error file : {$_SERVER['SCRIPT_NAME']}"); +} + +// 주문번호가 있으면 결제정보 반영 +if($pp_receipt_price > 0 && $pp['pp_id'] && $pp['od_id']) { + $od_escrow = 0; + if($escw_yn == 'Y') + $od_escrow = 1; + + $sql = " update {$g5['g5_shop_order_table']} + set od_receipt_price = od_receipt_price + '$pp_receipt_price', + od_receipt_time = '$pp_receipt_time', + od_pg = '$pp_pg', + od_tno = '$pp_tno', + od_app_no = '$app_no', + od_escrow = '$od_escrow', + od_settle_case = '$pp_settle_case', + od_deposit_name = '$pp_deposit_name', + od_bank_account = '$pp_bank_account', + od_shop_memo = concat(od_shop_memo, \"\\n개인결제 ".$pp['pp_id']." 로 결제완료 - ".$pp_receipt_time."\") + where od_id = '{$pp['od_id']}' "; + $result = sql_query($sql, false); + + // 결제정보 입력 오류시 결제 취소 + if(!$result) { + $cancel_msg = '결제정보 입력 오류'; + switch($default['de_pg_service']) { + case 'lg': + include G5_SHOP_PATH.'/lg/xpay_cancel.php'; + break; + case 'inicis': + include G5_SHOP_PATH.'/inicis/inipay_cancel.php'; + break; + default: + include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; + break; + } + + die("

    $sql

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

    error file : {$_SERVER['SCRIPT_NAME']}"); + } + + // 미수금 정보 업데이트 + $info = get_order_info($pp['od_id']); + + $sql = " update {$g5['g5_shop_order_table']} + set od_misu = '{$info['od_misu']}' "; + if($info['od_misu'] == 0) + $sql .= " , od_status = '입금' "; + $sql .= " where od_id = '{$pp['od_id']}' "; + sql_query($sql, FALSE); + + // 장바구니 상태변경 + if($info['od_misu'] == 0) { + $sql = " update {$g5['g5_shop_cart_table']} + set ct_status = '입금' + where od_id = '{$pp['od_id']}' "; + sql_query($sql, FALSE); + } +} + +// 개인결제번호제거 +set_session('ss_personalpay_id', ''); +set_session('ss_personalpay_hash', ''); + +$uid = md5($pp['pp_id'].$pp['pp_time'].$_SERVER['REMOTE_ADDR']); +set_session('ss_personalpay_uid', $uid); + +goto_url(G5_SHOP_URL.'/personalpayresult.php?pp_id='.$pp['pp_id'].'&uid='.$uid); +?> + + + + 개인결제정보 기록 + + + \ No newline at end of file diff --git a/shop/personalpayresult.php b/shop/personalpayresult.php new file mode 100644 index 000000000..76d4ee56a --- /dev/null +++ b/shop/personalpayresult.php @@ -0,0 +1,319 @@ +'.PHP_EOL; + } else { + echo ''.PHP_EOL; + } +} +?> + + +

    + +

    개인결제번호

    + +
    +

    결제 정보

    + 0) + $pp_receipt_price = display_price($pp['pp_receipt_price']); + else + $pp_receipt_price = '아직 입금되지 않았거나 입금정보를 입력하지 못하였습니다.'; + + $app_no_subj = ''; + $disp_bank = true; + $disp_receipt = false; + if($pp['pp_settle_case'] == '신용카드') { + $app_no_subj = '승인번호'; + $app_no = $pp['pp_app_no']; + $disp_bank = false; + $disp_receipt = true; + } else if($pp['pp_settle_case'] == '휴대폰') { + $app_no_subj = '휴대폰번호'; + $app_no = $pp['pp_bank_account']; + $disp_bank = false; + $disp_receipt = true; + } else if($pp['pp_settle_case'] == '가상계좌' || $pp['pp_settle_case'] == '계좌이체') { + $app_no_subj = '거래번호'; + $app_no = $pp['pp_tno']; + } + ?> + +
    +

    결제정보

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0) + $is_cash_receipt = false; + } + + // 미수금이 없고 현금일 경우에만 현금영수증을 발급 할 수 있습니다. + if ($is_cash_receipt && $misu_price == 0 && $pp['pp_receipt_price'] && ($pp['pp_settle_case'] == '계좌이체' || $pp['pp_settle_case'] == '가상계좌')) { + ?> + + + + + + +
    주문번호
    결제방식
    결제금액
    결제일시
    입금자명
    입금계좌
    영수증 + + 영수증 출력 + + 영수증 출력 + + +
    현금영수증 + + 현금영수증 확인하기 + + 현금영수증을 발급하시려면 클릭하십시오. + +
    +
    +
    +
    + +
    +

    결제합계

    + +
      +
    • + 총 주문액 + +
    • + 0) { + echo '
    • '; + echo '미결제액'.PHP_EOL; + echo ''.display_price($misu_price).''; + echo '
    • '; + } + ?> +
    • + 결제액 + +
    • +
    +
    + + +
    +
    +

    관리자가 가상계좌 테스트를 한 경우에만 보입니다.

    + + + + + + + + + + + + + + + + + + + + + + + + +
    모의입금처리
    +
    + +
    +
    +
    + + +
    + + + \ No newline at end of file diff --git a/shop/price/_common.php b/shop/price/_common.php new file mode 100644 index 000000000..03a3ab6aa --- /dev/null +++ b/shop/price/_common.php @@ -0,0 +1,3 @@ + diff --git a/shop/price/daum.php b/shop/price/daum.php new file mode 100644 index 000000000..c8db5de46 --- /dev/null +++ b/shop/price/daum.php @@ -0,0 +1,154 @@ +>> 시작 상품시작 알림 필수 +2 <<>> 상품ID 해당사 상품 ID 필수,varchar(50) +3 <<>> 가격 상품 가격 필수,number +4 <<>> 상품명 상품명 필수,varchar(500) +5 <<>> 상품링크 해당 상품으로 갈 상품URL 필수,varchar(255) +6 <<>> 이미지링크 상품이미지 링크 + (상품이미지 중 제일 큰이미지링크) 필수,varchar(255) +7 <<>> 대분류ID 대분류 코드 필수,varchar(20) +8 <<>> 중분류ID 중분류 코드 varchar(20) +9 <<>> 소분류ID 소분류 코드 varchar(20) +10 <<>> 세분류ID 세분류 코드 varchar(20) +11 <<>> 대분류명 필수,varchar(50) +12 <<>> 중분류명 varchar(50) +13 <<>> 소분류명 varchar(50) +14 <<>> 세분류명 varchar(50) +15 <<>> 모델명 varchar(255) +16 <<>> 브랜드명 varchar(255) +17 <<>> 제조사 varchar(255) +18 <<>> 출시일 예) 20070101 varchar(8) +19 <<>> 가중치값 숫자 ( 0 ~ ) + 쇼핑몰대분류카테고리 기준으로 + 쇼핑몰내부에서 책정되는 상품에 대한 + 인기점수 Numer(14) +20 <<>> 판매량 해당 상품이 팔린 누적판매량 number(14) +21 <<>> 쿠폰정보 퍼센트 쿠폰인 경우 + ex) 5%할인쿠폰 -> 5% + 일정가격할인 쿠폰인 경우 + ex) 3000원할인쿠폰 -> 3000원 + 만 표기 + 0%, 0원은 값을 제거 varchar(255) + +22 <<>> 무이자/할부 카드이름개월수 형식으로 표시 + ex) 삼성2~3/롯데3/현대6 + 0개월 일 때에는 값을 제거 varchar(255) +23 <<>> 적립금/포인트 텍스트정보 + 0일 때에는 값을 제거 varchar(255) +24 <<>> 배송비 무료일 때는 0 + 유료일 때는 1 + 조건부무료일 때는 2 로 표기 number +25 <<>> 배송비 조건 유료(deliv필드 코드1번) or + 조건부무료(deliv필드 코드2번) + 인 경우에 상세 조건 표기 + ex)3만원미만무료 or 2500원 varchar(20) +26 <<>> 상품평수 상품의 상품평개수가 몇 개인지 숫자만 표기 number +27 <<>> 이벤트 해당 상품의 이벤트 내용을 표기 + ex) 새봄맞이 행복이벤트! 새출발 아이템 50%SALE + 신규회원 5%+전상품 3%할인쿠폰 varchar(255) +28 <<>> 이벤트url event 페이지 URL varchar(255) +29 <<>> 실판매자샵명 실제로 상품을 판매하고있는 판매자샵 이름 표기 (판매샵의 대표자명이 아니라 판매샵명) + 판매자샵명이 없는 경우에는 판매자아이디로 표기 (자체판매하는 경우에는 표기X) varchar(20) +30 <<>> 실판매자샵주소 판매자의 미니샵 주소 or 판매자샵주소 + (자체판매하는 경우에는 표기X) varchar(50) +31 <<>> 실판매자등급 판매자등급을 5점 만점기준으로 + (자체판매하는 경우에는 표기X) number +32 <<>> 끝알림 끝알림 태그 필수 +*/ + +$lt = "<<<"; +$gt = ">>>"; +$shop_url = G5_SHOP_URL; +$data_url = G5_DATA_URL; + +$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' order by ca_id"; +$result = sql_query($sql); + +for ($i=0; $row=sql_fetch_array($result); $i++) +{ + $cate1 = $cate2 = $cate3 = $cate4 = ""; + + $row2 = sql_fetch(" select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' "); + $cate1 = $row2['ca_id']; + $catename1 = $row2['ca_name']; + + $cate2 = $cate3 = $cate4 = ""; + $catename2 = $catename3 = $catename4 = ""; + + if (strlen($row['ca_id']) >= 8) { + $row2 = sql_fetch(" select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,8)."' "); + $cate4 = $row2['ca_id']; + $catename4 = $row2['ca_name']; + } + + if (strlen($row['ca_id']) >= 6) { + $row2 = sql_fetch(" select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,6)."' "); + $cate3 = $row2['ca_id']; + $catename3 = $row2['ca_name']; + } + + if (strlen($row['ca_id']) >= 4) { + $row2 = sql_fetch(" select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' "); + $cate2 = $row2['ca_id']; + $catename2 = $row2['ca_name']; + } + + $pdate = date("Ymd", strtotime($row['it_time'])); + $point = get_item_point($row); + + // 배송비계산 + $delivery = get_item_sendcost2($row['it_id'], $row['it_price'], 1); + if($delivery) { + $deliv = 1; + $deliv2 = $delivery.'원'; + } else { + $deliv = 0; + $deliv2 = ""; + } + + // 상품이미지 + $img_url = get_it_imageurl($row['it_id']); + + echo <<< HEREDOC +{$lt}begin{$gt} +{$lt}pid{$gt}{$row['it_id']} +{$lt}price{$gt}{$row['it_price']} +{$lt}pname{$gt}{$row['it_name']} +{$lt}pgurl{$gt}$shop_url/item.php?it_id={$row['it_id']} +{$lt}igurl{$gt}$img_url +{$lt}cate1{$gt}$cate1 +{$lt}cate2{$gt}$cate2 +{$lt}cate3{$gt}$cate3 +{$lt}cate4{$gt}$cate4 +{$lt}catename1{$gt}$catename1 +{$lt}catename2{$gt}$catename2 +{$lt}catename3{$gt}$catename3 +{$lt}catename4{$gt}$catename4 +{$lt}maker{$gt}{$row['it_maker']} +{$lt}pdate{$gt}$pdate +{$lt}point{$gt}$point +{$lt}deliv{$gt}$deliv +{$lt}deliv2{$gt}$deliv2 +{$lt}end{$gt} + +HEREDOC; +} + + + +$content = ob_get_contents(); +ob_end_clean(); + +$content = iconv('utf-8', 'euc-kr', $content); +echo $content; +?> \ No newline at end of file diff --git a/shop/price/naver.php b/shop/price/naver.php new file mode 100644 index 000000000..fea228814 --- /dev/null +++ b/shop/price/naver.php @@ -0,0 +1,126 @@ +>> 필수 상품의 시작을 알리는 필드 +<<>> 필수 판매하는 상품의 유니크한 상품ID +<<>> 필수 실제 서비스에 반영될 상품명(Title) +<<>> 필수 해당 상품의 판매가격 +<<>> 필수 해당 상품을 구매할 수 있는 상품URL +<<>> 필수 해당 상품의 이미지URL +<<>> 필수 판매하는 상품의 카테고리명(대분류) +<<>> 선택 판매하는 상품의 카테고리명(중분류) +<<>> 선택 판매하는 상품의 카테고리명(소분류) +<<>> 선택 판매하는 상품의 카테고리명(세분류) +<<>> 필수 판매하는 상품의 카테고리명(대분류) +<<>> 선택 판매하는 상품의 카테고리명(중분류) +<<>> 선택 판매하는 상품의 카테고리명(소분류) +<<>> 선택 판매하는 상품의 카테고리명(세분류) +<<>> 선택 모델명 +<<>> 선택 브랜드 +<<>> 선택 제조사 +<<>> 선택 원산지 +<<>> 필수 배송료 +<<>> 선택 이벤트 +<<>> 선택 쿠폰 +<<>> 선택 무이자 +<<>> 선택 포인트 +<<>> 선택 동영상 상품 여부 +<<>> 선택 셀러 ID (오픈마켓에 한함) +<<>> 선택 바코드 (전체EP만 사용) +<<>> 필수 상품의 마지막을 알리는 필드 +*/ + +$lt = "<<<"; +$gt = ">>>"; +$shop_url = G5_SHOP_URL; +$data_url = G5_DATA_URL; + +$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' order by ca_id"; +$result = sql_query($sql); + +for ($i=0; $row=sql_fetch_array($result); $i++) +{ + $cate1 = $cate2 = $cate3 = $cate4 = ""; + $caid1 = $caid2 = $caid3 = $caid4 = ""; + + $caid1 = substr($row['ca_id'],0,2); + $row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$caid1' "); + $cate1 = $row2['ca_name']; + + $caid2 = $caid3 = $caid4 = ""; + $cate2 = $cate3 = $cate4 = ""; + + if (strlen($row['ca_id']) >= 8) { + $caid4 = substr($row['ca_id'],0,8); + $row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$caid4' "); + $cate4 = $row2['ca_name']; + } + + if (strlen($row['ca_id']) >= 6) { + $caid3 = substr($row['ca_id'],0,6); + $row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$caid3' "); + $cate3 = $row2['ca_name']; + } + + if (strlen($row['ca_id']) >= 4) { + $caid2 = substr($row['ca_id'],0,4); + $row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$caid2' "); + $cate2 = $row2['ca_name']; + } + + // 배송비계산 + $delivery = get_item_sendcost2($row['it_id'], $row['it_price'], 1); + + // 상품이미지 + $img_url = get_it_imageurl($row['it_id']); + + // 포인트 + $it_point = get_item_point($row); + + echo <<< HEREDOC +{$lt}begin{$gt} +{$lt}mapid{$gt}{$row['it_id']} +{$lt}pname{$gt}{$row['it_name']} +{$lt}price{$gt}{$row['it_price']} +{$lt}pgurl{$gt}$shop_url/item.php?it_id={$row['it_id']} +{$lt}igurl{$gt}$img_url +{$lt}cate1{$gt}$cate1 +{$lt}cate2{$gt}$cate2 +{$lt}cate3{$gt}$cate3 +{$lt}cate4{$gt}$cate4 +{$lt}caid1{$gt}$caid1 +{$lt}caid2{$gt}$caid2 +{$lt}caid3{$gt}$caid3 +{$lt}caid4{$gt}$caid4 +{$lt}model{$gt} +{$lt}brand{$gt} +{$lt}maker{$gt}{$row['it_maker']} +{$lt}origi{$gt}{$row['it_origin']} +{$lt}deliv{$gt}$delivery +{$lt}event{$gt} +{$lt}coupo{$gt} +{$lt}pcard{$gt} +{$lt}point{$gt}$it_point +{$lt}mvurl{$gt} +{$lt}selid{$gt} +{$lt}barcode{$gt} +{$lt}ftend{$gt} + +HEREDOC; +} + +$content = ob_get_contents(); +ob_end_clean(); + +// 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음 +$content = iconv('utf-8', 'euc-kr', $content); + +echo $content; +?> \ No newline at end of file diff --git a/shop/price/naver_new.php b/shop/price/naver_new.php new file mode 100644 index 000000000..a68ea7c70 --- /dev/null +++ b/shop/price/naver_new.php @@ -0,0 +1,127 @@ +>> 필수 상품의 시작을 알리는 필드 +<<>> 필수 판매하는 상품의 유니크한 상품ID +<<>> 필수 실제 서비스에 반영될 상품명(Title) +<<>> 필수 해당 상품의 판매가격 +<<>> 필수 해당 상품을 구매할 수 있는 상품URL +<<>> 필수 해당 상품의 이미지URL +<<>> 필수 판매하는 상품의 카테고리명(대분류) +<<>> 선택 판매하는 상품의 카테고리명(중분류) +<<>> 선택 판매하는 상품의 카테고리명(소분류) +<<>> 선택 판매하는 상품의 카테고리명(세분류) +<<>> 필수 판매하는 상품의 카테고리명(대분류) +<<>> 선택 판매하는 상품의 카테고리명(중분류) +<<>> 선택 판매하는 상품의 카테고리명(소분류) +<<>> 선택 판매하는 상품의 카테고리명(세분류) +<<>> 선택 모델명 +<<>> 선택 브랜드 +<<>> 선택 제조사 +<<>> 선택 원산지 +<<>> 필수 배송료 +<<>> 선택 이벤트 +<<>> 선택 쿠폰 +<<>> 선택 무이자 +<<>> 선택 포인트 +<<>> 선택 동영상 상품 여부 +<<>> 선택 셀러 ID (오픈마켓에 한함) +<<>> 선택 바코드 (전체EP만 사용) +<<>> 필수 상품의 마지막을 알리는 필드 +*/ + +$lt = "<<<"; +$gt = ">>>"; +$shop_url = G5_SHOP_URL; +$data_url = G5_DATA_URL; + +// 하루전의 상품 +$time = date("Y-m-d 00:00:00", G5_SERVER_TIME - 86400); +$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' and it_time >= '$time' order by ca_id"; +$result = sql_query($sql); + +for ($i=0; $row=sql_fetch_array($result); $i++) +{ + $cate1 = $cate2 = $cate3 = $cate4 = ""; + $caid1 = $caid2 = $caid3 = $caid4 = ""; + + $caid1 = substr($row['ca_id'],0,2); + $row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$caid1' "); + $cate1 = $row2['ca_name']; + + if (strlen($row['ca_id']) >= 8) { + $caid4 = substr($row['ca_id'],0,8); + $row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$caid4' "); + $cate4 = $row2['ca_name']; + } + + if (strlen($row['ca_id']) >= 6) { + $caid3 = substr($row['ca_id'],0,6); + $row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$caid3' "); + $cate3 = $row2['ca_name']; + } + + if (strlen($row['ca_id']) >= 4) { + $caid2 = substr($row['ca_id'],0,4); + $row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$caid2' "); + $cate2 = $row2['ca_name']; + } + + // 배송비계산 + $delivery = get_item_sendcost2($row['it_id'], $row['it_price'], 1); + + // 상품이미지 + $img_url = get_it_imageurl($row['it_id']); + + // 포인트 + $it_point = get_item_point($row); + + echo <<< HEREDOC +{$lt}begin{$gt} +{$lt}mapid{$gt}{$row['it_id']} +{$lt}pname{$gt}{$row['it_name']} +{$lt}price{$gt}{$row['it_price']} +{$lt}pgurl{$gt}$shop_url/item.php?it_id={$row['it_id']} +{$lt}igurl{$gt}$img_url +{$lt}cate1{$gt}$cate1 +{$lt}cate2{$gt}$cate2 +{$lt}cate3{$gt}$cate3 +{$lt}cate4{$gt}$cate4 +{$lt}caid1{$gt}$caid1 +{$lt}caid2{$gt}$caid2 +{$lt}caid3{$gt}$caid3 +{$lt}caid4{$gt}$caid4 +{$lt}model{$gt} +{$lt}brand{$gt} +{$lt}maker{$gt}{$row['it_maker']} +{$lt}origi{$gt}{$row['it_origin']} +{$lt}deliv{$gt}$delivery +{$lt}event{$gt} +{$lt}coupo{$gt} +{$lt}pcard{$gt} +{$lt}point{$gt}$it_point +{$lt}mvurl{$gt} +{$lt}selid{$gt} +{$lt}barcode{$gt} +{$lt}ftend{$gt} + +HEREDOC; +} + +$content = ob_get_contents(); +ob_end_clean(); + +// 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음 +$content = iconv('utf-8', 'euc-kr', $content); + +echo $content; +?> \ No newline at end of file diff --git a/shop/price/naver_new_summary.php b/shop/price/naver_new_summary.php new file mode 100644 index 000000000..e07831e55 --- /dev/null +++ b/shop/price/naver_new_summary.php @@ -0,0 +1,57 @@ +>> 필수 상품의 시작을 알리는 필드 +<<>> 판매하는 상품의 유니크한 상품ID +<<>> 실제 서비스에 반영될 상품명(Title) +<<>> 해당 상품의 판매가격 +<<>> I(신규상품) / U (업데이트상품) / D (품절상품) +<<>> 상품정보 생성 시각 +<<>> 필수 상품의 마지막을 알리는 필드 +*/ + +$lt = "<<<"; +$gt = ">>>"; + +$time = date("Y-m-d 00:00:00", G5_SERVER_TIME - 86400); +$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' and it_time >= '$time' order by ca_id"; +$result = sql_query($sql); + +for ($i=0; $row=sql_fetch_array($result); $i++) +{ + $stock_qty = get_it_stock_qty($row['it_id']); + + echo "{$lt}begin{$gt}\n"; + echo "{$lt}mapid{$gt}{$row['it_id']}\n"; + if ($stock_qty <= 0) + { + // 품절 상품 양식 + echo "{$lt}class{$gt}D\n"; + } + else + { + // 업데이트 상품 양식 & 품절 복구 상품 양식 + echo "{$lt}pname{$gt}{$row['it_name']}\n"; + echo "{$lt}price{$gt}{$row['it_price']}\n"; + echo "{$lt}class{$gt}U\n"; + } + echo "{$lt}utime{$gt}{$row['it_time']}\n"; + echo "{$lt}ftend{$gt}\n"; +} + +$content = ob_get_contents(); +ob_end_clean(); + +// 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음 +$content = iconv('utf-8', 'euc-kr', $content); + +echo $content; +?> \ No newline at end of file diff --git a/shop/price/naver_summary.php b/shop/price/naver_summary.php new file mode 100644 index 000000000..47042358f --- /dev/null +++ b/shop/price/naver_summary.php @@ -0,0 +1,54 @@ +>> 필수 상품의 시작을 알리는 필드 +<<>> 판매하는 상품의 유니크한 상품ID +<<>> 실제 서비스에 반영될 상품명(Title) +<<>> 해당 상품의 판매가격 +<<>> I(신규상품) / U (업데이트상품) / D (품절상품) +<<>> 상품정보 생성 시각 +<<>> 필수 상품의 마지막을 알리는 필드 +*/ + +$lt = "<<<"; +$gt = ">>>"; + +$sql =" select it_id, it_name, it_price, it_time from {$g5['g5_shop_item_table']} where it_use = '1' order by ca_id"; +$result = sql_query($sql); + +for ($i=0; $row=sql_fetch_array($result); $i++) +{ + $stock_qty = get_it_stock_qty($row['it_id']); + + echo "{$lt}begin{$gt}\n"; + echo "{$lt}mapid{$gt}{$row['it_id']}\n"; + if ($stock_qty <= 0) + { + // 품절 상품 양식 + echo "{$lt}class{$gt}D\n"; + } + else + { + // 업데이트 상품 양식 & 품절 복구 상품 양식 + echo "{$lt}pname{$gt}{$row['it_name']}\n"; + echo "{$lt}price{$gt}{$row['it_price']}\n"; + echo "{$lt}class{$gt}U\n"; + } + echo "{$lt}utime{$gt}{$row['it_time']}\n"; + echo "{$lt}ftend{$gt}\n"; +} + +$content = ob_get_contents(); +ob_end_clean(); + +// 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음 +$content = iconv('utf-8', 'euc-kr', $content); + +echo $content; +?> \ No newline at end of file diff --git a/shop/price2/_common.php b/shop/price2/_common.php new file mode 100644 index 000000000..03a3ab6aa --- /dev/null +++ b/shop/price2/_common.php @@ -0,0 +1,3 @@ + diff --git a/shop/price2/daum.php b/shop/price2/daum.php new file mode 100644 index 000000000..1009bcb95 --- /dev/null +++ b/shop/price2/daum.php @@ -0,0 +1,209 @@ +>> 시작 상품시작 알림 필수 +2 <<>> 상품ID 해당사 상품 ID 필수,varchar(50) +3 <<>> 가격 상품 가격 필수,number +4 <<>> 상품명 상품명 필수,varchar(500) +5 <<>> 상품링크 해당 상품으로 갈 상품URL 필수,varchar(255) +6 <<>> 이미지링크 상품이미지 링크 + (상품이미지 중 제일 큰이미지링크) 필수,varchar(255) +7 <<>> 대분류ID 대분류 코드 필수,varchar(20) +8 <<>> 중분류ID 중분류 코드 varchar(20) +9 <<>> 소분류ID 소분류 코드 varchar(20) +10 <<>> 세분류ID 세분류 코드 varchar(20) +11 <<>> 대분류명 필수,varchar(50) +12 <<>> 중분류명 varchar(50) +13 <<>> 소분류명 varchar(50) +14 <<>> 세분류명 varchar(50) +15 <<>> 모델명 varchar(255) +16 <<>> 브랜드명 varchar(255) +17 <<>> 제조사 varchar(255) +18 <<>> 출시일 예) 20070101 varchar(8) +19 <<>> 가중치값 숫자 ( 0 ~ ) + 쇼핑몰대분류카테고리 기준으로 + 쇼핑몰내부에서 책정되는 상품에 대한 + 인기점수 Numer(14) +20 <<>> 판매량 해당 상품이 팔린 누적판매량 number(14) +21 <<>> 쿠폰정보 퍼센트 쿠폰인 경우 + ex) 5%할인쿠폰 -> 5% + 일정가격할인 쿠폰인 경우 + ex) 3000원할인쿠폰 -> 3000원 + 만 표기 + 0%, 0원은 값을 제거 varchar(255) + +22 <<>> 무이자/할부 카드이름개월수 형식으로 표시 + ex) 삼성2~3/롯데3/현대6 + 0개월 일 때에는 값을 제거 varchar(255) +23 <<>> 적립금/포인트 텍스트정보 + 0일 때에는 값을 제거 varchar(255) +24 <<>> 배송비 무료일 때는 0 + 유료일 때는 1 + 조건부무료일 때는 2 로 표기 number +25 <<>> 배송비 조건 유료(deliv필드 코드1번) or + 조건부무료(deliv필드 코드2번) + 인 경우에 상세 조건 표기 + ex)3만원미만무료 or 2500원 varchar(20) +26 <<>> 상품평수 상품의 상품평개수가 몇 개인지 숫자만 표기 number +27 <<>> 이벤트 해당 상품의 이벤트 내용을 표기 + ex) 새봄맞이 행복이벤트! 새출발 아이템 50%SALE + 신규회원 5%+전상품 3%할인쿠폰 varchar(255) +28 <<>> 이벤트url event 페이지 URL varchar(255) +29 <<>> 실판매자샵명 실제로 상품을 판매하고있는 판매자샵 이름 표기 (판매샵의 대표자명이 아니라 판매샵명) + 판매자샵명이 없는 경우에는 판매자아이디로 표기 (자체판매하는 경우에는 표기X) varchar(20) +30 <<>> 실판매자샵주소 판매자의 미니샵 주소 or 판매자샵주소 + (자체판매하는 경우에는 표기X) varchar(50) +31 <<>> 실판매자등급 판매자등급을 5점 만점기준으로 + (자체판매하는 경우에는 표기X) number +32 <<>> 끝알림 끝알림 태그 필수 +*/ + +$lt = "<<<"; +$gt = ">>>"; + +$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' order by ca_id"; +$result = sql_query($sql); + +for ($i=0; $row=sql_fetch_array($result); $i++) +{ + $cate1 = $cate2 = $cate3 = $cate4 = ""; + + $row2 = sql_fetch(" select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' "); + $cate1 = $row2['ca_id']; + $catename1 = $row2['ca_name']; + + $cate2 = $cate3 = $cate4 = ""; + $catename2 = $catename3 = $catename4 = ""; + + if (strlen($row['ca_id']) >= 8) { + $row2 = sql_fetch(" select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,8)."' "); + $cate4 = $row2['ca_id']; + $catename4 = $row2['ca_name']; + } + + if (strlen($row['ca_id']) >= 6) { + $row2 = sql_fetch(" select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,6)."' "); + $cate3 = $row2['ca_id']; + $catename3 = $row2['ca_name']; + } + + if (strlen($row['ca_id']) >= 4) { + $row2 = sql_fetch(" select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' "); + $cate2 = $row2['ca_id']; + $catename2 = $row2['ca_name']; + } + + $pdate = date("Ymd", strtotime($row['it_time'])); + + // 상품이미지 + $img_url = get_it_imageurl($row['it_id']); + + // 상품별옵션 + $sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc "; + $result2 = sql_query($sql); + $opt_count = @mysql_num_rows($result2); + + if(!$opt_count) { + $it_name = $row['it_name']; + $buy_url = G5_SHOP_URL.'/itembuy.php?it_id='.$row['it_id']; + $it_price = $row['it_price']; + $delivery = get_item_sendcost2($row['it_id'], $it_price, 1); + $point = get_item_point($row); + + if($delivery) { + $deliv = 1; + $deliv2 = $delivery.'원'; + } else { + $deliv = 0; + $deliv2 = ""; + } + + echo <<< HEREDOC +{$lt}begin{$gt} +{$lt}pid{$gt}{$row['it_id']} +{$lt}price{$gt}$it_price +{$lt}pname{$gt}$it_name +{$lt}pgurl{$gt}$buy_url +{$lt}igurl{$gt}$img_url +{$lt}cate1{$gt}$cate1 +{$lt}cate2{$gt}$cate2 +{$lt}cate3{$gt}$cate3 +{$lt}cate4{$gt}$cate4 +{$lt}catename1{$gt}$catename1 +{$lt}catename2{$gt}$catename2 +{$lt}catename3{$gt}$catename3 +{$lt}catename4{$gt}$catename4 +{$lt}maker{$gt}{$row['it_maker']} +{$lt}pdate{$gt}$pdate +{$lt}point{$gt}$point +{$lt}deliv{$gt}$deliv +{$lt}deliv2{$gt}$deliv2 +{$lt}end{$gt} + +HEREDOC; + + } else { + $subj = explode(',', $row['it_option_subject']); + for($k=0; $row2=sql_fetch_array($result2); $k++) { + $it_name = $row['it_name'].' '; + $opt = explode(chr(30), $row2['io_id']); + $sep = ''; + for($j=0; $j \ No newline at end of file diff --git a/shop/price2/naver.php b/shop/price2/naver.php new file mode 100644 index 000000000..3491a41b4 --- /dev/null +++ b/shop/price2/naver.php @@ -0,0 +1,178 @@ +>> 필수 상품의 시작을 알리는 필드 +<<>> 필수 판매하는 상품의 유니크한 상품ID +<<>> 필수 실제 서비스에 반영될 상품명(Title) +<<>> 필수 해당 상품의 판매가격 +<<>> 필수 해당 상품을 구매할 수 있는 상품URL +<<>> 필수 해당 상품의 이미지URL +<<>> 필수 판매하는 상품의 카테고리명(대분류) +<<>> 선택 판매하는 상품의 카테고리명(중분류) +<<>> 선택 판매하는 상품의 카테고리명(소분류) +<<>> 선택 판매하는 상품의 카테고리명(세분류) +<<>> 필수 판매하는 상품의 카테고리명(대분류) +<<>> 선택 판매하는 상품의 카테고리명(중분류) +<<>> 선택 판매하는 상품의 카테고리명(소분류) +<<>> 선택 판매하는 상품의 카테고리명(세분류) +<<>> 선택 모델명 +<<>> 선택 브랜드 +<<>> 선택 제조사 +<<>> 선택 원산지 +<<>> 필수 배송료 +<<>> 선택 이벤트 +<<>> 선택 쿠폰 +<<>> 선택 무이자 +<<>> 선택 포인트 +<<>> 선택 동영상 상품 여부 +<<>> 선택 셀러 ID (오픈마켓에 한함) +<<>> 선택 바코드 (전체EP만 사용) +<<>> 필수 상품의 마지막을 알리는 필드 +*/ + +$lt = "<<<"; +$gt = ">>>"; + +$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' order by ca_id"; +$result = sql_query($sql); + +for ($i=0; $row=sql_fetch_array($result); $i++) +{ + $cate1 = $cate2 = $cate3 = $cate4 = ""; + $caid1 = $caid2 = $caid3 = $caid4 = ""; + + $caid1 = substr($row['ca_id'],0,2); + $row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$caid1' "); + $cate1 = $row2['ca_name']; + + $caid2 = $caid3 = $caid4 = ""; + $cate2 = $cate3 = $cate4 = ""; + + if (strlen($row['ca_id']) >= 8) { + $caid4 = substr($row['ca_id'],0,8); + $row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$caid4' "); + $cate4 = $row2['ca_name']; + } + + if (strlen($row['ca_id']) >= 6) { + $caid3 = substr($row['ca_id'],0,6); + $row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$caid3' "); + $cate3 = $row2['ca_name']; + } + + if (strlen($row['ca_id']) >= 4) { + $caid2 = substr($row['ca_id'],0,4); + $row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$caid2' "); + $cate2 = $row2['ca_name']; + } + + // 상품이미지 + $img_url = get_it_imageurl($row['it_id']); + + // 상품별옵션 + $sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc "; + $result2 = sql_query($sql); + $opt_count = @mysql_num_rows($result2); + + if(!$opt_count) { + $it_name = $row['it_name']; + $buy_url = G5_SHOP_URL.'/itembuy.php?it_id='.$row['it_id']; + $it_price = $row['it_price']; + $delivery = get_item_sendcost2($row['it_id'], $it_price, 1); + $it_point = get_item_point($row); + + echo <<< HEREDOC +{$lt}begin{$gt} +{$lt}mapid{$gt}{$row['it_id']} +{$lt}pname{$gt}$it_name +{$lt}price{$gt}$it_price +{$lt}pgurl{$gt}$buy_url +{$lt}igurl{$gt}$img_url +{$lt}cate1{$gt}$cate1 +{$lt}cate2{$gt}$cate2 +{$lt}cate3{$gt}$cate3 +{$lt}cate4{$gt}$cate4 +{$lt}caid1{$gt}$caid1 +{$lt}caid2{$gt}$caid2 +{$lt}caid3{$gt}$caid3 +{$lt}caid4{$gt}$caid4 +{$lt}model{$gt} +{$lt}brand{$gt} +{$lt}maker{$gt}{$row['it_maker']} +{$lt}origi{$gt}{$row['it_origin']} +{$lt}deliv{$gt}$delivery +{$lt}event{$gt} +{$lt}coupo{$gt} +{$lt}pcard{$gt} +{$lt}point{$gt}$it_point +{$lt}mvurl{$gt} +{$lt}selid{$gt} +{$lt}barcode{$gt} +{$lt}ftend{$gt} + +HEREDOC; + + } else { + $subj = explode(',', $row['it_option_subject']); + for($k=0; $row2=sql_fetch_array($result2); $k++) { + $it_name = $row['it_name'].' '; + $opt = explode(chr(30), $row2['io_id']); + $sep = ''; + for($j=0; $j \ No newline at end of file diff --git a/shop/price2/naver_new.php b/shop/price2/naver_new.php new file mode 100644 index 000000000..eaf443442 --- /dev/null +++ b/shop/price2/naver_new.php @@ -0,0 +1,180 @@ +>> 필수 상품의 시작을 알리는 필드 +<<>> 필수 판매하는 상품의 유니크한 상품ID +<<>> 필수 실제 서비스에 반영될 상품명(Title) +<<>> 필수 해당 상품의 판매가격 +<<>> 필수 해당 상품을 구매할 수 있는 상품URL +<<>> 필수 해당 상품의 이미지URL +<<>> 필수 판매하는 상품의 카테고리명(대분류) +<<>> 선택 판매하는 상품의 카테고리명(중분류) +<<>> 선택 판매하는 상품의 카테고리명(소분류) +<<>> 선택 판매하는 상품의 카테고리명(세분류) +<<>> 필수 판매하는 상품의 카테고리명(대분류) +<<>> 선택 판매하는 상품의 카테고리명(중분류) +<<>> 선택 판매하는 상품의 카테고리명(소분류) +<<>> 선택 판매하는 상품의 카테고리명(세분류) +<<>> 선택 모델명 +<<>> 선택 브랜드 +<<>> 선택 제조사 +<<>> 선택 원산지 +<<>> 필수 배송료 +<<>> 선택 이벤트 +<<>> 선택 쿠폰 +<<>> 선택 무이자 +<<>> 선택 포인트 +<<>> 선택 동영상 상품 여부 +<<>> 선택 셀러 ID (오픈마켓에 한함) +<<>> 선택 바코드 (전체EP만 사용) +<<>> 필수 상품의 마지막을 알리는 필드 +*/ + +$lt = "<<<"; +$gt = ">>>"; + +// 하루전의 상품 +$time = date("Y-m-d 00:00:00", G5_SERVER_TIME - 86400); +$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' and it_time >= '$time' order by ca_id"; +$result = sql_query($sql); + +for ($i=0; $row=sql_fetch_array($result); $i++) +{ + $cate1 = $cate2 = $cate3 = $cate4 = ""; + $caid1 = $caid2 = $caid3 = $caid4 = ""; + + $caid1 = substr($row['ca_id'],0,2); + $row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$caid1' "); + $cate1 = $row2['ca_name']; + + if (strlen($row['ca_id']) >= 8) { + $caid4 = substr($row['ca_id'],0,8); + $row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$caid4' "); + $cate4 = $row2['ca_name']; + } + + if (strlen($row['ca_id']) >= 6) { + $caid3 = substr($row['ca_id'],0,6); + $row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$caid3' "); + $cate3 = $row2['ca_name']; + } + + if (strlen($row['ca_id']) >= 4) { + $caid2 = substr($row['ca_id'],0,4); + $row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$caid2' "); + $cate2 = $row2['ca_name']; + } + + // 상품이미지 + $img_url = get_it_imageurl($row['it_id']); + + // 상품별옵션 + $sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc "; + $result2 = sql_query($sql); + $opt_count = @mysql_num_rows($result2); + + if(!$opt_count) { + $it_name = $row['it_name']; + $buy_url = G5_SHOP_URL.'/itembuy.php?it_id='.$row['it_id']; + $it_price = $row['it_price']; + $delivery = get_item_sendcost2($row['it_id'], $it_price, 1); + $it_point = get_item_point($row); + + echo <<< HEREDOC +{$lt}begin{$gt} +{$lt}mapid{$gt}{$row['it_id']} +{$lt}pname{$gt}$it_name +{$lt}price{$gt}$it_price +{$lt}pgurl{$gt}$buy_url +{$lt}igurl{$gt}$img_url +{$lt}cate1{$gt}$cate1 +{$lt}cate2{$gt}$cate2 +{$lt}cate3{$gt}$cate3 +{$lt}cate4{$gt}$cate4 +{$lt}caid1{$gt}$caid1 +{$lt}caid2{$gt}$caid2 +{$lt}caid3{$gt}$caid3 +{$lt}caid4{$gt}$caid4 +{$lt}model{$gt} +{$lt}brand{$gt} +{$lt}maker{$gt}{$row['it_maker']} +{$lt}origi{$gt}{$row['it_origin']} +{$lt}deliv{$gt}$delivery +{$lt}event{$gt} +{$lt}coupo{$gt} +{$lt}pcard{$gt} +{$lt}point{$gt}$it_point +{$lt}mvurl{$gt} +{$lt}selid{$gt} +{$lt}barcode{$gt} +{$lt}ftend{$gt} + +HEREDOC; + + } else { + $subj = explode(',', $row['it_option_subject']); + for($k=0; $row2=sql_fetch_array($result2); $k++) { + $it_name = $row['it_name'].' '; + $opt = explode(chr(30), $row2['io_id']); + $sep = ''; + for($j=0; $j \ No newline at end of file diff --git a/shop/price2/naver_new_summary.php b/shop/price2/naver_new_summary.php new file mode 100644 index 000000000..d4e0b1257 --- /dev/null +++ b/shop/price2/naver_new_summary.php @@ -0,0 +1,97 @@ +>> 필수 상품의 시작을 알리는 필드 +<<>> 판매하는 상품의 유니크한 상품ID +<<>> 실제 서비스에 반영될 상품명(Title) +<<>> 해당 상품의 판매가격 +<<>> I(신규상품) / U (업데이트상품) / D (품절상품) +<<>> 상품정보 생성 시각 +<<>> 필수 상품의 마지막을 알리는 필드 +*/ + +$lt = "<<<"; +$gt = ">>>"; + +$time = date("Y-m-d 00:00:00", G5_SERVER_TIME - 86400); +$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' and it_time >= '$time' order by ca_id"; +$result = sql_query($sql); + +for ($i=0; $row=sql_fetch_array($result); $i++) +{ + // 상품별옵션 + $sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc "; + $result2 = sql_query($sql); + $opt_count = @mysql_num_rows($result2); + + if(!$opt_count) { + $it_name = $row['it_name']; + $it_price = $row['it_price']; + $stock_qty = get_it_stock_qty($row['it_id']); + + echo "{$lt}begin{$gt}\n"; + echo "{$lt}mapid{$gt}{$row['it_id']}\n"; + if ($stock_qty <= 0) + { + // 품절 상품 양식 + echo "{$lt}class{$gt}D\n"; + } + else + { + // 업데이트 상품 양식 & 품절 복구 상품 양식 + echo "{$lt}pname{$gt}{$it_name}\n"; + echo "{$lt}price{$gt}{$it_price}\n"; + echo "{$lt}class{$gt}U\n"; + } + echo "{$lt}utime{$gt}{$row['it_time']}\n"; + echo "{$lt}ftend{$gt}\n"; + + } else { + $subj = explode(',', $row['it_option_subject']); + for($k=0; $row2=sql_fetch_array($result2); $k++) { + $it_name = $row['it_name'].' '; + $opt = explode(chr(30), $row2['io_id']); + $sep = ''; + for($j=0; $j \ No newline at end of file diff --git a/shop/price2/naver_summary.php b/shop/price2/naver_summary.php new file mode 100644 index 000000000..ded9fc60a --- /dev/null +++ b/shop/price2/naver_summary.php @@ -0,0 +1,95 @@ +>> 필수 상품의 시작을 알리는 필드 +<<>> 판매하는 상품의 유니크한 상품ID +<<>> 실제 서비스에 반영될 상품명(Title) +<<>> 해당 상품의 판매가격 +<<>> I(신규상품) / U (업데이트상품) / D (품절상품) +<<>> 상품정보 생성 시각 +<<>> 필수 상품의 마지막을 알리는 필드 +*/ + +$lt = "<<<"; +$gt = ">>>"; + +$sql =" select it_id, it_name, it_price, it_time from {$g5['g5_shop_item_table']} where it_use = '1' order by ca_id"; +$result = sql_query($sql); + +for ($i=0; $row=sql_fetch_array($result); $i++) +{ + // 상품별옵션 + $sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc "; + $result2 = sql_query($sql); + $opt_count = @mysql_num_rows($result2); + + if(!$opt_count) { + $it_name = $row['it_name']; + $it_price = $row['it_price']; + $stock_qty = get_it_stock_qty($row['it_id']); + + echo "{$lt}begin{$gt}\n"; + echo "{$lt}mapid{$gt}{$row['it_id']}\n"; + if ($stock_qty <= 0) + { + // 품절 상품 양식 + echo "{$lt}class{$gt}D\n"; + } + else + { + // 업데이트 상품 양식 & 품절 복구 상품 양식 + echo "{$lt}pname{$gt}{$it_name}\n"; + echo "{$lt}price{$gt}{$it_price}\n"; + echo "{$lt}class{$gt}U\n"; + } + echo "{$lt}utime{$gt}{$row['it_time']}\n"; + echo "{$lt}ftend{$gt}\n"; + + } else { + $subj = explode(',', $row['it_option_subject']); + for($k=0; $row2=sql_fetch_array($result2); $k++) { + $it_name = $row['it_name'].' '; + $opt = explode(chr(30), $row2['io_id']); + $sep = ''; + for($j=0; $j \ No newline at end of file diff --git a/shop/search.php b/shop/search.php new file mode 100644 index 000000000..3fe4c5762 --- /dev/null +++ b/shop/search.php @@ -0,0 +1,252 @@ +\'\"\\\'\\\"\%\=\(\)\s]/", "", $qsort); +} else { + $qsort = ''; +} +if (isset($_GET['qorder'])) { + $qorder = preg_match("/^(asc|desc)$/i", $qorder) ? $qorder : ''; +} else { + $qorder = ''; +} + +if(!($qname || $qexplan || $qid)) + $search_all = true; + +// 검색범위 checkbox 처리 +$qname_check = false; +$qexplan_check = false; +$qid_check = false; + +if($search_all) { + $qname_check = true; + $qexplan_check = true; + $qid_check = true; +} else { + if($qname) + $qname_check = true; + if($qexplan) + $qexplan_check = true; + if($qid) + $qid_check = true; +} + +if ($q) { + $arr = explode(" ", $q); + $detail_where = array(); + for ($i=0; $i검색 설정'; +} +?> + + +
    + + +
    +
    + + + +
    + 검색범위 + > + > + > +
    +
    + 상품가격 (원) + + ~ + + 까지 +
    +
    + + + +
    +

    + 상세검색을 선택하지 않거나, 상품가격을 입력하지 않으면 전체에서 검색합니다.
    + 검색어는 최대 30글자까지, 여러개의 검색어를 공백으로 구분하여 입력 할수 있습니다. +

    +
    + + + +
    + 검색 결과 건 +
    +
    + + + +
    + +
    + + + +
    + set_query(" select * $sql_common $sql_where {$order_by} limit $from_record, $items "); + $list->set_is_page(true); + $list->set_view('it_img', true); + $list->set_view('it_id', true); + $list->set_view('it_name', true); + $list->set_view('it_basic', true); + $list->set_view('it_cust_price', false); + $list->set_view('it_price', true); + $list->set_view('it_icon', true); + $list->set_view('sns', true); + echo $list->run(); + } + else + { + $i = 0; + $error = '

    '.$list_file.' 파일을 찾을 수 없습니다.
    관리자에게 알려주시면 감사하겠습니다.

    '; + } + + if ($i==0) + { + echo '
    '.$error.'
    '; + } + + $query_string = 'qname='.$qname.'&qexplan='.$qexplan.'&qid='.$qid; + if($qfrom && $qto) $query_string .= '&qfrom='.$qfrom.'&qto='.$qto; + $query_string .= '&qcaid='.$qcaid.'&q='.urlencode($q); + $query_string .='&qsort='.$qsort.'&qorder='.$qorder; + echo get_paging($config['cf_write_pages'], $page, $total_page, $_SERVER['SCRIPT_NAME'].'?'.$query_string.'&page='); + ?> +
    + + +
    + + + + + diff --git a/shop/settle_inicis.inc.php b/shop/settle_inicis.inc.php new file mode 100644 index 000000000..72fbb013d --- /dev/null +++ b/shop/settle_inicis.inc.php @@ -0,0 +1,111 @@ +SetField("inipayhome", G5_SHOP_PATH.'/inicis'); // 이니페이 홈디렉터리(상점수정 필요) +$inipay->SetField("debug", "false"); // 로그모드("true"로 설정하면 상세로그가 생성됨.) + +$inipay_nointerest = 'no'; //무이자여부(no:일반, yes:무이자) +$inipay_quotabase = '선택:일시불:2개월:3개월:4개월:5개월:6개월:7개월:8개월:9개월:10개월:11개월:12개월'; // 할부기간 + +$BANK_CODE = array( + '03' => '기업은행', + '04' => '국민은행', + '05' => '외환은행', + '07' => '수협중앙회', + '11' => '농협중앙회', + '20' => '우리은행', + '23' => 'SC 제일은행', + '31' => '대구은행', + '32' => '부산은행', + '34' => '광주은행', + '37' => '전북은행', + '39' => '경남은행', + '53' => '한국씨티은행', + '71' => '우체국', + '81' => '하나은행', + '88' => '신한은행', + 'D1' => '동양종합금융증권', + 'D2' => '현대증권', + 'D3' => '미래에셋증권', + 'D4' => '한국투자증권', + 'D5' => '우리투자증권', + 'D6' => '하이투자증권', + 'D7' => 'HMC 투자증권', + 'D8' => 'SK 증권', + 'D9' => '대신증권', + 'DA' => '하나대투증권', + 'DB' => '굿모닝신한증권', + 'DC' => '동부증권', + 'DD' => '유진투자증권', + 'DE' => '메리츠증권', + 'DF' => '신영증권' +); + +$CARD_CODE = array( + '01' => '외환', + '03' => '롯데', + '04' => '현대', + '06' => '국민', + '11' => 'BC', + '12' => '삼성', + '14' => '신한', + '15' => '한미', + '16' => 'NH', + '17' => '하나 SK', + '21' => '해외비자', + '22' => '해외마스터', + '23' => 'JCB', + '24' => '해외아멕스', + '25' => '해외다이너스' +); + +$PAY_METHOD = array( + 'VCard' => '신용카드', + 'Card' => '신용카드', + 'DirectBank' => '계좌이체', + 'HPP' => '휴대폰', + 'VBank' => '가상계좌' +); + +// 플러그인 호출 URL +if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') { + $ini_js_url = 'https://plugin.inicis.com/pay61_secunissl_cross.js'; +} else { + $ini_js_url = 'http://plugin.inicis.com/pay61_secuni_cross.js'; +} +?> \ No newline at end of file diff --git a/shop/settle_inicis_common.php b/shop/settle_inicis_common.php new file mode 100644 index 000000000..d4a12428f --- /dev/null +++ b/shop/settle_inicis_common.php @@ -0,0 +1,183 @@ + diff --git a/shop/settle_kcp.inc.php b/shop/settle_kcp.inc.php new file mode 100644 index 000000000..1473bcf6b --- /dev/null +++ b/shop/settle_kcp.inc.php @@ -0,0 +1,61 @@ + diff --git a/shop/settle_kcp_common.php b/shop/settle_kcp_common.php new file mode 100644 index 000000000..3394ef4cb --- /dev/null +++ b/shop/settle_kcp_common.php @@ -0,0 +1,268 @@ + + +
    \ No newline at end of file diff --git a/shop/settle_lg.inc.php b/shop/settle_lg.inc.php new file mode 100644 index 000000000..3c36b6daa --- /dev/null +++ b/shop/settle_lg.inc.php @@ -0,0 +1,50 @@ +config[$key] = $val; + } +} + +/* + * 1. 기본결제 인증요청 정보 변경 + * + * 기본정보를 변경하여 주시기 바랍니다.(파라미터 전달시 POST를 사용하세요) + */ +$CST_PLATFORM = $default['de_card_test'] ? 'test' : 'service'; //LG유플러스 결제 서비스 선택(test:테스트, service:서비스) +$CST_MID = 'si_'.$config['cf_lg_mid']; //상점아이디(LG유플러스으로 부터 발급받으신 상점아이디를 입력하세요) + //테스트 아이디는 't'를 반드시 제외하고 입력하세요. +$LGD_MID = (('test' == $CST_PLATFORM) ? 't' : '').$CST_MID; //상점아이디(자동생성) +$LGD_TIMESTAMP = date('YmdHis'); //타임스탬프 +$LGD_BUYERIP = $_SERVER['REMOTE_ADDR']; //구매자IP +$LGD_BUYERID = ''; //구매자ID +$LGD_CUSTOM_SKIN = 'red'; //상점정의 결제창 스킨 (red, purple, yellow) +$LGD_WINDOW_VER = '2.5'; //결제창 버젼정보 +$LGD_MERTKEY = ''; //상점MertKey(mertkey는 상점관리자 -> 계약정보 -> 상점정보관리에서 확인하실수 있습니다) + +// 결제가능 수단 +$useablepay = array(); +$LGD_CUSTOM_USABLEPAY = ''; +if($default['de_iche_use']) + $useablepay[] = 'SC0030'; +if($default['de_vbank_use']) + $useablepay[] = 'SC0040'; +if($default['de_card_use']) + $useablepay[] = 'SC0010'; +if($default['de_hp_use']) + $useablepay[] = 'SC0060'; +if(count($useablepay) > 0) + $LGD_CUSTOM_USABLEPAY = implode("-", $useablepay); + +$configPath = G5_LGXPAY_PATH.'/lgdacom'; //LG유플러스에서 제공한 환경파일("/conf/lgdacom.conf") 위치 지정. + +/* + * 가상계좌(무통장) 결제 연동을 하시는 경우 아래 LGD_CASNOTEURL 을 설정하여 주시기 바랍니다. + */ +$LGD_CASNOTEURL = G5_SHOP_URL.'/settle_lg_common.php'; +?> \ No newline at end of file diff --git a/shop/settle_lg_common.php b/shop/settle_lg_common.php new file mode 100644 index 000000000..dda641812 --- /dev/null +++ b/shop/settle_lg_common.php @@ -0,0 +1,178 @@ + diff --git a/shop/shop.head.php b/shop/shop.head.php new file mode 100644 index 000000000..7f63d2391 --- /dev/null +++ b/shop/shop.head.php @@ -0,0 +1,120 @@ + + + +
    +

    + + + + + + + +
    + + +
    +

    쇼핑몰 검색

    +
    + + + + + +
    + +
    + + +
    + +
    + +
    + + + +
    + + + + + + + + + + + + + + + +
    + + + +
    +
    + +
    + + + +
    + \ No newline at end of file diff --git a/shop/shop.tail.php b/shop/shop.tail.php new file mode 100644 index 000000000..4a9628e6c --- /dev/null +++ b/shop/shop.tail.php @@ -0,0 +1,61 @@ + + +
    + + + +
    + +
    +
    + + +

    + 회사명 + 주소
    + 사업자 등록번호 + 대표 + 전화 + 팩스
    + + 통신판매업신고번호 + 개인정보관리책임자 + + 부가통신사업신고번호 '.$default['de_admin_buga_no'].''; ?>
    + Copyright © 2001-2013 . All Rights Reserved. +

    + 상단으로 +
    +
    + + + + + + + diff --git a/shop/taxsave.php b/shop/taxsave.php new file mode 100644 index 000000000..d03832a90 --- /dev/null +++ b/shop/taxsave.php @@ -0,0 +1,51 @@ +개인결제 내역이 존재하지 않습니다.

    '); + + $goods_name = $od['pp_name'].'님 개인결제'; + $amt_tot = (int)$od['pp_receipt_price']; + $dir = $od['pp_pg']; + $od_name = $od['pp_name']; + $od_email = get_text($od['pp_email']); + $od_tel = get_text($od['pp_hp']); + + $amt_tot = (int)$od['pp_receipt_price']; + $amt_sup = (int)round(($amt_tot * 10) / 11); + $amt_svc = 0; + $amt_tax = (int)($amt_tot - $amt_sup); +} else { + $od = sql_fetch(" select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' "); + if (!$od) + die('

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

    '); + + $goods = get_goods($od['od_id']); + $goods_name = $goods['full_name']; + $amt_tot = (int)($od['od_receipt_price'] - $od['od_refund_price']); + $dir = $od['od_pg']; + $od_name = $od['od_name']; + $od_email = get_text($od['od_email']); + $od_tel = get_text($od['od_tel']); + + $amt_tot = (int)$od['od_tax_mny'] + (int)$od['od_vat_mny'] + (int)$od['od_free_mny']; + $amt_sup = (int)$od['od_tax_mny'] + (int)$od['od_free_mny']; + $amt_tax = (int)$od['od_vat_mny']; + $amt_svc = 0; +} + +$trad_time = date("YmdHis"); + +// 신청폼 +if(!$dir) + $dir = $default['de_pg_service']; + +include_once(G5_SHOP_PATH.'/'.$dir.'/taxsave_form.php'); + +include_once(G5_PATH.'/tail.sub.php'); +?> diff --git a/shop/wishlist.php b/shop/wishlist.php new file mode 100644 index 000000000..6491c76cd --- /dev/null +++ b/shop/wishlist.php @@ -0,0 +1,147 @@ + + + +
    + +
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + '; + ?> + + +
    선택이미지상품명보관일시삭제
    + + 품절 + + + + + + + + + + 삭제
    보관함이 비었습니다.
    +
    + +
    + + +
    +
    +
    + + + + + \ No newline at end of file diff --git a/shop/wishupdate.php b/shop/wishupdate.php new file mode 100644 index 000000000..ebea16926 --- /dev/null +++ b/shop/wishupdate.php @@ -0,0 +1,52 @@ + \ No newline at end of file diff --git a/skin/latest/shop_basic/img/icon_file.gif b/skin/latest/shop_basic/img/icon_file.gif new file mode 100644 index 000000000..cca47f566 Binary files /dev/null and b/skin/latest/shop_basic/img/icon_file.gif differ diff --git a/skin/latest/shop_basic/img/icon_hot.gif b/skin/latest/shop_basic/img/icon_hot.gif new file mode 100644 index 000000000..c95b839ae Binary files /dev/null and b/skin/latest/shop_basic/img/icon_hot.gif differ diff --git a/skin/latest/shop_basic/img/icon_img.gif b/skin/latest/shop_basic/img/icon_img.gif new file mode 100644 index 000000000..fefa10d4a Binary files /dev/null and b/skin/latest/shop_basic/img/icon_img.gif differ diff --git a/skin/latest/shop_basic/img/icon_link.gif b/skin/latest/shop_basic/img/icon_link.gif new file mode 100644 index 000000000..0f3cb1ac6 Binary files /dev/null and b/skin/latest/shop_basic/img/icon_link.gif differ diff --git a/skin/latest/shop_basic/img/icon_mobile.gif b/skin/latest/shop_basic/img/icon_mobile.gif new file mode 100644 index 000000000..ad934d23c Binary files /dev/null and b/skin/latest/shop_basic/img/icon_mobile.gif differ diff --git a/skin/latest/shop_basic/img/icon_more.gif b/skin/latest/shop_basic/img/icon_more.gif new file mode 100644 index 000000000..7cdf200a7 Binary files /dev/null and b/skin/latest/shop_basic/img/icon_more.gif differ diff --git a/skin/latest/shop_basic/img/icon_movie.gif b/skin/latest/shop_basic/img/icon_movie.gif new file mode 100644 index 000000000..cb958f83f Binary files /dev/null and b/skin/latest/shop_basic/img/icon_movie.gif differ diff --git a/skin/latest/shop_basic/img/icon_new.gif b/skin/latest/shop_basic/img/icon_new.gif new file mode 100644 index 000000000..45aa6d7ed Binary files /dev/null and b/skin/latest/shop_basic/img/icon_new.gif differ diff --git a/skin/latest/shop_basic/img/icon_reply.gif b/skin/latest/shop_basic/img/icon_reply.gif new file mode 100644 index 000000000..91c135977 Binary files /dev/null and b/skin/latest/shop_basic/img/icon_reply.gif differ diff --git a/skin/latest/shop_basic/img/icon_secret.gif b/skin/latest/shop_basic/img/icon_secret.gif new file mode 100644 index 000000000..c04899f14 Binary files /dev/null and b/skin/latest/shop_basic/img/icon_secret.gif differ diff --git a/skin/latest/shop_basic/img/icon_sound.gif b/skin/latest/shop_basic/img/icon_sound.gif new file mode 100644 index 000000000..c5188318a Binary files /dev/null and b/skin/latest/shop_basic/img/icon_sound.gif differ diff --git a/skin/latest/shop_basic/latest.skin.php b/skin/latest/shop_basic/latest.skin.php new file mode 100644 index 000000000..488aff5d2 --- /dev/null +++ b/skin/latest/shop_basic/latest.skin.php @@ -0,0 +1,42 @@ +', 0); +?> + +
    + +
      + +
    • + "; + if ($list[$i]['is_notice']) + echo "".$list[$i]['subject'].""; + else + echo $list[$i]['subject']; + + if ($list[$i]['comment_cnt']) + echo $list[$i]['comment_cnt']; + + echo ""; + + // if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; } + // if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; } + + if (isset($list[$i]['icon_new'])) echo " " . $list[$i]['icon_new']; + if (isset($list[$i]['icon_hot'])) echo " " . $list[$i]['icon_hot']; + if (isset($list[$i]['icon_file'])) echo " " . $list[$i]['icon_file']; + if (isset($list[$i]['icon_link'])) echo " " . $list[$i]['icon_link']; + if (isset($list[$i]['icon_secret'])) echo " " . $list[$i]['icon_secret']; + ?> +
    • + + +
    • 게시물이 없습니다.
    • + +
    + +
    diff --git a/skin/latest/shop_basic/style.css b/skin/latest/shop_basic/style.css new file mode 100644 index 000000000..37733b28d --- /dev/null +++ b/skin/latest/shop_basic/style.css @@ -0,0 +1,6 @@ +/* 새글 스킨 (latest) */ +.lat {position:relative;margin-bottom:20px;padding-bottom:10px;border-bottom:1px solid #f0f0f0} +.lat ul {margin:0 0 10px;padding:0;list-style:none} +.lat li {padding:3px 0} +.lat_title {display:block;padding:10px 0 8px} +.lat_more {position:absolute;top:10px;right:0} \ No newline at end of file diff --git a/skin/member/basic/login.skin.php b/skin/member/basic/login.skin.php index 86772c70d..0051fbaa0 100644 --- a/skin/member/basic/login.skin.php +++ b/skin/member/basic/login.skin.php @@ -35,12 +35,79 @@ add_stylesheet('', + + + + + + + + +
    +

    비회원 구매

    + +

    + 비회원으로 주문하시는 경우 포인트는 지급하지 않습니다. +

    + +
    + +
    + + + + + + + +
    + + + +
    + 비회원 주문조회 + +
    + + + + + + + +
    +
    + +
    +

    비회원 주문조회 안내

    +

    메일로 발송해드린 주문서의 주문번호 및 주문 시 입력하신 비밀번호를 정확히 입력해주십시오.

    +
    + + + + + + - - + diff --git a/skin/outlogin/shop_basic/outlogin.skin.2.php b/skin/outlogin/shop_basic/outlogin.skin.2.php new file mode 100644 index 000000000..71f4cdab1 --- /dev/null +++ b/skin/outlogin/shop_basic/outlogin.skin.2.php @@ -0,0 +1,46 @@ +', 0); +?> + + +
    +
    +

    나의 회원정보

    + 님 + 관리자 모드 +
    + + +
    + + + diff --git a/skin/outlogin/shop_basic/style.css b/skin/outlogin/shop_basic/style.css new file mode 100644 index 000000000..02b657799 --- /dev/null +++ b/skin/outlogin/shop_basic/style.css @@ -0,0 +1,38 @@ +/* 아웃로그인 스킨 */ +.ol {position:relative;margin:0 0 5px;width:150px} +.ol h2 {margin:0;padding:0;width:1px;height:1px;font-size:0;line-height:0;overflow:hidden} +.ol ul {margin:0;padding:0;list-style:none} + +#ol_before {} +#ol_before fieldset {position:relative} +#ol_id {display:block;margin:0 0 5px !important;margin:0 0 3px;padding:0 5px;width:138px;height:22px;border:1px solid #b8c9c2;background:#f7f7f7;line-height:1.6em} +.ol_idlabel {position:absolute;top:6px;left:5px;color:#626870;font-size:0.95em} +#ol_pw {display:block;margin:0 0 5px !important;margin:0 0 3px;padding:0 5px;width:138px;height:22px;border:1px solid #b8c9c2;background:#f7f7f7;vertical-align:top;line-height:1.6em} +.ol_pwlabel {position:absolute;top:35px;left:5px;color:#626870;font-size:0.95em} +#auto_login {} +#auto_login_label {letter-spacing:-0.1em} +#ol_submit {display:inline-block;margin:0 0 4px;width:150px;height:24px;border:0;background:#626870;color:#fff;font-size:0.9em;font-weight:bold} +#ol_before ul {float:right;margin:7px 0 13px;zoom:1} +#ol_before ul:after {display:block;visibility:hidden;clear:both;content:""} +#ol_before li {float:left;margin-left:5px;padding-top:2px} +#ol_before a {letter-spacing:-0.1em} +#ol_svc {margin:0 0 5px} +#ol_svc a {display:inline-block;padding:5px 0;width:71px;border:1px solid #e9e9e9;background:#faf9f5;text-align:center;text-decoration:none} +#ol_auto {margin:0 0 5px;padding:2px 0 5px;text-align:right} + +#ol_after {} +#ol_after_hd {margin:0 0 5px} +#ol_after_hd .btn_admin {display:block;margin-top:5px;text-align:center} +#ol_after_private {margin:0 0 5px;zoom:1} +#ol_after_private:after {display:block;visibility:hidden;clear:both;content:""} +#ol_after_private li {margin:0 0 1px} +#ol_after_private a {display:block;position:relative;padding:6px 8px 5px;background:#f7f7f7} +#ol_after_private a strong {position:absolute;top:6px;right:8px;color:#000;font-weight:normal} +#ol_after_private a:focus, +#ol_after_private a:hover {background:#626870;color:#fff;text-decoration:none} +#ol_after_private a:focus strong, +#ol_after_private a:hover strong {color:#fff;text-decoration:none} +#ol_after_ft {text-align:justify} +#ol_after_ft a {display:inline-block;padding:4px 0 3px;width:73px;background:#626870;color:#fff;text-align:center} +#ol_after_ft a:focus, +#ol_after_ft a:hover {text-decoration:none !important} \ No newline at end of file diff --git a/skin/poll/shop_basic/poll.skin.php b/skin/poll/shop_basic/poll.skin.php new file mode 100644 index 000000000..9c188f7e8 --- /dev/null +++ b/skin/poll/shop_basic/poll.skin.php @@ -0,0 +1,67 @@ +', 0); +?> + + +
    + + +
    +
    +

    설문조사

    + 설문조사 관리 +

    +
    +
      + +
    • + +
    + +
    +
    + + + \ No newline at end of file diff --git a/skin/poll/shop_basic/poll_result.skin.php b/skin/poll/shop_basic/poll_result.skin.php new file mode 100644 index 000000000..77699d7a9 --- /dev/null +++ b/skin/poll/shop_basic/poll_result.skin.php @@ -0,0 +1,131 @@ +', 0); +?> + + +
    +

    + + +
    +

    결과

    + +
    +
    전체 표
    +
    +
      + +
    1. +

      + + 표 + 퍼센트 +

      +
      + +
      +
    2. + +
    +
    +
    +
    + + + + +
    +

    이 설문에 대한 기타의견

    + + +
    +
    +

    님의 의견

    + + +
    +

    + +

    +
    + "; } ?> +
    +
    + + + = $po['po_level']) { ?> +
    + + + + +

    + +
    + + + + + + + + + + + + + + + + + + + +
    자동등록방지
    +
    + +
    + +
    +
    + + +
    + + + + + + + +
    + +
    +
    + + + \ No newline at end of file diff --git a/skin/poll/shop_basic/style.css b/skin/poll/shop_basic/style.css new file mode 100644 index 000000000..e21f4fc12 --- /dev/null +++ b/skin/poll/shop_basic/style.css @@ -0,0 +1,91 @@ +@charset "utf-8"; +/* SIR 지운아빠 */ + +/* ### 기본 스타일 커스터마이징 시작 ### */ + +#poll a.btn_admin {} /* 관리자 전용 버튼 */ +#poll a.btn_admin:focus, #poll a.btn_admin:hover {} + +#poll_result .tbl_frm table {} +#poll_result .tbl_frm .frm_info {} +#poll_result .tbl_frm .frm_address {} +#poll_result .tbl_frm .frm_file {} +#poll_result .tbl_frm caption {} + +#poll_result .tbl_frm01 {} +#poll_result .tbl_frm01 th {} +#poll_result .tbl_frm01 td {} +#poll_result .tbl_frm01 textarea, #poll_result tbl_frm01 .frm_input {} +#poll_result .tbl_frm01 textarea {} +/* +#poll_result .tbl_frm01 #captcha {} +#poll_result .tbl_frm01 #captcha input {} +*/ +#poll_result .tbl_frm01 a {} + +/* 필수입력 */ +#poll_result .required, #poll_result textarea.required {} + +#poll_result .btn_confirm {} /* 서식단계 진행 */ +#poll_result .btn_submit {} +#poll_result button.btn_submit {} +#poll_result .win_btn {} /* 새창용 */ +#poll_result .win_btn button {} +#poll_result .win_btn input {} +#poll_result .win_btn a {} +#poll_result .win_btn a:focus, #poll_result .win_btn a:hover {} + +/* ### 기본 스타일 커스터마이징 끝 ### */ + +/* 설문조사 스킨 */ +#poll {margin:0 0 20px} +#poll header {position:relative} +#poll h2 {} +#poll header .btn_admin {margin-top:5px;padding:8px 0;width:100%;text-align:center} +#poll header p {padding:5px 0 0} +#poll ul {margin:0 0 10px;padding:5px 0;list-style:none} +#poll li {padding:3px 0} +#poll footer {text-align:right} +#poll footer input {width:80px;height:24px;border:0;background:#333;color:#fff;letter-spacing:-0.1em;vertical-align:top;cursor:pointer} +#poll footer a {display:inline-block;width:86px;height:22px;border:1px solid #ccc;background:#fafafa;text-align:center;line-height:2em} +#poll footer a:focus, +#poll footer a:hover {text-decoration:none !important} + +/* 설문조사 결과 (새창) */ +#poll_result {} +#poll_result section {margin:0 20px 20px;padding:15px;border:1px solid #dde4e9;background:#fff} +#poll_result .tbl_wrap {margin:0} +#poll_result h2 {margin:0;padding:20px 0} +#poll_result a {} +#poll_result .sv_member, +#poll_result .sv_guest {font-weight:bold} +#poll_result_list {margin:0 auto 20px} +#poll_result_list h2 {text-align:center} +#poll_result_list dl, +#poll_result_list dt, +#poll_result_list dd {margin:0;padding:0} +#poll_result_list dl {padding-bottom:30px} +#poll_result_list dt {margin-right:5%;color:#e8180d;text-align:right} +#poll_result_list ol {margin:0;padding-left:30px} +#poll_result_list li {margin-top:10px} +#poll_result_list p {position:relative;margin:0;padding:5px 0} +#poll_result_list p strong {position:absolute;top:5px;right:5%;padding-right:80px;width:100px;text-align:right} +#poll_result_list p span {position:absolute;top:5px;right:5%;width:80px;color:#68999c;text-align:right} +.poll_result_graph {position:relative;margin-right:5%;height:5px;background:#eee} +.poll_result_graph span {position:absolute;top:0;left:0;height:5px;background:#565e60;font-size:0.1em} +#poll_result_cmt {} +#poll_result_cmt h2 {text-align:center} +#poll_result_cmt h3 {margin:0 0 10px} +#poll_result_cmt article {margin:0 0 15px;border-bottom:1px solid #eee} +#poll_result_cmt h1 {position:absolute;margin:0;padding:0;border:0;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +.poll_datetime {display:inline-block;margin-left:10px} +#poll_result_cmt p {padding:3px 0} +#poll_result_cmt fieldset {margin-bottom:0;text-align:left} +#poll_result_cmt fieldset p {margin:0 0 15px;padding:3px 0 0px;text-align:left} +#poll_result_cmt footer {text-align:right} +#poll_result_wcmt {margin:0 0 10px} +.poll_cmt_del a {display:inline-block;padding-bottom:10px} +#poll_result_oth {margin:0 auto 20px;width:93%} +#poll_result_oth h2 {padding:0 0 10px} +#poll_result_oth ul {margin:0;padding:0;list-style:none} +#poll_result_oth a {display:block;padding:10px 0;border-bottom:1px solid #eee} \ No newline at end of file diff --git a/skin/shop/basic/boxbanner.skin.php b/skin/shop/basic/boxbanner.skin.php new file mode 100644 index 000000000..940fda89b --- /dev/null +++ b/skin/shop/basic/boxbanner.skin.php @@ -0,0 +1,37 @@ +', 0); +?> + +

    쇼핑몰 배너

    '.PHP_EOL; +?> \ No newline at end of file diff --git a/skin/shop/basic/boxcart.skin.php b/skin/shop/basic/boxcart.skin.php new file mode 100644 index 000000000..d25b0d18d --- /dev/null +++ b/skin/shop/basic/boxcart.skin.php @@ -0,0 +1,34 @@ +', 0); +?> + + + + + diff --git a/skin/shop/basic/boxcategory.skin.php b/skin/shop/basic/boxcategory.skin.php new file mode 100644 index 000000000..78511a122 --- /dev/null +++ b/skin/shop/basic/boxcategory.skin.php @@ -0,0 +1,40 @@ +', 0); +?> + + + + \ No newline at end of file diff --git a/skin/shop/basic/boxcommunity.skin.php b/skin/shop/basic/boxcommunity.skin.php new file mode 100644 index 000000000..33cbdf1c0 --- /dev/null +++ b/skin/shop/basic/boxcommunity.skin.php @@ -0,0 +1,28 @@ +', 0); +?> + + + + \ No newline at end of file diff --git a/skin/shop/basic/boxevent.skin.php b/skin/shop/basic/boxevent.skin.php new file mode 100644 index 000000000..46bdb52aa --- /dev/null +++ b/skin/shop/basic/boxevent.skin.php @@ -0,0 +1,43 @@ +', 0); +?> + + + + \ No newline at end of file diff --git a/skin/shop/basic/boxtodayview.skin.php b/skin/shop/basic/boxtodayview.skin.php new file mode 100644 index 000000000..2e3b881ea --- /dev/null +++ b/skin/shop/basic/boxtodayview.skin.php @@ -0,0 +1,111 @@ +', 0); +?> + + + + + + \ No newline at end of file diff --git a/skin/shop/basic/boxwish.skin.php b/skin/shop/basic/boxwish.skin.php new file mode 100644 index 000000000..9bbbafe66 --- /dev/null +++ b/skin/shop/basic/boxwish.skin.php @@ -0,0 +1,33 @@ +', 0); +?> + + + + diff --git a/skin/shop/basic/img/gnb_bg00.gif b/skin/shop/basic/img/gnb_bg00.gif new file mode 100644 index 000000000..b61236269 Binary files /dev/null and b/skin/shop/basic/img/gnb_bg00.gif differ diff --git a/skin/shop/basic/img/gnb_bg01.gif b/skin/shop/basic/img/gnb_bg01.gif new file mode 100644 index 000000000..cbae7886f Binary files /dev/null and b/skin/shop/basic/img/gnb_bg01.gif differ diff --git a/skin/shop/basic/img/icon_arw_toleft.gif b/skin/shop/basic/img/icon_arw_toleft.gif new file mode 100644 index 000000000..a9d338b5e Binary files /dev/null and b/skin/shop/basic/img/icon_arw_toleft.gif differ diff --git a/skin/shop/basic/img/icon_secret.gif b/skin/shop/basic/img/icon_secret.gif new file mode 100644 index 000000000..c04899f14 Binary files /dev/null and b/skin/shop/basic/img/icon_secret.gif differ diff --git a/skin/shop/basic/img/is_button.gif b/skin/shop/basic/img/is_button.gif new file mode 100644 index 000000000..15f3c87aa Binary files /dev/null and b/skin/shop/basic/img/is_button.gif differ diff --git a/skin/shop/basic/img/personal.jpg b/skin/shop/basic/img/personal.jpg new file mode 100644 index 000000000..ad0cc8312 Binary files /dev/null and b/skin/shop/basic/img/personal.jpg differ diff --git a/skin/shop/basic/img/sbn_btn.png b/skin/shop/basic/img/sbn_btn.png new file mode 100644 index 000000000..ebd38ec94 Binary files /dev/null and b/skin/shop/basic/img/sbn_btn.png differ diff --git a/skin/shop/basic/img/sct_bg_toright.gif b/skin/shop/basic/img/sct_bg_toright.gif new file mode 100644 index 000000000..0d180544f Binary files /dev/null and b/skin/shop/basic/img/sct_bg_toright.gif differ diff --git a/skin/shop/basic/img/sns_fb_s.png b/skin/shop/basic/img/sns_fb_s.png new file mode 100644 index 000000000..1ce297731 Binary files /dev/null and b/skin/shop/basic/img/sns_fb_s.png differ diff --git a/skin/shop/basic/img/sns_goo_s.png b/skin/shop/basic/img/sns_goo_s.png new file mode 100644 index 000000000..74235887d Binary files /dev/null and b/skin/shop/basic/img/sns_goo_s.png differ diff --git a/skin/shop/basic/img/sns_kakao_s.png b/skin/shop/basic/img/sns_kakao_s.png new file mode 100644 index 000000000..838b9697e Binary files /dev/null and b/skin/shop/basic/img/sns_kakao_s.png differ diff --git a/skin/shop/basic/img/sns_twt_s.png b/skin/shop/basic/img/sns_twt_s.png new file mode 100644 index 000000000..53f691a62 Binary files /dev/null and b/skin/shop/basic/img/sns_twt_s.png differ diff --git a/skin/shop/basic/item.form.skin.php b/skin/shop/basic/item.form.skin.php new file mode 100644 index 000000000..fd0de6be6 --- /dev/null +++ b/skin/shop/basic/item.form.skin.php @@ -0,0 +1,448 @@ +', 0); +?> + +
    + + + + +
    + +
    +
    + '.$img.''; + } + } + + if($big_img_count == 0) { + echo ''; + } + ?> +
    + 0) { + echo ''; + } + ?> +
    + + + +
    +

    요약정보 및 구매

    +

    + +

    + 상품 선택옵션 개, 추가옵션 개 +

    + +
    + + 고객평점 별개 + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ + ?> + + + + + + + + 배송비결제'; + $sc_method = ''; + } + else + $sc_method = '주문시 결제'; + } + ?> + + + + + + + + + + + + + + + + + +
    제조사
    원산지
    브랜드
    모델
    판매가격판매중지
    판매가격전화문의
    시중가격
    판매가격 + + +
    재고수량 개
    포인트 + +
    최소구매수량 개
    최대구매수량 개
    + + + +
    +

    선택옵션

    + + + + + + + + +
    +
    + + + + + +
    +

    추가옵션

    + + + + + + + + +
    +
    + + + + + +
    +

    선택된 옵션

    + +
      +
    • + + + + + + + (+0원) +
      + + + + +
      +
    • +
    + + +
    + + + +
    + + + +

    상품의 재고가 부족하여 구매할 수 없습니다.

    + + + + + +
    + + + +
    + 이 분류에 등록된 다른 상품이 없습니다.'; + } + ?> +
    + +
    + +
    + + + \ No newline at end of file diff --git a/skin/shop/basic/item.info.skin.php b/skin/shop/basic/item.info.skin.php new file mode 100644 index 000000000..c2e914e95 --- /dev/null +++ b/skin/shop/basic/item.info.skin.php @@ -0,0 +1,136 @@ +', 0); +?> + + + + +
    +

    상품 정보

    + + + +

    상품 기본설명

    +
    + +
    + + + +

    상품 상세설명

    +
    + +
    + + + + +

    상품 정보 고시

    + + + + + + + $val) { + $ii_title = $info_array[$key][0]; + $ii_value = $val; + ?> + + + + + + +
    + + 상품 정보 고시 정보가 올바르게 저장되지 않았습니다.
    config.php 파일의 G5_ESCAPE_FUNCTION 설정을 addslashes 로
    변경하신 후 관리자 > 상품정보 수정에서 상품 정보를 다시 저장해주세요.

    '; + } + } + } //if + ?> + +
    + + + +
    +

    사용후기

    + + +
    +
    + + + +
    +

    상품문의

    + + +
    +
    + + + + +
    +

    배송정보

    + + + +
    + + + + + + +
    +

    교환/반품

    + + + +
    + + + + + +
    +

    관련상품

    + + +
    + set_query($sql); + echo $list->run(); + ?> +
    +
    + + + + \ No newline at end of file diff --git a/skin/shop/basic/itemqa.skin.php b/skin/shop/basic/itemqa.skin.php new file mode 100644 index 000000000..6b661e8bd --- /dev/null +++ b/skin/shop/basic/itemqa.skin.php @@ -0,0 +1,148 @@ +', 0); +?> + + + + +
    +

    등록된 상품문의

    + + '; + + if($is_admin || $member['mb_id' ] == $row['mb_id']) { + $iq_question = get_view_thumbnail(conv_content($row['iq_question'], 1), $thumbnail_width); + } else { + $iq_question = '비밀글로 보호된 문의입니다.'; + $is_secret = true; + } + } else { + $iq_question = get_view_thumbnail(conv_content($row['iq_question'], 1), $thumbnail_width); + } + $iq_time = substr($row['iq_time'], 2, 8); + + $hash = md5($row['iq_id'].$row['iq_time'].$row['iq_ip']); + + $iq_stats = ''; + $iq_style = ''; + $iq_answer = ''; + + if ($row['iq_answer']) + { + $iq_answer = get_view_thumbnail(conv_content($row['iq_answer'], 1), $thumbnail_width); + $iq_stats = '답변완료'; + $iq_style = 'sit_qaa_done'; + $is_answer = true; + } else { + $iq_stats = '답변전'; + $iq_style = 'sit_qaa_yet'; + $iq_answer = '답변이 등록되지 않았습니다.'; + $is_answer = false; + } + + if ($i == 0) echo '
      '; + ?> + +
    1. + +
      +
      작성자
      +
      +
      작성일
      +
      +
      상태
      +
      +
      + +
      +
      +
      + 문의내용
      + +
      + +
      + 답변
      + +
      + +
      + + + + +
      +
    2. + + 0) echo '
    '; + + if (!$i) echo '

    상품문의가 없습니다.

    '; + ?> +
    + + + + + + + \ No newline at end of file diff --git a/skin/shop/basic/itemqaform.skin.php b/skin/shop/basic/itemqaform.skin.php new file mode 100644 index 000000000..4662f3e52 --- /dev/null +++ b/skin/shop/basic/itemqaform.skin.php @@ -0,0 +1,66 @@ +', 0); +?> + + +
    +

    상품문의 쓰기

    + +
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    옵션 + > + +
    이메일을 입력하시면 답변 등록 시 답변이 이메일로 전송됩니다.
    휴대폰번호를 입력하시면 답변 등록 시 답변등록 알림이 SMS로 전송됩니다.
    +
    + +
    + + +
    +
    +
    + + + \ No newline at end of file diff --git a/skin/shop/basic/itemqalist.skin.php b/skin/shop/basic/itemqalist.skin.php new file mode 100644 index 000000000..a52433da1 --- /dev/null +++ b/skin/shop/basic/itemqalist.skin.php @@ -0,0 +1,146 @@ +', 0); +?> + + + + + +
    +
    + 전체보기 + + + + + + +
    +
    + +
    + + + + '; + + if($is_admin || $member['mb_id' ] == $row['mb_id']) { + $iq_question = get_view_thumbnail(conv_content($row['iq_question'], 1), $thumbnail_width); + } else { + $iq_question = '비밀글로 보호된 문의입니다.'; + $is_secret = true; + } + } else { + $iq_question = get_view_thumbnail(conv_content($row['iq_question'], 1), $thumbnail_width); + } + + $it_href = G5_SHOP_URL.'/item.php?it_id='.$row['it_id']; + + if ($row['iq_answer']) + { + $iq_answer = get_view_thumbnail(conv_content($row['iq_answer'], 1), $thumbnail_width); + $iq_stats = '답변완료'; + $iq_style = 'sit_qaa_done'; + $is_answer = true; + } else { + $iq_stats = '답변전'; + $iq_style = 'sit_qaa_yet'; + $iq_answer = '답변이 등록되지 않았습니다.'; + $is_answer = false; + } + + if ($i == 0) echo '
      '; + ?> +
    1. + + + +
      +

      + +
      +
      작성자
      +
      +
      작성일
      +
      +
      상태
      +
      +
      + + + +
      +
      + +
    2. + 0) echo '
    '; + if ($i == 0) echo '

    자료가 없습니다.

    '; + ?> +
    + + + + + \ No newline at end of file diff --git a/skin/shop/basic/itemuse.skin.php b/skin/shop/basic/itemuse.skin.php new file mode 100644 index 000000000..320445065 --- /dev/null +++ b/skin/shop/basic/itemuse.skin.php @@ -0,0 +1,110 @@ +', 0); +?> + + + + +
    +

    등록된 사용후기

    + + '; + ?> + +
  • + +
    +
    작성자
    +
    +
    작성일
    +
    +
    평점
    +
    별<?php echo $is_star; ?>개
    +
    + + +
  • + + 0) echo ''; + + if (!$i) echo '

    사용후기가 없습니다.

    '; + ?> +
    + + + + + + + \ No newline at end of file diff --git a/skin/shop/basic/itemuseform.skin.php b/skin/shop/basic/itemuseform.skin.php new file mode 100644 index 000000000..2fa187a7f --- /dev/null +++ b/skin/shop/basic/itemuseform.skin.php @@ -0,0 +1,84 @@ +', 0); +?> + + +
    +

    사용후기 쓰기

    + +
    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    평점 +
      +
    • + > + + +
    • +
    • + > + + +
    • +
    • + > + + +
    • +
    • + > + + +
    • +
    • + > + + +
    • +
    +
    +
    + +
    + + +
    + +
    +
    + + + \ No newline at end of file diff --git a/skin/shop/basic/itemuselist.skin.php b/skin/shop/basic/itemuselist.skin.php new file mode 100644 index 000000000..92c3da8cc --- /dev/null +++ b/skin/shop/basic/itemuselist.skin.php @@ -0,0 +1,108 @@ +', 0); +?> + + + + +
    +
    + 전체보기 + + + + + +
    +
    + +
    + + + + '; + ?> +
  • + + + +
    +

    + +
    +
    작성자
    +
    +
    작성일
    +
    +
    평가점수
    +
    별<?php echo $star; ?>개
    +
    + + + +
    +
    + +
  • + 0) echo ''; + if ($i == 0) echo '

    자료가 없습니다.

    '; + ?> +
    + + + + + \ No newline at end of file diff --git a/skin/shop/basic/largeimage.skin.php b/skin/shop/basic/largeimage.skin.php new file mode 100644 index 000000000..9d0574942 --- /dev/null +++ b/skin/shop/basic/largeimage.skin.php @@ -0,0 +1,71 @@ +', 0); +?> + +
    +

    상품 이미지 새창 보기

    + +
    + + + + <?php echo $row['it_name']; ?> + + + +
    + + 0) { + echo '
      '; + foreach($thumbnails as $key=>$val) { + echo '
    • '.$val.'
    • '; + } + echo '
    '; + } + ?> + +
    + +
    +
    + + \ No newline at end of file diff --git a/skin/shop/basic/list.10.skin.php b/skin/shop/basic/list.10.skin.php new file mode 100644 index 000000000..b14556fdb --- /dev/null +++ b/skin/shop/basic/list.10.skin.php @@ -0,0 +1,99 @@ +', 0); +?> + + +list_mod >= 2) { // 1줄 이미지 : 2개 이상 + if ($i%$this->list_mod == 0) $sct_last = ' sct_last'; // 줄 마지막 + else if ($i%$this->list_mod == 1) $sct_last = ' sct_clear'; // 줄 첫번째 + else $sct_last = ''; + } else { // 1줄 이미지 : 1개 + $sct_last = ' sct_clear'; + } + + if ($i == 1) { + if ($this->css) { + echo "
      css}\">\n"; + } else { + echo "\n"; + +if($i == 1) echo "

      등록된 상품이 없습니다.

      \n"; +?> + \ No newline at end of file diff --git a/skin/shop/basic/list.20.skin.php b/skin/shop/basic/list.20.skin.php new file mode 100644 index 000000000..fe2d98d7a --- /dev/null +++ b/skin/shop/basic/list.20.skin.php @@ -0,0 +1,98 @@ +', 0); +?> + + +list_mod >= 2) { // 1줄 이미지 : 2개 이상 + if ($i%$this->list_mod == 0) $sct_last = ' sct_last'; // 줄 마지막 + else if ($i%$this->list_mod == 1) $sct_last = ' sct_clear'; // 줄 첫번째 + else $sct_last = ''; + } else { // 1줄 이미지 : 1개 + $sct_last = ' sct_clear'; + } + + if ($i == 1) { + if ($this->css) { + echo "
        css}\">\n"; + } else { + echo "\n"; + +if($i == 1) echo "

        등록된 상품이 없습니다.

        \n"; +?> + \ No newline at end of file diff --git a/skin/shop/basic/list.30.skin.php b/skin/shop/basic/list.30.skin.php new file mode 100644 index 000000000..c5d65f32e --- /dev/null +++ b/skin/shop/basic/list.30.skin.php @@ -0,0 +1,110 @@ +', 0); +?> + + += 2) { // 1줄 이미지 : 2개 이상 + if ($i%$list_mod == 0) $sct_last = ' sct_last'; // 줄 마지막 + else if ($i%$list_mod == 1) $sct_last = ' sct_clear'; // 줄 첫번째 + else $sct_last = ''; + } else { // 1줄 이미지 : 1개 + $sct_last = ' sct_clear'; + } + + if ($i == 1) { + if ($this->css) { + echo "
          css}\">\n"; + } else { + echo "\n"; + +if($i == 1) echo "

          등록된 상품이 없습니다.

          \n"; +?> + \ No newline at end of file diff --git a/skin/shop/basic/list.40.skin.php b/skin/shop/basic/list.40.skin.php new file mode 100644 index 000000000..46678c4d9 --- /dev/null +++ b/skin/shop/basic/list.40.skin.php @@ -0,0 +1,112 @@ +', 0); + +// 관련상품 스킨은 사품을 한줄에 하나만 표시하며 해당 상품에 관련상품이 등록되어 있는 경우 기본으로 7개까지 노출합니다. +?> + + += 2) { // 1줄 이미지 : 2개 이상 + if ($i%$list_mod == 0) $sct_last = ' sct_last'; // 줄 마지막 + else if ($i%$list_mod == 1) $sct_last = ' sct_clear'; // 줄 첫번째 + else $sct_last = ''; + } else { // 1줄 이미지 : 1개 + $sct_last = ' sct_clear'; + } + + if ($i == 1) { + if ($this->css) { + echo "
            css}\">\n"; + } else { + echo "
              \n"; + } + } + + $list_top_pad = 20; + $list_right_pad = 10; + $list_bottom_pad = 20; + $list_left_pad = $this->img_width + 10; + $list_real_width = 740; + $list_width = $list_real_width - $list_right_pad - $list_left_pad; + $list_height = $this->img_height - $list_top_pad - $list_bottom_pad; + + echo "
            • \n"; + + if ($this->href) { + echo "\n"; + } + + if ($this->view_it_icon) { + echo "
              ".item_icon($row)."
              \n"; + } + + if ($this->view_it_id) { + echo "
              <".stripslashes($row['it_id']).">
              \n"; + } + + if ($this->href) { + echo "\n"; + } + + if ($this->view_it_basic && $row['it_basic']) { + echo "
              ".stripslashes($row['it_basic'])."
              \n"; + } + + if ($this->view_it_cust_price || $this->view_it_price) { + + echo "
              \n"; + + if ($this->view_it_cust_price && $row['it_cust_price']) { + echo "".display_price($row['it_cust_price'])."\n"; + } + + if ($this->view_it_price) { + echo display_price(get_price($row), $row['it_tel_inq'])."\n"; + } + + echo "
              \n"; + + } + + if ($this->view_sns) { + $sns_url = G5_SHOP_URL.'/item.php?it_id='.$row['it_id']; + $sns_title = get_text($row['it_name']).' | '.get_text($config['cf_title']); + echo "
              "; + echo get_sns_share_link('facebook', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/sns_fb_s.png'); + echo get_sns_share_link('twitter', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/sns_twt_s.png'); + echo get_sns_share_link('googleplus', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/sns_goo_s.png'); + echo "
              \n"; + } + + // 관련상품 + echo "
              ".relation_item($row['it_id'], 70, 0, 5)."
              \n"; + + echo "
            • \n"; +} + +if ($i > 1) echo "
            \n"; + +if($i == 1) echo "

            등록된 상품이 없습니다.

            \n"; +?> + diff --git a/skin/shop/basic/list.sort.skin.php b/skin/shop/basic/list.sort.skin.php new file mode 100644 index 000000000..4643d2d4e --- /dev/null +++ b/skin/shop/basic/list.sort.skin.php @@ -0,0 +1,41 @@ +', 0); +?> + + +
            +

            상품 정렬

            + + + + +
            + \ No newline at end of file diff --git a/skin/shop/basic/list.sub.skin.php b/skin/shop/basic/list.sub.skin.php new file mode 100644 index 000000000..13efb960d --- /dev/null +++ b/skin/shop/basic/list.sub.skin.php @@ -0,0 +1,11 @@ +', 0); +?> + +
              +
            • +
            • +
            \ No newline at end of file diff --git a/skin/shop/basic/listcategory.skin.php b/skin/shop/basic/listcategory.skin.php new file mode 100644 index 000000000..fe4c439bf --- /dev/null +++ b/skin/shop/basic/listcategory.skin.php @@ -0,0 +1,36 @@ +'.$row['ca_name'].' ('.$row2['cnt'].')'; + $exists = true; +} + +if ($exists) { + + // add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨 + add_stylesheet('', 0); +?> + + + + + + \ No newline at end of file diff --git a/skin/shop/basic/listcategory2.skin.php b/skin/shop/basic/listcategory2.skin.php new file mode 100644 index 000000000..b8ce25b50 --- /dev/null +++ b/skin/shop/basic/listcategory2.skin.php @@ -0,0 +1,66 @@ +'; + if ($cnt) { + $str .= ''.$row['ca_name'].''; + $sql2 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id like '{$row['ca_id']}%' and ca_use = '1' and length(ca_id) = $len4 order by ca_order, ca_id "; + $result2 = sql_query($sql2); + $k=0; + while ($row2=sql_fetch_array($result2)) { + $str .= ''.$row2['ca_name'].''; + $k++; + } + } else { + $str .= ''.$row['ca_name'].''; + } + $str .= ''; + $exists = true; + } +} + + +if ($exists) { + + // add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨 + add_stylesheet('', 0); +?> + + + + + + \ No newline at end of file diff --git a/skin/shop/basic/listcategory3.skin.php b/skin/shop/basic/listcategory3.skin.php new file mode 100644 index 000000000..7f9fe3d4d --- /dev/null +++ b/skin/shop/basic/listcategory3.skin.php @@ -0,0 +1,35 @@ +'.$row['ca_name'].''; + $exists = true; +} + +if ($exists) { + + // add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨 + add_stylesheet('', 0); +?> + + + + + + \ No newline at end of file diff --git a/skin/shop/basic/main.10.skin.php b/skin/shop/basic/main.10.skin.php new file mode 100644 index 000000000..1e5985d8a --- /dev/null +++ b/skin/shop/basic/main.10.skin.php @@ -0,0 +1,99 @@ +', 0); +?> + + +list_mod >= 2) { // 1줄 이미지 : 2개 이상 + if ($i%$this->list_mod == 0) $sct_last = 'sct_last'; // 줄 마지막 + else if ($i%$this->list_mod == 1) $sct_last = 'sct_clear'; // 줄 첫번째 + else $sct_last = ''; + } else { // 1줄 이미지 : 1개 + $sct_last = 'sct_clear'; + } + + if ($i == 1) { + if ($this->css) { + echo "
              css}\">\n"; + } else { + echo "\n"; + +if($i == 1) echo "

              등록된 상품이 없습니다.

              \n"; +?> + \ No newline at end of file diff --git a/skin/shop/basic/main.20.skin.php b/skin/shop/basic/main.20.skin.php new file mode 100644 index 000000000..3cdd8386a --- /dev/null +++ b/skin/shop/basic/main.20.skin.php @@ -0,0 +1,272 @@ +', 0); + +/* +상품리스트가 일정 시간마다 위로 롤링되는 스킨 +롤링되기 위해서는 상품이 2줄 이상이어야 함 +*/ +?> + + +
                +
              • +
              • +
              + + + +1 && $i%$this->list_mod == 0) + $sct_last = ' sct_last'; // 줄 마지막 + + if ($i == 1) { + if ($this->css) { + echo "
              type}\" class=\"{$this->css}\">\n"; + } else { + echo "
              type}\" class=\"sct smt_20\">\n"; + } + echo "
                \n"; + } + + if ($i>1 && $i%$this->list_mod == 1) { + echo "
              \n"; + echo "\n"; + echo "
              \n"; +} + +if($i == 1) echo "

              등록된 상품이 없습니다.

              \n"; +?> + + + \ No newline at end of file diff --git a/skin/shop/basic/main.30.skin.php b/skin/shop/basic/main.30.skin.php new file mode 100644 index 000000000..74af7b33e --- /dev/null +++ b/skin/shop/basic/main.30.skin.php @@ -0,0 +1,261 @@ +', 0); + +/* +상품리스트가 일정 시간마다 좌로 롤링되는 스킨 +롤링되기 위해서는 상품이 2줄 이상이어야 함 +*/ +?> + + +
                +
              • +
              • +
              + + + +css) { + echo "
              type}\" class=\"{$this->css}\">\n"; + } else { + echo "
              type}\" class=\"smt_30\">\n"; + } + echo "
                \n"; + } + + if ($i>1 && $i%$this->list_mod == 1) { + echo "
              "; + echo "\n"; + echo "
              \n"; +} + +if($i == 1) echo "

              등록된 상품이 없습니다.

              \n"; +?> + + + \ No newline at end of file diff --git a/skin/shop/basic/main.40.skin.php b/skin/shop/basic/main.40.skin.php new file mode 100644 index 000000000..b992ba51b --- /dev/null +++ b/skin/shop/basic/main.40.skin.php @@ -0,0 +1,252 @@ +', 0); + +/* +상품리스트가 일정 시간마다 바뀜 +롤링되기 위해서는 상품이 2줄 이상이어야 함 +*/ +?> + + +
                +
              • +
              • +
              + + + +1 && $i%$this->list_mod == 0) + $sct_last = ' sct_last'; // 줄 마지막 + + if ($i == 1) { + if ($this->css) { + echo "
              type}\" class=\"{$this->css}\">\n"; + } else { + echo "
              type}\" class=\"sct smt_40\">\n"; + } + echo "
                \n"; + } + + if ($i>1 && $i%$this->list_mod == 1) { + echo "
              \n"; + echo "\n"; + echo "
              \n"; +} + +if($i == 1) echo "

              등록된 상품이 없습니다.

              \n"; +?> + + + \ No newline at end of file diff --git a/skin/shop/basic/main.50.skin.php b/skin/shop/basic/main.50.skin.php new file mode 100644 index 000000000..0b94a04cf --- /dev/null +++ b/skin/shop/basic/main.50.skin.php @@ -0,0 +1,277 @@ +', 0); + +/* +리스트의 상품이 순차적으로 위에서 내려옴 +*/ +?> + + +
                +
              • +
              • +
              + + + +1 && $i%$this->list_mod == 0) + $sct_last = ' sct_last'; // 줄 마지막 + + if ($i == 1) { + if ($this->css) { + echo "
              type}\" class=\"{$this->css}\">\n"; + } else { + echo "
              type}\" class=\"sct smt_50\">\n"; + } + echo "
                \n"; + } + + if ($i>1 && $i%$this->list_mod == 1) { + echo "
              \n"; + echo "\n"; + echo "
              \n"; +} + +if($i == 1) echo "

              등록된 상품이 없습니다.

              \n"; +?> + + + \ No newline at end of file diff --git a/skin/shop/basic/mainbanner.10.skin.php b/skin/shop/basic/mainbanner.10.skin.php new file mode 100644 index 000000000..f68246456 --- /dev/null +++ b/skin/shop/basic/mainbanner.10.skin.php @@ -0,0 +1,245 @@ +', 0); +?> + +'.PHP_EOL.'

              쇼핑몰 배너

              '.PHP_EOL.'
                '.PHP_EOL; + //print_r2($row); + // 테두리 있는지 + $bn_border = ($row['bn_border']) ? ' class="sbn_border"' : '';; + // 새창 띄우기인지 + $bn_new_win = ($row['bn_new_win']) ? ' target="_blank"' : ''; + + $bimg = G5_DATA_PATH.'/banner/'.$row['bn_id']; + if (file_exists($bimg)) + { + $banner = ''; + $size = getimagesize($bimg); + + if($size[2] < 1 || $size[2] > 16) + continue; + + if($max_width < $size[0]) + $max_width = $size[0]; + + if($max_height < $size[1]) + $max_height = $size[1]; + + echo ''.PHP_EOL; + if ($row['bn_url'][0] == '#') + $banner .= ''; + else if ($row['bn_url'] && $row['bn_url'] != 'http://') { + $banner .= ''; + } + echo $banner.''.$row['bn_alt'].''; + if($banner) + echo ''.PHP_EOL; + echo ''.PHP_EOL; + + $bn_first_class = ''; + } +} +if ($i>0) echo '
              '.PHP_EOL.''.PHP_EOL; +?> + + \ No newline at end of file diff --git a/skin/shop/basic/navigation.skin.php b/skin/shop/basic/navigation.skin.php new file mode 100644 index 000000000..508c605ae --- /dev/null +++ b/skin/shop/basic/navigation.skin.php @@ -0,0 +1,38 @@ +'.$row['ca_name'].''; + } +} +else + $navigation = $g5['title']; + +//if ($it_id) $navigation .= " > $it[it_name]"; + +// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨 +add_stylesheet('', 0); +?> + +
              + Home + +
              diff --git a/skin/shop/basic/personalpay.skin.php b/skin/shop/basic/personalpay.skin.php new file mode 100644 index 000000000..dc67edf7e --- /dev/null +++ b/skin/shop/basic/personalpay.skin.php @@ -0,0 +1,35 @@ +', 0); +?> + += 2) { // 1줄 이미지 : 2개 이상 + if ($i%$list_mod == 0) $sct_last = ' sct_last'; // 줄 마지막 + else if ($i%$list_mod == 1) $sct_last = ' sct_clear'; // 줄 첫번째 + else $sct_last = ''; + } else { // 1줄 이미지 : 1개 + $sct_last = ' sct_clear'; + } + + if ($i == 1) { + echo "
                \n"; + } + + $href = G5_SHOP_URL.'/personalpayform.php?pp_id='.$row['pp_id'].'&page='.$page; +?> +
              • +
                +
                +
                +
              • + 1) echo "
              \n"; + +if($i == 1) echo "

              등록된 개인결제가 없습니다.

              \n"; +?> \ No newline at end of file diff --git a/skin/shop/basic/relation.10.skin.php b/skin/shop/basic/relation.10.skin.php new file mode 100644 index 000000000..c59604678 --- /dev/null +++ b/skin/shop/basic/relation.10.skin.php @@ -0,0 +1,99 @@ +', 0); +?> + + +list_mod >= 2) { // 1줄 이미지 : 2개 이상 + if ($i%$this->list_mod == 0) $sct_last = ' sct_last'; // 줄 마지막 + else if ($i%$this->list_mod == 1) $sct_last = ' sct_clear'; // 줄 첫번째 + else $sct_last = ''; + } else { // 1줄 이미지 : 1개 + $sct_last = ' sct_clear'; + } + + if ($i == 1) { + if ($this->css) { + echo "
                css}\">\n"; + } else { + echo "\n"; + +if($i == 1) echo "

                등록된 상품이 없습니다.

                \n"; +?> + \ No newline at end of file diff --git a/skin/shop/basic/style.css b/skin/shop/basic/style.css new file mode 100644 index 000000000..031db5278 --- /dev/null +++ b/skin/shop/basic/style.css @@ -0,0 +1,548 @@ +@charset "utf-8"; +/* SIR 지운아빠 */ + +/* aside:gnb */ +#gnb {margin:0 0 5px;padding:0 0 10px;border:1px solid #d5d5d5;background:#f2f5f9} +#gnb h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +.gnb_1dli {position:relative; word-wrap: break-word;} +.gnb_1dli_on {color:#fff;text-decoration:none} +.gnb_1da {display:block;padding:7px 10px;border-bottom:1px solid #f4f4f4;background-color:#fff;font-weight:bold;text-decoration:none} +.gnb_1dam {background:url('img/gnb_bg00.gif') #fff center right no-repeat} +.gnb_1dli_on .gnb_1da {background-color:#626870;color:#fff;text-decoration:none} +.gnb_1dli_on .gnb_1dam {background:url('img/gnb_bg01.gif') #626870 center right no-repeat;color:#fff;text-decoration:none} +.gnb_2dul {display:none;z-index:1000;position:absolute;border:1px solid #787f89} +.gnb_1dli_over .gnb_2dul, .gnb_1dli_over2 .gnb_2dul {display:block;top:0;left:127px;width:130px;background:#fff} +.gnb_2da {display:none} +.gnb_1dli_over .gnb_2da {display:block;padding:10px;border-bottom:1px solid #e9e9e9} +.gnb_2da:focus, .gnb_2da:hover {background:#f2f5f9;text-decoration:none} + +/* 오늘 본 상품 */ +#stv {z-index:1001;position:relative;float:right;width:88px} +#stv_list {position:absolute;width:88px;border:1px solid #e9e9e9;background:#fff} +#stv_list h2 {padding:10px 0 8px;background:#f2f5f9;text-align:center;letter-spacing:-0.1em} +#stv_pg {display:block;margin:5px 0 0} +#stv_list p {padding:20px 0;text-align:center} +#stv_btn {text-align:center;zoom:1} +#stv_btn:after {display:block;visibility:hidden;clear:both;content:""} +#stv_btn button {float:left;margin:0;padding:5px 0 4px;width:44px;border:0;background:#555;color:#fff;text-align:center} +#stv_ul {margin:5px 0 10px;padding:0;list-style:none} +.stv_item {display:none;padding:0 9px;text-align:center;word-break:break-all} +.stv_item img {margin:5px 0} + +#stv_nb {margin:0;padding:0;border-top:1px solid #e9e9e9;background:#f2f5f9;list-style:none} +#stv_nb li {text-align:center} +#stv_nb a {display:block} + +/* aside:이벤트 링크 */ +#sev {margin:0 0 5px;padding:0 0 10px;border:1px solid #ecc9d6;background:#fff8fb} +#sev h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#sev ul {margin:0;padding:0;border:0;background:#fff;list-style:none} +#sev .sev_img {display:block;border-bottom:1px solid #faedf2} +#sev .sev_text {display:block;padding:7px 10px 6px;border-bottom:1px solid #faedf2;text-decoration:none} +#sev .sev_text:focus, #sev .sev_text:hover {background:#fffafc} +#sev strong {} +#sev_empty {padding:15px 0;text-align:center} + +/* aside:커뮤니티 링크 */ +#scomm {margin:0 0 5px;padding:0 0 10px;border:1px solid #d5d5d5;background:#f2f5f9} +#scomm h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#scomm ul {margin:0;padding:0;border:0;background:#fff;list-style:none} +#scomm a {display:block;padding:7px 10px 6px;border-bottom:1px solid #f4f4f4;text-decoration:none} +#scomm a:focus, #scomm a:hover {background:#f9f9f9} +#scomm_empty {padding:15px 0;text-align:center} + +/* aside:배너 */ +.sbn {margin:0 0 5px} +.sbn h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +.sbn ul {margin:0;padding:0;border:0;list-style:none} +.sbn li {margin:0 0 1px} +.sbn .sbn_border {border:1px solid #d5d5d5} /* 인덱스 배너도 함께 사용 */ + +#sbn_idx {position:relative;margin:0 0 30px} +#sbn_idx .sbn_btn {z-index:100;position:absolute;top:50%} +#sbn_idx .sbn_btn button {position:relative;top:-35px;margin:0;padding:0;width:70px;height:70px;border:0;background:transparent;overflow:hidden} +#sbn_idx .sbn_btn span {display:block;width:100%;height:100%;background:url('img/sbn_btn.png')} +#sbn_idx #sbn_btn_p {left:25px} +#sbn_idx .sbn_btn #sbn_btn_prev span {background-position:0 0} +#sbn_idx #sbn_btn_n {right:25px} +#sbn_idx .sbn_btn #sbn_btn_next span {background-position:-70px 0} +#sbn_idx ul {position:relative;overflow:hidden} +#sbn_idx ul li {position:absolute;display:none;top:0;left:0} +#sbn_idx ul li.sbn_first{display:block} + +/* aside:장바구니 */ +#sbsk {margin:0 0 5px;padding:0 0 10px;border:1px solid #d5d5d5;background:#f2f5f9} +#sbsk h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#sbsk ul {margin:0;padding:0;border:0;background:#fff;list-style:none} +#sbsk a {display:block;padding:7px 10px 6px;border-bottom:1px solid #f4f4f4;text-decoration:none} +#sbsk a:focus, #sbsk a:hover {background:#f9f9f9} +#sbsk_empty {padding:15px 0;text-align:center} + +/* aside:위시리스트 */ +#swish {margin:0 0 5px;padding:0 0 10px;border:1px solid #d5d5d5;background:#f2f5f9} +#swish h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#swish ul {margin:0;padding:0;border:0;background:#fff;list-style:none} +#swish a {display:block;padding:7px 10px 6px;border-bottom:1px solid #f4f4f4;text-decoration:none} +#swish a:focus, #swish a:hover {background:#f9f9f9} +#swish_empty {padding:15px 0;text-align:center} + +/* ##### main(nn).skin.php, list.(nn).skin.php 공통 적용 시작 ##### */ +/* 공통 */ +.sct_wrap {position:relative;margin:0 0 30px;zoom:1} +.sct_wrap .sctrl {position:absolute;top:0;right:0} /* 애니메이션 효과 사용 시 재생 정지 버튼 등 */ +.sct_wrap:after {display:block;visibility:hidden;clear:both;content:""} +.sct_wrap header {margin:0 0 20px;zoom:1} +.sct_wrap header:after {display:block;visibility:hidden;clear:both;content:""} +.sct_wrap h2 {float:left;margin:0 20px 0 0;padding:0;line-height:1em} +.sct_wrap h2 a {text-decoration:none} +.sct_wrap_hdesc {float:left;margin:0;padding:0;color:#777;line-height:1em} + +#sct {clear:both} + +.sct {clear:both;margin:0;padding:0;list-style:none;zoom:1} +.sct:after {display:block;visibility:hidden;clear:both;content:""} +.sct_li {position:relative} +.sct_noitem {padding:100px 0;text-align:center} +.sct img {position:relative} /* 리스트뷰 갤러리뷰 변경 시 ie6,7 에서 이미지 사라지는 문제 해결하기 위해 */ +.sct_icon img {margin:0 1px 0 0} +.sct_sns a {display:inline-block;margin:0 4px 0 0} + +/* 재생/정지/이전/다음 버튼 */ +.sctrl {margin:0;padding:0;list-style:none;zoom:1} +.sctrl:after {display:block;visibility:hidden;clear:both;content:""} +.sctrl li {position:relative;float:left;margin:0 0 0 -1px} +.sctrl button {position:relative;margin:0;padding:0;width:21px;height:21px;border:0;cursor:pointer;overflow:hidden} +.sctrl button span {position:absolute;top:0;left:0;width:19px;height:19px;border:1px solid #ccc;background:url('img/is_button.gif')} +.sctrl button.sctrl_play span {background-position:-60px 0} +.sctrl button.sctrl_play span.sctrl_on {background-position:-60px -30px} +.sctrl button.sctrl_stop span {background-position:-90px 0} +.sctrl button.sctrl_stop span.sctrl_on {background-position:-90px -30px} +.sctrl button.sctrl_prev span {background-position:-120px 0} +.sctrl button.sctrl_prev span.sctrl_on {background-position:-120px -30px} +.sctrl button.sctrl_next span {background-position:-150px 0} +.sctrl button.sctrl_next span.sctrl_on {background-position:-150px -30px} + +/* 상품 목록 스킨 10 */ +.sct_10 .sct_li {position:relative;float:left;margin:0 25px 15px 0} +.sct_10 .sct_last {margin:0 0 15px !important} +.sct_10 .sct_clear {clear:both} +.sct_10 .sct_a {display:inline-block;position:relative;text-decoration:none} +.sct_10 .sct_a:focus, .sct_10 .sct_a:hover {text-decoration:none} +.sct_10 .sct_img {margin:0 0 10px} +.sct_10 .sct_txt {margin:0 0 5px} +.sct_10 .sct_icon {margin:0 0 10px} +.sct_10 .sct_id {display:block;margin:0 0 5px} +.sct_10 .sct_basic {margin:0 0 10px} +.sct_10 .sct_cost {display:block;margin:0 0 10px;font-weight:bold} +.sct_10 .sct_cost strike {display:block;margin:0 0 5px;color:#999;font-weight:normal} +.sct_10 .sct_sns {} + +/* 상품 목록 스킨 20 */ +.sct_20 .sct_li {position:relative;float:left;margin:0 25px 15px 0} +.sct_20 .sct_last {margin:0 0 15px !important} +.sct_20 .sct_clear {clear:both} +.sct_20 .sct_a {display:block;position:relative;text-decoration:none} +.sct_20 .sct_a:focus, .sct_20 .sct_a:hover {text-decoration:none} +.sct_20 .sct_img {} +.sct_20 .sct_icon {position:absolute;top:10px;left:-5px;margin:0 !important} +.sct_20 .sct_icon img {display:block;margin:0 0 3px} +.sct_20 .sct_id {display:block;padding:5px 10px 0;background:#f2f5f9} +.sct_20 .sct_txt {padding:10px;background:#f2f5f9} +.sct_20 .sct_basic {padding:0 10px 5px;background:#f2f5f9;line-height:1.5em} +.sct_20 .sct_cost {display:block;padding:0 10px 10px;background:#f2f5f9;font-weight:bold} +.sct_20 .sct_cost strike {display:block;margin:0 0 5px;color:#999;font-weight:normal} +.sct_20 .sct_sns {position:absolute;bottom:10px;right:10px} + +/* 상품 목록 스킨 30 */ +.sct_30 .sct_li {position:relative;float:left;margin:0 16px 15px 0;border:1px solid #e9e9e9;background:#f5f6fa} +.sct_30 .sct_last {margin:0 0 15px !important} +.sct_30 .sct_clear {clear:both} +.sct_30 .sct_arw_toleft {display:block;z-index:2;position:absolute;top:20px;left:221px;width:10px;height:19px;background:url('img/icon_arw_toleft.gif') no-repeat} +.sct_30 .sct_a {text-decoration:none} +.sct_30 .sct_img img {position:absolute;top:0;left:0} +.sct_30 .sct_icon {position:absolute;bottom:25px;left:-5px;margin:0 !important} +.sct_30 .sct_icon img {display:block;margin:0 0 3px} +.sct_30 .sct_txt {display:inline-block;margin:0 0 20px} +.sct_30 .sct_basic {margin:0 0 15px;padding:0;line-height:1.5em} +.sct_30 .sct_cost {display:block;margin:0 0 10px;font-weight:bold} +.sct_30 .sct_cost strike {display:block;margin:0 0 5px;color:#999;font-weight:normal} +.sct_30 .sct_sns {position:absolute;bottom:20px;right:10px} + +/* 상품 목록 스킨 40 */ +.sct_40 .sct_li {position:relative;margin:0 0 16px 0;border:1px solid #e9e9e9;background:#f5f6fa} +.sct_40 .sct_a {text-decoration:none} +.sct_40 .sct_a:focus, .sct_40 .sct_a:hover {text-decoration:none} +.sct_40 .sct_img {position:absolute;top:0;left:0} +.sct_40 .sct_icon {position:absolute;bottom:25px;left:-5px;margin:0 !important} +.sct_40 .sct_icon img {display:block;margin:0 0 4px} +.sct_40 .sct_txt {display:inline-block;margin:0 0 20px} +.sct_40 .sct_basic {margin:0 0 15px;padding:0;line-height:1.5em} +.sct_40 .sct_cost {display:block;margin:0 0 10px;font-weight:bold} +.sct_40 .sct_cost strike {display:block;margin:0 0 5px;color:#999;font-weight:normal} +.sct_40 .sct_rel {position:absolute;bottom:20px;right:20px} +.sct_40 .sct_rel_ul {margin:0;padding:0;list-style:none} +.sct_40 .sct_rel_li {float:left;margin:0 0 0 10px} +.sct_40 .sct_sns {padding:10px 0 0} + +/* 개인결제 목록 */ +.sct_pv .sct_li {position:relative;float:left;margin:0 25px 15px 0} +.sct_pv .sct_last {margin:0 0 15px !important} +.sct_pv .sct_clear {clear:both} +.sct_pv .sct_a {display:inline-block;position:relative;text-decoration:none} +.sct_pv .sct_a:focus, .sct_pv .sct_a:hover {text-decoration:none} +.sct_pv .sct_img {margin:0 0 10px} +.sct_pv .sct_txt {margin:0 0 5px} +.sct_pv .sct_icon {margin:0 0 10px} +.sct_pv .sct_id {display:block;margin:0 0 5px} +.sct_pv .sct_basic {margin:0 0 10px} +.sct_pv .sct_cost {display:block;margin:0 0 10px;font-weight:bold} +.sct_pv .sct_cost strike {display:block;margin:0 0 5px;color:#999;font-weight:normal} +.sct_pv .sct_sns {} + +/* 메인 상품 목록 스킨 20 */ +.smt_20 {position:relative;overflow-y:hidden} +.smt_20 .sct_ul {position:absolute;top:0;left:0;margin:0;padding:0;list-style:none} +.smt_20 .sct_ul_first {display:block;top:0} +.smt_20 .sct_li {position:relative;float:left;margin:0 25px 15px 0} +.smt_20 .sct_last {margin:0 0 15px !important} +.smt_20 .sct_a {display:inline-block;position:relative;text-decoration:none} +.smt_20 .sct_a:focus, .smt_20 .sct_a:hover {text-decoration:none} +.smt_20 .sct_img {margin:0 0 10px} +.smt_20 .sct_txt {margin:0 0 5px} +.smt_20 .sct_icon {margin:0 0 10px} +.smt_20 .sct_id {display:block;margin:0 0 5px} +.smt_20 .sct_basic {margin:0 0 10px} +.smt_20 .sct_cost {display:block;margin:0 0 10px;font-weight:bold} +.smt_20 .sct_cost strike {display:block;margin:0 0 5px;color:#999;font-weight:normal} +.smt_20 .sct_sns {} + +/* 메인 상품 목록 스킨 30 */ +.smt_30 {position:relative;overflow-x:hidden} +.smt_30 .sct_ul {position:absolute;top:0;left:765px;margin:0;padding:0;width:765px;list-style:none;zoom:1} +.smt_30 .sct_ul:after {display:block;visibility:hidden;clear:both;content:""} +.smt_30 .sct_ul_first {display:block;left:0} +.smt_30 .sct_li {position:relative;float:left;margin-right:25px} +.smt_30 .sct_a {display:inline-block;position:relative;text-decoration:none} +.smt_30 .sct_a:focus, .smt_30 .sct_a:hover {text-decoration:none} +.smt_30 .sct_img {margin:0 0 10px} +.smt_30 .sct_txt {margin:0 0 5px} +.smt_30 .sct_icon {margin:0 0 10px} +.smt_30 .sct_id {display:block;margin:0 0 5px} +.smt_30 .sct_basic {margin:0 0 10px} +.smt_30 .sct_cost {display:block;margin:0 0 10px;font-weight:bold} +.smt_30 .sct_cost strike {display:block;margin:0 0 5px;color:#999;font-weight:normal} +.smt_30 .sct_sns {} + +/* 메인 상품 목록 스킨 40 */ +.smt_40 {clear:both;position:relative} +.smt_40 .sct_ul {display:none;position:absolute;top:0;left:0;margin:0;padding:0;list-style:none} +.smt_40 .sct_ul_first {display:block} +.smt_40 .sct_li {position:relative;float:left;margin:0 25px 15px 0} +.smt_40 .sct_last {margin:0 0 15px !important} +.smt_40 .sct_a {display:inline-block;position:relative;text-decoration:none} +.smt_40 .sct_a:focus, .smt_40 .sct_a:hover {text-decoration:none} +.smt_40 .sct_img {margin:0 0 10px} +.smt_40 .sct_txt {margin:0 0 5px} +.smt_40 .sct_icon {margin:0 0 10px} +.smt_40 .sct_id {display:block;margin:0 0 5px} +.smt_40 .sct_basic {margin:0 0 10px} +.smt_40 .sct_cost {display:block;margin:0 0 10px;font-weight:bold} +.smt_40 .sct_cost strike {display:block;margin:0 0 5px;color:#999;font-weight:normal} +.smt_40 .sct_sns {} + +/* 메인 상품 목록 스킨 50 */ +.smt_50 {position:relative} +.smt_50 .sct_ul {display:none;position:absolute;top:0;left:0;height:306px;margin:0;padding:0;list-style:none;overflow-y:hidden} +.smt_50 .sct_ul_first {display:block} +.smt_50 .sct_li {position:relative;float:left;position:relative;top:-306px;margin:0 25px 15px 0} +.smt_50 .sct_last {margin:0 0 15px} +.smt_50 .sct_a {display:inline-block;position:relative;text-decoration:none} +.smt_50 .sct_a:focus, .smt_50 .sct_a:hover {text-decoration:none} +.smt_50 .sct_img {margin:0 0 10px} +.smt_50 .sct_txt {margin:0 0 5px} +.smt_50 .sct_icon {margin:0 0 10px} +.smt_50 .sct_id {display:block;margin:0 0 5px} +.smt_50 .sct_basic {margin:0 0 10px} +.smt_50 .sct_cost {display:block;margin:0 0 10px;font-weight:bold} +.smt_50 .sct_cost strike {display:block;margin:0 0 5px;color:#999;font-weight:normal} +.smt_50 .sct_sns {} + +/* 관련상품 목록 스킨 10 */ +.scr_10 .sct_li {position:relative;float:left;margin:0 25px 15px 0} +.scr_10 .sct_last {margin:0 0 15px !important} +.scr_10 .sct_clear {clear:both} +.scr_10 .sct_a {display:inline-block;position:relative;text-decoration:none} +.scr_10 .sct_a:focus, .sct_10 .sct_a:hover {text-decoration:none} +.scr_10 .sct_img {margin:0 0 10px} +.scr_10 .sct_txt {margin:0 0 5px} +.scr_10 .sct_icon {margin:0 0 10px} +.scr_10 .sct_id {display:block;margin:0 0 5px} +.scr_10 .sct_basic {margin:0 0 10px} +.scr_10 .sct_cost {display:block;margin:0 0 10px;font-weight:bold} +.scr_10 .sct_cost strike {display:block;margin:0 0 5px;color:#999;font-weight:normal} +.scr_10 .sct_sns {} + +/* ##### main(nn).skin.php, list.(nn).skin..php 공통 적용 끝 ##### */ + +/* 상품 목록 */ +#sct {} +.sct_admin {margin:0 0 10px;text-align:right} + +/* 상품 목록 현재 위치 */ +#sct_location {margin:0 0 10px;border:1px solid #e9e9e9;background:#f2f5f9;letter-spacing:-4px} +#sct_location a {display:inline-block;padding:10px 10px 8px;text-decoration:none;letter-spacing:0 !important} +.sct_here {font-weight:bold} +.sct_bg {padding-right:15px !important;background:url('img/sct_bg_toright.gif') right 11px no-repeat} + +/* 상품 목록 카테고리 목록 */ +.sct_ct {} +.sct_ct h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +.sct_ct ul {margin:0 0 10px;padding:10px;border-bottom:1px solid #e9e9e9;list-style:none;zoom:1} +.sct_ct ul:after {display:block;visibility:hidden;clear:both;content:""} +.sct_ct a {text-decoration:none} +.sct_ct_parent {font-weight:bold} +.sct_ct_here {color:#ff3600 !important} + +#sct_ct_1 li {float:left;margin:0 10px 10px 0;width:120px} +#sct_ct_2 li {margin:0 0 10px} +#sct_ct_2 a {display:inline-block;width:120px} +#sct_ct_3 li {float:left;margin:0 10px 10px 0;width:120px} + +/* 상품 정렬 리스트 스타일 선택 공통 */ +#sct_sortlst {zoom:1} +#sct_sortlst:after {display:block;visibility:hidden;clear:both;content:""} + +/* 상품 정렬 */ +#sct_sort {float:left;margin:0 0 10px;width:80%;zoom:1} +#sct_sort:after {display:block;visibility:hidden;clear:both;content:""} +#sct_sort h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#sct_sort ul {margin:0;padding:0 0 0 1px;list-style:none;zoom:1} +#sct_sort ul:after {display:block;visibility:hidden;clear:both;content:""} +#sct_sort li {float:left;position:relative;margin-left:-1px} + +/* 상품 리스트 스타일 선택 */ +#sct_lst {float:right;margin:0 0 10px;padding:0;list-style:none;zoom:1} +#sct_lst:after {display:block;visibility:hidden;clear:both;content:""} +#sct_lst li {position:relative;float:left;margin:0 0 0 -1px} +#sct_lst button {position:relative;margin:0;padding:0;width:25px;height:25px;border:0;cursor:pointer;overflow:hidden} +#sct_lst button span {position:absolute;top:0;left:0;width:23px;height:23px;border:1px solid #ccc;background:url('img/is_button.gif')} +#sct_lst button.sct_lst_list span {background-position:0 0} +#sct_lst button.sct_lst_list span.sct_lst_on {background-position:0 -30px} +#sct_lst button.sct_lst_gallery span {background-position:-30px 0} +#sct_lst button.sct_lst_gallery span.sct_lst_on {background-position:-30px -30px} + +/* 상품 상세보기 */ +#sit {margin:10px 0;border:1px solid #e9e9e9} +.sit_admin {text-align:right} +.sit_empty {padding:20px 0;text-align:center} + +/* 상품 상세보기 - 개요 */ +#sit_ov_wrap {margin:0 0 20px;border-bottom:1px solid #e9e9e9;background:#f2f5f9;zoom:1} +#sit_ov_wrap:after {display:block;visibility:hidden;clear:both;content:""} + +/* 상품 상세보기 - 이미지 미리보기 */ +#sit_pvi {float:left;padding:15px;width:320px} +#sit_pvi_big {margin:0 0 10px;text-align:center} +#sit_pvi_big a {display:none} +#sit_pvi_big a.visible {display:block} +#sit_pvi_big img {} +#sit_pvi_thumb {margin:0;padding:0;list-style:none;zoom:1} +#sit_pvi_thumb:after {display:block;visibility:hidden;clear:both;content:""} +#sit_pvi_thumb li {float:left;margin:0 5px 5px 0} +#sit_pvi_thumb .li_last {margin:0 !important} +#sit_pvi_thumb img {} + +#sit_pvi_nwbig {padding:10px 0;text-align:center} +#sit_pvi_nwbig span {display:none} +#sit_pvi_nwbig span.visible {display:inline} +#sit_pvi_nw ul {margin:0 0 20px;padding:0 10px;list-style:none;zoom:1} +#sit_pvi_nw ul:after {display:block;visibility:hidden;clear:both;content:""} +#sit_pvi_nw li {float:left;margin:0 0 1px 1px} +#sit_pvi_nw li img {width:60px;height:60px} + +/* 상품 상세보기 - 간략정보 및 구매기능 */ +#sit_ov {position:relative;float:right;padding:50px 15px 15px;width:358px;height:auto !important;height:355px;min-height:355px} +#sit_ov h3 {margin:0 0 10px} + +#sit_title {margin:0 0 5px;font-size:1.3em} +#sit_desc {margin:0 0 5px;padding:0;color:#999} +#sit_opt_info {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} + +#sit_star_sns {position:absolute;top:15px;right:15px;color:#b8afa2;font-size:0.95em;letter-spacing:-0.1em} +#sit_star_sns span {display:inline-block;margin:0 5px 0 0;color:#666;letter-spacing:0} +#sit_star_sns .sit_star {position:relative;top:-2px;margin:0 5px 0 0} +#sit_star_sns a {display:inline-block;vertical-align:middle} + +.sit_ov_tbl {margin-bottom:20px;width:100%;border:0;border-collapse:collapse} +.sit_ov_tbl th {border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;font-weight:normal;text-align:left} +.sit_ov_tbl td {padding:7px 0;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9} +.sit_ov_ro {padding:2px 2px 3px;border:0;background:transparent;text-align:right;vertical-align:middle} +.sit_ov_opt {padding:2px 2px 3px;border:0;background:transparent;vertical-align:middle} +.sit_ov_input {margin:0 1px 0 0;padding:2px 2px 3px;border:1px solid #b8c9c2;background:transparent;vertical-align:middle} +#sit_ov_tbl button {margin:0 1px 0 0} + +.sit_sel_btn {position:relative} /* 선택옵션용 추가 버튼 */ +.sit_sel_btn button {position:absolute;top:-51px;right:0 !important;right:15px} + +#sit_sel_option h3 {position:absolute;font-size:0;line-height:0;overflow:hidden} + +#sit_tot_price {margin:20px 0;font-size:1.3em;font-weight:bold} + +#sit_ov_soldout {margin:0 0 20px;color:#ff3061;font-weight:bold;text-align:center} + +#sit_ov_btn {text-align:right;letter-spacing:-3px} +#sit_ov_btn a {display:inline-block;width:80px;height:30px;border:0;font-size:0.95em;vertical-align:middle;text-align:center;text-decoration:none;letter-spacing:-0.1em;line-height:2.8em;cursor:pointer} +#sit_ov_btn input {display:inline-block;width:80px;height:30px;border:0;font-size:0.95em;text-align:center;text-decoration:none;letter-spacing:-0.1em;cursor:pointer} +#sit_btn_buy {background:#ff5b89;color:#fff} +#sit_btn_cart, #sit_btn_wish {background:#555;color:#fff} +#sit_btn_rec {background:#888;color:#fff} + +/* 상품 재입고 알림 (SMS) */ +#sit_sms_new {} +#sit_sms_new #sms_agree {padding:10px 0;text-align:right} + +/* 상품 상세보기 - 다른 상품 보기 */ +#sit_siblings {clear:both;margin:0 0 20px;padding:0 0 20px;border-bottom:1px solid #e9e9e9;text-align:center} +#sit_siblings:after {display:block;visibility:hidden;clear:both;content:""} +#sit_siblings h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#sit_siblings a {display:inline-block;padding:8px 12px;border:1px solid #e9e9e9;background:#fff} +#sit_siblings a#siblings_prev {float:left;margin:0 0 0 15px} +#sit_siblings a#siblings_next {float:right;margin:0 15px 0 0} +#sit_siblings a span {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} + +/* 상품 상세보기 - 상품정보 */ +#sit_inf {margin:0 0 10px;padding:10px 10px 20px;border-bottom:1px solid #e9e9e9} +#sit_inf h2 {margin:0 0 10px} +#sit_inf h3 {position:absolute;font-size:0;line-height:0;content:""} + +#sit_inf_basic {margin:0 0 10px} +#sit_inf_explan {margin:0 0 10px;width:auto !important;width:718px;overflow:hidden} /* ie6 미대응시 #sit_inf_explan {margin:0 0 10px} 만으로 충분 */ +#sit_inf_explan img {max-width:100%;height:auto} + +#sit_inf_open {width:100%;border:0;border-collapse:collapse} +#sit_inf_open th {padding:7px 10px;border:1px solid #fff;background:#f2f5f9;vertical-align:top;text-align:left} +#sit_inf_open td {padding:7px 10px;border:1px solid #fff;background:#f2f5f9;vertical-align:top} + +/* 상품 상세보기 - 사용후기 */ +#sit_use {margin:0 0 10px;padding:10px 10px 20px;border-bottom:1px solid #e9e9e9} +#sit_use h2 {margin:0 0 10px} +#sit_use h3 {margin:0 0 10px} + +#sit_use_ol {margin:0 0 5px;padding:0;border-top:1px solid #e9e9e9;list-style:none} +.sit_use_li {position:relative;padding:0 0 10px;border-bottom:1px solid #e9e9e9;background:#f2f5f9} +.sit_use_li_title {display:block;margin:0;padding:10px;width:100%;border:0;background:transparent;text-align:left;cursor:pointer} + +.sit_use_dl {margin:0;padding:0 10px;zoom:1} +.sit_use_dl:after {display:block;visibility:hidden;clear:both;content:""} +.sit_use_dl dt {float:left;margin:2px 0 0} +.sit_use_dl dd {float:left;margin:2px 20px 0 5px} +.sit_use_star {margin:0 !important;padding:0 0 0 5px} + +.sit_use_con {display:none;padding:10px 10px 0} +.sit_use_p {margin:0 0 10px;padding:10px;border:1px solid #e9e9e9;background:#fff} +.sit_use_cmd {text-align:right} + +#sit_use_wbtn {margin:0 0 5px;text-align:right} + +#sit_use_write {} +#sit_use_write #is_subject {width:100%} +#sit_use_write ul {margin:5px 0 0} +#sit_use_write li {margin:0 0 5px} +#sit_use_write li label {display:inline-block;width:80px} +#sit_use_write_star {margin:0;padding:0;list-style:none} + +/* 상품 상세보기 - 상품문의 */ +#sit_qa {margin:0 0 10px;padding:10px 10px 20px;border-bottom:1px solid #e9e9e9} +#sit_qa h2 {margin:0 0 10px} +#sit_qa h3 {margin:0 0 10px} + +#sit_qa_ol {margin:0 0 5px;padding:0;border-top:1px solid #e9e9e9;list-style:none} +.sit_qa_li {position:relative;padding:0 0 10px;border-bottom:1px solid #e9e9e9;background:#f2f5f9} +.sit_qa_li_title {display:block;margin:0;padding:10px;width:100%;border:0;background:transparent;text-align:left;cursor:pointer} + +.sit_qa_dl {margin:0;padding:0 10px;zoom:1} +.sit_qa_dl:after {display:block;visibility:hidden;clear:both;content:""} +.sit_qa_dl dt {float:left} +.sit_qa_dl dd {float:left;margin:0 20px 0 5px} +.sit_qaa_done {color:#ff3061} +.sit_qaa_yet {color:#999} + +.sit_qa_con {display:none;padding:10px 10px 0} +.sit_qa_p {margin:0 0 10px;padding:10px;border:1px solid #e9e9e9;background:#fff} +.sit_qa_p strong {display:inline-block;margin:0 0 10px} +.sit_qa_qaq {margin:0 0 20px} +.sit_qa_con textarea {display:none} +.sit_qa_cmd {text-align:right} + +.sit_qa_pw {display:none;position:absolute;top:30px;left:175px;padding:10px;width:348px;border:1px solid #000;background:#fff;text-align:center} +.sit_qa_pw span {display:block;margin:0 0 5px} + +#sit_qa_wbtn {margin:0 0 5px;text-align:right} + +#sit_qa_write {} +#sit_qa_write #iq_subject {width:100%} + +/* 상품 상세보기 - 배송정보 */ +#sit_dvr {margin:0 0 10px;padding:10px 10px 20px;border-bottom:1px solid #e9e9e9} +#sit_dvr h2 {margin:0 0 10px} + +/* 상품 상세보기 - 교환정보 */ +#sit_ex {margin:0 0 10px;padding:10px 10px 20px;border-bottom:1px solid #e9e9e9} +#sit_ex h2 {margin:0 0 10px} + +/* 상품 상세보기 - 관련상품 */ +#sit_rel {margin:0 0 10px;padding:10px 10px 0} +#sit_rel h2 {margin:0 0 10px} +#sit_rel .sct_wrap li {margin:0 10px 0 0} +#sit_rel .sct_last {margin:0 !important} + +/* 사용후기 모음 */ +#sps_sch {margin:0 0 10px} +#sps_sch a {display:inline-block;padding:0 8px;height:21px;background:#333;color:#fff;text-decoration:none;vertical-align:middle;line-height:1.9em} +#sps_sch .btn_submit {padding:0 8px;height:24px;vertical-align:middle} + +#sps {zoom:1} +#sps ol {margin:0;padding:0;border-top:1px solid #e9e9e9;list-style:none} +#sps li {position:relative;padding:10px;border-bottom:1px solid #e9e9e9} +#sps li:after {display:block;visibility:hidden;clear:both;content:""} + +.sps_img {float:left;margin:0 10px 0 0;width:80px} +.sps_img span {position:absolute;font-size:0;line-height:0;overflow:hidden} + +#sps dl {margin:5px 0 10px;zoom:1} +#sps dl:after {display:block;visibility:hidden;clear:both;content:""} +#sps dt {float:left} +#sps dd {float:left;margin:0 20px 0 5px} +#sps dd img {position:relative;top:-2px} + +.sps_section {float:left;width:630px} +.sps_section p {padding:0;width:100%} +.sps_con_full {padding:0;height:auto !important} +.sps_con_btn {margin:5px 0 0;text-align:right} +.sps_con_btn button {margin:0;padding:5px;border:0;background:#565e60;color:#fff} + +/* 상품문의 모음 */ +#sqa_sch {margin:0 0 10px} +#sqa_sch a {display:inline-block;padding:0 8px;height:21px;background:#333;color:#fff;text-decoration:none;vertical-align:middle;line-height:1.9em} +#sqa_sch .btn_submit {padding:0 8px;height:24px;vertical-align:middle} + +#sqa {zoom:1} +#sqa ol {margin:0;padding:0;border-top:1px solid #e9e9e9;list-style:none} +#sqa li {position:relative;padding:10px;border-bottom:1px solid #e9e9e9} +#sqa li:after {display:block;visibility:hidden;clear:both;content:""} + +.sqa_img {float:left;margin:0 10px 0 0;width:80px} +.sqa_img span {position:absolute;font-size:0;line-height:0} + +#sqa dl {margin:5px 0 10px;zoom:1} +#sqa dl:after {display:block;visibility:hidden;clear:both;content:""} +#sqa dt {float:left} +#sqa dd {float:left;margin:0 20px 0 5px} +#sqa dd img {position:relative;top:-2px} + +.sqa_section {float:left;width:630px} +.sqa_section .sqa_con {padding:10px;background:#f2f5f9;line-height:1.7em} +.sqa_section p {padding:0;width:100%} +.sqa_con_full {padding:0;height:auto !important} +.sqa_con_btn {margin:5px 0 0;text-align:right} +.sqa_con_btn button {margin:0;padding:5px;border:0;background:#565e60;color:#fff} \ No newline at end of file diff --git a/skin/visit/shop_basic/style.css b/skin/visit/shop_basic/style.css new file mode 100644 index 000000000..ab05e58e4 --- /dev/null +++ b/skin/visit/shop_basic/style.css @@ -0,0 +1,10 @@ +/* 방문자 집계 */ +#visit {margin:0 0 20px;padding:0 15px;background:#444;zoom:1} +#visit:after {display:block;visibility:hidden;clear:both;content:''} +#visit h2 {float:left;padding:10px 45px 10px 0;color:#fff} +#visit dl {float:left;margin:0 0 0 10px;padding:0} +#visit dt {float:left;margin:0;padding:10px 0 10px;color:#fff} +#visit dd {float:left;margin:0 30px 0 0;padding:10px;color:#fff} +#visit a {display:inline-block;padding:10px;color:#fff;text-decoration:none} +#visit a:focus, +#visit a:hover {background:#333;color:#fff} \ No newline at end of file diff --git a/skin/visit/shop_basic/visit.skin.php b/skin/visit/shop_basic/visit.skin.php new file mode 100644 index 000000000..0a45e7022 --- /dev/null +++ b/skin/visit/shop_basic/visit.skin.php @@ -0,0 +1,26 @@ +', 0); +?> + +
                +
                +

                접속자집계

                +
                +
                오늘
                +
                +
                어제
                +
                +
                최대
                +
                +
                전체
                +
                +
                + 상세보기 +
                +
                + diff --git a/theme/basic/css/default_shop.css b/theme/basic/css/default_shop.css new file mode 100644 index 000000000..3e13c8fca --- /dev/null +++ b/theme/basic/css/default_shop.css @@ -0,0 +1,523 @@ +@charset "utf-8"; +/* SIR 지운아빠 */ + +/* 초기화 */ +html {overflow-y:scroll} +body {margin:0;padding:0;font-size:0.75em;font-family:dotum} +html, h1, h2, h3, h4, h5, h6, form, fieldset, img {margin:0;padding:0;border:0} +h1, h2, h3, h4, h5, h6 {font-size:1em;font-family:dotum} +article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {display:block} +#hd ul, nav ul, #ft ul {margin:0;padding:0;list-style:none} +legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden} +label, input, button, select, img {vertical-align:middle} +input, button {margin:0;padding:0;font-family:dotum;font-size:1em} +button {cursor:pointer} +textarea, select {font-family:dotum;font-size:1em} +select {margin:0} +p {margin:0;padding:0;word-break:break-all} +hr {display:none} +pre {overflow-x:scroll;font-size:1.1em} +a:link, a:visited {color:#000;text-decoration:none} +a:hover, a:focus, a:active {color:#000;text-decoration:underline} + +/* 팝업레이어 */ +#hd_pop {z-index:1000;position:relative;margin:0 auto;width:1000px;height:0} +#hd_pop h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +.hd_pops {position:absolute;border:1px solid #e9e9e9;background:#fff} +.hd_pops_con {} +.hd_pops_footer {padding:10px 0;background:#000;color:#fff;text-align:right} +.hd_pops_footer button {margin-right:5px;padding:5px 10px;border:0;background:#393939;color:#fff} + +/* 상단 레이아웃 */ +#hd {min-width:1000px;border-bottom:1px solid #dde4e9} +#hd_h1 {position:absolute;font-size:0;line-height:0;overflow:hidden} + +#hd_qnb {border-bottom:1px solid #e9e9e9;background:#f2f5f9;zoom:1} +#hd_qnb:after {display:block;visibility:hidden;clear:both;content:""} +#hd_qnb h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#hd_qnb div {text-align:center;letter-spacing:-4px} +#hd_qnb a {letter-spacing:0} + +#hd_wrapper {position:relative;margin:0 auto;padding:26px 0;width:1000px;zoom:1} +#hd_wrapper:after {display:block;visibility:hidden;clear:both;content:""} + +#logo {float:left;padding:5px 0 0} + +#hd_sch {float:left;margin:0 0 0 20px;border:1px solid #c3c6ca} +#hd_sch h3 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#hd_sch #sch_str {padding-left:5px;width:110px;height:24px;border:0;background:#fff;line-height:1.9em !important;line-height:1.6em} +#hd_sch #sch_submit {padding:0 5px;height:26px;border:0;background:#e2e6eb;color:#333;cursor:pointer} + +#tnb {float:right} +#tnb h3 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#tnb ul {zoom:1} +#tnb ul:after {display:block;visibility:hidden;clear:both;content:""} +#tnb li {float:left} +#tnb a {display:inline-block;padding:0 10px;height:28px;color:#333;letter-spacing:-0.1em;line-height:2.4em} +#tnb a:focus, #tnb a:hover {text-decoration:none} + +/* 중간 레이아웃 */ +#wrapper {z-index:5;margin:30px auto;width:1000px;zoom:1} +#wrapper:after {display:block;visibility:hidden;clear:both;content:""} +#wrapper_title {margin-bottom:20px;font-size:1.2em;font-weight:bold} + +/* aside wrapper */ +#aside {float:left;margin:0 10px 0 0;width:150px} + +#container {position:relative;float:left;width:740px;min-height:500px;height:auto !important;height:500px;background:#fff;zoom:1} +#container:after {display:block;visibility:hidden;clear:both;content:""} + +/* 텍스트 크기 조절 */ +#text_size {display:none;position:absolute;top:-31px;left:-1px} +#text_size button {padding:0 10px;height:30px;border:1px solid #cfded8;border-bottom:0;background:#000;color:#fff;cursor:pointer} + +/* 하단 레이아웃 */ +#ft {clear:both;padding:0 0 40px;min-width:1000px;border-top:1px solid #e9e9e9} +#ft h1 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#ft div {position:relative;margin:0 auto;padding:0 0 0 200px;width:750px} +#ft_logo {position:absolute;top:20px;left:0} +#ft ul {margin:0 0 15px;padding:20px 0 0;zoom:1} +#ft ul:after {display:block;visibility:hidden;clear:both;content:""} +#ft li {float:left;margin:0 20px 0 0} +#ft a {text-decoration:none} +#ft p {margin:0;padding:10px 0;line-height:1.8em} +#ft span {display:inline-block;margin:0 15px 0 0} +#ft b {display:inline-block;margin:0 5px 0 0} +#ft_totop {position:absolute;top:20px;right:0} + +/* 화면낭독기 사용자용 */ +#hd_login_msg {position:absolute;top:0;left:0;width:1px;height:1px;overflow:hidden} +.msg_sound_only, .sound_only {display:inline-block !important;position:absolute;top:0;left:0;margin:0 !important;padding:0 !important;font-size:0;line-height:0;border:0 !important;overflow:hidden !important} +/* 본문 바로가기 */ +#skip_to_container a {z-index:100000;position:absolute;top:0;left:0;width:1px;height:1px;font-size:0;line-height:0;overflow:hidden} +#skip_to_container a:focus, #skip_to_container a:active {width:100%;height:75px;background:#21272e;color:#fff;font-size:2em;font-weight:bold;text-align:center;text-decoration:none;line-height:3.3em} + +/* 이미지 등비율 리사이징 */ +.img_fix {width:100%;height:auto} + +/* 캡챠 자동등록(입력)방지 기본 */ +#captcha {display:inline-block;position:relative} +#captcha legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden} +#captcha #captcha_img {width:100px;height:41px;border:1px solid #e9e9e9} +#captcha #captcha_mp3 {position:absolute;top:0;left:101px;;margin:0;padding:0;width:23px;height:22px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer} +#captcha #captcha_mp3 span {position:absolute;top:0;left:0;width:23px;height:22px;background:url('../plugin/kcaptcha/img/sound.gif')} +#captcha #captcha_reload {position:absolute;top:21px;left:101px;margin:0;padding:0;width:23px;height:22px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer} +#captcha #captcha_reload span {position:absolute;top:0;left:0;width:23px;height:22px;background:url('../plugin/kcaptcha/img/reload.gif')} +#captcha #captcha_key {margin:0 0 0 25px;padding:0 5px;width:70px;height:41px;border:1px solid #b8c9c2;background:#f7f7f7;font-size:1.333em;font-weight:bold;text-align:center;line-height:2.8em} +#captcha #captcha_info {display:block;margin:5px 0 0;font-size:0.95em;letter-spacing:-0.1em} + +/* ckeditor 단축키 */ +.cke_sc {margin:0 0 5px;text-align:right} +.btn_cke_sc{display:inline-block;padding:0 10px;height:23px;border:1px solid #ccc !important;background:#fafafa !important;color:#000 !important;text-decoration:none !important;line-height:1.9em;vertical-align:middle} +.cke_sc_def {margin:0 0 5px;padding:10px;border:1px solid #ccc;background:#f2f5f9;text-align:center} +.cke_sc_def dl {margin:0 0 5px;text-align:left;zoom:1} +.cke_sc_def dl:after {display:block;visibility:hidden;clear:both;content:""} +.cke_sc_def dt, .cke_sc_def dd {float:left;margin:0;padding:5px 0;border-bottom:1px solid #e9e9e9} +.cke_sc_def dt {width:20%;font-weight:bold} +.cke_sc_def dd {width:30%} + +/* Mobile화면으로 */ +#mobile_cng {display:block;margin:0.3em;padding:0.5em 0;border:1px solid #eee;border-radius:2em;background:#fff;color:#000;font-size:2em;text-decoration:none;text-align:center} + +/* 목록 바로가기 */ +.sanchor {margin:0 0 10px;padding:0;zoom:1} +.sanchor:after {display:block;visibility:hidden;clear:both;content:""} +.sanchor li {float:left;margin-left:-1px;list-style:none} +.sanchor a {display:inline-block;border:1px solid #e9e9e9;background:#f2f5f9;padding:0 7px;height:30px;text-decoration:none;line-height:2.6em} +.sanchor a:focus, .sanchor a:hover {background:#626870;color:#fff;text-decoration:none} +.sanchor a.sanchor_on {background:#626870;color:#fff !important;text-decoration:none} + +/* 콘텐츠별 스타일 */ +.cnt_cmt {display:inline-block;margin:0 0 0 3px;font-weight:bold} + +/* 버튼 */ +a.btn01 {display:inline-block;padding:7px;border:1px solid #ccc;background:#fafafa;color:#000;text-decoration:none;vertical-align:middle} +a.btn01:focus, a.btn01:hover {text-decoration:none} +button.btn01 {display:inline-block;margin:0;padding:7px;border:1px solid #ccc;background:#fafafa;color:#000;text-decoration:none} +a.btn02 {display:inline-block;padding:7px;border:1px solid #3b3c3f;background:#4b545e;color:#fff;text-decoration:none;vertical-align:middle} +a.btn02:focus, .btn02:hover {text-decoration:none} +button.btn02 {display:inline-block;margin:0;padding:7px;border:1px solid #3b3c3f;background:#4b545e;color:#fff;text-decoration:none} + +.btn_confirm {text-align:center} /* 서식단계 진행 */ + +.btn_submit {padding:8px;border:0;background:#ff3061;color:#fff;letter-spacing:-0.1em;cursor:pointer} +fieldset .btn_submit {padding:0 7px;height:24px;line-height:1em} + +a.btn_cancel {display:inline-block;padding:7px;border:1px solid #ccc;background:#fafafa;color:#000;text-decoration:none;vertical-align:middle} +button.btn_cancel {display:inline-block;padding:7px;border:1px solid #ccc;background:#fafafa;color:#000;vertical-align:top;text-decoration:none} + +a.btn_frmline, button.btn_frmline {display:inline-block;padding:0 5px;height:24px;border:0;background:#333;color:#fff;letter-spacing:-0.1em;text-decoration:none;vertical-align:middle} /* 우편번호검색버튼 등 */ +a.btn_frmline {line-height:24px} +button.btn_frmline {font-size:1em} + +/* 게시판용 버튼 */ +a.btn_b01 {display:inline-block;padding:7px;border:1px solid #d9ded9;background:#f2f5f9;color:#000;text-decoration:none;vertical-align:middle} +a.btn_b01:focus, .btn_b01:hover {text-decoration:none} +a.btn_b02 {display:inline-block;padding:7px 7px;border:1px solid #3b3c3f;background:#4b545e;color:#fff;text-decoration:none;vertical-align:middle} +a.btn_b02:focus, .btn_b02:hover {text-decoration:none} +a.btn_admin {display:inline-block;padding:7px;border:1px solid #e8180c;background:#e8180c;color:#fff;text-decoration:none;vertical-align:middle} /* 관리자 전용 버튼 */ +a.btn_admin:focus, a.btn_admin:hover {text-decoration:none} + +/* 선택수정 버튼 */ +.btn_list {margin:0 auto;width:93%} +.btn_list input, .btn_list button {background: none repeat scroll 0 0 #617D46;border: 0 none;color: #FFFFFF;height: 28px;line-height: 2.2em;padding: 0 15px;vertical-align: middle} + +/* 기본테이블 */ +.tbl_wrap table {width:100%;border-collapse:collapse;border-spacing:0} +.tbl_wrap caption {padding:10px 0;font-weight:bold;text-align:left} + +.tbl_head01 {margin:0 0 10px} +.tbl_head01 caption {padding:0;font-size:0;line-height:0;overflow:hidden} +.tbl_head01 thead th {padding:12px 0;border-top:1px solid #d1dee2;border-bottom:1px solid #d1dee2;background:#e5ecef;color:#383838;font-size:0.95em;text-align:center;letter-spacing:-0.1em} +.tbl_head01 thead a {color:#383838} +.tbl_head01 thead th input {vertical-align:top} /* middle 로 하면 게시판 읽기에서 목록 사용시 체크박스 라인 깨짐 */ +.tbl_head01 tfoot th, .tbl_head01 tfoot td {padding:10px 0;border-top:1px solid #c1d1d5;border-bottom:1px solid #c1d1d5;background:#d7e0e2;text-align:center} +.tbl_head01 tbody th {padding:8px 0;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9} +.tbl_head01 td {padding:8px 5px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;line-height:1.5em;word-break:break-all} +.tbl_head01 a {} + +.tbl_head02 {margin:0 0 10px} +.tbl_head02 caption {padding:0;font-size:0;line-height:0;overflow:hidden} +.tbl_head02 thead th {padding:5px 0;border-top:1px solid #d1dee2;border-bottom:1px solid #d1dee2;background:#e5ecef;color:#383838;font-size:0.95em;text-align:center;letter-spacing:-0.1em} +.tbl_head02 thead a {color:#383838} +.tbl_head02 thead th input {vertical-align:top} /* middle 로 하면 게시판 읽기에서 목록 사용시 체크박스 라인 깨짐 */ +.tbl_head02 tfoot th, .tbl_head02 tfoot td {padding:10px 0;border-top:1px solid #c1d1d5;border-bottom:1px solid #c1d1d5;background:#d7e0e2;text-align:center} +.tbl_head02 tbody th {padding:5px 0;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9} +.tbl_head02 td {padding:5px 3px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;line-height:1.4em;word-break:break-all} +.tbl_head02 a {} + +/* 폼 테이블 */ +.tbl_frm01 {margin:0 0 20px} +.tbl_frm01 table {width:100%;border-collapse:collapse;border-spacing:0} +.tbl_frm01 th {width:100px;padding:7px 13px;border:1px solid #e9e9e9;border-left:0;background:#f7f7f7;text-align:left} +.tbl_frm01 td {padding:7px 10px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;background:transparent} +.tbl_frm01 textarea, .frm_input {border:1px solid #e4eaec;background:#f7f7f7;color:#000;vertical-align:middle;line-height:2em} +.tbl_frm01 textarea {padding:2px 2px 3px} +.frm_input {height:22px} +.tbl_frm01 textarea {width:98%;height:100px} +.tbl_frm01 a {text-decoration:none} +.tbl_frm01 .frm_address {margin-top:5px} +.tbl_frm01 .frm_file {display:block;margin-bottom:5px} +.tbl_frm01 .frm_info {display:block;padding:0 0 5px;line-height:1.4em} + +/* 자료 없는 목록 */ +.empty_table {padding:50px 0 !important;text-align:center} +.empty_list {padding:20px 0 !important;text-align:center} + +/* 필수입력 */ +.required, textarea.required {background:url('../img/wrest.gif') #f7f7f7 top right no-repeat !important} + +/* 테이블 그리드 padding 0 5px 고려한 넓이 */ +.grid_1 {width:40px} +.grid_2 {width:90px} +.grid_3 {width:140px} +.grid_4 {width:190px} +.grid_5 {width:240px} +.grid_6 {width:290px} +.grid_7 {width:340px} +.grid_8 {width:390px} +.grid_9 {width:440px} +.grid_10 {width:490px} +.grid_11 {width:540px} +.grid_12 {width:590px} +.grid_13 {width:640px} +.grid_14 {width:690px} +.grid_15 {width:740px} +.grid_16 {width:790px} +.grid_17 {width:840px} +.grid_18 {width:890px} + +/* 테이블 항목별 정의 */ +.td_board {width:120px;text-align:center} +.td_chk {width:30px;text-align:center} +.td_date {width:60px;text-align:center} +.td_datetime {width:110px;text-align:center} +.td_default {width:60px;text-align:center} +.td_dvr {width:30px;text-align:center} +.td_group {width:100px;text-align:center} +.td_imgsmall {width:60px;text-align:center} +.td_num {width:50px;text-align:center} +.td_numbig {width:100px;text-align:center} +.td_nick {width:100px;text-align:center} +.td_name {width:100px;text-align:left} +.td_namesmall {width:50px;text-align:left} +.td_mb_id {width:100px;text-align:center} +.td_mng {width:80px;text-align:center} +.td_mngsmall {width:50px;text-align:center} +.td_statsmall {width:50px;text-align:center} + +/* 새창 기본 스타일 */ +.new_win {} +.new_win .tbl_wrap {margin:0 20px} +.new_win #win_title {margin:0 0 20px;padding:20px;border-top:3px solid #4e5d60;border-bottom:1px solid #e9e9e9;background:#fff;font-size:1.2em} +.new_win #win_title .sv {font-size:0.75em;line-height:1.2em} +.new_win .win_ul {margin:-20px 0 20px 0;padding:0 20px;border-bottom:1px solid #455255;background:#484848;list-style:none;zoom:1} +.new_win .win_ul:after {display:block;visibility:hidden;clear:both;content:""} +.new_win .win_ul li {float:left;margin-left:-1px} +.new_win .win_ul a {display:block;padding:10px 10px 8px;border-right:1px solid #455255;border-left:1px solid #455255;color:#fff;font-family:dotum;font-weight:bold;text-decoration:none} +.new_win .win_desc {margin:0 20px} + +.new_win .win_btn {clear:both;padding:20px;text-align:center} /* 새창용 */ +.new_win .win_btn button {display:inline-block;padding:0 10px;height:30px;border:0;background:#4b545e;color:#fff;line-height:2em;cursor:pointer} +.new_win .win_btn input {padding:0 10px;height:30px;line-height:2em} +.new_win .win_btn a {display:inline-block;padding:0 10px;height:30px;background:#4b545e;color:#fff;vertical-align:middle;line-height:2.4em} +.new_win .win_btn a:focus, .new_win .win_btn a:hover {text-decoration:none} + +/* 내용관리 */ +#ctt {margin:10px 0;padding:10px;border:1px solid #e9e9e9} +.ctt_admin {text-align:right} +#ctt header h1 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#ctt_con {padding:10px 0} +.ctt_img {text-align:center} + +/* 자바스크립트 alert 대안 */ +#validation_check {margin:100px auto;width:500px} +#validation_check h1 {margin-bottom:20px;font-size:1.3em} +#validation_check p {margin-bottom:20px;padding:30px 20px;border:1px solid #e9e9e9;background:#fff} + +/* 사이드뷰 */ +.sv_wrap {display:inline-block;position:relative;font-weight:normal} +.sv_wrap .sv {z-index:1000;display:none;margin:5px 0 0;border:1px solid #283646;background:#111} +.sv_wrap .sv a {display:inline-block !important;margin:0 !important;padding:3px !important;width:94px;border-bottom:1px solid #283646;color:#fff !important} +.sv_wrap a:focus, .sv_wrap a:hover, .sv_wrap a:active {text-decoration:none !important} +.sv_on {display:block !important;position:absolute;top:10px;left:20px;width:auto;height:auto !important} +.sv_nojs .sv {display:block} + +/* 페이징 */ +.pg_wrap {clear:both;margin:0 0 20px;padding:20px 0 0;text-align:center} +.pg {} +.pg_page, .pg_current, .qa_page {display:inline-block;padding:0 8px;height:25px;color:#000;letter-spacing:0;line-height:2.2em;vertical-align:middle} +.pg a:focus, .pg a:hover {text-decoration:none} +.pg_page, .qa_page {background:#e4eaec;text-decoration:none} +.pg_start, .pg_prev {/* 이전 */} +.pg_end, .pg_next {/* 다음 */} +.pg_current {display:inline-block;margin:0 4px 0 0;background:#333;color:#fff;font-weight:normal} + +/* ########## 쇼핑몰 컨텐츠 ########## */ +/* 인덱스 이미지 출력 */ +#sidx_img {margin:0 0 20px} +#sidx_img img {max-width:100%;height:auto} + +/* 마이페이지 */ +#smb_my {} + +#smb_my_ov {margin:0 0 20px} +#smb_my_ov h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#smb_my_act {margin:0 0 10px;;zoom:1} +#smb_my_act:after {display:block;visibility:hidden;clear:both;content:""} +#smb_my_act ul {float:right;margin:0;padding:0;list-style:none} +#smb_my_act li {float:left;margin:0 0 0 4px} +#smb_my_ov dl {margin:0;border:1px solid #e9e9e9;background:#f2f5f9;zoom:1} +#smb_my_ov dl:after {display:block;visibility:hidden;clear:both;content:''} +#smb_my_ov dt {float:left;padding:7px 10px;width:100px;border-bottom:1px solid #e9e9e9;font-weight:bold} +#smb_my_ov dd {float:left;margin:0;padding:7px 10px;width:220px;border-bottom:1px solid #e9e9e9} +#smb_my_ovaddt {border-bottom:0 !important} +#smb_my_ovaddd {width:590px !important;border-bottom:0 !important} + +#smb_my_od {margin:0 0 20px} +#smb_my_od h2 {margin:0 0 10px} + +#smb_my_wish h2 {margin:0 0 10px} + +.smb_my_more {text-align:right} + +.smb_my_img {width:90px;text-align:center} + +/* 장바구니 */ +#sod_bsk {} +.sod_img {width:90px;text-align:center} +.sod_opt {margin:5px 0;border:1px solid #e9e9e9;border-bottom:0;background:#f2f5f9} +.sod_opt ul {margin:0;padding:0;list-style:none} +.sod_opt li {padding:3px;border-bottom:1px solid #e9e9e9} +.sod_option_btn .mod_options {margin:0;padding:3px 0;width:100%;border:0;background:#ff882a;color:#fff;cursor:pointer} + +#sit_opt_added {margin:0;padding:0;border:1px solid #e9e9e9;border-bottom:0;background:#fff;list-style:none} +#sit_opt_added li {padding:10px 20px;border-bottom:1px solid #e9e9e9} +#sit_opt_added li div {margin:5px 0 0;text-align:right} +#sit_opt_added button {margin:0 0 0 1px} + +#sod_bsk_list {position:relative} +#sod_bsk_list #mod_option_frm {z-index:10000;position:absolute;top:0;left:99px;padding:20px;width:500px;height:auto !important;height:500px;max-height:500px;border:1px solid #000;background:#f2f5f9;overflow-y:scroll;overflow-x:none} + +#sod_bsk_tot {margin:0 0 20px;padding:10px;border:1px solid #e9e9e9;background:#f2f5f9;zoom:1} +#sod_bsk_tot:after {display:block;visibility:hidden;clear:both;content:""} +#sod_bsk_tot dt, #sod_bsk_tot dd {float:left;padding:12px 0;border-bottom:1px solid #e9e9e9} +#sod_bsk_tot dt {padding-left:2%;width:48%;font-weight:bold} +#sod_bsk_tot dd {margin:0;padding-right:2%;width:47%;text-align:right} +.sod_bsk_cnt {background:#ff3061;color:#fff} +.sod_bsk_point {border-bottom:0 !important} + +#sod_bsk_act {text-align:center} +#sod_bsk_act p {margin:0 0 10px} + +/* 위시리스트 */ +#sod_ws {} +.sod_ws_img {width:90px;text-align:center} +#sod_ws_act {text-align:center} + +/* 주문서 작성 */ +.display_setup_message {margin:0 0 10px;padding:15px;border:1px solid #fccdff;background:#ffeef9} +.display_setup_message strong {display:block;margin:0 0 10px} + +#sod_frm {} +#sod_frm h2 {margin:0 0 10px} + +#sod_frm p {margin:0 0 10px} + +#sod_list {position:relative} +#sod_list #cp_frm {z-index:10000;position:absolute;top:0;left:99px;padding:20px;width:500px;height:auto !important;height:500px;max-height:500px;border:1px solid #000;background:#f2f5f9;overflow-y:scroll;overflow-x:none} + +#sod_frm_orderer {margin:20px 0 40px} +#sod_frm_orderer #od_addr_jibeon, #sod_frm_taker #od_b_addr_jibeon {display:inline-block;margin:5px 0 0} + +#sod_frm_same {margin:0 0 10px} + +#sod_frm #od_memo {height:50px} + +#sod_frm p#sod_frm_pt {margin:10px 0 5px} +#sod_frm #sod_frm_pt_alert {margin:0 0 10px} + +#sod_frm #display_pay_process {text-align:center} +#sod_frm #display_pay_process span {display:block;margin:5px 0 0} + +#sod_frm_pay {position:relative} +#sod_frm_pay h2 {margin:0 0 10px} +#sod_frm_pay .tbl_wrap th {width:auto !important;font-weight:bold;text-align:center !important} +#sod_frm_pay .tbl_wrap td {padding:8px 5px 6px !important;border-top:1px solid #e9e9e9 !important;border-bottom:1px solid #e9e9e9 !important;line-height:1.5em !important;word-break:break-all !important} +#sod_frm_pay_info {margin:0 0 10px} + +#sod_frm_pay #sc_coupon_frm, #sod_frm_pay #od_coupon_frm {z-index:10000;position:absolute;top:0;left:99px;padding:20px;width:500px;height:auto !important;height:500px;max-height:500px;border:1px solid #000;background:#f2f5f9;overflow-y:scroll} + +#sod_frm_paysel {margin:0 0 20px;padding:10px;border:1px solid #e9e9e9;background:#f2f5f9;text-align:center} +#sod_frm_paysel legend {position:absolute;font-size:0;line-height:0;overflow:hidden} +#sod_frm_paysel .KPAY{background:url('../../../img/kpay_logo.png') no-repeat;padding-left:37px;display:inline-block} +#sod_frm_paysel .PAYNOW{background:url('../../../img/paynow_logo.png') no-repeat;padding-left:46px;display:inline-block} +#sod_frm_paysel .PAYCO{background:url('../../../img/payco_logo.png') no-repeat 1px;padding-left:46px;display:inline-block} + +#settle_bank {margin:10px 0 0} + +#sod_frm_escrow {margin:30px 0 0} + +#display_pay_process {padding:20px;text-align:center} + +/* 배송지 목록 */ +#sod_addr .td_mng button {margin:0;padding:0;border:0;background:transparent} + +/* 주문내역 */ +#sod_v {} +#sod_v .basic_tbl {text-align:center} +#sod_v_info {margin:0 0 10px} + +/* 주문상세내역 */ +#sod_fin {} + +#sod_fin_no {margin:0 0 20px} + +#sod_sts_wrap {margin:0 0 10px;text-align:right} +#sod_sts_explan {display:none} + +#sod_fin_legend {padding:7px 5px 0;border:1px solid #e9e9e9;text-align:left;zoom:1} +#sod_fin_legend:after {display:block;visibility:hidden;clear:both;content:''} +#sod_fin_legend dt {clear:both;float:left;margin:0 0 5px;width:50px;font-weight:bold} +#sod_fin_legend dd {float:left;margin:0} + +#sod_fin #sod_bsk_tot {border-bottom:0 !important} + +#request_form {position:relative} +#request_form div {display:none;z-index:10000;position:absolute;top:23px;left:0;padding:20px 0;width:520px;border:1px solid #000;background:#f2f5f9;text-align:center} +#request_form .frm_input {width:300px;background:#fff !important} +#request_form .btn_frmline, #request_form .btn_cancel {vertical-align:middle !important} +#request_form .btn_frmline {padding:0 10px;line-height:1.6em} + +#sod_req_btn {margin:0 0 10px} +#sod_req_btn button {background:#626870} + +#sod_req_log {margin:0 0 20px} +#sod_req_log ul {margin:0;padding:0;border-top:1px solid #e9e9e9;background:#f2f5f9;list-style:none} +#sod_req_log li {padding:10px 10px 20px;border:1px solid #e9e9e9;border-top:0} +#sod_req_log h3 {margin:20px 0 10px} +.sod_req_log_view table {margin:0} +.sod_req_log_view caption {padding:10px 0;font-size:1em;font-weight:bold;text-align:left;line-height:1em} +.sod_req_log_view caption span {color:#ff3061} +.sod_req_log_view th {border-top:1px solid #e9e9e9;background:#f7f7f7 !important;color:#000 !important;text-align:center} +.sod_req_log_view td {background:#fff;color:#000} +.sod_req_log_view p {padding:10px 15px;border-bottom:1px solid #e9e9e9;background:#fff;color:#000} +.sod_req_log_view .sod_req_it {width:270px} +.sod_req_log_view button {margin:0;padding:0;border:0;background:transparent;color:#ff3061;text-decoration:underline;vertical-align:middle;cursor:pointer} + +#sod_fin_list h2 {margin:0 0 10px} +#sod_fin_list td {height:30px} + +#sod_fin_view {border:1px solid #e9e9e9} +#sod_fin_view h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#sod_fin_view h3 {margin:0 0 10px} +#sod_fin_view .basic_tbl th {padding:0 10px;border-top:1px solid #eee;border-bottom:1px solid #eee;background:#f2f5f9;text-align:left} + +#sod_fin_pay {padding:10px;border-bottom:1px solid #e9e9e9} + +#sod_fin_orderer {padding:10px;border-bottom:1px solid #e9e9e9} + +#sod_fin_receiver {padding:10px;border-bottom:1px solid #e9e9e9} + +#sod_fin_dvr {padding:10px} +#sod_fin_dvr .dvr_link {color:#ff3061;text-decoration:underline} + +#sod_fin_tot {margin:0 0 30px;padding:10px;border:1px solid #e9e9e9;border-top:0;background:#565e60;color:#fff} +#sod_fin_tot h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#sod_fin_tot ul {margin:0;padding:0;list-style:none} +#sod_fin_tot li {padding:10px;border-bottom:1px solid #6f7a7d;zoom:1} +#sod_fin_tot li:after {display:block;visibility:hidden;clear:both;content:""} +#sod_fin_tot #alrdy {border-bottom:0 !important} +#sod_fin_tot strong {float:right} + +#sod_fin_cancel {text-align:center} +#sod_fin_cancel h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#sod_fin_cancel button {padding:10px;border:0;background:#ff3600;color:#fff} +#sod_fin_cancelfrm {display:none;margin:10px 0 0} +#sod_fin_cancelfrm .frm_input {background:#fff} + +#sod_fin_test {padding:10px} + +/* 주문상세내역 중 현금영수증 발급 */ +#scash {} +#scash section {padding:10px 0} +#scash h2 {margin:0 0 10px;text-align:center} +#scash .basic_tbl th {padding:0 10px;border-top:1px solid #eee;border-bottom:1px solid #eee;background:#f2f5f9;text-align:left} +#scash_apply {padding:10px 0 20px;text-align:center} +#scash_apply button {padding:10px;border:0;background:#565e60;color:#fff} +#scash_copy {text-align:center} + +/* 공지사항 및 커뮤니티 새글 */ +#sidx_lat {padding:15px 0 0;border-top:1px solid #ddd} +#sidx_lat h2 {text-align:center} + +/* 배너 인덱스 출력 */ +#sbn_idx {} + +/* 상품검색 */ +#ssch_frm {padding:20px;border:1px solid #e9e9e9;background:#f2f5f9;zoom:1} +#ssch_frm:after {display:block;visibility:hidden;clear:both;content:""} +#ssch_frm div {margin:0 0 5px} +#ssch_frm strong, #ssch_frm .ssch_lbl {display:inline-block;width:100px;font-weight:bold} +#ssch_frm .frm_input {background:#fff} +#ssch_frm .btn_submit {padding:0 8px;height:24px} +#ssch_frm p {padding:10px 0;border-top:1px solid #e9e9e9;line-height:1.5em} +#ssch_frm #ssch_sort {float:left;margin:0;padding:0;list-style:none;zoom:1} +#ssch_frm #ssch_sort:after {display:block;visibility:hidden;clear:both;content:""} +#ssch_frm #ssch_sort li {float:left;margin:0 1px 0 0} +#ssch_frm #ssch_ov {float:right} + +#ssch_cate {} +#ssch_cate ul {margin:10px 0;padding:10px 20px 20px;border-bottom:1px solid #e9e9e9;list-style:none;zoom:1} +#ssch_cate ul:after {display:block;visibility:hidden;clear:both;content:""} +#ssch_cate li {float:left;margin:0 10px 0 0;padding:0 10px 0 0;border-right:1px solid #e9e9e9} +#ssch_cate a {} +#ssch_cate a span {font-weight:bold} + +/* 쇼핑몰 이벤트 */ +#sev {} +.sev_admin {margin:0 0 10px;text-align:right} + +/* 쿠폰 */ +#coupon .td_numbig {width:150px} +#coupon .td_datetime {width:180px} \ No newline at end of file diff --git a/theme/basic/css/mobile_shop.css b/theme/basic/css/mobile_shop.css new file mode 100644 index 000000000..2ef73afb0 --- /dev/null +++ b/theme/basic/css/mobile_shop.css @@ -0,0 +1,713 @@ +@charset "utf-8"; + +/* 초기화 */ +html {overflow-y:scroll} +body {margin:0;padding:0;font-size:0.75em;height:100%;font-family:sans-serif; } +html, h1, h2, h3, h4, h5, h6, form, fieldset, img {margin:0;padding:0;border:0} +h1, h2, h3, h4, h5, h6 {font-size:1em} +article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {display:block} +header ul, nav ul, footer ul {margin:0;padding:0;list-style:none} +legend {position:absolute;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden} +label, input, button, select, img {vertical-align:middle} +input, button {margin:0;padding:0;font-size:1em;} +button,input[type=submit]{cursor:pointer;} +input[type=text], input[type=password], input[type=submit], input[type=image], button {border-radius:0;font-size:1em;-webkit-appearance:none} +textarea, select {font-size:1em;font-family:dotum} +textarea {border-radius:0;-webkit-appearance:none} +p {margin:0;padding:0;word-break:break-all} +hr {display:none} +pre {overflow-x:scroll;font-size:1.1em} +a:link, a:visited {color:#000;text-decoration:none} +ul,li{list-style:none;padding:0;margin:0;} + +/* 팝업레이어 */ +#hd_pop {z-index:1000;position:relative;margin:0 auto;width:100%;height:1px} +#hd_pop h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +.hd_pops {position:absolute;border:1px solid #e9e9e9;background:#fff} +.hd_pops_con {} +.hd_pops_footer {padding:10px 0;background:#000;color:#fff;text-align:right} +.hd_pops_footer button {margin-right:5px;padding:5px 10px;border:0;background:#393939;color:#fff} + +/* 상단 레이아웃 */ +#hd {position:relative;margin:0 0 ;padding: 0;text-align:center} +#hd h1 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} + +#hd_tnb{margin-top:-1px} +#hd_tnb:after {display:block;visibility:hidden;clear:both;content:""} +#hd_tnb li{float:left;width:25%;} +#hd_tnb li a{display:block;color:#a8a8a8;background:#f9f9f9;border:1px solid #e9e9e9;border-right:none;height:30px;line-height:30px;font-size:0.92em} +#hd_tnb li a:hover{background:#f1f1f1} +#hd_tnb li:first-child a{border-left:none} +#hd_tnb li .tnb_cart {color:#34b5a1} +#hd_tnb li .tnb_cart span{background:url(../mobile/shop/img/cart.gif) no-repeat;display:inline-block;width:11px;height:9px;margin-right:2px} +#logo{margin:25px 0} + +#hd_sch_open {overflow:hidden;position:absolute;top:48px;right:10px;padding:0 10px;height:2.6em;border:0;background:url(../mobile/shop/img/sch.gif) no-repeat 50% 50%;color:#fff;font-size:0.01em;width:30px;height:30px;-webkit-appearance:none;text-indent:-999px;} +#hd_sch {display:none;z-index:10;width:100%;height:100%;background:#f8f8f8;text-align:center;border-top:1px solid #e9e9e9} +#hd_sch h2 {margin:0 0 10px} +#hd_sch .sch_inner {padding:10px;position:relative;} +#hd_sch .sch_inner h2{position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#hd_sch .frm_input {height:30px;border-color:#c2c2c2;background:#fff;line-height:30px;width:100%;text-indent:5px} +#hd_sch .btn_submit {height:2.7em;position:absolute;top:10px;right:15px;background:url(../mobile/shop/img/sch2.gif) no-repeat 50% 50%;text-indent:-999px;width:30px;height:30px;} +#hd_sch .pop_close {text-align:center;padding:5px;border:0;background:#626870;color:#fff;margin-top:5px} + +#hd_ct {position:absolute;top:48px;left:10px;width:30px;height:30px;border:0;background:url(../mobile/shop/img/cate.gif) no-repeat 50% 50%;color:#fff;font-size:1em;text-indent:-9999px;-webkit-appearance:none;} + +#hd_mb:after {display:block;visibility:hidden;clear:both;content:""} +#hd_mb li{float:left;width:25%;} +#hd_mb li a{display:block;background:#34b5a1;color:#fff;height:40px;line-height:40px;border-left:1px solid #2d9e8c;font-weight:bold} +#hd_mb li a:hover{background:#2d9e8c} +#hd_mb li:first-child a{border-left:none} + +/*카테고리*/ +#category{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0, 0, 0,0.8);z-index:99999;-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; -webkit-backface-visibility: hidden;} +#category .ct_wr{width:250px;height:100%;overflow-y:auto;background:#fff;} +#category ul.cate_tab{width:100%;} +#category ul.cate_tab:after{display:block;visibility:hidden;clear:both;content:""} +#category ul.cate_tab li{float:left;width:33.3%;font-size:0.92em;} +#category ul.cate_tab li a{display:block;height:30px;line-height:30px;color:#a8a8a8;background:#f9f9f9;border:1px solid #e9e9e9;border-left:none} +#category ul.cate_tab li a.ct_tab_sl{background:#fff;border-bottom-color:#fff;color:#545454} +#category ul.cate{background:#fff;;width:100%;text-align:left;text-indent:10px;} +#category ul.cate>li{line-height:35px;border-bottom:1px solid #e9e9e9;} +#category ul.cate li{position:relative;font-weight:bold;} +#category ul.cate li a{color:#545454;display:block; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;padding-right:30px;} +#category ul.cate li .ct_op{display:inline-block;text-indent:-999px;background:url(../mobile/shop/img/cate_op.gif) no-repeat 10px 50% ;height:35px; width:30px;position:absolute;top:0;right:0;border:none} +#category ul.cate li a:hover{color:#34b5a1} +#category ul.cate li .ct_cl{background-position:-12px 50%} +#category ul.sub_cate{display:none} +#category ul.sub_cate1 li{text-indent:14px;background:#fafafa;border-top:1px solid #e9e9e9;font-weight:normal} +#category ul.sub_cate2 li{text-indent:25px;background:#f6f6f6;} +#category ul.sub_cate3 li{text-indent:40px;background:#f3f3f3;} +#category ul.sub_cate4 li{text-indent:55px;background:#efefef;} +#category .pop_close{position:absolute;top:10px;left:260px;width:30px;height:30px; background:url(../mobile/shop/img/close.png) no-repeat 50% 50%;;border:none;text-indent:-99999px} + +/* 중간 레이아웃 */ +#container {padding:0 } +#container_title {margin:0 ;padding:0;font-size:1.083em;text-align:center;letter-spacing:0.2em;font-weight:bold;border-bottom:1px solid #e9e9e9;padding:13px;} + +/* 내용관리 */ +#ctt {margin:10px 0;padding:10px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9} +.ctt_admin {margin:0 5px;text-align:right} +#ctt header h1 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#ctt_con {padding:10px 0} +.ctt_img {text-align:center} + +/* 하단 레이아웃 */ +#ft {margin:20px 0 0;padding:15px 0 0;border-top:1px solid #e9e9e9;font-size:0.917em;color:#7c7b7b;text-align:center;letter-spacing:-0.1em} +#ft h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#ft p {margin:0;padding:10px 0;line-height:1.8em} +#ft_to_top {display:block;margin:10px 10px ;padding:10px;background:#f2f5f9} + +/* 목록 바로가기 */ +.sanchor {margin:0 0 5px;padding:0} +.sanchor:after {display:block;visibility:hidden;clear:both;content:""} +.sanchor li {float:left;list-style:none;width:25%;border-top:2px solid #000;text-align:center; overflow: hidden; white-space: nowrap;letter-spacing:0.2em;font-size:0.93em} +.sanchor a {display:block;padding:10px;border-left:1px solid #ededed;border-bottom:1px solid #ededed;background:#fcfcfc;text-decoration:none;color:#484848} +.sanchor a:focus, .sanchor a:hover {background:#eee;text-decoration:none} +.sanchor a.sanchor_on {background:#fff;text-decoration:none;border-bottom:1px solid #fff;} + +/* ########## 쇼핑몰 컨텐츠 ########## */ +/*메인배너*/ +#main_bn{position:relative;margin:0 0 20px;height:auto} +#main_bn .bn_img li{width:100%} +#main_bn .bn_img li img{width:100%} +#main_bn .bn_img{overflow:hidden} +#main_bn .bn_img li {position:relative;float:left;} +#main_bn .bn_img li.bn_first{display:block} +#main_bn .bn_silde_btn{width:100%;text-align:center;margin-top:5px} +#main_bn .bn_silde_btn button{background:url(../mobile/shop/img/best_btn.gif) no-repeat 5px 5px;border:none;text-indent:-9999px;width:20px;height:20px;} +#main_bn .bn_silde_btn button.bn_sl{background-position:-11px 5px;border:none;text-indent:-9999px;width:20px;height:20px} + +/* 인덱스 이미지 출력 */ +#sidx {padding:0;margin-bottom:20px;margin-top:10px} +#slide_tab {display:none} +#sidx_slide {position:relative;top:0;left:0;width:100%;overflow:hidden} +.sidx_slide {position:absolute;top:0;left:0;width:100%} + +.swipe { + overflow: hidden; + visibility: hidden; + position: relative; +} +.swipe-wrap { + overflow: hidden; + position: relative; +} +.swipe-wrap > div { + float:left; + width:100%; + position: relative; +} + +/* 사용후기 모음 */ +#sps_sch {margin: 10px} +#sps_sch a {display:inline-block;padding:0 8px;height:23px;background:#333;color:#fff;text-decoration:none;vertical-align:middle;line-height:23px} +#sps_sch .btn_submit {padding:0 8px;height:23px;vertical-align:middle} + +#sps {zoom:1} +#sps ol {margin:0;padding:0 10px;border-top:1px solid #e9e9e9;list-style:none} +#sps li {position:relative;padding:10px 0;border-bottom:1px solid #e9e9e9} +#sps li:after {display:block;visibility:hidden;clear:both;content:""} + +.sps_img {position:absolute;top:10px;left:0px} +.sps_img span {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} + +#sps dl {margin:5px 0 10px; color: #888; font-size: 0.917em;overflow:hidden} +#sps dt {float:left;margin:0 0 5px} +#sps dd {float:left;margin:0 15px 5px 5px} +#sps dd img {position:relative;top:-2px} + +.sps_section {margin-left:80px;display:block;} +.sps_section p {padding:0;width:100%} +.sps_con_full {padding:0;height:auto !important} +.sps_con_btn {margin:5px 0 0;text-align:right} +.sps_con_btn button {margin:0;padding:5px;border:0;background:#565e60;color:#fff} + +/* 상품문의 모음 */ +#sqa_sch {margin:10px 10px} +#sqa_sch #sfl{height:24px} +#sqa_sch a {display:inline-block;padding:0 8px;height:2em;background:#333;color:#fff;text-decoration:none;vertical-align:middle;line-height:1.9em} +#sqa_sch .btn_submit {padding:0 8px;height:23px;vertical-align:middle} + +#sqa {zoom:1;} +#sqa ol {margin:0;padding:0;border-top:1px solid #e9e9e9;list-style:none;padding:0 10px} +#sqa li {position:relative;padding:10px 0;border-bottom:1px solid #e9e9e9} +#sqa li:after {display:block;visibility:hidden;clear:both;content:""} + +.sqa_img {position:absolute;top:10px;left:0px} +.sqa_img span {position:absolute;font-size:0;line-height:0;overflow:hidden;width:0;} + +#sqa dl {margin:5px 0 10px; color: #888; font-size: 0.917em;overflow:hidden} +#sqa dt {float:left;margin:0 0 5px} +#sqa dd {float:left;margin:0 15px 5px 5px} +#sqa dd img {position:relative;top:-2px} + +.sqa_section {margin-left:80px;display:block} +.sqa_section .sqa_con {padding:10px;background:#f2f5f9;line-height:1.7em} +.sqa_section p {padding:0;width:100%} +.sqa_con_full {padding:0;height:auto !important} +.sqa_con_btn {margin:5px 0 0;text-align:right} +.sqa_con_btn button {margin:0;padding:5px;border:0;background:#565e60;color:#fff} + +#sqa .sit_qa_qaq,#sqa .sit_qa_qaa {padding:10px 5px 10px ;position:relative} + +/* 마이페이지 */ +#smb_my {padding:10px;} + +#smb_my_ov {margin:0 0 20px} +#smb_my_ov ul:after {display:block;visibility:hidden;clear:both;content:''} +#smb_my_ov ul li{width:48.5%;float:left;padding:10px 0;background:#f2f2f2;text-indent:10px;height:55px;position:relative;border:1px solid #dbdbdb;margin-bottom:5px} +#smb_my_ov ul li:first-child{float:right;} +#smb_my_ov ul li a{position:absolute;bottom:10px;right:10px;color:#ff3e5e;font-weight:bold;font-size:1.3em} +#smb_my_ov h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#smb_my_ov dl {margin:0;border:1px solid #dbdbdb;font-size:0.92em;color:#666} +#smb_my_ov dl:after {display:block;visibility:hidden;clear:both;content:''} +#smb_my_ov dt {float:left;height:34px ;line-height:34px;width:35%;border-bottom:1px solid #e9e9e9;font-weight:bold;text-indent:10px;} +#smb_my_ov dd {float:left;margin:0;height:34px ;line-height:34px;width:65%;border-bottom:1px solid #e9e9e9} +#smb_my_ov dt.my_point{background:#f2f2f2;width:49%;} +#smb_my_ov .ov_addr {border-bottom:0;height:auto;line-height:24px;padding: 5px 0} + +#smb_my_od {margin:0 0 20px} +#smb_my_od h2 {margin:0 0 10px} +#smb_my_od .td_stat {width:100px} + +#smb_my_wish h2 {margin:0 0 10px} +#smb_my_wish ul {margin:0;padding:0;list-style:none} +#smb_my_wish li {position:relative;padding:5px 0 30px;min-height:35px;border:1px solid #e9e9e9;margin-bottom:5px;} +#smb_my_wish li:nth-of-type(1) {border-top:1px solid #e9e9e9} +#smb_my_wish .wish_img {position:absolute;top:10px;left:10px} +#smb_my_wish .info_link {display:block;padding:5px 0;font-size:1.2em;} +#smb_my_wish .info_date {position:absolute;bottom:10px;right:10px;color:#737373} + +/* 장바구니 주문서 공통 */ +#sod_chk {padding:0 0 5px;} +.sod_list {position:relative;margin:0;padding:0;list-style:none} +.sod_list .sod_li {position:relative;padding:0;border:1px solid #e9e9e9;margin:10px 0} +.sod_list .sod_li:after {display:block;visibility:hidden;clear:both;content:""} +.sod_list .li_chk{position:absolute;top:10px;left:10px;} +.sod_list .li_name{min-height:130px} +.sod_list .li_name a,.sod_list .li_name strong{display:block;padding: 0 10px 0 25px;border-bottom:1px solid #e9e9e9;height:35px;line-height:35px} +.sod_list .li_name strong{padding-left:10px} +.sod_list .total_img{position:absolute;top:45px;left:10px;} +.sod_list .sod_opt{padding:10px 10px 5px;margin-left:90px;color:#9e9e9e;font-size:0.93em} +.sod_list .sod_opt li{margin-bottom:3px} +.sod_list .li_cp{position:relative} +.sod_list .li_cp .cp_btn, .sod_list .li_cp .cp_cancel, .sod_list .li_mod .mod_btn {margin:0;padding:5px 8px;border:0;background:#000;color:#fff;font-size:0.93em} +.sod_list .li_cp .cp_cancel,.odf_tbl #od_coupon_cancel,.odf_tbl #sc_coupon_cancel{border:1px solid #999;color:#777;background:#fafafa;margin-left:3px;padding:4px 5px} +.sod_list .li_prqty{margin:10px;} +.sod_list .li_prqty:after {display:block;visibility:hidden;clear:both;content:""} +.sod_list .li_prqty .li_prqty_sp{width:33%;display:inline-block;float:left;text-align:center;line-height:2.2em;border-top:1px solid #d3d3d3;border-bottom:1px solid #d3d3d3;border-left:1px solid #e9e9e9;color:#9e9e9e;font-size:0.93em;margin-left:-1px} +.sod_list .li_prqty .prqty_price{border-left:1px solid #d3d3d3;} +.sod_list .li_prqty .prqty_sc{border-right:1px solid #d3d3d3;} +.sod_list .li_prqty .li_prqty_sp span{display:block;background:#f2f2f2;} +.sod_list .li_total {position:relative;border-top:1px solid #e9e9e9;margin:10px 10px 0;} +.sod_list .total_span {display:block;position:relative;padding:5px 0;text-align:right;color:#343434} +.sod_list .total_span span{position:absolute;top:5px;left:0} +.sod_list .total_span strong{font-size:1.2em} +#sit_opt_added {margin:0;padding:0;border:1px solid #e9e9e9;border-bottom:0;background:#fff;list-style:none;} +#sit_opt_added li {padding:10px ;border-bottom:1px solid #e9e9e9;margin-bottom:5px} +#sit_opt_added li:after {display:block;visibility:hidden;clear:both;content:""} +#sit_opt_added li div {height:25px;margin:5px 0 0;text-align:right;position:relative;width:111px;float:right} +#sit_opt_added .btn_frmline {height:1.85em;line-height:1.85em;background:url(../mobile/shop/img/del_btn.gif) no-repeat 1px 2px;position:absolute;top:0;right:0 ;text-indent:-999px;width:25px;height:25px;padding:0} +#sit_opt_added li div .sit_qty_plus{overflow:hidden;position:absolute;top:0;left:57px;background:url(../mobile/shop/img/add.gif) no-repeat -1px -1px;text-indent:-999px;border:1px solid #ccc;width:25px;height:25px} +#sit_opt_added li div .sit_qty_minus{overflow:hidden;position:absolute;top:0;left:0;background:url(../mobile/shop/img/add.gif) no-repeat -26px -1px ;text-indent:-999px;border:1px solid #ccc;width:25px;height:25px} +#sit_opt_added li div .sit_opt_del{background:url(../mobile/shop/img/del_btn.gif) no-repeat 1px 2px;position:absolute;top:0;right:0 ;text-indent:-999px;width:25px;height:25px;padding:0} +#sit_opt_added li div .frm_input{width:32px;border:1px solid #ccc;height:23px;padding:0 !important;line-height:25px;text-align:center;background:#fff;position:absolute;top:0;left:24px} +#sit_tot_price {margin:15px 0;font-size:1.3em;font-weight:bold;text-align:right;position:relative} +#sit_tot_price span{position:absolute;top:0;left:10px} +select.it_option,select.it_supply { width: 100%;padding: 5px;border: 0;border-radius: 5px;height: 28px;-webkit-appearance: none;border:1px solid #aaa;background: url(../mobile/shop/img/select.gif) no-repeat right #fafafa;} + +/*수량*/ +#sit_opt_added li .sit_opt_qty{position:relative;width:81px;float:right;text-align:center !important;} +#sit_opt_added li .sit_opt_qty .frm_input{width:32px;border:1px solid #ccc;height:23px;padding:0 !important;line-height:25px;text-align:center;background:#fff} +#sit_opt_added li .sit_opt_qty .sit_qty_plus{position:absolute;top:0;right:0;background:url(../mobile/shop/img/add.gif) no-repeat -1px -1px;text-indent:-999px;border:1px solid #ccc;width:25px;height:25px} +#sit_opt_added li .sit_opt_qty .sit_qty_minus{position:absolute;top:0;left:0;background:url(../mobile/shop/img/add.gif) no-repeat -26px -1px ;text-indent:-999px;border:1px solid #ccc;width:25px;height:25px} + +/* 장바구니 */ +#sod_bsk {margin:10px} + +#sod_bsk_list {position:relative} +#sod_bsk_list #mod_option_frm {z-index:10000;position:absolute;top:0;left:0;width:100%} +#sod_bsk_list #mod_option_frm form{border:2px solid #34b5a1;background:#fff;padding:10px;max-height:500px;overflow-y:scroll} +html.no-overflowscrolling #mod_option_frm {height:auto;max-height:10000px !important} /* overflow 미지원 기기 대응 */ +#sod_bsk_list #mod_option_frm .sit_ov_tbl{background:#ededed;margin-top:5px} +#sod_bsk_list #mod_option_frm .sit_ov_tbl th,#sod_bsk_list #mod_option_frm .sit_ov_tbl td{border:none;padding-left:5px;font-weight:normal;text-align:left} +#sod_bsk_list #mod_option_frm .sit_ov_tbl th{width:90px} +#sod_bsk_list #mod_option_frm#sit_tot_price{font-size:1.2em} +#sod_bsk_list #mod_option_frm #sit_tot_price span{left:0;} +#sod_bsk_list #mod_option_frm .btn_confirm{overflow:hidden;} +#sod_bsk_list #mod_option_frm .btn_submit{width:49%;float:left;background:#34b5a1;padding:8px 0} +#sod_bsk_list #mod_option_frm .btn_cancel{width:49%;float:right;background:#fff;border:1px solid #34b5a1;color:#34b5a1} + +#sod_bsk_tot {margin:0 0 8px;;border:1px solid #e9e9e9;background:#f2f2f2} +#sod_bsk_tot:after {display:block;visibility:hidden;clear:both;content:""} +#sod_bsk_tot dt, #sod_bsk_tot dd {float:left;padding:10px 0;border-bottom:1px solid #e9e9e9} +#sod_bsk_tot dt {padding-left:2%;width:48%;font-weight:bold} +#sod_bsk_tot dd {margin:0;padding-right:2%;width:48%;text-align:right} +.sod_bsk_cnt {background:#373737;color:#fff} +.sod_bsk_point {border-bottom:0 !important} + +#sod_bsk_act {margin:0 0 20px;padding-top:40px;text-align:center;position:relative} +#sod_bsk_act:after {display:block;visibility:hidden;clear:both;content:""} +#sod_bsk_act a.btn01 {width:49%;padding:10px 0;border:1px solid #34b5a1;background:none;color:#34b5a1} +#sod_bsk_act .btn_submit{width:49%;padding:10px 0;;background:#34b5a1;border:1px solid #34b5a1;} +#sod_bsk_act div{position:absolute;top:0;right:0;} +#sod_bsk_act div .btn01 {background:#fff;color:#999;padding:5px;font-size:0.93em} + +/* 위시리스트 */ +#sod_ws {margin:10px;} +#sod_ws li{position:relative;padding:10px 0 10px 90px;min-height:35px;border:1px solid #e9e9e9;margin-bottom:5px;height:50px} +#sod_ws .wish_img {position:absolute;top:10px;left:30px} +#sod_ws .info_link {display:block;padding:5px 0;font-size:1.2em;font-weight:bold} +#sod_ws .info_date {position:absolute;bottom:10px;right:10px;color:#737373} +#sod_ws .wish_chk{position:absolute;top:10px;left:10px;color:#737373} +#sod_ws .sold_out{position:absolute;top:20px;left:80px;display:inline-block;width:100px;color:#ff3e5e} +#sod_ws .wish_del a{position:absolute;top:10px;right:10px;text-indent:-999px;overflow:hidden;width:25px;height:25px;background:url(../mobile/shop/img/del_btn.gif) no-repeat top right;} +#sod_ws_act {text-align:center;} +#sod_ws_act button{width:49%;height: 40px;letter-spacing: 0.2em; line-height: 40px;padding:0;border:1px solid #34b5a1} +#sod_ws_act .btn01{background: #fff; color: #34b5a1;border:1px solid #34b5a1;} +#sod_ws_act .btn02{background: #34b5a1; color: #fff;} + +/* 쿠폰 */ +#scp_list .win_desc{padding:10px;padding-top:0} +#scp_list ul {margin:0;padding:0;list-style:none} +#scp_list li {position:relative;border:1px solid #e9e9e9;margin-bottom:5px;border-radius:8px} +#scp_list .li_title {display:block;padding:8px 10px;font-size:1.2em;font-weight:bold;background:#f2f2f2} +#scp_list .li_pd {margin:0 0 5px;zoom:1} +#scp_list .li_pd:after {display:block;visibility:hidden;clear:both;content:""} +#scp_list .pd_price {padding:10px;display:inline-block} +#scp_list .pd_date {float:right;padding:10px;color:#a4a4a4} +#scp_list .li_target {padding:0 10px 10px;color:#029d9f;display:inline-block} + +/* 주문서 작성 */ +#sod_frm {margin:10px;} +#sod_frm section{margin-bottom:10px} +#sod_frm p#sod_frm_pt_alert {margin:20px 0;text-align:center } +#sod_bsk_list #mod_option_frm .sit_ov_tbl{background:#ededed;margin-top:5px} +#sod_bsk_list #mod_option_frm .sit_ov_tbl th,#sod_bsk_list #mod_option_frm .sit_ov_tbl td{border:none;padding-left:5px;font-weight:normal} +#sod_bsk_list #mod_option_frm .sit_ov_tbl th{width:90px} +html.no-overflowscrolling #cp_frm {height:auto;max-height:10000px !important} /* overflow 미지원 기기 대응 */ +#sod_frm_deli {position:relative;line-height:2em} +#sod_frm_deli #order_address {display:block;;width:100px;background:#333;color:#fff;text-align:center} +#sod_frm_orderer {margin:15px 0 30px} +#sod_frm_orderer #od_addr_jibeon, #sod_frm_taker #od_b_addr_jibeon {display:inline-block;margin:5px 0 0} +#sod_frm h2{background:#f2f2f2;border:1px solid #e9e9e9;padding:10px;} +#sod_frm .odf_tbl table{width:100%;margin:0;padding:0;border-left:1px solid #e9e9e9;border-right:1px solid #e9e9e9;border-collapse:collapse} +#sod_frm .odf_tbl table tbody td,#sod_frm .odf_tbl table tbody th{;border-bottom:1px solid #e9e9e9;padding:5px 0px 5px 10px ;text-align:left;line-height:26px;position:relative;} +#sod_frm .odf_tbl table th{width:90px;color:#343434;font-weight:normal;letter-spacing:-0.1em} +#sod_frm .odf_tbl table .frm_input{background-color:#fff !important;height:24px;line-height:24px;text-indent:5px} +#sod_frm .odf_tbl table .frm_address{margin-top:5px} +#sod_frm .odf_tbl button.btn_frmline{font-size:0.92em;padding:0 8px;height:26px;line-height:26px} +#sod_frm .odf_tbl textarea{width:99%;border:1px solid #e4eaec;} +#sod_frm_same {margin:0 0 10px} +#sod_frm_pay {position:relative} +#sod_frm_pay .tbl_head01 caption {font-size:0;line-height:0;overflow:hidden} +#sod_frm_pay .tbl_head01 th {width:auto !important;font-weight:bold;text-align:center !important} +#sod_frm_pay .tbl_head01 td {border-top:1px solid #e9e9e9 !important;border-bottom:1px solid #e9e9e9 !important;line-height:1.5em !important;word-break:break-all !important} + +html.no-overflowscrolling #sc_coupon_frm, html.no-overflowscrolling #od_coupon_frm {height:auto;max-height:10000px !important} /* overflow 미지원 기기 대응 */ +#sod_frm_pay_info {margin:0 0 10px} +#sod_frm_paysel {margin:10px 0 ;padding:10px;background:#f2f2f2;border:1px solid #e0e0e0} +#sod_frm_paysel ul {margin:0;padding:0;} +#sod_frm_paysel ul:after {display:block;visibility:hidden;clear:both;content:""} +#sod_frm_paysel li {float:left;padding:5px 2%;width:46%} +#sod_frm_paysel .KPAY{background:url('../../../img/kpay_logo.png') no-repeat;padding-left:37px;} +#sod_frm_paysel .PAYNOW{background:url('../../../img/paynow_logo.png') no-repeat;padding-left:46px;} +#sod_frm_paysel .PAYCO{background:url('../../../img/payco_logo.png') no-repeat 1px ;padding-left:46px;} + + +#sod_frm_paysel #settle_bank {padding:10px;background:#fff;line-height:2em;border:1px solid #dbdbdb} +#sod_frm_paysel #settle_bank label {display:inline-block;margin:0 10px 0 0;font-weight:bold} +#sod_frm_paysel #settle_bank .frm_input {background:#fff;text-align:center} +#sod_frm_escrow {margin:30px 0 0} + +#od_addr1, #od_addr2, #od_addr3, #od_email, #od_b_addr1, #od_b_addr2, #od_b_addr3 {width:100%} +#sod_frm #od_memo {height:70px} +#sod_frm_pt {margin:10px 0 5px} +#sod_frm_pt_alert, #sod_frm_pt_info {margin:0 0 10px} +#sod_frm #show_progress {text-align:center} +#sod_frm #show_progress span {display:block;margin:5px 0 0} +#sod_frm #cp_frm,#od_coupon_frm,#sc_coupon_frm{z-index:10000;position:absolute;top:25px;left:0;width:100%;border:2px solid #34b5a1;background:#fff;} +#od_coupon_frm,#sc_coupon_frm{top:33px;left:10px;width:95%} +#sod_frm .odf_tbl button.sc_cp_apply,#sod_frm .odf_tbl button.od_cp_apply{font-size:1em} +#sod_frm #cp_frm .tbl_head02,#od_coupon_frm .tbl_head02,#sc_coupon_frm .tbl_head02{padding:15px;margin:0;} +#sod_frm #cp_frm .tbl_head02 caption,#od_coupon_frm .tbl_head02 caption,#sc_coupon_frm .tbl_head02 caption{background:#34b5a1;color:#fff;position:absolute;top:0;left:0;width:100%;text-indent:10px;padding:0 0 ;height:30px;line-height:28px;} +#sod_frm #cp_frm .tbl_head02 table,#od_coupon_frm .tbl_head02 table,#sc_coupon_frm .tbl_head02 table{margin-top:30px;border:1px solid #d3d3d3;} +#sod_frm #cp_frm .tbl_head02 th,#od_coupon_frm .tbl_head02 thead th,#sc_coupon_frm .tbl_head02 thead th{border-bottom:1px solid #e5e5e5;background:#ededed;text-align:center !important;padding:5px 0;line-height:1.5em !important} +#sod_frm #cp_frm .tbl_head02 th+th+th, #od_coupon_frm .tbl_head02 th+th+th,#sc_coupon_frm .tbl_head02 th+th+th{width:60px} +#sod_frm #cp_frm .tbl_head02 td,#od_coupon_frm .tbl_head02 td,#sc_coupon_frm .tbl_head02 td{border:none;line-height:1.5em !important} +#od_coupon_frm .tbl_head02 td.td_numbig,#od_coupon_frm .tbl_head02 td.td_mngsmall,#sc_coupon_frm .tbl_head02 td.td_mngsmall{text-align:center} +#sod_frm #cp_frm .tbl_head02 td .btn_frmline,#od_coupon_frm .tbl_head02 td,#sc_coupon_frm .tbl_head02 td {font-size:0.92em} +#sod_frm #cp_frm .tbl_head02 td.td_numbig,#od_coupon_frmtd .tbl_head02 .td_numbig,#sc_coupon_frm .tbl_head02 td.td_numbig{width:90px;text-align:center} +#sod_frm #cp_frm .btn_confirm .btn_submit,#od_coupon_frm .btn_confirm .btn_submit,#sc_coupon_frm .btn_confirm .btn_submit{position:absolute;top:0;right:0;background:url(../mobile/shop/img/close_op.jpg) no-repeat 0 10px;text-indent:-9999px; width:25px;height:25px} +#sod_frm #display_pay_button .btn_submit,#sod_frm #display_pay_button .btn_cancel,#sc_coupon_frm #display_pay_button .btn_cancel{width:49%;text-align:center; padding: 10px 0; background: #34b5a1; border:1px solid #34b5a1;-webkit-appearance: none;border-radius:0} +#sod_frm #display_pay_button .btn_cancel{border:1px solid #34b5a1;background:#fff;color:#34b5a1} + +/* 배송지 목록 */ +#sod_addr {} +#sod_addr ul {margin:0;padding:0;list-style:none} +#sod_addr li {position:relative;padding:5px 0 5px 20px;min-height:35px;border-bottom:1px solid #e9e9e9} +#sod_addr .addr_chk {position:absolute;top:9px;left:0} +#sod_addr .addr_default {position:absolute;top:9px;right:0} +#sod_addr .addr_addr {margin:10px 0 5px} +#sod_addr .addr_name {float:left;margin:0 0 10px} +#sod_addr .addr_tel {float:right;margin:0 0 10px} +#sod_addr .addr_btn {clear:both;text-align:right} +#sod_addr .addr_btn:after {display:block;visibility:hidden;clear:both;content:""} +#sod_addr #btn_sel {width:25%;border:0;line-height:2.5em;background:#626870;color:#fff} +#sod_addr #btn_del {display:inline-block;width:15%;line-height:2.5em;background:#f2f5f9;color:#ff3061;text-align:center} + +/* 주문내역 */ +#sod_v {margin:10px} +#sod_v .td_stat {width:100px} +#sod_v_info {margin:0 0 10px} + +/* 주문상세내역 */ +#sod_fin {margin:10px} +#sod_fin .sod_list .li_name_od a{display: block; padding: 10px; } +#sod_fin .sod_list .li_opt{padding:10px;padding-bottom:0;border-top:1px solid #e9e9e9} +#sod_fin .sod_list .li_opt:first-child{border:none} +#sod_fin .sod_list .total_img{top:10px;left:0} +#sod_fin .sod_list .total_span{padding:10px;display:block} +#sod_fin .sod_list .total_span span{top:10px} +#sod_fin .sod_list .li_prqty .li_prqty_sp{width:24.5%;} +#sod_fin .sod_list .li_prqty .prqty_stat{ border-right: 1px solid #d3d3d3;} +#sod_fin section{margin-bottom:20px} +#sod_fin_no {margin:0 0 20px;padding:10px; background:#eaf7f5} +#sod_fin_list h2 {margin:0 0 10px} +#sod_sts_wrap {margin:0 0 10px;text-align:right} +#sod_sts_explan {display:none} +#sod_fin_legend {margin:10px 0;padding:10px 10px ;text-align:left;background:#f6f6f6} +#sod_fin_legend:after {display:block;visibility:hidden;clear:both;content:''} +#sod_fin_legend dt {clear:both;float:left;margin:0 0 5px;width:50px;font-weight:bold} +#sod_fin_legend dd {float:left;margin:0} + +#request_form {position:relative} +#request_form div {display:none;z-index:10000;position:absolute;top:31px;left:0;padding:10px 0;width:290px;border:1px solid #000;background:#f2f5f9;text-align:center} +#request_form label {letter-spacing:-0.1em} +#request_form .frm_input {width:170px;background:#fff !important} +#request_form .btn_frmline, #request_form .btn_cancel {margin:5px 0 0;padding:0 5px;height:1.9em;vertical-align:middle !important;line-height:1.9em} + +#sod_req_btn {margin:0 0 10px} +#sod_req_btn button {background:#626870} + +#sod_req_log {margin:0 0 20px} +#sod_req_log ul {margin:0;padding:0;border-top:1px solid #e9e9e9;background:#f2f5f9;list-style:none} +#sod_req_log li {padding:10px 10px 20px;border:1px solid #e9e9e9;border-top:0} +#sod_req_log h3 {margin:20px 0 10px} +.sod_req_log_view table {margin:0} +.sod_req_log_view caption {padding:10px 0;font-size:1em;font-weight:bold;text-align:left;line-height:1em} +.sod_req_log_view caption span {color:#ff3061} +.sod_req_log_view th {border-top:1px solid #e9e9e9;background:#f7f7f7 !important;color:#000 !important;text-align:center} +.sod_req_log_view td {background:#fff;color:#000} +.sod_req_log_view p {padding:10px 15px;border-bottom:1px solid #e9e9e9;background:#fff;color:#000} +.sod_req_log_view button {margin:0;padding:0;border:0;background:transparent;color:#ff3061;text-decoration:underline;vertical-align:middle} + +#sod_fin_view h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#sod_fin_view h3 {margin:0 0 10px} +#sod_fin_view .tbl_head01 th {padding:0 10px;border-top:1px solid #eee;border-bottom:1px solid #eee;background:#f2f5f9;text-align:left} +#sod_fin_dvr .dvr_link {color:#ff3061;text-decoration:underline} + +#sod_fin_tot {margin:0 0 30px;;border:1px solid #e9e9e9;border-top:0;background:#373737;color:#fff} +#sod_fin_tot h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#sod_fin_tot ul {margin:0;padding:0;list-style:none} +#sod_fin_tot li {padding:10px;border-bottom:1px solid #5d5d5d;padding:10px} +#sod_fin_tot li:after {display:block;visibility:hidden;clear:both;content:""} +#sod_fin_tot #alrdy {border-bottom:0 !important} +#sod_fin_tot strong {float:right} + +#sod_fin_cancel {text-align:center} +#sod_fin_cancel h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#sod_fin_cancel button {padding:8px;border:0;border:1px solid #029d9f;color:#029d9f;background:#fff;} +#sod_fin_cancelfrm {display:none;margin:10px 0 0;padding:20px 0;background:#f6f6f6} +#sod_fin_cancelfrm label{color:#888} +#sod_fin_cancelfrm .frm_input {background:#fff !important; height: 24px; line-height: 24px; text-indent: 5px;width:190px} +#sod_fin_cancelfrm .btn_frmline{border:none;background:#3a3a3a;color:#fff;padding:4px} + +#sod_fin_test {padding:10px} +#sod_fin h3,#kcp_acc_test table caption{ background: #f2f2f2; border: 1px solid #e9e9e9; padding: 10px;margin:10px 0 0;text-align:left} +#sod_fin .odf_tbl table{width:100%;margin:0;padding:0;border-left:1px solid #e9e9e9;border-right:1px solid #e9e9e9;border-collapse:collapse;} +#sod_fin .odf_tbl table tbody td,#sod_fin .odf_tbl table tbody th{;border-bottom:1px solid #e9e9e9;padding:6px 10px;text-align:left;line-height:20px} +#sod_fin .odf_tbl table th{width:80px;color:#343434;font-weight:normal} +#sod_fin .odf_tbl table tbody td.empty_table{text-align:center} +#sod_fin .odf_tbl textarea{width:99%;border:1px solid #e4eaec;} +#sod_fin .odf_tbl table input[type="text"]{background-color:#fff !important;height:24px;line-height:24px;text-indent:5px;border:1px solid #e4eaec} + +/* 주문내역 include */ +#sod_inquiry li {border:1px solid #e9e9e9;margin-bottom:5px;position:relative} +#sod_inquiry li .inquiry_idtime{background:#f2f2f2;padding:10px;position:relative} +#sod_inquiry li .inquiry_idtime a{font-weight:bold} +#sod_inquiry li .inquiry_idtime .idtime_time{position:absolute;top:10px;right:10px} +#sod_inquiry li .inquiry_name{clear:both;padding:10px;color:#696969} +#sod_inquiry li .inquiry_price{padding:10px;font-size:1.167em;font-weight:bold;} +#sod_inquiry li .inquiry_inv{position:absolute;bottom:10px;right:10px;color:#34b5a1;text-align:right} +#sod_inquiry li .inquiry_inv .inv_status{display:block;font-weight:bold} + +/* 주문상세내역 중 현금영수증 발급 */ +#scash {} +#scash section {padding:10px 0} +#scash h2 {margin:0 0 10px;text-align:center} +#scash .tbl_head01 th {padding:0 10px;border-top:1px solid #eee;border-bottom:1px solid #eee;background:#f2f5f9;text-align:left;} +#scash_apply {padding:10px 0 15px;text-align:center} +#scash_apply button {padding:10px;border:0;background:#565e60;color:#fff} +#scash_copy {text-align:center} + +/* 상품검색 */ +#ssch{} +#ssch_frm {padding:10px;border:1px solid #e9e9e9;background:#f2f5f9;margin:10px} +#ssch_frm:after {display:block;visibility:hidden;clear:both;content:""} +#ssch_frm div {margin:0 0 5px} +#ssch_frm strong, #ssch_frm .ssch_lbl {display:inline-block;width:100px;font-weight:bold;vertical-align:middle} +#ssch_frm .frm_input {background:#fff} +#ssch_frm .btn_submit {padding:0 8px;height:23px;background:#34b5a1;} +#ssch_frm p {padding:10px 0;border-top:1px solid #e9e9e9;line-height:1.5em} +#ssch_frm #ssch_qfrom {width:50px} +#ssch_frm #ssch_qto {width:50px} +#ssch_frm #ssch_q {width:40%} +#ssch_frm #ssch_sort {margin:0 0 10px;padding:1px 0 0 1px;list-style:none} +#ssch_frm #ssch_sort:after {display:block;visibility:hidden;clear:both;content:""} +#ssch_frm #ssch_sort li {position:relative;float:left;margin:0 0 -1px -1px;width:33%} +#ssch_frm #ssch_sort li:nth-of-type(3n) {width:34%} +#ssch_frm #ssch_sort a {display:block;text-align:center} +#ssch_frm #ssch_ov {text-align:right} + +#ssch_cate {} +#ssch_cate ul {margin:10px 0;padding:10px 20px 20px;border-bottom:1px solid #e9e9e9;list-style:none} +#ssch_cate ul:after {display:block;visibility:hidden;clear:both;content:""} +#ssch_cate li {float:left;margin:0 10px 0 0;padding:0 10px 0 0;border-right:1px solid #e9e9e9} +#ssch_cate a span {font-weight:bold} + +/* 화면낭독기 사용자용 */ +#hd_login_msg {position:absolute;top:0;left:0;width:1px;height:1px;overflow:hidden} +.msg_sound_only, .sound_only {display:inline-block !important;position:absolute;top:0;left:0;margin:0 !important;padding:0 !important;width:1px !important;height:1px !important;font-size:0;text-indent:-9999em;line-height:0;border:0 !important;overflow:hidden !important} + +/* 본문 바로가기 */ +#skip_to_container a {z-index:100000;position:absolute;font-size:0;line-height:0;overflow:hidden;left:0} +#skip_to_container a:focus, #skip_to_container a:active {width:100%;height:75px;background:#21272e;color:#fff;font-size:1.5em;font-weight:bold;text-align:center;text-decoration:none;line-height:3.3em} + +/* 이미지 등비율 리사이징 */ +.img_fix {width:100%;height:auto} + +/* 캡챠 자동등록(입력)방지 기본 */ +#captcha {display:inline-block;position:relative} +#captcha legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden} +#captcha audio {display:block;margin:0 0 5px;width:187px} +#captcha #captcha_img {width:60px;height:30px;border:1px solid #e9e9e9} +#captcha #captcha_reload {margin:0;padding:0 5px;height:32px;border:0;background:#e4eaec;vertical-align:middle;overflow:hidden;cursor:pointer} +#captcha #captcha_key {margin:0 0 0 4px;padding:0 5px;width:50px;height:30px;border:1px solid #b8c9c2;background:#f7f7f7;font-size:1.333em;font-weight:bold;text-align:center;line-height:2.8em} +#captcha #captcha_info {display:block;margin:5px 0 0;font-size:0.95em;letter-spacing:-0.1em} + +/* Mobile화면으로 */ +#mobile_cng {display:block;margin:5px;padding:5px 0;border:1px solid #eee;border-radius:2em;background:#fff;color:#000;font-size:2em;text-decoration:none;text-align:center} + +/* ckeditor 단축키 */ +.cke_sc {margin:0 0 5px;text-align:right} +.btn_cke_sc{display:inline-block;padding:0 10px;height:23px;border:1px solid #ccc !important;background:#fafafa !important;color:#000 !important;text-decoration:none !important;line-height:1.9em;vertical-align:middle} +.cke_sc_def {margin:0 0 5px;padding:10px;border:1px solid #ccc;background:#f2f5f9;text-align:center} +.cke_sc_def dl {margin:0 0 5px;text-align:left} +.cke_sc_def dl:after {display:block;visibility:hidden;clear:both;content:""} +.cke_sc_def dt, .cke_sc_def dd {float:left;margin:0;padding:5px 0;border-bottom:1px solid #e9e9e9} +.cke_sc_def dt {width:20%;font-weight:bold} +.cke_sc_def dd {width:30%} + +/* 콘텐츠별 스타일 */ +.cnt_cmt {display:inline-block;margin:0 0 0 5px;font-weight:bold} + +/* 버튼 */ +a.btn01 {display:inline-block;padding:8px 7px 7px;border:1px solid #ccc;background:#fafafa;color:#000;text-decoration:none;vertical-align:middle} +a.btn01:focus, a.btn01:hover {text-decoration:none} +button.btn01 {display:inline-block;margin:0;padding:7px;border:1px solid #ccc;background:#fafafa;color:#000;text-decoration:none} +a.btn02 {display:inline-block;padding:8px 7px 7px;border:1px solid #3b3c3f;background:#4b545e;color:#fff;text-decoration:none;vertical-align:middle} +a.btn02:focus, .btn02:hover {text-decoration:none} +button.btn02 {display:inline-block;margin:0;padding:7px;border:1px solid #3b3c3f;background:#4b545e;color:#fff;text-decoration:none} +.btn_confirm {text-align:center} /* 서식단계 진행 */ +.btn_submit {padding:5px;border:0;background:#ff3061;color:#fff;letter-spacing:-0.1em} +fieldset .btn_submit {padding:0 7px;height:24px;line-height:1em} +a.btn_cancel {display:inline-block;padding:8px 7px 7px;border:1px solid #ccc;background:#fafafa;color:#000;text-decoration:none;vertical-align:middle} +button.btn_cancel {display:inline-block;padding:7px;border:1px solid #ccc;background:#fafafa;color:#000;vertical-align:top;text-decoration:none} +a.btn_frmline, button.btn_frmline {display:inline-block;padding:0 5px;height:1.9em;border:0;background:#333;color:#fff;letter-spacing:-0.1em;text-decoration:none;vertical-align:top;line-height:1.9em} /* 우편번호검색버튼 등 */ +button.btn_frmline {font-size:1em} + +/* 게시판용 버튼 */ +a.btn_b01 {display:inline-block;margin:0 0 3px;padding:8px 7px 7px;border:1px solid #d9ded9;background:#f2f5f9;color:#000;text-decoration:none;vertical-align:middle} +a.btn_b01:focus, .btn_b01:hover {text-decoration:none} +a.btn_b02 {display:inline-block;margin:0 0 3px;padding:8px 7px 7px;border:1px solid #3b3c3f;background:#4b545e;color:#fff;text-decoration:none;vertical-align:middle} +a.btn_b02:focus, .btn_b02:hover {text-decoration:none} +a.btn_admin {display:inline-block;margin:0 0 3px ;padding:8px 7px 7px;border:1px solid #e8180c;background:#e8180c;color:#fff;text-decoration:none;vertical-align:middle} /* 관리자 전용 버튼 */ +a.btn_admin:focus, a.btn_admin:hover {text-decoration:none} + +/* 기본테이블 */ +.tbl_wrap {margin:0 0 10px} +.tbl_wrap table {width:100%;border-collapse:collapse;border-spacing:0} +.tbl_wrap caption {padding:10px 0;color:#4b8b99;font-weight:bold;text-align:left} + +.tbl_head01 {} +.tbl_head01 caption {padding:0 0 10px;color:#777;text-align:left} +.tbl_head01 thead th {padding:12px 0;border-top:1px solid #d1dee2;border-bottom:1px solid #d1dee2;background:#e5ecef;color:#383838;font-size:0.95em;text-align:center;letter-spacing:-0.1em} +.tbl_head01 thead a {color:#383838} +.tbl_head01 thead th input {vertical-align:top} /* middle 로 하면 게시판 읽기에서 목록 사용시 체크박스 라인 깨짐 */ +.tbl_head01 tfoot th {border-top:1px solid #666;border-bottom:1px solid #666;background:#484848;color:#fff} +.tbl_head01 tfoot td {border-color:#666;background:#484848;color:#fff;font-weight:bold;text-align:center} +.tbl_head01 tbody th {padding:5px 0;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9} +.tbl_head01 td {padding:5px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;line-height:1.5em;word-break:break-all} + +.tbl_head02 {} +.tbl_head02 caption {padding:0 0 10px;color:#777;text-align:left} +.tbl_head02 thead th {padding:5px 0;border-top:1px solid #d1dee2;border-bottom:1px solid #d1dee2;background:#e5ecef;color:#383838;font-size:0.95em;text-align:center;letter-spacing:-0.1em} +.tbl_head02 thead a {color:#383838} +.tbl_head02 thead th input {vertical-align:top} /* middle 로 하면 게시판 읽기에서 목록 사용시 체크박스 라인 깨짐 */ +.tbl_head02 tfoot th {border-top:1px solid #666;border-bottom:1px solid #666;background:#484848;color:#fff} +.tbl_head02 tfoot td {border-color:#666;background:#484848;color:#fff;font-weight:bold;text-align:center} +.tbl_head02 tbody th {padding:5px 0;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9} +.tbl_head02 td {padding:5px 3px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;line-height:1.4em;word-break:break-all} + +/* 폼 테이블 */ +.tbl_frm01 {} +.tbl_frm01 th {padding:10px 0;width:90px;border:1px solid #e9e9e9;border-left:0;text-align:left} +.tbl_frm01 td {padding:10px 5px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;background:transparent} +.tbl_frm01 textarea, .frm_input {border:1px solid #e4eaec;background:#f7f7f7;vertical-align:middle;line-height:1.8em;-webkit-appearance:none} +.tbl_frm01 textarea {width:100%;height:100px} +.tbl_frm01 a {text-decoration:none} +.tbl_frm01 .frm_address {margin-top:5px} +.tbl_frm01 .frm_file {display:block;margin-bottom:5px;width:100%} +.tbl_frm01 .frm_info {display:block;padding:5px 0 0;color:#666;line-height:1.3em} + +/* 자료 없는 목록 */ +.empty_table {padding:20px 0 !important;text-align:center} +.empty_list {padding:20px 0 !important;text-align:center} + +/* 필수입력 */ +.required, textarea.required {background:url('../img/wrest.gif') #f7f7f7 top right no-repeat !important} + +/* 테이블 그리드 padding 0 5px 고려한 넓이 */ +.grid_1 {width:40px} +.grid_2 {width:90px} +.grid_3 {width:120px} +.grid_4 {width:190px} +.grid_5 {width:240px} +.grid_6 {width:290px} +.grid_7 {width:340px} +.grid_8 {width:390px} +.grid_9 {width:440px} +.grid_10 {width:490px} +.grid_11 {width:540px} +.grid_12 {width:590px} +.grid_13 {width:640px} +.grid_14 {width:690px} +.grid_15 {width:740px} +.grid_16 {width:790px} +.grid_17 {width:840px} +.grid_18 {width:890px} + +/* 테이블 항목별 정의 */ +.td_chk {width:50px;text-align:center} +.td_group {width:100px;text-align:center} +.td_board {width:120px;text-align:center} +.td_statsmall {width:50px;text-align:center} +.td_num {width:50px;text-align:center} +.td_numbig {width:120px;text-align:center} +.td_mb_id {width:100px;text-align:center} +.td_nick {width:100px;text-align:center} +.td_name {width:100px;text-align:left} +.td_namesmall {width:100px;text-align:left} +.td_date {width:50px;text-align:center} +.td_datetime {width:170px;text-align:center} +.td_mngsmall {width:50px;text-align:center} +.td_mng {width:80px;text-align:center} +.td_stat {text-align:center} + +/* 새창 기본 스타일 */ +.new_win #win_title{padding:15px 20px;border-bottom:1px solid #e9e9e9;font-size:1.12em;margin-bottom:10px} +.new_win .tbl_wrap {margin:0 20px} +.new_win .win_btn {clear:both;margin:20px;text-align:center} +.new_win .win_btn a {display:inline-block;padding:0 10px;height:2.5em;background:#666;color:#fff;text-decoration:none;vertical-align:middle;line-height:2.5em} +.new_win .win_btn button {display:inline-block;padding:0 10px;height:2.5em;border:0;background:#666;color:#fff;text-decoration:none;line-height:2.5em} +.new_win .win_btn input {padding:0 10px;height:2.5em;line-height:2.5em} + +/* 자바스크립트 alert 대안 */ +#validation_check {margin:100px auto;width:500px} +#validation_check h1 {margin-bottom:20px;font-size:1.3em} +#validation_check p {margin-bottom:20px;padding:30px 20px;border:1px solid #e9e9e9;background:#fff} + +/* 사이드뷰*/ +.sv_wrap {display:inline-block;position:relative;font-weight:normal} +.sv_wrap .sv {z-index:1000;display:none;margin:5px 0 0;border:1px solid #283646;background:#111} +.sv_wrap .sv a {display:inline-block !important;margin:0 !important;padding:5px !important;width:94px;border-bottom:1px solid #283646;color:#fff !important} +.sv_wrap a:focus, .sv_wrap a:hover, .sv_wrap a:active {text-decoration:none !important} +.sv_on {display:block !important;position:absolute;top:10px;left:20px;width:auto;height:auto !important} +.sv_nojs .sv {display:block} + +/* 페이징 */ +.pg_wrap {clear:both;margin:0 0 20px;padding:20px 0 0;text-align:center} +.pg {} +.pg_page, .pg_current, .qa_page {display:inline-block;padding:0 8px;height:25px;color:#888 !important;letter-spacing:0;line-height:25px;vertical-align:middle;font-size:1.2em} +.pg a:focus, .pg a:hover {text-decoration:none} +.pg_page, .qa_page {text-decoration:none} +.pg_start, .pg_prev {background:url(../mobile/shop/img/paging.gif) no-repeat 0 0 ;text-indent:-999px;overflow:hidden;width:25px;height:25px;padding:0;} +.pg_prev{background-position:-28px 0} +.pg_end, .pg_next {background:url(../mobile/shop/img/paging.gif) no-repeat -55px 0;width:25px;height:25px;;width:25px;height:25px;padding:0;text-indent:-999px;overflow:hidden} +.pg_end{background-position:-83px 0} +.pg_current {display:inline-block;margin:0 4px 0 0;;color:#34b5a1 !important;font-weight:bold;} + +/* 상품상세 메뉴 floating */ +#info_top_layer {display:none;position:absolute; top:0; left:0; width:100%; background-color: #eee;} +#form_btn_layer { display:none;position:absolute; top:0; left: 0; width: 100%; height: 60px; background-color: #eee;} + +/*현금영수증*/ +#kcp_req_rx .tbl_head01 tbody th {text-align:left;} + +/*배송지목록*/ +#sod_addr .win_desc{padding:10px 20px} + +/*쇼핑몰레이아웃*/ +#mb_login .btn_submit{background:#34b5a1 !important} +#bo_list,#bo_cate{margin-top:10px !important} +#fregisterform{margin:10px} +#bo_w .btn_submit{padding:8px 7px} +#bo_w {padding:10px} +#fqalist {padding:0 10px} +#sit_sms_new #sms_agree{padding:10px 20px !important} + +/*이벤트*/ +#sev_hhtml,#sev_thtml{padding:10px} +#sev_hhtml img,#sev_thtml img{width:100%} \ No newline at end of file diff --git a/theme/basic/head.php b/theme/basic/head.php index 2d5bf0af9..680bd09a4 100644 --- a/theme/basic/head.php +++ b/theme/basic/head.php @@ -6,6 +6,11 @@ if (G5_IS_MOBILE) { return; } +if(G5_COMMUNITY_USE === false) { + include_once(G5_THEME_SHOP_PATH.'/shop.head.php'); + return; +} + include_once(G5_THEME_PATH.'/head.sub.php'); include_once(G5_LIB_PATH.'/latest.lib.php'); include_once(G5_LIB_PATH.'/outlogin.lib.php'); @@ -94,6 +99,9 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
              • 1:1문의
              • 접속자
              • 새글
              • + +
              • 쇼핑몰
              • +
              diff --git a/theme/basic/head.sub.php b/theme/basic/head.sub.php index 78a36adff..ebe48081b 100644 --- a/theme/basic/head.sub.php +++ b/theme/basic/head.sub.php @@ -46,7 +46,11 @@ if($config['cf_add_meta']) echo $config['cf_add_meta'].PHP_EOL; ?> <?php echo $g5_head_title; ?> - +'.PHP_EOL; +?> @@ -77,7 +81,7 @@ if(G5_IS_MOBILE) { } ?> - +> diff --git a/theme/basic/mobile/head.php b/theme/basic/mobile/head.php index d45c8969d..fafe4b0bc 100644 --- a/theme/basic/mobile/head.php +++ b/theme/basic/mobile/head.php @@ -1,6 +1,11 @@ 회원가입
            • 로그인
            • + +
            • 쇼핑몰
            • +
            diff --git a/theme/basic/mobile/index.php b/theme/basic/mobile/index.php index 3df4ba11b..46fb88c92 100644 --- a/theme/basic/mobile/index.php +++ b/theme/basic/mobile/index.php @@ -1,6 +1,11 @@ diff --git a/theme/basic/mobile/shop/_common.php b/theme/basic/mobile/shop/_common.php new file mode 100644 index 000000000..cb80d260d --- /dev/null +++ b/theme/basic/mobile/shop/_common.php @@ -0,0 +1,7 @@ +쇼핑몰 설치 후 이용해 주십시오.

            '); +define('_SHOP_', true); +?> \ No newline at end of file diff --git a/theme/basic/mobile/shop/category.php b/theme/basic/mobile/shop/category.php new file mode 100644 index 000000000..2bda3e411 --- /dev/null +++ b/theme/basic/mobile/shop/category.php @@ -0,0 +1,155 @@ + + + +
            +
            + + '.PHP_EOL; + ?> +
          • + + '.get_text($mshop_ca_row1['ca_name']).' 하위분류 열기'.PHP_EOL; + + for($j=0; $mshop_ca_row2=sql_fetch_array($mshop_ca_res2); $j++) { + if($j == 0) + echo '
              '.PHP_EOL; + ?> +
            • + - + '.get_text($mshop_ca_row2['ca_name']).' 하위분류 열기'.PHP_EOL; + + for($k=0; $mshop_ca_row3=sql_fetch_array($mshop_ca_res3); $k++) { + if($k == 0) + echo '
                '.PHP_EOL; + ?> +
              • + - + '.get_text($mshop_ca_row3['ca_name']).' 하위분류 열기'.PHP_EOL; + + for($m=0; $mshop_ca_row4=sql_fetch_array($mshop_ca_res4); $m++) { + if($m == 0) + echo '
                  '.PHP_EOL; + ?> +
                • + - + '.get_text($mshop_ca_row4['ca_name']).' 하위분류 열기'.PHP_EOL; + + for($n=0; $mshop_ca_row5=sql_fetch_array($mshop_ca_res5); $n++) { + if($n == 0) + echo '
                    '.PHP_EOL; + ?> +
                  • + - +
                  • + 0) + echo '
                  '.PHP_EOL; + ?> +
                • + 0) + echo '
                '.PHP_EOL; + ?> +
              • + 0) + echo '
              '.PHP_EOL; + ?> +
            • + 0) + echo '
            '.PHP_EOL; + ?> +
          • + 0) + echo '
          '.PHP_EOL; + else + echo '

          등록된 분류가 없습니다.

          '.PHP_EOL; + ?> + + + + + diff --git a/theme/basic/mobile/shop/img/add.gif b/theme/basic/mobile/shop/img/add.gif new file mode 100644 index 000000000..fc7639eba Binary files /dev/null and b/theme/basic/mobile/shop/img/add.gif differ diff --git a/theme/basic/mobile/shop/img/best_btn.gif b/theme/basic/mobile/shop/img/best_btn.gif new file mode 100644 index 000000000..eee0d0c29 Binary files /dev/null and b/theme/basic/mobile/shop/img/best_btn.gif differ diff --git a/theme/basic/mobile/shop/img/cart.gif b/theme/basic/mobile/shop/img/cart.gif new file mode 100644 index 000000000..3169b6dac Binary files /dev/null and b/theme/basic/mobile/shop/img/cart.gif differ diff --git a/theme/basic/mobile/shop/img/cate.gif b/theme/basic/mobile/shop/img/cate.gif new file mode 100644 index 000000000..076449e0c Binary files /dev/null and b/theme/basic/mobile/shop/img/cate.gif differ diff --git a/theme/basic/mobile/shop/img/cate_op.gif b/theme/basic/mobile/shop/img/cate_op.gif new file mode 100644 index 000000000..f1b885818 Binary files /dev/null and b/theme/basic/mobile/shop/img/cate_op.gif differ diff --git a/theme/basic/mobile/shop/img/close.png b/theme/basic/mobile/shop/img/close.png new file mode 100644 index 000000000..2db6af945 Binary files /dev/null and b/theme/basic/mobile/shop/img/close.png differ diff --git a/theme/basic/mobile/shop/img/close_op.jpg b/theme/basic/mobile/shop/img/close_op.jpg new file mode 100644 index 000000000..3850f72e1 Binary files /dev/null and b/theme/basic/mobile/shop/img/close_op.jpg differ diff --git a/theme/basic/mobile/shop/img/del_btn.gif b/theme/basic/mobile/shop/img/del_btn.gif new file mode 100644 index 000000000..6a576483a Binary files /dev/null and b/theme/basic/mobile/shop/img/del_btn.gif differ diff --git a/theme/basic/mobile/shop/img/loading.gif b/theme/basic/mobile/shop/img/loading.gif new file mode 100644 index 000000000..93dc39709 Binary files /dev/null and b/theme/basic/mobile/shop/img/loading.gif differ diff --git a/theme/basic/mobile/shop/img/paging.gif b/theme/basic/mobile/shop/img/paging.gif new file mode 100644 index 000000000..9584474de Binary files /dev/null and b/theme/basic/mobile/shop/img/paging.gif differ diff --git a/theme/basic/mobile/shop/img/prd_icon.gif b/theme/basic/mobile/shop/img/prd_icon.gif new file mode 100644 index 000000000..391f4980e Binary files /dev/null and b/theme/basic/mobile/shop/img/prd_icon.gif differ diff --git a/theme/basic/mobile/shop/img/prd_icon.png b/theme/basic/mobile/shop/img/prd_icon.png new file mode 100644 index 000000000..83c7ad03b Binary files /dev/null and b/theme/basic/mobile/shop/img/prd_icon.png differ diff --git a/theme/basic/mobile/shop/img/sch.gif b/theme/basic/mobile/shop/img/sch.gif new file mode 100644 index 000000000..72ae70bec Binary files /dev/null and b/theme/basic/mobile/shop/img/sch.gif differ diff --git a/theme/basic/mobile/shop/img/sch2.gif b/theme/basic/mobile/shop/img/sch2.gif new file mode 100644 index 000000000..966f971e8 Binary files /dev/null and b/theme/basic/mobile/shop/img/sch2.gif differ diff --git a/theme/basic/mobile/shop/img/select.gif b/theme/basic/mobile/shop/img/select.gif new file mode 100644 index 000000000..b6acfa95f Binary files /dev/null and b/theme/basic/mobile/shop/img/select.gif differ diff --git a/theme/basic/mobile/shop/index.php b/theme/basic/mobile/shop/index.php new file mode 100644 index 000000000..f71f9d026 --- /dev/null +++ b/theme/basic/mobile/shop/index.php @@ -0,0 +1,140 @@ + + + + + + + +
          +
          + +
          +
          +

          HIT ITEM

          +

          히트상품 모음

          +
          + set_mobile(true); + $list->set_type(1); + $list->set_view('it_id', false); + $list->set_view('it_name', true); + $list->set_view('it_cust_price', false); + $list->set_view('it_price', true); + $list->set_view('it_icon', false); + $list->set_view('sns', false); + echo $list->run(); + ?> +
          + + + +
          +
          +

          RECOMMEND ITEM

          +

          추천상품 모음

          +
          + set_mobile(true); + $list->set_type(2); + $list->set_view('it_id', false); + $list->set_view('it_name', true); + $list->set_view('it_cust_price', false); + $list->set_view('it_price', true); + $list->set_view('it_icon', false); + $list->set_view('sns', false); + echo $list->run(); + ?> +
          + + + +
          +
          +

          NEW ITEM

          +

          최신상품 모음

          +
          + set_mobile(true); + $list->set_type(3); + $list->set_view('it_id', false); + $list->set_view('it_name', true); + $list->set_view('it_cust_price', false); + $list->set_view('it_price', true); + $list->set_view('it_icon', false); + $list->set_view('sns', false); + echo $list->run(); + ?> +
          + + + +
          +
          +

          BEST ITEM

          +

          인기상품 모음

          +
          + set_mobile(true); + $list->set_type(4); + $list->set_view('it_id', false); + $list->set_view('it_name', true); + $list->set_view('it_cust_price', false); + $list->set_view('it_price', true); + $list->set_view('it_icon', false); + $list->set_view('sns', false); + echo $list->run(); + ?> +
          + + + +
          +
          +

          SALE ITEM

          +

          할인상품 모음

          +
          + set_mobile(true); + $list->set_type(5); + $list->set_view('it_id', false); + $list->set_view('it_name', true); + $list->set_view('it_cust_price', false); + $list->set_view('it_price', true); + $list->set_view('it_icon', false); + $list->set_view('sns', false); + echo $list->run(); + ?> +
          + + +
          + +
          + + + + + + \ No newline at end of file diff --git a/theme/basic/mobile/shop/shop.head.php b/theme/basic/mobile/shop/shop.head.php new file mode 100644 index 000000000..bdf906f13 --- /dev/null +++ b/theme/basic/mobile/shop/shop.head.php @@ -0,0 +1,105 @@ + + +
          +

          + + + + + + + + + + + +
          + +
          + + + +
          + +
          +

          diff --git a/theme/basic/mobile/shop/shop.tail.php b/theme/basic/mobile/shop/shop.tail.php new file mode 100644 index 000000000..5f2b9fe80 --- /dev/null +++ b/theme/basic/mobile/shop/shop.tail.php @@ -0,0 +1,44 @@ + + +
          + +
          +

          정보

          +

          + 회사명 + 주소
          + 사업자 등록번호
          + 대표 + 전화 + 팩스
          + + 통신판매업신고번호
          + 개인정보관리책임자 + + 부가통신사업신고번호 '.$default['de_admin_buga_no'].''; ?>
          + Copyright © 2001-2013 . All Rights Reserved. +

          + 상단으로 +
          + + + + + + diff --git a/theme/basic/mobile/skin/shop/basic/img/arr_down01.gif b/theme/basic/mobile/skin/shop/basic/img/arr_down01.gif new file mode 100644 index 000000000..7c2f73c2e Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/arr_down01.gif differ diff --git a/theme/basic/mobile/skin/shop/basic/img/arr_up01.gif b/theme/basic/mobile/skin/shop/basic/img/arr_up01.gif new file mode 100644 index 000000000..beaff5f4c Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/arr_up01.gif differ diff --git a/theme/basic/mobile/skin/shop/basic/img/best_btn.gif b/theme/basic/mobile/skin/shop/basic/img/best_btn.gif new file mode 100644 index 000000000..eee0d0c29 Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/best_btn.gif differ diff --git a/theme/basic/mobile/skin/shop/basic/img/del_btn.gif b/theme/basic/mobile/skin/shop/basic/img/del_btn.gif new file mode 100644 index 000000000..6a576483a Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/del_btn.gif differ diff --git a/theme/basic/mobile/skin/shop/basic/img/icon_best.gif b/theme/basic/mobile/skin/shop/basic/img/icon_best.gif new file mode 100644 index 000000000..508f48f5e Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/icon_best.gif differ diff --git a/theme/basic/mobile/skin/shop/basic/img/icon_cp.gif b/theme/basic/mobile/skin/shop/basic/img/icon_cp.gif new file mode 100644 index 000000000..61a3d233c Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/icon_cp.gif differ diff --git a/theme/basic/mobile/skin/shop/basic/img/icon_discount.gif b/theme/basic/mobile/skin/shop/basic/img/icon_discount.gif new file mode 100644 index 000000000..d5bda31d4 Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/icon_discount.gif differ diff --git a/theme/basic/mobile/skin/shop/basic/img/icon_hit.gif b/theme/basic/mobile/skin/shop/basic/img/icon_hit.gif new file mode 100644 index 000000000..3712ed10f Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/icon_hit.gif differ diff --git a/theme/basic/mobile/skin/shop/basic/img/icon_new.gif b/theme/basic/mobile/skin/shop/basic/img/icon_new.gif new file mode 100644 index 000000000..bf0ebd832 Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/icon_new.gif differ diff --git a/theme/basic/mobile/skin/shop/basic/img/icon_rec.gif b/theme/basic/mobile/skin/shop/basic/img/icon_rec.gif new file mode 100644 index 000000000..8a6a6c4a7 Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/icon_rec.gif differ diff --git a/theme/basic/mobile/skin/shop/basic/img/icon_secret.gif b/theme/basic/mobile/skin/shop/basic/img/icon_secret.gif new file mode 100644 index 000000000..c04899f14 Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/icon_secret.gif differ diff --git a/theme/basic/mobile/skin/shop/basic/img/icon_soldout.gif b/theme/basic/mobile/skin/shop/basic/img/icon_soldout.gif new file mode 100644 index 000000000..cd8ca8b7a Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/icon_soldout.gif differ diff --git a/theme/basic/mobile/skin/shop/basic/img/item_bg.gif b/theme/basic/mobile/skin/shop/basic/img/item_bg.gif new file mode 100644 index 000000000..d6a4d1cbe Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/item_bg.gif differ diff --git a/theme/basic/mobile/skin/shop/basic/img/item_btn.png b/theme/basic/mobile/skin/shop/basic/img/item_btn.png new file mode 100644 index 000000000..0d112766d Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/item_btn.png differ diff --git a/theme/basic/mobile/skin/shop/basic/img/loading.gif b/theme/basic/mobile/skin/shop/basic/img/loading.gif new file mode 100644 index 000000000..93dc39709 Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/loading.gif differ diff --git a/theme/basic/mobile/skin/shop/basic/img/mainlist_btn.gif b/theme/basic/mobile/skin/shop/basic/img/mainlist_btn.gif new file mode 100644 index 000000000..1c634018e Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/mainlist_btn.gif differ diff --git a/theme/basic/mobile/skin/shop/basic/img/personal.jpg b/theme/basic/mobile/skin/shop/basic/img/personal.jpg new file mode 100644 index 000000000..6c21f566a Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/personal.jpg differ diff --git a/theme/basic/mobile/skin/shop/basic/img/prd_icon.png b/theme/basic/mobile/skin/shop/basic/img/prd_icon.png new file mode 100644 index 000000000..83c7ad03b Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/prd_icon.png differ diff --git a/theme/basic/mobile/skin/shop/basic/img/sbmn_bg.gif b/theme/basic/mobile/skin/shop/basic/img/sbmn_bg.gif new file mode 100644 index 000000000..f8afed770 Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/sbmn_bg.gif differ diff --git a/theme/basic/mobile/skin/shop/basic/img/sct_bg_toright.gif b/theme/basic/mobile/skin/shop/basic/img/sct_bg_toright.gif new file mode 100644 index 000000000..0d180544f Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/sct_bg_toright.gif differ diff --git a/theme/basic/mobile/skin/shop/basic/img/sns_fb.png b/theme/basic/mobile/skin/shop/basic/img/sns_fb.png new file mode 100644 index 000000000..9d8904804 Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/sns_fb.png differ diff --git a/theme/basic/mobile/skin/shop/basic/img/sns_fb_s.png b/theme/basic/mobile/skin/shop/basic/img/sns_fb_s.png new file mode 100644 index 000000000..1ce297731 Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/sns_fb_s.png differ diff --git a/theme/basic/mobile/skin/shop/basic/img/sns_goo.png b/theme/basic/mobile/skin/shop/basic/img/sns_goo.png new file mode 100644 index 000000000..75b523e04 Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/sns_goo.png differ diff --git a/theme/basic/mobile/skin/shop/basic/img/sns_goo_s.png b/theme/basic/mobile/skin/shop/basic/img/sns_goo_s.png new file mode 100644 index 000000000..74235887d Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/sns_goo_s.png differ diff --git a/theme/basic/mobile/skin/shop/basic/img/sns_kakao.png b/theme/basic/mobile/skin/shop/basic/img/sns_kakao.png new file mode 100644 index 000000000..18c9f18c3 Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/sns_kakao.png differ diff --git a/theme/basic/mobile/skin/shop/basic/img/sns_kakao_s.png b/theme/basic/mobile/skin/shop/basic/img/sns_kakao_s.png new file mode 100644 index 000000000..838b9697e Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/sns_kakao_s.png differ diff --git a/theme/basic/mobile/skin/shop/basic/img/sns_twt.png b/theme/basic/mobile/skin/shop/basic/img/sns_twt.png new file mode 100644 index 000000000..bf10f5bad Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/sns_twt.png differ diff --git a/theme/basic/mobile/skin/shop/basic/img/sns_twt_s.png b/theme/basic/mobile/skin/shop/basic/img/sns_twt_s.png new file mode 100644 index 000000000..53f691a62 Binary files /dev/null and b/theme/basic/mobile/skin/shop/basic/img/sns_twt_s.png differ diff --git a/theme/basic/mobile/skin/shop/basic/item.form.skin.php b/theme/basic/mobile/skin/shop/basic/item.form.skin.php new file mode 100644 index 000000000..c1fce1d0d --- /dev/null +++ b/theme/basic/mobile/skin/shop/basic/item.form.skin.php @@ -0,0 +1,504 @@ +', 0); +?> + + + + + + + +
          + + + + +
          + '; + $thumb_img .= ''.$thumb.''; + $thumb_img .= ''.PHP_EOL; + } + if ($thumb_img) + { + echo '
          '.PHP_EOL; + echo ''.PHP_EOL; + echo ''.PHP_EOL; + echo '
            '.PHP_EOL; + echo $thumb_img; + echo '
          '.PHP_EOL; + echo '
          '; + } + ?> + +
          +

          상품간략정보 및 구매기능

          + + +

          + 상품 선택옵션 개, 추가옵션 개 +

          + +
          + + 고객선호도 별개 + + + +
          +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ + ?> + + + + + + + + 배송비결제'; + $sc_method = ''; + } + else + $sc_method = '주문시 결제'; + } + ?> + + + + + + + + + + + + + + + + + +
          제조사
          원산지
          브랜드
          모델
          판매가격판매중지
          판매가격전화문의
          시중가격
          판매가격 + + +
          재고수량 개
          + +
          최소구매수량 개
          최대구매수량 개
          +
          + +
          +

          선택옵션

          + + + + + + + + +
          +
          + + + +
          +

          추가옵션

          + + + + + + + + +
          +
          + + + +
          + +
            +
          • + + + + + + + (+0원) +
            + + + +
            +
          • +
          + + +
          + +
          + + + +

          상품의 재고가 부족하여 구매할 수 없습니다.

          + + +
          + + + + + + 재입고알림 + + WISH + +
          +
          +
          +
          + + + + + 추천하기 + +
          + + + + +
          + + + +
          +

          WITH ITEM

          +
          + set_query($sql); + echo $list->run(); + ?> +
          +
          + + + + + \ No newline at end of file diff --git a/theme/basic/mobile/skin/shop/basic/iteminfo.change.skin.php b/theme/basic/mobile/skin/shop/basic/iteminfo.change.skin.php new file mode 100644 index 000000000..9a0cb847c --- /dev/null +++ b/theme/basic/mobile/skin/shop/basic/iteminfo.change.skin.php @@ -0,0 +1,12 @@ +', 0); +?> + +

          교환/반품

          + +
          + +
          \ No newline at end of file diff --git a/theme/basic/mobile/skin/shop/basic/iteminfo.delivery.skin.php b/theme/basic/mobile/skin/shop/basic/iteminfo.delivery.skin.php new file mode 100644 index 000000000..00895309d --- /dev/null +++ b/theme/basic/mobile/skin/shop/basic/iteminfo.delivery.skin.php @@ -0,0 +1,18 @@ +', 0); +?> + +

          배송정보

          + +
          + +
          + +

          교환/반품

          + +
          + +
          \ No newline at end of file diff --git a/theme/basic/mobile/skin/shop/basic/iteminfo.info.skin.php b/theme/basic/mobile/skin/shop/basic/iteminfo.info.skin.php new file mode 100644 index 000000000..c024423af --- /dev/null +++ b/theme/basic/mobile/skin/shop/basic/iteminfo.info.skin.php @@ -0,0 +1,57 @@ +', 0); +?> + +

          상품설명

          + +
          + +
          + +
          + + + +
          + +
          + + + +

          상품 정보 고시

          + +
            + $val) { + $ii_title = $info_array[$key][0]; + $ii_value = $val; + ?> +
          • + + +
          • + +
          + + 상품 정보 고시 정보가 올바르게 저장되지 않았습니다.
          config.php 파일의 G5_ESCAPE_FUNCTION 설정을 addslashes 로
          변경하신 후 관리자 > 상품정보 수정에서 상품 정보를 다시 저장해주세요.

          '; + } + } + } //if + ?> + +
          + \ No newline at end of file diff --git a/theme/basic/mobile/skin/shop/basic/iteminfo.itemqa.skin.php b/theme/basic/mobile/skin/shop/basic/iteminfo.itemqa.skin.php new file mode 100644 index 000000000..bcf9179ae --- /dev/null +++ b/theme/basic/mobile/skin/shop/basic/iteminfo.itemqa.skin.php @@ -0,0 +1,12 @@ +', 0); +?> + +

          상품문의

          + +
          + +
          \ No newline at end of file diff --git a/theme/basic/mobile/skin/shop/basic/iteminfo.itemuse.skin.php b/theme/basic/mobile/skin/shop/basic/iteminfo.itemuse.skin.php new file mode 100644 index 000000000..7308f143e --- /dev/null +++ b/theme/basic/mobile/skin/shop/basic/iteminfo.itemuse.skin.php @@ -0,0 +1,12 @@ +', 0); +?> + +

          사용후기

          + +
          + +
          \ No newline at end of file diff --git a/theme/basic/mobile/skin/shop/basic/iteminfo.relation.skin.php b/theme/basic/mobile/skin/shop/basic/iteminfo.relation.skin.php new file mode 100644 index 000000000..9a877ea99 --- /dev/null +++ b/theme/basic/mobile/skin/shop/basic/iteminfo.relation.skin.php @@ -0,0 +1,66 @@ +', 0); +?> + +

          관련상품

          + +
          + set_mobile(true); + $list->set_query($sql); + $list->set_view('sns', true); + echo $list->run(); + ?> +
          + + \ No newline at end of file diff --git a/theme/basic/mobile/skin/shop/basic/itemqa.skin.php b/theme/basic/mobile/skin/shop/basic/itemqa.skin.php new file mode 100644 index 000000000..f73f2dfdc --- /dev/null +++ b/theme/basic/mobile/skin/shop/basic/itemqa.skin.php @@ -0,0 +1,152 @@ +', 0); +?> + + +상품문의 쓰기 새 창 + + +
          + + '; + + if($is_admin || $member['mb_id' ] == $row['mb_id']) { + $iq_question = get_view_thumbnail(conv_content($row['iq_question'], 1), $thumbnail_width); + } else { + $iq_question = '비밀글로 보호된 문의입니다.'; + $is_secret = true; + } + } else { + $iq_question = get_view_thumbnail(conv_content($row['iq_question'], 1), $thumbnail_width); + } + $iq_time = substr($row['iq_time'], 2, 8); + + $hash = md5($row['iq_id'].$row['iq_time'].$row['iq_ip']); + + $iq_stats = ''; + $iq_style = ''; + $iq_answer = ''; + + if ($row['iq_answer']) + { + $iq_answer = get_view_thumbnail(conv_content($row['iq_answer'], 1), $thumbnail_width); + $iq_stats = '답변완료'; + $iq_style = 'sit_qaa_done'; + $is_answer = true; + } else { + $iq_stats = '답변전'; + $iq_style = 'sit_qaa_yet'; + $iq_answer = '답변이 등록되지 않았습니다.'; + $is_answer = false; + } + + if ($i == 0) echo '
            '; + ?> + +
          1. + +
            +
            작성자
            +
            +
            작성일
            +
            +
            상태
            +
            +
            + +
            +
            +
            + Q + 문의내용
            + +
            + +
            + A + 답변
            + +
            + +
            + + + + +
            +
          2. + + 0) echo '
          '; + + if (!$i) echo '

          상품문의가 없습니다.

          '; + ?> +
          + + + + + + + \ No newline at end of file diff --git a/theme/basic/mobile/skin/shop/basic/itemqaform.skin.php b/theme/basic/mobile/skin/shop/basic/itemqaform.skin.php new file mode 100644 index 000000000..e47c33f75 --- /dev/null +++ b/theme/basic/mobile/skin/shop/basic/itemqaform.skin.php @@ -0,0 +1,67 @@ +', 0); +?> + + +
          +

          상품문의 쓰기

          + +
          + + + + + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          옵션 + > + +
          이메일을 입력하시면 답변 등록 시 답변이 이메일로 전송됩니다.
          휴대폰번호를 입력하시면 답변 등록 시 답변등록 알림이 SMS로 전송됩니다.
          +
          + +
          + + +
          +
          +
          + + + \ No newline at end of file diff --git a/theme/basic/mobile/skin/shop/basic/itemqalist.skin.php b/theme/basic/mobile/skin/shop/basic/itemqalist.skin.php new file mode 100644 index 000000000..ffe042013 --- /dev/null +++ b/theme/basic/mobile/skin/shop/basic/itemqalist.skin.php @@ -0,0 +1,145 @@ +', 0); +?> + + + + +
          +
          + 전체보기 + + + + + + +
          +
          + +
          + + + + '; + + if($is_admin || $member['mb_id' ] == $row['mb_id']) { + $iq_question = get_view_thumbnail(conv_content($row['iq_question'], 1), $thumbnail_width); + } else { + $iq_question = '비밀글로 보호된 문의입니다.'; + $is_secret = true; + } + } else { + $iq_question = get_view_thumbnail(conv_content($row['iq_question'], 1), $thumbnail_width); + } + + $it_href = G5_SHOP_URL.'/item.php?it_id='.$row['it_id']; + + if ($row['iq_answer']) + { + $iq_answer = get_view_thumbnail(conv_content($row['iq_answer'], 1), $thumbnail_width); + $iq_stats = '답변완료'; + $iq_style = 'sit_qaa_done'; + $is_answer = true; + } else { + $iq_stats = '답변전'; + $iq_style = 'sit_qaa_yet'; + $iq_answer = '답변이 등록되지 않았습니다.'; + $is_answer = false; + } + + if ($i == 0) echo '
            '; + ?> +
          1. + + + +
            +

            + +
            +
            작성자
            +
            +
            작성일
            +
            +
            상태
            +
            +
            + + + +
            +
            + +
          2. + 0) echo '
          '; + if ($i == 0) echo '

          자료가 없습니다.

          '; + ?> +
          + + + + + \ No newline at end of file diff --git a/theme/basic/mobile/skin/shop/basic/itemuse.skin.php b/theme/basic/mobile/skin/shop/basic/itemuse.skin.php new file mode 100644 index 000000000..04a3cf7f9 --- /dev/null +++ b/theme/basic/mobile/skin/shop/basic/itemuse.skin.php @@ -0,0 +1,116 @@ +', 0); +?> + + +사용후기 쓰기 새 창 + + +
          + + '; + ?> + +
        • + +
          +
          작성자
          +
          +
          작성일
          +
          +
          선호도
          +
          별<?php echo $is_star; ?>개
          +
          + + +
        • + + 0) echo ''; + + if (!$i) echo '

          사용후기가 없습니다.

          '; + ?> +
          + + + + + + + \ No newline at end of file diff --git a/theme/basic/mobile/skin/shop/basic/itemuseform.skin.php b/theme/basic/mobile/skin/shop/basic/itemuseform.skin.php new file mode 100644 index 000000000..942f5893a --- /dev/null +++ b/theme/basic/mobile/skin/shop/basic/itemuseform.skin.php @@ -0,0 +1,85 @@ +', 0); +?> + + +
          +

          사용후기 쓰기

          + +
          + + + + + +
          + + + + + + + + + + + + + + + + + + + +
          평가 +
            +
          • + > + + +
          • +
          • + > + + +
          • +
          • + > + + +
          • +
          • + > + + +
          • +
          • + > + + +
          • +
          +
          +
          + +
          + + +
          + +
          +
          + + + \ No newline at end of file diff --git a/theme/basic/mobile/skin/shop/basic/itemuselist.skin.php b/theme/basic/mobile/skin/shop/basic/itemuselist.skin.php new file mode 100644 index 000000000..3505ec561 --- /dev/null +++ b/theme/basic/mobile/skin/shop/basic/itemuselist.skin.php @@ -0,0 +1,108 @@ +', 0); +?> + + + + +
          +
          + 전체보기 + + + + + +
          +
          + +
          + + + + '; + ?> +
        • + + + +
          +

          + +
          +
          작성자
          +
          +
          작성일
          +
          +
          평가점수
          +
          별<?php echo $star; ?>개
          +
          + + + +
          +
          + +
        • + 0) echo ''; + if ($i == 0) echo '

          자료가 없습니다.

          '; + ?> +
          + + + + + \ No newline at end of file diff --git a/theme/basic/mobile/skin/shop/basic/largeimage.skin.php b/theme/basic/mobile/skin/shop/basic/largeimage.skin.php new file mode 100644 index 000000000..720f964de --- /dev/null +++ b/theme/basic/mobile/skin/shop/basic/largeimage.skin.php @@ -0,0 +1,91 @@ +', 0); +?> + +
          +

          상품 이미지 새창 보기

          + +
          + + + + <?php echo $row['it_name']; ?> + + + +
          + + 0) { + echo '
            '; + foreach($thumbnails as $key=>$val) { + echo '
          • '.$val.'
          • '; + } + echo '
          '; + } + ?> + +
          + +
          +
          + + \ No newline at end of file diff --git a/theme/basic/mobile/skin/shop/basic/list.10.skin.php b/theme/basic/mobile/skin/shop/basic/list.10.skin.php new file mode 100644 index 000000000..52641339a --- /dev/null +++ b/theme/basic/mobile/skin/shop/basic/list.10.skin.php @@ -0,0 +1,80 @@ +', 0); +?> + + + + + + + + +list_mod); +$li_width_style = ' style="width:'.$li_width.'%;"'; + +for ($i=0; $row=sql_fetch_array($result); $i++) { + if ($i == 0) { + if ($this->css) { + echo "
            css}\">\n"; + } else { + echo "\n"; + +if($i == 0) echo "

            등록된 상품이 없습니다.

            \n"; +?> + diff --git a/theme/basic/mobile/skin/shop/basic/list.best.10.skin.php b/theme/basic/mobile/skin/shop/basic/list.best.10.skin.php new file mode 100644 index 000000000..0beae55fb --- /dev/null +++ b/theme/basic/mobile/skin/shop/basic/list.best.10.skin.php @@ -0,0 +1,173 @@ +', 0); +?> + +total_count > 0) { + $li_width = intval(100 / $this->list_mod); + $li_width_style = ' style="width:'.$li_width.'%;"'; + $k = 1; + $slide_btn = ''; + + for ($i=0; $row=sql_fetch_array($result); $i++) { + if($i == 0) { + echo ''.PHP_EOL; + echo '
            '.PHP_EOL; + echo '

            베스트상품

            '.PHP_EOL; + echo '
            '.PHP_EOL; + echo '
            '.PHP_EOL; + echo '
              '.PHP_EOL; + } + + if($i > 0 && ($i % $this->list_mod == 0)) { + echo '
            '.PHP_EOL; + echo ''.PHP_EOL; + echo '
            '.PHP_EOL; + echo '
            '.$slide_btn.'
            '.PHP_EOL; + echo '
            '.PHP_EOL; + echo '
            '.PHP_EOL; + } +?> + + + + \ No newline at end of file diff --git a/theme/basic/mobile/skin/shop/basic/list.sort.skin.php b/theme/basic/mobile/skin/shop/basic/list.sort.skin.php new file mode 100644 index 000000000..fbb21ecfb --- /dev/null +++ b/theme/basic/mobile/skin/shop/basic/list.sort.skin.php @@ -0,0 +1,27 @@ +', 0); +?> + + +
            +

            상품 정렬

            + + +
            + \ No newline at end of file diff --git a/theme/basic/mobile/skin/shop/basic/listcategory.skin.php b/theme/basic/mobile/skin/shop/basic/listcategory.skin.php new file mode 100644 index 000000000..be650c45c --- /dev/null +++ b/theme/basic/mobile/skin/shop/basic/listcategory.skin.php @@ -0,0 +1,36 @@ +'.$row['ca_name'].' ('.$row2['cnt'].')'; + $exists = true; +} + +if ($exists) { + + // add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨 + add_stylesheet('', 0); +?> + + + + + + \ No newline at end of file diff --git a/theme/basic/mobile/skin/shop/basic/main.10.skin.php b/theme/basic/mobile/skin/shop/basic/main.10.skin.php new file mode 100644 index 000000000..71db7e894 --- /dev/null +++ b/theme/basic/mobile/skin/shop/basic/main.10.skin.php @@ -0,0 +1,81 @@ +', 0); +?> + + + + + + + + + +list_mod); +$li_width_style = ' style="width:'.$li_width.'%;"'; + +for ($i=0; $row=sql_fetch_array($result); $i++) { + if ($i == 0) { + if ($this->css) { + echo "
              css}\">\n"; + } else { + echo "\n"; + +if($i == 0) echo "

              등록된 상품이 없습니다.

              \n"; +?> + diff --git a/theme/basic/mobile/skin/shop/basic/main.event.skin.php b/theme/basic/mobile/skin/shop/basic/main.event.skin.php new file mode 100644 index 000000000..0c7a478ab --- /dev/null +++ b/theme/basic/mobile/skin/shop/basic/main.event.skin.php @@ -0,0 +1,48 @@ +', 0); +?> +
              +
              +

              EVENT

              +

              이벤트 모음

              +
              + + +
              + \ No newline at end of file diff --git a/theme/basic/mobile/skin/shop/basic/mainbanner.10.skin.php b/theme/basic/mobile/skin/shop/basic/mainbanner.10.skin.php new file mode 100644 index 000000000..a1f80c066 --- /dev/null +++ b/theme/basic/mobile/skin/shop/basic/mainbanner.10.skin.php @@ -0,0 +1,76 @@ +', 0); +?> + +'.PHP_EOL.'
                '.PHP_EOL; + //print_r2($row); + // 테두리 있는지 + $bn_border = ($row['bn_border']) ? ' class="sbn_border"' : '';; + // 새창 띄우기인지 + $bn_new_win = ($row['bn_new_win']) ? ' target="_blank"' : ''; + + $bimg = G5_DATA_PATH.'/banner/'.$row['bn_id']; + if (file_exists($bimg)) + { + $banner = ''; + $size = getimagesize($bimg); + + if($size[2] < 1 || $size[2] > 16) + continue; + + if($max_width < $size[0]) + $max_width = $size[0]; + + if($max_height < $size[1]) + $max_height = $size[1]; + + echo ''.PHP_EOL; + if ($row['bn_url'][0] == '#') + $banner .= ''; + else if ($row['bn_url'] && $row['bn_url'] != 'http://') { + $banner .= ''; + } + echo $banner.''.$row['bn_alt'].''; + if($banner) + echo ''.PHP_EOL; + echo ''.PHP_EOL; + + $bn_first_class = ''; + $bn_slide_btn .= ''.PHP_EOL; + $bn_sl = ''; + } +} + +if ($i > 0) { + echo '
              '.PHP_EOL; + echo '
              '.$bn_slide_btn.'
              '.PHP_EOL; + echo ''.PHP_EOL; +?> + + + + \ No newline at end of file diff --git a/theme/basic/mobile/skin/shop/basic/navigation.skin.php b/theme/basic/mobile/skin/shop/basic/navigation.skin.php new file mode 100644 index 000000000..96db9baae --- /dev/null +++ b/theme/basic/mobile/skin/shop/basic/navigation.skin.php @@ -0,0 +1,38 @@ +'.$row['ca_name'].''; + } +} +else + $str = $g5['title']; + +//if ($it_id) $str .= " > $it[it_name]"; + +// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨 +add_stylesheet('', 0); +?> + +
              + Home + +
              diff --git a/theme/basic/mobile/skin/shop/basic/personalpay.skin.php b/theme/basic/mobile/skin/shop/basic/personalpay.skin.php new file mode 100644 index 000000000..70df094fc --- /dev/null +++ b/theme/basic/mobile/skin/shop/basic/personalpay.skin.php @@ -0,0 +1,37 @@ +', 0); +?> + + +\n"; + } + + if($i % $list_mod == 0) + $li_clear = ' sct_clear'; + else + $li_clear = ''; + + $href = G5_SHOP_URL.'/personalpayform.php?pp_id='.$row['pp_id'].'&page='.$page; +?> +
            • > +
              +
              +
              +
            • + 0) echo "
            \n"; + +if($i == 0) echo "

            등록된 개인결제가 없습니다.

            \n"; +?> + diff --git a/theme/basic/mobile/skin/shop/basic/relation.10.skin.php b/theme/basic/mobile/skin/shop/basic/relation.10.skin.php new file mode 100644 index 000000000..60e9867d7 --- /dev/null +++ b/theme/basic/mobile/skin/shop/basic/relation.10.skin.php @@ -0,0 +1,81 @@ +', 0); +?> + + + + + + + + + +list_mod); +$li_width_style = ' style="width:'.$li_width.'%;"'; + +for ($i=0; $row=sql_fetch_array($result); $i++) { + if ($i == 0) { + if ($this->css) { + echo "
              css}\">\n"; + } else { + echo "\n"; + +if($i == 0) echo "

              등록된 관련상품이 없습니다.

              \n"; +?> + diff --git a/theme/basic/mobile/skin/shop/basic/style.css b/theme/basic/mobile/skin/shop/basic/style.css new file mode 100644 index 000000000..4c89f26f3 --- /dev/null +++ b/theme/basic/mobile/skin/shop/basic/style.css @@ -0,0 +1,318 @@ +@charset "utf-8"; +/* SIR 지운아빠 */ + +/* ##### maint.(nn).skin.php, list.(nn).skin.php 공통 적용 시작 ##### */ +/* 공통 */ +.sct_wrap {margin:0 0 30px;zoom:1} +.sct_wrap:after {display:block;visibility:hidden;clear:both;content:""} +.sct_wrap header {margin:0 0 20px;zoom:1} +.sct_wrap header:after {display:block;visibility:hidden;clear:both;content:""} +.sct_wrap h2 {padding:10px 0 0;line-height:1em;text-align:center;font-weight:bold; letter-spacing:0.3em} +.sct_wrap h2 a {text-decoration:none} +.sct_wrap h2 a:hover{color:#34b5a1} +.sct_wrap_hdesc {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} + +.sct {margin:10px 5px 0 ;padding:0;list-style:none;zoom:1;clear:both;} +.sct:after {display:block;visibility:hidden;clear:both;content:""} +.sct_li {position:relative;text-align:center} +.sct_noitem {padding:50px 0;text-align:center} +.sct_icon img {margin:0 1px 0 0} +.sct_sns a {display:inline-block;margin:0 4px 0 0} +.sct_sns button {margin:0 4px 0 0;padding:0;border:0} + +.mli_btn button{background:url(img/mainlist_btn.gif) no-repeat; width:30px; height:30px;border:none;text-indent:-9999px} +.mli_btn button.mli_pre{position:absolute;top:0;left:10px} +.mli_btn button.mli_next{background-position: -33px 0;position:absolute;top:0;right:10px} + +/* 상품 목록 스킨 10 */ +.sct_10 .sct_li {position:relative;float:left;margin-bottom:10px} +.sct_10 .sct_last {margin:0 0 15px !important} +.sct_10 .sct_clear {clear:both;} +.sct_10 .sct_a {display:block;text-decoration:none;font-weight:bold; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;line-height:20px} +.sct_10 .sct_a img{width:100%;height:auto} +.sct_10 .sct_id {display:block;margin:0 0 5px} +.sct_10 .sct_basic {margin:0 0 10px} +.sct_10 .sct_cost {display:block;margin:0 0 5px;font-size:0.917em} +.sct_10 .sct_cost strike {display:block;margin:0 0 5px;color:#999;font-weight:normal} +.sct_10 .sct_icon {margin:0 0 10px} +.sct_10 .sct_sns {margin:15px 0 0} +.sct_10 .sct_img{margin:0 5px 5px ;} +.li_more{text-align:center} +.li_more img{width:30px;margin:5px 0} +.li_more p{color:#aaa;margin-top:5px;display:none;} +.li_more button{background:#fff;border:3px double #e9e9e9;width:205px;padding:8px 0 ;font-size:0.917em;color:#797979;margin-top:15px} + +/* 관련상품 목록 스킨 10 */ +#sit_rel h2{text-align:center;margin:20px 0;letter-spacing:0.3em} + +/* 베스트상품 스킨 10 */ +#best_item{border-bottom:1px solid #e9e9e9;padding:20px 0 10px 5px;overflow:hidden;position:relative} +#best_item h2{position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#best_item #sbest_list{width:100%;overflow:hidden;} +#best_item .slide-wrap{margin:0px;overflow:hidden;position:relative;top:0;left:0;float:left;} +#best_item .sct_best{width:100%;position:relative;padding:0;float:left;} +#best_item .best_on{} +.sct_best .sct_li {position:relative;float:left;} +.sct_best .sct_last {margin:0 0 15px !important} +.sct_best .sct_clear {clear:both;margin-left:0} +.sct_best .sct_a {display:block;position:relative;text-decoration:none;font-weight:bold; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;} +.sct_best .sct_txt .sct_a {margin:0 0 5px;} +.sct_best .sct_a img{width:100%;height:auto} +.sct_best .sct_id {display:block;margin:0 0 5px} +.sct_best .sct_basic {margin:0 0 10px} +.sct_best .sct_cost {display:block;margin:0 0 10px;font-size:0.917em} +.sct_best .sct_icon {margin:0 0 10px} +.sct_best .sct_sns {margin:15px 0 0} +.sct_best .sct_img{position:relative;margin:0 5px 5px ;} +.sct_best .best_icon{background:url(img/prd_icon.png) no-repeat;position:absolute;top:0;left:0;font-size:0;width:25px;height:25px; display:inline-block;z-index:999;overflow:hidden;text-indent:-99999px} +.bst_silde_btn{text-align:center;margin:5px 0 10px} +.bst_silde_btn button{background:url(img/best_btn.gif) no-repeat 5px 5px; width:20px;height:20px;text-indent:-999px;font-size:0;border:none;} +.bst_silde_btn button.bst_sl{background-position:-11px 5px } + +/* 개인결제 목록 */ +.sct_pv {margin-top:10px} +.sct_pv .sct_li {position:relative;float:left;position:relative;float:left;margin-bottom:10px;} +.sct_pv .sct_img{padding:0 5px} +.sct_pv .sct_img a{border:1px solid #e2edef} +.sct_pv .sct_img img{width:100%;} +.sct_pv .sct_last {margin:0 0 15px !important} +.sct_pv .sct_clear {clear:both} +.sct_pv .sct_a {display:block;position:relative;margin:0 0 5px;text-decoration:none; font-weight: bold; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; line-height: 20px;} +.sct_pv .sct_id {display:block;margin:0 0 5px} +.sct_pv .sct_basic {margin:0 0 10px} +.sct_pv .sct_cost {display:block;margin:0 0 10px;} +.sct_pv .sct_cost strike {display:block;margin:0 0 5px;color:#999;font-weight:normal} +.sct_pv .sct_icon {margin:0 0 10px} +/* ##### maint.(nn).skin.php, list.(nn).skin.php 공통 적용 끝 ##### */ + +/* 상품 목록 */ +#sct {} +.sct_admin {margin:0 0 10px;text-align:right} + +/* 상품 목록 현재 위치 */ +#sct_location {border:1px solid #e9e9e9;background:#f2f5f9;letter-spacing:-4px} +#sct_location a {display:inline-block;padding:5px 10px;text-decoration:none;letter-spacing:0 !important} +.sct_here {font-weight:bold} +.sct_bg {padding-right:13px !important;background:url('img/sct_bg_toright.gif') right 8px no-repeat} + +/* 상품 목록 카테고리 목록 */ +.sct_ct {text-align:center;width:100%;border-bottom:1px solid #e9e9e9; background:#f9f9f9;} +.sct_ct h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +.sct_ct ul {list-style:none;display:inline-block;margin:0;padding:5px 0} +.sct_ct ul:after {display:block;visibility:hidden;clear:both;content:""} +.sct_ct ul li {display:inline-block;background:url(img/sbmn_bg.gif) no-repeat left 50%;padding:0 15px 0 20px;letter-spacing:0.2em;font-size:0.917em;line-height:30px} +.sct_ct ul li:first-child{background:none} +.sct_ct a {text-decoration:none;color:#656565} +.sct_ct_parent {font-weight:bold} +.sct_ct_here {color:#ff3600 !important} + +#sct_ct_2 li {margin:0 0 10px} +#sct_ct_2 a {display:inline-block;width:120px} +#sct_ct_3 li {float:left;margin:0 10px 10px 0;width:120px} + +/* 상품 정렬 */ +#sct_sort {padding:10px 10px 0;clear:both} +#sct_sort:after {display:block;visibility:hidden;clear:both;content:""} +#sct_sort h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#sct_sort ul {margin:0;padding:0 0 0 1px;list-style:none;} +#sct_sort ul:after {display:block;visibility:hidden;clear:both;content:""} +#sct_sort li {float:left;position:relative;margin-left:-1px;width:33.33%} +#sct_sort li a{display:block;text-align:center;color:#8d8d8d;background:#fff;border-color:#e9e9e9;font-size:0.917em} + +/* 상품 리스트 스타일 선택 */ +#sct_lst {float:right;margin:10px 0;padding:0;list-style:none} +#sct_lst:after {display:block;visibility:hidden;clear:both;content:""} +#sct_lst li {position:relative;float:left;margin:0 0 0 -1px} +#sct_lst button {position:relative;margin:0 0 0 -1px;padding:0;width:25px;height:25px;border:1px solid #ccc} +#sct_lst button span {position:absolute;top:0;left:0;width:100%;height:100%;background:url('../shop/img/is_button.gif')} +#sct_lst button.sct_lst_list span {background-position:0 0} +#sct_lst button.sct_lst_list span.sct_lst_on {background-position:0 -30px} +#sct_lst button.sct_lst_gallery span {background-position:-30px 0} +#sct_lst button.sct_lst_gallery span.sct_lst_on {background-position:-30px -30px} + +/* 상품 상세보기 */ +#sit {margin: 0;border-top:1px solid #e9e9e9} +.sit_admin {margin:10px 10px 0;text-align:right} +.sit_empty {padding:30px 0;text-align:center} + +/* 상품상세 */ +#info_content {padding:0 10px 30px;zoom:1} +#info_content:after {display:block;visibility:hidden;clear:both;content:""} +#info_content h3 {margin:0 0 10px} +.if_tit{text-align:center;margin-top:10px;padding:10px;background:#f5f5f5;border:1px solid #e9e9e9;} +.win_desc_if{border:1px solid #e9e9e9;padding:10px;border-top:none;} +.win_desc{margin-top:10px} + +/* 상품 상세보기 - 개요 */ +#sit_ov_wrap {margin:0 0 20px;} +#sit_ov_wrap:after {display:block;visibility:hidden;clear:both;content:""} + +/* 상품 상세보기 - 이미지 미리보기 */ +#sit_pvi {position:relative;border-bottom:1px solid #e9e9e9;text-align:center} +#sit_pvi_prev {position:absolute;top:50%;left:0;background:url(img/item_btn.png) no-repeat;width:27px;height:45px;text-indent:-9999px;margin-top:-20px;} +#sit_pvi_next {position:absolute;top:50%;right:0;background:url(img/item_btn.png) no-repeat -40px 0;margin-top:-20px;width:27px;height:45px;text-indent:-9999px} +.sit_pvi_btn {display:none;z-index:10;width:20px;border:0;background:#f2f5f9} +#sit_pvi_slide {position:relative;margin:0 auto;padding:0;list-style:none;overflow-x:hidden} +#sit_pvi_slide li {display:none;position:absolute;left:0;top:0} +#sit_pvi_nw h1 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#sit_pvi_nwbig {padding:10px 0;text-align:center} +#sit_pvi_nwbig span {display:none} +#sit_pvi_nwbig span.visible {display:inline} +#sit_pvi_nw ul {margin:0 0 20px;padding:0 10px;list-style:none;zoom:1} +#sit_pvi_nw ul:after {display:block;visibility:hidden;clear:both;content:""} +#sit_pvi_nw li {float:left;margin:0 0 1px 1px} +#sit_pvi_nw li img {width:60px;height:60px} + +/* 상품 상세보기 - 간략정보 및 구매기능 */ +#sit_ov {position:relative;padding: 0;height:auto !important;} +#sit_ov h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#sit_ov h3 {margin:0 0 10px} +#sit_ov section{margin: 10px;padding-bottom:10px} + +#sit_title {display:block;margin:10px 10px 0;font-size:1.2em;} +#sit_desc {display:inline-block;margin:0 0 10px;color:#999} +#sit_opt_info {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +.sit_icon {display:block;margin: 0 0;} +.sit_icon img {margin:0 1px 0 0;vertical-align:top;margin:0 1px} + +#sit_star {color:#b8afa2;font-size:0.95em;padding:0 10px;line-height:2.2em} +#sit_star span {display:inline-block;margin:0 5px 0 0;color:#666;letter-spacing:0} +#sit_star .sit_star {position:relative;top:-2px;margin:0 5px 0 0} +#sit_star a {display:inline-block;vertical-align:middle} +#sit_star button {margin:0;padding:0;border:0} + +.sit_ov_tbl {margin:10px 10px;background:#f6f6f6;padding:0 10px;border-top:1px solid #e9e9e9;border:1px solid #e9e9e9;} +.sit_ov_tbl table{border-collapse:collapse;width:100%;border:0;font-size:0.917em} +.sit_ov_tbl th {border-top:1px solid #e9e9e9;font-weight:normal;text-align:left;padding:9px 0;} +.sit_ov_tbl td {padding:5px 0;border-top:1px solid #e9e9e9} +.sit_ov_tbl tr:first-child td,.sit_ov_tbl tr:first-child th{border:none} +.sit_ov_ro {padding:2px 2px 3px;border:0;background:transparent;text-align:right;vertical-align:middle} +.sit_ov_opt {padding:2px 2px 3px;border:0;background:transparent;vertical-align:middle} +.sit_ov_input {height:1.8em;border:1px solid #b8c9c2;background:transparent;vertical-align:middle} +.sit_ov_tbl button {margin:0} + +.sit_op_sl{width:100%;border-collapse:collapse;border:1px solid #e9e9e9;} +.sit_op_sl th{font-weight:normal;text-align:left;padding:0 0 0 10px;} +.sit_op_sl td{text-align:left;padding:9px 10px 9px 0} + +.sit_sel_btn {position:relative;top:-15px;right:-2px} /* 선택옵션용 추가 버튼 */ +.sit_sel_btn button {width:100%} + +#sit_ov_soldout {margin:0 0 20px;color:#ff3061;font-weight:bold;text-align:center} +#sit_ov_btn {margin:0;padding:0 10px;text-align:center;} +#sit_ov_btn:after {display:block;visibility:hidden;clear:both;content:""} +#sit_ov_btn a {display:inline-block;padding: 0;vertical-align:middle;text-decoration:none;letter-spacing:0.3em;line-height:40px;height:40px} +#sit_ov_btn input {padding:0;border:none;letter-spacing:0.3em;height:42px;line-height:42px} + #sit_btn_cart{background:#34b5a1;color:#fff;width:100%} +#sit_btn_buy, #sit_btn_wish {border:1px solid #34b5a1 !important;color:#34b5a1;width:49%;background:#fff;margin-top:5px} +#sit_btn_buy{float:left} +#sit_btn_wish{float:right } +#sit_btn_rec {background:#333;font-size:0.92em;color:#fff;padding:0 3px;height:25px;line-height:25px;display:inline-block;vertical-align:middle} +#sit_sns{text-align:center; padding-bottom:20px;border-bottom:1px solid #e9e9e9;} +#sit_sel_option,#sit_tot_price{padding:0 10px} + +/* 상품 상세보기 - 다른 상품 보기 */ +#sit_siblings {text-align:center;position:relative} +#sit_siblings h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#sit_siblings a {display:inline-block;background:#383838;color:#fff} +#sit_siblings a#siblings_prev {position:absolute;bottom:20px;left:10px;background: url(img/mainlist_btn.gif) no-repeat; width: 30px; height: 30px;text-indent:-999px;overflow:hidden} +#sit_siblings a#siblings_next {position:absolute;bottom:20px;right:10px;background: url(img/mainlist_btn.gif) no-repeat -33px 0; width: 30px; height: 30px;text-indent:-999px;overflow:hidden} +#sit_siblings a span {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} + +/* 상품 상세보기 하단 버튼 */ +#sit_more {-webkit-backface-visibility: hidden;padding:0;background-color: rgba(0, 0, 0, 0.8);position:fixed;bottom:0;left:0;width:100%;z-index:9999} +#sit_more:after {display:block;visibility:hidden;clear:both;content:""} +#sit_more li {position:relative;width:25%;float:left;letter-spacing:0.2em;background:url(img/item_bg.gif) no-repeat left 17px;} +#sit_more li:first-child{background:none} +#sit_more a {display:block;padding:15px 0 15px 2px;text-align:center;color:#fff} +.item_use_count,.item_qa_count{color:#999;padding-left:2px} + +/* 상품 상세보기 - 상품정보 */ +.close_btn{margin:30px 10px 10px;} +#iteminfo_close{width:100%;background:#000;border:none;color:#fff;padding:10px 0;} +#sit_inf_basic {margin:0 0 20px} +#sit_inf_explan {margin:0 0 10px;line-height:1.5em} +#sit_inf_explan img {max-width:100%;height:auto} +#sit_inf_open {margin:0;padding:0;list-style:none} +#sit_inf_open li {margin:0 0 1px;padding:8px 0;background:#fff;border:1px solid #f2f2f2;border-top:none;color:#727272} +#sit_inf_open li:after {display:block;visibility:hidden;clear:both;content:""} +#sit_inf_open strong {clear:both;float:left;padding:0 1%;width:28%;letter-spacing:-0.1em} +#sit_inf_open span {float:left;margin:0;padding:0 1%;width:68%} +#sit_inf h2{background:#f5f5f5;color:#444;padding:10px; border:1px solid #e9e9e9;text-align:center;} + +/* 상품 상세보기 - 사용후기 */ +.tit_no{position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#sit_use {margin:0 0 10px;padding:10px 10px 20px;border-bottom:1px solid #e9e9e9} +#sit_use_ol {margin:0 0 5px;padding:0;border-top:1px solid #e9e9e9;list-style:none} +.sit_use_li {position:relative;padding:0 0 10px;border-bottom:1px solid #e9e9e9;} +.sit_use_li_title {display:block;margin:0;padding:10px;width:100%;border:0;background:transparent;text-align:left} +.sit_use_li_title b{font-weight:normal;margin-right:2px} +.sit_use_dl {margin:0;padding:0 10px;position:relative} +.sit_use_dl:after {display:block;visibility:hidden;clear:both;content:""} +.sit_use_dl dt {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +.sit_use_dl dd {float:left;margin:0 10px 0 0;color:#888;font-size:0.917em} +.sit_use_star {margin:0 !important;position:absolute;bottom:0;right:10px} +.sit_use_con {display:none;padding:10px 10px 0} +.sit_use_p {margin:0 0 10px;padding:10px;background:#f2f2f2} +.sit_use_cmd {text-align:right} +.sit_use_cmd a.btn01{padding: 5px;} +#sit_use_wbtn {margin:0 0 5px;text-align:center} +#sit_use_write {} +#sit_use_write #is_subject {width:100%} +#sit_use_write ul {margin:5px 0 0} +#sit_use_write li {margin:0 0 5px} +#sit_use_write li label {display:inline-block;width:80px} +#sit_use_write_star {margin:0;padding:0;list-style:none} + +/* 상품 상세보기 - 상품문의 */ +#sit_qa {margin:0 0 10px;padding:10px 10px 20px;border-bottom:1px solid #e9e9e9} +#sit_qa_ol {margin:0 0 5px;padding:0;border-top:1px solid #e9e9e9;list-style:none} +.sit_qa_li {position:relative;padding:0 0 10px;border-bottom:1px solid #e9e9e9;} +.sit_qa_li_title {display:block;margin:0;padding:10px;width:100%;border:0;background:transparent;text-align:left} +.sit_qa_li_title b{font-weight:normal;margin-right:2px} +.sit_qa_dl {margin:0;padding:0 10px;position:relative} +.sit_qa_dl:after {display:block;visibility:hidden;clear:both;content:""} +.sit_qa_dl dt {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +.sit_qa_dl dd {float:left;margin:0 10px 0 0;color:#888;font-size:0.917em} +.sit_qa_dl dd.sit_qaa_yet,.sit_qa_dl dd.sit_qaa_done{position:absolute;bottom:0;right:0;background:#eee;padding:5px 8px;color:#888;border-radius:15px} +.sit_qa_dl dd.sit_qaa_done{background:#ff3e5e;color:#fff} +.sit_qa_con {display:none;padding:10px 10px 0} +.sit_qa_p {margin:0 0 10px;border:1px solid #e9e9e9;background:#fff;padding:0 10px;background:#f2f2f2;} +.sit_qa_p strong {display:inline-block;margin:0 0 10px;} +.sit_qa_p span.sit_alp{position:absolute;top:10px;left:0;background:#000;color:#fff;color:#fff;font-size:1.2em;font-weight:bold;width:25px;height:25px;line-height:25px;display:inline-block;border-radius:15px;text-align:center;} +.sit_qa_qaq,.sit_qa_qaa {padding:10px 0 10px 30px;position:relative} +.sit_qa_qaa {border-top:1px dotted #ddd} +.sit_qa_qaa span.sit_alp{background:#5b5b5b} +.sit_qa_con textarea {display:none} +.sit_qa_cmd {text-align:right} +.sit_qa_cmd a.btn01{padding:5px;} +.sit_qa_pw {display:none;position:absolute;top:30px;left:175px;padding:10px;width:348px;border:1px solid #000;background:#fff;text-align:center} +.sit_qa_pw span {display:block;margin:0 0 5px} + +#sit_qa_wbtn {margin:0 0 5px;text-align:center} +#sit_qa_w {display:none} +a.qa_wr{padding:10px 0;display:block;width:100%;text-align:center;background:#34b5a1;color:#fff;margin:10px 0} +#itemqa_list,#itemuse_list{ background: #fff; border: 3px double #e9e9e9; width: 205px; padding: 8px 0; font-size: 0.917em; color: #797979; margin-top: 15px;} + +/* 쇼핑몰 이벤트 */ +#sev {margin:0 10px;padding:0 15px;list-style:none;border:3px double #d6d6d6} +#sev li {border-top:1px solid #f2f2f2;padding:10px 0 ;text-align:center} +#sev li:first-child{border:none} +#sev li a{display:block} +#sev li a:hover{color:#34b5a1;} +#sev li img{width:100%} +.sev_admin{padding:10px 10px 0} + +/* 로딩안내 레이어 */ +#loading_message {z-index:10000;position:absolute;top:0;left:0;background:#fff;opacity:0.7} +#loading_message img {position:relative;opacity:1.0} + +/* 알림 box */ +#fancyalert {display:block;z-index:10000;position:absolute;top:0;left:0} +#fancyalert_inner {display:table;z-index:2;position:relative} +#fancyalert_inner div {display:table-cell;vertical-align:middle;text-align:center} +#fancyalert_inner span {display:block;margin:0 auto;padding:30px;width:200px;background:#1f1f1f;color:#f0f1f2} +#fancyalert_inner button {margin:15px 0 0;padding:10px 30px;border:0;background:#000;color:#fff} +#fancyalert_bg {z-index:0;position:absolute;top:0;left:0;width:100%;height:100%;vertical-align:middle;background:#000;text-align:center;opacity: 0.7} + +#sit_sms_new .tbl_frm01 th {width:100px} \ No newline at end of file diff --git a/theme/basic/mobile/tail.php b/theme/basic/mobile/tail.php index 70cac5cc0..ee3d7d1bc 100644 --- a/theme/basic/mobile/tail.php +++ b/theme/basic/mobile/tail.php @@ -1,5 +1,10 @@ diff --git a/theme/basic/shop/_common.php b/theme/basic/shop/_common.php new file mode 100644 index 000000000..ce036fb53 --- /dev/null +++ b/theme/basic/shop/_common.php @@ -0,0 +1,21 @@ +\'\"\\\'\\\"\%\=\(\)\s]/", "", $sort); +} else { + $sort = ''; +} + +if (isset($_REQUEST['sortodr'])) { + $sortodr = preg_match("/^(asc|desc)$/i", $sortodr) ? $sortodr : ''; +} else { + $sortodr = ''; +} + +if (!defined('G5_USE_SHOP') || !G5_USE_SHOP) + die('

              쇼핑몰 설치 후 이용해 주십시오.

              '); + +define('_SHOP_', true); +?> \ No newline at end of file diff --git a/theme/basic/shop/index.php b/theme/basic/shop/index.php new file mode 100644 index 000000000..4274a9905 --- /dev/null +++ b/theme/basic/shop/index.php @@ -0,0 +1,149 @@ + + + + + + + + +
              +
              +

              히트상품

              +

              히트상품 모음

              +
              + set_type(1); + $list->set_view('it_img', true); + $list->set_view('it_id', true); + $list->set_view('it_name', true); + $list->set_view('it_basic', true); + $list->set_view('it_cust_price', true); + $list->set_view('it_price', true); + $list->set_view('it_icon', true); + $list->set_view('sns', true); + echo $list->run(); + ?> +
              + + + + + +
              +
              +

              추천상품

              +

              추천상품 모음

              +
              + set_type(2); + $list->set_view('it_id', false); + $list->set_view('it_name', true); + $list->set_view('it_basic', true); + $list->set_view('it_cust_price', true); + $list->set_view('it_price', true); + $list->set_view('it_icon', true); + $list->set_view('sns', true); + echo $list->run(); + ?> +
              + + + + + +
              +
              +

              최신상품

              +

              최신상품 모음

              +
              + set_type(3); + $list->set_view('it_id', false); + $list->set_view('it_name', true); + $list->set_view('it_basic', true); + $list->set_view('it_cust_price', true); + $list->set_view('it_price', true); + $list->set_view('it_icon', true); + $list->set_view('sns', true); + echo $list->run(); + ?> +
              + + + + + +
              +
              +

              인기상품

              +

              인기상품 모음

              +
              + set_type(4); + $list->set_view('it_id', false); + $list->set_view('it_name', true); + $list->set_view('it_basic', true); + $list->set_view('it_cust_price', true); + $list->set_view('it_price', true); + $list->set_view('it_icon', true); + $list->set_view('sns', true); + echo $list->run(); + ?> +
              + + + + + +
              +
              +

              할인상품

              +

              할인상품 모음

              +
              + set_type(5); + $list->set_view('it_id', false); + $list->set_view('it_name', true); + $list->set_view('it_basic', true); + $list->set_view('it_cust_price', true); + $list->set_view('it_price', true); + $list->set_view('it_icon', true); + $list->set_view('sns', true); + echo $list->run(); + ?> +
              + + + + +
              +

              커뮤니티 최신글

              + + + +
              + + + + + + + \ No newline at end of file diff --git a/theme/basic/shop/shop.head.php b/theme/basic/shop/shop.head.php new file mode 100644 index 000000000..3e4b5f047 --- /dev/null +++ b/theme/basic/shop/shop.head.php @@ -0,0 +1,122 @@ + + + +
              +

              + + + + + + + +
              + + +
              +

              쇼핑몰 검색

              +
              + + + + + +
              + +
              + + +
              + +
              + +
              + + + +
              + + + + + + + + + + + + + + + +
              + + + +
              +
              + +
              + + + +
              + \ No newline at end of file diff --git a/theme/basic/shop/shop.tail.php b/theme/basic/shop/shop.tail.php new file mode 100644 index 000000000..6db8354da --- /dev/null +++ b/theme/basic/shop/shop.tail.php @@ -0,0 +1,61 @@ + + +
              + + + +
              + +
              +
              + + +

              + 회사명 + 주소
              + 사업자 등록번호 + 대표 + 전화 + 팩스
              + + 통신판매업신고번호 + 개인정보관리책임자 + + 부가통신사업신고번호 '.$default['de_admin_buga_no'].''; ?>
              + Copyright © 2001-2013 . All Rights Reserved. +

              + 상단으로 +
              +
              + + + + + + + diff --git a/theme/basic/skin/board/basic/view.skin.php b/theme/basic/skin/board/basic/view.skin.php index 7f53d70d7..7670a331c 100644 --- a/theme/basic/skin/board/basic/view.skin.php +++ b/theme/basic/skin/board/basic/view.skin.php @@ -69,7 +69,7 @@ add_stylesheet('', 0 + ?> + + + +
              + 비회원 주문조회 + +
              + + + + + + + +
              +
              + +
              +

              비회원 주문조회 안내

              +

              메일로 발송해드린 주문서의 주문번호 및 주문 시 입력하신 비밀번호를 정확히 입력해주십시오.

              +
              + + + + + + - - + diff --git a/theme/basic/skin/outlogin/shop_basic/outlogin.skin.2.php b/theme/basic/skin/outlogin/shop_basic/outlogin.skin.2.php new file mode 100644 index 000000000..71f4cdab1 --- /dev/null +++ b/theme/basic/skin/outlogin/shop_basic/outlogin.skin.2.php @@ -0,0 +1,46 @@ +', 0); +?> + + +
              +
              +

              나의 회원정보

              + 님 + 관리자 모드 +
              + + +
              + + + diff --git a/theme/basic/skin/outlogin/shop_basic/style.css b/theme/basic/skin/outlogin/shop_basic/style.css new file mode 100644 index 000000000..02b657799 --- /dev/null +++ b/theme/basic/skin/outlogin/shop_basic/style.css @@ -0,0 +1,38 @@ +/* 아웃로그인 스킨 */ +.ol {position:relative;margin:0 0 5px;width:150px} +.ol h2 {margin:0;padding:0;width:1px;height:1px;font-size:0;line-height:0;overflow:hidden} +.ol ul {margin:0;padding:0;list-style:none} + +#ol_before {} +#ol_before fieldset {position:relative} +#ol_id {display:block;margin:0 0 5px !important;margin:0 0 3px;padding:0 5px;width:138px;height:22px;border:1px solid #b8c9c2;background:#f7f7f7;line-height:1.6em} +.ol_idlabel {position:absolute;top:6px;left:5px;color:#626870;font-size:0.95em} +#ol_pw {display:block;margin:0 0 5px !important;margin:0 0 3px;padding:0 5px;width:138px;height:22px;border:1px solid #b8c9c2;background:#f7f7f7;vertical-align:top;line-height:1.6em} +.ol_pwlabel {position:absolute;top:35px;left:5px;color:#626870;font-size:0.95em} +#auto_login {} +#auto_login_label {letter-spacing:-0.1em} +#ol_submit {display:inline-block;margin:0 0 4px;width:150px;height:24px;border:0;background:#626870;color:#fff;font-size:0.9em;font-weight:bold} +#ol_before ul {float:right;margin:7px 0 13px;zoom:1} +#ol_before ul:after {display:block;visibility:hidden;clear:both;content:""} +#ol_before li {float:left;margin-left:5px;padding-top:2px} +#ol_before a {letter-spacing:-0.1em} +#ol_svc {margin:0 0 5px} +#ol_svc a {display:inline-block;padding:5px 0;width:71px;border:1px solid #e9e9e9;background:#faf9f5;text-align:center;text-decoration:none} +#ol_auto {margin:0 0 5px;padding:2px 0 5px;text-align:right} + +#ol_after {} +#ol_after_hd {margin:0 0 5px} +#ol_after_hd .btn_admin {display:block;margin-top:5px;text-align:center} +#ol_after_private {margin:0 0 5px;zoom:1} +#ol_after_private:after {display:block;visibility:hidden;clear:both;content:""} +#ol_after_private li {margin:0 0 1px} +#ol_after_private a {display:block;position:relative;padding:6px 8px 5px;background:#f7f7f7} +#ol_after_private a strong {position:absolute;top:6px;right:8px;color:#000;font-weight:normal} +#ol_after_private a:focus, +#ol_after_private a:hover {background:#626870;color:#fff;text-decoration:none} +#ol_after_private a:focus strong, +#ol_after_private a:hover strong {color:#fff;text-decoration:none} +#ol_after_ft {text-align:justify} +#ol_after_ft a {display:inline-block;padding:4px 0 3px;width:73px;background:#626870;color:#fff;text-align:center} +#ol_after_ft a:focus, +#ol_after_ft a:hover {text-decoration:none !important} \ No newline at end of file diff --git a/theme/basic/skin/poll/basic/poll.skin.php b/theme/basic/skin/poll/basic/poll.skin.php index e9bee3333..05d3260e1 100644 --- a/theme/basic/skin/poll/basic/poll.skin.php +++ b/theme/basic/skin/poll/basic/poll.skin.php @@ -8,7 +8,7 @@ add_stylesheet('', 0)
              - +

              설문조사

              @@ -22,7 +22,7 @@ add_stylesheet('', 0)
            diff --git a/theme/basic/skin/poll/basic/poll_result.skin.php b/theme/basic/skin/poll/basic/poll_result.skin.php index a19233b4c..4741f5941 100644 --- a/theme/basic/skin/poll/basic/poll_result.skin.php +++ b/theme/basic/skin/poll/basic/poll_result.skin.php @@ -60,7 +60,7 @@ add_stylesheet('', 0)
            - +

            @@ -102,7 +102,7 @@ add_stylesheet('', 0)

            다른 투표 결과 보기

            diff --git a/theme/basic/skin/poll/shop_basic/poll.skin.php b/theme/basic/skin/poll/shop_basic/poll.skin.php new file mode 100644 index 000000000..e9bee3333 --- /dev/null +++ b/theme/basic/skin/poll/shop_basic/poll.skin.php @@ -0,0 +1,67 @@ +', 0); +?> + + + + + +
            +
            +

            설문조사

            + 설문조사 관리 +

            +
            +
              + +
            • + +
            + +
            +
            + + + \ No newline at end of file diff --git a/theme/basic/skin/poll/shop_basic/poll_result.skin.php b/theme/basic/skin/poll/shop_basic/poll_result.skin.php new file mode 100644 index 000000000..83fdb5562 --- /dev/null +++ b/theme/basic/skin/poll/shop_basic/poll_result.skin.php @@ -0,0 +1,131 @@ +', 0); +?> + + +
            +

            + + +
            +

            결과

            + +
            +
            전체 표
            +
            +
              + +
            1. +

              + + 표 + 퍼센트 +

              +
              + +
              +
            2. + +
            +
            +
            +
            + + + + +
            +

            이 설문에 대한 기타의견

            + + +
            +
            +

            님의 의견

            + + +
            +

            + +

            +
            + "; } ?> +
            +
            + + + = $po['po_level']) { ?> +
            + + + + +

            + +
            + + + + + + + + + + + + + + + + + + + +
            자동등록방지
            +
            + +
            + +
            +
            + + +
            + + + + + + + +
            + +
            +
            + + + \ No newline at end of file diff --git a/theme/basic/skin/poll/shop_basic/style.css b/theme/basic/skin/poll/shop_basic/style.css new file mode 100644 index 000000000..e21f4fc12 --- /dev/null +++ b/theme/basic/skin/poll/shop_basic/style.css @@ -0,0 +1,91 @@ +@charset "utf-8"; +/* SIR 지운아빠 */ + +/* ### 기본 스타일 커스터마이징 시작 ### */ + +#poll a.btn_admin {} /* 관리자 전용 버튼 */ +#poll a.btn_admin:focus, #poll a.btn_admin:hover {} + +#poll_result .tbl_frm table {} +#poll_result .tbl_frm .frm_info {} +#poll_result .tbl_frm .frm_address {} +#poll_result .tbl_frm .frm_file {} +#poll_result .tbl_frm caption {} + +#poll_result .tbl_frm01 {} +#poll_result .tbl_frm01 th {} +#poll_result .tbl_frm01 td {} +#poll_result .tbl_frm01 textarea, #poll_result tbl_frm01 .frm_input {} +#poll_result .tbl_frm01 textarea {} +/* +#poll_result .tbl_frm01 #captcha {} +#poll_result .tbl_frm01 #captcha input {} +*/ +#poll_result .tbl_frm01 a {} + +/* 필수입력 */ +#poll_result .required, #poll_result textarea.required {} + +#poll_result .btn_confirm {} /* 서식단계 진행 */ +#poll_result .btn_submit {} +#poll_result button.btn_submit {} +#poll_result .win_btn {} /* 새창용 */ +#poll_result .win_btn button {} +#poll_result .win_btn input {} +#poll_result .win_btn a {} +#poll_result .win_btn a:focus, #poll_result .win_btn a:hover {} + +/* ### 기본 스타일 커스터마이징 끝 ### */ + +/* 설문조사 스킨 */ +#poll {margin:0 0 20px} +#poll header {position:relative} +#poll h2 {} +#poll header .btn_admin {margin-top:5px;padding:8px 0;width:100%;text-align:center} +#poll header p {padding:5px 0 0} +#poll ul {margin:0 0 10px;padding:5px 0;list-style:none} +#poll li {padding:3px 0} +#poll footer {text-align:right} +#poll footer input {width:80px;height:24px;border:0;background:#333;color:#fff;letter-spacing:-0.1em;vertical-align:top;cursor:pointer} +#poll footer a {display:inline-block;width:86px;height:22px;border:1px solid #ccc;background:#fafafa;text-align:center;line-height:2em} +#poll footer a:focus, +#poll footer a:hover {text-decoration:none !important} + +/* 설문조사 결과 (새창) */ +#poll_result {} +#poll_result section {margin:0 20px 20px;padding:15px;border:1px solid #dde4e9;background:#fff} +#poll_result .tbl_wrap {margin:0} +#poll_result h2 {margin:0;padding:20px 0} +#poll_result a {} +#poll_result .sv_member, +#poll_result .sv_guest {font-weight:bold} +#poll_result_list {margin:0 auto 20px} +#poll_result_list h2 {text-align:center} +#poll_result_list dl, +#poll_result_list dt, +#poll_result_list dd {margin:0;padding:0} +#poll_result_list dl {padding-bottom:30px} +#poll_result_list dt {margin-right:5%;color:#e8180d;text-align:right} +#poll_result_list ol {margin:0;padding-left:30px} +#poll_result_list li {margin-top:10px} +#poll_result_list p {position:relative;margin:0;padding:5px 0} +#poll_result_list p strong {position:absolute;top:5px;right:5%;padding-right:80px;width:100px;text-align:right} +#poll_result_list p span {position:absolute;top:5px;right:5%;width:80px;color:#68999c;text-align:right} +.poll_result_graph {position:relative;margin-right:5%;height:5px;background:#eee} +.poll_result_graph span {position:absolute;top:0;left:0;height:5px;background:#565e60;font-size:0.1em} +#poll_result_cmt {} +#poll_result_cmt h2 {text-align:center} +#poll_result_cmt h3 {margin:0 0 10px} +#poll_result_cmt article {margin:0 0 15px;border-bottom:1px solid #eee} +#poll_result_cmt h1 {position:absolute;margin:0;padding:0;border:0;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +.poll_datetime {display:inline-block;margin-left:10px} +#poll_result_cmt p {padding:3px 0} +#poll_result_cmt fieldset {margin-bottom:0;text-align:left} +#poll_result_cmt fieldset p {margin:0 0 15px;padding:3px 0 0px;text-align:left} +#poll_result_cmt footer {text-align:right} +#poll_result_wcmt {margin:0 0 10px} +.poll_cmt_del a {display:inline-block;padding-bottom:10px} +#poll_result_oth {margin:0 auto 20px;width:93%} +#poll_result_oth h2 {padding:0 0 10px} +#poll_result_oth ul {margin:0;padding:0;list-style:none} +#poll_result_oth a {display:block;padding:10px 0;border-bottom:1px solid #eee} \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/boxbanner.skin.php b/theme/basic/skin/shop/basic/boxbanner.skin.php new file mode 100644 index 000000000..940fda89b --- /dev/null +++ b/theme/basic/skin/shop/basic/boxbanner.skin.php @@ -0,0 +1,37 @@ +', 0); +?> + +

            쇼핑몰 배너

            '.PHP_EOL; +?> \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/boxcart.skin.php b/theme/basic/skin/shop/basic/boxcart.skin.php new file mode 100644 index 000000000..d25b0d18d --- /dev/null +++ b/theme/basic/skin/shop/basic/boxcart.skin.php @@ -0,0 +1,34 @@ +', 0); +?> + + + + + diff --git a/theme/basic/skin/shop/basic/boxcategory.skin.php b/theme/basic/skin/shop/basic/boxcategory.skin.php new file mode 100644 index 000000000..78511a122 --- /dev/null +++ b/theme/basic/skin/shop/basic/boxcategory.skin.php @@ -0,0 +1,40 @@ +', 0); +?> + + +
          + + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/boxcommunity.skin.php b/theme/basic/skin/shop/basic/boxcommunity.skin.php new file mode 100644 index 000000000..33cbdf1c0 --- /dev/null +++ b/theme/basic/skin/shop/basic/boxcommunity.skin.php @@ -0,0 +1,28 @@ +', 0); +?> + + + + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/boxevent.skin.php b/theme/basic/skin/shop/basic/boxevent.skin.php new file mode 100644 index 000000000..46bdb52aa --- /dev/null +++ b/theme/basic/skin/shop/basic/boxevent.skin.php @@ -0,0 +1,43 @@ +', 0); +?> + + + + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/boxtodayview.skin.php b/theme/basic/skin/shop/basic/boxtodayview.skin.php new file mode 100644 index 000000000..2e3b881ea --- /dev/null +++ b/theme/basic/skin/shop/basic/boxtodayview.skin.php @@ -0,0 +1,111 @@ +', 0); +?> + + +
        '.PHP_EOL; + ?> + + + + + +

        없음

        + + + +
          +
        • 장바구니
        • +
        • 위시리스트
        • +
        • 주문/배송조회
        • +
        + + + + + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/boxwish.skin.php b/theme/basic/skin/shop/basic/boxwish.skin.php new file mode 100644 index 000000000..9bbbafe66 --- /dev/null +++ b/theme/basic/skin/shop/basic/boxwish.skin.php @@ -0,0 +1,33 @@ +', 0); +?> + + + + diff --git a/theme/basic/skin/shop/basic/img/gnb_bg00.gif b/theme/basic/skin/shop/basic/img/gnb_bg00.gif new file mode 100644 index 000000000..b61236269 Binary files /dev/null and b/theme/basic/skin/shop/basic/img/gnb_bg00.gif differ diff --git a/theme/basic/skin/shop/basic/img/gnb_bg01.gif b/theme/basic/skin/shop/basic/img/gnb_bg01.gif new file mode 100644 index 000000000..cbae7886f Binary files /dev/null and b/theme/basic/skin/shop/basic/img/gnb_bg01.gif differ diff --git a/theme/basic/skin/shop/basic/img/icon_arw_toleft.gif b/theme/basic/skin/shop/basic/img/icon_arw_toleft.gif new file mode 100644 index 000000000..a9d338b5e Binary files /dev/null and b/theme/basic/skin/shop/basic/img/icon_arw_toleft.gif differ diff --git a/theme/basic/skin/shop/basic/img/icon_secret.gif b/theme/basic/skin/shop/basic/img/icon_secret.gif new file mode 100644 index 000000000..c04899f14 Binary files /dev/null and b/theme/basic/skin/shop/basic/img/icon_secret.gif differ diff --git a/theme/basic/skin/shop/basic/img/is_button.gif b/theme/basic/skin/shop/basic/img/is_button.gif new file mode 100644 index 000000000..15f3c87aa Binary files /dev/null and b/theme/basic/skin/shop/basic/img/is_button.gif differ diff --git a/theme/basic/skin/shop/basic/img/personal.jpg b/theme/basic/skin/shop/basic/img/personal.jpg new file mode 100644 index 000000000..ad0cc8312 Binary files /dev/null and b/theme/basic/skin/shop/basic/img/personal.jpg differ diff --git a/theme/basic/skin/shop/basic/img/sbn_btn.png b/theme/basic/skin/shop/basic/img/sbn_btn.png new file mode 100644 index 000000000..ebd38ec94 Binary files /dev/null and b/theme/basic/skin/shop/basic/img/sbn_btn.png differ diff --git a/theme/basic/skin/shop/basic/img/sct_bg_toright.gif b/theme/basic/skin/shop/basic/img/sct_bg_toright.gif new file mode 100644 index 000000000..0d180544f Binary files /dev/null and b/theme/basic/skin/shop/basic/img/sct_bg_toright.gif differ diff --git a/theme/basic/skin/shop/basic/img/sns_fb_s.png b/theme/basic/skin/shop/basic/img/sns_fb_s.png new file mode 100644 index 000000000..1ce297731 Binary files /dev/null and b/theme/basic/skin/shop/basic/img/sns_fb_s.png differ diff --git a/theme/basic/skin/shop/basic/img/sns_goo_s.png b/theme/basic/skin/shop/basic/img/sns_goo_s.png new file mode 100644 index 000000000..74235887d Binary files /dev/null and b/theme/basic/skin/shop/basic/img/sns_goo_s.png differ diff --git a/theme/basic/skin/shop/basic/img/sns_kakao_s.png b/theme/basic/skin/shop/basic/img/sns_kakao_s.png new file mode 100644 index 000000000..838b9697e Binary files /dev/null and b/theme/basic/skin/shop/basic/img/sns_kakao_s.png differ diff --git a/theme/basic/skin/shop/basic/img/sns_twt_s.png b/theme/basic/skin/shop/basic/img/sns_twt_s.png new file mode 100644 index 000000000..53f691a62 Binary files /dev/null and b/theme/basic/skin/shop/basic/img/sns_twt_s.png differ diff --git a/theme/basic/skin/shop/basic/item.form.skin.php b/theme/basic/skin/shop/basic/item.form.skin.php new file mode 100644 index 000000000..fd0de6be6 --- /dev/null +++ b/theme/basic/skin/shop/basic/item.form.skin.php @@ -0,0 +1,448 @@ +', 0); +?> + +
        + + + + +
        + +
        +
        + '.$img.''; + } + } + + if($big_img_count == 0) { + echo ''; + } + ?> +
        + 0) { + echo ''; + } + ?> +
        + + + +
        +

        요약정보 및 구매

        +

        + +

        + 상품 선택옵션 개, 추가옵션 개 +

        + +
        + + 고객평점 별개 + + + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ + ?> + + + + + + + + 배송비결제'; + $sc_method = ''; + } + else + $sc_method = '주문시 결제'; + } + ?> + + + + + + + + + + + + + + + + + +
        제조사
        원산지
        브랜드
        모델
        판매가격판매중지
        판매가격전화문의
        시중가격
        판매가격 + + +
        재고수량 개
        포인트 + +
        최소구매수량 개
        최대구매수량 개
        + + + +
        +

        선택옵션

        + + + + + + + + +
        +
        + + + + + +
        +

        추가옵션

        + + + + + + + + +
        +
        + + + + + +
        +

        선택된 옵션

        + +
          +
        • + + + + + + + (+0원) +
          + + + + +
          +
        • +
        + + +
        + + + +
        + + + +

        상품의 재고가 부족하여 구매할 수 없습니다.

        + + + + + +
        + + + +
        + 이 분류에 등록된 다른 상품이 없습니다.'; + } + ?> +
        + +
        + +
        + + + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/item.info.skin.php b/theme/basic/skin/shop/basic/item.info.skin.php new file mode 100644 index 000000000..2faac58a9 --- /dev/null +++ b/theme/basic/skin/shop/basic/item.info.skin.php @@ -0,0 +1,136 @@ +', 0); +?> + + + + +
        +

        상품 정보

        + + + +

        상품 기본설명

        +
        + +
        + + + +

        상품 상세설명

        +
        + +
        + + + + +

        상품 정보 고시

        + + + + + + + $val) { + $ii_title = $info_array[$key][0]; + $ii_value = $val; + ?> + + + + + + +
        + + 상품 정보 고시 정보가 올바르게 저장되지 않았습니다.
        config.php 파일의 G5_ESCAPE_FUNCTION 설정을 addslashes 로
        변경하신 후 관리자 > 상품정보 수정에서 상품 정보를 다시 저장해주세요.

        '; + } + } + } //if + ?> + +
        + + + +
        +

        사용후기

        + + +
        +
        + + + +
        +

        상품문의

        + + +
        +
        + + + + +
        +

        배송정보

        + + + +
        + + + + + + +
        +

        교환/반품

        + + + +
        + + + + + +
        +

        관련상품

        + + +
        + set_query($sql); + echo $list->run(); + ?> +
        +
        + + + + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/itemqa.skin.php b/theme/basic/skin/shop/basic/itemqa.skin.php new file mode 100644 index 000000000..6b661e8bd --- /dev/null +++ b/theme/basic/skin/shop/basic/itemqa.skin.php @@ -0,0 +1,148 @@ +', 0); +?> + + + + +
        +

        등록된 상품문의

        + + '; + + if($is_admin || $member['mb_id' ] == $row['mb_id']) { + $iq_question = get_view_thumbnail(conv_content($row['iq_question'], 1), $thumbnail_width); + } else { + $iq_question = '비밀글로 보호된 문의입니다.'; + $is_secret = true; + } + } else { + $iq_question = get_view_thumbnail(conv_content($row['iq_question'], 1), $thumbnail_width); + } + $iq_time = substr($row['iq_time'], 2, 8); + + $hash = md5($row['iq_id'].$row['iq_time'].$row['iq_ip']); + + $iq_stats = ''; + $iq_style = ''; + $iq_answer = ''; + + if ($row['iq_answer']) + { + $iq_answer = get_view_thumbnail(conv_content($row['iq_answer'], 1), $thumbnail_width); + $iq_stats = '답변완료'; + $iq_style = 'sit_qaa_done'; + $is_answer = true; + } else { + $iq_stats = '답변전'; + $iq_style = 'sit_qaa_yet'; + $iq_answer = '답변이 등록되지 않았습니다.'; + $is_answer = false; + } + + if ($i == 0) echo '
          '; + ?> + +
        1. + +
          +
          작성자
          +
          +
          작성일
          +
          +
          상태
          +
          +
          + +
          +
          +
          + 문의내용
          + +
          + +
          + 답변
          + +
          + +
          + + + + +
          +
        2. + + 0) echo '
        '; + + if (!$i) echo '

        상품문의가 없습니다.

        '; + ?> +
        + + + + + + + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/itemqaform.skin.php b/theme/basic/skin/shop/basic/itemqaform.skin.php new file mode 100644 index 000000000..4662f3e52 --- /dev/null +++ b/theme/basic/skin/shop/basic/itemqaform.skin.php @@ -0,0 +1,66 @@ +', 0); +?> + + +
        +

        상품문의 쓰기

        + +
        + + + + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        옵션 + > + +
        이메일을 입력하시면 답변 등록 시 답변이 이메일로 전송됩니다.
        휴대폰번호를 입력하시면 답변 등록 시 답변등록 알림이 SMS로 전송됩니다.
        +
        + +
        + + +
        +
        +
        + + + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/itemqalist.skin.php b/theme/basic/skin/shop/basic/itemqalist.skin.php new file mode 100644 index 000000000..a52433da1 --- /dev/null +++ b/theme/basic/skin/shop/basic/itemqalist.skin.php @@ -0,0 +1,146 @@ +', 0); +?> + + + + + +
        +
        + 전체보기 + + + + + + +
        +
        + +
        + + + + '; + + if($is_admin || $member['mb_id' ] == $row['mb_id']) { + $iq_question = get_view_thumbnail(conv_content($row['iq_question'], 1), $thumbnail_width); + } else { + $iq_question = '비밀글로 보호된 문의입니다.'; + $is_secret = true; + } + } else { + $iq_question = get_view_thumbnail(conv_content($row['iq_question'], 1), $thumbnail_width); + } + + $it_href = G5_SHOP_URL.'/item.php?it_id='.$row['it_id']; + + if ($row['iq_answer']) + { + $iq_answer = get_view_thumbnail(conv_content($row['iq_answer'], 1), $thumbnail_width); + $iq_stats = '답변완료'; + $iq_style = 'sit_qaa_done'; + $is_answer = true; + } else { + $iq_stats = '답변전'; + $iq_style = 'sit_qaa_yet'; + $iq_answer = '답변이 등록되지 않았습니다.'; + $is_answer = false; + } + + if ($i == 0) echo '
          '; + ?> +
        1. + + + +
          +

          + +
          +
          작성자
          +
          +
          작성일
          +
          +
          상태
          +
          +
          + + + +
          +
          + +
        2. + 0) echo '
        '; + if ($i == 0) echo '

        자료가 없습니다.

        '; + ?> +
        + + + + + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/itemuse.skin.php b/theme/basic/skin/shop/basic/itemuse.skin.php new file mode 100644 index 000000000..320445065 --- /dev/null +++ b/theme/basic/skin/shop/basic/itemuse.skin.php @@ -0,0 +1,110 @@ +', 0); +?> + + + + +
        +

        등록된 사용후기

        + + '; + ?> + +
      • + +
        +
        작성자
        +
        +
        작성일
        +
        +
        평점
        +
        별<?php echo $is_star; ?>개
        +
        + + +
      • + + 0) echo ''; + + if (!$i) echo '

        사용후기가 없습니다.

        '; + ?> +
        + + + + + + + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/itemuseform.skin.php b/theme/basic/skin/shop/basic/itemuseform.skin.php new file mode 100644 index 000000000..2fa187a7f --- /dev/null +++ b/theme/basic/skin/shop/basic/itemuseform.skin.php @@ -0,0 +1,84 @@ +', 0); +?> + + +
        +

        사용후기 쓰기

        + +
        + + + + +
        + + + + + + + + + + + + + + + + + + + +
        평점 +
          +
        • + > + + +
        • +
        • + > + + +
        • +
        • + > + + +
        • +
        • + > + + +
        • +
        • + > + + +
        • +
        +
        +
        + +
        + + +
        + +
        +
        + + + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/itemuselist.skin.php b/theme/basic/skin/shop/basic/itemuselist.skin.php new file mode 100644 index 000000000..92c3da8cc --- /dev/null +++ b/theme/basic/skin/shop/basic/itemuselist.skin.php @@ -0,0 +1,108 @@ +', 0); +?> + + + + +
        +
        + 전체보기 + + + + + +
        +
        + +
        + + + + '; + ?> +
      • + + + +
        +

        + +
        +
        작성자
        +
        +
        작성일
        +
        +
        평가점수
        +
        별<?php echo $star; ?>개
        +
        + + + +
        +
        + +
      • + 0) echo ''; + if ($i == 0) echo '

        자료가 없습니다.

        '; + ?> +
        + + + + + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/largeimage.skin.php b/theme/basic/skin/shop/basic/largeimage.skin.php new file mode 100644 index 000000000..9d0574942 --- /dev/null +++ b/theme/basic/skin/shop/basic/largeimage.skin.php @@ -0,0 +1,71 @@ +', 0); +?> + +
        +

        상품 이미지 새창 보기

        + +
        + + + + <?php echo $row['it_name']; ?> + + + +
        + + 0) { + echo '
          '; + foreach($thumbnails as $key=>$val) { + echo '
        • '.$val.'
        • '; + } + echo '
        '; + } + ?> + +
        + +
        +
        + + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/list.10.skin.php b/theme/basic/skin/shop/basic/list.10.skin.php new file mode 100644 index 000000000..b14556fdb --- /dev/null +++ b/theme/basic/skin/shop/basic/list.10.skin.php @@ -0,0 +1,99 @@ +', 0); +?> + + +list_mod >= 2) { // 1줄 이미지 : 2개 이상 + if ($i%$this->list_mod == 0) $sct_last = ' sct_last'; // 줄 마지막 + else if ($i%$this->list_mod == 1) $sct_last = ' sct_clear'; // 줄 첫번째 + else $sct_last = ''; + } else { // 1줄 이미지 : 1개 + $sct_last = ' sct_clear'; + } + + if ($i == 1) { + if ($this->css) { + echo "
          css}\">\n"; + } else { + echo "\n"; + +if($i == 1) echo "

          등록된 상품이 없습니다.

          \n"; +?> + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/list.20.skin.php b/theme/basic/skin/shop/basic/list.20.skin.php new file mode 100644 index 000000000..fe2d98d7a --- /dev/null +++ b/theme/basic/skin/shop/basic/list.20.skin.php @@ -0,0 +1,98 @@ +', 0); +?> + + +list_mod >= 2) { // 1줄 이미지 : 2개 이상 + if ($i%$this->list_mod == 0) $sct_last = ' sct_last'; // 줄 마지막 + else if ($i%$this->list_mod == 1) $sct_last = ' sct_clear'; // 줄 첫번째 + else $sct_last = ''; + } else { // 1줄 이미지 : 1개 + $sct_last = ' sct_clear'; + } + + if ($i == 1) { + if ($this->css) { + echo "
            css}\">\n"; + } else { + echo "\n"; + +if($i == 1) echo "

            등록된 상품이 없습니다.

            \n"; +?> + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/list.30.skin.php b/theme/basic/skin/shop/basic/list.30.skin.php new file mode 100644 index 000000000..c5d65f32e --- /dev/null +++ b/theme/basic/skin/shop/basic/list.30.skin.php @@ -0,0 +1,110 @@ +', 0); +?> + + += 2) { // 1줄 이미지 : 2개 이상 + if ($i%$list_mod == 0) $sct_last = ' sct_last'; // 줄 마지막 + else if ($i%$list_mod == 1) $sct_last = ' sct_clear'; // 줄 첫번째 + else $sct_last = ''; + } else { // 1줄 이미지 : 1개 + $sct_last = ' sct_clear'; + } + + if ($i == 1) { + if ($this->css) { + echo "
              css}\">\n"; + } else { + echo "\n"; + +if($i == 1) echo "

              등록된 상품이 없습니다.

              \n"; +?> + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/list.40.skin.php b/theme/basic/skin/shop/basic/list.40.skin.php new file mode 100644 index 000000000..46678c4d9 --- /dev/null +++ b/theme/basic/skin/shop/basic/list.40.skin.php @@ -0,0 +1,112 @@ +', 0); + +// 관련상품 스킨은 사품을 한줄에 하나만 표시하며 해당 상품에 관련상품이 등록되어 있는 경우 기본으로 7개까지 노출합니다. +?> + + += 2) { // 1줄 이미지 : 2개 이상 + if ($i%$list_mod == 0) $sct_last = ' sct_last'; // 줄 마지막 + else if ($i%$list_mod == 1) $sct_last = ' sct_clear'; // 줄 첫번째 + else $sct_last = ''; + } else { // 1줄 이미지 : 1개 + $sct_last = ' sct_clear'; + } + + if ($i == 1) { + if ($this->css) { + echo "
                css}\">\n"; + } else { + echo "
                  \n"; + } + } + + $list_top_pad = 20; + $list_right_pad = 10; + $list_bottom_pad = 20; + $list_left_pad = $this->img_width + 10; + $list_real_width = 740; + $list_width = $list_real_width - $list_right_pad - $list_left_pad; + $list_height = $this->img_height - $list_top_pad - $list_bottom_pad; + + echo "
                • \n"; + + if ($this->href) { + echo "\n"; + } + + if ($this->view_it_icon) { + echo "
                  ".item_icon($row)."
                  \n"; + } + + if ($this->view_it_id) { + echo "
                  <".stripslashes($row['it_id']).">
                  \n"; + } + + if ($this->href) { + echo "\n"; + } + + if ($this->view_it_basic && $row['it_basic']) { + echo "
                  ".stripslashes($row['it_basic'])."
                  \n"; + } + + if ($this->view_it_cust_price || $this->view_it_price) { + + echo "
                  \n"; + + if ($this->view_it_cust_price && $row['it_cust_price']) { + echo "".display_price($row['it_cust_price'])."\n"; + } + + if ($this->view_it_price) { + echo display_price(get_price($row), $row['it_tel_inq'])."\n"; + } + + echo "
                  \n"; + + } + + if ($this->view_sns) { + $sns_url = G5_SHOP_URL.'/item.php?it_id='.$row['it_id']; + $sns_title = get_text($row['it_name']).' | '.get_text($config['cf_title']); + echo "
                  "; + echo get_sns_share_link('facebook', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/sns_fb_s.png'); + echo get_sns_share_link('twitter', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/sns_twt_s.png'); + echo get_sns_share_link('googleplus', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/sns_goo_s.png'); + echo "
                  \n"; + } + + // 관련상품 + echo "
                  ".relation_item($row['it_id'], 70, 0, 5)."
                  \n"; + + echo "
                • \n"; +} + +if ($i > 1) echo "
                \n"; + +if($i == 1) echo "

                등록된 상품이 없습니다.

                \n"; +?> + diff --git a/theme/basic/skin/shop/basic/list.sort.skin.php b/theme/basic/skin/shop/basic/list.sort.skin.php new file mode 100644 index 000000000..4643d2d4e --- /dev/null +++ b/theme/basic/skin/shop/basic/list.sort.skin.php @@ -0,0 +1,41 @@ +', 0); +?> + + +
                +

                상품 정렬

                + + + + +
                + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/list.sub.skin.php b/theme/basic/skin/shop/basic/list.sub.skin.php new file mode 100644 index 000000000..13efb960d --- /dev/null +++ b/theme/basic/skin/shop/basic/list.sub.skin.php @@ -0,0 +1,11 @@ +', 0); +?> + +
                  +
                • +
                • +
                \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/listcategory.skin.php b/theme/basic/skin/shop/basic/listcategory.skin.php new file mode 100644 index 000000000..fe4c439bf --- /dev/null +++ b/theme/basic/skin/shop/basic/listcategory.skin.php @@ -0,0 +1,36 @@ +'.$row['ca_name'].' ('.$row2['cnt'].')'; + $exists = true; +} + +if ($exists) { + + // add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨 + add_stylesheet('', 0); +?> + + + + + + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/listcategory2.skin.php b/theme/basic/skin/shop/basic/listcategory2.skin.php new file mode 100644 index 000000000..b8ce25b50 --- /dev/null +++ b/theme/basic/skin/shop/basic/listcategory2.skin.php @@ -0,0 +1,66 @@ +'; + if ($cnt) { + $str .= ''.$row['ca_name'].''; + $sql2 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id like '{$row['ca_id']}%' and ca_use = '1' and length(ca_id) = $len4 order by ca_order, ca_id "; + $result2 = sql_query($sql2); + $k=0; + while ($row2=sql_fetch_array($result2)) { + $str .= ''.$row2['ca_name'].''; + $k++; + } + } else { + $str .= ''.$row['ca_name'].''; + } + $str .= ''; + $exists = true; + } +} + + +if ($exists) { + + // add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨 + add_stylesheet('', 0); +?> + + + + + + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/listcategory3.skin.php b/theme/basic/skin/shop/basic/listcategory3.skin.php new file mode 100644 index 000000000..7f9fe3d4d --- /dev/null +++ b/theme/basic/skin/shop/basic/listcategory3.skin.php @@ -0,0 +1,35 @@ +'.$row['ca_name'].''; + $exists = true; +} + +if ($exists) { + + // add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨 + add_stylesheet('', 0); +?> + + + + + + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/main.10.skin.php b/theme/basic/skin/shop/basic/main.10.skin.php new file mode 100644 index 000000000..1e5985d8a --- /dev/null +++ b/theme/basic/skin/shop/basic/main.10.skin.php @@ -0,0 +1,99 @@ +', 0); +?> + + +list_mod >= 2) { // 1줄 이미지 : 2개 이상 + if ($i%$this->list_mod == 0) $sct_last = 'sct_last'; // 줄 마지막 + else if ($i%$this->list_mod == 1) $sct_last = 'sct_clear'; // 줄 첫번째 + else $sct_last = ''; + } else { // 1줄 이미지 : 1개 + $sct_last = 'sct_clear'; + } + + if ($i == 1) { + if ($this->css) { + echo "
                  css}\">\n"; + } else { + echo "\n"; + +if($i == 1) echo "

                  등록된 상품이 없습니다.

                  \n"; +?> + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/main.20.skin.php b/theme/basic/skin/shop/basic/main.20.skin.php new file mode 100644 index 000000000..3cdd8386a --- /dev/null +++ b/theme/basic/skin/shop/basic/main.20.skin.php @@ -0,0 +1,272 @@ +', 0); + +/* +상품리스트가 일정 시간마다 위로 롤링되는 스킨 +롤링되기 위해서는 상품이 2줄 이상이어야 함 +*/ +?> + + +
                    +
                  • +
                  • +
                  + + + +1 && $i%$this->list_mod == 0) + $sct_last = ' sct_last'; // 줄 마지막 + + if ($i == 1) { + if ($this->css) { + echo "
                  type}\" class=\"{$this->css}\">\n"; + } else { + echo "
                  type}\" class=\"sct smt_20\">\n"; + } + echo "
                    \n"; + } + + if ($i>1 && $i%$this->list_mod == 1) { + echo "
                  \n"; + echo "\n"; + echo "
                  \n"; +} + +if($i == 1) echo "

                  등록된 상품이 없습니다.

                  \n"; +?> + + + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/main.30.skin.php b/theme/basic/skin/shop/basic/main.30.skin.php new file mode 100644 index 000000000..74af7b33e --- /dev/null +++ b/theme/basic/skin/shop/basic/main.30.skin.php @@ -0,0 +1,261 @@ +', 0); + +/* +상품리스트가 일정 시간마다 좌로 롤링되는 스킨 +롤링되기 위해서는 상품이 2줄 이상이어야 함 +*/ +?> + + +
                    +
                  • +
                  • +
                  + + + +css) { + echo "
                  type}\" class=\"{$this->css}\">\n"; + } else { + echo "
                  type}\" class=\"smt_30\">\n"; + } + echo "
                    \n"; + } + + if ($i>1 && $i%$this->list_mod == 1) { + echo "
                  "; + echo "\n"; + echo "
                  \n"; +} + +if($i == 1) echo "

                  등록된 상품이 없습니다.

                  \n"; +?> + + + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/main.40.skin.php b/theme/basic/skin/shop/basic/main.40.skin.php new file mode 100644 index 000000000..b992ba51b --- /dev/null +++ b/theme/basic/skin/shop/basic/main.40.skin.php @@ -0,0 +1,252 @@ +', 0); + +/* +상품리스트가 일정 시간마다 바뀜 +롤링되기 위해서는 상품이 2줄 이상이어야 함 +*/ +?> + + +
                    +
                  • +
                  • +
                  + + + +1 && $i%$this->list_mod == 0) + $sct_last = ' sct_last'; // 줄 마지막 + + if ($i == 1) { + if ($this->css) { + echo "
                  type}\" class=\"{$this->css}\">\n"; + } else { + echo "
                  type}\" class=\"sct smt_40\">\n"; + } + echo "
                    \n"; + } + + if ($i>1 && $i%$this->list_mod == 1) { + echo "
                  \n"; + echo "\n"; + echo "
                  \n"; +} + +if($i == 1) echo "

                  등록된 상품이 없습니다.

                  \n"; +?> + + + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/main.50.skin.php b/theme/basic/skin/shop/basic/main.50.skin.php new file mode 100644 index 000000000..0b94a04cf --- /dev/null +++ b/theme/basic/skin/shop/basic/main.50.skin.php @@ -0,0 +1,277 @@ +', 0); + +/* +리스트의 상품이 순차적으로 위에서 내려옴 +*/ +?> + + +
                    +
                  • +
                  • +
                  + + + +1 && $i%$this->list_mod == 0) + $sct_last = ' sct_last'; // 줄 마지막 + + if ($i == 1) { + if ($this->css) { + echo "
                  type}\" class=\"{$this->css}\">\n"; + } else { + echo "
                  type}\" class=\"sct smt_50\">\n"; + } + echo "
                    \n"; + } + + if ($i>1 && $i%$this->list_mod == 1) { + echo "
                  \n"; + echo "\n"; + echo "
                  \n"; +} + +if($i == 1) echo "

                  등록된 상품이 없습니다.

                  \n"; +?> + + + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/mainbanner.10.skin.php b/theme/basic/skin/shop/basic/mainbanner.10.skin.php new file mode 100644 index 000000000..f68246456 --- /dev/null +++ b/theme/basic/skin/shop/basic/mainbanner.10.skin.php @@ -0,0 +1,245 @@ +', 0); +?> + +'.PHP_EOL.'

                  쇼핑몰 배너

                  '.PHP_EOL.'
                    '.PHP_EOL; + //print_r2($row); + // 테두리 있는지 + $bn_border = ($row['bn_border']) ? ' class="sbn_border"' : '';; + // 새창 띄우기인지 + $bn_new_win = ($row['bn_new_win']) ? ' target="_blank"' : ''; + + $bimg = G5_DATA_PATH.'/banner/'.$row['bn_id']; + if (file_exists($bimg)) + { + $banner = ''; + $size = getimagesize($bimg); + + if($size[2] < 1 || $size[2] > 16) + continue; + + if($max_width < $size[0]) + $max_width = $size[0]; + + if($max_height < $size[1]) + $max_height = $size[1]; + + echo ''.PHP_EOL; + if ($row['bn_url'][0] == '#') + $banner .= ''; + else if ($row['bn_url'] && $row['bn_url'] != 'http://') { + $banner .= ''; + } + echo $banner.''.$row['bn_alt'].''; + if($banner) + echo ''.PHP_EOL; + echo ''.PHP_EOL; + + $bn_first_class = ''; + } +} +if ($i>0) echo '
                  '.PHP_EOL.''.PHP_EOL; +?> + + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/navigation.skin.php b/theme/basic/skin/shop/basic/navigation.skin.php new file mode 100644 index 000000000..508c605ae --- /dev/null +++ b/theme/basic/skin/shop/basic/navigation.skin.php @@ -0,0 +1,38 @@ +'.$row['ca_name'].''; + } +} +else + $navigation = $g5['title']; + +//if ($it_id) $navigation .= " > $it[it_name]"; + +// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨 +add_stylesheet('', 0); +?> + +
                  + Home + +
                  diff --git a/theme/basic/skin/shop/basic/personalpay.skin.php b/theme/basic/skin/shop/basic/personalpay.skin.php new file mode 100644 index 000000000..dc67edf7e --- /dev/null +++ b/theme/basic/skin/shop/basic/personalpay.skin.php @@ -0,0 +1,35 @@ +', 0); +?> + += 2) { // 1줄 이미지 : 2개 이상 + if ($i%$list_mod == 0) $sct_last = ' sct_last'; // 줄 마지막 + else if ($i%$list_mod == 1) $sct_last = ' sct_clear'; // 줄 첫번째 + else $sct_last = ''; + } else { // 1줄 이미지 : 1개 + $sct_last = ' sct_clear'; + } + + if ($i == 1) { + echo "
                    \n"; + } + + $href = G5_SHOP_URL.'/personalpayform.php?pp_id='.$row['pp_id'].'&page='.$page; +?> +
                  • +
                    +
                    +
                    +
                  • + 1) echo "
                  \n"; + +if($i == 1) echo "

                  등록된 개인결제가 없습니다.

                  \n"; +?> \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/relation.10.skin.php b/theme/basic/skin/shop/basic/relation.10.skin.php new file mode 100644 index 000000000..c59604678 --- /dev/null +++ b/theme/basic/skin/shop/basic/relation.10.skin.php @@ -0,0 +1,99 @@ +', 0); +?> + + +list_mod >= 2) { // 1줄 이미지 : 2개 이상 + if ($i%$this->list_mod == 0) $sct_last = ' sct_last'; // 줄 마지막 + else if ($i%$this->list_mod == 1) $sct_last = ' sct_clear'; // 줄 첫번째 + else $sct_last = ''; + } else { // 1줄 이미지 : 1개 + $sct_last = ' sct_clear'; + } + + if ($i == 1) { + if ($this->css) { + echo "
                    css}\">\n"; + } else { + echo "\n"; + +if($i == 1) echo "

                    등록된 상품이 없습니다.

                    \n"; +?> + \ No newline at end of file diff --git a/theme/basic/skin/shop/basic/style.css b/theme/basic/skin/shop/basic/style.css new file mode 100644 index 000000000..031db5278 --- /dev/null +++ b/theme/basic/skin/shop/basic/style.css @@ -0,0 +1,548 @@ +@charset "utf-8"; +/* SIR 지운아빠 */ + +/* aside:gnb */ +#gnb {margin:0 0 5px;padding:0 0 10px;border:1px solid #d5d5d5;background:#f2f5f9} +#gnb h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +.gnb_1dli {position:relative; word-wrap: break-word;} +.gnb_1dli_on {color:#fff;text-decoration:none} +.gnb_1da {display:block;padding:7px 10px;border-bottom:1px solid #f4f4f4;background-color:#fff;font-weight:bold;text-decoration:none} +.gnb_1dam {background:url('img/gnb_bg00.gif') #fff center right no-repeat} +.gnb_1dli_on .gnb_1da {background-color:#626870;color:#fff;text-decoration:none} +.gnb_1dli_on .gnb_1dam {background:url('img/gnb_bg01.gif') #626870 center right no-repeat;color:#fff;text-decoration:none} +.gnb_2dul {display:none;z-index:1000;position:absolute;border:1px solid #787f89} +.gnb_1dli_over .gnb_2dul, .gnb_1dli_over2 .gnb_2dul {display:block;top:0;left:127px;width:130px;background:#fff} +.gnb_2da {display:none} +.gnb_1dli_over .gnb_2da {display:block;padding:10px;border-bottom:1px solid #e9e9e9} +.gnb_2da:focus, .gnb_2da:hover {background:#f2f5f9;text-decoration:none} + +/* 오늘 본 상품 */ +#stv {z-index:1001;position:relative;float:right;width:88px} +#stv_list {position:absolute;width:88px;border:1px solid #e9e9e9;background:#fff} +#stv_list h2 {padding:10px 0 8px;background:#f2f5f9;text-align:center;letter-spacing:-0.1em} +#stv_pg {display:block;margin:5px 0 0} +#stv_list p {padding:20px 0;text-align:center} +#stv_btn {text-align:center;zoom:1} +#stv_btn:after {display:block;visibility:hidden;clear:both;content:""} +#stv_btn button {float:left;margin:0;padding:5px 0 4px;width:44px;border:0;background:#555;color:#fff;text-align:center} +#stv_ul {margin:5px 0 10px;padding:0;list-style:none} +.stv_item {display:none;padding:0 9px;text-align:center;word-break:break-all} +.stv_item img {margin:5px 0} + +#stv_nb {margin:0;padding:0;border-top:1px solid #e9e9e9;background:#f2f5f9;list-style:none} +#stv_nb li {text-align:center} +#stv_nb a {display:block} + +/* aside:이벤트 링크 */ +#sev {margin:0 0 5px;padding:0 0 10px;border:1px solid #ecc9d6;background:#fff8fb} +#sev h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#sev ul {margin:0;padding:0;border:0;background:#fff;list-style:none} +#sev .sev_img {display:block;border-bottom:1px solid #faedf2} +#sev .sev_text {display:block;padding:7px 10px 6px;border-bottom:1px solid #faedf2;text-decoration:none} +#sev .sev_text:focus, #sev .sev_text:hover {background:#fffafc} +#sev strong {} +#sev_empty {padding:15px 0;text-align:center} + +/* aside:커뮤니티 링크 */ +#scomm {margin:0 0 5px;padding:0 0 10px;border:1px solid #d5d5d5;background:#f2f5f9} +#scomm h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#scomm ul {margin:0;padding:0;border:0;background:#fff;list-style:none} +#scomm a {display:block;padding:7px 10px 6px;border-bottom:1px solid #f4f4f4;text-decoration:none} +#scomm a:focus, #scomm a:hover {background:#f9f9f9} +#scomm_empty {padding:15px 0;text-align:center} + +/* aside:배너 */ +.sbn {margin:0 0 5px} +.sbn h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +.sbn ul {margin:0;padding:0;border:0;list-style:none} +.sbn li {margin:0 0 1px} +.sbn .sbn_border {border:1px solid #d5d5d5} /* 인덱스 배너도 함께 사용 */ + +#sbn_idx {position:relative;margin:0 0 30px} +#sbn_idx .sbn_btn {z-index:100;position:absolute;top:50%} +#sbn_idx .sbn_btn button {position:relative;top:-35px;margin:0;padding:0;width:70px;height:70px;border:0;background:transparent;overflow:hidden} +#sbn_idx .sbn_btn span {display:block;width:100%;height:100%;background:url('img/sbn_btn.png')} +#sbn_idx #sbn_btn_p {left:25px} +#sbn_idx .sbn_btn #sbn_btn_prev span {background-position:0 0} +#sbn_idx #sbn_btn_n {right:25px} +#sbn_idx .sbn_btn #sbn_btn_next span {background-position:-70px 0} +#sbn_idx ul {position:relative;overflow:hidden} +#sbn_idx ul li {position:absolute;display:none;top:0;left:0} +#sbn_idx ul li.sbn_first{display:block} + +/* aside:장바구니 */ +#sbsk {margin:0 0 5px;padding:0 0 10px;border:1px solid #d5d5d5;background:#f2f5f9} +#sbsk h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#sbsk ul {margin:0;padding:0;border:0;background:#fff;list-style:none} +#sbsk a {display:block;padding:7px 10px 6px;border-bottom:1px solid #f4f4f4;text-decoration:none} +#sbsk a:focus, #sbsk a:hover {background:#f9f9f9} +#sbsk_empty {padding:15px 0;text-align:center} + +/* aside:위시리스트 */ +#swish {margin:0 0 5px;padding:0 0 10px;border:1px solid #d5d5d5;background:#f2f5f9} +#swish h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#swish ul {margin:0;padding:0;border:0;background:#fff;list-style:none} +#swish a {display:block;padding:7px 10px 6px;border-bottom:1px solid #f4f4f4;text-decoration:none} +#swish a:focus, #swish a:hover {background:#f9f9f9} +#swish_empty {padding:15px 0;text-align:center} + +/* ##### main(nn).skin.php, list.(nn).skin.php 공통 적용 시작 ##### */ +/* 공통 */ +.sct_wrap {position:relative;margin:0 0 30px;zoom:1} +.sct_wrap .sctrl {position:absolute;top:0;right:0} /* 애니메이션 효과 사용 시 재생 정지 버튼 등 */ +.sct_wrap:after {display:block;visibility:hidden;clear:both;content:""} +.sct_wrap header {margin:0 0 20px;zoom:1} +.sct_wrap header:after {display:block;visibility:hidden;clear:both;content:""} +.sct_wrap h2 {float:left;margin:0 20px 0 0;padding:0;line-height:1em} +.sct_wrap h2 a {text-decoration:none} +.sct_wrap_hdesc {float:left;margin:0;padding:0;color:#777;line-height:1em} + +#sct {clear:both} + +.sct {clear:both;margin:0;padding:0;list-style:none;zoom:1} +.sct:after {display:block;visibility:hidden;clear:both;content:""} +.sct_li {position:relative} +.sct_noitem {padding:100px 0;text-align:center} +.sct img {position:relative} /* 리스트뷰 갤러리뷰 변경 시 ie6,7 에서 이미지 사라지는 문제 해결하기 위해 */ +.sct_icon img {margin:0 1px 0 0} +.sct_sns a {display:inline-block;margin:0 4px 0 0} + +/* 재생/정지/이전/다음 버튼 */ +.sctrl {margin:0;padding:0;list-style:none;zoom:1} +.sctrl:after {display:block;visibility:hidden;clear:both;content:""} +.sctrl li {position:relative;float:left;margin:0 0 0 -1px} +.sctrl button {position:relative;margin:0;padding:0;width:21px;height:21px;border:0;cursor:pointer;overflow:hidden} +.sctrl button span {position:absolute;top:0;left:0;width:19px;height:19px;border:1px solid #ccc;background:url('img/is_button.gif')} +.sctrl button.sctrl_play span {background-position:-60px 0} +.sctrl button.sctrl_play span.sctrl_on {background-position:-60px -30px} +.sctrl button.sctrl_stop span {background-position:-90px 0} +.sctrl button.sctrl_stop span.sctrl_on {background-position:-90px -30px} +.sctrl button.sctrl_prev span {background-position:-120px 0} +.sctrl button.sctrl_prev span.sctrl_on {background-position:-120px -30px} +.sctrl button.sctrl_next span {background-position:-150px 0} +.sctrl button.sctrl_next span.sctrl_on {background-position:-150px -30px} + +/* 상품 목록 스킨 10 */ +.sct_10 .sct_li {position:relative;float:left;margin:0 25px 15px 0} +.sct_10 .sct_last {margin:0 0 15px !important} +.sct_10 .sct_clear {clear:both} +.sct_10 .sct_a {display:inline-block;position:relative;text-decoration:none} +.sct_10 .sct_a:focus, .sct_10 .sct_a:hover {text-decoration:none} +.sct_10 .sct_img {margin:0 0 10px} +.sct_10 .sct_txt {margin:0 0 5px} +.sct_10 .sct_icon {margin:0 0 10px} +.sct_10 .sct_id {display:block;margin:0 0 5px} +.sct_10 .sct_basic {margin:0 0 10px} +.sct_10 .sct_cost {display:block;margin:0 0 10px;font-weight:bold} +.sct_10 .sct_cost strike {display:block;margin:0 0 5px;color:#999;font-weight:normal} +.sct_10 .sct_sns {} + +/* 상품 목록 스킨 20 */ +.sct_20 .sct_li {position:relative;float:left;margin:0 25px 15px 0} +.sct_20 .sct_last {margin:0 0 15px !important} +.sct_20 .sct_clear {clear:both} +.sct_20 .sct_a {display:block;position:relative;text-decoration:none} +.sct_20 .sct_a:focus, .sct_20 .sct_a:hover {text-decoration:none} +.sct_20 .sct_img {} +.sct_20 .sct_icon {position:absolute;top:10px;left:-5px;margin:0 !important} +.sct_20 .sct_icon img {display:block;margin:0 0 3px} +.sct_20 .sct_id {display:block;padding:5px 10px 0;background:#f2f5f9} +.sct_20 .sct_txt {padding:10px;background:#f2f5f9} +.sct_20 .sct_basic {padding:0 10px 5px;background:#f2f5f9;line-height:1.5em} +.sct_20 .sct_cost {display:block;padding:0 10px 10px;background:#f2f5f9;font-weight:bold} +.sct_20 .sct_cost strike {display:block;margin:0 0 5px;color:#999;font-weight:normal} +.sct_20 .sct_sns {position:absolute;bottom:10px;right:10px} + +/* 상품 목록 스킨 30 */ +.sct_30 .sct_li {position:relative;float:left;margin:0 16px 15px 0;border:1px solid #e9e9e9;background:#f5f6fa} +.sct_30 .sct_last {margin:0 0 15px !important} +.sct_30 .sct_clear {clear:both} +.sct_30 .sct_arw_toleft {display:block;z-index:2;position:absolute;top:20px;left:221px;width:10px;height:19px;background:url('img/icon_arw_toleft.gif') no-repeat} +.sct_30 .sct_a {text-decoration:none} +.sct_30 .sct_img img {position:absolute;top:0;left:0} +.sct_30 .sct_icon {position:absolute;bottom:25px;left:-5px;margin:0 !important} +.sct_30 .sct_icon img {display:block;margin:0 0 3px} +.sct_30 .sct_txt {display:inline-block;margin:0 0 20px} +.sct_30 .sct_basic {margin:0 0 15px;padding:0;line-height:1.5em} +.sct_30 .sct_cost {display:block;margin:0 0 10px;font-weight:bold} +.sct_30 .sct_cost strike {display:block;margin:0 0 5px;color:#999;font-weight:normal} +.sct_30 .sct_sns {position:absolute;bottom:20px;right:10px} + +/* 상품 목록 스킨 40 */ +.sct_40 .sct_li {position:relative;margin:0 0 16px 0;border:1px solid #e9e9e9;background:#f5f6fa} +.sct_40 .sct_a {text-decoration:none} +.sct_40 .sct_a:focus, .sct_40 .sct_a:hover {text-decoration:none} +.sct_40 .sct_img {position:absolute;top:0;left:0} +.sct_40 .sct_icon {position:absolute;bottom:25px;left:-5px;margin:0 !important} +.sct_40 .sct_icon img {display:block;margin:0 0 4px} +.sct_40 .sct_txt {display:inline-block;margin:0 0 20px} +.sct_40 .sct_basic {margin:0 0 15px;padding:0;line-height:1.5em} +.sct_40 .sct_cost {display:block;margin:0 0 10px;font-weight:bold} +.sct_40 .sct_cost strike {display:block;margin:0 0 5px;color:#999;font-weight:normal} +.sct_40 .sct_rel {position:absolute;bottom:20px;right:20px} +.sct_40 .sct_rel_ul {margin:0;padding:0;list-style:none} +.sct_40 .sct_rel_li {float:left;margin:0 0 0 10px} +.sct_40 .sct_sns {padding:10px 0 0} + +/* 개인결제 목록 */ +.sct_pv .sct_li {position:relative;float:left;margin:0 25px 15px 0} +.sct_pv .sct_last {margin:0 0 15px !important} +.sct_pv .sct_clear {clear:both} +.sct_pv .sct_a {display:inline-block;position:relative;text-decoration:none} +.sct_pv .sct_a:focus, .sct_pv .sct_a:hover {text-decoration:none} +.sct_pv .sct_img {margin:0 0 10px} +.sct_pv .sct_txt {margin:0 0 5px} +.sct_pv .sct_icon {margin:0 0 10px} +.sct_pv .sct_id {display:block;margin:0 0 5px} +.sct_pv .sct_basic {margin:0 0 10px} +.sct_pv .sct_cost {display:block;margin:0 0 10px;font-weight:bold} +.sct_pv .sct_cost strike {display:block;margin:0 0 5px;color:#999;font-weight:normal} +.sct_pv .sct_sns {} + +/* 메인 상품 목록 스킨 20 */ +.smt_20 {position:relative;overflow-y:hidden} +.smt_20 .sct_ul {position:absolute;top:0;left:0;margin:0;padding:0;list-style:none} +.smt_20 .sct_ul_first {display:block;top:0} +.smt_20 .sct_li {position:relative;float:left;margin:0 25px 15px 0} +.smt_20 .sct_last {margin:0 0 15px !important} +.smt_20 .sct_a {display:inline-block;position:relative;text-decoration:none} +.smt_20 .sct_a:focus, .smt_20 .sct_a:hover {text-decoration:none} +.smt_20 .sct_img {margin:0 0 10px} +.smt_20 .sct_txt {margin:0 0 5px} +.smt_20 .sct_icon {margin:0 0 10px} +.smt_20 .sct_id {display:block;margin:0 0 5px} +.smt_20 .sct_basic {margin:0 0 10px} +.smt_20 .sct_cost {display:block;margin:0 0 10px;font-weight:bold} +.smt_20 .sct_cost strike {display:block;margin:0 0 5px;color:#999;font-weight:normal} +.smt_20 .sct_sns {} + +/* 메인 상품 목록 스킨 30 */ +.smt_30 {position:relative;overflow-x:hidden} +.smt_30 .sct_ul {position:absolute;top:0;left:765px;margin:0;padding:0;width:765px;list-style:none;zoom:1} +.smt_30 .sct_ul:after {display:block;visibility:hidden;clear:both;content:""} +.smt_30 .sct_ul_first {display:block;left:0} +.smt_30 .sct_li {position:relative;float:left;margin-right:25px} +.smt_30 .sct_a {display:inline-block;position:relative;text-decoration:none} +.smt_30 .sct_a:focus, .smt_30 .sct_a:hover {text-decoration:none} +.smt_30 .sct_img {margin:0 0 10px} +.smt_30 .sct_txt {margin:0 0 5px} +.smt_30 .sct_icon {margin:0 0 10px} +.smt_30 .sct_id {display:block;margin:0 0 5px} +.smt_30 .sct_basic {margin:0 0 10px} +.smt_30 .sct_cost {display:block;margin:0 0 10px;font-weight:bold} +.smt_30 .sct_cost strike {display:block;margin:0 0 5px;color:#999;font-weight:normal} +.smt_30 .sct_sns {} + +/* 메인 상품 목록 스킨 40 */ +.smt_40 {clear:both;position:relative} +.smt_40 .sct_ul {display:none;position:absolute;top:0;left:0;margin:0;padding:0;list-style:none} +.smt_40 .sct_ul_first {display:block} +.smt_40 .sct_li {position:relative;float:left;margin:0 25px 15px 0} +.smt_40 .sct_last {margin:0 0 15px !important} +.smt_40 .sct_a {display:inline-block;position:relative;text-decoration:none} +.smt_40 .sct_a:focus, .smt_40 .sct_a:hover {text-decoration:none} +.smt_40 .sct_img {margin:0 0 10px} +.smt_40 .sct_txt {margin:0 0 5px} +.smt_40 .sct_icon {margin:0 0 10px} +.smt_40 .sct_id {display:block;margin:0 0 5px} +.smt_40 .sct_basic {margin:0 0 10px} +.smt_40 .sct_cost {display:block;margin:0 0 10px;font-weight:bold} +.smt_40 .sct_cost strike {display:block;margin:0 0 5px;color:#999;font-weight:normal} +.smt_40 .sct_sns {} + +/* 메인 상품 목록 스킨 50 */ +.smt_50 {position:relative} +.smt_50 .sct_ul {display:none;position:absolute;top:0;left:0;height:306px;margin:0;padding:0;list-style:none;overflow-y:hidden} +.smt_50 .sct_ul_first {display:block} +.smt_50 .sct_li {position:relative;float:left;position:relative;top:-306px;margin:0 25px 15px 0} +.smt_50 .sct_last {margin:0 0 15px} +.smt_50 .sct_a {display:inline-block;position:relative;text-decoration:none} +.smt_50 .sct_a:focus, .smt_50 .sct_a:hover {text-decoration:none} +.smt_50 .sct_img {margin:0 0 10px} +.smt_50 .sct_txt {margin:0 0 5px} +.smt_50 .sct_icon {margin:0 0 10px} +.smt_50 .sct_id {display:block;margin:0 0 5px} +.smt_50 .sct_basic {margin:0 0 10px} +.smt_50 .sct_cost {display:block;margin:0 0 10px;font-weight:bold} +.smt_50 .sct_cost strike {display:block;margin:0 0 5px;color:#999;font-weight:normal} +.smt_50 .sct_sns {} + +/* 관련상품 목록 스킨 10 */ +.scr_10 .sct_li {position:relative;float:left;margin:0 25px 15px 0} +.scr_10 .sct_last {margin:0 0 15px !important} +.scr_10 .sct_clear {clear:both} +.scr_10 .sct_a {display:inline-block;position:relative;text-decoration:none} +.scr_10 .sct_a:focus, .sct_10 .sct_a:hover {text-decoration:none} +.scr_10 .sct_img {margin:0 0 10px} +.scr_10 .sct_txt {margin:0 0 5px} +.scr_10 .sct_icon {margin:0 0 10px} +.scr_10 .sct_id {display:block;margin:0 0 5px} +.scr_10 .sct_basic {margin:0 0 10px} +.scr_10 .sct_cost {display:block;margin:0 0 10px;font-weight:bold} +.scr_10 .sct_cost strike {display:block;margin:0 0 5px;color:#999;font-weight:normal} +.scr_10 .sct_sns {} + +/* ##### main(nn).skin.php, list.(nn).skin..php 공통 적용 끝 ##### */ + +/* 상품 목록 */ +#sct {} +.sct_admin {margin:0 0 10px;text-align:right} + +/* 상품 목록 현재 위치 */ +#sct_location {margin:0 0 10px;border:1px solid #e9e9e9;background:#f2f5f9;letter-spacing:-4px} +#sct_location a {display:inline-block;padding:10px 10px 8px;text-decoration:none;letter-spacing:0 !important} +.sct_here {font-weight:bold} +.sct_bg {padding-right:15px !important;background:url('img/sct_bg_toright.gif') right 11px no-repeat} + +/* 상품 목록 카테고리 목록 */ +.sct_ct {} +.sct_ct h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +.sct_ct ul {margin:0 0 10px;padding:10px;border-bottom:1px solid #e9e9e9;list-style:none;zoom:1} +.sct_ct ul:after {display:block;visibility:hidden;clear:both;content:""} +.sct_ct a {text-decoration:none} +.sct_ct_parent {font-weight:bold} +.sct_ct_here {color:#ff3600 !important} + +#sct_ct_1 li {float:left;margin:0 10px 10px 0;width:120px} +#sct_ct_2 li {margin:0 0 10px} +#sct_ct_2 a {display:inline-block;width:120px} +#sct_ct_3 li {float:left;margin:0 10px 10px 0;width:120px} + +/* 상품 정렬 리스트 스타일 선택 공통 */ +#sct_sortlst {zoom:1} +#sct_sortlst:after {display:block;visibility:hidden;clear:both;content:""} + +/* 상품 정렬 */ +#sct_sort {float:left;margin:0 0 10px;width:80%;zoom:1} +#sct_sort:after {display:block;visibility:hidden;clear:both;content:""} +#sct_sort h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#sct_sort ul {margin:0;padding:0 0 0 1px;list-style:none;zoom:1} +#sct_sort ul:after {display:block;visibility:hidden;clear:both;content:""} +#sct_sort li {float:left;position:relative;margin-left:-1px} + +/* 상품 리스트 스타일 선택 */ +#sct_lst {float:right;margin:0 0 10px;padding:0;list-style:none;zoom:1} +#sct_lst:after {display:block;visibility:hidden;clear:both;content:""} +#sct_lst li {position:relative;float:left;margin:0 0 0 -1px} +#sct_lst button {position:relative;margin:0;padding:0;width:25px;height:25px;border:0;cursor:pointer;overflow:hidden} +#sct_lst button span {position:absolute;top:0;left:0;width:23px;height:23px;border:1px solid #ccc;background:url('img/is_button.gif')} +#sct_lst button.sct_lst_list span {background-position:0 0} +#sct_lst button.sct_lst_list span.sct_lst_on {background-position:0 -30px} +#sct_lst button.sct_lst_gallery span {background-position:-30px 0} +#sct_lst button.sct_lst_gallery span.sct_lst_on {background-position:-30px -30px} + +/* 상품 상세보기 */ +#sit {margin:10px 0;border:1px solid #e9e9e9} +.sit_admin {text-align:right} +.sit_empty {padding:20px 0;text-align:center} + +/* 상품 상세보기 - 개요 */ +#sit_ov_wrap {margin:0 0 20px;border-bottom:1px solid #e9e9e9;background:#f2f5f9;zoom:1} +#sit_ov_wrap:after {display:block;visibility:hidden;clear:both;content:""} + +/* 상품 상세보기 - 이미지 미리보기 */ +#sit_pvi {float:left;padding:15px;width:320px} +#sit_pvi_big {margin:0 0 10px;text-align:center} +#sit_pvi_big a {display:none} +#sit_pvi_big a.visible {display:block} +#sit_pvi_big img {} +#sit_pvi_thumb {margin:0;padding:0;list-style:none;zoom:1} +#sit_pvi_thumb:after {display:block;visibility:hidden;clear:both;content:""} +#sit_pvi_thumb li {float:left;margin:0 5px 5px 0} +#sit_pvi_thumb .li_last {margin:0 !important} +#sit_pvi_thumb img {} + +#sit_pvi_nwbig {padding:10px 0;text-align:center} +#sit_pvi_nwbig span {display:none} +#sit_pvi_nwbig span.visible {display:inline} +#sit_pvi_nw ul {margin:0 0 20px;padding:0 10px;list-style:none;zoom:1} +#sit_pvi_nw ul:after {display:block;visibility:hidden;clear:both;content:""} +#sit_pvi_nw li {float:left;margin:0 0 1px 1px} +#sit_pvi_nw li img {width:60px;height:60px} + +/* 상품 상세보기 - 간략정보 및 구매기능 */ +#sit_ov {position:relative;float:right;padding:50px 15px 15px;width:358px;height:auto !important;height:355px;min-height:355px} +#sit_ov h3 {margin:0 0 10px} + +#sit_title {margin:0 0 5px;font-size:1.3em} +#sit_desc {margin:0 0 5px;padding:0;color:#999} +#sit_opt_info {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} + +#sit_star_sns {position:absolute;top:15px;right:15px;color:#b8afa2;font-size:0.95em;letter-spacing:-0.1em} +#sit_star_sns span {display:inline-block;margin:0 5px 0 0;color:#666;letter-spacing:0} +#sit_star_sns .sit_star {position:relative;top:-2px;margin:0 5px 0 0} +#sit_star_sns a {display:inline-block;vertical-align:middle} + +.sit_ov_tbl {margin-bottom:20px;width:100%;border:0;border-collapse:collapse} +.sit_ov_tbl th {border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;font-weight:normal;text-align:left} +.sit_ov_tbl td {padding:7px 0;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9} +.sit_ov_ro {padding:2px 2px 3px;border:0;background:transparent;text-align:right;vertical-align:middle} +.sit_ov_opt {padding:2px 2px 3px;border:0;background:transparent;vertical-align:middle} +.sit_ov_input {margin:0 1px 0 0;padding:2px 2px 3px;border:1px solid #b8c9c2;background:transparent;vertical-align:middle} +#sit_ov_tbl button {margin:0 1px 0 0} + +.sit_sel_btn {position:relative} /* 선택옵션용 추가 버튼 */ +.sit_sel_btn button {position:absolute;top:-51px;right:0 !important;right:15px} + +#sit_sel_option h3 {position:absolute;font-size:0;line-height:0;overflow:hidden} + +#sit_tot_price {margin:20px 0;font-size:1.3em;font-weight:bold} + +#sit_ov_soldout {margin:0 0 20px;color:#ff3061;font-weight:bold;text-align:center} + +#sit_ov_btn {text-align:right;letter-spacing:-3px} +#sit_ov_btn a {display:inline-block;width:80px;height:30px;border:0;font-size:0.95em;vertical-align:middle;text-align:center;text-decoration:none;letter-spacing:-0.1em;line-height:2.8em;cursor:pointer} +#sit_ov_btn input {display:inline-block;width:80px;height:30px;border:0;font-size:0.95em;text-align:center;text-decoration:none;letter-spacing:-0.1em;cursor:pointer} +#sit_btn_buy {background:#ff5b89;color:#fff} +#sit_btn_cart, #sit_btn_wish {background:#555;color:#fff} +#sit_btn_rec {background:#888;color:#fff} + +/* 상품 재입고 알림 (SMS) */ +#sit_sms_new {} +#sit_sms_new #sms_agree {padding:10px 0;text-align:right} + +/* 상품 상세보기 - 다른 상품 보기 */ +#sit_siblings {clear:both;margin:0 0 20px;padding:0 0 20px;border-bottom:1px solid #e9e9e9;text-align:center} +#sit_siblings:after {display:block;visibility:hidden;clear:both;content:""} +#sit_siblings h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} +#sit_siblings a {display:inline-block;padding:8px 12px;border:1px solid #e9e9e9;background:#fff} +#sit_siblings a#siblings_prev {float:left;margin:0 0 0 15px} +#sit_siblings a#siblings_next {float:right;margin:0 15px 0 0} +#sit_siblings a span {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden} + +/* 상품 상세보기 - 상품정보 */ +#sit_inf {margin:0 0 10px;padding:10px 10px 20px;border-bottom:1px solid #e9e9e9} +#sit_inf h2 {margin:0 0 10px} +#sit_inf h3 {position:absolute;font-size:0;line-height:0;content:""} + +#sit_inf_basic {margin:0 0 10px} +#sit_inf_explan {margin:0 0 10px;width:auto !important;width:718px;overflow:hidden} /* ie6 미대응시 #sit_inf_explan {margin:0 0 10px} 만으로 충분 */ +#sit_inf_explan img {max-width:100%;height:auto} + +#sit_inf_open {width:100%;border:0;border-collapse:collapse} +#sit_inf_open th {padding:7px 10px;border:1px solid #fff;background:#f2f5f9;vertical-align:top;text-align:left} +#sit_inf_open td {padding:7px 10px;border:1px solid #fff;background:#f2f5f9;vertical-align:top} + +/* 상품 상세보기 - 사용후기 */ +#sit_use {margin:0 0 10px;padding:10px 10px 20px;border-bottom:1px solid #e9e9e9} +#sit_use h2 {margin:0 0 10px} +#sit_use h3 {margin:0 0 10px} + +#sit_use_ol {margin:0 0 5px;padding:0;border-top:1px solid #e9e9e9;list-style:none} +.sit_use_li {position:relative;padding:0 0 10px;border-bottom:1px solid #e9e9e9;background:#f2f5f9} +.sit_use_li_title {display:block;margin:0;padding:10px;width:100%;border:0;background:transparent;text-align:left;cursor:pointer} + +.sit_use_dl {margin:0;padding:0 10px;zoom:1} +.sit_use_dl:after {display:block;visibility:hidden;clear:both;content:""} +.sit_use_dl dt {float:left;margin:2px 0 0} +.sit_use_dl dd {float:left;margin:2px 20px 0 5px} +.sit_use_star {margin:0 !important;padding:0 0 0 5px} + +.sit_use_con {display:none;padding:10px 10px 0} +.sit_use_p {margin:0 0 10px;padding:10px;border:1px solid #e9e9e9;background:#fff} +.sit_use_cmd {text-align:right} + +#sit_use_wbtn {margin:0 0 5px;text-align:right} + +#sit_use_write {} +#sit_use_write #is_subject {width:100%} +#sit_use_write ul {margin:5px 0 0} +#sit_use_write li {margin:0 0 5px} +#sit_use_write li label {display:inline-block;width:80px} +#sit_use_write_star {margin:0;padding:0;list-style:none} + +/* 상품 상세보기 - 상품문의 */ +#sit_qa {margin:0 0 10px;padding:10px 10px 20px;border-bottom:1px solid #e9e9e9} +#sit_qa h2 {margin:0 0 10px} +#sit_qa h3 {margin:0 0 10px} + +#sit_qa_ol {margin:0 0 5px;padding:0;border-top:1px solid #e9e9e9;list-style:none} +.sit_qa_li {position:relative;padding:0 0 10px;border-bottom:1px solid #e9e9e9;background:#f2f5f9} +.sit_qa_li_title {display:block;margin:0;padding:10px;width:100%;border:0;background:transparent;text-align:left;cursor:pointer} + +.sit_qa_dl {margin:0;padding:0 10px;zoom:1} +.sit_qa_dl:after {display:block;visibility:hidden;clear:both;content:""} +.sit_qa_dl dt {float:left} +.sit_qa_dl dd {float:left;margin:0 20px 0 5px} +.sit_qaa_done {color:#ff3061} +.sit_qaa_yet {color:#999} + +.sit_qa_con {display:none;padding:10px 10px 0} +.sit_qa_p {margin:0 0 10px;padding:10px;border:1px solid #e9e9e9;background:#fff} +.sit_qa_p strong {display:inline-block;margin:0 0 10px} +.sit_qa_qaq {margin:0 0 20px} +.sit_qa_con textarea {display:none} +.sit_qa_cmd {text-align:right} + +.sit_qa_pw {display:none;position:absolute;top:30px;left:175px;padding:10px;width:348px;border:1px solid #000;background:#fff;text-align:center} +.sit_qa_pw span {display:block;margin:0 0 5px} + +#sit_qa_wbtn {margin:0 0 5px;text-align:right} + +#sit_qa_write {} +#sit_qa_write #iq_subject {width:100%} + +/* 상품 상세보기 - 배송정보 */ +#sit_dvr {margin:0 0 10px;padding:10px 10px 20px;border-bottom:1px solid #e9e9e9} +#sit_dvr h2 {margin:0 0 10px} + +/* 상품 상세보기 - 교환정보 */ +#sit_ex {margin:0 0 10px;padding:10px 10px 20px;border-bottom:1px solid #e9e9e9} +#sit_ex h2 {margin:0 0 10px} + +/* 상품 상세보기 - 관련상품 */ +#sit_rel {margin:0 0 10px;padding:10px 10px 0} +#sit_rel h2 {margin:0 0 10px} +#sit_rel .sct_wrap li {margin:0 10px 0 0} +#sit_rel .sct_last {margin:0 !important} + +/* 사용후기 모음 */ +#sps_sch {margin:0 0 10px} +#sps_sch a {display:inline-block;padding:0 8px;height:21px;background:#333;color:#fff;text-decoration:none;vertical-align:middle;line-height:1.9em} +#sps_sch .btn_submit {padding:0 8px;height:24px;vertical-align:middle} + +#sps {zoom:1} +#sps ol {margin:0;padding:0;border-top:1px solid #e9e9e9;list-style:none} +#sps li {position:relative;padding:10px;border-bottom:1px solid #e9e9e9} +#sps li:after {display:block;visibility:hidden;clear:both;content:""} + +.sps_img {float:left;margin:0 10px 0 0;width:80px} +.sps_img span {position:absolute;font-size:0;line-height:0;overflow:hidden} + +#sps dl {margin:5px 0 10px;zoom:1} +#sps dl:after {display:block;visibility:hidden;clear:both;content:""} +#sps dt {float:left} +#sps dd {float:left;margin:0 20px 0 5px} +#sps dd img {position:relative;top:-2px} + +.sps_section {float:left;width:630px} +.sps_section p {padding:0;width:100%} +.sps_con_full {padding:0;height:auto !important} +.sps_con_btn {margin:5px 0 0;text-align:right} +.sps_con_btn button {margin:0;padding:5px;border:0;background:#565e60;color:#fff} + +/* 상품문의 모음 */ +#sqa_sch {margin:0 0 10px} +#sqa_sch a {display:inline-block;padding:0 8px;height:21px;background:#333;color:#fff;text-decoration:none;vertical-align:middle;line-height:1.9em} +#sqa_sch .btn_submit {padding:0 8px;height:24px;vertical-align:middle} + +#sqa {zoom:1} +#sqa ol {margin:0;padding:0;border-top:1px solid #e9e9e9;list-style:none} +#sqa li {position:relative;padding:10px;border-bottom:1px solid #e9e9e9} +#sqa li:after {display:block;visibility:hidden;clear:both;content:""} + +.sqa_img {float:left;margin:0 10px 0 0;width:80px} +.sqa_img span {position:absolute;font-size:0;line-height:0} + +#sqa dl {margin:5px 0 10px;zoom:1} +#sqa dl:after {display:block;visibility:hidden;clear:both;content:""} +#sqa dt {float:left} +#sqa dd {float:left;margin:0 20px 0 5px} +#sqa dd img {position:relative;top:-2px} + +.sqa_section {float:left;width:630px} +.sqa_section .sqa_con {padding:10px;background:#f2f5f9;line-height:1.7em} +.sqa_section p {padding:0;width:100%} +.sqa_con_full {padding:0;height:auto !important} +.sqa_con_btn {margin:5px 0 0;text-align:right} +.sqa_con_btn button {margin:0;padding:5px;border:0;background:#565e60;color:#fff} \ No newline at end of file diff --git a/theme/basic/skin/visit/shop_basic/style.css b/theme/basic/skin/visit/shop_basic/style.css new file mode 100644 index 000000000..ab05e58e4 --- /dev/null +++ b/theme/basic/skin/visit/shop_basic/style.css @@ -0,0 +1,10 @@ +/* 방문자 집계 */ +#visit {margin:0 0 20px;padding:0 15px;background:#444;zoom:1} +#visit:after {display:block;visibility:hidden;clear:both;content:''} +#visit h2 {float:left;padding:10px 45px 10px 0;color:#fff} +#visit dl {float:left;margin:0 0 0 10px;padding:0} +#visit dt {float:left;margin:0;padding:10px 0 10px;color:#fff} +#visit dd {float:left;margin:0 30px 0 0;padding:10px;color:#fff} +#visit a {display:inline-block;padding:10px;color:#fff;text-decoration:none} +#visit a:focus, +#visit a:hover {background:#333;color:#fff} \ No newline at end of file diff --git a/theme/basic/skin/visit/shop_basic/visit.skin.php b/theme/basic/skin/visit/shop_basic/visit.skin.php new file mode 100644 index 000000000..0a45e7022 --- /dev/null +++ b/theme/basic/skin/visit/shop_basic/visit.skin.php @@ -0,0 +1,26 @@ +', 0); +?> + +
                    +
                    +

                    접속자집계

                    +
                    +
                    오늘
                    +
                    +
                    어제
                    +
                    +
                    최대
                    +
                    +
                    전체
                    +
                    +
                    + 상세보기 +
                    +
                    + diff --git a/theme/basic/tail.php b/theme/basic/tail.php index f994ad894..bf1794528 100644 --- a/theme/basic/tail.php +++ b/theme/basic/tail.php @@ -5,6 +5,11 @@ if (G5_IS_MOBILE) { include_once(G5_THEME_MOBILE_PATH.'/tail.php'); return; } + +if(G5_COMMUNITY_USE === false) { + include_once(G5_THEME_SHOP_PATH.'/shop.tail.php'); + return; +} ?>
                  diff --git a/theme/basic/theme.config.php b/theme/basic/theme.config.php index f900e773f..9b6a61546 100644 --- a/theme/basic/theme.config.php +++ b/theme/basic/theme.config.php @@ -6,6 +6,11 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 // G5_SET_DEVICE 상수 설정 보다 우선 적용됨 define('G5_THEME_DEVICE', ''); +// 테마에서 커뮤니티 지원여부 설정 +// 커뮤니티 사용없이 쇼핑몰이 초기화면이라면 false로 설정 +// false 설정이면 게시판 head, tail 은 쇼핑몰의 그것이 적용됨 +define('G5_COMMUNITY_USE', true); + $theme_config = array(); // 갤러리 이미지 수 등의 설정을 지정하시면 게시판관리에서 해당 값을 @@ -13,26 +18,132 @@ $theme_config = array(); // 사용하지 않는 스킨 설정은 값을 비워두시면 됩니다. $theme_config = array( - 'set_default_skin' => false, // 기본환경설정의 최근게시물 등의 기본스킨 변경여부 true, false - 'preview_board_skin' => 'basic', // 테마 미리보기 때 적용될 기본 게시판 스킨 - 'preview_mobile_board_skin' => 'basic', // 테마 미리보기 때 적용될 기본 모바일 게시판 스킨 - 'cf_member_skin' => 'basic', // 회원 스킨 - 'cf_mobile_member_skin' => 'basic', // 모바일 회원 스킨 - 'cf_new_skin' => 'basic', // 최근게시물 스킨 - 'cf_mobile_new_skin' => 'basic', // 모바일 최근게시물 스킨 - 'cf_search_skin' => 'basic', // 검색 스킨 - 'cf_mobile_search_skin' => 'basic', // 모바일 검색 스킨 - 'cf_connect_skin' => 'basic', // 접속자 스킨 - 'cf_mobile_connect_skin' => 'basic', // 모바일 접속자 스킨 - 'cf_faq_skin' => 'basic', // FAQ 스킨 - 'cf_mobile_faq_skin' => 'basic', // 모바일 FAQ 스킨 - 'bo_gallery_cols' => 4, // 갤러리 이미지 수 - 'bo_gallery_width' => 174, // 갤러리 이미지 폭 - 'bo_gallery_height' => 124, // 갤러리 이미지 높이 - 'bo_mobile_gallery_width' => 125, // 모바일 갤러리 이미지 폭 - 'bo_mobile_gallery_height' => 100, // 모바일 갤러리 이미지 높이 - 'bo_image_width' => 600, // 게시판 뷰 이미지 폭 - 'qa_skin' => 'basic', // 1:1문의 스킨 - 'qa_mobile_skin' => 'basic' // 1:1문의 모바일 스킨 + 'set_default_skin' => false, // 기본환경설정의 최근게시물 등의 기본스킨 변경여부 true, false + 'preview_board_skin' => 'basic', // 테마 미리보기 때 적용될 기본 게시판 스킨 + 'preview_mobile_board_skin' => 'basic', // 테마 미리보기 때 적용될 기본 모바일 게시판 스킨 + 'cf_member_skin' => 'basic', // 회원 스킨 + 'cf_mobile_member_skin' => 'basic', // 모바일 회원 스킨 + 'cf_new_skin' => 'basic', // 최근게시물 스킨 + 'cf_mobile_new_skin' => 'basic', // 모바일 최근게시물 스킨 + 'cf_search_skin' => 'basic', // 검색 스킨 + 'cf_mobile_search_skin' => 'basic', // 모바일 검색 스킨 + 'cf_connect_skin' => 'basic', // 접속자 스킨 + 'cf_mobile_connect_skin' => 'basic', // 모바일 접속자 스킨 + 'cf_faq_skin' => 'basic', // FAQ 스킨 + 'cf_mobile_faq_skin' => 'basic', // 모바일 FAQ 스킨 + 'bo_gallery_cols' => 4, // 갤러리 이미지 수 + 'bo_gallery_width' => 174, // 갤러리 이미지 폭 + 'bo_gallery_height' => 124, // 갤러리 이미지 높이 + 'bo_mobile_gallery_width' => 125, // 모바일 갤러리 이미지 폭 + 'bo_mobile_gallery_height' => 100, // 모바일 갤러리 이미지 높이 + 'bo_image_width' => 600, // 게시판 뷰 이미지 폭 + 'qa_skin' => 'basic', // 1:1문의 스킨 + 'qa_mobile_skin' => 'basic', // 1:1문의 모바일 스킨 + 'de_shop_skin' => 'basic', // 쇼핑몰 PC 기본스킨 + 'de_shop_mobile_skin' => 'basic', // 쇼핑몰 모바일 기본스킨 + 'de_type1_list_use' => 1, // PC 히트상품 출력 + 'de_type1_list_skin' => 'main.10.skin.php', // PC 히트상품 출력스킨 + 'de_type1_list_mod' => 3, // PC 히트상품 출력 1줄당 이미지 수 + 'de_type1_list_row' => 2, // PC 히트상품 출력 출력 줄 수 + 'de_type1_img_width' => 230, // PC 히트상품 이미지 폭 + 'de_type1_img_height' => 230, // PC 히트상품 이미지 높이 + 'de_type2_list_use' => 1, // PC 추천상품 출력 + 'de_type2_list_skin' => 'main.10.skin.php', // PC 추천상품 출력스킨 + 'de_type2_list_mod' => 3, // PC 추천상품 출력 1줄당 이미지 수 + 'de_type2_list_row' => 2, // PC 추천상품 출력 출력 줄 수 + 'de_type2_img_width' => 230, // PC 추천상품 이미지 폭 + 'de_type2_img_height' => 230, // PC 추천상품 이미지 높이 + 'de_type3_list_use' => 1, // PC 최신상품 출력 + 'de_type3_list_skin' => 'main.10.skin.php', // PC 최신상품 출력스킨 + 'de_type3_list_mod' => 3, // PC 최신상품 출력 1줄당 이미지 수 + 'de_type3_list_row' => 2, // PC 최신상품 출력 출력 줄 수 + 'de_type3_img_width' => 230, // PC 최신상품 이미지 폭 + 'de_type3_img_height' => 230, // PC 최신상품 이미지 높이 + 'de_type4_list_use' => 1, // PC 인기상품 출력 + 'de_type4_list_skin' => 'main.10.skin.php', // PC 인기상품 출력스킨 + 'de_type4_list_mod' => 3, // PC 인기상품 출력 1줄당 이미지 수 + 'de_type4_list_row' => 2, // PC 인기상품 출력 출력 줄 수 + 'de_type4_img_width' => 230, // PC 인기상품 이미지 폭 + 'de_type4_img_height' => 230, // PC 인기상품 이미지 높이 + 'de_type5_list_use' => 1, // PC 할인상품 출력 + 'de_type5_list_skin' => 'main.10.skin.php', // PC 할인상품 출력스킨 + 'de_type5_list_mod' => 3, // PC 할인상품 출력 1줄당 이미지 수 + 'de_type5_list_row' => 2, // PC 할인상품 출력 출력 줄 수 + 'de_type5_img_width' => 230, // PC 할인상품 이미지 폭 + 'de_type5_img_height' => 230, // PC 할인상품 이미지 높이 + 'de_mobile_type1_list_use' => 1, // 모바일 히트상품 출력 + 'de_mobile_type1_list_skin' => 'main.10.skin.php', // 모바일 히트상품 출력스킨 + 'de_mobile_type1_list_mod' => 3, // 모바일 히트상품 출력 1줄당 이미지 수 + 'de_mobile_type1_list_row' => 2, // 모바일 히트상품 출력 출력 줄 수 + 'de_mobile_type1_img_width' => 230, // 모바일 히트상품 이미지 폭 + 'de_mobile_type1_img_height' => 230, // 모바일 히트상품 이미지 높이 + 'de_mobile_type2_list_use' => 1, // 모바일 추천상품 출력 + 'de_mobile_type2_list_skin' => 'main.10.skin.php', // 모바일 추천상품 출력스킨 + 'de_mobile_type2_list_mod' => 3, // 모바일 추천상품 출력 1줄당 이미지 수 + 'de_mobile_type2_list_row' => 2, // 모바일 추천상품 출력 출력 줄 수 + 'de_mobile_type2_img_width' => 230, // 모바일 추천상품 이미지 폭 + 'de_mobile_type2_img_height' => 230, // 모바일 추천상품 이미지 높이 + 'de_mobile_type3_list_use' => 1, // 모바일 최신상품 출력 + 'de_mobile_type3_list_skin' => 'main.10.skin.php', // 모바일 최신상품 출력스킨 + 'de_mobile_type3_list_mod' => 3, // 모바일 최신상품 출력 1줄당 이미지 수 + 'de_mobile_type3_list_row' => 2, // 모바일 최신상품 출력 출력 줄 수 + 'de_mobile_type3_img_width' => 230, // 모바일 최신상품 이미지 폭 + 'de_mobile_type3_img_height' => 230, // 모바일 최신상품 이미지 높이 + 'de_mobile_type4_list_use' => 1, // 모바일 인기상품 출력 + 'de_mobile_type4_list_skin' => 'main.10.skin.php', // 모바일 인기상품 출력스킨 + 'de_mobile_type4_list_mod' => 3, // 모바일 인기상품 출력 1줄당 이미지 수 + 'de_mobile_type4_list_row' => 2, // 모바일 인기상품 출력 출력 줄 수 + 'de_mobile_type4_img_width' => 230, // 모바일 인기상품 이미지 폭 + 'de_mobile_type4_img_height' => 230, // 모바일 인기상품 이미지 높이 + 'de_mobile_type5_list_use' => 1, // 모바일 할인상품 출력 + 'de_mobile_type5_list_skin' => 'main.10.skin.php', // 모바일 할인상품 출력스킨 + 'de_mobile_type5_list_mod' => 3, // 모바일 할인상품 출력 1줄당 이미지 수 + 'de_mobile_type5_list_row' => 2, // 모바일 할인상품 출력 출력 줄 수 + 'de_mobile_type5_img_width' => 230, // 모바일 할인상품 이미지 폭 + 'de_mobile_type5_img_height' => 230, // 모바일 할인상품 이미지 높이 + 'de_rel_list_use' => 1, // 관련상품 출력 + 'de_rel_list_skin' => 'relation.10.skin.php', // 관련상품 출력 스킨 + 'de_rel_list_mod' => 3, // 관련상품 1줄당 이미지 수 + 'de_rel_img_width' => 230, // 관련상품 이미지 폭 + 'de_rel_img_height' => 230, // 관련상품 이미지 높이 + 'de_mobile_rel_list_use' => 1, // 모바일 관련상품 출력 + 'de_mobile_rel_list_skin' => 'relation.10.skin.php', // 모바일 관련상품 출력 스킨 + 'de_mobile_rel_list_mod' => 3, // 모바일 관련상품 1줄당 이미지 수 + 'de_mobile_rel_img_width' => 230, // 모바일 관련상품 이미지 폭 + 'de_mobile_rel_img_height' => 230, // 모바일 관련상품 이미지 높이 + 'de_search_list_skin' => 'list.10.skin.php', // 검색상품 출력 스킨 + 'de_search_list_mod' => 3, // 검색상품 1줄당 이미지 수 + 'de_search_list_row' => 5, // 검색상품 출력 줄 수 + 'de_search_img_width' => 230, // 검색상품 이미지 폭 + 'de_search_img_height' => 230, // 검색상품 이미지 높이 + 'de_mobile_search_list_skin' => 'list.10.skin.php', // 모바일 검색상품 출력 스킨 + 'de_mobile_search_list_mod' => 3, // 모바일 검색상품 1줄당 이미지 수 + 'de_mobile_search_list_row' => 5, // 모바일 검색상품 출력 줄 수 + 'de_mobile_search_img_width' => 230, // 모바일 관련상품 이미지 폭 + 'de_mobile_search_img_height' => 230, // 모바일 관련상품 이미지 높이 + 'de_mimg_width' => 230, // 상품상세 이미지 Width + 'de_mimg_height' => 230, // 상품상세 이미지 Height + 'ca_skin' => 'list.10.skin.php', // 분류 리스트 스킨 + 'ca_img_width' => 230, // 분류 리스트 이미지 폭 + 'ca_img_height' => 230, // 분류 리스트 이미지 높이 + 'ca_list_mod' => 3, // 분류 리스트 1줄당 이미지 수 + 'ca_list_row' => 5, // 분류 리스트 이미지 줄 수 + 'ca_mobile_skin' => 'list.10.skin.php', // 모바일 분류 리스트 스킨 + 'ca_mobile_img_width' => 230, // 모바일 분류 리스트 이미지 폭 + 'ca_mobile_img_height' => 230, // 모바일 분류 리스트 이미지 높이 + 'ca_mobile_list_mod' => 3, // 모바일 분류 리스트 1줄당 이미지 수 + 'ca_mobile_list_row' => 5, // 모바일 분류 리스트 이미지 줄 수 + 'ev_skin' => 'list.10.skin.php', // 이벤트 출력 스킨 + 'ev_img_width' => 230, // 이벤트 리스트 이미지 폭 + 'ev_img_height' => 230, // 이벤트 리스트 이미지 높이 + 'ev_list_mod' => 3, // 이벤트 리스트 1줄당 이미지 수 + 'ev_list_row' => 5, // 이벤트 리스트 이미지 줄 수 + 'ev_mobile_skin' => 'list.10.skin.php', // 모바일 이벤트 출력 스킨 + 'ev_mobile_img_width' => 230, // 모바일 이벤트 리스트 이미지 폭 + 'ev_mobile_img_height' => 230, // 모바일 이벤트 리스트 이미지 높이 + 'ev_mobile_list_mod' => 3, // 모바일 이벤트 1줄당 이미지 수 + 'ev_mobile_list_row' => 5, // 모바일 이벤트 이미지 줄 수 + 'ca_mobile_list_best_mod' => 3, // 모바일 상품리스트 베스트상품 1줄당 이미지 수 + 'ca_mobile_list_best_row' => 3, // 모바일 상품리스트 베스트상품 이미지 줄 수 ); ?> \ No newline at end of file diff --git a/yc4_import.php b/yc4_import.php new file mode 100644 index 000000000..7d04bba6d --- /dev/null +++ b/yc4_import.php @@ -0,0 +1,176 @@ + + + + + +
                  +

                  + + + +
                  + + + +
                  + 사이트 내 전체검색 +
                  + + + + + +
                  + + +
                  + + + +
                  + + + + +
                  +
                  + +
                  + + +
                  + + +
                  + + +
                  +
                  + +
                  +
                  +
                  + +
                  +

                  + 이 프로그램은 영카트5 설치 후 바로 실행하셔야만 합니다.
                  + 만약 영카트5 사이트를 운영 중에 이 프로그램을 실행하시면 DB 데이터가 망실되거나 데이터의 오류가 발생할 수 있습니다.
                  + 또한 중복해서 실행하실 경우에도 DB 데이터의 오류가 발생할 수 있으니 반드시 한번만 실행해 주십시오. +

                  +

                  프로그램을 실행하시려면 영카트4의 config.php 파일 경로를 입력하신 후 확인을 클릭해 주십시오.

                  + +
                  +
                  + + + +
                  +
                  + +

                  + 경로는 영카트5 설치 루트를 기준으로 영카트4의 config.php 파일의 상대경로입니다.
                  + 예를 들어 영카트4를 웹루트에 설치하셨고 영카트5를 yc5라는 하위 폴더에 설치하셨다면 입력하실 경로는 ../config.php 입니다. +

                  + +
                  + + + +
                  +
                  + + + +
                  + + +
                  +
                  <?php echo G5_VERSION ?>
                  +
                  +

                  + Copyright © 소유하신 도메인. All rights reserved.
                  + 상단으로 +

                  +
                  +
                  + + + + \ No newline at end of file diff --git a/yc4_import_run.php b/yc4_import_run.php new file mode 100644 index 000000000..a48934e4f --- /dev/null +++ b/yc4_import_run.php @@ -0,0 +1,677 @@ +'; + +if(empty($_POST)) + alert('올바른 방법으로 이용해 주십시오.', G5_URL); + +if(get_session('yc4_tables_copied') == 'done') + alert('DB 데이터 변환을 이미 실행하였습니다. 중복 실행시 오류가 발생할 수 있습니다.', G5_URL); + +if($is_admin != 'super') + alert('최고관리자로 로그인 후 실행해 주십시오.', G5_URL); + +$g4_config_file = trim($_POST['file_path']); + +if(!$g4_config_file) + alert('config.php 파일의 경로를 입력해 주십시오.'); + +if(!is_file($g4_config_file)) + alert('입력하신 경로에 config.php 파일이 존재하지 않습니다.'); + +$shop_config_file = str_replace('config.php', 'shop.config.php', $g4_config_file); + +if(!is_file($shop_config_file)) + alert('입력하신 경로에 shop.config.php 파일이 존재하지 않습니다.\\nshop.config.php 파일은 config.php 파일과 동일한 위치에 있어야 합니다.'); + +$item_img_path = str_replace('config.php', 'data/item', $g4_config_file); + +if(!file_exists($item_img_path)) + alert('상품이미지 폴더를 확인할 수 없습니다. 상품이미지 폴더의 상대경로가 '.$item_img_path.' 이 아니라면\\nyc4_import_run.php 파일에서 $item_img_path 의 값을 수정하신 후 실행해 주십시오.'); + +$is_euckr = false; +?> + + + + + +
                  +

                  + + + +
                  + + + +
                  + 사이트 내 전체검색 +
                  + + + + + +
                  + + +
                  + + + +
                  + + + + +
                  +
                  + +
                  + + +
                  + + +
                  + + +
                  +
                  + +
                  +
                  +
                  + +
                  +
                    + $val) { + $sql_common .= $comma . " $key = '".addslashes($val)."' "; + + $comma = ','; + } + + sql_query(" INSERT INTO {$g5['content_table']} SET $sql_common "); + } + echo '
                  1. content table 복사
                  2. '.PHP_EOL; + + // new win table 복사 + $sql = " select * from {$g4['yc4_new_win_table']} "; + $result = sql_query($sql); + for($i=0; $row=sql_fetch_array($result); $i++) { + if($is_euckr) + $row = array_map('iconv_utf8', $row); + + $comma = ''; + $sql_common = ''; + + foreach($row as $key=>$val) { + if($key == 'nw_id') + continue; + + $sql_common .= $comma . " $key = '".addslashes($val)."' "; + + $comma = ','; + } + + sql_query(" INSERT INTO {$g5['new_win_table']} SET $sql_common "); + } + echo '
                  3. new win table 복사
                  4. '.PHP_EOL; + + // faq table 복사 + $sql = " select * from {$g4['yc4_faq_table']} "; + $result = sql_query($sql); + for($i=0; $row=sql_fetch_array($result); $i++) { + if($is_euckr) + $row = array_map('iconv_utf8', $row); + + $comma = ''; + $sql_common = ''; + + foreach($row as $key=>$val) { + $sql_common .= $comma . " $key = '".addslashes($val)."' "; + + $comma = ','; + } + + sql_query(" INSERT INTO {$g5['faq_table']} SET $sql_common "); + } + echo '
                  5. faq table 복사
                  6. '.PHP_EOL; + + // faq master table 복사 + $sql = " select * from {$g4['yc4_faq_master_table']} "; + $result = sql_query($sql); + for($i=0; $row=sql_fetch_array($result); $i++) { + if($is_euckr) + $row = array_map('iconv_utf8', $row); + + $comma = ''; + $sql_common = ''; + + foreach($row as $key=>$val) { + $sql_common .= $comma . " $key = '".addslashes($val)."' "; + + $comma = ','; + } + + sql_query(" INSERT INTO {$g5['faq_master_table']} SET $sql_common "); + } + echo '
                  7. faq master table 복사
                  8. '.PHP_EOL; + */ + + // banner table 복사 + $sql = " select * from {$g4['yc4_banner_table']} "; + $result = sql_query($sql); + for($i=0; $row=sql_fetch_array($result); $i++) { + if($is_euckr) + $row = array_map('iconv_utf8', $row); + + $comma = ''; + $sql_common = ''; + + foreach($row as $key=>$val) { + if($key == 'bn_id') + continue; + + $sql_common .= $comma . " $key = '".addslashes($val)."' "; + + $comma = ','; + } + + sql_query(" INSERT INTO {$g5['g5_shop_banner_table']} SET $sql_common "); + } + echo '
                  9. banner table 복사
                  10. '.PHP_EOL; + + // event table 복사 + $sql = " select * from {$g4['yc4_event_table']} "; + $result = sql_query($sql); + for($i=0; $row=sql_fetch_array($result); $i++) { + if($is_euckr) + $row = array_map('iconv_utf8', $row); + + $comma = ''; + $sql_common = ''; + + foreach($row as $key=>$val) { + if($key == 'ev_id') + continue; + + $sql_common .= $comma . " $key = '".addslashes($val)."' "; + + $comma = ','; + } + + sql_query(" INSERT INTO {$g5['g5_shop_event_table']} SET $sql_common "); + } + echo '
                  11. event table 복사
                  12. '.PHP_EOL; + + // event item table 복사 + $sql = " select * from {$g4['yc4_event_item_table']} "; + $result = sql_query($sql); + for($i=0; $row=sql_fetch_array($result); $i++) { + if($is_euckr) + $row = array_map('iconv_utf8', $row); + + $comma = ''; + $sql_common = ''; + + foreach($row as $key=>$val) { + $sql_common .= $comma . " $key = '".addslashes($val)."' "; + + $comma = ','; + } + + sql_query(" INSERT INTO {$g5['g5_shop_event_item_table']} SET $sql_common "); + } + echo '
                  13. event item table 복사
                  14. '.PHP_EOL; + + // item ps table 복사 + $sql = " select * from {$g4['yc4_item_ps_table']} "; + $result = sql_query($sql); + for($i=0; $row=sql_fetch_array($result); $i++) { + if($is_euckr) + $row = array_map('iconv_utf8', $row); + + $comma = ''; + $sql_common = ''; + + foreach($row as $key=>$val) { + if($key == 'is_id') + continue; + + if($key == 'is_score') + $val = (int)($val / 2); + + $sql_common .= $comma . " $key = '".addslashes($val)."' "; + + $comma = ','; + } + + sql_query(" INSERT INTO {$g5['g5_shop_item_use_table']} SET $sql_common "); + } + echo '
                  15. item ps table 복사
                  16. '.PHP_EOL; + + // item qa table 복사 + $sql = " select * from {$g4['yc4_item_qa_table']} "; + $result = sql_query($sql); + for($i=0; $row=sql_fetch_array($result); $i++) { + if($is_euckr) + $row = array_map('iconv_utf8', $row); + + $comma = ''; + $sql_common = ''; + + foreach($row as $key=>$val) { + if($key == 'iq_id') + continue; + + $sql_common .= $comma . " $key = '".addslashes($val)."' "; + + $comma = ','; + } + + sql_query(" INSERT INTO {$g5['g5_shop_item_qa_table']} SET $sql_common "); + } + echo '
                  17. item qa table 복사
                  18. '.PHP_EOL; + + // item relation table 복사 + $sql = " select * from {$g4['yc4_item_relation_table']} "; + $result = sql_query($sql); + for($i=0; $row=sql_fetch_array($result); $i++) { + if($is_euckr) + $row = array_map('iconv_utf8', $row); + + $comma = ''; + $sql_common = ''; + + foreach($row as $key=>$val) { + $sql_common .= $comma . " $key = '".addslashes($val)."' "; + + $comma = ','; + } + + sql_query(" INSERT INTO {$g5['g5_shop_item_relation_table']} SET $sql_common "); + } + echo '
                  19. event item table 복사
                  20. '.PHP_EOL; + + // category table 복사 + $sql = " select * from {$g4['yc4_category_table']} "; + $result = sql_query($sql); + $excl_fld = array('ca_skin', 'ca_opt1_subject', 'ca_opt2_subject', 'ca_opt3_subject', 'ca_opt4_subject', 'ca_opt5_subject', 'ca_opt6_subject'); + for($i=0; $row=sql_fetch_array($result); $i++) { + if($is_euckr) + $row = array_map('iconv_utf8', $row); + + $comma = ''; + $sql_common = ''; + + foreach($row as $key=>$val) { + if(in_array($key, $excl_fld)) + continue; + + $sql_common .= $comma . " $key = '".addslashes($val)."' "; + + $comma = ','; + } + + sql_query(" INSERT INTO {$g5['g5_shop_category_table']} SET $sql_common, ca_skin = 'list.10.skin.php' "); + } + echo '
                  21. category table 복사
                  22. '.PHP_EOL; + + // item table 복사 + $sql = " select * from {$g4['yc4_item_table']} "; + $result = sql_query($sql); + $excl_fld = array('it_opt1_subject', 'it_opt2_subject', 'it_opt3_subject', 'it_opt4_subject', 'it_opt5_subject', 'it_opt6_subject', 'it_opt1', 'it_opt2', 'it_opt3', 'it_opt4', 'it_opt5', 'it_opt6', 'it_amount2', 'it_amount3', 'it_gallery', 'it_explan_html'); + for($i=0; $row=sql_fetch_array($result); $i++) { + if($is_euckr) + $row = array_map('iconv_utf8', $row); + + $comma = ''; + $sql_common = ''; + + foreach($row as $key=>$val) { + if(in_array($key, $excl_fld)) + continue; + + if($key == 'it_amount') + $key = 'it_price'; + + if($key == 'it_cust_amount') + $key = 'it_cust_price'; + + $sql_common .= $comma . " $key = '".addslashes($val)."' "; + + $comma = ','; + } + + // 상품이미지처리 + $idx = 1; + for($k=1; $k<=5; $k++) { + $item_img_file = $item_img_path.'/'.$row['it_id'].'_l'.$k; + if(is_file($item_img_file)) { + $size = @getimagesize($item_img_file); + + if($size[2] < 1 || $size[2] > 16) + continue; + + switch($size[2]) { + case 1: + $ext = 'gif'; + break; + case 2: + $ext = 'jpg'; + break; + case 3: + $ext = 'png'; + break; + case 6: + $ext = 'bmp'; + break; + default: + continue; + break; + } + + // 이미지복사 + @mkdir(G5_DATA_PATH.'/item/'.$row['it_id'], G5_DIR_PERMISSION); + @chmod(G5_DATA_PATH.'/item/'.$row['it_id'], G5_DIR_PERMISSION); + + if(copy($item_img_file, G5_DATA_PATH.'/item/'.$row['it_id'].'/'.$row['it_id'].'_l'.$idx.'.'.$ext)) { + @chmod(G5_DATA_PATH.'/item/'.$row['it_id'].'/'.$row['it_id'].'_l'.$idx.'.'.$ext, G5_FILE_PERMISSION); + $sql_common .= $comma . " it_img{$idx} = '".$row['it_id'].'/'.$row['it_id'].'_l'.$idx.'.'.$ext."' "; + $idx++; + } + } + } + + sql_query(" INSERT INTO {$g5['g5_shop_item_table']} SET $sql_common "); + + // 사용후기의 확인된 건수를 상품테이블에 저장 + update_use_cnt($row['it_id']); + + // 사용후기의 선호도(별) 평균을 상품테이블에 저장 + update_use_avg($row['it_id']); + } + echo '
                  23. item table 복사
                  24. '.PHP_EOL; + + // order table 복사 + $sql = " select * from {$g4['yc4_order_table']} "; + $result = sql_query($sql); + $excl_fld = array('on_uid', 'od_temp_bank', 'od_temp_card', 'od_temp_hp', 'od_temp_point', 'od_receipt_card', 'od_receipt_bank', 'od_receipt_hp', 'od_bank_time', 'od_card_time', 'od_hp_time', 'od_cancel_card', 'od_dc_amount', 'od_refund_amount', 'dl_id', 'od_escrow1', 'od_escrow2', 'od_escrow3', 'od_cash_no', 'od_cash_receipt_no', 'od_cash_app_time', 'od_cash_reg_stat', 'od_cash_reg_desc', 'od_cash_tr_code', 'od_cash_id_info', 'od_cash', 'od_cash_allthegate_gubun_cd', 'od_cash_allthegate_confirm_no', 'od_cash_allthegate_adm_no', 'od_cash_tgcorp_mxissueno', 'od_cash_inicis_noappl', 'od_cash_inicis_pgauthdate', 'od_cash_inicis_pgauthtime', 'od_cash_inicis_tid', 'od_cash_inicis_ruseopt', 'od_cash_receiptnumber', 'od_cash_kspay_revatransactionno'); + + for($i=0; $row=sql_fetch_array($result); $i++) { + if($is_euckr) + $row = array_map('iconv_utf8', $row); + + $comma = ''; + $sql_common = ''; + + foreach($row as $key=>$val) { + if(in_array($key, $excl_fld)) + continue; + + $sql_common .= $comma . " $key = '".addslashes($val)."' "; + + $comma = ','; + } + + $od_receipt_price = $row['od_receipt_bank'] + $row['od_receipt_card'] + $row['od_receipt_hp']; + $od_refund_price = $row['od_refund_amount']; + $od_receipt_time = $row['od_bank_time']; + if(!is_null_time($row['od_card_time'])) + $od_receipt_time = $row['od_card_time']; + else if(!is_null_time($row['od_hp_time'])) + $od_receipt_time = $row['od_hp_time']; + + // 배송정보 + $od_status = '주문'; + $od_delivery_company = ''; + if($row['dl_id'] && $row['od_invoice']) { + $dl = sql_fetch(" select dl_company from {$g4['yc4_delivery_table']} where dl_id = '{$row['dl_id']}' "); + $od_delivery_company = addslashes($dl['dl_company']); + + $od_status = '배송'; + } + + $sql_common .= $comma . " od_receipt_price = '$od_receipt_price', od_refund_price = '$od_refund_price', od_status = '$od_status', od_delivery_company = '$od_delivery_company', od_receipt_time = '$od_receipt_time' "; + + sql_query(" INSERT INTO {$g5['g5_shop_order_table']} SET $sql_common "); + + // 장바구니자료복사 + $sql2 = " select * from {$g4['yc4_cart_table']} where on_uid = '{$row['on_uid']}' "; + $result2 = sql_query($sql2); + $excl_fld2 = array('ct_id', 'on_uid', 'it_opt1', 'it_opt2', 'it_opt3', 'it_opt4', 'it_opt5', 'it_opt6', 'ct_amount', 'ct_send_cost'); + for($k=0; $row2=sql_fetch_array($result2); $k++) { + if($is_euckr) + $row2 = array_map('iconv_utf8', $row2); + + $comma = ''; + $sql_common2 = ''; + + foreach($row2 as $key=>$val) { + if(in_array($key, $excl_fld2)) + continue; + + $sql_common2 .= $comma . " $key = '".addslashes($val)."' "; + + $comma = ','; + } + + $od_id = $row['od_id']; + + $ct_price = $row2['ct_amount']; + + // 상품명 + $it = sql_fetch(" select it_name from {$g5['g5_shop_item_table']} where it_id = '{$row2['it_id']}' "); + $it_name = addslashes($it['it_name']); + + // 주문옵션 + $ct_option = ''; + $deli = ''; + for($j=1; $j<=6; $j++) { + if($row2['it_opt'.$j]) { + $ct_option .= $deli . $row2['it_opt'.$j]; + } + } + + if($ct_option) + $ct_option = addslashes($ct_option); + + $sql_common2 .= $comma . " ct_price = '$ct_price', it_name = '$it_name', ct_option = '$ct_option' "; + + sql_query(" INSERT INTO {$g5['g5_shop_cart_table']} SET od_id = '$od_id', $sql_common2 , ct_select = '1' "); + } + + // 주문상품의 상태체크 + $cnt1 = sql_fetch(" select count(*) as cnt from {$g5['g5_shop_cart_table']} where od_id = '$od_id' "); + $cnt2 = sql_fetch(" select count(*) as cnt from {$g5['g5_shop_cart_table']} where od_id = '$od_id' and ct_status = '완료' "); + if($cnt1['cnt'] == $cnt2['cnt'] && $cnt2['cnt'] > 0) + $od_status = '완료'; + + // 미수금 등의 정보 + $info = get_order_info($od_id); + + if(!$info) + continue; + + $sql = " update {$g5['g5_shop_order_table']} + set od_cart_price = '{$info['od_cart_price']}', + od_cart_coupon = '{$info['od_cart_coupon']}', + od_coupon = '{$info['od_coupon']}', + od_send_coupon = '{$info['od_send_coupon']}', + od_cancel_price = '{$info['od_cancel_price']}', + od_misu = '{$info['od_misu']}', + od_tax_mny = '{$info['od_tax_mny']}', + od_vat_mny = '{$info['od_vat_mny']}', + od_free_mny = '{$info['od_free_mny']}', + od_status = '$od_status' + where od_id = '$od_id' "; + sql_query($sql); + } + echo '
                  25. order table 복사
                  26. '.PHP_EOL; + + // wish table 복사 + $sql = " select * from {$g4['yc4_wish_table']} "; + $result = sql_query($sql); + for($i=0; $row=sql_fetch_array($result); $i++) { + if($is_euckr) + $row = array_map('iconv_utf8', $row); + + $comma = ''; + $sql_common = ''; + + foreach($row as $key=>$val) { + if($key == 'wi_id') + continue; + + $sql_common .= $comma . " $key = '".addslashes($val)."' "; + + $comma = ','; + } + + sql_query(" INSERT INTO {$g5['g5_shop_wish_table']} SET $sql_common "); + } + echo '
                  27. event item table 복사
                  28. '.PHP_EOL; + + echo '
                  '.PHP_EOL; + + echo '
                  영카트4 DB 데이터 이전 완료
                  '.PHP_EOL; + + // 실행완료 세션에 기록 + set_session('yc4_tables_copied', 'done'); + ?> +
                  + +
                  +
                  + + + +
                  + + +
                  +
                  <?php echo G5_VERSION ?>
                  +
                  +

                  + Copyright © 소유하신 도메인. All rights reserved.
                  + 상단으로 +

                  +
                  +
                  + + + + \ No newline at end of file