Compare commits
59 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d125d39965 | |||
| 8ea1ab51fc | |||
| bc6fdf2a00 | |||
| a7f551aa05 | |||
| d91360d10e | |||
| 05d306c192 | |||
| d218248801 | |||
| a93af7a566 | |||
| cca7ebfe97 | |||
| 1ed02c8f3c | |||
| c0a22f2fa4 | |||
| 1a38e0613f | |||
| 38d90a5887 | |||
| 3f58acf0f7 | |||
| 57c265cb01 | |||
| e1ef45b9f6 | |||
| e26fb62f5d | |||
| 887833089b | |||
| 1438f8d557 | |||
| 25e359facd | |||
| b98d45615c | |||
| 7e8eff5395 | |||
| f4718a71a2 | |||
| 46ea2d03b5 | |||
| 48a521fa67 | |||
| 0830c6e7fd | |||
| c872cb7dad | |||
| 1eee11e433 | |||
| a71192a63b | |||
| 633ff46596 | |||
| 8a1f350d67 | |||
| ef364e1430 | |||
| f6a6a5622d | |||
| 63d6f7c43f | |||
| 6e101c4647 | |||
| fa792efacb | |||
| 66f6a75a10 | |||
| de2502fad5 | |||
| 54171e1903 | |||
| 44172c1d1f | |||
| 41945c62f8 | |||
| 37d0dcb48f | |||
| 002e43e5fb | |||
| 9510aa9cf1 | |||
| 6a3c2b1002 | |||
| f69b66dced | |||
| cb1fadba4c | |||
| 3fb60c435e | |||
| 5da91ab73e | |||
| d5b541724f | |||
| 9758007f91 | |||
| 9d5f8e137f | |||
| f1da95f055 | |||
| 9602f3c7a7 | |||
| d357f5a0a4 | |||
| a9eab8d86a | |||
| 9191199ef4 | |||
| 2556753530 | |||
| 57983a6dbc |
114
adm/admin.js
114
adm/admin.js
@ -1,10 +1,114 @@
|
|||||||
function check_all(f)
|
/** 공통 UI 모듈 */
|
||||||
{
|
window.CommonUI = {
|
||||||
var chk = document.getElementsByName("chk[]");
|
bindTabs(tabSelector, contentSelector, options = {}) {
|
||||||
|
const tabs = document.querySelectorAll(tabSelector);
|
||||||
|
const contents = document.querySelectorAll(contentSelector);
|
||||||
|
|
||||||
for (i=0; i<chk.length; i++)
|
tabs.forEach(tab => {
|
||||||
chk[i].checked = f.chkall.checked;
|
tab.addEventListener('click', () => {
|
||||||
|
const tabName = tab.dataset.tab;
|
||||||
|
const target = document.getElementById(`tab-${tabName}`);
|
||||||
|
|
||||||
|
tabs.forEach(t => t.classList.remove('active'));
|
||||||
|
tab.classList.add('active');
|
||||||
|
|
||||||
|
contents.forEach(c => c.classList.add('is-hidden'));
|
||||||
|
|
||||||
|
if (target) target.classList.remove('is-hidden');
|
||||||
|
|
||||||
|
options.onChange?.(tabName, target);
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
function setHtml(el, markup) {
|
||||||
|
if (!el) return;
|
||||||
|
if (markup == null || markup === '') {
|
||||||
|
el.textContent = '';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const range = document.createRange();
|
||||||
|
range.selectNodeContents(el);
|
||||||
|
el.replaceChildren(range.createContextualFragment(markup));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 팝업 관리 모듈 */
|
||||||
|
window.PopupManager = {
|
||||||
|
open(id, options = {}) {
|
||||||
|
const el = document.getElementById(id);
|
||||||
|
if (el) {
|
||||||
|
el.classList.remove('is-hidden');
|
||||||
|
this.bindOutsideClickClose(id);
|
||||||
|
|
||||||
|
if (!options.disableOutsideClose) {
|
||||||
|
this.bindOutsideClickClose(id);
|
||||||
|
} else {
|
||||||
|
this.unbindOutsideClickClose(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
close(id) {
|
||||||
|
const el = document.getElementById(id);
|
||||||
|
if (el) el.classList.add('is-hidden');
|
||||||
|
},
|
||||||
|
|
||||||
|
toggle(id) {
|
||||||
|
const el = document.getElementById(id);
|
||||||
|
if (el) el.classList.toggle('is-hidden');
|
||||||
|
},
|
||||||
|
|
||||||
|
bindOutsideClickClose(id) {
|
||||||
|
const el = document.getElementById(id);
|
||||||
|
if (!el) return;
|
||||||
|
el.onclick = () => this.close(id);
|
||||||
|
},
|
||||||
|
|
||||||
|
unbindOutsideClickClose(id) {
|
||||||
|
const el = document.getElementById(id);
|
||||||
|
if (!el) return;
|
||||||
|
el.onclick = null;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 팝업 콘텐츠 렌더링 (타이틀, 바디, 푸터 구성)
|
||||||
|
* @param {string} title - 팝업 제목
|
||||||
|
* @param {string} body - 팝업 본문 HTML
|
||||||
|
* @param {string} [footer] - 푸터 HTML
|
||||||
|
* @param {object} [options] - 팝업 열기 옵션
|
||||||
|
*/
|
||||||
|
render(title, body, footer = '', options = {}) {
|
||||||
|
const titleEl = document.getElementById('popupTitle');
|
||||||
|
const bodyEl = document.getElementById('popupBody');
|
||||||
|
const footerEl = document.getElementById('popupFooter');
|
||||||
|
|
||||||
|
if (titleEl) titleEl.textContent = title;
|
||||||
|
if (bodyEl) setHtml(bodyEl, body);
|
||||||
|
if (footerEl) setHtml(footerEl, footer);
|
||||||
|
|
||||||
|
this.open('popupOverlay', options);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 형식 체크 */
|
||||||
|
function check_all(target) {
|
||||||
|
const chkboxes = document.getElementsByName("chk[]");
|
||||||
|
let chkall;
|
||||||
|
|
||||||
|
if (target && target.tagName === "FORM") {
|
||||||
|
chkall = target.querySelector('input[name="chkall"]');
|
||||||
|
} else if (target && target.type === "checkbox") {
|
||||||
|
chkall = target;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!chkall) return;
|
||||||
|
|
||||||
|
for (const checkbox of chkboxes) {
|
||||||
|
checkbox.checked = chkall.checked;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function btn_check(f, act)
|
function btn_check(f, act)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -11,6 +11,7 @@ $menu['menu100'] = array(
|
|||||||
array('100900', '캐시파일 일괄삭제', G5_ADMIN_URL . '/cache_file_delete.php', 'cf_cache', 1),
|
array('100900', '캐시파일 일괄삭제', G5_ADMIN_URL . '/cache_file_delete.php', 'cf_cache', 1),
|
||||||
array('100910', '캡챠파일 일괄삭제', G5_ADMIN_URL . '/captcha_file_delete.php', 'cf_captcha', 1),
|
array('100910', '캡챠파일 일괄삭제', G5_ADMIN_URL . '/captcha_file_delete.php', 'cf_captcha', 1),
|
||||||
array('100920', '썸네일파일 일괄삭제', G5_ADMIN_URL . '/thumbnail_file_delete.php', 'cf_thumbnail', 1),
|
array('100920', '썸네일파일 일괄삭제', G5_ADMIN_URL . '/thumbnail_file_delete.php', 'cf_thumbnail', 1),
|
||||||
|
array('100930', '회원관리파일 일괄삭제', G5_ADMIN_URL . '/member_list_file_delete.php', 'cf_memberlist', 1),
|
||||||
array('100500', 'phpinfo()', G5_ADMIN_URL . '/phpinfo.php', 'cf_phpinfo')
|
array('100500', 'phpinfo()', G5_ADMIN_URL . '/phpinfo.php', 'cf_phpinfo')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
$menu['menu200'] = array(
|
$menu['menu200'] = array(
|
||||||
array('200000', '회원관리', G5_ADMIN_URL . '/member_list.php', 'member'),
|
array('200000', '회원관리', G5_ADMIN_URL . '/member_list.php', 'member'),
|
||||||
array('200100', '회원관리', G5_ADMIN_URL . '/member_list.php', 'mb_list'),
|
array('200100', '회원관리', G5_ADMIN_URL . '/member_list.php', 'mb_list'),
|
||||||
|
array('200400', '회원관리파일', G5_ADMIN_URL . '/member_list_exel.php', 'mb_list'),
|
||||||
array('200300', '회원메일발송', G5_ADMIN_URL . '/mail_list.php', 'mb_mail'),
|
array('200300', '회원메일발송', G5_ADMIN_URL . '/mail_list.php', 'mb_mail'),
|
||||||
array('200800', '접속자집계', G5_ADMIN_URL . '/visit_list.php', 'mb_visit', 1),
|
array('200800', '접속자집계', G5_ADMIN_URL . '/visit_list.php', 'mb_visit', 1),
|
||||||
array('200810', '접속자검색', G5_ADMIN_URL . '/visit_search.php', 'mb_search', 1),
|
array('200810', '접속자검색', G5_ADMIN_URL . '/visit_search.php', 'mb_search', 1),
|
||||||
|
|||||||
@ -19,5 +19,5 @@ $menu['menu400'] = array(
|
|||||||
array('400800', '쿠폰관리', G5_ADMIN_URL . '/shop_admin/couponlist.php', 'scf_coupon'),
|
array('400800', '쿠폰관리', G5_ADMIN_URL . '/shop_admin/couponlist.php', 'scf_coupon'),
|
||||||
array('400810', '쿠폰존관리', G5_ADMIN_URL . '/shop_admin/couponzonelist.php', 'scf_coupon_zone'),
|
array('400810', '쿠폰존관리', G5_ADMIN_URL . '/shop_admin/couponzonelist.php', 'scf_coupon_zone'),
|
||||||
array('400750', '추가배송비관리', G5_ADMIN_URL . '/shop_admin/sendcostlist.php', 'scf_sendcost', 1),
|
array('400750', '추가배송비관리', G5_ADMIN_URL . '/shop_admin/sendcostlist.php', 'scf_sendcost', 1),
|
||||||
array('400410', '미완료주문', G5_ADMIN_URL . '/shop_admin/inorderlist.php', 'scf_inorder', 1),
|
array('400410', '미완료주문', G5_ADMIN_URL . '/shop_admin/inorderlist.php', 'scf_inorder', 1)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -14,7 +14,6 @@ $print_version = ($is_admin == 'super') ? 'Version ' . G5_GNUBOARD_VER : '';
|
|||||||
<strong>자바스크립트를 사용하지 않음</strong>으로 설정하신 경우는 수정이나 삭제시 별도의 경고창이 나오지 않으므로 이점 주의하시기 바랍니다.
|
<strong>자바스크립트를 사용하지 않음</strong>으로 설정하신 경우는 수정이나 삭제시 별도의 경고창이 나오지 않으므로 이점 주의하시기 바랍니다.
|
||||||
</p>
|
</p>
|
||||||
</noscript>
|
</noscript>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<footer id="ft">
|
<footer id="ft">
|
||||||
<p>
|
<p>
|
||||||
@ -22,8 +21,25 @@ $print_version = ($is_admin == 'super') ? 'Version ' . G5_GNUBOARD_VER : '';
|
|||||||
<button type="button" class="scroll_top"><span class="top_img"></span><span class="top_txt">TOP</span></button>
|
<button type="button" class="scroll_top"><span class="top_img"></span><span class="top_txt">TOP</span></button>
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
<!-- 공통 레이어 팝업 컨테이너 -->
|
||||||
|
<div id="adminPopupContainer">
|
||||||
|
<div id="popupOverlay" class="popup-overlay is-hidden" onclick="PopupManager.close('popupOverlay')">
|
||||||
|
<div class="popup-content" onclick="event.stopPropagation()">
|
||||||
|
<div class="popup-header">
|
||||||
|
<strong id="popupTitle" class="popup-title"></strong>
|
||||||
|
<button type="button" class="popup-close-btn" onclick="PopupManager.close('popupOverlay')">
|
||||||
|
<i class="fa fa-close"></i><span class="sound_only">팝업 닫기</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="popup-body" id="popupBody">
|
||||||
|
<!-- 동적으로 내용 주입 -->
|
||||||
|
</div>
|
||||||
|
<div class="popup-footer" id="popupFooter">
|
||||||
|
<!-- 버튼 등 동적으로 -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@ -13,7 +13,7 @@ if ($is_admin != 'super') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$mb = get_member($mb_id);
|
$mb = get_member($mb_id);
|
||||||
if (!$mb['mb_id']) {
|
if (!(isset($mb['mb_id']) && $mb['mb_id'])) {
|
||||||
alert('존재하는 회원아이디가 아닙니다.');
|
alert('존재하는 회원아이디가 아닙니다.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1439,7 +1439,7 @@ function frm_check_file(){
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
jQuery("#admin_captcha_box").hide();
|
// jQuery("#admin_captcha_box").hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -1447,12 +1447,12 @@ function frm_check_file(){
|
|||||||
|
|
||||||
jQuery(function($){
|
jQuery(function($){
|
||||||
if( window.self !== window.top ){ // frame 또는 iframe을 사용할 경우 체크
|
if( window.self !== window.top ){ // frame 또는 iframe을 사용할 경우 체크
|
||||||
|
use_captcha_check();
|
||||||
|
}
|
||||||
|
|
||||||
$("#bo_include_head, #bo_include_tail").on("change paste keyup", function(e) {
|
$("#bo_include_head, #bo_include_tail").on("change paste keyup", function(e) {
|
||||||
frm_check_file();
|
frm_check_file();
|
||||||
});
|
});
|
||||||
|
|
||||||
use_captcha_check();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function fboardform_submit(f)
|
function fboardform_submit(f)
|
||||||
@ -1487,6 +1487,10 @@ function fboardform_submit(f)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (frm_check_file() == false) {
|
||||||
|
jQuery(window).scrollTop($('#bo_include_tail').offset().top - 30);
|
||||||
|
}
|
||||||
|
|
||||||
if( captcha_chk ) {
|
if( captcha_chk ) {
|
||||||
<?php echo isset($captcha_js) ? $captcha_js : ''; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
|
<?php echo isset($captcha_js) ? $captcha_js : ''; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,8 +36,22 @@ if ($w == '' && in_array($bo_table, get_bo_table_banned_word())) {
|
|||||||
$bo_include_head = isset($_POST['bo_include_head']) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($_POST['bo_include_head'], 0, 255)) : '';
|
$bo_include_head = isset($_POST['bo_include_head']) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($_POST['bo_include_head'], 0, 255)) : '';
|
||||||
$bo_include_tail = isset($_POST['bo_include_tail']) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($_POST['bo_include_tail'], 0, 255)) : '';
|
$bo_include_tail = isset($_POST['bo_include_tail']) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($_POST['bo_include_tail'], 0, 255)) : '';
|
||||||
|
|
||||||
// 관리자가 자동등록방지를 사용해야 할 경우
|
$check_captcha = false;
|
||||||
if ($board && (isset($board['bo_include_head']) && $board['bo_include_head'] !== $bo_include_head || $board['bo_include_tail'] !== $bo_include_tail) && function_exists('get_admin_captcha_by') && get_admin_captcha_by()) {
|
|
||||||
|
// 관리자가 자동등록방지 CAPTCHA를 사용해야 할 경우
|
||||||
|
if ($w === 'u') {
|
||||||
|
if (isset($board['bo_include_head'], $board['bo_include_tail']) &&
|
||||||
|
($board['bo_include_head'] !== $bo_include_head || $board['bo_include_tail'] !== $bo_include_tail)) {
|
||||||
|
$check_captcha = true;
|
||||||
|
}
|
||||||
|
} elseif ($w === '') {
|
||||||
|
if ($bo_include_head !== '_head.php' || $bo_include_tail !== '_tail.php') {
|
||||||
|
$check_captcha = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 실제 CAPTCHA 검증
|
||||||
|
if ($check_captcha) {
|
||||||
include_once(G5_CAPTCHA_PATH . '/captcha.lib.php');
|
include_once(G5_CAPTCHA_PATH . '/captcha.lib.php');
|
||||||
|
|
||||||
if (!chk_captcha()) {
|
if (!chk_captcha()) {
|
||||||
|
|||||||
@ -422,6 +422,30 @@ if (!isset($config['cf_cert_kcp_enckey'])) {
|
|||||||
$config['cf_cert_kcp_enckey'] = '';
|
$config['cf_cert_kcp_enckey'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 광고성 정보 수신 동의 사용 필드 추가
|
||||||
|
if (!isset($config['cf_use_promotion'])) {
|
||||||
|
sql_query(
|
||||||
|
" ALTER TABLE `{$g5['config_table']}`
|
||||||
|
ADD `cf_use_promotion` tinyint(1) NOT NULL DEFAULT '0' AFTER `cf_privacy` ",
|
||||||
|
true
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 광고성 정보 수신 동의 여부 필드 추가 + 메일 / SMS 수신 일자 추가
|
||||||
|
if (!isset($member['mb_marketing_agree'])) {
|
||||||
|
sql_query(
|
||||||
|
" ALTER TABLE `{$g5['member_table']}`
|
||||||
|
ADD `mb_marketing_agree` tinyint(1) NOT NULL DEFAULT '0' AFTER `mb_scrap_cnt`,
|
||||||
|
ADD `mb_marketing_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `mb_marketing_agree`,
|
||||||
|
ADD `mb_thirdparty_agree` tinyint(1) NOT NULL DEFAULT '0' AFTER `mb_marketing_date`,
|
||||||
|
ADD `mb_thirdparty_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `mb_thirdparty_agree`,
|
||||||
|
ADD `mb_agree_log` TEXT NOT NULL AFTER `mb_thirdparty_date`,
|
||||||
|
ADD `mb_mailling_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `mb_mailling`,
|
||||||
|
ADD `mb_sms_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `mb_sms` ",
|
||||||
|
true
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (!$config['cf_faq_skin']) {
|
if (!$config['cf_faq_skin']) {
|
||||||
$config['cf_faq_skin'] = "basic";
|
$config['cf_faq_skin'] = "basic";
|
||||||
}
|
}
|
||||||
@ -963,6 +987,17 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
|||||||
<th scope="row"><label for="cf_privacy">개인정보처리방침</label></th>
|
<th scope="row"><label for="cf_privacy">개인정보처리방침</label></th>
|
||||||
<td colspan="3"><textarea id="cf_privacy" name="cf_privacy" rows="10"><?php echo html_purifier($config['cf_privacy']); ?></textarea></td>
|
<td colspan="3"><textarea id="cf_privacy" name="cf_privacy" rows="10"><?php echo html_purifier($config['cf_privacy']); ?></textarea></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_use_promotion">회원가입 약관 동의에<br>광고성 정보 수신 동의 표시 여부</label></th>
|
||||||
|
<td colspan="3">
|
||||||
|
<?php echo help('<b>광고성 정보 수신 · 마케팅 목적의 개인정보 수집 및 이용 · 개인정보 제 3자 제공</b> 여부를 설정합니다. <b>SMS 또는 카카오톡</b> 사용 시 <b>개인정보 제3자 제공</b>이 활성화됩니다.'); ?>
|
||||||
|
<?php echo help('동의한 회원에게 <b>카카오톡(친구톡)·문자</b>로 광고성 메시지를 발송할 수 있습니다.'); ?>
|
||||||
|
<?php echo help('<b>휴대전화번호</b> 사용을 위해서는 <b>기본환경설정 > 회원가입 > 휴대전화번호 입력</b>을 <b>[보이기]</b> 또는 <b>[필수입력]</b>으로 설정해야 하며, 미설정 시 수집이 불가합니다.'); ?>
|
||||||
|
<?php echo help('* 「정보통신망이용촉진및정보보호등에관한법률」에 따라 <b>광고성 정보 수신 동의</b>를 매 2년마다 반드시 확인해야 합니다.'); ?>
|
||||||
|
<input type="checkbox" name="cf_use_promotion" value="1" id="cf_use_promotion" <?php echo $config['cf_use_promotion'] ? 'checked' : ''; ?>>
|
||||||
|
<label for="cf_use_promotion">사용</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@ -1138,6 +1173,7 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
|||||||
<input type="checkbox" name="cf_formmail_is_member" value="1" id="cf_formmail_is_member" <?php echo $config['cf_formmail_is_member'] ? 'checked' : ''; ?>> 회원만 사용
|
<input type="checkbox" name="cf_formmail_is_member" value="1" id="cf_formmail_is_member" <?php echo $config['cf_formmail_is_member'] ? 'checked' : ''; ?>> 회원만 사용
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@ -1526,7 +1562,6 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
<section id="anc_cf_extra">
|
<section id="anc_cf_extra">
|
||||||
<h2 class="h2_frm">여분필드 기본 설정</h2>
|
<h2 class="h2_frm">여분필드 기본 설정</h2>
|
||||||
<?php echo $pg_anchor ?>
|
<?php echo $pg_anchor ?>
|
||||||
|
|||||||
@ -141,6 +141,7 @@ $check_keys = array(
|
|||||||
'cf_visit' => 'char',
|
'cf_visit' => 'char',
|
||||||
'cf_stipulation' => 'text',
|
'cf_stipulation' => 'text',
|
||||||
'cf_privacy' => 'text',
|
'cf_privacy' => 'text',
|
||||||
|
'cf_use_promotion' => 'int',
|
||||||
'cf_open_modify' => 'int',
|
'cf_open_modify' => 'int',
|
||||||
'cf_memo_send_point' => 'int',
|
'cf_memo_send_point' => 'int',
|
||||||
'cf_mobile_new_skin' => 'char',
|
'cf_mobile_new_skin' => 'char',
|
||||||
@ -300,6 +301,7 @@ $sql = " update {$g5['config_table']}
|
|||||||
cf_mobile_page_rows = '{$_POST['cf_mobile_page_rows']}',
|
cf_mobile_page_rows = '{$_POST['cf_mobile_page_rows']}',
|
||||||
cf_stipulation = '{$_POST['cf_stipulation']}',
|
cf_stipulation = '{$_POST['cf_stipulation']}',
|
||||||
cf_privacy = '{$_POST['cf_privacy']}',
|
cf_privacy = '{$_POST['cf_privacy']}',
|
||||||
|
cf_use_promotion = '{$_POST['cf_use_promotion']}',
|
||||||
cf_open_modify = '{$_POST['cf_open_modify']}',
|
cf_open_modify = '{$_POST['cf_open_modify']}',
|
||||||
cf_memo_send_point = '{$_POST['cf_memo_send_point']}',
|
cf_memo_send_point = '{$_POST['cf_memo_send_point']}',
|
||||||
cf_mobile_new_skin = '{$_POST['cf_mobile_new_skin']}',
|
cf_mobile_new_skin = '{$_POST['cf_mobile_new_skin']}',
|
||||||
|
|||||||
@ -28,6 +28,39 @@ box-sizing: border-box;
|
|||||||
h2{font-size: 1.083em;font-weight: bold;margin:10px 0}
|
h2{font-size: 1.083em;font-weight: bold;margin:10px 0}
|
||||||
|
|
||||||
#wrapper {min-height:480px}
|
#wrapper {min-height:480px}
|
||||||
|
|
||||||
|
/* admin 공통 */
|
||||||
|
/* 공통 - display none/block */
|
||||||
|
.is-hidden { display: none !important; }
|
||||||
|
.is-visible { display: block !important; }
|
||||||
|
|
||||||
|
/* 공통 - 뷰포트 (pc / mobile) 별 display none/block */
|
||||||
|
.pc-only { display: none; }
|
||||||
|
@media (min-width: 769px) { .pc-only { display: block !important; }}
|
||||||
|
.mobile-only { display: block; }
|
||||||
|
@media (min-width: 769px) { .mobile-only { display: none !important; }}
|
||||||
|
|
||||||
|
/* 공통 - 레이어 팝업 */
|
||||||
|
.popup-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.3); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 9999; display: flex; justify-content: center; align-items: center; }
|
||||||
|
.popup-content { background: #fff; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); width: 800px; overflow: hidden; }
|
||||||
|
.popup-header, .popup-footer { padding: 18px 20px; display: flex; align-items: center; }
|
||||||
|
.popup-header { justify-content: space-between; border-bottom: 1px solid #e0e0e0; }
|
||||||
|
.popup-footer { gap: 20px; border-top: 1px solid #e0e0e0;}
|
||||||
|
.popup-close-btn { background: none; border: none; color: #888; font-size: 20px; cursor: pointer; padding: 4px; display: flex; align-items: center; justify-content: center; transition: color 0.2s ease; }
|
||||||
|
.popup-close-btn:hover { color: #333; }
|
||||||
|
.popup-title { font-size: 18px; font-weight: 600; }
|
||||||
|
.popup-body { padding: 20px; max-height: 400px; overflow-y: auto; color: #333; }
|
||||||
|
.popup-footer button { background: #3d70ff; color: white; border: 1px solid #3d70ff; padding: 8px 16px; border-radius: 6px; font-weight: 600; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease; }
|
||||||
|
.popup-footer button:hover { background: #2b3d9f; border-color: #2b3d9f; }
|
||||||
|
|
||||||
|
/* 공통 - tab */
|
||||||
|
.tab-container { display: flex; flex-direction: column; width: 100%; }
|
||||||
|
.tab-header { position: relative; bottom: -1px; display: flex; }
|
||||||
|
.tab-btn { padding: 10px 14px; background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; color: inherit; font: inherit; }
|
||||||
|
.tab-btn.active { border-bottom-color: #000; font-weight: bold; }
|
||||||
|
.tab-body { width: 100%; border-top: 1px solid #ccc; }
|
||||||
|
.tab-content { padding: 16px 0; }
|
||||||
|
|
||||||
/* 레이아웃 */
|
/* 레이아웃 */
|
||||||
#hd h1 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
#hd h1 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||||
#hd_top{position:fixed;top:0;left:0;width:100%;height:50px;background:#3f51b5;z-index:1000}
|
#hd_top{position:fixed;top:0;left:0;width:100%;height:50px;background:#3f51b5;z-index:1000}
|
||||||
@ -95,9 +128,11 @@ box-shadow: 2px 0 2px rgba(150,150,150,0.1);}
|
|||||||
#container.container-small #container_title{padding-left:70px}
|
#container.container-small #container_title{padding-left:70px}
|
||||||
.container_wr{padding:20px}
|
.container_wr{padding:20px}
|
||||||
|
|
||||||
/* 화면낭독기 사용자용 */
|
/* 화면낭독기 사용자용 (스크린 리더 대응) */
|
||||||
|
/* 일반적인 .blind/.sr-only 사용시에 .sound_only 사용 권장 */
|
||||||
#hd_login_msg {position:absolute;top:0;left:0;width:1px;height:1px;overflow:hidden}
|
#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;line-height:0;border:0 !important;overflow:hidden !important}
|
.sound_only, .msg_sound_only {overflow:hidden;position:absolute;width:1px;height:1px;margin:-1px;padding:0;clip:rect(0,0,0,0)}
|
||||||
|
|
||||||
/* 본문 바로가기 */
|
/* 본문 바로가기 */
|
||||||
#to_content a {z-index:100000;position:absolute;top:0;left:0;font-size:0;line-height:0;overflow:hidden}
|
#to_content a {z-index:100000;position:absolute;top:0;left:0;font-size:0;line-height:0;overflow:hidden}
|
||||||
#to_content a:focus, #to_content a:active {width:100%;height:70px;background:#fff;font-size:2em;font-weight:bold;text-align:center;text-decoration:none;line-height:3.1em}
|
#to_content a:focus, #to_content a:active {width:100%;height:70px;background:#fff;font-size:2em;font-weight:bold;text-align:center;text-decoration:none;line-height:3.1em}
|
||||||
@ -196,6 +231,7 @@ a.btn_submit{background:#ff4081;color:#fff}
|
|||||||
|
|
||||||
.btn_02,a.btn_02{background:#9eacc6;color:#fff;}
|
.btn_02,a.btn_02{background:#9eacc6;color:#fff;}
|
||||||
.btn_03,a.btn_03{background:#3f51b5;color:#fff;}
|
.btn_03,a.btn_03{background:#3f51b5;color:#fff;}
|
||||||
|
.btn_03,a.btn_04{background:#819FF7;color:#fff;}
|
||||||
|
|
||||||
.btn_frmline{display:inline-block;background:#9eacc6;color:#fff;height:35px;border:0;border-radius:5px;padding:0 10px}
|
.btn_frmline{display:inline-block;background:#9eacc6;color:#fff;height:35px;border:0;border-radius:5px;padding:0 10px}
|
||||||
a.btn_frmline{display:inline-block;background:#9eacc6;color:#fff;height:35px;line-height:33px;border-radius:5px;padding:0 10px;text-decoration:none !important}
|
a.btn_frmline{display:inline-block;background:#9eacc6;color:#fff;height:35px;line-height:33px;border-radius:5px;padding:0 10px;text-decoration:none !important}
|
||||||
@ -247,18 +283,14 @@ legend {position:absolute;width:0;height:0;font-size:0;line-height:0;text-indent
|
|||||||
.anchor a {display:inline-block;padding:5px 10px;border:1px solid #c8ced1;background:#d6dde1;text-decoration:none}
|
.anchor a {display:inline-block;padding:5px 10px;border:1px solid #c8ced1;background:#d6dde1;text-decoration:none}
|
||||||
.anchor .selected{background:#3f51b5}
|
.anchor .selected{background:#3f51b5}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#sort_mb {width:800px}
|
#sort_mb {width:800px}
|
||||||
|
|
||||||
#sort_sodr {width:600px}
|
#sort_sodr {width:600px}
|
||||||
|
|
||||||
|
|
||||||
/* 하단 레이아웃 */
|
/* 하단 레이아웃 */
|
||||||
#ft{background:#f3f3f3;padding:0 25px;color:#777;text-align:center}
|
#ft{background:#f3f3f3;padding:0 25px;color:#777;text-align:center}
|
||||||
#ft p{line-height:50px;}
|
#ft p{line-height:50px;}
|
||||||
.scroll_top{position:fixed;bottom:10px;right:10px;width:50px;height:50px;border:0;text-align:center;background:#ddd;background:rgba(0,0,0,0.1)}
|
.scroll_top{position:fixed;bottom:10px;right:10px;width:50px;height:50px;border:0;text-align:center;background:#ddd;background:rgba(0,0,0,0.1);z-index:50;}
|
||||||
.scroll_top span.top_img{display:inline-block;width: 0; height: 0; border-left: 5px solid transparent;border-right: 5px solid transparent;
|
.scroll_top span.top_img{display:inline-block;width: 0; height: 0; border-left: 5px solid transparent;border-right: 5px solid transparent;
|
||||||
border-bottom: 5px solid black;}
|
border-bottom: 5px solid black;}
|
||||||
.scroll_top span.top_txt{display:block}
|
.scroll_top span.top_txt{display:block}
|
||||||
@ -281,9 +313,59 @@ border-bottom: 5px solid black;}
|
|||||||
.local_sch03 button{height:30px;padding:0 5px;border:0;background:#9eacc6;color:#fff;}
|
.local_sch03 button{height:30px;padding:0 5px;border:0;background:#9eacc6;color:#fff;}
|
||||||
.local_sch03 .btn_submit{height:30px;padding:0 5px;border:0;color:#fff;}
|
.local_sch03 .btn_submit{height:30px;padding:0 5px;border:0;color:#fff;}
|
||||||
.local_sch03 .frm_input{height:30px;border:1px solid #dcdcdc;padding:0 5px;}
|
.local_sch03 .frm_input{height:30px;border:1px solid #dcdcdc;padding:0 5px;}
|
||||||
|
|
||||||
|
/* 회원 관리 데이터 필터링 */
|
||||||
|
.member_list_data { display: flex; flex-direction: column; padding: 20px; margin: 20px 0 40px; background: #f9f9f9; border: 1px solid #f2f2f2; color: #333; }
|
||||||
|
.sch_table { display: flex; flex-direction: column; gap: 10px; font-size: 11.5px; color: #333; }
|
||||||
|
.member_list_data .sch_row { display: flex; align-items: center; gap: 12px; min-height: 30px; }
|
||||||
|
.label { min-width: 120px; font-weight: 500; white-space: nowrap; display: flex; align-items: center; }
|
||||||
|
.label label {display: flex; gap: 10px;}
|
||||||
|
.field { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
|
||||||
|
.field input[type="text"], .field input[type="number"], .field input[type="date"], .field select { height: 30px; min-width: 100px; padding: 0 10px; font-size: 11.5px; border: 1px solid #ddd; border-radius: 8px; background: #fff; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
|
||||||
|
.field input[type="text"]:focus, .field input[type="number"]:focus, .field input[type="date"]:focus, .field select:focus { border-color: #6f809a; box-shadow: 0 0 0 2px rgba(63,81,181,0.1); outline: none; }
|
||||||
|
.field input::placeholder { color: #aaa; }
|
||||||
|
.field input[type="checkbox"], .field input[type="radio"] { width: 14px; height: 14px; accent-color: #536177; }
|
||||||
|
.radio_group { display: flex; gap: 15px; align-items: center; padding: 0 10px;}
|
||||||
|
.radio_group label {display: flex; align-items: center; gap: 5px;}
|
||||||
|
.ad_range_wrap {flex: 1; padding-left: 20px;}
|
||||||
|
.ad_range_box {display: flex;}
|
||||||
|
.ad_range_box .label {width: 109px;}
|
||||||
|
.sch_notice { font-size: 11px; color: #999; }
|
||||||
|
.sch_btn { display: flex; gap: 20px; justify-content: center; margin-top: 40px; }
|
||||||
|
.sch_btn { display: flex; gap: 10px; }
|
||||||
|
|
||||||
|
.btn_reset { display: flex; align-items: center; gap: 6px; padding: 0 20px; height: 40px; background: #9eacc6; color: #fff; font-weight: 600; border: none; border-radius: 8px; cursor: pointer; transition: background 0.2s ease, transform 0.15s ease; }
|
||||||
|
.btn_reset:hover { background: #5f6e89; }
|
||||||
|
.sch_btn button:not(.btn_reset) { padding: 0 20px; height: 40px; border: 1px solid #ccd1d8; background-color: #fff; color: #444; font-weight: 600; border-radius: 8px; cursor: pointer; user-select: none; transition: border-color 0.2s ease, box-shadow 0.2s ease; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
|
||||||
|
.sch_btn button:not(.btn_reset):hover { border-color: #6f809a; box-shadow: 0 2px 4px rgba(111, 128, 154, 0.15); }
|
||||||
|
.sch_btn button:not(.btn_reset):active { box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); }
|
||||||
|
|
||||||
|
/* 회원 관리 다운로드 진행 팝업 */
|
||||||
|
.excel-download-progress p { color: #374151; }
|
||||||
|
.excel-download-progress .progress-desc { padding: 40px 0 32px; text-align: center; }
|
||||||
|
.excel-download-progress .progress-summary { margin-bottom: 6px; font-size: 16px; font-weight: 500; color: #111827; }
|
||||||
|
.excel-download-progress .progress-message { font-size: 20px; font-weight: 600; color: #3b82f6; }
|
||||||
|
.excel-download-progress .progress-error { color:red; }
|
||||||
|
.progress-spinner { display: flex; flex-direction: column; align-items: center; gap: 45px; padding: 24px 0; transition: all 0.2s ease; }
|
||||||
|
.spinner { width: 48px; height: 48px; border: 5px solid #3b82f6; border-top: 5px solid #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
|
||||||
|
@keyframes spin { to { transform: rotate(360deg); } }
|
||||||
|
.loading-message { text-align: center; font-size: 14px; color: #374151; }
|
||||||
|
.excel-download-progress .progress-download-box { margin-top: 24px; background: #f9fafb; padding: 20px; border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
|
||||||
|
.excel-download-progress .progress-download-box a { display: block; width: 100%; height: auto; text-align: center; margin-top: 8px; font-weight: 600; font-size: 14px; padding: 10px 20px; background: #fff; border: 1px solid #ccd1d8; border-radius: 8px; color: #444; cursor: pointer; transition: border-color 0.2s ease, box-shadow 0.2s ease; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
|
||||||
|
.excel-download-progress .progress-download-box a:hover { border-color: #6f809a; box-shadow: 0 2px 4px rgba(111, 128, 154, 0.15); }
|
||||||
|
.excel-download-progress .progress-download-box a:active { box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); }
|
||||||
|
|
||||||
|
.field-select-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 15px; gap: 0px 10px; padding: 10px; background-color: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; color: #374151; }
|
||||||
|
.field-select-form label { display: flex; align-items: center; cursor: pointer; padding: 6px 10px; border-radius: 4px; }
|
||||||
|
.field-select-form label:hover { background-color: #f3f4f6; }
|
||||||
|
.field-select-form input[type="checkbox"] { margin-right: 8px; transform: scale(1.2); }
|
||||||
|
.field-separator { grid-column: 1 / -1; border-top: 1px solid #d1d5db; margin: 8px 0; }
|
||||||
|
.selected-fields-preview { padding: 8px; background-color: #eef2f7; border: 1px solid #d1d5db; border-radius: 6px; margin: 10px 0px; color: #1f2937; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
|
||||||
|
.selected-fields-preview strong { padding: 4px 8px; }
|
||||||
|
.selected-fields-preview .field-tag { background-color: #dbeafe; color: #1e40af; padding: 4px 8px; border-radius: 4px; }
|
||||||
|
|
||||||
/* 페이지 내 실행 */
|
/* 페이지 내 실행 */
|
||||||
.local_cmd {min-width:960px}
|
.local_cmd {min-width:960px}
|
||||||
|
|
||||||
.local_cmd01 {margin:0 0 10px;padding:0 }
|
.local_cmd01 {margin:0 0 10px;padding:0 }
|
||||||
.local_cmd01 .cmd_tit {font-weight:bold}
|
.local_cmd01 .cmd_tit {font-weight:bold}
|
||||||
.local_cmd01 .btn_submit {padding:3px 5px;border:1px solid #ff3061;color:#fff;font-size:0.95em;vertical-align:middle}
|
.local_cmd01 .btn_submit {padding:3px 5px;border:1px solid #ff3061;color:#fff;font-size:0.95em;vertical-align:middle}
|
||||||
@ -298,7 +380,7 @@ border-bottom: 5px solid black;}
|
|||||||
|
|
||||||
.local_desc01 {margin:10px 0 10px ;padding:10px 20px;border:1px solid #f2f2f2;background:#f9f9f9}
|
.local_desc01 {margin:10px 0 10px ;padding:10px 20px;border:1px solid #f2f2f2;background:#f9f9f9}
|
||||||
.local_desc01 strong {color:#ff3061}
|
.local_desc01 strong {color:#ff3061}
|
||||||
.local_desc01 a {text-decoration:underline}
|
.local_desc01 a {text-decoration:underline;text-underline-offset:2px;}
|
||||||
|
|
||||||
.local_desc02 {margin:10px 0 ;min-width:960px} /* 주로 온라인 서식 관련 안내 내용에 사용 */
|
.local_desc02 {margin:10px 0 ;min-width:960px} /* 주로 온라인 서식 관련 안내 내용에 사용 */
|
||||||
.local_desc02 p {padding:0;line-height:1.8em}
|
.local_desc02 p {padding:0;line-height:1.8em}
|
||||||
@ -401,6 +483,7 @@ tfoot th {}
|
|||||||
.mb_leave_msg {color:#b6b6b6}
|
.mb_leave_msg {color:#b6b6b6}
|
||||||
.mb_intercept_msg {color:#ff0000}
|
.mb_intercept_msg {color:#ff0000}
|
||||||
#point_mng {margin-top:50px}
|
#point_mng {margin-top:50px}
|
||||||
|
.ad_agree_log {max-height: 150px !important;}
|
||||||
|
|
||||||
/* 게시판추가/수정 */
|
/* 게시판추가/수정 */
|
||||||
#anc_bo_extra .td_grpset label {width:auto}
|
#anc_bo_extra .td_grpset label {width:auto}
|
||||||
@ -504,6 +587,7 @@ td.td_grpset {width:160px;border-left:1px solid #e9ecee;text-align:center}
|
|||||||
.td_time{text-align:center;width:130px}
|
.td_time{text-align:center;width:130px}
|
||||||
.td_center{text-align:center;}
|
.td_center{text-align:center;}
|
||||||
.td_type{width:120px}
|
.td_type{width:120px}
|
||||||
|
.td_consent{width:200px}
|
||||||
|
|
||||||
.td_mng_s{width:60px}
|
.td_mng_s{width:60px}
|
||||||
.td_mng_m{width:100px}
|
.td_mng_m{width:100px}
|
||||||
@ -656,14 +740,15 @@ a.nicepay_btn{display:inline-block;margin:5px 0 0;padding:5px 10px;background:#0
|
|||||||
|
|
||||||
ul.de_pg_tab{margin:0;padding:0;zoom:1}
|
ul.de_pg_tab{margin:0;padding:0;zoom:1}
|
||||||
ul.de_pg_tab:after{display:block;visibility:hidden;clear:both;content:"";}
|
ul.de_pg_tab:after{display:block;visibility:hidden;clear:both;content:"";}
|
||||||
ul.de_pg_tab li{position:relative;display:inline-block;float:left;text-align:center;margin:0;padding:0;width:120px}
|
ul.de_pg_tab li{position:relative;display:inline-block;float:left;text-align:center;margin:0;padding:0;min-width:130px}
|
||||||
ul.de_pg_tab li a{margin:0 2px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:2.5;background-color:#f7f7f7;color:#74777b;font-weight:bold;font-size:1.2em;text-decoration:none}
|
ul.de_pg_tab li a{margin:0 2px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:2.5;background-color:#f7f7f7;color:#74777b;font-weight:bold;font-size:1.2em;text-decoration:none; padding:0px 10px;}
|
||||||
ul.de_pg_tab li a:hover{text-decoration:none}
|
ul.de_pg_tab li a:hover{text-decoration:none}
|
||||||
ul.de_pg_tab li.tab-current a{background:#2CC185;color:#fff}
|
ul.de_pg_tab li.tab-current a{background:#2CC185;color:#fff}
|
||||||
|
|
||||||
.pg_info_fld{position:relative}
|
.pg_info_fld{position:relative}
|
||||||
.kcp_info_fld th{background-color:#F6FCFF}
|
.kcp_info_fld th{background-color:#F6FCFF}
|
||||||
.lg_info_fld th{background-color:#FFF4FA}
|
.lg_info_fld th{background-color:#FFF4FA}
|
||||||
|
.lg_info_fld_v2 th{background-color:#ffe8f5}
|
||||||
.inicis_info_fld th{background-color:#F6F1FF}
|
.inicis_info_fld th{background-color:#F6F1FF}
|
||||||
.kakao_info_fld th{background-color:#FFFCED}
|
.kakao_info_fld th{background-color:#FFFCED}
|
||||||
.naver_info_fld th{background-color:#F3FFF3}
|
.naver_info_fld th{background-color:#F3FFF3}
|
||||||
@ -879,6 +964,20 @@ strong.sodr_nonpay {display:block;padding:5px 0;text-align:right}
|
|||||||
.sbn_img {text-align:center}
|
.sbn_img {text-align:center}
|
||||||
.sbn_image {display:none;margin:0 0 10px;text-align:left}
|
.sbn_image {display:none;margin:0 0 10px;text-align:left}
|
||||||
|
|
||||||
|
/* SMS문자전송 */
|
||||||
|
#sms_send {padding-bottom:100px;zoom:1}
|
||||||
|
#sms_send:after {display:block;visibility:hidden;clear:both;content:""}
|
||||||
|
|
||||||
|
#sms_frm {float:left;width:650px}
|
||||||
|
#sms_frm table {margin:0 0 30px}
|
||||||
|
#sms_frm textarea {height:70px}
|
||||||
|
|
||||||
|
#sms_sm {position:relative;float:left;width:229px;height:418px;background:url('../shop_admin/img/mobilebg.jpg') no-repeat}
|
||||||
|
#sms_sm_text {position:absolute;top:75px;left:27px;width:180px;color:#fff;font-size:2em;word-break:break-all}
|
||||||
|
#sms_sm p {position:absolute;bottom:-70px;left:0;font-size:0.95em;letter-spacing:-0.1em}
|
||||||
|
|
||||||
|
#sms_send .local_desc01 {min-width:320px}
|
||||||
|
|
||||||
/* 가격비교사이트 */
|
/* 가격비교사이트 */
|
||||||
#anc_pricecompare_info li {margin:5px 0 5px -1px}
|
#anc_pricecompare_info li {margin:5px 0 5px -1px}
|
||||||
|
|
||||||
|
|||||||
@ -269,6 +269,54 @@ while ($row = sql_fetch_array($result)){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SMS5 테이블 G5_TABLE_PREFIX 적용
|
||||||
|
if($g5['sms5_prefix'] != 'sms5_' && sql_num_rows(sql_query("show tables like 'sms5_config'")))
|
||||||
|
{
|
||||||
|
$tables = array('config','write','history','book','book_group','form','form_group');
|
||||||
|
|
||||||
|
foreach($tables as $name){
|
||||||
|
$old_table = 'sms5_' . $name;
|
||||||
|
$new_table = $g5['sms5_prefix'] . $name;
|
||||||
|
|
||||||
|
// 기존 테이블이 있고, G5_TABLE_PREFIX 적용 테이블이 없을 경우 → 테이블명 변경
|
||||||
|
if(sql_num_rows(sql_query("SHOW TABLES LIKE '{$old_table}' "))){
|
||||||
|
if(!sql_num_rows(sql_query("SHOW TABLES LIKE '{$new_table}' "))){
|
||||||
|
sql_query("RENAME TABLE {$old_table} TO {$new_table}", false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$is_check = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 광고성 정보 수신 동의 사용 필드 추가
|
||||||
|
if (!isset($config['cf_use_promotion'])) {
|
||||||
|
sql_query(
|
||||||
|
" ALTER TABLE `{$g5['config_table']}`
|
||||||
|
ADD `cf_use_promotion` tinyint(1) NOT NULL DEFAULT '0' AFTER `cf_privacy` ",
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
$is_check = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 광고성 정보 수신 동의 여부 필드 추가 + 메일 / SMS 수신 일자 추가
|
||||||
|
if (!isset($member['mb_marketing_agree'])) {
|
||||||
|
sql_query(
|
||||||
|
" ALTER TABLE `{$g5['member_table']}`
|
||||||
|
ADD `mb_marketing_agree` tinyint(1) NOT NULL DEFAULT '0' AFTER `mb_scrap_cnt`,
|
||||||
|
ADD `mb_marketing_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `mb_marketing_agree`,
|
||||||
|
ADD `mb_thirdparty_agree` tinyint(1) NOT NULL DEFAULT '0' AFTER `mb_marketing_date`,
|
||||||
|
ADD `mb_thirdparty_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `mb_thirdparty_agree`,
|
||||||
|
ADD `mb_agree_log` TEXT NOT NULL AFTER `mb_thirdparty_date`,
|
||||||
|
ADD `mb_mailling_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `mb_mailling`,
|
||||||
|
ADD `mb_sms_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `mb_sms` ",
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
$is_check = true;
|
||||||
|
}
|
||||||
|
|
||||||
$is_check = run_replace('admin_dbupgrade', $is_check);
|
$is_check = run_replace('admin_dbupgrade', $is_check);
|
||||||
|
|
||||||
$db_upgrade_msg = $is_check ? 'DB 업그레이드가 완료되었습니다.' : '더 이상 업그레이드 할 내용이 없습니다.<br>현재 DB 업그레이드가 완료된 상태입니다.';
|
$db_upgrade_msg = $is_check ? 'DB 업그레이드가 완료되었습니다.' : '더 이상 업그레이드 할 내용이 없습니다.<br>현재 DB 업그레이드가 완료된 상태입니다.';
|
||||||
|
|||||||
@ -13,7 +13,7 @@ $where = array();
|
|||||||
// 퍼스트가든용
|
// 퍼스트가든용
|
||||||
// $od_status = '입금'; //입금처리 된것만 출력한다.
|
// $od_status = '입금'; //입금처리 된것만 출력한다.
|
||||||
// 특정 카테고리만 노출
|
// 특정 카테고리만 노출
|
||||||
$ca_id = "10"; // 특정 카테고리 선택
|
$ca_id = "20"; // 특정 카테고리 선택
|
||||||
$sel_ca_id = " NOT ca_id = $ca_id "; // 특정 카테고리 노출만 하려면 NOT을 지운다.
|
$sel_ca_id = " NOT ca_id = $ca_id "; // 특정 카테고리 노출만 하려면 NOT을 지운다.
|
||||||
$where[] = "$sel_ca_id"; // 배열에 검색문을 넣어준다
|
$where[] = "$sel_ca_id"; // 배열에 검색문을 넣어준다
|
||||||
$tot_ct_qty = 0;
|
$tot_ct_qty = 0;
|
||||||
@ -23,7 +23,7 @@ $fr_date = "2024-04-01";
|
|||||||
$to_date = "2024-04-30";
|
$to_date = "2024-04-30";
|
||||||
// 퍼스트가든용 끝
|
// 퍼스트가든용 끝
|
||||||
|
|
||||||
include_once ('orderlist.head.php');
|
include_once ('orderlist_head.php');
|
||||||
|
|
||||||
$sql_search = "";
|
$sql_search = "";
|
||||||
if ($search != "") {
|
if ($search != "") {
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '998413';
|
$sub_menu = '998413';
|
||||||
|
|
||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
|
|
||||||
//auth_check($auth[$sub_menu], "r");
|
auth_check($auth[$sub_menu], "r");
|
||||||
|
|
||||||
$g5['title'] = '월간 주문내역 합계';
|
$g5['title'] = '월간 주문내역 합계';
|
||||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||||
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
|
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
|
||||||
@ -13,14 +13,33 @@ $where = array();
|
|||||||
// 퍼스트가든용
|
// 퍼스트가든용
|
||||||
// $od_status = '입금'; //입금처리 된것만 출력한다.
|
// $od_status = '입금'; //입금처리 된것만 출력한다.
|
||||||
// 특정 카테고리만 노출
|
// 특정 카테고리만 노출
|
||||||
$ca_id = "10"; // 특정 카테고리 선택
|
#$ca_id = "30"; // 특정 카테고리 선택
|
||||||
$sel_ca_id = " NOT ca_id = $ca_id "; // 특정 카테고리 노출만 하려면 NOT을 지운다.
|
#$sel_ca_id = " NOT ca_id = $ca_id "; // 특정 카테고리 노출만 하려면 NOT을 지운다.
|
||||||
$where[] = "$sel_ca_id"; // 배열에 검색문을 넣어준다
|
|
||||||
$tot_ct_qty = 0;
|
$tot_ct_qty = 0;
|
||||||
|
|
||||||
|
// 기존: $where[] = "$sel_ca_id"; // 배열에 검색문을 넣어준다
|
||||||
|
// 변경: sel_ca_id가 비어있지 않을 때만 WHERE조건에 추가
|
||||||
|
if (!empty($sel_ca_id)) {
|
||||||
|
$where[] = $sel_ca_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
//$od_status = '입금'; //입금처리 된것만 출력한다.
|
||||||
|
//$where[] = " a.od_status = '{$od_status}' ";
|
||||||
|
|
||||||
|
// 시작일이 설정되지 않았다면: 지난달 1일
|
||||||
|
if (!isset($fr_date)) {
|
||||||
|
$fr_date = date("Y-m-01", strtotime("first day of last month", G5_SERVER_TIME));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 종료일이 설정되지 않았다면: 지난달 마지막 날
|
||||||
|
if (!isset($to_date)) {
|
||||||
|
$to_date = date("Y-m-t", strtotime("last month", G5_SERVER_TIME));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 퍼스트가든용 끝
|
// 퍼스트가든용 끝
|
||||||
|
|
||||||
include_once (G5_ADMIN_PATH.'/fg_admin/orderlist.head.php');
|
include_once ('orderlist_head.php');
|
||||||
|
|
||||||
$sql_search = "";
|
$sql_search = "";
|
||||||
if ($search != "") {
|
if ($search != "") {
|
||||||
@ -35,8 +54,8 @@ if ($search != "") {
|
|||||||
|
|
||||||
// od_status가 입금, 완료인 것만 출력함
|
// od_status가 입금, 완료인 것만 출력함
|
||||||
|
|
||||||
$where[] = " a.od_status IN('완료') ";
|
$where[] = " a.od_status IN('입금','완료') ";
|
||||||
|
/*
|
||||||
if ($od_settle_case) {
|
if ($od_settle_case) {
|
||||||
$where[] = " a.od_settle_case = '$od_settle_case' ";
|
$where[] = " a.od_settle_case = '$od_settle_case' ";
|
||||||
}
|
}
|
||||||
@ -64,7 +83,7 @@ if ($od_coupon) {
|
|||||||
if ($od_escrow) {
|
if ($od_escrow) {
|
||||||
$where[] = " a.od_escrow = 1 ";
|
$where[] = " a.od_escrow = 1 ";
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if ($fr_date && $to_date) {
|
if ($fr_date && $to_date) {
|
||||||
$where[] = " a.od_time between '$fr_date 00:00:00' AND '$to_date 23:59:59' ";
|
$where[] = " a.od_time between '$fr_date 00:00:00' AND '$to_date 23:59:59' ";
|
||||||
}
|
}
|
||||||
@ -86,16 +105,17 @@ $sql_common = " FROM {$g5['g5_shop_order_table']} AS a
|
|||||||
|
|
||||||
$sql_common .= $sql_search;
|
$sql_common .= $sql_search;
|
||||||
|
|
||||||
$sql = " SELECT count(a.od_id) AS cnt " . $sql_common ;
|
// 기존: 페이징용 count 쿼리 및 LIMIT 처리로 인해 일부 결과만 집계되는 문제가 있어 전체 결과 조회로 변경
|
||||||
$row = sql_fetch($sql);
|
// $sql = " SELECT count(a.od_id) AS cnt " . $sql_common ;
|
||||||
$total_count = $row['cnt'];
|
// $row = sql_fetch($sql);
|
||||||
|
// $total_count = $row['cnt'];
|
||||||
|
|
||||||
$rows = 100;
|
// $rows = 100; // 페이지 당 출력 개수
|
||||||
if( !isset($rows) ) $rows = $config['cf_page_rows'];
|
// if( !isset($rows) ) $rows = $config['cf_page_rows'];
|
||||||
|
|
||||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
// $total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||||
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
// if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
// $from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||||
|
|
||||||
// 상품명, 수량, 단가, 카테고리를 가져옴
|
// 상품명, 수량, 단가, 카테고리를 가져옴
|
||||||
$sql = " SELECT a.od_id,
|
$sql = " SELECT a.od_id,
|
||||||
@ -109,22 +129,26 @@ $sql = " SELECT a.od_id,
|
|||||||
c.it_2,
|
c.it_2,
|
||||||
d.io_price
|
d.io_price
|
||||||
$sql_common
|
$sql_common
|
||||||
ORDER BY $sort1 $sort2
|
ORDER BY $sort1 $sort2 ";
|
||||||
LIMIT $from_record, $rows ";
|
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
|
|
||||||
$qstr1 = "od_status=".urlencode($od_status)."&
|
// qstr 생성부가 불완전하게 작성되어 있어 안전하게 재작성
|
||||||
od_settle_case=".urlencode($od_settle_case)."&
|
$qarr = array(
|
||||||
od_misu=$od_misu&
|
'od_status' => $od_status,
|
||||||
;od_cancel_price=$od_cancel_price&
|
'od_settle_case' => $od_settle_case,
|
||||||
od_refund_price=$od_refund_price&
|
'od_misu' => $od_misu,
|
||||||
od_receipt_point=$od_receipt_point&
|
'od_cancel_price' => $od_cancel_price,
|
||||||
od_coupon=$od_coupon&
|
'od_refund_price' => $od_refund_price,
|
||||||
fr_date=$fr_date&
|
'od_receipt_point' => $od_receipt_point,
|
||||||
to_date=$to_date&
|
'od_coupon' => $od_coupon,
|
||||||
sel_field=$sel_field&
|
'fr_date' => $fr_date,
|
||||||
search=$search&
|
'to_date' => $to_date,
|
||||||
save_search=$search";
|
'sel_field' => $sel_field,
|
||||||
|
'search' => $search,
|
||||||
|
'save_search' => $search
|
||||||
|
);
|
||||||
|
// http_build_query로 생성 후 HTML용으로 & -> & 변환
|
||||||
|
$qstr1 = str_replace('&', '&', http_build_query($qarr));
|
||||||
|
|
||||||
if($default['de_escrow_use'])
|
if($default['de_escrow_use'])
|
||||||
$qstr1 .= "&od_escrow=$od_escrow";
|
$qstr1 .= "&od_escrow=$od_escrow";
|
||||||
@ -135,6 +159,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<!--
|
||||||
<form name="frmorderlist" class="local_sch01 local_sch">
|
<form name="frmorderlist" class="local_sch01 local_sch">
|
||||||
<input type="hidden" name="doc" value="<?php echo $doc; ?>">
|
<input type="hidden" name="doc" value="<?php echo $doc; ?>">
|
||||||
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
|
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
|
||||||
@ -153,8 +178,9 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
|||||||
<input type="text" name="search" value="<?php echo $search; ?>" id="search" required class="required frm_input" autocomplete="off">
|
<input type="text" name="search" value="<?php echo $search; ?>" id="search" required class="required frm_input" autocomplete="off">
|
||||||
<input type="submit" value="검색" class="btn_submit">
|
<input type="submit" value="검색" class="btn_submit">
|
||||||
</form>
|
</form>
|
||||||
|
-->
|
||||||
<form class="local_sch03 local_sch">
|
<form class="local_sch03 local_sch">
|
||||||
<div class="sch_last"">
|
<div class="sch_last">
|
||||||
<strong>주문일자</strong>
|
<strong>주문일자</strong>
|
||||||
<input type="text" id="fr_date" name="fr_date" value="<?php echo $fr_date; ?>" class="frm_input" size="10" maxlength="10"> ~
|
<input type="text" id="fr_date" name="fr_date" value="<?php echo $fr_date; ?>" class="frm_input" size="10" maxlength="10"> ~
|
||||||
<input type="text" id="to_date" name="to_date" value="<?php echo $to_date; ?>" class="frm_input" size="10" maxlength="10">
|
<input type="text" id="to_date" name="to_date" value="<?php echo $to_date; ?>" class="frm_input" size="10" maxlength="10">
|
||||||
@ -209,7 +235,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
|||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $item_name; ?></td>
|
<td><?php echo $item_name; ?></td>
|
||||||
<td><?php echo $option; ?></td>
|
<td><?php echo $option; ?></td>
|
||||||
<td class="td_num"><?php echo number_format($totals['total_price'] / $totals['quantity']); ?></td>
|
<td class="td_num"><?php echo number_format( $totals['quantity'] ? ($totals['total_price'] / $totals['quantity']) : 0 ); ?></td>
|
||||||
<td class="th_odrcnt"><?php echo number_format($totals['quantity']); ?></td>
|
<td class="th_odrcnt"><?php echo number_format($totals['quantity']); ?></td>
|
||||||
<td class="td_num td_numsum"><?php echo number_format($totals['total_price']); ?></td>
|
<td class="td_num td_numsum"><?php echo number_format($totals['total_price']); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -222,6 +248,6 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
|||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include_once (G5_ADMIN_PATH.'/fg_admin/orderlist.tail.php');
|
include_once ('orderlist_tail.php');
|
||||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -19,7 +19,7 @@ $where[] = "$sel_ca_id"; // 배열에 검색문을 넣어준다
|
|||||||
$tot_ct_qty = 0;
|
$tot_ct_qty = 0;
|
||||||
// 퍼스트가든용 끝
|
// 퍼스트가든용 끝
|
||||||
|
|
||||||
include_once (G5_ADMIN_PATH.'/fg_admin/orderlist.head.php');
|
include_once ('orderlist_head.php');
|
||||||
|
|
||||||
$sql_search = "";
|
$sql_search = "";
|
||||||
if ($search != "") {
|
if ($search != "") {
|
||||||
|
|||||||
@ -20,7 +20,7 @@ $od_status = '완료'; //입금처리 된것만 출력한다.
|
|||||||
$where[] = " a.od_status = '{$od_status}' ";
|
$where[] = " a.od_status = '{$od_status}' ";
|
||||||
// 퍼스트가든용 끝
|
// 퍼스트가든용 끝
|
||||||
|
|
||||||
include_once (G5_ADMIN_PATH.'/fg_admin/orderlist.head.php');
|
include_once ('orderlist_head.php');
|
||||||
|
|
||||||
$sql_search = "";
|
$sql_search = "";
|
||||||
if ($search != "") {
|
if ($search != "") {
|
||||||
|
|||||||
@ -19,7 +19,7 @@ $where[] = "$sel_ca_id"; // 배열에 검색문을 넣어준다
|
|||||||
$tot_ct_qty = 0;
|
$tot_ct_qty = 0;
|
||||||
// 퍼스트가든용 끝
|
// 퍼스트가든용 끝
|
||||||
|
|
||||||
include_once (G5_ADMIN_PATH.'/fg_admin/orderlist.head.php');
|
include_once ('orderlist_head.php');
|
||||||
|
|
||||||
$sql_search = "";
|
$sql_search = "";
|
||||||
if ($search != "") {
|
if ($search != "") {
|
||||||
|
|||||||
158
adm/fg_admin/orderlist_tail.php
Normal file
158
adm/fg_admin/orderlist_tail.php
Normal file
@ -0,0 +1,158 @@
|
|||||||
|
<script>
|
||||||
|
$(function(){
|
||||||
|
$("#fr_date, #to_date").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd", showButtonPanel: true, yearRange: "c-99:c+99", maxDate: "+0d" });
|
||||||
|
|
||||||
|
// 주문상품보기
|
||||||
|
$(".orderitem").on("click", function() {
|
||||||
|
var $this = $(this);
|
||||||
|
var od_id = $this.text().replace(/[^0-9]/g, "");
|
||||||
|
|
||||||
|
if($this.next("#orderitemlist").size())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
$("#orderitemlist").remove();
|
||||||
|
|
||||||
|
$.post(
|
||||||
|
"./ajax.orderitem.php",
|
||||||
|
{ od_id: od_id },
|
||||||
|
function(data) {
|
||||||
|
$this.after("<div id=\"orderitemlist\"><div class=\"itemlist\"></div></div>");
|
||||||
|
$("#orderitemlist .itemlist")
|
||||||
|
.html(data)
|
||||||
|
.append("<div id=\"orderitemlist_close\"><button type=\"button\" id=\"orderitemlist-x\" class=\"btn_frmline\">닫기</button></div>");
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
// 상품리스트 닫기
|
||||||
|
$(".orderitemlist-x").on("click", function() {
|
||||||
|
$("#orderitemlist").remove();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("body").on("click", function() {
|
||||||
|
$("#orderitemlist").remove();
|
||||||
|
});
|
||||||
|
|
||||||
|
// 엑셀배송처리창
|
||||||
|
$("#order_delivery").on("click", function() {
|
||||||
|
var opt = "width=600,height=450,left=10,top=10";
|
||||||
|
window.open(this.href, "win_excel", opt);
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function set_date(today)
|
||||||
|
{
|
||||||
|
<?php
|
||||||
|
$date_term = date('w', G5_SERVER_TIME);
|
||||||
|
$week_term = $date_term + 7;
|
||||||
|
$last_term = strtotime(date('Y-m-01', G5_SERVER_TIME));
|
||||||
|
?>
|
||||||
|
if (today == "오늘") {
|
||||||
|
document.getElementById("fr_date").value = "<?php echo G5_TIME_YMD; ?>";
|
||||||
|
document.getElementById("to_date").value = "<?php echo G5_TIME_YMD; ?>";
|
||||||
|
} else if (today == "어제") {
|
||||||
|
document.getElementById("fr_date").value = "<?php echo date('Y-m-d', G5_SERVER_TIME - 86400); ?>";
|
||||||
|
document.getElementById("to_date").value = "<?php echo date('Y-m-d', G5_SERVER_TIME - 86400); ?>";
|
||||||
|
} else if (today == "이번주") {
|
||||||
|
document.getElementById("fr_date").value = "<?php echo date('Y-m-d', strtotime('-'.$date_term.' days', G5_SERVER_TIME)); ?>";
|
||||||
|
document.getElementById("to_date").value = "<?php echo date('Y-m-d', G5_SERVER_TIME); ?>";
|
||||||
|
} else if (today == "이번달") {
|
||||||
|
document.getElementById("fr_date").value = "<?php echo date('Y-m-01', G5_SERVER_TIME); ?>";
|
||||||
|
document.getElementById("to_date").value = "<?php echo date('Y-m-d', G5_SERVER_TIME); ?>";
|
||||||
|
} else if (today == "지난주") {
|
||||||
|
document.getElementById("fr_date").value = "<?php echo date('Y-m-d', strtotime('-'.$week_term.' days', G5_SERVER_TIME)); ?>";
|
||||||
|
document.getElementById("to_date").value = "<?php echo date('Y-m-d', strtotime('-'.($week_term - 6).' days', G5_SERVER_TIME)); ?>";
|
||||||
|
} else if (today == "지난달") {
|
||||||
|
document.getElementById("fr_date").value = "<?php echo date('Y-m-01', strtotime('-1 Month', $last_term)); ?>";
|
||||||
|
document.getElementById("to_date").value = "<?php echo date('Y-m-t', strtotime('-1 Month', $last_term)); ?>";
|
||||||
|
} else if (today == "전체") {
|
||||||
|
document.getElementById("fr_date").value = "";
|
||||||
|
document.getElementById("to_date").value = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function forderlist_submit(f)
|
||||||
|
{
|
||||||
|
if (!is_checked("chk[]")) {
|
||||||
|
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var change_status = f.od_status.value;
|
||||||
|
|
||||||
|
if (f.od_status.checked == false) {
|
||||||
|
alert("주문상태 변경에 체크하세요.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var chk = document.getElementsByName("chk[]");
|
||||||
|
|
||||||
|
for (var i=0; i<chk.length; i++)
|
||||||
|
{
|
||||||
|
if (chk[i].checked)
|
||||||
|
{
|
||||||
|
var k = chk[i].value;
|
||||||
|
var current_settle_case = f.elements['current_settle_case['+k+']'].value;
|
||||||
|
var current_status = f.elements['current_status['+k+']'].value;
|
||||||
|
|
||||||
|
switch (change_status)
|
||||||
|
{
|
||||||
|
case "입금" :
|
||||||
|
if (!(current_status == "주문" && current_settle_case == "무통장")) {
|
||||||
|
alert("'주문' 상태의 '무통장'(결제수단)인 경우에만 '입금' 처리 가능합니다.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "준비" :
|
||||||
|
if (current_status != "입금") {
|
||||||
|
alert("'입금' 상태의 주문만 '준비'로 변경이 가능합니다.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "배송" :
|
||||||
|
if (current_status != "준비") {
|
||||||
|
alert("'준비' 상태의 주문만 '배송'으로 변경이 가능합니다.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var invoice = f.elements['od_invoice['+k+']'];
|
||||||
|
var invoice_time = f.elements['od_invoice_time['+k+']'];
|
||||||
|
var delivery_company = f.elements['od_delivery_company['+k+']'];
|
||||||
|
|
||||||
|
if ($.trim(invoice_time.value) == '') {
|
||||||
|
alert("배송일시를 입력하시기 바랍니다.");
|
||||||
|
invoice_time.focus();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($.trim(delivery_company.value) == '') {
|
||||||
|
alert("배송업체를 입력하시기 바랍니다.");
|
||||||
|
delivery_company.focus();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($.trim(invoice.value) == '') {
|
||||||
|
alert("운송장번호를 입력하시기 바랍니다.");
|
||||||
|
invoice.focus();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!confirm("선택하신 주문서의 주문상태를 '"+change_status+"'상태로 변경하시겠습니까?"))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
f.action = "./orderlistupdate_ticket.php";
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@ -5,7 +5,6 @@ include_once('./_common.php');
|
|||||||
auth_check($auth[$sub_menu], "r");
|
auth_check($auth[$sub_menu], "r");
|
||||||
|
|
||||||
$g5['title'] = '매표소 주문확인';
|
$g5['title'] = '매표소 주문확인';
|
||||||
|
|
||||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||||
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
|
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
|
||||||
|
|
||||||
@ -13,15 +12,15 @@ $where = array();
|
|||||||
|
|
||||||
// 퍼스트가든용
|
// 퍼스트가든용
|
||||||
// 특정 카테고리만 노출 제외를 위한 부분
|
// 특정 카테고리만 노출 제외를 위한 부분
|
||||||
$ca_id = "20"; // 특정 카테고리 선택
|
$ca_id = "30"; // 분류 선택
|
||||||
$sel_ca_id = "NOT ca_id = $ca_id "; // 특정 카테고리 노출만 하려면 NOT을 지운다. 카테고리는 '분류관리'에서 확인, 최상위 카테고리 기준. 값을 추가할땐 or 을 사용하면 될듯.
|
$sel_ca_id = "ca_id = $ca_id "; // 특정 카테고리 노출만 하려면 NOT을 지운다. 카테고리는 '분류관리'에서 확인, 최상위 카테고리 기준. 값을 추가할땐 or 을 사용하면 될듯.
|
||||||
$tot_ct_qty = 0;
|
$tot_ct_qty = 0;
|
||||||
$where[] = "$sel_ca_id"; // 배열에 검색문을 넣어준다
|
$where[] = "$sel_ca_id"; // 배열에 검색문을 넣어준다
|
||||||
$od_status = '입금'; //입금처리 된것만 출력한다.
|
$od_status = '입금'; //입금처리 된것만 출력한다.
|
||||||
$where[] = " a.od_status = '{$od_status}' ";
|
$where[] = " a.od_status = '{$od_status}' ";
|
||||||
// 퍼스트가든용 끝
|
// 퍼스트가든용 끝
|
||||||
|
|
||||||
include_once (G5_ADMIN_PATH.'/fg_admin/orderlist.head.php');
|
include_once ('orderlist_head.php');
|
||||||
|
|
||||||
$sql_search = "";
|
$sql_search = "";
|
||||||
if ($search != "") {
|
if ($search != "") {
|
||||||
@ -55,7 +54,8 @@ $sql = " SELECT count(a.od_id) AS cnt " . $sql_common ;
|
|||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
$total_count = $row['cnt'];
|
$total_count = $row['cnt'];
|
||||||
|
|
||||||
$rows = $config['cf_page_rows'];
|
$rows = 100; // 페이지 당 출력 개수
|
||||||
|
if( !isset($rows) ) $rows = $config['cf_page_rows'];
|
||||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||||
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||||
@ -117,7 +117,7 @@ if(!sql_query(" SELECT mb_id FROM {$g5['g5_shop_order_delete_table']} LIMIT 1 ",
|
|||||||
|
|
||||||
<label for="sel_field" class="sound_only">검색대상</label>
|
<label for="sel_field" class="sound_only">검색대상</label>
|
||||||
<select name="sel_field" id="sel_field">
|
<select name="sel_field" id="sel_field">
|
||||||
<option value="od_tel" <?php echo get_selected($sel_field, 'od_tel'); ?> selected>연락처</option>
|
<option value="od_hp" <?php echo get_selected($sel_field, 'od_hp'); ?> selected>연락처</option>
|
||||||
<option value="od_name" <?php echo get_selected($sel_field, 'od_name'); ?>>주문자</option>
|
<option value="od_name" <?php echo get_selected($sel_field, 'od_name'); ?>>주문자</option>
|
||||||
<option value="od_id" <?php echo get_selected($sel_field, 'od_id'); ?>>주문번호</option>
|
<option value="od_id" <?php echo get_selected($sel_field, 'od_id'); ?>>주문번호</option>
|
||||||
</select>
|
</select>
|
||||||
@ -177,9 +177,28 @@ if(!sql_query(" SELECT mb_id FROM {$g5['g5_shop_order_delete_table']} LIMIT 1 ",
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 크리스마스 수량 취합하기
|
||||||
|
$eve_id = "1764036560";
|
||||||
|
$xmas_id = "1764036885";
|
||||||
|
|
||||||
|
$xmas_eve_r = cntQuery($count_sql," WHERE a.od_status = '입금' AND b.it_id = '{$eve_id}' AND b.io_id = 'R일반'");
|
||||||
|
$xmas_eve_s = cntQuery($count_sql," WHERE a.od_status = '입금' AND b.it_id = '{$eve_id}' AND b.io_id = 'S일반'");
|
||||||
|
$xmas_eve_a = cntQuery($count_sql," WHERE a.od_status = '입금' AND b.it_id = '{$eve_id}' AND b.io_id = 'A일반'");
|
||||||
|
$xmas_eve_36 = cntQuery($count_sql," WHERE a.od_status = '입금' AND b.it_id = '{$eve_id}' AND (b.io_id = 'R36개월미만 OR b.io_id = S석36개월미만' OR b.io_id = 'A석36개월미만')");
|
||||||
|
$xmas_eve_total = $xmas_eve_r + $xmas_eve_s + $xmas_eve_a + $xmas_eve_36;
|
||||||
|
$xmas_n = cntQuery($count_sql," WHERE a.od_status = '입금' AND b.it_id = '{$xmas_id}' AND b.io_id = '대인'");
|
||||||
|
$xmas_s = cntQuery($count_sql," WHERE a.od_status = '입금' AND b.it_id = '{$xmas_id}' AND b.io_id = '소인'");
|
||||||
|
$xmas_36 = cntQuery($count_sql," WHERE a.od_status = '입금' AND b.it_id = '{$xmas_id}' AND b.io_id = '36개월미만'");
|
||||||
|
$xmas_total = $xmas_n + $xmas_s + $xmas_36;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="tbl_head01 tbl_wrap">
|
<div class="tbl_head01 tbl_wrap">
|
||||||
<h2>크리스마스주문내역 Total</h2>
|
<h2>크리스마스주문내역 Total</h2>
|
||||||
|
<p><b>전체 주문수량 : <?=$xmas_total+$xmas_eve_total?></b>
|
||||||
|
<div class="table_wrap" style="display: flex;flex-direction: row;justify-content: space-around;">
|
||||||
|
<div style="width: 49.5%">
|
||||||
|
<h3>크리스마스 이브</h3>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -188,62 +207,67 @@ if(!sql_query(" SELECT mb_id FROM {$g5['g5_shop_order_delete_table']} LIMIT 1 ",
|
|||||||
<th>A석</th>
|
<th>A석</th>
|
||||||
<th>유아</th>
|
<th>유아</th>
|
||||||
<th><b>계</b></th>
|
<th><b>계</b></th>
|
||||||
<th>대인</th>
|
|
||||||
<th>소인</th>
|
|
||||||
<th>유아</th>
|
|
||||||
<th><b>계</b></th>
|
|
||||||
<th><b>합계</b></th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<?php
|
|
||||||
$xmas_eve_r = cntQuery($count_sql,' WHERE a.od_status = "입금" AND b.it_name = "2024 크리스마스 이브 - 캔들라이트 콘서트" AND b.io_id = "R석일반"');
|
|
||||||
$xmas_eve_s = cntQuery($count_sql,' WHERE a.od_status = "입금" AND b.it_name = "2024 크리스마스 이브 - 캔들라이트 콘서트" AND b.io_id = "S석일반"');
|
|
||||||
$xmas_eve_a = cntQuery($count_sql,' WHERE a.od_status = "입금" AND b.it_name = "2024 크리스마스 이브 - 캔들라이트 콘서트" AND b.io_id = "A석일반"');
|
|
||||||
$xmas_eve_36 = cntQuery($count_sql,' WHERE a.od_status = "입금" AND b.it_name = "2024 크리스마스 이브 - 캔들라이트 콘서트" AND (b.io_id = "R석36개월미만 OR b.io_id = S석36개월미만" OR b.io_id = "A석36개월미만")');
|
|
||||||
$xmas_eve_total = $xmas_eve_r + $xmas_eve_s + $xmas_eve_a + $xmas_eve_36;
|
|
||||||
$xmas_n = cntQuery($count_sql,' WHERE a.od_status = "입금" AND b.it_name = "2024 크리스마스 - 스타일리쉬 매직쇼" AND b.io_id = "대인"');
|
|
||||||
$xmas_s = cntQuery($count_sql,' WHERE a.od_status = "입금" AND b.it_name = "2024 크리스마스 - 스타일리쉬 매직쇼" AND b.io_id = "소인"');
|
|
||||||
$xmas_36 = cntQuery($count_sql,' WHERE a.od_status = "입금" AND b.it_name = "2024 크리스마스 - 스타일리쉬 매직쇼" AND b.io_id = "36개월 미만"');
|
|
||||||
$xmas_total = $xmas_n + $xmas_s + $xmas_36;
|
|
||||||
?>
|
|
||||||
<td><?=$xmas_eve_r?></td>
|
<td><?=$xmas_eve_r?></td>
|
||||||
<td><?=$xmas_eve_s?></td>
|
<td><?=$xmas_eve_s?></td>
|
||||||
<td><?=$xmas_eve_a?></td>
|
<td><?=$xmas_eve_a?></td>
|
||||||
<td><?=$xmas_eve_36?></td>
|
<td><?=$xmas_eve_36?></td>
|
||||||
<td><b><?=$xmas_eve_total?></b></td>
|
<td><b><?=$xmas_eve_total?></b></td>
|
||||||
<td><?=$xmas_n?></td>
|
|
||||||
<td><?=$xmas_s?></td>
|
|
||||||
<td><?=$xmas_36?></td>
|
|
||||||
<td><b><?=$xmas_total?></b></td>
|
|
||||||
<td><b><?=$xmas_total+$xmas_eve_total?></b></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="width: 49.5%">
|
||||||
|
<h3>크리스마스</h3>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>대인</th>
|
||||||
|
<th>소인</th>
|
||||||
|
<th>유아</th>
|
||||||
|
<th><b>계</b></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td><?=$xmas_n?></td>
|
||||||
|
<td><?=$xmas_s?></td>
|
||||||
|
<td><?=$xmas_36?></td>
|
||||||
|
<td><b><?=$xmas_total?></b></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p>미사용 주문 수량에 대해서만 합산합니다. </p>
|
||||||
|
</div>
|
||||||
<!-- 크리스마스용 판매확인 끝 -->
|
<!-- 크리스마스용 판매확인 끝 -->
|
||||||
|
|
||||||
<form name="forderlist" id="forderlist" onsubmit="return forderlist_submit(this);" method="post" autocomplete="off">
|
<form name="forderlist" id="forderlist" onsubmit="return forderlist_submit(this);" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="search_od_status" value="<?php echo $od_status; ?>">
|
<input type="hidden" name="search_od_status" value="<?php echo $od_status; ?>">
|
||||||
|
|
||||||
|
|
||||||
<!-- 목록 시작 -->
|
<!-- 목록 시작 -->
|
||||||
|
|
||||||
<div class="tbl_head01 tbl_wrap">
|
<div class="tbl_head01 tbl_wrap">
|
||||||
<table id="sodr_list">
|
<table id="sodr_list">
|
||||||
<caption>주문 내역 목록</caption>
|
<caption>주문 내역 목록</caption>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<!-- 체크박스 제거
|
||||||
<th scope="col">
|
<th scope="col">
|
||||||
<label for="chkall" class="sound_only">주문 전체</label>
|
<label for="chkall" class="sound_only">주문 전체</label>
|
||||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||||
</th>
|
</th>
|
||||||
|
-->
|
||||||
<!-- <th scope="col" id="th_ordnum" style="width:200px;"><a href="<?php echo title_sort("od_id", 1)."&$qstr1"; ?>">주문번호</a></th>-->
|
<!-- <th scope="col" id="th_ordnum" style="width:200px;"><a href="<?php echo title_sort("od_id", 1)."&$qstr1"; ?>">주문번호</a></th>-->
|
||||||
<th scope="col" id="th_odrer">주문일</th>
|
<th scope="col" id="th_odrer">주문일</th>
|
||||||
<th scope="col" id="th_odrer" style="width:240px;">상품명</th>
|
|
||||||
<th scope="col" id="th_odrer">옵션</th>
|
|
||||||
<th scope="col" id="th_odrer">주문자</th>
|
<th scope="col" id="th_odrer">주문자</th>
|
||||||
<th scope="col" id="th_odrertel">주문자전화</th>
|
<th scope="col" id="th_odrertel">주문자전화</th>
|
||||||
|
<th scope="col" id="th_odrer" style="width:240px;">상품명</th>
|
||||||
|
<th scope="col" id="th_odrer">옵션</th>
|
||||||
<th scope="col" style="width:85px;">단가</th>
|
<th scope="col" style="width:85px;">단가</th>
|
||||||
<th scope="col" style="width:62px;">주문수량</th>
|
<th scope="col" style="width:62px;">주문수량</th>
|
||||||
<th scope="col" style="width:85px;">합계</th>
|
<th scope="col" style="width:85px;">합계</th>
|
||||||
@ -254,19 +278,21 @@ if(!sql_query(" SELECT mb_id FROM {$g5['g5_shop_order_delete_table']} LIMIT 1 ",
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
$chk_od_id == "false";
|
||||||
{
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
$mb_nick = get_sideview($row['mb_id'], get_text($row['od_name']), $row['od_email'], '');
|
$mb_nick = get_sideview($row['mb_id'], get_text($row['od_name']), $row['od_email'], '');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- 목록 내용 시작 -->
|
<!-- 목록 내용 시작 -->
|
||||||
<tr class="orderlist<?php echo ' '.$bg; ?>">
|
<tr class="orderlist<?php echo ' '.$bg; ?>">
|
||||||
|
<!-- 체크박스 제거
|
||||||
<td class="td_chk">
|
<td class="td_chk">
|
||||||
<input type="hidden" name="od_id[<?php echo $i ?>]" value="<?php echo $row['od_id'] ?>" id="od_id_<?php echo $i ?>">
|
<input type="hidden" name="od_id[<?php echo $i ?>]" value="<?php echo $row['od_id'] ?>" id="od_id_<?php echo $i ?>">
|
||||||
<label for="chk_<?php echo $i; ?>" class="sound_only">주문번호 <?php echo $row['od_id']; ?></label>
|
<label for="chk_<?php echo $i; ?>" class="sound_only">주문번호 <?php echo $row['od_id']; ?></label>
|
||||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||||
</td>
|
</td>
|
||||||
<!--
|
-->
|
||||||
|
<!-- 주문번호 표시안함
|
||||||
<td headers="th_ordnum" class="td_odrnum2">
|
<td headers="th_ordnum" class="td_odrnum2">
|
||||||
<?php if ($is_admin == 'super'){ ?>
|
<?php if ($is_admin == 'super'){ ?>
|
||||||
<a href="<?php echo G5_SHOP_URL; ?>/orderinquiryview.php?od_id=<?php echo $row['od_id']; ?>&uid=<?php echo $uid; ?>" class="orderitem"><?php echo $disp_od_id; ?></a>
|
<a href="<?php echo G5_SHOP_URL; ?>/orderinquiryview.php?od_id=<?php echo $row['od_id']; ?>&uid=<?php echo $uid; ?>" class="orderitem"><?php echo $disp_od_id; ?></a>
|
||||||
@ -275,11 +301,11 @@ if(!sql_query(" SELECT mb_id FROM {$g5['g5_shop_order_delete_table']} LIMIT 1 ",
|
|||||||
<?php echo $od_paytype; ?>
|
<?php echo $od_paytype; ?>
|
||||||
</td>
|
</td>
|
||||||
-->
|
-->
|
||||||
<td headers="th_ordnum" class="td_odrnum2"><?php echo substr($row['od_receipt_time'],0,10) ?></td>
|
<td headers="th_ordnum" class="td_odrnum2"><?php if ($row['od_id'] != $chk_od_id ) { echo substr($row['od_receipt_time'],0,10); }?></td>
|
||||||
<td headers="th_ordnum" class="td_odrnum2"><?php echo $row['it_name'] ?></td>
|
<td headers="th_odrer" class="td_name"><?php if ($row['od_id'] != $chk_od_id ) { echo $mb_nick; }?></td>
|
||||||
|
<td headers="th_odrertel" class="td_hp" style="text-align:center;"><?php if ($row['od_id'] != $chk_od_id ) { echo add_hyphen(get_text($row['od_hp'])); }?></td>
|
||||||
|
<td headers="th_ordnum" class="td_odrnum2"><?php if ($row['od_id'] != $chk_od_id ) { echo $row['it_name']; } ?></td>
|
||||||
<td heardrs="th_ordnum" class="td_odrnum2"><?php echo ($row['io_id']) ? $row['io_id'] : '' ?> </td>
|
<td heardrs="th_ordnum" class="td_odrnum2"><?php echo ($row['io_id']) ? $row['io_id'] : '' ?> </td>
|
||||||
<td headers="th_odrer" class="td_name"><?php echo $mb_nick; ?></td>
|
|
||||||
<td headers="th_odrertel" class="td_tel" style="text-align:center;"><?php echo add_hyphen(get_text($row['od_tel'])); ?></td>
|
|
||||||
<td headers="th_odrcnt"><?php echo ($row['io_price']) ? number_format($row['ct_price']+$row['io_price']) : number_format($row['ct_price']) ?></td>
|
<td headers="th_odrcnt"><?php echo ($row['io_price']) ? number_format($row['ct_price']+$row['io_price']) : number_format($row['ct_price']) ?></td>
|
||||||
<td headers="th_odrcnt"><?php echo $row['ct_qty']; ?></td>
|
<td headers="th_odrcnt"><?php echo $row['ct_qty']; ?></td>
|
||||||
<td class="td_num td_numsum">
|
<td class="td_num td_numsum">
|
||||||
@ -297,16 +323,20 @@ if(!sql_query(" SELECT mb_id FROM {$g5['g5_shop_order_delete_table']} LIMIT 1 ",
|
|||||||
echo "사용불가<br>(";
|
echo "사용불가<br>(";
|
||||||
if( $row['od_status'] == '취소' ) echo "취소)"; // 취소라면
|
if( $row['od_status'] == '취소' ) echo "취소)"; // 취소라면
|
||||||
else echo "유효일자:".$row['it_1'].")"; // 유효일자가 지났다면
|
else echo "유효일자:".$row['it_1'].")"; // 유효일자가 지났다면
|
||||||
|
} else if ($row['od_id'] === $chk_od_id) { // 동일 주문번호에는 출력하지 않음
|
||||||
} else { // 위 조건에 해당하지 않으면 사용처리 버튼 출력
|
} else { // 위 조건에 해당하지 않으면 사용처리 버튼 출력
|
||||||
?>
|
?>
|
||||||
<a href="orderliveupdate.php?bo=u&od_id=<?php echo $row['od_id']; ?>&st=<?php echo $row['od_status'];?>" class="mng_mod btn btn_04"><span class="sound_only"><?php echo $row['od_id']; ?></span>사용</a>
|
<a href="orderliveupdate.php?bo=u&od_id=<?php echo $row['od_id']; ?>&st=<?php echo $row['od_status'];?>" class="mng_mod btn btn_04"><span class="sound_only"><?php echo $row['od_id']; ?></span>사용</a>
|
||||||
<?php } //사용처리 버튼 끝 ?>
|
<?php } //사용처리 버튼 끝 ?>
|
||||||
</td>
|
</td>
|
||||||
<td class="td_mng td_mng_s">
|
<td class="td_mng td_mng_s">
|
||||||
|
<?php if ($row['od_id'] != $chk_od_id ) { ?>
|
||||||
<a href="./orderform.php?od_id=<?php echo $row['od_id']; ?>&<?php echo $qstr; ?>" class="mng_mod btn btn_02"><span class="sound_only"><?php echo $row['od_id']; ?> </span>보기</a>
|
<a href="./orderform.php?od_id=<?php echo $row['od_id']; ?>&<?php echo $qstr; ?>" class="mng_mod btn btn_02"><span class="sound_only"><?php echo $row['od_id']; ?> </span>보기</a>
|
||||||
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
|
// 합계 처리
|
||||||
$tot_itemcount += $row['od_cart_count'];
|
$tot_itemcount += $row['od_cart_count'];
|
||||||
$tot_orderprice += (($row['ct_price'] + $row['io_price']) * $row['ct_qty']);
|
$tot_orderprice += (($row['ct_price'] + $row['io_price']) * $row['ct_qty']);
|
||||||
// $tot_orderprice += ($row['od_cart_price'] + $row['od_send_cost'] + $row['od_send_cost2']);
|
// $tot_orderprice += ($row['od_cart_price'] + $row['od_send_cost'] + $row['od_send_cost2']);
|
||||||
@ -314,6 +344,9 @@ if(!sql_query(" SELECT mb_id FROM {$g5['g5_shop_order_delete_table']} LIMIT 1 ",
|
|||||||
$tot_receiptprice += $row['od_receipt_price'];
|
$tot_receiptprice += $row['od_receipt_price'];
|
||||||
$tot_couponprice += $row['couponprice'];
|
$tot_couponprice += $row['couponprice'];
|
||||||
$tot_ct_qty += $row['ct_qty'];
|
$tot_ct_qty += $row['ct_qty'];
|
||||||
|
|
||||||
|
// 주문번호 체크용
|
||||||
|
$chk_od_id = $row['od_id'];
|
||||||
}
|
}
|
||||||
sql_free_result($result);
|
sql_free_result($result);
|
||||||
if ($i == 0)
|
if ($i == 0)
|
||||||
@ -322,7 +355,7 @@ if(!sql_query(" SELECT mb_id FROM {$g5['g5_shop_order_delete_table']} LIMIT 1 ",
|
|||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr class="orderlist">
|
<tr class="orderlist">
|
||||||
<th scope="row" colspan="7">합 계</th>
|
<th scope="row" colspan="6">합 계</th>
|
||||||
<td><?php echo $tot_ct_qty //number_format($tot_itemcount); ?>건</td>
|
<td><?php echo $tot_ct_qty //number_format($tot_itemcount); ?>건</td>
|
||||||
<td><?php echo number_format($tot_orderprice); ?></td>
|
<td><?php echo number_format($tot_orderprice); ?></td>
|
||||||
<!-- <td><?php echo number_format($tot_receiptprice); ?></td>-->
|
<!-- <td><?php echo number_format($tot_receiptprice); ?></td>-->
|
||||||
@ -333,7 +366,7 @@ if(!sql_query(" SELECT mb_id FROM {$g5['g5_shop_order_delete_table']} LIMIT 1 ",
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="local_desc02 local_desc">
|
<div class="local_desc02 local_desc">
|
||||||
<p>
|
<p style="font-weight:bold;">
|
||||||
<사용>버튼을 클릭하면 티켓 사용처리가 완료됩니다. 부분사용, 부분취소가 불가능하므로 이용수량이 다른 경우 고객님께 꼭 확인해주시기 바랍니다.
|
<사용>버튼을 클릭하면 티켓 사용처리가 완료됩니다. 부분사용, 부분취소가 불가능하므로 이용수량이 다른 경우 고객님께 꼭 확인해주시기 바랍니다.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -343,5 +376,5 @@ if(!sql_query(" SELECT mb_id FROM {$g5['g5_shop_order_delete_table']} LIMIT 1 ",
|
|||||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&page="); ?>
|
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&page="); ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include_once (G5_ADMIN_PATH.'/fg_admin/orderlist.tail.php');
|
include_once ('orderlist_tail.php');
|
||||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||||
|
|||||||
@ -52,8 +52,11 @@ if ($w == '') {
|
|||||||
$sound_only = '<strong class="sound_only">필수</strong>';
|
$sound_only = '<strong class="sound_only">필수</strong>';
|
||||||
|
|
||||||
$mb['mb_mailling'] = 1;
|
$mb['mb_mailling'] = 1;
|
||||||
|
$mb['mb_sms'] = 1;
|
||||||
$mb['mb_open'] = 1;
|
$mb['mb_open'] = 1;
|
||||||
$mb['mb_level'] = $config['cf_register_level'];
|
$mb['mb_level'] = $config['cf_register_level'];
|
||||||
|
$mb['mb_marketing_agree'] = 0;
|
||||||
|
$mb['mb_thirdparty_agree'] = 0;
|
||||||
$html_title = '추가';
|
$html_title = '추가';
|
||||||
} elseif ($w == 'u') {
|
} elseif ($w == 'u') {
|
||||||
$mb = get_member($mb_id);
|
$mb = get_member($mb_id);
|
||||||
@ -139,6 +142,14 @@ $mb_sms_no = !$mb['mb_sms'] ? 'checked="checked"' : '';
|
|||||||
$mb_open_yes = $mb['mb_open'] ? 'checked="checked"' : '';
|
$mb_open_yes = $mb['mb_open'] ? 'checked="checked"' : '';
|
||||||
$mb_open_no = !$mb['mb_open'] ? 'checked="checked"' : '';
|
$mb_open_no = !$mb['mb_open'] ? 'checked="checked"' : '';
|
||||||
|
|
||||||
|
// 마케팅 목적의 개인정보 수집 및 이용
|
||||||
|
$mb_marketing_agree_yes = $mb['mb_marketing_agree'] ? 'checked="checked"' : '';
|
||||||
|
$mb_marketing_agree_no = !$mb['mb_marketing_agree'] ? 'checked="checked"' : '';
|
||||||
|
|
||||||
|
// 개인정보 제3자 제공 동의
|
||||||
|
$mb_thirdparty_agree_yes = $mb['mb_thirdparty_agree'] ? 'checked="checked"' : '';
|
||||||
|
$mb_thirdparty_agree_no = !$mb['mb_thirdparty_agree'] ? 'checked="checked"' : '';
|
||||||
|
|
||||||
if (isset($mb['mb_certify'])) {
|
if (isset($mb['mb_certify'])) {
|
||||||
// 날짜시간형이라면 drop 시킴
|
// 날짜시간형이라면 drop 시킴
|
||||||
if (preg_match("/-/", $mb['mb_certify'])) {
|
if (preg_match("/-/", $mb['mb_certify'])) {
|
||||||
@ -354,21 +365,64 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">메일 수신</th>
|
<th scope="row">광고성 이메일 수신</th>
|
||||||
<td>
|
<td>
|
||||||
<input type="radio" name="mb_mailling" value="1" id="mb_mailling_yes" <?php echo $mb_mailling_yes; ?>>
|
<input type="radio" name="mb_mailling" value="1" id="mb_mailling_yes" <?php echo $mb_mailling_yes; ?>>
|
||||||
<label for="mb_mailling_yes">예</label>
|
<label for="mb_mailling_yes">예</label>
|
||||||
<input type="radio" name="mb_mailling" value="0" id="mb_mailling_no" <?php echo $mb_mailling_no; ?>>
|
<input type="radio" name="mb_mailling" value="0" id="mb_mailling_no" <?php echo $mb_mailling_no; ?>>
|
||||||
<label for="mb_mailling_no">아니오</label>
|
<label for="mb_mailling_no">아니오</label>
|
||||||
|
|
||||||
|
<?php if($w == "u" && $mb['mb_mailling_date'] != "0000-00-00 00:00:00"){
|
||||||
|
echo $mb['mb_mailling'] == 1 ? "<br>(동의 일자: ".$mb['mb_mailling_date'].")" : '';
|
||||||
|
} ?>
|
||||||
</td>
|
</td>
|
||||||
<th scope="row"><label for="mb_sms_yes">SMS 수신</label></th>
|
<th scope="row"><label for="mb_sms_yes">광고성 SMS/카카오톡 수신</label></th>
|
||||||
<td>
|
<td>
|
||||||
<input type="radio" name="mb_sms" value="1" id="mb_sms_yes" <?php echo $mb_sms_yes; ?>>
|
<input type="radio" name="mb_sms" value="1" id="mb_sms_yes" <?php echo $mb_sms_yes; ?>>
|
||||||
<label for="mb_sms_yes">예</label>
|
<label for="mb_sms_yes">예</label>
|
||||||
<input type="radio" name="mb_sms" value="0" id="mb_sms_no" <?php echo $mb_sms_no; ?>>
|
<input type="radio" name="mb_sms" value="0" id="mb_sms_no" <?php echo $mb_sms_no; ?>>
|
||||||
<label for="mb_sms_no">아니오</label>
|
<label for="mb_sms_no">아니오</label>
|
||||||
|
<?php if($w == "u" && $mb['mb_sms_date'] != "0000-00-00 00:00:00"){
|
||||||
|
echo $mb['mb_sms'] == 1 ? "<br>(동의 일자: ".$mb['mb_sms_date'].")" : '';
|
||||||
|
} ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">마케팅 목적의<br>개인정보 수집 및 이용</th>
|
||||||
|
<td>
|
||||||
|
<input type="radio" name="mb_marketing_agree" value="1" id="mb_marketing_agree_yes" <?php echo $mb_marketing_agree_yes; ?>>
|
||||||
|
<label for="mb_marketing_agree_yes">예</label>
|
||||||
|
<input type="radio" name="mb_marketing_agree" value="0" id="mb_marketing_agree_no" <?php echo $mb_marketing_agree_no; ?>>
|
||||||
|
<label for="mb_marketing_agree_no">아니오</label>
|
||||||
|
|
||||||
|
<?php if($w == "u" && $mb['mb_marketing_date'] != "0000-00-00 00:00:00"){
|
||||||
|
echo $mb['mb_marketing_agree'] == 1 ? "<br>(동의 일자: ".$mb['mb_marketing_date'].")" : '';
|
||||||
|
} ?>
|
||||||
|
</td>
|
||||||
|
<th scope="row"><label for="mb_sms_yes">개인정보 제3자 제공</label></th>
|
||||||
|
<td>
|
||||||
|
<input type="radio" name="mb_thirdparty_agree" value="1" id="mb_thirdparty_agree_yes" <?php echo $mb_thirdparty_agree_yes; ?>>
|
||||||
|
<label for="mb_thirdparty_agree_yes">예</label>
|
||||||
|
<input type="radio" name="mb_thirdparty_agree" value="0" id="mb_thirdparty_agree_no" <?php echo $mb_thirdparty_agree_no; ?>>
|
||||||
|
<label for="mb_thirdparty_agree_no">아니오</label>
|
||||||
|
|
||||||
|
<?php if($w == "u" && $mb['mb_thirdparty_date'] != "0000-00-00 00:00:00"){
|
||||||
|
echo $mb['mb_thirdparty_agree'] == 1 ? "<br>(동의 일자: ".$mb['mb_thirdparty_date'].")" : '';
|
||||||
|
} ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php if($w == "u"){?>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">약관동의 변경내역</th>
|
||||||
|
<td colspan="3">
|
||||||
|
<section id="sodr_request_log_wrap" class="ad_agree_log">
|
||||||
|
<div>
|
||||||
|
<?php echo conv_content($mb['mb_agree_log'], 0); ?>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">정보 공개</th>
|
<th scope="row">정보 공개</th>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
@ -376,6 +430,9 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
<label for="mb_open_yes">예</label>
|
<label for="mb_open_yes">예</label>
|
||||||
<input type="radio" name="mb_open" value="0" id="mb_open_no" <?php echo $mb_open_no; ?>>
|
<input type="radio" name="mb_open" value="0" id="mb_open_no" <?php echo $mb_open_no; ?>>
|
||||||
<label for="mb_open_no">아니오</label>
|
<label for="mb_open_no">아니오</label>
|
||||||
|
<?php if($w == "u" && $mb['mb_open_date'] != "0000-00-00 00:00:00"){
|
||||||
|
echo $mb['mb_open'] == 1 ? "<br>(동의 일자: ".$mb['mb_open_date'].")" : '';
|
||||||
|
} ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@ -18,6 +18,10 @@ $mb_certify_case = isset($_POST['mb_certify_case']) ? preg_replace('/[^0-9a-z_]/
|
|||||||
$mb_certify = isset($_POST['mb_certify']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['mb_certify']) : '';
|
$mb_certify = isset($_POST['mb_certify']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['mb_certify']) : '';
|
||||||
$mb_zip = isset($_POST['mb_zip']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['mb_zip']) : '';
|
$mb_zip = isset($_POST['mb_zip']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['mb_zip']) : '';
|
||||||
|
|
||||||
|
// 광고성 정보 수신
|
||||||
|
$mb_marketing_agree = isset($_POST['mb_marketing_agree']) ? clean_xss_tags($_POST['mb_marketing_agree'], 1, 1) : '0';
|
||||||
|
$mb_thirdparty_agree = isset($_POST['mb_thirdparty_agree']) ? clean_xss_tags($_POST['mb_thirdparty_agree'], 1, 1) : '0';
|
||||||
|
|
||||||
// 관리자가 자동등록방지를 사용해야 할 경우 ( 회원의 비밀번호 변경시 캡챠를 체크한다 )
|
// 관리자가 자동등록방지를 사용해야 할 경우 ( 회원의 비밀번호 변경시 캡챠를 체크한다 )
|
||||||
if ($mb_password) {
|
if ($mb_password) {
|
||||||
include_once(G5_CAPTCHA_PATH . '/captcha.lib.php');
|
include_once(G5_CAPTCHA_PATH . '/captcha.lib.php');
|
||||||
@ -86,8 +90,6 @@ foreach ($check_keys as $key) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$mb_memo = isset($_POST['mb_memo']) ? $_POST['mb_memo'] : '';
|
|
||||||
|
|
||||||
$sql_common = " mb_name = '{$posts['mb_name']}',
|
$sql_common = " mb_name = '{$posts['mb_name']}',
|
||||||
mb_nick = '{$mb_nick}',
|
mb_nick = '{$mb_nick}',
|
||||||
mb_email = '{$mb_email}',
|
mb_email = '{$mb_email}',
|
||||||
@ -109,8 +111,11 @@ $sql_common = " mb_name = '{$posts['mb_name']}',
|
|||||||
mb_mailling = '{$posts['mb_mailling']}',
|
mb_mailling = '{$posts['mb_mailling']}',
|
||||||
mb_sms = '{$posts['mb_sms']}',
|
mb_sms = '{$posts['mb_sms']}',
|
||||||
mb_open = '{$posts['mb_open']}',
|
mb_open = '{$posts['mb_open']}',
|
||||||
|
mb_open_date = '".G5_TIME_YMDHIS."',
|
||||||
mb_profile = '{$posts['mb_profile']}',
|
mb_profile = '{$posts['mb_profile']}',
|
||||||
mb_level = '{$posts['mb_level']}',
|
mb_level = '{$posts['mb_level']}',
|
||||||
|
mb_marketing_agree = '{$mb_marketing_agree}',
|
||||||
|
mb_thirdparty_agree = '{$mb_thirdparty_agree}',
|
||||||
mb_1 = '{$posts['mb_1']}',
|
mb_1 = '{$posts['mb_1']}',
|
||||||
mb_2 = '{$posts['mb_2']}',
|
mb_2 = '{$posts['mb_2']}',
|
||||||
mb_3 = '{$posts['mb_3']}',
|
mb_3 = '{$posts['mb_3']}',
|
||||||
@ -142,6 +147,36 @@ if ($w == '') {
|
|||||||
alert('이미 존재하는 이메일입니다.\\nID : ' . $row['mb_id'] . '\\n이름 : ' . $row['mb_name'] . '\\n닉네임 : ' . $row['mb_nick'] . '\\n메일 : ' . $row['mb_email']);
|
alert('이미 존재하는 이메일입니다.\\nID : ' . $row['mb_id'] . '\\n이름 : ' . $row['mb_name'] . '\\n닉네임 : ' . $row['mb_nick'] . '\\n메일 : ' . $row['mb_email']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$agree_items = [];
|
||||||
|
// 마케팅 목적의 개인정보 수집 및 이용
|
||||||
|
if ($mb_marketing_agree == 1) {
|
||||||
|
$sql_common .= " , mb_marketing_date = '".G5_TIME_YMDHIS."' ";
|
||||||
|
$agree_items[] = "마케팅 목적의 개인정보 수집 및 이용(동의)";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 광고성 이메일 수신
|
||||||
|
if ($mb_mailling == 1) {
|
||||||
|
$sql_common .= " , mb_mailling_date = '".G5_TIME_YMDHIS."' ";
|
||||||
|
$agree_items[] = "광고성 이메일 수신(동의)";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 광고성 SMS/카카오톡 수신
|
||||||
|
if ($mb_sms == 1) {
|
||||||
|
$sql_common .= " , mb_sms_date = '".G5_TIME_YMDHIS."' ";
|
||||||
|
$agree_items[] = "광고성 SMS/카카오톡 수신(동의)";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 개인정보 제3자 제공
|
||||||
|
if ($mb_thirdparty_agree == 1) {
|
||||||
|
$sql_common .= " , mb_thirdparty_date = '".G5_TIME_YMDHIS."' ";
|
||||||
|
$agree_items[] = "개인정보 제3자 제공(동의)";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 동의 로그 추가
|
||||||
|
if (!empty($agree_items)) {
|
||||||
|
$agree_log = "[".G5_TIME_YMDHIS.", 관리자 회원추가] " . implode(' | ', $agree_items) . "\n";
|
||||||
|
$sql_common .= " , mb_agree_log = CONCAT('{$agree_log}', IFNULL(mb_agree_log, ''))";
|
||||||
|
}
|
||||||
sql_query(" insert into {$g5['member_table']} set mb_id = '{$mb_id}', mb_password = '" . get_encrypt_string($mb_password) . "', mb_datetime = '" . G5_TIME_YMDHIS . "', mb_ip = '{$_SERVER['REMOTE_ADDR']}', mb_email_certify = '" . G5_TIME_YMDHIS . "', {$sql_common} ");
|
sql_query(" insert into {$g5['member_table']} set mb_id = '{$mb_id}', mb_password = '" . get_encrypt_string($mb_password) . "', mb_datetime = '" . G5_TIME_YMDHIS . "', mb_ip = '{$_SERVER['REMOTE_ADDR']}', mb_email_certify = '" . G5_TIME_YMDHIS . "', {$sql_common} ");
|
||||||
} elseif ($w == 'u') {
|
} elseif ($w == 'u') {
|
||||||
$mb = get_member($mb_id);
|
$mb = get_member($mb_id);
|
||||||
@ -193,10 +228,54 @@ if ($w == '') {
|
|||||||
$sql_certify = "";
|
$sql_certify = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 현재 데이터 조회
|
||||||
|
$row = sql_fetch("select * from {$g5['member_table']} where mb_id = '{$mb_id}' ");
|
||||||
|
$agree_items = [];
|
||||||
|
|
||||||
|
// 마케팅 목적의 개인정보 수집 및 이용
|
||||||
|
$sql_marketing_date = "";
|
||||||
|
if ($row['mb_marketing_agree'] !== $mb_marketing_agree) {
|
||||||
|
$sql_marketing_date .= " , mb_marketing_date = '".G5_TIME_YMDHIS."' ";
|
||||||
|
$agree_items[] = "마케팅 목적의 개인정보 수집 및 이용(" . ($mb_marketing_agree == 1 ? "동의" : "철회") . ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 광고성 이메일 수신
|
||||||
|
$sql_mailling_date = "";
|
||||||
|
if ($row['mb_mailling'] !== $mb_mailling) {
|
||||||
|
$sql_mailling_date .= " , mb_mailling_date = '".G5_TIME_YMDHIS."' ";
|
||||||
|
$agree_items[] = "광고성 이메일 수신(" . ($mb_mailling == 1 ? "동의" : "철회") . ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 광고성 SMS/카카오톡 수신
|
||||||
|
$sql_sms_date = "";
|
||||||
|
if ($row['mb_sms'] !== $mb_sms) {
|
||||||
|
$sql_sms_date .= " , mb_sms_date = '".G5_TIME_YMDHIS."' ";
|
||||||
|
$agree_items[] = "광고성 SMS/카카오톡 수신(" . ($mb_sms == 1 ? "동의" : "철회") . ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 개인정보 제3자 제공
|
||||||
|
$sql_thirdparty_date = "";
|
||||||
|
if ($row['mb_thirdparty_agree'] !== $mb_thirdparty_agree) {
|
||||||
|
$sql_thirdparty_date .= " , mb_thirdparty_date = '".G5_TIME_YMDHIS."' ";
|
||||||
|
$agree_items[] = "개인정보 제3자 제공(" . ($mb_thirdparty_agree == 1 ? "동의" : "철회") . ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 동의 로그 추가
|
||||||
|
$sql_agree_log = "";
|
||||||
|
if (!empty($agree_items)) {
|
||||||
|
$agree_log = "[".G5_TIME_YMDHIS.", 관리자 회원수정] " . implode(' | ', $agree_items) . "\n";
|
||||||
|
$sql_agree_log .= " , mb_agree_log = CONCAT('{$agree_log}', IFNULL(mb_agree_log, ''))";
|
||||||
|
}
|
||||||
|
|
||||||
$sql = " update {$g5['member_table']}
|
$sql = " update {$g5['member_table']}
|
||||||
set {$sql_common}
|
set {$sql_common}
|
||||||
{$sql_password}
|
{$sql_password}
|
||||||
{$sql_certify}
|
{$sql_certify}
|
||||||
|
{$sql_mailling_date}
|
||||||
|
{$sql_sms_date}
|
||||||
|
{$sql_marketing_date}
|
||||||
|
{$sql_thirdparty_date}
|
||||||
|
{$sql_agree_log}
|
||||||
where mb_id = '{$mb_id}' ";
|
where mb_id = '{$mb_id}' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -127,7 +127,7 @@ $colspan = 16;
|
|||||||
<th scope="col" rowspan="2" id="mb_list_cert"><?php echo subject_sort_link('mb_certify', '', 'desc') ?>본인확인</a></th>
|
<th scope="col" rowspan="2" id="mb_list_cert"><?php echo subject_sort_link('mb_certify', '', 'desc') ?>본인확인</a></th>
|
||||||
<th scope="col" id="mb_list_mailc"><?php echo subject_sort_link('mb_email_certify', '', 'desc') ?>메일인증</a></th>
|
<th scope="col" id="mb_list_mailc"><?php echo subject_sort_link('mb_email_certify', '', 'desc') ?>메일인증</a></th>
|
||||||
<th scope="col" id="mb_list_open"><?php echo subject_sort_link('mb_open', '', 'desc') ?>정보공개</a></th>
|
<th scope="col" id="mb_list_open"><?php echo subject_sort_link('mb_open', '', 'desc') ?>정보공개</a></th>
|
||||||
<th scope="col" id="mb_list_mailr"><?php echo subject_sort_link('mb_mailling', '', 'desc') ?>메일수신</a></th>
|
<th scope="col" id="mb_list_mailr"><?php echo subject_sort_link('mb_mailling', '', 'desc') ?>광고성이메일수신</a></th>
|
||||||
<th scope="col" id="mb_list_auth">상태</th>
|
<th scope="col" id="mb_list_auth">상태</th>
|
||||||
<th scope="col" id="mb_list_mobile">휴대폰</th>
|
<th scope="col" id="mb_list_mobile">휴대폰</th>
|
||||||
<th scope="col" id="mb_list_lastcall"><?php echo subject_sort_link('mb_today_login', '', 'desc') ?>최종접속</a></th>
|
<th scope="col" id="mb_list_lastcall"><?php echo subject_sort_link('mb_today_login', '', 'desc') ?>최종접속</a></th>
|
||||||
@ -137,7 +137,7 @@ $colspan = 16;
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="col" id="mb_list_name"><?php echo subject_sort_link('mb_name') ?>이름</a></th>
|
<th scope="col" id="mb_list_name"><?php echo subject_sort_link('mb_name') ?>이름</a></th>
|
||||||
<th scope="col" id="mb_list_nick"><?php echo subject_sort_link('mb_nick') ?>닉네임</a></th>
|
<th scope="col" id="mb_list_nick"><?php echo subject_sort_link('mb_nick') ?>닉네임</a></th>
|
||||||
<th scope="col" id="mb_list_sms"><?php echo subject_sort_link('mb_sms', '', 'desc') ?>SMS수신</a></th>
|
<th scope="col" id="mb_list_sms"><?php echo subject_sort_link('mb_sms', '', 'desc') ?>광고성SMS/카카오톡수신</a></th>
|
||||||
<th scope="col" id="mb_list_adultc"><?php echo subject_sort_link('mb_adult', '', 'desc') ?>성인인증</a></th>
|
<th scope="col" id="mb_list_adultc"><?php echo subject_sort_link('mb_adult', '', 'desc') ?>성인인증</a></th>
|
||||||
<th scope="col" id="mb_list_auth"><?php echo subject_sort_link('mb_intercept_date', '', 'desc') ?>접근차단</a></th>
|
<th scope="col" id="mb_list_auth"><?php echo subject_sort_link('mb_intercept_date', '', 'desc') ?>접근차단</a></th>
|
||||||
<th scope="col" id="mb_list_deny"><?php echo subject_sort_link('mb_level', '', 'desc') ?>권한</a></th>
|
<th scope="col" id="mb_list_deny"><?php echo subject_sort_link('mb_level', '', 'desc') ?>권한</a></th>
|
||||||
@ -252,14 +252,15 @@ $colspan = 16;
|
|||||||
<input type="radio" name="mb_certify[<?php echo $i; ?>]" value="ipin" id="mb_certify_ipin_<?php echo $i; ?>" <?php echo $row['mb_certify'] == 'ipin' ? 'checked' : ''; ?>>
|
<input type="radio" name="mb_certify[<?php echo $i; ?>]" value="ipin" id="mb_certify_ipin_<?php echo $i; ?>" <?php echo $row['mb_certify'] == 'ipin' ? 'checked' : ''; ?>>
|
||||||
<label for="mb_certify_ipin_<?php echo $i; ?>">아이핀</label>
|
<label for="mb_certify_ipin_<?php echo $i; ?>">아이핀</label>
|
||||||
</td>
|
</td>
|
||||||
<td headers="mb_list_mailc"><?php echo preg_match('/[1-9]/', $row['mb_email_certify']) ? '<span class="txt_true">Yes</span>' : '<span class="txt_false">No</span>'; ?></td>
|
<td headers="mb_list_mailc" class="td_consent"><?php echo preg_match('/[1-9]/', $row['mb_email_certify']) ? '<span class="txt_true">Yes</span>' : '<span class="txt_false">No</span>'; ?></td>
|
||||||
<td headers="mb_list_open">
|
<td headers="mb_list_open" class="td_consent">
|
||||||
<label for="mb_open_<?php echo $i; ?>" class="sound_only">정보공개</label>
|
<label for="mb_open_<?php echo $i; ?>" class="sound_only">정보공개</label>
|
||||||
<input type="checkbox" name="mb_open[<?php echo $i; ?>]" <?php echo $row['mb_open'] ? 'checked' : ''; ?> value="1" id="mb_open_<?php echo $i; ?>">
|
<input type="checkbox" name="mb_open[<?php echo $i; ?>]" <?php echo $row['mb_open'] ? 'checked' : ''; ?> value="1" id="mb_open_<?php echo $i; ?>">
|
||||||
</td>
|
</td>
|
||||||
<td headers="mb_list_mailr">
|
<td headers="mb_list_mailr" class="td_consent">
|
||||||
<label for="mb_mailling_<?php echo $i; ?>" class="sound_only">메일수신</label>
|
<label for="mb_mailling_<?php echo $i; ?>" class="sound_only">메일수신</label>
|
||||||
<input type="checkbox" name="mb_mailling[<?php echo $i; ?>]" <?php echo $row['mb_mailling'] ? 'checked' : ''; ?> value="1" id="mb_mailling_<?php echo $i; ?>">
|
<input type="checkbox" name="mb_mailling[<?php echo $i; ?>]" <?php echo $row['mb_mailling'] ? 'checked' : ''; ?> value="1" id="mb_mailling_<?php echo $i; ?>">
|
||||||
|
<input type="hidden" name="mb_mailling_default[<?php echo $i; ?>]" value="<?php echo isset($row['mb_mailling']) ? $row['mb_mailling'] : '0'; ?> " id="mb_mailling_default_<?php echo $i; ?>">
|
||||||
</td>
|
</td>
|
||||||
<td headers="mb_list_auth" class="td_mbstat">
|
<td headers="mb_list_auth" class="td_mbstat">
|
||||||
<?php
|
<?php
|
||||||
@ -284,6 +285,7 @@ $colspan = 16;
|
|||||||
<td headers="mb_list_sms">
|
<td headers="mb_list_sms">
|
||||||
<label for="mb_sms_<?php echo $i; ?>" class="sound_only">SMS수신</label>
|
<label for="mb_sms_<?php echo $i; ?>" class="sound_only">SMS수신</label>
|
||||||
<input type="checkbox" name="mb_sms[<?php echo $i; ?>]" <?php echo $row['mb_sms'] ? 'checked' : ''; ?> value="1" id="mb_sms_<?php echo $i; ?>">
|
<input type="checkbox" name="mb_sms[<?php echo $i; ?>]" <?php echo $row['mb_sms'] ? 'checked' : ''; ?> value="1" id="mb_sms_<?php echo $i; ?>">
|
||||||
|
<input type="hidden" name="mb_sms_default[<?php echo $i; ?>]" value="<?php echo isset($row['mb_sms']) ? $row['mb_sms'] : '0'; ?> " id="mb_sms_default_<?php echo $i; ?>">
|
||||||
</td>
|
</td>
|
||||||
<td headers="mb_list_adultc">
|
<td headers="mb_list_adultc">
|
||||||
<label for="mb_adult_<?php echo $i; ?>" class="sound_only">성인인증</label>
|
<label for="mb_adult_<?php echo $i; ?>" class="sound_only">성인인증</label>
|
||||||
|
|||||||
288
adm/member_list_exel.lib.php
Normal file
288
adm/member_list_exel.lib.php
Normal file
@ -0,0 +1,288 @@
|
|||||||
|
<?php
|
||||||
|
/*************************************************************************
|
||||||
|
**
|
||||||
|
** 내보내기 관련 상수 정의
|
||||||
|
**
|
||||||
|
*************************************************************************/
|
||||||
|
define('MEMBER_EXPORT_PAGE_SIZE', 10000); // 파일당 처리할 회원 수
|
||||||
|
define('MEMBER_EXPORT_MAX_SIZE', 300000); // 최대 처리할 회원 수
|
||||||
|
define('MEMBER_BASE_DIR', "member_list"); // 엑셀 베이스 폴더
|
||||||
|
define('MEMBER_BASE_DATE', date('YmdHis')); // 폴더/파일명용 날짜
|
||||||
|
define('MEMBER_EXPORT_DIR', G5_DATA_PATH . "/" . MEMBER_BASE_DIR . "/" . MEMBER_BASE_DATE); // 엑셀 파일 저장 경로
|
||||||
|
define('MEMBER_LOG_DIR', G5_DATA_PATH . "/" . MEMBER_BASE_DIR . "/" . "log"); // 로그 파일 저장 경로
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
**
|
||||||
|
** 공통 함수 정의
|
||||||
|
**
|
||||||
|
*************************************************************************/
|
||||||
|
/**
|
||||||
|
* 검색 옵션 설정
|
||||||
|
*/
|
||||||
|
function get_export_config($type = null)
|
||||||
|
{
|
||||||
|
$config = [
|
||||||
|
'sfl_list' => [
|
||||||
|
'mb_id'=>'아이디',
|
||||||
|
'mb_name'=>'이름',
|
||||||
|
'mb_nick'=>'닉네임',
|
||||||
|
'mb_email'=>'이메일',
|
||||||
|
'mb_tel'=>'전화번호',
|
||||||
|
'mb_hp'=>'휴대폰번호',
|
||||||
|
'mb_addr1'=>'주소'
|
||||||
|
],
|
||||||
|
'point_cond_map' => [
|
||||||
|
'gte'=>'≥',
|
||||||
|
'lte'=>'≤',
|
||||||
|
'eq'=>'='
|
||||||
|
],
|
||||||
|
'intercept_list' => [
|
||||||
|
'exclude'=>'차단회원 제외',
|
||||||
|
'only'=>'차단회원만'
|
||||||
|
],
|
||||||
|
'ad_range_list' => [
|
||||||
|
'all' => '수신동의 회원 전체',
|
||||||
|
'mailling_only' => '이메일 수신동의 회원만',
|
||||||
|
'sms_only' => 'SMS/카카오톡 수신동의 회원만',
|
||||||
|
'month_confirm' => date('m월').' 수신동의 확인 대상만',
|
||||||
|
'custom_period' => '수신동의 기간 직접 입력'
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
return $type ? (isset($config[$type]) ? $config[$type] : []) : $config;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 파라미터 수집 및 유효성 검사
|
||||||
|
*/
|
||||||
|
function get_member_export_params()
|
||||||
|
{
|
||||||
|
// 친구톡 양식 - 엑셀 양식에 포함할 항목
|
||||||
|
$fieldArray = array_map('trim', explode(',', isset($_GET['fields']) ? $_GET['fields'] : ''));
|
||||||
|
$vars = [];
|
||||||
|
foreach ($fieldArray as $index => $field) {
|
||||||
|
if(!empty($field)){
|
||||||
|
$vars['var' . ($index + 1)] = $field;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$params = [
|
||||||
|
'page' => 1,
|
||||||
|
'formatType' => (int)(isset($_GET['formatType']) ? $_GET['formatType'] : 1),
|
||||||
|
'use_stx' => isset($_GET['use_stx']) ? $_GET['use_stx'] : 0,
|
||||||
|
'stx_cond' => clean_xss_tags(isset($_GET['stx_cond']) ? $_GET['stx_cond'] : 'like'),
|
||||||
|
'sfl' => clean_xss_tags(isset($_GET['sfl']) ? $_GET['sfl'] : ''),
|
||||||
|
'stx' => clean_xss_tags(isset($_GET['stx']) ? $_GET['stx'] : ''),
|
||||||
|
'use_level' => isset($_GET['use_level']) ? $_GET['use_level'] : 0,
|
||||||
|
'level_start' => (int)(isset($_GET['level_start']) ? $_GET['level_start'] : 1),
|
||||||
|
'level_end' => (int)(isset($_GET['level_end']) ? $_GET['level_end'] : 10),
|
||||||
|
'use_date' => isset($_GET['use_date']) ? $_GET['use_date'] : 0,
|
||||||
|
'date_start' => clean_xss_tags(isset($_GET['date_start']) ? $_GET['date_start'] : ''),
|
||||||
|
'date_end' => clean_xss_tags(isset($_GET['date_end']) ? $_GET['date_end'] : ''),
|
||||||
|
'use_point' => isset($_GET['use_point']) ? $_GET['use_point'] : 0,
|
||||||
|
'point' => isset($_GET['point']) ? $_GET['point'] : '',
|
||||||
|
'point_cond' => isset($_GET['point_cond']) ? $_GET['point_cond'] : 'gte',
|
||||||
|
'use_hp_exist' => isset($_GET['use_hp_exist']) ? $_GET['use_hp_exist'] : 0,
|
||||||
|
'ad_range_only' => isset($_GET['ad_range_only']) ? $_GET['ad_range_only'] : 0,
|
||||||
|
'ad_range_type' => clean_xss_tags(isset($_GET['ad_range_type']) ? $_GET['ad_range_type'] : 'all'),
|
||||||
|
'ad_mailling' => isset($_GET['ad_mailling']) ? $_GET['ad_mailling'] : 0,
|
||||||
|
'ad_sms' => isset($_GET['ad_sms']) ? $_GET['ad_sms'] : 0,
|
||||||
|
'agree_date_start' => clean_xss_tags(isset($_GET['agree_date_start']) ? $_GET['agree_date_start'] : ''),
|
||||||
|
'agree_date_end' => clean_xss_tags(isset($_GET['agree_date_end']) ? $_GET['agree_date_end'] : ''),
|
||||||
|
'use_intercept' => isset($_GET['use_intercept']) ? $_GET['use_intercept'] : 0,
|
||||||
|
'intercept' => clean_xss_tags(isset($_GET['intercept']) ? $_GET['intercept'] : 'exclude'),
|
||||||
|
'vars' => $vars,
|
||||||
|
];
|
||||||
|
|
||||||
|
// 레벨 범위 검증
|
||||||
|
if ($params['level_start'] > $params['level_end']) {
|
||||||
|
[$params['level_start'] , $params['level_end']] = [$params['level_end'], $params['level_start']];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 가입기간 - 날짜 범위 검증
|
||||||
|
if ($params['use_date'] && $params['date_start'] && $params['date_end']) {
|
||||||
|
if ($params['date_start'] > $params['date_end']) {
|
||||||
|
[$params['date_start'] , $params['date_end']] = [$params['date_end'], $params['date_start']];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 수신동의기간 - 날짜 범위 검증
|
||||||
|
if ($params['ad_range_type'] == 'custom_period' && $params['agree_date_start'] && $params['agree_date_end']) {
|
||||||
|
if ($params['agree_date_start'] > $params['agree_date_end']) {
|
||||||
|
[$params['agree_date_start'] , $params['agree_date_end']] = [$params['agree_date_end'], $params['agree_date_start']];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $params;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 전체 데이터 개수 조회
|
||||||
|
*/
|
||||||
|
function member_export_get_total_count($params)
|
||||||
|
{
|
||||||
|
global $g5;
|
||||||
|
|
||||||
|
$where = member_export_build_where($params);
|
||||||
|
$sql = "SELECT COUNT(*) as cnt FROM {$g5['member_table']} {$where}";
|
||||||
|
|
||||||
|
$result = sql_query($sql);
|
||||||
|
if (!$result) {
|
||||||
|
throw new Exception("데이터 조회에 실패하였습니다. 다시 시도해주세요.");
|
||||||
|
}
|
||||||
|
|
||||||
|
$row = sql_fetch_array($result);
|
||||||
|
return (int)$row['cnt'];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WHERE 조건절 생성
|
||||||
|
*/
|
||||||
|
function member_export_build_where($params)
|
||||||
|
{
|
||||||
|
global $config;
|
||||||
|
$conditions = [];
|
||||||
|
|
||||||
|
// 기본 조건 - 탈퇴하지 않은 사용자
|
||||||
|
$conditions[] = "mb_leave_date = ''";
|
||||||
|
|
||||||
|
// 검색어 조건 (sql_escape_string 사용으로 보안 강화)
|
||||||
|
if (!empty($params['use_stx']) && $params['use_stx'] === '1') {
|
||||||
|
$sfl_list = get_export_config('sfl_list');
|
||||||
|
$sfl = in_array($params['sfl'], array_keys($sfl_list)) ? $params['sfl'] : '';
|
||||||
|
$stx = sql_escape_string($params['stx']);
|
||||||
|
|
||||||
|
if(!empty($sfl) && !empty($stx)){
|
||||||
|
if ($params['stx_cond'] === 'like') {
|
||||||
|
$conditions[] = "{$sfl} LIKE '%{$stx}%'";
|
||||||
|
} else {
|
||||||
|
$conditions[] = "{$sfl} = '{$stx}'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 권한 조건
|
||||||
|
if (!empty($params['use_level']) && $params['use_level'] === '1') {
|
||||||
|
$level_start = max(1, (int)$params['level_start']);
|
||||||
|
$level_end = min(10, (int)$params['level_end']);
|
||||||
|
|
||||||
|
$conditions[] = "(mb_level BETWEEN {$level_start} AND {$level_end})";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 가입기간 조건
|
||||||
|
if (!empty($params['use_date']) && $params['use_date'] === '1') {
|
||||||
|
$date_start = isset($params['date_start']) ? sql_escape_string(trim($params['date_start'])) : '';
|
||||||
|
$date_end = isset($params['date_end']) ? sql_escape_string(trim($params['date_end'])) : '';
|
||||||
|
|
||||||
|
if ($date_start && $date_end) {
|
||||||
|
$conditions[] = "mb_datetime BETWEEN '{$date_start} 00:00:00' AND '{$date_end} 23:59:59'";
|
||||||
|
} elseif ($date_start) {
|
||||||
|
$conditions[] = "mb_datetime >= '{$date_start} 00:00:00'";
|
||||||
|
} elseif ($date_end) {
|
||||||
|
$conditions[] = "mb_datetime <= '{$date_end} 23:59:59'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 포인트 조건
|
||||||
|
if (!empty($params['use_point']) && $params['use_point'] === '1') {
|
||||||
|
$point = $params['point'];
|
||||||
|
$point_cond = $params['point_cond'];
|
||||||
|
|
||||||
|
if ($point != '') {
|
||||||
|
$point = (int)$point; // 정수로 캐스팅
|
||||||
|
|
||||||
|
switch ($point_cond) {
|
||||||
|
case 'lte':
|
||||||
|
$conditions[] = "mb_point <= {$point}";
|
||||||
|
break;
|
||||||
|
case 'eq':
|
||||||
|
$conditions[] = "mb_point = {$point}";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$conditions[] = "mb_point >= {$point}";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 휴대폰 번호 존재 조건
|
||||||
|
if (!empty($params['use_hp_exist']) && $params['use_hp_exist'] === '1') {
|
||||||
|
$conditions[] = "(mb_hp is not null and mb_hp != '')";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 정보수신동의 조건
|
||||||
|
if (!empty($params['ad_range_only']) && $params['ad_range_only'] === '1') {
|
||||||
|
$range = isset($params['ad_range_type']) ? $params['ad_range_type'] : '';
|
||||||
|
|
||||||
|
// 공통: 마케팅 목적 수집·이용 동의 + (필요 시) 제3자 동의
|
||||||
|
$thirdparty_clause = $config['cf_sms_use'] !== '' ? " AND mb_thirdparty_agree = 1" : "";
|
||||||
|
$base_marketing = "mb_marketing_agree = 1{$thirdparty_clause}";
|
||||||
|
|
||||||
|
if ($range === 'all') {
|
||||||
|
// 마케팅 동의 + (이메일 OR SMS 동의)
|
||||||
|
$conditions[] = "({$base_marketing} AND (mb_mailling = 1 OR mb_sms = 1))";
|
||||||
|
} elseif ($range === 'mailling_only') {
|
||||||
|
// 마케팅 동의 + 이메일 동의
|
||||||
|
$conditions[] = "({$base_marketing} AND mb_mailling = 1)";
|
||||||
|
} elseif ($range === 'sms_only') {
|
||||||
|
// 마케팅 동의 + SMS/카카오톡 동의
|
||||||
|
$conditions[] = "({$base_marketing} AND mb_sms = 1)";
|
||||||
|
} elseif ($range === 'month_confirm' || $range === 'custom_period') {
|
||||||
|
// 채널 필터 체크
|
||||||
|
$useEmail = !empty($params['ad_mailling']);
|
||||||
|
$useSms = !empty($params['ad_sms']);
|
||||||
|
|
||||||
|
if ($range === 'month_confirm') {
|
||||||
|
// 23개월 전 그 달
|
||||||
|
$start = date('Y-m-01 00:00:00', strtotime('-23 months'));
|
||||||
|
$end = date('Y-m-t 23:59:59', strtotime('-23 months'));
|
||||||
|
$emailDateCond = "mb_mailling_date BETWEEN '{$start}' AND '{$end}'";
|
||||||
|
$smsDateCond = "mb_sms_date BETWEEN '{$start}' AND '{$end}'";
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// 수신동의기간 직접 입력 - custom_period
|
||||||
|
$date_start = isset($params['agree_date_start']) ? $params['agree_date_start'] : '';
|
||||||
|
$date_end = isset($params['agree_date_end']) ? $params['agree_date_end'] : '';
|
||||||
|
|
||||||
|
if ($date_start && $date_end) {
|
||||||
|
$emailDateCond = "mb_mailling_date BETWEEN '{$date_start} 00:00:00' AND '{$date_end} 23:59:59'";
|
||||||
|
$smsDateCond = "mb_sms_date BETWEEN '{$date_start} 00:00:00' AND '{$date_end} 23:59:59'";
|
||||||
|
} elseif ($date_start) {
|
||||||
|
$emailDateCond = "mb_mailling_date >= '{$date_start} 00:00:00'";
|
||||||
|
$smsDateCond = "mb_sms_date >= '{$date_start} 00:00:00'";
|
||||||
|
} elseif ($date_end) {
|
||||||
|
$emailDateCond = "mb_mailling_date <= '{$date_end} 23:59:59'";
|
||||||
|
$smsDateCond = "mb_sms_date <= '{$date_end} 23:59:59'";
|
||||||
|
} else {
|
||||||
|
$emailDateCond = "mb_mailling_date <> '0000-00-00 00:00:00'";
|
||||||
|
$smsDateCond = "mb_sms_date <> '0000-00-00 00:00:00'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$useEmail && !$useSms) {
|
||||||
|
$conditions[] = "0=1"; // 둘 다 해제 ⇒ 결과 0건
|
||||||
|
} else {
|
||||||
|
// 조건 조립
|
||||||
|
$parts = [];
|
||||||
|
if ($useEmail) $parts[] = "(mb_mailling = 1 AND {$emailDateCond})";
|
||||||
|
if ($useSms) $parts[] = "(mb_sms = 1 AND {$smsDateCond})";
|
||||||
|
|
||||||
|
$conditions[] = !empty($parts) ? '(' . implode(' OR ', $parts) . ')' : '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 차단 회원 조건
|
||||||
|
if (!empty($params['use_intercept']) && $params['use_intercept'] === '1') {
|
||||||
|
switch ($params['intercept']) {
|
||||||
|
case 'exclude':
|
||||||
|
$conditions[] = "mb_intercept_date = ''";
|
||||||
|
break;
|
||||||
|
case 'only':
|
||||||
|
$conditions[] = "mb_intercept_date != ''";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return empty($conditions) ? '' : 'WHERE ' . implode(' AND ', $conditions);
|
||||||
|
}
|
||||||
483
adm/member_list_exel.php
Normal file
483
adm/member_list_exel.php
Normal file
@ -0,0 +1,483 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200400";
|
||||||
|
require_once './_common.php';
|
||||||
|
require_once './member_list_exel.lib.php'; // 회원관리파일 공통 라이브러리
|
||||||
|
|
||||||
|
auth_check_menu($auth, $sub_menu, 'r');
|
||||||
|
|
||||||
|
// 파라미터 수집 및 유효성 검사
|
||||||
|
$params = get_member_export_params();
|
||||||
|
|
||||||
|
// 총건수
|
||||||
|
$total_count = 0;
|
||||||
|
$total_error = "";
|
||||||
|
try {
|
||||||
|
$total_count = member_export_get_total_count($params);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$total_error = $e->getMessage(); // 메서드 호출 괄호 필수
|
||||||
|
}
|
||||||
|
|
||||||
|
$g5['title'] = '회원관리파일';
|
||||||
|
require_once './admin.head.php';
|
||||||
|
$colspan = 14;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<h2>회원 엑셀 생성</h2>
|
||||||
|
|
||||||
|
<div class="local_desc01 local_desc">
|
||||||
|
<p><b>회원수 <?php echo number_format(MEMBER_EXPORT_PAGE_SIZE);?>건 초과 시</b> <?php echo number_format(MEMBER_EXPORT_PAGE_SIZE);?>건 단위로 분리 저장되며, <b>엑셀 생성 최대 건수는 <?php echo number_format(MEMBER_EXPORT_MAX_SIZE);?>건</b>입니다. 초과 시 조건 추가 설정 후 재시도하시기 바랍니다.</p>
|
||||||
|
<p><b>수신동의 확인 대상은 만료일까지 1달 미만인 회원</b>을 기준으로 필터링됩니다.</p>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<p>파일 생성 시 서버에 임시 생성된 파일 중 <b>오늘 날짜를 제외 한 파일은 자동 삭제</b>되며, 수동 삭제 필요 시 <a href="<?php echo G5_ADMIN_URL;?>/member_list_file_delete.php"><b>회원관리파일 일괄삭제</b></a>에서 진행하시기 바랍니다.</p>
|
||||||
|
<p>회원 정보 수정은 <a href="<?php echo G5_ADMIN_URL;?>/member_list.php" class="link"><b>회원 관리</b></a>에서 진행하실 수 있습니다.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="local_ov01 local_ov">
|
||||||
|
<span class="btn_ov01">
|
||||||
|
<span class="ov_txt">총건수 </span>
|
||||||
|
<?php if($total_error != "") { ?>
|
||||||
|
<span class="ov_num"> <?php echo $total_error ?></span>
|
||||||
|
<?php } else {?>
|
||||||
|
<span class="ov_num"> <?php echo number_format($total_count) ?>건</span>
|
||||||
|
<?php } ?>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 회원 검색 필터링 폼 -->
|
||||||
|
<form id="fsearch" name="fsearch" class="member_list_data" method="get">
|
||||||
|
<input type="hidden" name="token" value="<?php echo get_token(); ?>">
|
||||||
|
<fieldset>
|
||||||
|
<legend class="sound_only">회원 검색 필터링</legend>
|
||||||
|
<div class="sch_table">
|
||||||
|
|
||||||
|
<!-- 검색어 적용 -->
|
||||||
|
<div class="sch_row">
|
||||||
|
<div class="label">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" name="use_stx" value="1" <?php echo isset($_GET['use_stx']) ? 'checked' : ''; ?>>
|
||||||
|
검색어 적용
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<select name="sfl">
|
||||||
|
<?php
|
||||||
|
// 검색어 옵션 : [정의] get_export_config() - adm/member_list_exel.lib.php;
|
||||||
|
foreach (get_export_config('sfl_list') as $val => $label) {
|
||||||
|
$selected = (isset($_GET['sfl']) && $_GET['sfl'] === $val) ? 'selected' : '';
|
||||||
|
echo "<option value=\"$val\" $selected>$label</option>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
<input type="text" name="stx" value="<?php echo htmlspecialchars(isset($_GET['stx']) ? $_GET['stx'] : ''); ?>" placeholder="검색어 입력">
|
||||||
|
<span class="radio_group">
|
||||||
|
<label><input type="radio" name="stx_cond" value="like" <?php echo (isset($_GET['stx_cond']) ? $_GET['stx_cond'] : 'like') === 'like' ? 'checked' : ''; ?>> 포함</label>
|
||||||
|
<label><input type="radio" name="stx_cond" value="equal" <?php echo (isset($_GET['stx_cond']) ? $_GET['stx_cond'] : '') === 'equal' ? 'checked' : ''; ?>> 일치</label>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 레벨 적용 -->
|
||||||
|
<div class="sch_row">
|
||||||
|
<div class="label">
|
||||||
|
<label><input type="checkbox" name="use_level" value="1" <?php echo isset($_GET['use_level']) ? 'checked' : ''; ?>> 레벨 적용</label>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<select name="level_start">
|
||||||
|
<?php for ($i = 1; $i <= 10; $i++): ?>
|
||||||
|
<option value="<?php echo $i; ?>" <?php echo (isset($_GET['level_start']) && $_GET['level_start'] == $i) ? 'selected' : ''; ?>><?php echo $i; ?></option>
|
||||||
|
<?php endfor; ?>
|
||||||
|
</select> ~
|
||||||
|
<select name="level_end">
|
||||||
|
<?php for ($i = 1; $i <= 10; $i++): ?>
|
||||||
|
<option value="<?php echo $i; ?>" <?php echo (isset($_GET['level_end']) && $_GET['level_end'] == $i) ? 'selected' : ''; ?>><?php echo $i; ?></option>
|
||||||
|
<?php endfor; ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 가입기간 적용 -->
|
||||||
|
<div class="sch_row">
|
||||||
|
<div class="label">
|
||||||
|
<label><input type="checkbox" name="use_date" value="1" <?php echo isset($_GET['use_date']) ? 'checked' : ''; ?>> 가입기간 적용</label>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<input type="date" name="date_start" max="9999-12-31" value="<?php echo htmlspecialchars(isset($_GET['date_start']) ? $_GET['date_start'] : ''); ?>"> ~
|
||||||
|
<input type="date" name="date_end" max="9999-12-31" value="<?php echo htmlspecialchars(isset($_GET['date_end']) ? $_GET['date_end'] : ''); ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 포인트 적용 -->
|
||||||
|
<div class="sch_row">
|
||||||
|
<div class="label">
|
||||||
|
<label><input type="checkbox" name="use_point" value="1" <?php echo isset($_GET['use_point']) ? 'checked' : ''; ?>> 포인트 적용</label>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<input type="number" name="point" value="<?php echo htmlspecialchars(isset($_GET['point']) ? $_GET['point'] : ''); ?>" placeholder="포인트 입력">
|
||||||
|
<span class="radio_group">
|
||||||
|
<label><input type="radio" name="point_cond" value="gte" <?php echo (isset($_GET['point_cond']) ? $_GET['point_cond'] : 'gte') === 'gte' ? 'checked' : ''; ?>> 이상</label>
|
||||||
|
<label><input type="radio" name="point_cond" value="lte" <?php echo (isset($_GET['point_cond']) ? $_GET['point_cond'] : '') === 'lte' ? 'checked' : ''; ?>> 이하</label>
|
||||||
|
<label><input type="radio" name="point_cond" value="eq" <?php echo (isset($_GET['point_cond']) ? $_GET['point_cond'] : '') === 'eq' ? 'checked' : ''; ?>> 일치</label>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 차단회원 조건 -->
|
||||||
|
<div class="sch_row">
|
||||||
|
<div class="label">
|
||||||
|
<label><input type="checkbox" name="use_intercept" value="1" <?php echo isset($_GET['use_intercept']) ? 'checked' : ''; ?>> 차단회원</label>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<select name="intercept" id="intercept">
|
||||||
|
<?php
|
||||||
|
// 차단회원 옵션 : [정의] get_export_config() - adm/member_list_exel.lib.php
|
||||||
|
foreach (get_export_config('intercept_list') as $val => $label) {
|
||||||
|
$selected = ((isset($_GET['intercept']) ? $_GET['intercept'] : '') === $val) ? 'selected' : '';
|
||||||
|
echo "<option value=\"$val\" $selected>$label</option>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 휴대폰 번호 조건 - 초기세팅(설정에 휴대폰번호가 보이기/필수입력이면 기본값 checked로 설정) -->
|
||||||
|
<div class="sch_row">
|
||||||
|
<div class="label">
|
||||||
|
<label>
|
||||||
|
<?php $use_hp_checked = isset($_GET['token']) ? (isset($_GET['use_hp_exist']) ? 'checked' : '') : (($config['cf_use_hp'] || $config['cf_req_hp']) ? 'checked' : '');?>
|
||||||
|
<input type="checkbox" name="use_hp_exist" value="1" <?php echo $use_hp_checked; ?>> 휴대폰 번호 있는 경우만
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 정보수신동의 조건 -->
|
||||||
|
<div class="sch_row">
|
||||||
|
<div class="label">
|
||||||
|
<label><input type="checkbox" name="ad_range_only" value="1" <?php echo isset($_GET['ad_range_only']) ? 'checked' : ''; ?>> 정보수신동의에 동의한 경우만</label>
|
||||||
|
</div>
|
||||||
|
<!-- 안내 문구 -->
|
||||||
|
<div class="field">
|
||||||
|
<p class="sch_notice">「정보통신망이용촉진및정보보호등에관한법률」에 따라 <b>광고성 정보 수신동의 여부</b>를 <b>매2년</b>마다 확인해야 합니다.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="sch_row <?php echo isset($_GET['ad_range_only']) ? '' : 'is-hidden'; ?>">
|
||||||
|
<div class="ad_range_wrap">
|
||||||
|
<div class="ad_range_box">
|
||||||
|
<div class="label">
|
||||||
|
<label for="ad_range_type">회원범위</label>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<select name="ad_range_type" id="ad_range_type">
|
||||||
|
<?php
|
||||||
|
foreach (get_export_config('ad_range_list') as $val => $label) {
|
||||||
|
$selected = ((isset($_GET['ad_range_type']) ? $_GET['ad_range_type'] : '') === $val) ? 'selected' : '';
|
||||||
|
echo "<option value=\"$val\" $selected>$label</option>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<div class="ad_range_wrap">
|
||||||
|
<!-- 기간 직접 입력 -->
|
||||||
|
<div class="ad_range_box <?php echo isset($_GET['ad_range_only']) && (isset($_GET['ad_range_type']) ? $_GET['ad_range_type'] : '') == 'custom_period' ? '' : 'is-hidden'; ?>">
|
||||||
|
<div class="field">
|
||||||
|
<input type="date" name="agree_date_start" max="9999-12-31" value="<?php echo htmlspecialchars(isset($_GET['agree_date_start']) ? $_GET['agree_date_start'] : date('Y-m-d', strtotime('-1 month'))); ?>"> ~
|
||||||
|
<input type="date" name="agree_date_end" max="9999-12-31" value="<?php echo htmlspecialchars(isset($_GET['agree_date_end']) ? $_GET['agree_date_end'] : date('Y-m-d')); ?>">
|
||||||
|
<p>* 광고성 정보 수신(<b>이메일 또는 SMS/카카오톡</b>) 동의일자 기준</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 설명 문구 -->
|
||||||
|
<?php
|
||||||
|
$thirdpartyLbl = (!empty($config['cf_sms_use'])) ? ' / <b>개인정보 제3자 제공</b>' : '';
|
||||||
|
|
||||||
|
$ad_range_text = [
|
||||||
|
'all' => "* <b>광고성 정보 수신(이메일 또는 SMS/카카오톡)</b> / <b>마케팅 목적의 개인정보 수집 및 이용</b>{$thirdpartyLbl}에 모두 동의한 회원을 선택합니다.",
|
||||||
|
'mailling_only' => "* <b>광고성 이메일 수신</b> / <b>마케팅 목적의 개인정보 수집 및 이용</b>{$thirdpartyLbl}에 모두 동의한 회원을 선택합니다.",
|
||||||
|
'sms_only' => "* <b>광고성 SMS/카카오톡 수신</b> / <b>마케팅 목적의 개인정보 수집 및 이용</b>{$thirdpartyLbl}에 모두 동의한 회원을 선택합니다.",
|
||||||
|
'month_confirm' => "* 23개월 전(" . date('Y년 m월', strtotime('-23 month')) . ") <b>광고성 정보 수신 동의(이메일 또는 SMS/카카오톡)</b>한 회원을 선택합니다."
|
||||||
|
];
|
||||||
|
|
||||||
|
if (isset($_GET['ad_range_only'], $_GET['ad_range_type']) && isset($ad_range_text[$_GET['ad_range_type']])) {
|
||||||
|
echo '<div class="ad_range_box"><p>' . $ad_range_text[$_GET['ad_range_type']] . '</p></div>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 채널 체크박스 -->
|
||||||
|
<div class="sch_row <?php echo isset($_GET['ad_range_only']) && in_array($_GET['ad_range_type'], ['month_confirm', 'custom_period']) ? '' : 'is-hidden'; ?>">
|
||||||
|
<div class="ad_range_wrap">
|
||||||
|
<div class="ad_range_box">
|
||||||
|
<div class="label">
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<?php $ad_mailling_checked = isset($_GET['token']) ? (isset($_GET['ad_mailling']) ? 'checked' : '') : 'checked';?>
|
||||||
|
<?php $ad_sms_checked = isset($_GET['token']) ? (isset($_GET['ad_sms']) ? 'checked' : '') : 'checked';?>
|
||||||
|
<label><input type="checkbox" name="ad_mailling" value="1" <?php echo $ad_mailling_checked; ?>> 광고성 이메일 수신</label>
|
||||||
|
<label><input type="checkbox" name="ad_sms" value="1" <?php echo $ad_sms_checked; ?>> 광고성 SMS/카카오톡 수신</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="sch_btn">
|
||||||
|
<button type="button" id="btnExcelDownload">엑셀파일 다운로드</button>
|
||||||
|
<button type="button" class="btn_reset" onclick="location.href='?'">초기화</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.querySelector('input[name="ad_range_only"]').addEventListener('change', function () {
|
||||||
|
document.querySelectorAll('.ad_range_wrap').forEach(el => {
|
||||||
|
el.classList.toggle('is-hidden', !this.checked);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
document.querySelectorAll('#fsearch input, #fsearch select').forEach(el => {
|
||||||
|
const submit = () => document.getElementById('fsearch').submit();
|
||||||
|
el.addEventListener(el.type === 'date' ? 'blur' : 'change', submit);
|
||||||
|
|
||||||
|
el.addEventListener('keydown', e => {
|
||||||
|
if (e.key === 'Enter') {
|
||||||
|
e.preventDefault();
|
||||||
|
submit();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
let eventSource = null;
|
||||||
|
|
||||||
|
// 일반 엑셀 다운로드 버튼 클릭
|
||||||
|
document.getElementById('btnExcelDownload').addEventListener('click', () => {
|
||||||
|
startExcelDownload();
|
||||||
|
});
|
||||||
|
|
||||||
|
// 엑셀 다운로드 실행
|
||||||
|
// 1. 기존 SSE 종료
|
||||||
|
function closePreviousEventSource() {
|
||||||
|
if (eventSource) {
|
||||||
|
eventSource.close();
|
||||||
|
eventSource = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. FormData QueryString 변환
|
||||||
|
function buildDownloadParams(selectedFields = []) {
|
||||||
|
const formData = new FormData(document.getElementById('fsearch'));
|
||||||
|
const params = new URLSearchParams(formData);
|
||||||
|
|
||||||
|
params.append('mode', 'start');
|
||||||
|
|
||||||
|
return params.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 메인 함수
|
||||||
|
function startExcelDownload(selectedFields = []) {
|
||||||
|
closePreviousEventSource();
|
||||||
|
|
||||||
|
const query = buildDownloadParams(selectedFields);
|
||||||
|
showDownloadPopup();
|
||||||
|
|
||||||
|
eventSource = new EventSource(`member_list_exel_export.php?${query}`);
|
||||||
|
eventSource.onmessage = handleProgressUpdate();
|
||||||
|
eventSource.onerror = handleDownloadError();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 다운로드 팝업 표시
|
||||||
|
function showDownloadPopup() {
|
||||||
|
const bodyHTML = `
|
||||||
|
<div class="excel-download-progress">
|
||||||
|
<div class="progress-desc">
|
||||||
|
<p class="progress-summary">총 <strong>0</strong>개 파일로 분할됩니다</p>
|
||||||
|
<p class="progress-message"><strong>(0 / 0)</strong> 파일 다운로드 중</p>
|
||||||
|
<p class="progress-error"></p>
|
||||||
|
</div>
|
||||||
|
<div class="progress-spinner">
|
||||||
|
<div class="spinner"></div>
|
||||||
|
<p class="loading-message">
|
||||||
|
엑셀 파일을 생성 중입니다. 잠시만 기다려주세요.<br>
|
||||||
|
현재 데이터 기준으로 <strong id="estimatedTimeText"></strong> 정도 소요될 수 있습니다.<br>
|
||||||
|
<strong>페이지를 벗어나거나 닫으면 다운로드가 중단</strong>되니, 작업 완료까지 기다려 주세요.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="progress-box">
|
||||||
|
<div class="progress-download-box"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
|
||||||
|
PopupManager.render('엑셀 다운로드 진행 중', bodyHTML, '', { disableOutsideClose: true });
|
||||||
|
|
||||||
|
// 닫기 버튼 이벤트 핸들링
|
||||||
|
const closeBtn = document.querySelector('.popup-close-btn');
|
||||||
|
if (closeBtn) {
|
||||||
|
closeBtn.removeAttribute('onclick');
|
||||||
|
closeBtn.addEventListener('click', handlePopupCloseWithConfirm);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 닫기 버튼 클릭 시 다운로드 중단 여부 확인
|
||||||
|
function handlePopupCloseWithConfirm(e) {
|
||||||
|
if (eventSource) {
|
||||||
|
const confirmClose = confirm("엑셀 다운로드가 진행 중입니다.\n정말 중지하시겠습니까?");
|
||||||
|
if (!confirmClose) {
|
||||||
|
e.preventDefault();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
eventSource.close();
|
||||||
|
eventSource = null;
|
||||||
|
alert("엑셀 다운로드가 중단되었습니다.");
|
||||||
|
}
|
||||||
|
PopupManager.close('popupOverlay');
|
||||||
|
}
|
||||||
|
|
||||||
|
// 체크박스 선택 시 최대 3개 제한 및 선택된 항목 미리보기 표시
|
||||||
|
function bindFieldSelectEvents() {
|
||||||
|
const fieldSelectForm = document.getElementById('fieldSelectForm');
|
||||||
|
if (!fieldSelectForm) return;
|
||||||
|
|
||||||
|
fieldSelectForm.addEventListener('change', function (e) {
|
||||||
|
if (e.target.name === 'fields') {
|
||||||
|
const selected = fieldSelectForm.querySelectorAll('input[name="fields"]:checked');
|
||||||
|
if (selected.length > 3) {
|
||||||
|
alert("최대 3개까지 선택 가능합니다.");
|
||||||
|
e.target.checked = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 선택된 항목 표시
|
||||||
|
const previewContainer = document.getElementById('selectedFieldsPreview');
|
||||||
|
let spans = '<strong>선택된 항목:</strong>';
|
||||||
|
selected.forEach(field => {
|
||||||
|
const label = field.parentElement.textContent.trim();
|
||||||
|
spans += `<span class="field-tag">${label}</span>`;
|
||||||
|
});
|
||||||
|
previewContainer.innerHTML = spans;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 엑셀 생성 및 다운로드 실행
|
||||||
|
function handleProgressUpdate() {
|
||||||
|
return function(e) {
|
||||||
|
const data = JSON.parse(e.data);
|
||||||
|
const { status, downloadType, message, total, current, totalChunks, currentChunk, zipFile, files, filePath } = data;
|
||||||
|
|
||||||
|
// DOM 요소 캐싱
|
||||||
|
const titleEl = document.getElementById('popupTitle');
|
||||||
|
const summaryEl = document.querySelector('.progress-summary');
|
||||||
|
const messageEl = document.querySelector('.progress-message');
|
||||||
|
const spinnerEl = document.querySelector('.progress-spinner');
|
||||||
|
const resultEl = document.querySelector('.loading-message');
|
||||||
|
const downloadBoxEl = document.querySelector('.progress-download-box');
|
||||||
|
const errorEl = document.querySelector('.progress-error');
|
||||||
|
|
||||||
|
if (status === "progress")
|
||||||
|
{
|
||||||
|
summaryEl.innerHTML = `총 <strong>${totalChunks}</strong>개 파일로 ` + (downloadType === 2 ? `분할 생성됩니다` : `다운로드됩니다`) + ` (총 ${total.toLocaleString('ko-KR')}건)`;
|
||||||
|
messageEl.innerHTML = downloadType === 2 ? `<strong>(${currentChunk} / ${totalChunks})</strong> 파일 생성 중` : `엑셀 파일 생성 중`;
|
||||||
|
|
||||||
|
/* 작업 소요 시간 : 예상 시간 (1만건당 10초) */
|
||||||
|
const sec = Math.max(5, Math.ceil(total * 0.0012 * 1.2)); // 최소 5초 보장
|
||||||
|
const text = `예상 처리 시간은 약 ${sec >= 60 ? `${Math.floor(sec / 60)}분 ${sec % 60}초` : `${sec}초`}`;
|
||||||
|
document.getElementById('estimatedTimeText').innerText = text;
|
||||||
|
}
|
||||||
|
else if (status === "zipping")
|
||||||
|
{
|
||||||
|
summaryEl.innerHTML = `총 <strong>${totalChunks}</strong>개 파일이 압축파일로 생성됩니다`;
|
||||||
|
messageEl.innerHTML = `<strong>${totalChunks}</strong> 파일 압축하는 중`;
|
||||||
|
}
|
||||||
|
else if (status === "zippingError")
|
||||||
|
{
|
||||||
|
errorEl.innerHTML = message;
|
||||||
|
}
|
||||||
|
else if (status === "error")
|
||||||
|
{
|
||||||
|
summaryEl.innerHTML = `엑셀 파일 다운로드 실패`;
|
||||||
|
resultEl.innerHTML = '';
|
||||||
|
spinnerEl?.classList.add('is-hidden');
|
||||||
|
|
||||||
|
const parts = message.split(/<br\s*\/?>/i);
|
||||||
|
messageEl.innerHTML = parts[0] || '';
|
||||||
|
errorEl.innerHTML = parts.slice(1).join('<br>') || '';
|
||||||
|
|
||||||
|
// SSE 작업 닫기
|
||||||
|
eventSource?.close();
|
||||||
|
eventSource = null;
|
||||||
|
}
|
||||||
|
else if (status === "done")
|
||||||
|
{
|
||||||
|
// SSE 작업 닫기
|
||||||
|
eventSource?.close();
|
||||||
|
eventSource = null;
|
||||||
|
|
||||||
|
titleEl.textContent = '엑셀 파일 다운로드 완료';
|
||||||
|
messageEl.innerHTML = `<strong>총 ${total.toLocaleString('ko-KR')}건의 데이터 다운로드가 완료되었습니다!</strong>`;
|
||||||
|
spinnerEl?.classList.add('is-hidden');
|
||||||
|
|
||||||
|
let html = '<p>* 자동으로 다운로드가 되지 않았다면 아래 버튼을 클릭해주세요.</p>';
|
||||||
|
const baseUrl = `<?php echo G5_DATA_URL; ?>/member_list/<?php echo date('Ymdhis'); ?>/`; // 공통 URL 분리
|
||||||
|
|
||||||
|
if (zipFile) {
|
||||||
|
const url = `${filePath}/${zipFile}`;
|
||||||
|
html += `<a href="${url}" class="btn btn_03" download>압축파일 다운로드</a>`;
|
||||||
|
downloadBoxEl.innerHTML = html;
|
||||||
|
triggerAutoDownload(url, zipFile);
|
||||||
|
} else if (files?.length) {
|
||||||
|
files.forEach((file, index) => {
|
||||||
|
const url = `${filePath}/${file}`;
|
||||||
|
html += `<a class="btn btn_03" href="${url}" download>엑셀파일 다운로드 ${index + 1}</a>`;
|
||||||
|
});
|
||||||
|
downloadBoxEl.innerHTML = html;
|
||||||
|
|
||||||
|
if (files.length === 1) {
|
||||||
|
const url = `${filePath}/${files[0]}`;
|
||||||
|
triggerAutoDownload(url, files[0]);
|
||||||
|
} else {
|
||||||
|
summaryEl.innerHTML = `총 <strong>${totalChunks}</strong>개 파일이 생성되었습니다. 아래 버튼을 눌러 다운로드 받아주세요.`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// SSE 오류 처리
|
||||||
|
function handleDownloadError() {
|
||||||
|
return function(e){
|
||||||
|
const errorMessage = e?.message || e?.data || '알 수 없는 오류가 발생했습니다.';
|
||||||
|
|
||||||
|
document.querySelector('.progress-summary').innerHTML = `엑셀 파일 다운로드 실패`;
|
||||||
|
document.querySelector('.progress-message').innerHTML = `엑셀 파일 다운로드에 실패하였습니다`;
|
||||||
|
document.querySelector('.progress-error').innerHTML = errorMessage;
|
||||||
|
document.querySelector('.loading-message').innerHTML = '';
|
||||||
|
document.querySelector('.progress-spinner').classList.add('is-hidden');
|
||||||
|
|
||||||
|
if (eventSource) {
|
||||||
|
eventSource.close();
|
||||||
|
eventSource = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 자동 다운로드 실행
|
||||||
|
function triggerAutoDownload(url, filename) {
|
||||||
|
const a = document.createElement('a');
|
||||||
|
a.href = url;
|
||||||
|
a.download = filename;
|
||||||
|
document.body.appendChild(a);
|
||||||
|
a.click();
|
||||||
|
document.body.removeChild(a);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once './admin.tail.php';
|
||||||
551
adm/member_list_exel_export.php
Normal file
551
adm/member_list_exel_export.php
Normal file
@ -0,0 +1,551 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200400";
|
||||||
|
require_once './_common.php';
|
||||||
|
require_once './member_list_exel.lib.php'; // 회원관리파일 공통 라이브러리 (상수, 검색 옵션 설정, SQL WHERE 등)
|
||||||
|
include_once(G5_LIB_PATH.'/PHPExcel.php');
|
||||||
|
|
||||||
|
check_demo();
|
||||||
|
auth_check_menu($auth, $sub_menu, 'w');
|
||||||
|
|
||||||
|
ini_set('memory_limit', '-1');
|
||||||
|
session_write_close(); // 세션 종료 및 잠금 해제 (백그라운드 작업을 위해 필요)
|
||||||
|
|
||||||
|
// 파라미터 수집 및 유효성 검사
|
||||||
|
$params = get_member_export_params();
|
||||||
|
if (!$params || !is_array($params)) {
|
||||||
|
member_export_send_progress("error", "데이터가 올바르게 전달되지 않아 작업에 실패하였습니다.");
|
||||||
|
member_export_write_log([], ['success' => false, 'error' => '데이터가 올바르게 전달되지 않아 작업에 실패하였습니다.']);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 기존 생성된 엑셀 파일 삭제 - LOG 및 오늘 날짜 폴더 제외
|
||||||
|
$resultExcelDelete = member_export_delete();
|
||||||
|
|
||||||
|
// 서버 전송 이벤트(SSE)를 위한 헤더 설정
|
||||||
|
member_export_set_sse_headers();
|
||||||
|
|
||||||
|
// 모드 확인
|
||||||
|
$mode = isset($_GET['mode']) ? $_GET['mode'] : '';
|
||||||
|
if ($mode !== 'start') {
|
||||||
|
member_export_send_progress("error", "잘못된 요청 입니다.");
|
||||||
|
member_export_write_log($params, ['success' => false, 'error' => '잘못된 요청 입니다.']);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 회원 내보내기 처리 실행 (예외 처리 포함)
|
||||||
|
*/
|
||||||
|
try {
|
||||||
|
main_member_export($params);
|
||||||
|
}
|
||||||
|
catch (Exception $e)
|
||||||
|
{
|
||||||
|
// 에러 로그 저장 및 SSE 에러 전송
|
||||||
|
error_log("[Member Export Error] " . $e->getMessage());
|
||||||
|
member_export_send_progress("error", $e->getMessage());
|
||||||
|
member_export_write_log($params, ['success' => false, 'error' => $e->getMessage()]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 메인 내보내기 프로세스
|
||||||
|
*/
|
||||||
|
function main_member_export($params)
|
||||||
|
{
|
||||||
|
$total = member_export_get_total_count($params);
|
||||||
|
|
||||||
|
if($total > MEMBER_EXPORT_MAX_SIZE){
|
||||||
|
throw new Exception("엑셀 다운로드 가능 범위(최대 " . number_format(MEMBER_EXPORT_MAX_SIZE) . "건)를 초과했습니다.<br>조건을 추가로 설정하신 후 다시 시도해 주세요.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if($total <= 0){
|
||||||
|
throw new Exception("조회된 데이터가 없어 엑셀 파일을 생성할 수 없습니다.<br>조건을 추가로 설정하신 후 다시 시도해 주세요.");
|
||||||
|
}
|
||||||
|
|
||||||
|
$fileName = 'member_'.MEMBER_BASE_DATE;
|
||||||
|
$fileList = [];
|
||||||
|
$zipFileName = '';
|
||||||
|
|
||||||
|
if ($total > MEMBER_EXPORT_PAGE_SIZE) {
|
||||||
|
// 대용량 데이터 - 분할 처리
|
||||||
|
$pages = (int)ceil($total / MEMBER_EXPORT_PAGE_SIZE);
|
||||||
|
member_export_send_progress("progress", "", 2, $total, 0, $pages, 0);
|
||||||
|
|
||||||
|
for ($i = 1; $i <= $pages; $i++) {
|
||||||
|
$params['page'] = $i;
|
||||||
|
|
||||||
|
member_export_send_progress("progress", "", 2, $total, ($pages == $i ? $total : $i * MEMBER_EXPORT_PAGE_SIZE), $pages, $i);
|
||||||
|
try {
|
||||||
|
$data = member_export_get_data($params);
|
||||||
|
$fileList[] = member_export_create_excel($data, $fileName, $i);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
throw new Exception("총 {$pages}개 중 {$i}번째 파일을 생성하지 못했습니다<br>" . $e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 압축 파일 생성
|
||||||
|
if (count($fileList) > 1) {
|
||||||
|
member_export_send_progress("zipping", "", 2, $total, $total, $pages, $i);
|
||||||
|
$zipResult = member_export_create_zip($fileList, $fileName); // 압축 파일 생성
|
||||||
|
|
||||||
|
if($zipResult['error']){
|
||||||
|
member_export_write_log($params, ['success' => false, 'error' => $zipResult['error']]);
|
||||||
|
member_export_send_progress("zippingError", $zipResult['error']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($zipResult && $zipResult['result']) {
|
||||||
|
member_export_delete($fileList); // 압축 후 엑셀 파일 제거
|
||||||
|
$zipFileName = $zipResult['zipFile'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// 소용량 데이터 - 단일 파일
|
||||||
|
member_export_send_progress("progress", "", 1, $total, 0);
|
||||||
|
$data = member_export_get_data($params);
|
||||||
|
member_export_send_progress("progress", "", 1, $total, $total/2);
|
||||||
|
$fileList[] = member_export_create_excel($data, $fileName, 0);
|
||||||
|
member_export_send_progress("progress", "", 1, $total, $total);
|
||||||
|
}
|
||||||
|
|
||||||
|
member_export_write_log($params, ['success' => true, 'total' => $total, 'files' => $fileList, 'zip' => isset($zipFileName) ? $zipFileName : null]);
|
||||||
|
member_export_send_progress("done", "", 2, $total, $total, $pages, $pages, $fileList, $zipFileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 진행률 전송
|
||||||
|
*/
|
||||||
|
function member_export_send_progress($status, $message = "", $downloadType = 1, $total = 1, $current = 1, $totalChunks = 1, $currentChunk = 1, $files = [], $zipFile = '')
|
||||||
|
{
|
||||||
|
// 연결 상태 확인
|
||||||
|
if (connection_aborted()) return;
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'status' => $status,
|
||||||
|
'message' => $message,
|
||||||
|
'downloadType' => $downloadType,
|
||||||
|
'total' => $total,
|
||||||
|
'current' => $current,
|
||||||
|
'totalChunks' => $totalChunks,
|
||||||
|
'currentChunk' => $currentChunk,
|
||||||
|
'files' => $files,
|
||||||
|
'zipFile' => $zipFile,
|
||||||
|
'filePath' => G5_DATA_URL . "/" . MEMBER_BASE_DIR . "/" . MEMBER_BASE_DATE,
|
||||||
|
];
|
||||||
|
|
||||||
|
echo "data: " . json_encode($data, JSON_UNESCAPED_UNICODE) . "\n\n";
|
||||||
|
|
||||||
|
// 더 안정적인 플러시
|
||||||
|
if (ob_get_level()) ob_end_flush();
|
||||||
|
flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 엑셀 내보내기 설정
|
||||||
|
*/
|
||||||
|
function member_export_get_config()
|
||||||
|
{
|
||||||
|
$type = 1;
|
||||||
|
$configs = [
|
||||||
|
1 => [
|
||||||
|
'title' => ["회원관리파일(일반)"],
|
||||||
|
'headers' => ['아이디', '이름', '닉네임', '휴대폰번호', '전화번호', '이메일', '주소', '회원권한', '포인트', '가입일', '차단',
|
||||||
|
'광고성 이메일 수신동의', '광고성 이메일 동의일자', '광고성 SMS/카카오톡 수신동의', '광고성 SMS/카카오톡 동의일자',
|
||||||
|
'마케팅목적의개인정보수집및이용동의', '마케팅목적의개인정보수집및이용동의일자', '개인정보제3자제공동의', '개인정보제3자제공동의일자'],
|
||||||
|
'fields' => ['mb_id', 'mb_name', 'mb_nick', 'mb_hp', 'mb_tel', 'mb_email', 'mb_addr1', 'mb_level', 'mb_point', 'mb_datetime', 'mb_intercept_date',
|
||||||
|
'mb_mailling','mb_mailling_date', 'mb_sms','mb_sms_date', 'mb_marketing_agree',
|
||||||
|
'mb_marketing_date', 'mb_thirdparty_agree', 'mb_thirdparty_date'],
|
||||||
|
'widths' => [20, 20, 20, 20, 20, 30, 30, 10, 15, 25, 10, 20, 25, 20, 25, 20, 25, 20, 25],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
return isset($configs[$type]) ? $configs[$type] : $configs[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SSE 헤더 설정
|
||||||
|
*/
|
||||||
|
function member_export_set_sse_headers()
|
||||||
|
{
|
||||||
|
header('Content-Type: text/event-stream');
|
||||||
|
header('Cache-Control: no-cache');
|
||||||
|
header('Connection: keep-alive');
|
||||||
|
header('X-Accel-Buffering: no');
|
||||||
|
|
||||||
|
if (ob_get_level()) ob_end_flush();
|
||||||
|
ob_implicit_flush(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 엑셀 컬럼 문자 반환
|
||||||
|
*/
|
||||||
|
function member_export_column_char($i)
|
||||||
|
{
|
||||||
|
return chr(65 + $i);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 회원 데이터 조회
|
||||||
|
*/
|
||||||
|
function member_export_get_data($params)
|
||||||
|
{
|
||||||
|
global $g5;
|
||||||
|
|
||||||
|
$config = member_export_get_config();
|
||||||
|
$fields = $config['fields'];
|
||||||
|
$fields = array_unique($fields);
|
||||||
|
|
||||||
|
// SQL 변환 맵 (가공이 필요한 필드만 정의)
|
||||||
|
$sqlTransformMap = [
|
||||||
|
'mb_datetime' => "IF(mb_datetime = '0000-00-00 00:00:00', '', mb_datetime) AS mb_datetime",
|
||||||
|
'mb_intercept_date' => "IF(mb_intercept_date != '', '차단됨', '정상') AS mb_intercept_date",
|
||||||
|
'mb_sms' => "IF(mb_sms = '1', '동의', '미동의') AS mb_sms",
|
||||||
|
'mb_sms_date' => "IF(mb_sms != '1' OR mb_sms_date = '0000-00-00 00:00:00', '', mb_sms_date) AS mb_sms_date",
|
||||||
|
'mb_mailling' => "IF(mb_mailling = '1', '동의', '미동의') AS mb_mailling",
|
||||||
|
'mb_mailling_date' => "IF(mb_mailling != '1' OR mb_mailling_date = '0000-00-00 00:00:00', '', mb_mailling_date) AS mb_mailling_date",
|
||||||
|
'mb_marketing_agree' => "IF(mb_marketing_agree = '1', '동의', '미동의') AS mb_marketing_agree",
|
||||||
|
'mb_marketing_date' => "IF(mb_marketing_agree != '1' OR mb_marketing_date = '0000-00-00 00:00:00', '', mb_marketing_date) AS mb_marketing_date",
|
||||||
|
'mb_thirdparty_agree' => "IF(mb_thirdparty_agree = '1', '동의', '미동의') AS mb_thirdparty_agree",
|
||||||
|
'mb_thirdparty_date' => "IF(mb_thirdparty_agree != '1' OR mb_thirdparty_date = '0000-00-00 00:00:00', '', mb_thirdparty_date) AS mb_thirdparty_date",
|
||||||
|
];
|
||||||
|
|
||||||
|
// SQL 필드 생성
|
||||||
|
$sqlFields = [];
|
||||||
|
foreach ($fields as $field) {
|
||||||
|
$sqlFields[] = isset($sqlTransformMap[$field]) ? $sqlTransformMap[$field] : $field;
|
||||||
|
}
|
||||||
|
$field_list = implode(', ', $sqlFields);
|
||||||
|
|
||||||
|
$where = member_export_build_where($params);
|
||||||
|
|
||||||
|
$page = (int)(isset($params['page']) ? $params['page'] : 1);
|
||||||
|
if ($page < 1) $page = 1;
|
||||||
|
$offset = ($page - 1) * MEMBER_EXPORT_PAGE_SIZE;
|
||||||
|
|
||||||
|
$sql = "SELECT {$field_list} FROM {$g5['member_table']} {$where} ORDER BY mb_no DESC LIMIT {$offset}, " . MEMBER_EXPORT_PAGE_SIZE;
|
||||||
|
|
||||||
|
$result = sql_query($sql);
|
||||||
|
if (!$result) {
|
||||||
|
throw new Exception("데이터 조회에 실패하였습니다");
|
||||||
|
}
|
||||||
|
|
||||||
|
$excelData = [$config['title'], $config['headers']];
|
||||||
|
|
||||||
|
while ($row = sql_fetch_array($result)) {
|
||||||
|
$rowData = [];
|
||||||
|
foreach ($fields as $field) {
|
||||||
|
$rowData[] = isset($row[$field]) ? $row[$field] : '';
|
||||||
|
}
|
||||||
|
$excelData[] = $rowData;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $excelData;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 엑셀 파일 생성
|
||||||
|
*/
|
||||||
|
function member_export_create_excel($data, $fileName, $index = 0)
|
||||||
|
{
|
||||||
|
$config = member_export_get_config();
|
||||||
|
|
||||||
|
if (!class_exists('PHPExcel')) {
|
||||||
|
error_log('[Member Export Error] PHPExcel 라이브러리를 찾을 수 없습니다.');
|
||||||
|
throw new Exception('파일 생성 중 내부 오류가 발생했습니다: PHPExcel 라이브러리를 찾을 수 없습니다.');
|
||||||
|
}
|
||||||
|
|
||||||
|
// 현재 설정값 백업
|
||||||
|
$currentCache = PHPExcel_Settings::getCacheStorageMethod();
|
||||||
|
|
||||||
|
// 캐싱 모드 설정 (엑셀 생성 전용)
|
||||||
|
$cacheMethods = [
|
||||||
|
PHPExcel_CachedObjectStorageFactory::cache_to_discISAM,
|
||||||
|
PHPExcel_CachedObjectStorageFactory::cache_in_memory_serialized
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach ($cacheMethods as $method) {
|
||||||
|
if (PHPExcel_Settings::setCacheStorageMethod($method)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$excel = new PHPExcel();
|
||||||
|
$sheet = $excel->setActiveSheetIndex(0);
|
||||||
|
|
||||||
|
// 헤더 스타일 적용
|
||||||
|
$last_char = member_export_column_char(count($config['headers']) - 1);
|
||||||
|
$sheet->getStyle("A2:{$last_char}2")->applyFromArray([
|
||||||
|
'fill' => [
|
||||||
|
'type' => PHPExcel_Style_Fill::FILL_SOLID,
|
||||||
|
'startcolor' => ['rgb' => 'D9E1F2'], // 연파랑 배경
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
|
||||||
|
// 셀 정렬 및 줄바꿈 설정
|
||||||
|
$sheet->getStyle("A:{$last_char}")->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER)->setWrapText(true);
|
||||||
|
|
||||||
|
// 컬럼 너비 설정
|
||||||
|
foreach ($config['widths'] as $i => $width) {
|
||||||
|
$sheet->getColumnDimension(member_export_column_char($i))->setWidth($width);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 데이터 입력
|
||||||
|
$sheet->fromArray($data, NULL, 'A1');
|
||||||
|
|
||||||
|
// 디렉토리 확인
|
||||||
|
member_export_ensure_directory(MEMBER_EXPORT_DIR);
|
||||||
|
|
||||||
|
// 파일명 생성
|
||||||
|
$subname = $index == 0 ? 'all' : sprintf("%02d", $index);
|
||||||
|
$filename = $fileName . "_" . $subname . ".xlsx";
|
||||||
|
$filePath = MEMBER_EXPORT_DIR . "/" . $filename;
|
||||||
|
|
||||||
|
// 파일 저장
|
||||||
|
$writer = PHPExcel_IOFactory::createWriter($excel, 'Excel2007');
|
||||||
|
$writer->setPreCalculateFormulas(false);
|
||||||
|
$writer->save($filePath);
|
||||||
|
|
||||||
|
unset($excel, $sheet, $writer); // 생성 완료 후 메모리 해제
|
||||||
|
}
|
||||||
|
catch (Exception $e)
|
||||||
|
{
|
||||||
|
throw new Exception("엑셀 파일 생성에 실패하였습니다: " . $e->getMessage());
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
// 캐싱 모드 원래 상태로 복원
|
||||||
|
if ($currentCache) {
|
||||||
|
PHPExcel_Settings::setCacheStorageMethod($currentCache);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $filename;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 압축 파일 생성
|
||||||
|
*/
|
||||||
|
function member_export_create_zip($files, $zipFileName)
|
||||||
|
{
|
||||||
|
if (!class_exists('ZipArchive')) {
|
||||||
|
error_log('[Member Export Error] ZipArchive 클래스를 사용할 수 없습니다.');
|
||||||
|
return ['error' => '파일을 압축하는 중 문제가 발생했습니다. 개별 파일로 제공됩니다.<br>: ZipArchive 클래스를 사용할 수 없습니다.'];
|
||||||
|
}
|
||||||
|
|
||||||
|
member_export_ensure_directory(MEMBER_EXPORT_DIR);
|
||||||
|
$destinationZipPath = rtrim(MEMBER_EXPORT_DIR, "/") . "/" . $zipFileName . ".zip";
|
||||||
|
|
||||||
|
$zip = new ZipArchive();
|
||||||
|
if ($zip->open($destinationZipPath, ZipArchive::CREATE | ZipArchive::OVERWRITE) !== TRUE) {
|
||||||
|
return ['error' => "파일을 압축하는 중 문제가 발생했습니다. 개별 파일로 제공됩니다."];
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($files as $file) {
|
||||||
|
$filePath = MEMBER_EXPORT_DIR . "/" . $file;
|
||||||
|
if (file_exists($filePath)) {
|
||||||
|
$zip->addFile($filePath, basename($filePath));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $zip->close();
|
||||||
|
|
||||||
|
return [
|
||||||
|
'result' => $result,
|
||||||
|
'zipFile' => $zipFileName . ".zip",
|
||||||
|
'zipPath' => $destinationZipPath,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 디렉토리 생성 및 확인
|
||||||
|
*/
|
||||||
|
function member_export_ensure_directory($dir)
|
||||||
|
{
|
||||||
|
if (!is_dir($dir)) {
|
||||||
|
if (!@mkdir($dir, G5_DIR_PERMISSION, true)) {
|
||||||
|
throw new Exception("디렉토리 생성 실패");
|
||||||
|
}
|
||||||
|
@chmod($dir, G5_DIR_PERMISSION);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!is_writable($dir)) {
|
||||||
|
throw new Exception("디렉토리 쓰기 권한 없음");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 파일 삭제 - 값이 있으면 해당 파일만 삭제, 없으면 디렉토리 내 모든 파일 삭제
|
||||||
|
* - 알집 생성 완료 시 엑셀 파일 제거
|
||||||
|
* - 작업 전 오늘 날짜 폴더 및 log 폴더를 제외한 나머지 파일 모두 제거
|
||||||
|
*/
|
||||||
|
function member_export_delete($fileList = [])
|
||||||
|
{
|
||||||
|
$cnt = 0;
|
||||||
|
|
||||||
|
// 파일 리스트가 있는 경우 -> 해당 파일만 삭제
|
||||||
|
if (!empty($fileList)) {
|
||||||
|
foreach ($fileList as $file) {
|
||||||
|
$filePath = rtrim(MEMBER_EXPORT_DIR, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $file;
|
||||||
|
if (file_exists($filePath) && is_file($filePath) && @unlink($filePath)) {
|
||||||
|
$cnt++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 파일 리스트가 없는 경우 -> 디렉토리 내 모든 파일 삭제
|
||||||
|
else {
|
||||||
|
$files = glob(rtrim(G5_DATA_PATH . "/" . MEMBER_BASE_DIR, '/') . '/*');
|
||||||
|
|
||||||
|
function deleteFolder($dir) {
|
||||||
|
foreach (glob($dir . '/{.,}*', GLOB_BRACE) as $item) {
|
||||||
|
if (in_array(basename($item), ['.', '..'])) continue;
|
||||||
|
is_dir($item) ? deleteFolder($item) : unlink($item);
|
||||||
|
}
|
||||||
|
rmdir($dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($files as $file) {
|
||||||
|
$name = basename($file);
|
||||||
|
|
||||||
|
// log 폴더와 오늘 날짜로 시작하는 폴더는 제외
|
||||||
|
if ($name === 'log' || preg_match('/^' . date('Ymd') . '\d{6}$/', $name)) continue;
|
||||||
|
|
||||||
|
if (is_file($file) && pathinfo($file, PATHINFO_EXTENSION) !== 'log' && @unlink($file)) {
|
||||||
|
$cnt++;
|
||||||
|
} elseif (is_dir($file)) {
|
||||||
|
deleteFolder($file); // 재귀 폴더 삭제 함수 사용
|
||||||
|
$cnt++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $cnt;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 로그 작성
|
||||||
|
*/
|
||||||
|
function member_export_write_log($params, $result = [])
|
||||||
|
{
|
||||||
|
global $member;
|
||||||
|
|
||||||
|
$maxSize = 1024 * 1024 * 2; // 2MB
|
||||||
|
$maxFiles = 10; // 최대 로그 파일 수 (필요시 조정)
|
||||||
|
$username = isset($member['mb_id']) ? $member['mb_id'] : 'guest';
|
||||||
|
$datetime = date("Y-m-d H:i:s");
|
||||||
|
|
||||||
|
if (!is_dir(MEMBER_LOG_DIR)) {
|
||||||
|
@mkdir(MEMBER_LOG_DIR, G5_DIR_PERMISSION, true);
|
||||||
|
@chmod(MEMBER_LOG_DIR, G5_DIR_PERMISSION);
|
||||||
|
}
|
||||||
|
|
||||||
|
$logFiles = glob(MEMBER_LOG_DIR . "/export_log_*.log") ?: [];
|
||||||
|
|
||||||
|
// 최신 파일 기준 정렬 (최신 → 오래된)
|
||||||
|
usort($logFiles, fn($a, $b) => filemtime($b) - filemtime($a));
|
||||||
|
|
||||||
|
$latestLogFile = isset($logFiles[0]) ? $logFiles[0] : null;
|
||||||
|
|
||||||
|
// 용량 기준으로 새 파일 생성
|
||||||
|
if (!$latestLogFile || filesize($latestLogFile) >= $maxSize) {
|
||||||
|
$latestLogFile = MEMBER_LOG_DIR . "/export_log_" . date("YmdHi") . ".log";
|
||||||
|
file_put_contents($latestLogFile, '');
|
||||||
|
array_unshift($logFiles, $latestLogFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 최대 파일 수 초과 시 오래된 파일 제거
|
||||||
|
if (count($logFiles) > $maxFiles) {
|
||||||
|
$filesToDelete = array_slice($logFiles, $maxFiles);
|
||||||
|
foreach ($filesToDelete as $file) {
|
||||||
|
@unlink($file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$success = isset($result['success']) && $result['success'] === true;
|
||||||
|
$status = $success ? '성공' : '실패';
|
||||||
|
|
||||||
|
// 조건 정리
|
||||||
|
$condition = [];
|
||||||
|
|
||||||
|
// 검색 조건
|
||||||
|
if ($params['use_stx'] == 1 && !empty($params['stx'])) {
|
||||||
|
$sfl_list = get_export_config('sfl_list');
|
||||||
|
|
||||||
|
$label = isset($sfl_list[$params['sfl']]) ? $sfl_list[$params['sfl']] : '';
|
||||||
|
$condition[] = "검색({$params['stx_cond']}) : {$label} - {$params['stx']}";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 레벨 조건
|
||||||
|
if ($params['use_level'] == 1 && ($params['level_start'] || $params['level_end'])) {
|
||||||
|
$condition[] = "레벨: {$params['level_start']}~{$params['level_end']}";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 가입일 조건
|
||||||
|
if ($params['use_date'] == 1 && ($params['date_start'] || $params['date_end'])) {
|
||||||
|
$condition[] = "가입일: {$params['date_start']}~{$params['date_end']}";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 포인트 조건
|
||||||
|
if ($params['use_point'] == 1 && $params['point'] !== '') {
|
||||||
|
$point_cond_map = get_export_config('point_cond_map');
|
||||||
|
$symbol = isset($point_cond_map[$params['point_cond']]) ? $point_cond_map[$params['point_cond']] : '≥';
|
||||||
|
$condition[] = "포인트 {$symbol} {$params['point']}";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 휴대폰 여부
|
||||||
|
if ($params['use_hp_exist'] == 1) {
|
||||||
|
$condition[] = "휴대폰번호 있는 경우만";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 광고 수신 동의
|
||||||
|
if ($params['ad_range_only'] == 1) {
|
||||||
|
$ad_range_list = get_export_config('ad_range_list');
|
||||||
|
$label = isset($ad_range_list[$params['ad_range_type']]) ? $ad_range_list[$params['ad_range_type']] : '';
|
||||||
|
$condition[] = "수신동의: 예 ({$label})";
|
||||||
|
|
||||||
|
if ($params['ad_range_type'] == "custom_period" && ($params['agree_date_start'] || $params['agree_date_end'])) {
|
||||||
|
$condition[] = "수신동의일: {$params['agree_date_start']}~{$params['agree_date_end']}";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (in_array($params['ad_range_type'], ["month_confirm", "custom_period"])){
|
||||||
|
$channels = array_filter([
|
||||||
|
!empty($params['ad_mailling']) && (int)$params['ad_mailling'] === 1 ? '이메일' : null,
|
||||||
|
!empty($params['ad_sms']) && (int)$params['ad_sms'] === 1 ? 'SMS/카카오톡' : null,
|
||||||
|
]);
|
||||||
|
|
||||||
|
if ($channels) {
|
||||||
|
$condition[] = '수신채널: ' . implode(', ', $channels);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 차단회원 처리
|
||||||
|
if ($params['use_intercept'] == 1) {
|
||||||
|
$intercept_list = get_export_config('intercept_list');
|
||||||
|
$label = isset($intercept_list[$params['intercept']]) ? $intercept_list[$params['intercept']] : '';
|
||||||
|
if ($label) $condition[] = $label;
|
||||||
|
}
|
||||||
|
|
||||||
|
$conditionStr = !empty($condition) ? implode(', ', $condition) : '없음';
|
||||||
|
$line1 = "[{$datetime}] [{$status}] 관리자: {$username}";
|
||||||
|
|
||||||
|
// 성공일 경우 추가 정보
|
||||||
|
if ($success) {
|
||||||
|
$total = isset($result['total']) ? $result['total'] : 0;
|
||||||
|
$fileCount = isset($result['zip']) ? 1 : count(isset($result['files']) ? $result['files'] : []);
|
||||||
|
$line1 .= " | 총 {$total}건 | 파일: {$fileCount}개";
|
||||||
|
}
|
||||||
|
|
||||||
|
$logEntry = $line1 . PHP_EOL;
|
||||||
|
$logEntry .= "조건: {$conditionStr}" . PHP_EOL;
|
||||||
|
|
||||||
|
if (!$success && !empty($result['error'])) {
|
||||||
|
$logEntry .= "오류 메시지: {$result['error']}" . PHP_EOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
$logEntry .= PHP_EOL;
|
||||||
|
|
||||||
|
// 파일에 기록
|
||||||
|
if (@file_put_contents($latestLogFile, $logEntry, FILE_APPEND | LOCK_EX) === false) {
|
||||||
|
error_log("[Member Export Error] 로그 파일 기록 실패: {$latestLogFile}");
|
||||||
|
}
|
||||||
|
}
|
||||||
72
adm/member_list_file_delete.php
Normal file
72
adm/member_list_file_delete.php
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = '100930';
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
if ($is_admin != 'super')
|
||||||
|
alert('최고관리자만 접근 가능합니다.', G5_URL);
|
||||||
|
|
||||||
|
$g5['title'] = '회원관리파일 일괄삭제';
|
||||||
|
include_once(G5_ADMIN_PATH.'/admin.head.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="local_desc02 local_desc">
|
||||||
|
<p>
|
||||||
|
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
flush();
|
||||||
|
|
||||||
|
if (!$dir = @opendir(G5_DATA_PATH . '/member_list')) {
|
||||||
|
echo '<p>회원관리파일를 열지못했습니다.</p>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$cnt = 0;
|
||||||
|
echo '<ul class="session_del">' . PHP_EOL;
|
||||||
|
|
||||||
|
$files = glob(G5_DATA_PATH . '/member_list/*');
|
||||||
|
$cnt = 0;
|
||||||
|
|
||||||
|
// 폴더 및 하위 파일 재귀 삭제 함수
|
||||||
|
function deleteFolder($folderPath) {
|
||||||
|
$items = glob($folderPath . '/*');
|
||||||
|
foreach ($items as $item) {
|
||||||
|
if (is_dir($item)) {
|
||||||
|
deleteFolder($item);
|
||||||
|
} else {
|
||||||
|
unlink($item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rmdir($folderPath); // 폴더 자체 삭제
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_array($files)) {
|
||||||
|
foreach ($files as $member_list_file) {
|
||||||
|
// log 확장자가 아닌 파일/디렉토리 처리
|
||||||
|
$ext = strtolower(pathinfo($member_list_file, PATHINFO_EXTENSION));
|
||||||
|
$basename = basename($member_list_file);
|
||||||
|
|
||||||
|
if (is_file($member_list_file) && $ext !== 'log') {
|
||||||
|
unlink($member_list_file);
|
||||||
|
echo '<li>파일 삭제: ' . $member_list_file . '</li>' . PHP_EOL;
|
||||||
|
$cnt++;
|
||||||
|
} elseif (is_dir($member_list_file) && $basename !== 'log') {
|
||||||
|
deleteFolder($member_list_file);
|
||||||
|
echo '<li>폴더 삭제: ' . $member_list_file . '</li>' . PHP_EOL;
|
||||||
|
$cnt++;
|
||||||
|
}
|
||||||
|
|
||||||
|
flush();
|
||||||
|
|
||||||
|
if ($cnt % 10 == 0) {
|
||||||
|
echo PHP_EOL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo '<li>완료됨</li></ul>' . PHP_EOL;
|
||||||
|
echo '<div class="local_desc01 local_desc"><p><strong>회원관리파일 ' . $cnt . '건 삭제 완료됐습니다.</strong><br>프로그램의 실행을 끝마치셔도 좋습니다.</p></div>' . PHP_EOL;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once(G5_ADMIN_PATH.'/admin.tail.php');
|
||||||
@ -27,6 +27,30 @@ if ($_POST['act_button'] == "선택수정") {
|
|||||||
$post_mb_sms = isset($_POST['mb_sms'][$k]) ? (int) $_POST['mb_sms'][$k] : 0;
|
$post_mb_sms = isset($_POST['mb_sms'][$k]) ? (int) $_POST['mb_sms'][$k] : 0;
|
||||||
$post_mb_open = isset($_POST['mb_open'][$k]) ? (int) $_POST['mb_open'][$k] : 0;
|
$post_mb_open = isset($_POST['mb_open'][$k]) ? (int) $_POST['mb_open'][$k] : 0;
|
||||||
|
|
||||||
|
$agree_items = [];
|
||||||
|
// 광고성 이메일 수신동의 일자 추가
|
||||||
|
$post_mb_mailling_default = isset($_POST['mb_mailling_default'][$k]) ? (int) $_POST['mb_mailling_default'][$k] : 0;
|
||||||
|
$sql_mailling_date = "";
|
||||||
|
if ($post_mb_mailling_default != $post_mb_mailling) {
|
||||||
|
$sql_mailling_date = " , mb_mailling_date = '".G5_TIME_YMDHIS."' ";
|
||||||
|
$agree_items[] = "광고성 이메일 수신(" . ($post_mb_mailling == 1 ? "동의" : "철회") . ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 광고성 SMS/카카오톡 수신동의 일자 추가
|
||||||
|
$post_mb_sms_default = isset($_POST['mb_sms_default'][$k]) ? (int) $_POST['mb_sms_default'][$k] : 0;
|
||||||
|
$sql_sms_date = "";
|
||||||
|
if ($post_mb_sms_default != $post_mb_sms) {
|
||||||
|
$sql_sms_date = " , mb_sms_date = '".G5_TIME_YMDHIS."' ";
|
||||||
|
$agree_items[] = "광고성 SMS/카카오톡 수신(" . ($post_mb_sms == 1 ? "동의" : "철회") . ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 동의 로그 추가
|
||||||
|
$sql_agree_log = "";
|
||||||
|
if (!empty($agree_items)) {
|
||||||
|
$agree_log = "[".G5_TIME_YMDHIS.", 회원관리 선택수정] " . implode(' | ', $agree_items) . "\n";
|
||||||
|
$sql_agree_log .= " , mb_agree_log = CONCAT('{$agree_log}', IFNULL(mb_agree_log, ''))";
|
||||||
|
}
|
||||||
|
|
||||||
$mb_datas[] = $mb = get_member($_POST['mb_id'][$k]);
|
$mb_datas[] = $mb = get_member($_POST['mb_id'][$k]);
|
||||||
|
|
||||||
if (!(isset($mb['mb_id']) && $mb['mb_id'])) {
|
if (!(isset($mb['mb_id']) && $mb['mb_id'])) {
|
||||||
@ -50,6 +74,9 @@ if ($_POST['act_button'] == "선택수정") {
|
|||||||
mb_open = '" . $post_mb_open . "',
|
mb_open = '" . $post_mb_open . "',
|
||||||
mb_certify = '" . sql_real_escape_string($post_mb_certify) . "',
|
mb_certify = '" . sql_real_escape_string($post_mb_certify) . "',
|
||||||
mb_adult = '{$mb_adult}'
|
mb_adult = '{$mb_adult}'
|
||||||
|
{$sql_mailling_date}
|
||||||
|
{$sql_sms_date}
|
||||||
|
{$sql_agree_log}
|
||||||
where mb_id = '" . sql_real_escape_string($mb['mb_id']) . "' ";
|
where mb_id = '" . sql_real_escape_string($mb['mb_id']) . "' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -125,12 +125,15 @@ function pg_setting_check($is_print=false){
|
|||||||
|
|
||||||
$msg = '';
|
$msg = '';
|
||||||
$pg_msg = '';
|
$pg_msg = '';
|
||||||
|
$pg_test_conf_link = G5_ADMIN_URL.'/shop_admin/configform.php#de_card_test1';
|
||||||
|
|
||||||
if( $default['de_card_test'] ){
|
if( $default['de_card_test'] ){
|
||||||
if( $default['de_pg_service'] === 'kcp' && $default['de_kcp_mid'] && $default['de_kcp_site_key'] ){
|
if( $default['de_pg_service'] === 'kcp' && $default['de_kcp_mid'] && $default['de_kcp_site_key'] ){
|
||||||
$pg_msg = 'NHN KCP';
|
$pg_msg = 'NHN KCP';
|
||||||
} else if ( $default['de_pg_service'] === 'lg' && $config['cf_lg_mid'] && $config['cf_lg_mert_key'] ){
|
} else if ( $default['de_pg_service'] === 'lg' && $config['cf_lg_mid'] && $config['cf_lg_mert_key'] ){
|
||||||
$pg_msg = 'LG유플러스';
|
$pg_msg = 'LG유플러스';
|
||||||
|
} else if ( $default['de_pg_service'] === 'toss' && $config['cf_lg_mid'] && $config['cf_toss_client_key'] && $config['cf_toss_secret_key'] ){
|
||||||
|
$msg .= '<div class="admin_pg_notice od_test_caution">(주의!) 토스페이먼츠 결제의 결제 설정이 현재 테스트결제로 되어 있습니다.<br>반드시 <a href="#lg_info_anchor">상점 API키</a>를 <u>[테스트]키</u>로 설정한 후 테스트결제를 진행해야합니다.<br>쇼핑몰 운영 시에는 실결제로 전환하여 <u>[라이브]키</u>로 설정해 주시기 바랍니다.<br>아래 링크를 클릭하여 실결제로 설정하여 운영해 주세요.<br><a href="'.$pg_test_conf_link.'" class="pg_test_conf_link">'.$pg_test_conf_link.'</a></div>';
|
||||||
} else if ( $default['de_pg_service'] === 'inicis' && $default['de_inicis_mid'] && $default['de_inicis_sign_key'] ){
|
} else if ( $default['de_pg_service'] === 'inicis' && $default['de_inicis_mid'] && $default['de_inicis_sign_key'] ){
|
||||||
$pg_msg = 'KG이니시스';
|
$pg_msg = 'KG이니시스';
|
||||||
} else if ( $default['de_pg_service'] === 'nicepay' && $default['de_nicepay_mid'] && $default['de_nicepay_key'] ){
|
} else if ( $default['de_pg_service'] === 'nicepay' && $default['de_nicepay_mid'] && $default['de_nicepay_key'] ){
|
||||||
@ -147,7 +150,6 @@ function pg_setting_check($is_print=false){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( $pg_msg ){
|
if( $pg_msg ){
|
||||||
$pg_test_conf_link = G5_ADMIN_URL.'/shop_admin/configform.php#de_card_test1';
|
|
||||||
$msg .= '<div class="admin_pg_notice od_test_caution">(주의!) '.$pg_msg.' 결제의 결제 설정이 현재 테스트결제 로 되어 있습니다.<br>테스트결제시 실제 결제가 되지 않으므로, 쇼핑몰 운영중이면 반드시 실결제로 설정하여 운영하셔야 합니다.<br>아래 링크를 클릭하여 실결제로 설정하여 운영해 주세요.<br><a href="'.$pg_test_conf_link.'" class="pg_test_conf_link">'.$pg_test_conf_link.'</a></div>';
|
$msg .= '<div class="admin_pg_notice od_test_caution">(주의!) '.$pg_msg.' 결제의 결제 설정이 현재 테스트결제 로 되어 있습니다.<br>테스트결제시 실제 결제가 되지 않으므로, 쇼핑몰 운영중이면 반드시 실결제로 설정하여 운영하셔야 합니다.<br>아래 링크를 클릭하여 실결제로 설정하여 운영해 주세요.<br><a href="'.$pg_test_conf_link.'" class="pg_test_conf_link">'.$pg_test_conf_link.'</a></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,6 +172,10 @@ function is_cancel_shop_pg_order($od){
|
|||||||
$is_od_pg_cancel = true;
|
$is_od_pg_cancel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($od['od_pg'] === 'toss' && in_array($od['od_settle_case'], array('계좌이체', '휴대폰'))) {
|
||||||
|
$is_od_pg_cancel = true;
|
||||||
|
}
|
||||||
|
|
||||||
return $is_od_pg_cancel;
|
return $is_od_pg_cancel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -215,6 +215,14 @@ if (! isset($default['de_nicepay_mid'])) {
|
|||||||
sql_query($sql, false);
|
sql_query($sql, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 토스페이먼츠 client, secret key 추가
|
||||||
|
if( ! isset($config['cf_toss_client_key']) ){
|
||||||
|
$sql = "ALTER TABLE `{$g5['config_table']}`
|
||||||
|
ADD COLUMN `cf_toss_client_key` VARCHAR(100) NOT NULL DEFAULT '' AFTER `cf_lg_mert_key`,
|
||||||
|
ADD COLUMN `cf_toss_secret_key` VARCHAR(100) NOT NULL DEFAULT '' AFTER `cf_toss_client_key`; ";
|
||||||
|
sql_query($sql, false);
|
||||||
|
}
|
||||||
|
|
||||||
if( function_exists('pg_setting_check') ){
|
if( function_exists('pg_setting_check') ){
|
||||||
pg_setting_check(true);
|
pg_setting_check(true);
|
||||||
}
|
}
|
||||||
@ -636,17 +644,23 @@ if(!$default['de_kakaopay_cancelpwd']){
|
|||||||
<?php echo G5_SHOP_URL; ?>/settle_kcp_common.php</td>
|
<?php echo G5_SHOP_URL; ?>/settle_kcp_common.php</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="inicis_vbank_url" class="pg_vbank_url">
|
<tr id="inicis_vbank_url" class="pg_vbank_url">
|
||||||
<th scope="row">KG이니시스 가상계좌 입금통보 URL</th>
|
<th scope="row">KG이니시스 가상계좌<br>입금통보 URL</th>
|
||||||
<td>
|
<td>
|
||||||
<?php echo help("KG이니시스 가상계좌 사용시 다음 주소를 <strong><a href=\"https://iniweb.inicis.com/\" target=\"_blank\">KG이니시스 관리자</a> > 거래내역 > 가상계좌 > 입금통보방식선택 > URL 수신 설정</strong>에 넣으셔야 상점에 자동으로 입금 통보됩니다."); ?>
|
<?php echo help("KG이니시스 가상계좌 사용시 다음 주소를 <strong><a href=\"https://iniweb.inicis.com/\" target=\"_blank\">KG이니시스 관리자</a> > 거래내역 > 가상계좌 > 입금통보방식선택 > URL 수신 설정</strong>에 넣으셔야 상점에 자동으로 입금 통보됩니다."); ?>
|
||||||
<?php echo G5_SHOP_URL; ?>/settle_inicis_common.php</td>
|
<?php echo G5_SHOP_URL; ?>/settle_inicis_common.php</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="nicepay_vbank_url" class="pg_vbank_url">
|
<tr id="nicepay_vbank_url" class="pg_vbank_url">
|
||||||
<th scope="row">NICEPAY 가상계좌 입금통보 URL</th>
|
<th scope="row">NICEPAY 가상계좌<br>입금통보 URL</th>
|
||||||
<td>
|
<td>
|
||||||
<?php echo help("NICEPAY 가상계좌 사용시 다음 주소를 <strong><a href=\"https://npg.nicepay.co.kr/\" target=\"_blank\">NICEPAY 관리자</a> > 가맹점관리자페이지 설정 (메인화면 → 가맹점정보 클릭)</strong>에 넣으셔야 상점에 자동으로 입금 통보됩니다."); ?>
|
<?php echo help("NICEPAY 가상계좌 사용시 다음 주소를 <strong><a href=\"https://npg.nicepay.co.kr/\" target=\"_blank\">NICEPAY 관리자</a> > 가맹점관리자페이지 설정 (메인화면 → 가맹점정보 클릭)</strong>에 넣으셔야 상점에 자동으로 입금 통보됩니다."); ?>
|
||||||
<?php echo G5_SHOP_URL; ?>/settle_nicepay_common.php</td>
|
<?php echo G5_SHOP_URL; ?>/settle_nicepay_common.php</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr id="toss_vbank_url" class="pg_vbank_url">
|
||||||
|
<th scope="row">토스페이먼츠 가상계좌<br>입금통보 URL</th>
|
||||||
|
<td>
|
||||||
|
<?php echo help("토스페이먼츠 가상계좌 사용시 다음 주소를 <strong><a href=\"https://app.tosspayments.com/\" target=\"_blank\">토스페이먼츠 상점관리자</a> > 개발자센터 > 웹훅 > 웹훅 등록하기에 URL</strong>에 넣으시고, <strong>구독할 이벤트를 [DEPOSIT_CALLBACK]</strong>을 선택하셔야 상점에 자동으로 입금 통보됩니다."); ?>
|
||||||
|
<?php echo G5_SHOP_URL; ?>/settle_toss_common.php</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="de_hp_use">휴대폰결제사용</label></th>
|
<th scope="row"><label for="de_hp_use">휴대폰결제사용</label></th>
|
||||||
<td>
|
<td>
|
||||||
@ -687,6 +701,7 @@ if(!$default['de_kakaopay_cancelpwd']){
|
|||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="de_taxsave_use">현금영수증<br>발급사용</label></th>
|
<th scope="row"><label for="de_taxsave_use">현금영수증<br>발급사용</label></th>
|
||||||
<td>
|
<td>
|
||||||
@ -775,7 +790,8 @@ if(!$default['de_kakaopay_cancelpwd']){
|
|||||||
<?php echo help('쇼핑몰에서 사용할 결제대행사를 선택합니다.'); ?>
|
<?php echo help('쇼핑몰에서 사용할 결제대행사를 선택합니다.'); ?>
|
||||||
<ul class="de_pg_tab">
|
<ul class="de_pg_tab">
|
||||||
<li class="<?php if($default['de_pg_service'] == 'kcp') echo 'tab-current'; ?>"><a href="#kcp_info_anchor" data-value="kcp" title="NHN KCP 선택하기" >NHN KCP</a></li>
|
<li class="<?php if($default['de_pg_service'] == 'kcp') echo 'tab-current'; ?>"><a href="#kcp_info_anchor" data-value="kcp" title="NHN KCP 선택하기" >NHN KCP</a></li>
|
||||||
<li class="<?php if($default['de_pg_service'] == 'lg') echo 'tab-current'; ?>"><a href="#lg_info_anchor" data-value="lg" title="토스페이먼츠 선택하기">토스페이먼츠</a></li>
|
<li class="<?php if($default['de_pg_service'] == 'lg') echo 'tab-current'; ?>"><a href="#lg_info_anchor" data-value="lg" title="토스페이먼츠(구버전) 선택하기">토스페이먼츠(구버전)</a></li>
|
||||||
|
<li class="<?php if($default['de_pg_service'] == 'toss') echo 'tab-current'; ?>"><a href="#lg_info_anchor" data-value="toss" title="토스페이먼츠 선택하기">토스페이먼츠</a></li>
|
||||||
<li class="<?php if($default['de_pg_service'] == 'inicis') echo 'tab-current'; ?>"><a href="#inicis_info_anchor" data-value="inicis" title="KG이니시스 선택하기">KG이니시스</a></li>
|
<li class="<?php if($default['de_pg_service'] == 'inicis') echo 'tab-current'; ?>"><a href="#inicis_info_anchor" data-value="inicis" title="KG이니시스 선택하기">KG이니시스</a></li>
|
||||||
<li class="<?php if($default['de_pg_service'] == 'nicepay') echo 'tab-current'; ?>"><a href="#nicepay_info_anchor" data-value="nicepay" title="NICEPAY 선택하기">NICEPAY</a></li>
|
<li class="<?php if($default['de_pg_service'] == 'nicepay') echo 'tab-current'; ?>"><a href="#nicepay_info_anchor" data-value="nicepay" title="NICEPAY 선택하기">NICEPAY</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -833,12 +849,26 @@ if(!$default['de_kakaopay_cancelpwd']){
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="pg_info_fld lg_info_fld">
|
<tr class="pg_info_fld lg_info_fld">
|
||||||
<th scope="row"><label for="cf_lg_mert_key">토스페이먼츠 MERT KEY</label></th>
|
<th scope="row"><label for="cf_lg_mert_key">토스페이먼츠(구버전) MERT KEY</label></th>
|
||||||
<td>
|
<td>
|
||||||
<?php echo help("토스페이먼츠 상점MertKey는 상점관리자 -> 계약정보 -> 상점정보관리에서 확인하실 수 있습니다.\n예) 95160cce09854ef44d2edb2bfb05f9f3\n<a href=\"".G5_ADMIN_URL."/config_form.php#anc_cf_cert\">기본환경설정 > 본인확인</a> 설정의 토스페이먼츠 MERT KEY와 동일합니다."); ?>
|
<?php echo help("토스페이먼츠(구버전) 상점 MertKey는 상점관리자 -> 개발자센터 -> API키 -> 머트 키에서 확인하실 수 있습니다.\n예) 95160cce09854ef44d2edb2bfb05f9f3"); ?>
|
||||||
<input type="text" name="cf_lg_mert_key" value="<?php echo get_sanitize_input($config['cf_lg_mert_key']); ?>" id="cf_lg_mert_key" class="frm_input " size="36" maxlength="50">
|
<input type="text" name="cf_lg_mert_key" value="<?php echo get_sanitize_input($config['cf_lg_mert_key']); ?>" id="cf_lg_mert_key" class="frm_input " size="36" maxlength="50">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr class="pg_info_fld lg_info_fld_v2">
|
||||||
|
<th scope="row"><label for="cf_toss_client_key">토스페이먼츠 API Client Key</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help("토스페이먼츠 API 클라이언트 키는 상점관리자 -> 개발자센터 -> API키 -> 클라이언트 키에서 확인하실 수 있습니다. 예) live_ck_tosspayment\n실결제용 [라이브] 키와 테스트용 [테스트] 키는 서로 다르므로, <b>테스트로 결제시에는 [테스트] 키</b>로 변경하여 사용해주시기 바랍니다. 예) 테스트 키: test_ck_tosspayment"); ?>
|
||||||
|
<input type="text" name="cf_toss_client_key" value="<?php echo get_sanitize_input($config['cf_toss_client_key']); ?>" id="cf_toss_client_key" class="frm_input " size="40" maxlength="50">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="pg_info_fld lg_info_fld_v2">
|
||||||
|
<th scope="row"><label for="cf_toss_secret_key">토스페이먼츠 API Secret Key</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help("토스페이먼츠 API 시크릿 키는 상점관리자 -> 개발자센터 -> API키 -> 시크릿 키에서 확인하실 수 있습니다. 예) live_sk_tosspayment\n실결제용 [라이브] 키와 테스트용 [테스트] 키는 서로 다르므로, <b>테스트로 결제시에는 [테스트] 키</b>로 변경하여 사용해주시기 바랍니다. 예) 테스트 키: test_sk_tosspayment"); ?>
|
||||||
|
<input type="text" name="cf_toss_secret_key" value="<?php echo get_sanitize_input($config['cf_toss_secret_key']); ?>" id="cf_toss_secret_key" class="frm_input " size="40" maxlength="50">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr class="pg_info_fld inicis_info_fld" id="inicis_info_anchor">
|
<tr class="pg_info_fld inicis_info_fld" id="inicis_info_anchor">
|
||||||
<th scope="row">
|
<th scope="row">
|
||||||
<label for="de_inicis_mid">KG이니시스 상점아이디</label><br>
|
<label for="de_inicis_mid">KG이니시스 상점아이디</label><br>
|
||||||
@ -1070,6 +1100,9 @@ if(!$default['de_kakaopay_cancelpwd']){
|
|||||||
<a href="https://app.tosspayments.com/" target="_blank" class="btn_frmline">실결제 관리자</a>
|
<a href="https://app.tosspayments.com/" target="_blank" class="btn_frmline">실결제 관리자</a>
|
||||||
<a href="https://pgweb.tosspayments.com/tmert" target="_blank" class="btn_frmline">테스트 관리자</a>
|
<a href="https://pgweb.tosspayments.com/tmert" target="_blank" class="btn_frmline">테스트 관리자</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="scf_cardtest toss_cardtest">
|
||||||
|
<a href="https://app.tosspayments.com/" target="_blank" class="btn_frmline">상점 관리자</a>
|
||||||
|
</div>
|
||||||
<div class="scf_cardtest inicis_cardtest">
|
<div class="scf_cardtest inicis_cardtest">
|
||||||
<a href="https://iniweb.inicis.com/" target="_blank" class="btn_frmline">상점 관리자</a>
|
<a href="https://iniweb.inicis.com/" target="_blank" class="btn_frmline">상점 관리자</a>
|
||||||
</div>
|
</div>
|
||||||
@ -1095,6 +1128,9 @@ if(!$default['de_kakaopay_cancelpwd']){
|
|||||||
<ul id="lg_cardtest_tip" class="scf_cardtest_tip_adm scf_cardtest_tip_adm_hide">
|
<ul id="lg_cardtest_tip" class="scf_cardtest_tip_adm scf_cardtest_tip_adm_hide">
|
||||||
<li>테스트결제의 <a href="https://pgweb.tosspayments.com/tmert" target="_blank">상점관리자</a> 로그인 정보는 토스페이먼츠 상점아이디 첫 글자에 t를 추가해서 로그인하시기 바랍니다. 예) tsi_lguplus</li>
|
<li>테스트결제의 <a href="https://pgweb.tosspayments.com/tmert" target="_blank">상점관리자</a> 로그인 정보는 토스페이먼츠 상점아이디 첫 글자에 t를 추가해서 로그인하시기 바랍니다. 예) tsi_lguplus</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<ul id="toss_cardtest_tip" class="scf_cardtest_tip_adm scf_cardtest_tip_adm_hide">
|
||||||
|
<li>테스트 결제 시 <a href="https://app.tosspayments.com/" target="_blank">상점관리자</a> 로그인 정보는 실결제용 키와는 다르니 반드시 <b>[테스트] API 연동 키</b>로 로그인해야 합니다. 예) test_ck_toss</li>
|
||||||
|
</ul>
|
||||||
<ul id="inicis_cardtest_tip" class="scf_cardtest_tip_adm scf_cardtest_tip_adm_hide">
|
<ul id="inicis_cardtest_tip" class="scf_cardtest_tip_adm scf_cardtest_tip_adm_hide">
|
||||||
<li><b>일반결제</b>의 테스트 사이트 mid는 <b>INIpayTest</b> 이며, <b>에스크로 결제</b>의 테스트 사이트 mid는 <b>iniescrow0</b> 입니다.</li>
|
<li><b>일반결제</b>의 테스트 사이트 mid는 <b>INIpayTest</b> 이며, <b>에스크로 결제</b>의 테스트 사이트 mid는 <b>iniescrow0</b> 입니다.</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -1769,7 +1805,11 @@ function fconfig_check(f)
|
|||||||
}
|
}
|
||||||
} else if ( f.de_pg_service.value == "lg" ) {
|
} else if ( f.de_pg_service.value == "lg" ) {
|
||||||
if( f.cf_lg_mid.value && f.cf_lg_mert_key.value && parseInt(f.de_card_test.value) > 0 ){
|
if( f.cf_lg_mid.value && f.cf_lg_mert_key.value && parseInt(f.de_card_test.value) > 0 ){
|
||||||
pg_msg = "토스페이먼츠";
|
pg_msg = "토스페이먼츠(구버전)";
|
||||||
|
}
|
||||||
|
} else if ( f.de_pg_service.value == "toss" ) {
|
||||||
|
if( f.cf_lg_mid.value && f.cf_toss_client_key.value && f.cf_toss_secret_key.value && parseInt(f.de_card_test.value) > 0 ){
|
||||||
|
msg += "(주의!) 토스페이먼츠 결제의 결제 설정이 현재 테스트결제로 되어 있습니다.\n상점 API키를 [테스트]키로 설정한 후 테스트결제를 진행해주세요.\n쇼핑몰 운영중이면 반드시 실결제 전환 및 [라이브]키로 설정하여 운영하셔야 합니다.\n실결제로 변경하려면 결제설정 탭 -> 결제 테스트에서 실결제를 선택해 주세요.\n정말로 테스트결제로 설정하시겠습니까?";
|
||||||
}
|
}
|
||||||
} else if ( f.de_pg_service.value == "inicis" ) {
|
} else if ( f.de_pg_service.value == "inicis" ) {
|
||||||
if( f.de_inicis_mid.value && f.de_inicis_sign_key.value && parseInt(f.de_card_test.value) > 0 ){
|
if( f.de_inicis_mid.value && f.de_inicis_sign_key.value && parseInt(f.de_card_test.value) > 0 ){
|
||||||
|
|||||||
@ -159,6 +159,8 @@ $check_sanitize_keys = array(
|
|||||||
'de_kcp_site_key', //NHN KCP SITE KEY
|
'de_kcp_site_key', //NHN KCP SITE KEY
|
||||||
'cf_lg_mid', //LG유플러스 상점아이디
|
'cf_lg_mid', //LG유플러스 상점아이디
|
||||||
'cf_lg_mert_key', //LG유플러스 MERT KEY
|
'cf_lg_mert_key', //LG유플러스 MERT KEY
|
||||||
|
'cf_toss_client_key', //토스페이먼츠 MERT KEY
|
||||||
|
'cf_toss_secret_key', //토스페이먼츠 MERT KEY
|
||||||
'de_inicis_mid', //KG이니시스 상점아이디
|
'de_inicis_mid', //KG이니시스 상점아이디
|
||||||
'de_inicis_iniapi_key', //KG이니시스 INIAPI KEY
|
'de_inicis_iniapi_key', //KG이니시스 INIAPI KEY
|
||||||
'de_inicis_iniapi_iv', //KG이니시스 INIAPI IV
|
'de_inicis_iniapi_iv', //KG이니시스 INIAPI IV
|
||||||
@ -465,7 +467,9 @@ $sql = " update {$g5['config_table']}
|
|||||||
cf_icode_server_port = '{$_POST['cf_icode_server_port']}',
|
cf_icode_server_port = '{$_POST['cf_icode_server_port']}',
|
||||||
cf_icode_token_key = '{$cf_icode_token_key}',
|
cf_icode_token_key = '{$cf_icode_token_key}',
|
||||||
cf_lg_mid = '{$cf_lg_mid}',
|
cf_lg_mid = '{$cf_lg_mid}',
|
||||||
cf_lg_mert_key = '{$cf_lg_mert_key}' ";
|
cf_lg_mert_key = '{$cf_lg_mert_key}',
|
||||||
|
cf_toss_client_key = '{$cf_toss_client_key}',
|
||||||
|
cf_toss_secret_key = '{$cf_toss_secret_key}' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
|
|
||||||
run_event('shop_admin_configformupdate');
|
run_event('shop_admin_configformupdate');
|
||||||
|
|||||||
@ -235,6 +235,14 @@ sql_query(" delete from {$g5['g5_shop_event_item_table']} where it_id = '$it_id'
|
|||||||
// 선택옵션
|
// 선택옵션
|
||||||
sql_query(" delete from {$g5['g5_shop_item_option_table']} where io_type = '0' and it_id = '$it_id' "); // 기존선택옵션삭제
|
sql_query(" delete from {$g5['g5_shop_item_option_table']} where io_type = '0' and it_id = '$it_id' "); // 기존선택옵션삭제
|
||||||
|
|
||||||
|
// 금지할 패턴 목록
|
||||||
|
$forbidden_patterns = array(
|
||||||
|
'/<\s*script/i', // <script>
|
||||||
|
'/<\s*iframe/i', // <iframe>
|
||||||
|
'/on\w+\s*=/i', // onclick=, onerror= 등 이벤트 핸들러
|
||||||
|
'/javascript:/i' // javascript: 프로토콜
|
||||||
|
);
|
||||||
|
|
||||||
$option_count = (isset($_POST['opt_id']) && is_array($_POST['opt_id'])) ? count($_POST['opt_id']) : array();
|
$option_count = (isset($_POST['opt_id']) && is_array($_POST['opt_id'])) ? count($_POST['opt_id']) : array();
|
||||||
$it_option_subject = '';
|
$it_option_subject = '';
|
||||||
$it_supply_subject = '';
|
$it_supply_subject = '';
|
||||||
@ -243,7 +251,17 @@ if($option_count) {
|
|||||||
// 옵션명
|
// 옵션명
|
||||||
$opt1_cnt = $opt2_cnt = $opt3_cnt = 0;
|
$opt1_cnt = $opt2_cnt = $opt3_cnt = 0;
|
||||||
for($i=0; $i<$option_count; $i++) {
|
for($i=0; $i<$option_count; $i++) {
|
||||||
$post_opt_id = isset($_POST['opt_id'][$i]) ? preg_replace(G5_OPTION_ID_FILTER, '', strip_tags($_POST['opt_id'][$i])) : '';
|
$post_opt_id = isset($_POST['opt_id'][$i]) ? $_POST['opt_id'][$i] : '';
|
||||||
|
|
||||||
|
foreach ($forbidden_patterns as $pattern) {
|
||||||
|
if (preg_match($pattern, $post_opt_id)) {
|
||||||
|
$post_opt_id = '';
|
||||||
|
$_POST['opt_id'][$i] = '';
|
||||||
|
continue 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$post_opt_id = preg_replace(G5_OPTION_ID_FILTER, '', strip_tags($post_opt_id));
|
||||||
|
|
||||||
$opt_val = explode(chr(30), $post_opt_id);
|
$opt_val = explode(chr(30), $post_opt_id);
|
||||||
if(isset($opt_val[0]) && $opt_val[0])
|
if(isset($opt_val[0]) && $opt_val[0])
|
||||||
@ -271,7 +289,17 @@ if($supply_count) {
|
|||||||
// 추가옵션명
|
// 추가옵션명
|
||||||
$arr_spl = array();
|
$arr_spl = array();
|
||||||
for($i=0; $i<$supply_count; $i++) {
|
for($i=0; $i<$supply_count; $i++) {
|
||||||
$post_spl_id = isset($_POST['spl_id'][$i]) ? preg_replace(G5_OPTION_ID_FILTER, '', strip_tags($_POST['spl_id'][$i])) : '';
|
$post_spl_id = isset($_POST['spl_id'][$i]) ? $_POST['spl_id'][$i] : '';
|
||||||
|
|
||||||
|
foreach ($forbidden_patterns as $pattern) {
|
||||||
|
if (preg_match($pattern, $post_spl_id)) {
|
||||||
|
$post_spl_id = '';
|
||||||
|
$_POST['spl_id'][$i] = '';
|
||||||
|
continue 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$post_spl_id = preg_replace(G5_OPTION_ID_FILTER, '', strip_tags($post_spl_id));
|
||||||
|
|
||||||
$spl_val = explode(chr(30), $post_spl_id);
|
$spl_val = explode(chr(30), $post_spl_id);
|
||||||
if(!in_array($spl_val[0], $arr_spl))
|
if(!in_array($spl_val[0], $arr_spl))
|
||||||
|
|||||||
@ -84,11 +84,11 @@ if($po_run) {
|
|||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td_chk">
|
<td class="td_chk">
|
||||||
<input type="hidden" name="opt_id[]" value="<?php echo $opt_id; ?>">
|
<input type="hidden" name="opt_id[]" value="<?php echo get_text($opt_id); ?>">
|
||||||
<label for="opt_chk_<?php echo $i; ?>" class="sound_only"></label>
|
<label for="opt_chk_<?php echo $i; ?>" class="sound_only"></label>
|
||||||
<input type="checkbox" name="opt_chk[]" id="opt_chk_<?php echo $i; ?>" value="1">
|
<input type="checkbox" name="opt_chk[]" id="opt_chk_<?php echo $i; ?>" value="1">
|
||||||
</td>
|
</td>
|
||||||
<td class="opt-cell"><?php echo $opt_1; if ($opt_2_len) echo ' <small>></small> '.$opt_2; if ($opt_3_len) echo ' <small>></small> '.$opt_3; ?></td>
|
<td class="opt-cell"><?php echo get_text($opt_1); if ($opt_2_len) echo ' <small>></small> '.get_text($opt_2); if ($opt_3_len) echo ' <small>></small> '.get_text($opt_3); ?></td>
|
||||||
<td class="td_numsmall">
|
<td class="td_numsmall">
|
||||||
<label for="opt_price_<?php echo $i; ?>" class="sound_only"></label>
|
<label for="opt_price_<?php echo $i; ?>" class="sound_only"></label>
|
||||||
<input type="text" name="opt_price[]" value="<?php echo $opt_price; ?>" id="opt_price_<?php echo $i; ?>" class="frm_input" size="9">
|
<input type="text" name="opt_price[]" value="<?php echo $opt_price; ?>" id="opt_price_<?php echo $i; ?>" class="frm_input" size="9">
|
||||||
|
|||||||
@ -170,14 +170,17 @@ function fitemstocksms_submit(f)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(document.pressed == "선택삭제") {
|
var action = document.pressed;
|
||||||
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
switch (action) {
|
||||||
|
case "선택삭제":
|
||||||
|
return confirm("선택한 자료를 정말 삭제하시겠습니까?");
|
||||||
|
case "선택SMS전송":
|
||||||
|
return confirm("선택한 자료에 대해서 SMS로 재입고 알림을 전송하시겠습니까?");
|
||||||
|
default:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@ -55,12 +55,12 @@ if($ps_run) {
|
|||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td_chk">
|
<td class="td_chk">
|
||||||
<input type="hidden" name="spl_id[]" value="<?php echo $spl_id; ?>">
|
<input type="hidden" name="spl_id[]" value="<?php echo get_text($spl_id); ?>">
|
||||||
<label for="spl_chk_<?php echo $i; ?>" class="sound_only"><?php echo $spl_subject.' '.$spl; ?></label>
|
<label for="spl_chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($spl_subject.' '.$spl); ?></label>
|
||||||
<input type="checkbox" name="spl_chk[]" id="spl_chk_<?php echo $i; ?>" value="1">
|
<input type="checkbox" name="spl_chk[]" id="spl_chk_<?php echo $i; ?>" value="1">
|
||||||
</td>
|
</td>
|
||||||
<td class="spl-subject-cell"><?php echo $spl_subject; ?></td>
|
<td class="spl-subject-cell"><?php echo get_text($spl_subject); ?></td>
|
||||||
<td class="spl-cell"><?php echo $spl; ?></td>
|
<td class="spl-cell"><?php echo get_text($spl); ?></td>
|
||||||
<td class="td_numsmall">
|
<td class="td_numsmall">
|
||||||
<label for="spl_price_<?php echo $i; ?>" class="sound_only">상품금액</label>
|
<label for="spl_price_<?php echo $i; ?>" class="sound_only">상품금액</label>
|
||||||
<input type="text" name="spl_price[]" value="<?php echo $spl_price; ?>" id="spl_price_<?php echo $i; ?>" class="frm_input" size="5">
|
<input type="text" name="spl_price[]" value="<?php echo $spl_price; ?>" id="spl_price_<?php echo $i; ?>" class="frm_input" size="5">
|
||||||
|
|||||||
@ -68,8 +68,7 @@ $sql = " select it_id,
|
|||||||
cp_price,
|
cp_price,
|
||||||
ct_notax,
|
ct_notax,
|
||||||
ct_send_cost,
|
ct_send_cost,
|
||||||
it_sc_type,
|
it_sc_type
|
||||||
ct_id
|
|
||||||
from {$g5['g5_shop_cart_table']}
|
from {$g5['g5_shop_cart_table']}
|
||||||
where od_id = '{$od['od_id']}'
|
where od_id = '{$od['od_id']}'
|
||||||
group by it_id
|
group by it_id
|
||||||
@ -108,20 +107,10 @@ if($od['od_pg'] == 'lg') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$print_od_deposit_name = $od['od_deposit_name'];
|
|
||||||
// nicepay 로 주문하고 가상계좌인 경우
|
|
||||||
if ($od['od_pg'] === 'nicepay' && $od['od_settle_case'] === '가상계좌' && $od['od_deposit_name']){
|
|
||||||
$print_od_deposit_name .= '_NICE';
|
|
||||||
}
|
|
||||||
|
|
||||||
// add_javascript('js 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
// add_javascript('js 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||||
add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||||
?>
|
?>
|
||||||
<style>
|
|
||||||
#sodr_qty_log {padding-left: 0px; padding-right: 0px;}
|
|
||||||
.od_test_caution {border-radius: 0px;}
|
|
||||||
strong.sodr_nonpay {border-radius: 0px;}
|
|
||||||
</style>
|
|
||||||
<section id="anc_sodr_list">
|
<section id="anc_sodr_list">
|
||||||
<h2 class="h2_frm">주문상품 목록</h2>
|
<h2 class="h2_frm">주문상품 목록</h2>
|
||||||
<?php echo $pg_anchor; ?>
|
<?php echo $pg_anchor; ?>
|
||||||
@ -130,6 +119,8 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
현재 주문상태 <strong><?php echo $od['od_status'] ?></strong>
|
현재 주문상태 <strong><?php echo $od['od_status'] ?></strong>
|
||||||
|
|
|
|
||||||
주문일시 <strong><?php echo substr($od['od_time'],0,16); ?> (<?php echo get_yoil($od['od_time']); ?>)</strong>
|
주문일시 <strong><?php echo substr($od['od_time'],0,16); ?> (<?php echo get_yoil($od['od_time']); ?>)</strong>
|
||||||
|
|
|
||||||
|
주문총액 <strong><?php echo number_format($od['od_cart_price'] + $od['od_send_cost'] + $od['od_send_cost2']); ?></strong>원
|
||||||
</p>
|
</p>
|
||||||
<?php if ($default['de_hope_date_use']) { ?><p>희망배송일은 <?php echo $od['od_hope_date']; ?> (<?php echo get_yoil($od['od_hope_date']); ?>) 입니다.</p><?php } ?>
|
<?php if ($default['de_hope_date_use']) { ?><p>희망배송일은 <?php echo $od['od_hope_date']; ?> (<?php echo get_yoil($od['od_hope_date']); ?>) 입니다.</p><?php } ?>
|
||||||
<?php if($od['od_mobile']) { ?>
|
<?php if($od['od_mobile']) { ?>
|
||||||
@ -165,20 +156,9 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
<th scope="col">소계</th>
|
<th scope="col">소계</th>
|
||||||
<th scope="col">쿠폰</th>
|
<th scope="col">쿠폰</th>
|
||||||
<th scope="col">포인트</th>
|
<th scope="col">포인트</th>
|
||||||
<?php if ((!isset($rb_item_res['res_is'])) || $rb_item_res['res_is'] != 1) { ?>
|
|
||||||
<th scope="col">배송비</th>
|
<th scope="col">배송비</th>
|
||||||
<?php } ?>
|
|
||||||
<th scope="col">포인트반영</th>
|
<th scope="col">포인트반영</th>
|
||||||
<th scope="col">재고반영</th>
|
<th scope="col">재고반영</th>
|
||||||
|
|
||||||
<!-- 20241018 리빌더 추가 { -->
|
|
||||||
<?php if(isset($pa['pa_is']) && $pa['pa_is'] == 1) { ?>
|
|
||||||
<th scope="col">운송장번호</th>
|
|
||||||
<th scope="col">배송사</th>
|
|
||||||
<th scope="col">배송일시</th>
|
|
||||||
<?php } ?>
|
|
||||||
<!-- } -->
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -188,46 +168,21 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
// 상품이미지
|
// 상품이미지
|
||||||
$image = get_it_image($row['it_id'], 50, 50);
|
$image = get_it_image($row['it_id'], 50, 50);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 상품의 옵션정보
|
// 상품의 옵션정보
|
||||||
if(isset($pa['pa_is']) && $pa['pa_is'] == 1) {
|
|
||||||
$sql = " select ct_id, it_id, ct_price, ct_point, ct_qty, ct_option, ct_status, cp_price, ct_stock_use, ct_point_use, ct_send_cost, io_type, io_price, ct_delivery_company, ct_invoice, ct_invoice_time
|
|
||||||
from {$g5['g5_shop_cart_table']}
|
|
||||||
where od_id = '{$od['od_id']}'
|
|
||||||
and it_id = '{$row['it_id']}'
|
|
||||||
order by io_type asc, ct_id asc ";
|
|
||||||
$res = sql_query($sql);
|
|
||||||
} else {
|
|
||||||
$sql = " select ct_id, it_id, ct_price, ct_point, ct_qty, ct_option, ct_status, cp_price, ct_stock_use, ct_point_use, ct_send_cost, io_type, io_price
|
$sql = " select ct_id, it_id, ct_price, ct_point, ct_qty, ct_option, ct_status, cp_price, ct_stock_use, ct_point_use, ct_send_cost, io_type, io_price
|
||||||
from {$g5['g5_shop_cart_table']}
|
from {$g5['g5_shop_cart_table']}
|
||||||
where od_id = '{$od['od_id']}'
|
where od_id = '{$od['od_id']}'
|
||||||
and it_id = '{$row['it_id']}'
|
and it_id = '{$row['it_id']}'
|
||||||
order by io_type asc, ct_id asc ";
|
order by io_type asc, ct_id asc ";
|
||||||
$res = sql_query($sql);
|
$res = sql_query($sql);
|
||||||
}
|
|
||||||
$rowspan = sql_num_rows($res);
|
$rowspan = sql_num_rows($res);
|
||||||
|
|
||||||
if (isset($rb_item_res['res_is']) && $rb_item_res['res_is'] == 1) {
|
|
||||||
$resv = sql_fetch("SELECT * FROM {$g5['g5_shop_cart_table']} WHERE ct_id = '{$row['ct_id']}' ");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 합계금액 계산
|
// 합계금액 계산
|
||||||
$price_calc = "((ct_price + io_price) * ct_qty)";
|
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,
|
||||||
if (isset($rb_item_res['res_is']) && $rb_item_res['res_is'] == 1 && isset($resv['ct_types']) && $resv['ct_types'] == 1) {
|
SUM(ct_qty) as qty
|
||||||
$price_calc = "((ct_price + io_price) * ct_qty * ct_date_d +
|
from {$g5['g5_shop_cart_table']}
|
||||||
(COALESCE(ct_user_pri1, 0) * COALESCE(ct_user_qty1, 0)) +
|
where it_id = '{$row['it_id']}'
|
||||||
(COALESCE(ct_user_pri2, 0) * COALESCE(ct_user_qty2, 0)) +
|
and od_id = '{$od['od_id']}' ";
|
||||||
(COALESCE(ct_user_pri3, 0) * COALESCE(ct_user_qty3, 0)))";
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql = "SELECT SUM(IF(io_type = 1, (io_price * ct_qty), $price_calc)) 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['od_id']}'";
|
|
||||||
|
|
||||||
$sum = sql_fetch($sql);
|
$sum = sql_fetch($sql);
|
||||||
|
|
||||||
// 배송비
|
// 배송비
|
||||||
@ -259,10 +214,8 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
$opt_price = $opt['ct_price'] + $opt['io_price'];
|
$opt_price = $opt['ct_price'] + $opt['io_price'];
|
||||||
|
|
||||||
// 소계
|
// 소계
|
||||||
//$ct_price['stotal'] = $opt_price * $opt['ct_qty'];
|
$ct_price['stotal'] = $opt_price * $opt['ct_qty'];
|
||||||
$ct_price['stotal'] = $sum['price'];
|
|
||||||
$ct_point['stotal'] = $opt['ct_point'] * $opt['ct_qty'];
|
$ct_point['stotal'] = $opt['ct_point'] * $opt['ct_qty'];
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<?php if($k == 0) { ?>
|
<?php if($k == 0) { ?>
|
||||||
@ -280,15 +233,6 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
<input type="checkbox" name="ct_chk[<?php echo $chk_cnt; ?>]" id="ct_chk_<?php echo $chk_cnt; ?>" value="<?php echo $chk_cnt; ?>" class="sct_sel_<?php echo $i; ?>">
|
<input type="checkbox" name="ct_chk[<?php echo $chk_cnt; ?>]" id="ct_chk_<?php echo $chk_cnt; ?>" value="<?php echo $chk_cnt; ?>" class="sct_sel_<?php echo $i; ?>">
|
||||||
<input type="hidden" name="ct_id[<?php echo $chk_cnt; ?>]" value="<?php echo $opt['ct_id']; ?>">
|
<input type="hidden" name="ct_id[<?php echo $chk_cnt; ?>]" value="<?php echo $opt['ct_id']; ?>">
|
||||||
<?php echo get_text($opt['ct_option']); ?>
|
<?php echo get_text($opt['ct_option']); ?>
|
||||||
|
|
||||||
<?php
|
|
||||||
//예약정보 로드
|
|
||||||
if(isset($rb_item_res['res_is']) && $rb_item_res['res_is'] == 1) {
|
|
||||||
if(isset($resv['ct_types']) && $resv['ct_types'] == 1) {
|
|
||||||
include (G5_PATH.'/rb/rb.mod/reservation/info.inc.php');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</td>
|
</td>
|
||||||
<td class="td_mngsmall"><?php echo $opt['ct_status']; ?></td>
|
<td class="td_mngsmall"><?php echo $opt['ct_status']; ?></td>
|
||||||
<td class="td_num">
|
<td class="td_num">
|
||||||
@ -299,49 +243,9 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
<td class="td_num_right"><?php echo number_format($ct_price['stotal']); ?></td>
|
<td class="td_num_right"><?php echo number_format($ct_price['stotal']); ?></td>
|
||||||
<td class="td_num_right"><?php echo number_format($opt['cp_price']); ?></td>
|
<td class="td_num_right"><?php echo number_format($opt['cp_price']); ?></td>
|
||||||
<td class=" td_num_right"><?php echo number_format($ct_point['stotal']); ?></td>
|
<td class=" td_num_right"><?php echo number_format($ct_point['stotal']); ?></td>
|
||||||
<?php if ((!isset($rb_item_res['res_is'])) || $rb_item_res['res_is'] != 1) { ?>
|
|
||||||
<td class="td_sendcost_by"><?php echo $ct_send_cost; ?></td>
|
<td class="td_sendcost_by"><?php echo $ct_send_cost; ?></td>
|
||||||
<?php } ?>
|
<td class="td_mngsmall"><?php echo get_yn($opt['ct_point_use']); ?></td>
|
||||||
<td class=""><?php echo get_yn($opt['ct_point_use']); ?></td>
|
<td class="td_mngsmall"><?php echo get_yn($opt['ct_stock_use']); ?></td>
|
||||||
<td class=""><?php echo get_yn($opt['ct_stock_use']); ?></td>
|
|
||||||
|
|
||||||
<!-- 20241018 리빌더 추가 { -->
|
|
||||||
<?php if(isset($pa['pa_is']) && $pa['pa_is'] == 1) { ?>
|
|
||||||
<td class=""><input type="text" name="ct_invoice[<?php echo $chk_cnt; ?>]" value="<?php echo $opt['ct_invoice']; ?>" id="ct_invoice_<?php echo $chk_cnt; ?>" class="frm_input"></td>
|
|
||||||
|
|
||||||
<td class="">
|
|
||||||
<input type="text" name="ct_delivery_company[<?php echo $chk_cnt; ?>]" id="ct_delivery_company_<?php echo $chk_cnt; ?>" value="<?php echo $opt['ct_delivery_company']; ?>" class="frm_input" style="width:60%;">
|
|
||||||
|
|
||||||
<input type="checkbox" id="ct_delivery_chk_<?php echo $chk_cnt; ?>" value="<?php echo $default['de_delivery_company']; ?>" onclick="chk_delivery_company_<?php echo $chk_cnt; ?>()">
|
|
||||||
<label for="ct_delivery_chk_<?php echo $chk_cnt; ?>">기본</label>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
function chk_delivery_company_<?php echo $chk_cnt; ?>()
|
|
||||||
{
|
|
||||||
var chk_<?php echo $chk_cnt; ?> = document.getElementById("ct_delivery_chk_<?php echo $chk_cnt; ?>");
|
|
||||||
var company_<?php echo $chk_cnt; ?> = document.getElementById("ct_delivery_company_<?php echo $chk_cnt; ?>");
|
|
||||||
company_<?php echo $chk_cnt; ?>.value = chk_<?php echo $chk_cnt; ?>.checked ? chk_<?php echo $chk_cnt; ?>.value : company_<?php echo $chk_cnt; ?>.defaultValue;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td class="">
|
|
||||||
<input type="text" name="ct_invoice_time[<?php echo $chk_cnt; ?>]" id="ct_invoice_time_<?php echo $chk_cnt; ?>" value="<?php echo is_null_time($opt['ct_invoice_time']) ? "" : $opt['ct_invoice_time']; ?>" class="frm_input" maxlength="19" style="width:60%;">
|
|
||||||
<input type="checkbox" id="ct_invoice_chk_<?php echo $chk_cnt; ?>" value="<?php echo date("Y-m-d H:i:s", G5_SERVER_TIME); ?>" onclick="chk_invoice_time_<?php echo $chk_cnt; ?>()">
|
|
||||||
<label for="ct_invoice_chk_<?php echo $chk_cnt; ?>">현재</label>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
function chk_invoice_time_<?php echo $chk_cnt; ?>()
|
|
||||||
{
|
|
||||||
var chk_<?php echo $chk_cnt; ?> = document.getElementById("ct_invoice_chk_<?php echo $chk_cnt; ?>");
|
|
||||||
var time_<?php echo $chk_cnt; ?> = document.getElementById("ct_invoice_time_<?php echo $chk_cnt; ?>");
|
|
||||||
time_<?php echo $chk_cnt; ?>.value = chk_<?php echo $chk_cnt; ?>.checked ? chk_<?php echo $chk_cnt; ?>.value : time_<?php echo $chk_cnt; ?>.defaultValue;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</td>
|
|
||||||
<?php } ?>
|
|
||||||
<!-- } -->
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$chk_cnt++;
|
$chk_cnt++;
|
||||||
@ -360,19 +264,20 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
<strong>주문 및 장바구니 상태 변경</strong>
|
<strong>주문 및 장바구니 상태 변경</strong>
|
||||||
<input type="submit" name="ct_status" value="주문" onclick="document.pressed=this.value" class="btn_02 color_01">
|
<input type="submit" name="ct_status" value="주문" onclick="document.pressed=this.value" class="btn_02 color_01">
|
||||||
<input type="submit" name="ct_status" value="입금" onclick="document.pressed=this.value" class="btn_02 color_02">
|
<input type="submit" name="ct_status" value="입금" onclick="document.pressed=this.value" class="btn_02 color_02">
|
||||||
<!--
|
|
||||||
<input type="submit" name="ct_status" value="준비" onclick="document.pressed=this.value" class="btn_02 color_03">
|
<input type="submit" name="ct_status" value="준비" onclick="document.pressed=this.value" class="btn_02 color_03">
|
||||||
<input type="submit" name="ct_status" value="배송" onclick="document.pressed=this.value" class="btn_02 color_04">
|
<input type="submit" name="ct_status" value="배송" onclick="document.pressed=this.value" class="btn_02 color_04">
|
||||||
-->
|
|
||||||
<input type="submit" name="ct_status" value="완료" onclick="document.pressed=this.value" class="btn_02 color_05">
|
<input type="submit" name="ct_status" value="완료" onclick="document.pressed=this.value" class="btn_02 color_05">
|
||||||
|
<?php if( $od['od_status'] != "완료" || $is_admin) { // 완료라면 취소, 반품을 출력하지 않음
|
||||||
|
?>
|
||||||
<input type="submit" name="ct_status" value="취소" onclick="document.pressed=this.value" class="btn_02 color_06">
|
<input type="submit" name="ct_status" value="취소" onclick="document.pressed=this.value" class="btn_02 color_06">
|
||||||
<input type="submit" name="ct_status" value="반품" onclick="document.pressed=this.value" class="btn_02 color_06">
|
<input type="submit" name="ct_status" value="반품" onclick="document.pressed=this.value" class="btn_02 color_06">
|
||||||
<input type="submit" name="ct_status" value="품절" onclick="document.pressed=this.value" class="btn_02 color_06">
|
<input type="submit" name="ct_status" value="품절" onclick="document.pressed=this.value" class="btn_02 color_06">
|
||||||
|
<?php } ?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="local_desc01 local_desc">
|
<div class="local_desc01 local_desc">
|
||||||
<p>주문, 입금, 완료는 장바구니와 주문서 상태를 모두 변경하지만, 취소, 반품, 품절은 장바구니의 상태만 변경하며, 주문서 상태는 변경하지 않습니다.</p>
|
<p>주문, 입금, 준비, 배송, 완료는 장바구니와 주문서 상태를 모두 변경하지만, 취소, 반품, 품절은 장바구니의 상태만 변경하며, 주문서 상태는 변경하지 않습니다.</p>
|
||||||
<p>개별적인(이곳에서의) 상태 변경은 모든 작업을 수동으로 처리합니다. 예를 들어 주문에서 입금으로 상태 변경시 입금액(결제금액)을 포함한 모든 정보는 수동 입력으로 처리하셔야 합니다.</p>
|
<p>개별적인(이곳에서의) 상태 변경은 모든 작업을 수동으로 처리합니다. 예를 들어 주문에서 입금으로 상태 변경시 입금액(결제금액)을 포함한 모든 정보는 수동 입력으로 처리하셔야 합니다.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -440,9 +345,7 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
<th scope="col">주문번호</th>
|
<th scope="col">주문번호</th>
|
||||||
<th scope="col">결제방법</th>
|
<th scope="col">결제방법</th>
|
||||||
<th scope="col">주문총액</th>
|
<th scope="col">주문총액</th>
|
||||||
<?php if ((!isset($rb_item_res['res_is'])) || $rb_item_res['res_is'] != 1) { ?>
|
|
||||||
<th scope="col">배송비</th>
|
<th scope="col">배송비</th>
|
||||||
<?php } ?>
|
|
||||||
<th scope="col">포인트결제</th>
|
<th scope="col">포인트결제</th>
|
||||||
<th scope="col">총결제액</th>
|
<th scope="col">총결제액</th>
|
||||||
<th scope="col">쿠폰</th>
|
<th scope="col">쿠폰</th>
|
||||||
@ -454,9 +357,7 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
<td><?php echo $od['od_id']; ?></td>
|
<td><?php echo $od['od_id']; ?></td>
|
||||||
<td class="td_paybybig"><?php echo $s_receipt_way; ?></td>
|
<td class="td_paybybig"><?php echo $s_receipt_way; ?></td>
|
||||||
<td class="td_numbig td_numsum"><?php echo display_price($amount['order']); ?></td>
|
<td class="td_numbig td_numsum"><?php echo display_price($amount['order']); ?></td>
|
||||||
<?php if ((!isset($rb_item_res['res_is'])) || $rb_item_res['res_is'] != 1) { ?>
|
|
||||||
<td class="td_numbig"><?php echo display_price($od['od_send_cost'] + $od['od_send_cost2']); ?></td>
|
<td class="td_numbig"><?php echo display_price($od['od_send_cost'] + $od['od_send_cost2']); ?></td>
|
||||||
<?php } ?>
|
|
||||||
<td class="td_numbig"><?php echo display_point($od['od_receipt_point']); ?></td>
|
<td class="td_numbig"><?php echo display_point($od['od_receipt_point']); ?></td>
|
||||||
<td class="td_numbig td_numincome"><?php echo number_format($amount['receipt']); ?>원</td>
|
<td class="td_numbig td_numincome"><?php echo number_format($amount['receipt']); ?>원</td>
|
||||||
<td class="td_numbig td_numcoupon"><?php echo display_price($amount['coupon']); ?></td>
|
<td class="td_numbig td_numcoupon"><?php echo display_price($amount['coupon']); ?></td>
|
||||||
@ -510,7 +411,7 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">입금자</th>
|
<th scope="row">입금자</th>
|
||||||
<td><?php echo get_text($print_od_deposit_name); ?></td>
|
<td><?php echo get_text($od['od_deposit_name']); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">입금확인일시</th>
|
<th scope="row">입금확인일시</th>
|
||||||
@ -621,10 +522,6 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
$pg_url = 'https://mms.cnspay.co.kr';
|
$pg_url = 'https://mms.cnspay.co.kr';
|
||||||
$pg_test = 'KAKAOPAY';
|
$pg_test = 'KAKAOPAY';
|
||||||
break;
|
break;
|
||||||
case 'nicepay':
|
|
||||||
$pg_url = 'https://npg.nicepay.co.kr/';
|
|
||||||
$pg_test = 'NICEPAY';
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
$pg_url = 'http://admin8.kcp.co.kr';
|
$pg_url = 'http://admin8.kcp.co.kr';
|
||||||
$pg_test = 'KCP';
|
$pg_test = 'KCP';
|
||||||
@ -671,17 +568,11 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
<th scope="row">결제취소/환불액</th>
|
<th scope="row">결제취소/환불액</th>
|
||||||
<td><?php echo display_price($od['od_refund_price']); ?></td>
|
<td><?php echo display_price($od['od_refund_price']); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<!-- 20241018 리빌더 수정 { -->
|
|
||||||
<?php if(isset($pa['pa_is']) && $pa['pa_is'] == 1) { ?>
|
|
||||||
<?php } else { ?>
|
|
||||||
<?php if ((!isset($rb_item_res['res_is'])) || $rb_item_res['res_is'] != 1) { ?>
|
|
||||||
<?php if ($od['od_invoice']) { ?>
|
<?php if ($od['od_invoice']) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">배송회사</th>
|
<th scope="row">배송회사</th>
|
||||||
<td><?php echo $od['od_delivery_company']; ?> <?php echo get_delivery_inquiry($od['od_delivery_company'], $od['od_invoice'], 'dvr_link'); ?></td>
|
<td><?php echo $od['od_delivery_company']; ?> <?php echo get_delivery_inquiry($od['od_delivery_company'], $od['od_invoice'], 'dvr_link'); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">운송장번호</th>
|
<th scope="row">운송장번호</th>
|
||||||
<td><?php echo $od['od_invoice']; ?></td>
|
<td><?php echo $od['od_invoice']; ?></td>
|
||||||
@ -691,10 +582,6 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
<td><?php echo is_null_time($od['od_invoice_time']) ? "" : $od['od_invoice_time']; ?></td>
|
<td><?php echo is_null_time($od['od_invoice_time']) ? "" : $od['od_invoice_time']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php } ?>
|
|
||||||
<?php } ?>
|
|
||||||
<!-- } -->
|
|
||||||
<?php if ((!isset($rb_item_res['res_is'])) || $rb_item_res['res_is'] != 1) { ?>
|
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="od_send_cost">배송비</label></th>
|
<th scope="row"><label for="od_send_cost">배송비</label></th>
|
||||||
<td>
|
<td>
|
||||||
@ -713,7 +600,6 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
<input type="text" name="od_send_cost2" value="<?php echo $od['od_send_cost2']; ?>" id="od_send_cost2" class="frm_input" size="10"> 원
|
<input type="text" name="od_send_cost2" value="<?php echo $od['od_send_cost2']; ?>" id="od_send_cost2" class="frm_input" size="10"> 원
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
|
||||||
<?php
|
<?php
|
||||||
if ($od['od_misu'] == 0 && $od['od_receipt_price'] && ($od['od_settle_case'] == '무통장' || $od['od_settle_case'] == '가상계좌' || $od['od_settle_case'] == '계좌이체')) {
|
if ($od['od_misu'] == 0 && $od['od_receipt_price'] && ($od['od_settle_case'] == '무통장' || $od['od_settle_case'] == '가상계좌' || $od['od_settle_case'] == '계좌이체')) {
|
||||||
?>
|
?>
|
||||||
@ -740,18 +626,6 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
} else if($od['od_pg'] == 'inicis') {
|
} else if($od['od_pg'] == 'inicis') {
|
||||||
$cash = unserialize($od['od_cash_info']);
|
$cash = unserialize($od['od_cash_info']);
|
||||||
$cash_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid='.$cash['TID'].'&clpaymethod=22\',\'showreceipt\',\'width=380,height=540,scrollbars=no,resizable=no\');';
|
$cash_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid='.$cash['TID'].'&clpaymethod=22\',\'showreceipt\',\'width=380,height=540,scrollbars=no,resizable=no\');';
|
||||||
} else if($od['od_pg'] == 'nicepay') {
|
|
||||||
|
|
||||||
$od_tid = $od['od_tno'];
|
|
||||||
$cash_type = 0;
|
|
||||||
|
|
||||||
if (! $od_tid) {
|
|
||||||
$cash = unserialize($od['od_cash_info']);
|
|
||||||
$od_tid = isset($cash['TID']) ? $cash['TID'] : '';
|
|
||||||
$cash_type = $od_tid ? 1 : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
$cash_receipt_script = 'window.open(\'https://npg.nicepay.co.kr/issue/IssueLoader.do?type='.$cash_type.'&TID='.$od_tid.'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
|
|
||||||
} else {
|
} else {
|
||||||
require G5_SHOP_PATH.'/settle_kcp.inc.php';
|
require G5_SHOP_PATH.'/settle_kcp.inc.php';
|
||||||
|
|
||||||
@ -821,11 +695,11 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="od_deposit_name">입금자명</label></th>
|
<th scope="row"><label for="od_deposit_name">입금자명</label></th>
|
||||||
<td>
|
<td>
|
||||||
|
<?php if ($config['cf_sms_use'] && $default['de_sms_use4']) { ?>
|
||||||
<input type="checkbox" name="od_sms_ipgum_check" id="od_sms_ipgum_check">
|
<input type="checkbox" name="od_sms_ipgum_check" id="od_sms_ipgum_check">
|
||||||
<label for="od_sms_ipgum_check">SMS 입금 문자 및 알림전송</label>
|
<label for="od_sms_ipgum_check">SMS 입금 문자전송</label>
|
||||||
<br>
|
<br>
|
||||||
|
<?php } ?>
|
||||||
<input type="text" name="od_deposit_name" value="<?php echo get_text($od['od_deposit_name']); ?>" id="od_deposit_name" class="frm_input">
|
<input type="text" name="od_deposit_name" value="<?php echo get_text($od['od_deposit_name']); ?>" id="od_deposit_name" class="frm_input">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -925,21 +799,14 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
<input type="text" name="od_refund_price" value="<?php echo $od['od_refund_price']; ?>" id="od_refund_price" class="frm_input" size="10"> 원
|
<input type="text" name="od_refund_price" value="<?php echo $od['od_refund_price']; ?>" id="od_refund_price" class="frm_input" size="10"> 원
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
<!-- 20241018 리빌더 수정 { -->
|
|
||||||
<?php if(isset($pa['pa_is']) && $pa['pa_is'] == 1) { ?>
|
|
||||||
|
|
||||||
<?php } else { ?>
|
|
||||||
<?php if ((!isset($rb_item_res['res_is'])) || $rb_item_res['res_is'] != 1) { ?>
|
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="od_invoice">운송장번호</label></th>
|
<th scope="row"><label for="od_invoice">운송장번호</label></th>
|
||||||
<td>
|
<td>
|
||||||
|
<?php if ($config['cf_sms_use'] && $default['de_sms_use5']) { ?>
|
||||||
<input type="checkbox" name="od_sms_baesong_check" id="od_sms_baesong_check">
|
<input type="checkbox" name="od_sms_baesong_check" id="od_sms_baesong_check">
|
||||||
<label for="od_sms_baesong_check">SMS 배송 문자 및 알림전송</label>
|
<label for="od_sms_baesong_check">SMS 배송 문자전송</label>
|
||||||
<br>
|
<br>
|
||||||
|
<?php } ?>
|
||||||
<input type="text" name="od_invoice" value="<?php echo $od['od_invoice']; ?>" id="od_invoice" class="frm_input">
|
<input type="text" name="od_invoice" value="<?php echo $od['od_invoice']; ?>" id="od_invoice" class="frm_input">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -959,7 +826,6 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
<input type="text" name="od_invoice_time" id="od_invoice_time" value="<?php echo is_null_time($od['od_invoice_time']) ? "" : $od['od_invoice_time']; ?>" class="frm_input" maxlength="19">
|
<input type="text" name="od_invoice_time" id="od_invoice_time" value="<?php echo is_null_time($od['od_invoice_time']) ? "" : $od['od_invoice_time']; ?>" class="frm_input" maxlength="19">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<?php if ($config['cf_email_use']) { ?>
|
<?php if ($config['cf_email_use']) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
@ -971,11 +837,6 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- } -->
|
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@ -1028,7 +889,7 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<h2 class="h2_frm">주문자/사용자 정보</h2>
|
<h2 class="h2_frm">주문자/배송지 정보</h2>
|
||||||
<?php echo $pg_anchor; ?>
|
<?php echo $pg_anchor; ?>
|
||||||
|
|
||||||
<form name="frmorderform3" action="./orderformupdate.php" method="post">
|
<form name="frmorderform3" action="./orderformupdate.php" method="post">
|
||||||
@ -1043,11 +904,11 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
<div class="compare_wrap">
|
<div class="compare_wrap">
|
||||||
|
|
||||||
<section id="anc_sodr_orderer" class="compare_left">
|
<section id="anc_sodr_orderer" class="compare_left">
|
||||||
<h3>주문자 정보</h3>
|
<h3>주문하신 분</h3>
|
||||||
|
|
||||||
<div class="tbl_frm01">
|
<div class="tbl_frm01">
|
||||||
<table>
|
<table>
|
||||||
<caption>주문자 정보</caption>
|
<caption>주문자/배송지 정보</caption>
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col class="grid_4">
|
<col class="grid_4">
|
||||||
<col>
|
<col>
|
||||||
@ -1077,8 +938,8 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
<input type="text" name="od_addr2" value="<?php echo get_text($od['od_addr2']); ?>" id="od_addr2" class="frm_input" size="35">
|
<input type="text" name="od_addr2" value="<?php echo get_text($od['od_addr2']); ?>" id="od_addr2" class="frm_input" size="35">
|
||||||
<label for="od_addr2">상세주소</label>
|
<label for="od_addr2">상세주소</label>
|
||||||
<br>
|
<br>
|
||||||
<input type="text" name="od_addr3" value="<?php echo get_text($od['od_addr3']); ?>" id="od_addr3" class="frm_input" size="35"><br>
|
<input type="text" name="od_addr3" value="<?php echo get_text($od['od_addr3']); ?>" id="od_addr3" class="frm_input" size="35">
|
||||||
|
<label for="od_addr3">참고항목</label>
|
||||||
<input type="hidden" name="od_addr_jibeon" value="<?php echo get_text($od['od_addr_jibeon']); ?>"><br>
|
<input type="hidden" name="od_addr_jibeon" value="<?php echo get_text($od['od_addr_jibeon']); ?>"><br>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -1093,14 +954,14 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
<br><br>
|
<section id="anc_sodr_taker" class="compare_right">
|
||||||
|
<h3>받으시는 분</h3>
|
||||||
<h3>사용자(수령자) 정보</h3>
|
|
||||||
|
|
||||||
<div class="tbl_frm01">
|
<div class="tbl_frm01">
|
||||||
<table>
|
<table>
|
||||||
<caption>사용자(수령자) 정보</caption>
|
<caption>받으시는 분 정보</caption>
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col class="grid_4">
|
<col class="grid_4">
|
||||||
<col>
|
<col>
|
||||||
@ -1124,12 +985,13 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
<label for="od_b_zip" class="sound_only">우편번호</label>
|
<label for="od_b_zip" class="sound_only">우편번호</label>
|
||||||
<input type="text" name="od_b_zip" value="<?php echo get_text($od['od_b_zip1']).get_text($od['od_b_zip2']); ?>" id="od_b_zip" required class="frm_input required" size="5">
|
<input type="text" name="od_b_zip" value="<?php echo get_text($od['od_b_zip1']).get_text($od['od_b_zip2']); ?>" id="od_b_zip" required class="frm_input required" size="5">
|
||||||
<button type="button" class="btn_frmline" onclick="win_zip('frmorderform3', 'od_b_zip', 'od_b_addr1', 'od_b_addr2', 'od_b_addr3', 'od_b_addr_jibeon');">주소 검색</button><br>
|
<button type="button" class="btn_frmline" onclick="win_zip('frmorderform3', 'od_b_zip', 'od_b_addr1', 'od_b_addr2', 'od_b_addr3', 'od_b_addr_jibeon');">주소 검색</button><br>
|
||||||
<input type="text" name="od_b_addr1" value="<?php echo get_text($od['od_b_addr1']); ?>" id="od_b_addr1" required class="frm_input required" size="35" style="margin-top:5px;">
|
<input type="text" name="od_b_addr1" value="<?php echo get_text($od['od_b_addr1']); ?>" id="od_b_addr1" required class="frm_input required" size="35">
|
||||||
<label for="od_b_addr1">기본주소</label><br>
|
<label for="od_b_addr1">기본주소</label>
|
||||||
<input type="text" name="od_b_addr2" value="<?php echo get_text($od['od_b_addr2']); ?>" id="od_b_addr2" class="frm_input" size="35" style="margin-top:5px;">
|
<input type="text" name="od_b_addr2" value="<?php echo get_text($od['od_b_addr2']); ?>" id="od_b_addr2" class="frm_input" size="35">
|
||||||
<label for="od_b_addr2">상세주소</label><br>
|
<label for="od_b_addr2">상세주소</label>
|
||||||
<input type="text" name="od_b_addr3" value="<?php echo get_text($od['od_b_addr3']); ?>" id="od_b_addr3" class="frm_input" size="35" style="margin-top:5px;">
|
<input type="text" name="od_b_addr3" value="<?php echo get_text($od['od_b_addr3']); ?>" id="od_b_addr3" class="frm_input" size="35">
|
||||||
<input type="hidden" name="od_b_addr_jibeon" value="<?php echo get_text($od['od_b_addr_jibeon']); ?>">
|
<label for="od_b_addr3">참고항목</label>
|
||||||
|
<input type="hidden" name="od_b_addr_jibeon" value="<?php echo get_text($od['od_b_addr_jibeon']); ?>"><br>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@ -1151,41 +1013,6 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="anc_sodr_taker" class="compare_right">
|
|
||||||
<?php
|
|
||||||
if (isset($rb_item_res['res_is']) && $rb_item_res['res_is'] == 1) {
|
|
||||||
$resv = sql_fetch("SELECT ct_user_qty1 FROM {$g5['g5_shop_cart_table']} WHERE od_id = '{$od['od_id']}' AND ct_select = '1' LIMIT 1");
|
|
||||||
$ct_user_qty1 = (int)$resv['ct_user_qty1'];
|
|
||||||
if(isset($ct_user_qty1) && $ct_user_qty1 > 0) {
|
|
||||||
|
|
||||||
$names = explode('|', $od['od_names']);
|
|
||||||
$hps = explode('|', $od['od_hps']);
|
|
||||||
|
|
||||||
if($names[0]) {
|
|
||||||
?>
|
|
||||||
|
|
||||||
<section id="sod_fin_receiver">
|
|
||||||
<h3>추가사용자 정보</h3>
|
|
||||||
|
|
||||||
<div class="tbl_head01 tbl_wrap">
|
|
||||||
<table>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
<?php for($i = 0; $i < $ct_user_qty1; $i++) { ?>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">사용자 <?php echo $i+1 ?></th>
|
|
||||||
<td><?php echo get_text($names[$i] ?? ''); ?> / <?php echo get_text($hps[$i] ?? ''); ?></td>
|
|
||||||
</tr>
|
|
||||||
<?php } ?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<?php } ?>
|
|
||||||
<?php } ?>
|
|
||||||
<?php } ?>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="btn_confirm01 btn_confirm">
|
<div class="btn_confirm01 btn_confirm">
|
||||||
@ -1251,7 +1078,7 @@ function form_submit(f)
|
|||||||
|
|
||||||
var msg = "";
|
var msg = "";
|
||||||
|
|
||||||
<?php if (is_cancel_shop_pg_order($od)) { ?>
|
<?php if($od['od_settle_case'] == '신용카드' || $od['od_settle_case'] == 'KAKAOPAY' || $od['od_settle_case'] == '간편결제' || ($od['od_pg'] == 'inicis' && is_inicis_order_pay($od['od_settle_case']) )) { ?>
|
||||||
if(status == "취소" || status == "반품" || status == "품절") {
|
if(status == "취소" || status == "반품" || status == "품절") {
|
||||||
var $ct_chk = $("input[name^=ct_chk]");
|
var $ct_chk = $("input[name^=ct_chk]");
|
||||||
var chk_cnt = $ct_chk.length;
|
var chk_cnt = $ct_chk.length;
|
||||||
|
|||||||
@ -251,6 +251,10 @@ if (in_array($_POST['ct_status'], $status_cancel)) {
|
|||||||
$pg_res_msg = $xpay->Response_Msg();
|
$pg_res_msg = $xpay->Response_Msg();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'toss':
|
||||||
|
$cancel_msg = '쇼핑몰 운영자 승인 취소';
|
||||||
|
include_once(G5_SHOP_PATH.'/toss/toss_cancel.php');
|
||||||
|
break;
|
||||||
case 'inicis':
|
case 'inicis':
|
||||||
include_once(G5_SHOP_PATH.'/settle_inicis.inc.php');
|
include_once(G5_SHOP_PATH.'/settle_inicis.inc.php');
|
||||||
$cancel_msg = '쇼핑몰 운영자 승인 취소';
|
$cancel_msg = '쇼핑몰 운영자 승인 취소';
|
||||||
|
|||||||
@ -160,11 +160,11 @@ if( function_exists('pg_setting_check') ){
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form name="frmorderlist" class="local_sch01 local_sch">
|
<form name="frmorderlist" class="local_sch01 local_sch">
|
||||||
<input type="hidden" name="doc" value="<?php echo get_sanitize_input($doc); ?>">
|
<input type="hidden" name="doc" value="<?php echo $doc; ?>">
|
||||||
<input type="hidden" name="sort1" value="<?php echo get_sanitize_input($sort1); ?>">
|
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
|
||||||
<input type="hidden" name="sort2" value="<?php echo get_sanitize_input($sort2); ?>">
|
<input type="hidden" name="sort2" value="<?php echo $sort2; ?>">
|
||||||
<input type="hidden" name="page" value="<?php echo get_sanitize_input($page); ?>">
|
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
||||||
<input type="hidden" name="save_search" value="<?php echo get_sanitize_input($search); ?>">
|
<input type="hidden" name="save_search" value="<?php echo $search; ?>">
|
||||||
|
|
||||||
<label for="sel_field" class="sound_only">검색대상</label>
|
<label for="sel_field" class="sound_only">검색대상</label>
|
||||||
<select name="sel_field" id="sel_field">
|
<select name="sel_field" id="sel_field">
|
||||||
|
|||||||
27
adm/shop_admin/orderliveupdate.php
Normal file
27
adm/shop_admin/orderliveupdate.php
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?
|
||||||
|
$sub_menu = "800100";
|
||||||
|
include_once("./_common.php");
|
||||||
|
|
||||||
|
$current_status = $od_id = 0; // 변수 초기화
|
||||||
|
|
||||||
|
// orderlist_ticket.php 에서 가져온거 넣어줌
|
||||||
|
$current_status = $_GET['st'];
|
||||||
|
$od_id = $_GET['od_id'];
|
||||||
|
|
||||||
|
// 조건문 시작
|
||||||
|
if($_GET['bo']=="u" && $current_status === '입금') { //사용처리
|
||||||
|
change_status($od_id, '입금', '완료'); // 완료처리하고
|
||||||
|
// cart table에도 완료처리 시키고
|
||||||
|
$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);
|
||||||
|
}
|
||||||
|
} // end if
|
||||||
|
|
||||||
|
goto_url("./orderlist_ticket.php"); //이전 url로 보내기
|
||||||
|
?>
|
||||||
@ -210,6 +210,8 @@ if(!sql_query(" select pp_cash from {$g5['g5_shop_personalpay_table']} limit 1 "
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$cash_receipt_script = 'javascript:showCashReceipts(\''.$LGD_MID.'\',\''.$pp['pp_id'].'\',\''.$pp['pp_casseqno'].'\',\''.$trade_type.'\',\''.$CST_PLATFORM.'\');';
|
$cash_receipt_script = 'javascript:showCashReceipts(\''.$LGD_MID.'\',\''.$pp['pp_id'].'\',\''.$pp['pp_casseqno'].'\',\''.$trade_type.'\',\''.$CST_PLATFORM.'\');';
|
||||||
|
} else if($pp['pp_pg'] == 'toss') {
|
||||||
|
$cash_receipt_script = 'window.open(\'https://dashboard.tosspayments.com/receipt/mids/si_'.$config['cf_lg_mid'].'/orders/'.$pp['pp_id'].'/cash-receipt?ref=dashboard\',\'receipt\',\'width=430,height=700\');';
|
||||||
} else if($pp['pp_pg'] == 'inicis') {
|
} else if($pp['pp_pg'] == 'inicis') {
|
||||||
$cash = unserialize($pp['pp_cash_info']);
|
$cash = unserialize($pp['pp_cash_info']);
|
||||||
$cash_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid='.$cash['TID'].'&clpaymethod=22\',\'showreceipt\',\'width=380,height=540,scrollbars=no,resizable=no\');';
|
$cash_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid='.$cash['TID'].'&clpaymethod=22\',\'showreceipt\',\'width=380,height=540,scrollbars=no,resizable=no\');';
|
||||||
|
|||||||
@ -5,6 +5,16 @@ include_once(G5_ADMIN_PATH.'/admin.lib.php');
|
|||||||
include_once(G5_SMS5_PATH.'/sms5.lib.php');
|
include_once(G5_SMS5_PATH.'/sms5.lib.php');
|
||||||
|
|
||||||
if (!strstr($_SERVER['SCRIPT_NAME'], 'install.php')) {
|
if (!strstr($_SERVER['SCRIPT_NAME'], 'install.php')) {
|
||||||
|
// SMS5 테이블 G5_TABLE_PREFIX 적용
|
||||||
|
if($g5['sms5_prefix'] != 'sms5_' && sql_num_rows(sql_query("show tables like 'sms5_config'")))
|
||||||
|
{
|
||||||
|
echo '<script>
|
||||||
|
alert("기존 SMS5 테이블을 sms5 prefix 기준으로 변경합니다.\n(DB 업그레이드에서 자동 적용됩니다.)");
|
||||||
|
location.href = "'.G5_ADMIN_URL.'/dbupgrade.php";
|
||||||
|
</script>';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
if(!sql_num_rows(sql_query(" show tables like '{$g5['sms5_config_table']}' ")))
|
if(!sql_num_rows(sql_query(" show tables like '{$g5['sms5_config_table']}' ")))
|
||||||
goto_url('install.php');
|
goto_url('install.php');
|
||||||
|
|
||||||
|
|||||||
@ -14,16 +14,20 @@ if($config['cf_visit_del'] > 0) {
|
|||||||
$tmp_before_date = date("Y-m-d", G5_SERVER_TIME - ($config['cf_visit_del'] * 86400));
|
$tmp_before_date = date("Y-m-d", G5_SERVER_TIME - ($config['cf_visit_del'] * 86400));
|
||||||
$sql = " delete from {$g5['visit_table']} where vi_date < '$tmp_before_date' ";
|
$sql = " delete from {$g5['visit_table']} where vi_date < '$tmp_before_date' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
|
if (defined('G5_USE_OPTIMIZE_DBTABLE') && G5_USE_OPTIMIZE_DBTABLE) {
|
||||||
sql_query(" OPTIMIZE TABLE `{$g5['visit_table']}`, `{$g5['visit_sum_table']}` ");
|
sql_query(" OPTIMIZE TABLE `{$g5['visit_table']}`, `{$g5['visit_sum_table']}` ");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 설정일이 지난 인기검색어 삭제
|
// 설정일이 지난 인기검색어 삭제
|
||||||
if($config['cf_popular_del'] > 0) {
|
if($config['cf_popular_del'] > 0) {
|
||||||
$tmp_before_date = date("Y-m-d", G5_SERVER_TIME - ($config['cf_popular_del'] * 86400));
|
$tmp_before_date = date("Y-m-d", G5_SERVER_TIME - ($config['cf_popular_del'] * 86400));
|
||||||
$sql = " delete from {$g5['popular_table']} where pp_date < '$tmp_before_date' ";
|
$sql = " delete from {$g5['popular_table']} where pp_date < '$tmp_before_date' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
|
if (defined('G5_USE_OPTIMIZE_DBTABLE') && G5_USE_OPTIMIZE_DBTABLE) {
|
||||||
sql_query(" OPTIMIZE TABLE `{$g5['popular_table']}` ");
|
sql_query(" OPTIMIZE TABLE `{$g5['popular_table']}` ");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 설정일이 지난 최근게시물 삭제
|
// 설정일이 지난 최근게시물 삭제
|
||||||
if($config['cf_new_del'] > 0) {
|
if($config['cf_new_del'] > 0) {
|
||||||
@ -36,8 +40,10 @@ if($config['cf_new_del'] > 0) {
|
|||||||
if($config['cf_memo_del'] > 0) {
|
if($config['cf_memo_del'] > 0) {
|
||||||
$sql = " delete from {$g5['memo_table']} where (TO_DAYS('".G5_TIME_YMDHIS."') - TO_DAYS(me_send_datetime)) > '{$config['cf_memo_del']}' ";
|
$sql = " delete from {$g5['memo_table']} where (TO_DAYS('".G5_TIME_YMDHIS."') - TO_DAYS(me_send_datetime)) > '{$config['cf_memo_del']}' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
|
if (defined('G5_USE_OPTIMIZE_DBTABLE') && G5_USE_OPTIMIZE_DBTABLE) {
|
||||||
sql_query(" OPTIMIZE TABLE `{$g5['memo_table']}` ");
|
sql_query(" OPTIMIZE TABLE `{$g5['memo_table']}` ");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 탈퇴회원 자동 삭제
|
// 탈퇴회원 자동 삭제
|
||||||
if($config['cf_leave_day'] > 0) {
|
if($config['cf_leave_day'] > 0) {
|
||||||
@ -65,4 +71,8 @@ if($captcha_mp3 && is_array($captcha_mp3)) {
|
|||||||
// 실행일 기록
|
// 실행일 기록
|
||||||
if(isset($config['cf_optimize_date'])) {
|
if(isset($config['cf_optimize_date'])) {
|
||||||
sql_query(" update {$g5['config_table']} set cf_optimize_date = '".G5_TIME_YMD."' ");
|
sql_query(" update {$g5['config_table']} set cf_optimize_date = '".G5_TIME_YMD."' ");
|
||||||
|
|
||||||
|
run_event('cf_optimize_date_update', $config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
run_event('db_table_optimize_end', $config);
|
||||||
@ -20,7 +20,7 @@ $me_id = isset($_REQUEST['me_id']) ? clean_xss_tags($_REQUEST['me_id']
|
|||||||
if ($me_recv_mb_id)
|
if ($me_recv_mb_id)
|
||||||
{
|
{
|
||||||
$mb = get_member($me_recv_mb_id);
|
$mb = get_member($me_recv_mb_id);
|
||||||
if (!$mb['mb_id'])
|
if (!(isset($mb['mb_id']) && $mb['mb_id']))
|
||||||
alert_close('회원정보가 존재하지 않습니다.\\n\\n탈퇴하였을 수 있습니다.');
|
alert_close('회원정보가 존재하지 않습니다.\\n\\n탈퇴하였을 수 있습니다.');
|
||||||
|
|
||||||
if (!$mb['mb_open'] && $is_admin != 'super')
|
if (!$mb['mb_open'] && $is_admin != 'super')
|
||||||
|
|||||||
@ -86,6 +86,7 @@ $qa_related = 0;
|
|||||||
$qa_email_recv = (isset($_POST['qa_email_recv']) && $_POST['qa_email_recv']) ? 1 : 0;
|
$qa_email_recv = (isset($_POST['qa_email_recv']) && $_POST['qa_email_recv']) ? 1 : 0;
|
||||||
$qa_sms_recv = (isset($_POST['qa_sms_recv']) && $_POST['qa_sms_recv']) ? 1 : 0;
|
$qa_sms_recv = (isset($_POST['qa_sms_recv']) && $_POST['qa_sms_recv']) ? 1 : 0;
|
||||||
$qa_status = 0;
|
$qa_status = 0;
|
||||||
|
$qa_html = (isset($_POST['qa_html']) && $_POST['qa_html']) ? (int) $_POST['qa_html'] : 0;
|
||||||
$answer_id = null;
|
$answer_id = null;
|
||||||
|
|
||||||
for ($i=1; $i<=5; $i++) {
|
for ($i=1; $i<=5; $i++) {
|
||||||
|
|||||||
@ -50,8 +50,8 @@ $mb_addr_jibeon = isset($_POST['mb_addr_jibeon']) ? trim($_POST['mb_addr_jibeo
|
|||||||
$mb_signature = isset($_POST['mb_signature']) ? trim($_POST['mb_signature']) : "";
|
$mb_signature = isset($_POST['mb_signature']) ? trim($_POST['mb_signature']) : "";
|
||||||
$mb_profile = isset($_POST['mb_profile']) ? trim($_POST['mb_profile']) : "";
|
$mb_profile = isset($_POST['mb_profile']) ? trim($_POST['mb_profile']) : "";
|
||||||
$mb_recommend = isset($_POST['mb_recommend']) ? trim($_POST['mb_recommend']) : "";
|
$mb_recommend = isset($_POST['mb_recommend']) ? trim($_POST['mb_recommend']) : "";
|
||||||
$mb_mailling = isset($_POST['mb_mailling']) ? trim($_POST['mb_mailling']) : "";
|
$mb_mailling = isset($_POST['mb_mailling']) ? trim($_POST['mb_mailling']) : "0";
|
||||||
$mb_sms = isset($_POST['mb_sms']) ? trim($_POST['mb_sms']) : "";
|
$mb_sms = isset($_POST['mb_sms']) ? trim($_POST['mb_sms']) : "0";
|
||||||
$mb_open = isset($_POST['mb_open']) ? trim($_POST['mb_open']) : "0";
|
$mb_open = isset($_POST['mb_open']) ? trim($_POST['mb_open']) : "0";
|
||||||
$mb_1 = isset($_POST['mb_1']) ? trim($_POST['mb_1']) : "";
|
$mb_1 = isset($_POST['mb_1']) ? trim($_POST['mb_1']) : "";
|
||||||
$mb_2 = isset($_POST['mb_2']) ? trim($_POST['mb_2']) : "";
|
$mb_2 = isset($_POST['mb_2']) ? trim($_POST['mb_2']) : "";
|
||||||
@ -63,8 +63,7 @@ $mb_7 = isset($_POST['mb_7']) ? trim($_POST['mb_7'])
|
|||||||
$mb_8 = isset($_POST['mb_8']) ? trim($_POST['mb_8']) : "";
|
$mb_8 = isset($_POST['mb_8']) ? trim($_POST['mb_8']) : "";
|
||||||
$mb_9 = isset($_POST['mb_9']) ? trim($_POST['mb_9']) : "";
|
$mb_9 = isset($_POST['mb_9']) ? trim($_POST['mb_9']) : "";
|
||||||
$mb_10 = isset($_POST['mb_10']) ? trim($_POST['mb_10']) : "";
|
$mb_10 = isset($_POST['mb_10']) ? trim($_POST['mb_10']) : "";
|
||||||
|
$mb_name = clean_xss_tags($mb_name, 1, 1);
|
||||||
$mb_name = clean_xss_tags($mb_name);
|
|
||||||
$mb_email = get_email_address($mb_email);
|
$mb_email = get_email_address($mb_email);
|
||||||
$mb_homepage = clean_xss_tags($mb_homepage);
|
$mb_homepage = clean_xss_tags($mb_homepage);
|
||||||
$mb_tel = clean_xss_tags($mb_tel);
|
$mb_tel = clean_xss_tags($mb_tel);
|
||||||
@ -75,6 +74,9 @@ $mb_addr2 = clean_xss_tags($mb_addr2);
|
|||||||
$mb_addr3 = clean_xss_tags($mb_addr3);
|
$mb_addr3 = clean_xss_tags($mb_addr3);
|
||||||
$mb_addr_jibeon = preg_match("/^(N|R)$/", $mb_addr_jibeon) ? $mb_addr_jibeon : '';
|
$mb_addr_jibeon = preg_match("/^(N|R)$/", $mb_addr_jibeon) ? $mb_addr_jibeon : '';
|
||||||
|
|
||||||
|
$mb_marketing_agree = isset($_POST['mb_marketing_agree']) ? trim($_POST['mb_marketing_agree']) : "0";
|
||||||
|
$mb_thirdparty_agree = isset($_POST['mb_thirdparty_agree']) ? trim($_POST['mb_thirdparty_agree']) : "0";
|
||||||
|
|
||||||
run_event('register_form_update_before', $mb_id, $w);
|
run_event('register_form_update_before', $mb_id, $w);
|
||||||
|
|
||||||
if ($w == '' || $w == 'u') {
|
if ($w == '' || $w == 'u') {
|
||||||
@ -250,12 +252,46 @@ if ($w == '') {
|
|||||||
mb_7 = '{$mb_7}',
|
mb_7 = '{$mb_7}',
|
||||||
mb_8 = '{$mb_8}',
|
mb_8 = '{$mb_8}',
|
||||||
mb_9 = '{$mb_9}',
|
mb_9 = '{$mb_9}',
|
||||||
mb_10 = '{$mb_10}'
|
mb_10 = '{$mb_10}',
|
||||||
|
mb_marketing_agree = '{$mb_marketing_agree}',
|
||||||
|
mb_thirdparty_agree = '{$mb_thirdparty_agree}'
|
||||||
{$sql_certify} ";
|
{$sql_certify} ";
|
||||||
|
|
||||||
// 이메일 인증을 사용하지 않는다면 이메일 인증시간을 바로 넣는다
|
// 이메일 인증을 사용하지 않는다면 이메일 인증시간을 바로 넣는다
|
||||||
if (!$config['cf_use_email_certify'])
|
if (!$config['cf_use_email_certify'])
|
||||||
$sql .= " , mb_email_certify = '".G5_TIME_YMDHIS."' ";
|
$sql .= " , mb_email_certify = '".G5_TIME_YMDHIS."' ";
|
||||||
|
|
||||||
|
$agree_items = [];
|
||||||
|
// 마케팅 목적의 개인정보 수집 및 이용
|
||||||
|
if ($mb_marketing_agree == 1) {
|
||||||
|
$sql .= " , mb_marketing_date = '".G5_TIME_YMDHIS."' ";
|
||||||
|
$agree_items[] = "마케팅 목적의 개인정보 수집 및 이용(동의)";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 광고성 이메일 수신
|
||||||
|
if ($mb_mailling == 1) {
|
||||||
|
$sql .= " , mb_mailling_date = '".G5_TIME_YMDHIS."' ";
|
||||||
|
$agree_items[] = "광고성 이메일 수신(동의)";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 광고성 SMS/카카오톡 수신
|
||||||
|
if ($mb_sms == 1) {
|
||||||
|
$sql .= " , mb_sms_date = '".G5_TIME_YMDHIS."' ";
|
||||||
|
$agree_items[] = "광고성 SMS/카카오톡 수신(동의)";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 개인정보 제3자 제공
|
||||||
|
if ($mb_thirdparty_agree == 1) {
|
||||||
|
$sql .= " , mb_thirdparty_date = '".G5_TIME_YMDHIS."' ";
|
||||||
|
$agree_items[] = "개인정보 제3자 제공(동의)";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 동의 로그 추가
|
||||||
|
if (!empty($agree_items)) {
|
||||||
|
$agree_log = "[".G5_TIME_YMDHIS.", 회원가입] " . implode(' | ', $agree_items) . "\n";
|
||||||
|
$sql .= " , mb_agree_log = CONCAT('{$agree_log}', IFNULL(mb_agree_log, ''))";
|
||||||
|
}
|
||||||
|
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
|
|
||||||
// 회원가입 포인트 부여
|
// 회원가입 포인트 부여
|
||||||
@ -346,6 +382,43 @@ if ($w == '') {
|
|||||||
if ($old_email != $mb_email && $config['cf_use_email_certify'])
|
if ($old_email != $mb_email && $config['cf_use_email_certify'])
|
||||||
$sql_email_certify = " , mb_email_certify = '' ";
|
$sql_email_certify = " , mb_email_certify = '' ";
|
||||||
|
|
||||||
|
$agree_items = [];
|
||||||
|
|
||||||
|
// 마케팅 목적의 개인정보 수집 및 이용
|
||||||
|
$sql_marketing_date = "";
|
||||||
|
if ($mb_marketing_agree_default !== $mb_marketing_agree) {
|
||||||
|
$sql_marketing_date .= " , mb_marketing_date = '".G5_TIME_YMDHIS."' ";
|
||||||
|
$agree_items[] = "마케팅 목적의 개인정보 수집 및 이용(" . ($mb_marketing_agree == 1 ? "동의" : "철회") . ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 광고성 이메일 수신
|
||||||
|
$sql_mailling_date = "";
|
||||||
|
if ($mb_mailling_default !== $mb_mailling) {
|
||||||
|
$sql_mailling_date .= " , mb_mailling_date = '".G5_TIME_YMDHIS."' ";
|
||||||
|
$agree_items[] = "광고성 이메일 수신(" . ($mb_mailling == 1 ? "동의" : "철회") . ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 광고성 SMS/카카오톡 수신
|
||||||
|
$sql_sms_date = "";
|
||||||
|
if ($mb_sms_default !== $mb_sms) {
|
||||||
|
$sql_sms_date .= " , mb_sms_date = '".G5_TIME_YMDHIS."' ";
|
||||||
|
$agree_items[] = "광고성 SMS/카카오톡 수신(" . ($mb_sms == 1 ? "동의" : "철회") . ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 개인정보 제3자 제공
|
||||||
|
$sql_thirdparty_date = "";
|
||||||
|
if ($mb_thirdparty_agree_default !== $mb_thirdparty_agree) {
|
||||||
|
$sql_thirdparty_date .= " , mb_thirdparty_date = '".G5_TIME_YMDHIS."' ";
|
||||||
|
$agree_items[] = "개인정보 제3자 제공(" . ($mb_thirdparty_agree == 1 ? "동의" : "철회") . ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 동의 로그 추가
|
||||||
|
$sql_agree_log = "";
|
||||||
|
if (!empty($agree_items)) {
|
||||||
|
$agree_log = "[".G5_TIME_YMDHIS.", 회원 정보 수정] " . implode(' | ', $agree_items) . "\n";
|
||||||
|
$sql_agree_log .= " , mb_agree_log = CONCAT('{$agree_log}', IFNULL(mb_agree_log, ''))";
|
||||||
|
}
|
||||||
|
|
||||||
$sql = " update {$g5['member_table']}
|
$sql = " update {$g5['member_table']}
|
||||||
set mb_nick = '{$mb_nick}',
|
set mb_nick = '{$mb_nick}',
|
||||||
mb_mailling = '{$mb_mailling}',
|
mb_mailling = '{$mb_mailling}',
|
||||||
@ -371,12 +444,19 @@ if ($w == '') {
|
|||||||
mb_7 = '{$mb_7}',
|
mb_7 = '{$mb_7}',
|
||||||
mb_8 = '{$mb_8}',
|
mb_8 = '{$mb_8}',
|
||||||
mb_9 = '{$mb_9}',
|
mb_9 = '{$mb_9}',
|
||||||
mb_10 = '{$mb_10}'
|
mb_10 = '{$mb_10}',
|
||||||
|
mb_marketing_agree = '{$mb_marketing_agree}',
|
||||||
|
mb_thirdparty_agree = '{$mb_thirdparty_agree}'
|
||||||
{$sql_password}
|
{$sql_password}
|
||||||
{$sql_nick_date}
|
{$sql_nick_date}
|
||||||
{$sql_open_date}
|
{$sql_open_date}
|
||||||
{$sql_email_certify}
|
{$sql_email_certify}
|
||||||
{$sql_certify}
|
{$sql_certify}
|
||||||
|
{$sql_mailling_date}
|
||||||
|
{$sql_sms_date}
|
||||||
|
{$sql_marketing_date}
|
||||||
|
{$sql_thirdparty_date}
|
||||||
|
{$sql_agree_log}
|
||||||
where mb_id = '$mb_id' ";
|
where mb_id = '$mb_id' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@ if ($is_guest && $board['bo_comment_level'] < 2) {
|
|||||||
$captcha_html = captcha_html('_comment');
|
$captcha_html = captcha_html('_comment');
|
||||||
}
|
}
|
||||||
|
|
||||||
$c_id = isset($_GET['c_id']) ? clean_xss_tags($_GET['c_id'], 1, 1) : '';
|
$c_id = isset($_GET['c_id']) ? preg_replace('/[\'",]/', '', clean_xss_tags($_GET['c_id'], 1, 1)) : '';
|
||||||
$c_wr_content = '';
|
$c_wr_content = '';
|
||||||
|
|
||||||
@include_once($board_skin_path.'/view_comment.head.skin.php');
|
@include_once($board_skin_path.'/view_comment.head.skin.php');
|
||||||
|
|||||||
@ -55,6 +55,16 @@ border:1px solid #558ab7 !important;
|
|||||||
#container_wr,
|
#container_wr,
|
||||||
#ft_wr {width:1200px}
|
#ft_wr {width:1200px}
|
||||||
|
|
||||||
|
/* 공통 - display none/block */
|
||||||
|
.is-hidden { display: none !important; }
|
||||||
|
.is-visible { display: block !important; }
|
||||||
|
|
||||||
|
/* 공통 - 뷰포트 (pc / mobile) 별 display none/block */
|
||||||
|
.pc-only { display: none; }
|
||||||
|
@media (min-width: 769px) { .pc-only { display: block !important; }}
|
||||||
|
.mobile-only { display: block; }
|
||||||
|
@media (min-width: 769px) { .mobile-only { display: none !important; }}
|
||||||
|
|
||||||
/* 팝업레이어 */
|
/* 팝업레이어 */
|
||||||
#hd_pop {z-index:1000;position:relative;margin:0 auto;height:0}
|
#hd_pop {z-index:1000;position:relative;margin:0 auto;height:0}
|
||||||
#hd_pop h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
#hd_pop h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||||
@ -332,6 +342,8 @@ box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075);
|
|||||||
.tbl_frm01 a {text-decoration:none}
|
.tbl_frm01 a {text-decoration:none}
|
||||||
.tbl_frm01 .frm_file {display:block;margin-bottom:5px}
|
.tbl_frm01 .frm_file {display:block;margin-bottom:5px}
|
||||||
.tbl_frm01 .frm_info {display:block;padding:0 0 5px;line-height:1.4em}
|
.tbl_frm01 .frm_info {display:block;padding:0 0 5px;line-height:1.4em}
|
||||||
|
.frm_info.add_info { margin-top: 10px !important; padding: 8px 12px; background: #fff; border: 1px solid #ddd; border-radius: 6px; line-height: 1.6; }
|
||||||
|
.btn_info_toggle { display: block; margin: 5px 0 0 21px; font-size: 12px; color: #3f51b5; background: none; border: none; cursor: pointer; text-decoration: underline; }
|
||||||
|
|
||||||
/*기본 리스트*/
|
/*기본 리스트*/
|
||||||
.list_01 ul {border-top:1px solid #ececec}
|
.list_01 ul {border-top:1px solid #ececec}
|
||||||
|
|||||||
@ -812,6 +812,7 @@ box-shadow: 1px 2px 2px #eee;}
|
|||||||
#sod_frm_paysel .inicis_kakaopay em{position:absolute;top:15px;left:45px;width:70px;height:30px;background:url('../img/kakao.png') no-repeat 50% 50% #ffeb00;overflow:hidden;text-indent:-999px;border-radius:30px}
|
#sod_frm_paysel .inicis_kakaopay em{position:absolute;top:15px;left:45px;width:70px;height:30px;background:url('../img/kakao.png') no-repeat 50% 50% #ffeb00;overflow:hidden;text-indent:-999px;border-radius:30px}
|
||||||
#sod_frm_paysel .kakaopay_icon{background:url('../img/kakao.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
|
#sod_frm_paysel .kakaopay_icon{background:url('../img/kakao.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
|
||||||
#sod_frm_paysel .naverpay_icon{background:url('../img/ico-default-naverpay.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
|
#sod_frm_paysel .naverpay_icon{background:url('../img/ico-default-naverpay.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
|
||||||
|
#sod_frm_paysel .naverpay_icon.nhnkcp_icon{text-indent:0;background-position: 50% 30%;padding-top:35px;padding-left:0;text-align:center}
|
||||||
#sod_frm_paysel .samsungpay_icon{background:url('../img/samsungpay.png') no-repeat 50% 50% #fff;display:inline-block;overflow:hidden;text-indent:-999px}
|
#sod_frm_paysel .samsungpay_icon{background:url('../img/samsungpay.png') no-repeat 50% 50% #fff;display:inline-block;overflow:hidden;text-indent:-999px}
|
||||||
#sod_frm_paysel .ssgpay_icon{background:url('../img/ssgpay_icon.png') no-repeat 50% 50% #fff;display:inline-block;overflow:hidden;text-indent:-999px}
|
#sod_frm_paysel .ssgpay_icon{background:url('../img/ssgpay_icon.png') no-repeat 50% 50% #fff;display:inline-block;overflow:hidden;text-indent:-999px}
|
||||||
#sod_frm_paysel .skpay_icon{background:url('../img/skpay11_icon.png') no-repeat 50% 50% #fff; background-size: 70px;display:inline-block;overflow:hidden;text-indent:-999px}
|
#sod_frm_paysel .skpay_icon{background:url('../img/skpay11_icon.png') no-repeat 50% 50% #fff; background-size: 70px;display:inline-block;overflow:hidden;text-indent:-999px}
|
||||||
@ -1151,6 +1152,8 @@ box-shadow: 1px 2px 2px #eee;}
|
|||||||
.sod_frm_mobile #m_sod_frm_paysel .inicis_lpay{background:url(../img/lpay_logo.png) no-repeat;width:35px;height:12px;overflow:hidden;text-indent:-999px;display:inline-block;background-size:100%}
|
.sod_frm_mobile #m_sod_frm_paysel .inicis_lpay{background:url(../img/lpay_logo.png) no-repeat;width:35px;height:12px;overflow:hidden;text-indent:-999px;display:inline-block;background-size:100%}
|
||||||
.sod_frm_mobile #m_sod_frm_paysel .inicis_kakaopay{background:url(../img/kakao.png) no-repeat 50% 50% #f4dc34;border-radius:30px;height:22px;width:74px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:35px auto}
|
.sod_frm_mobile #m_sod_frm_paysel .inicis_kakaopay{background:url(../img/kakao.png) no-repeat 50% 50% #f4dc34;border-radius:30px;height:22px;width:74px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:35px auto}
|
||||||
.sod_frm_mobile #m_sod_frm_paysel .kakaopay_icon{background:url(../img/kakao.png) no-repeat 50% 50% #f4dc34;border-radius:30px;height:22px;width:74px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:35px auto}
|
.sod_frm_mobile #m_sod_frm_paysel .kakaopay_icon{background:url(../img/kakao.png) no-repeat 50% 50% #f4dc34;border-radius:30px;height:22px;width:74px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:35px auto}
|
||||||
|
.sod_frm_mobile #m_sod_frm_paysel .naverpay_icon{background:url(../img/ico-default-naverpay.png) no-repeat 50% 50% #fff;border-radius:30px;height:22px;width:50px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:35px auto}
|
||||||
|
.sod_frm_mobile #m_sod_frm_paysel .naverpay_icon.nhnkcp_icon{text-indent:0;padding-left:50px;padding-top:2px;width:83px}
|
||||||
.sod_frm_mobile #m_sod_frm_paysel .applepay_icon{background:url(../img/ico-mobile-applepay.png) no-repeat 50% 50% #fff;border-radius:30px;height:23px;width:50px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:35px auto}
|
.sod_frm_mobile #m_sod_frm_paysel .applepay_icon{background:url(../img/ico-mobile-applepay.png) no-repeat 50% 50% #fff;border-radius:30px;height:23px;width:50px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:35px auto}
|
||||||
.sod_frm_mobile #m_sod_frm_paysel .samsung_pay{margin-left:-23px;background:url(../img/samsungpay.png) no-repeat 24px 3px;height:25px;width:106px;display:inline-block;overflow:hidden;text-indent:-999px}
|
.sod_frm_mobile #m_sod_frm_paysel .samsung_pay{margin-left:-23px;background:url(../img/samsungpay.png) no-repeat 24px 3px;height:25px;width:106px;display:inline-block;overflow:hidden;text-indent:-999px}
|
||||||
.sod_frm_mobile #sod_frm_pay{border-top:1px solid #f3f3f3}
|
.sod_frm_mobile #sod_frm_pay{border-top:1px solid #f3f3f3}
|
||||||
|
|||||||
@ -228,6 +228,7 @@ box-shadow: 0 0 6px rgba(0,0,0,0.2);}
|
|||||||
#m_sod_frm_paysel .inicis_kakaopay{background:url('../img/kakao.png') no-repeat 50% 50% #ffeb00;border-radius:30px;height:26px;width:74px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:36px auto}
|
#m_sod_frm_paysel .inicis_kakaopay{background:url('../img/kakao.png') no-repeat 50% 50% #ffeb00;border-radius:30px;height:26px;width:74px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:36px auto}
|
||||||
#m_sod_frm_paysel .kakaopay_icon{background:url('../img/ico-mobile-kakaopay.png') no-repeat #fff;height:23px;width:63px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:45px auto;background-position: 10% 40%}
|
#m_sod_frm_paysel .kakaopay_icon{background:url('../img/ico-mobile-kakaopay.png') no-repeat #fff;height:23px;width:63px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:45px auto;background-position: 10% 40%}
|
||||||
#m_sod_frm_paysel .naverpay_icon{background:url('../img/ico-mobile-naverpay.png') no-repeat #fff;height:23px;width:60px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:45px auto;background-position: 0% 30%}
|
#m_sod_frm_paysel .naverpay_icon{background:url('../img/ico-mobile-naverpay.png') no-repeat #fff;height:23px;width:60px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:45px auto;background-position: 0% 30%}
|
||||||
|
#m_sod_frm_paysel .naverpay_icon.nhnkcp_icon{text-indent:0;padding-left:50px;padding-top:2px;width:83px}
|
||||||
#m_sod_frm_paysel .applepay_icon{background:url('../img/ico-mobile-applepay.png') no-repeat #fff;height:30px;width:60px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:43px auto}
|
#m_sod_frm_paysel .applepay_icon{background:url('../img/ico-mobile-applepay.png') no-repeat #fff;height:30px;width:60px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:43px auto}
|
||||||
#m_sod_frm_paysel .ssgpay_icon{background:url('../img/ssgpay_icon.png') no-repeat 0px 3px #fff;width:55px;height:20px;background-size:100%;display:inline-block;overflow:hidden;text-indent:-999px}
|
#m_sod_frm_paysel .ssgpay_icon{background:url('../img/ssgpay_icon.png') no-repeat 0px 3px #fff;width:55px;height:20px;background-size:100%;display:inline-block;overflow:hidden;text-indent:-999px}
|
||||||
#m_sod_frm_paysel .skpay_icon{background:url('../img/skpay11_icon.png') no-repeat 0px 3px #fff;width:55px;height:20px;background-size:100%;display:inline-block;overflow:hidden;text-indent:-999px}
|
#m_sod_frm_paysel .skpay_icon{background:url('../img/skpay11_icon.png') no-repeat 0px 3px #fff;width:55px;height:20px;background-size:100%;display:inline-block;overflow:hidden;text-indent:-999px}
|
||||||
@ -914,6 +915,7 @@ box-shadow:0 0 8px rgba(65,98,255,0.8)}
|
|||||||
#sod_frm_paysel .inicis_kakaopay{background:url('../img/kakao.png') no-repeat 50% 50% #f4dc34;overflow:hidden;text-indent:-999px}
|
#sod_frm_paysel .inicis_kakaopay{background:url('../img/kakao.png') no-repeat 50% 50% #f4dc34;overflow:hidden;text-indent:-999px}
|
||||||
#sod_frm_paysel .kakaopay_icon{background:url('../img/kakao.png') no-repeat 50% 50% #f4dc34;overflow:hidden;text-indent:-999px}
|
#sod_frm_paysel .kakaopay_icon{background:url('../img/kakao.png') no-repeat 50% 50% #f4dc34;overflow:hidden;text-indent:-999px}
|
||||||
#sod_frm_paysel .naverpay_icon{background:url('../img/ico-default-naverpay.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
|
#sod_frm_paysel .naverpay_icon{background:url('../img/ico-default-naverpay.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
|
||||||
|
#sod_frm_paysel .naverpay_icon.nhnkcp_icon{text-indent:0;background-position: 50% 30%;padding-top:35px;padding-left:0;text-align:center}
|
||||||
#sod_frm_paysel .samsungpay_icon{background:url('../img/samsungpay.png') no-repeat 50% 50% #fff;display:inline-block;overflow:hidden;text-indent:-999px}
|
#sod_frm_paysel .samsungpay_icon{background:url('../img/samsungpay.png') no-repeat 50% 50% #fff;display:inline-block;overflow:hidden;text-indent:-999px}
|
||||||
#sod_frm_paysel .ssgpay_icon{background:url('../img/ssgpay_icon.png') no-repeat 50% 50% #fff;display:inline-block;overflow:hidden;text-indent:-999px}
|
#sod_frm_paysel .ssgpay_icon{background:url('../img/ssgpay_icon.png') no-repeat 50% 50% #fff;display:inline-block;overflow:hidden;text-indent:-999px}
|
||||||
#sod_frm_paysel .skpay_icon{background:url('../img/skpay11_icon.png') no-repeat 50% 50% #fff; background-size: 70px;display:inline-block;overflow:hidden;text-indent:-999px}
|
#sod_frm_paysel .skpay_icon{background:url('../img/skpay11_icon.png') no-repeat 50% 50% #fff; background-size: 70px;display:inline-block;overflow:hidden;text-indent:-999px}
|
||||||
|
|||||||
@ -43,18 +43,18 @@ if(! function_exists('add_admin_menu_update') ) {
|
|||||||
function add_admin_menu_update($menu) {
|
function add_admin_menu_update($menu) {
|
||||||
$menu['menu998'] = array();
|
$menu['menu998'] = array();
|
||||||
array_push($menu['menu998'],
|
array_push($menu['menu998'],
|
||||||
array('998000', '퍼스트가든', G5_ADMIN_URL . '/fg_admin/bakery/bakery_stock.php', 'firstgarden'),
|
array('998000', '퍼스트가든', G5_ADMIN_URL . '/fg_admin/orderlist_ticket.php', 'firstgarden'),
|
||||||
array('998010', '베이커리 재고관리', G5_ADMIN_URL . '/fg_admin/bakery/bakery_stock_adm.php', 'firstgarden'),
|
//array('998010', '베이커리 재고관리', G5_ADMIN_URL . '/fg_admin/bakery/bakery_stock_adm.php', 'firstgarden'),
|
||||||
array('998020', '베이커리 목록관리', G5_ADMIN_URL . '/fg_admin/bakery/bakery_product_list.php', 'firstgarden'),
|
//array('998020', '베이커리 목록관리', G5_ADMIN_URL . '/fg_admin/bakery/bakery_product_list.php', 'firstgarden'),
|
||||||
array('998210', 'VIP 명단관리', G5_ADMIN_URL . '/fg_admin/vip/vip_list.php', 'firstgarden'),
|
//array('998210', 'VIP 명단관리', G5_ADMIN_URL . '/fg_admin/vip/vip_list.php', 'firstgarden'),
|
||||||
array('998220', 'VIP 구분관리', G5_ADMIN_URL . '/fg_admin/vip/vip_list_category.php', 'firstgarden'),
|
//array('998220', 'VIP 구분관리', G5_ADMIN_URL . '/fg_admin/vip/vip_list_category.php', 'firstgarden'),
|
||||||
array('998310', '연간회원 명단관리', G5_ADMIN_URL . '/fg_admin/annual_member/annual_member_list.php', 'firstgarden'),
|
//array('998310', '연간회원 명단관리', G5_ADMIN_URL . '/fg_admin/annual_member/annual_member_list.php', 'firstgarden'),
|
||||||
array('998320', '연간회원 구분관리', G5_ADMIN_URL . '/fg_admin/annual_member/annual_member_category.php', 'firstgarden'),
|
//array('998320', '연간회원 구분관리', G5_ADMIN_URL . '/fg_admin/annual_member/annual_member_category.php', 'firstgarden'),
|
||||||
array('998411', '매표소주문확인', G5_ADMIN_URL.'/fg_admin/orderlist_ticket.php', 'firstgarden'),
|
array('998411', '매표소주문확인', G5_ADMIN_URL.'/fg_admin/orderlist_ticket.php', 'firstgarden'),
|
||||||
array('998421', '혜윰주문확인', G5_ADMIN_URL.'/fg_admin/orderlist_hy.php', 'firstgarden'),
|
//array('998421', '혜윰주문확인', G5_ADMIN_URL.'/fg_admin/orderlist_hy.php', 'firstgarden'),
|
||||||
array('998431', 'B2B주문확인', G5_ADMIN_URL.'/fg_admin/orderlist_b2b.php', 'firstgarden'),
|
//array('998431', 'B2B주문확인', G5_ADMIN_URL.'/fg_admin/orderlist_b2b.php', 'firstgarden'),
|
||||||
array('998412', '관리자주문확인', G5_ADMIN_URL . '/fg_admin/orderlist_admin.php', 'firstgarden'),
|
array('998412', '관리자주문확인', G5_ADMIN_URL . '/fg_admin/orderlist_admin.php', 'firstgarden'),
|
||||||
array('998413', '관지라월정산용', G5_ADMIN_URL . '/fg_admin/orderlist_admin_sum.php', 'firstgarden'),
|
array('998413', '관리자월정산용', G5_ADMIN_URL . '/fg_admin/orderlist_admin_sum.php', 'firstgarden'),
|
||||||
);
|
);
|
||||||
return $menu;
|
return $menu;
|
||||||
}
|
}
|
||||||
@ -199,3 +199,17 @@ function annu_send_sms($phone, $message) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 전화번호에 하이픈 추가
|
||||||
|
function add_hyphen($tel){
|
||||||
|
$tel = preg_replace("/[^0-9]*/s","",$tel); //숫자이외 제거
|
||||||
|
|
||||||
|
if (substr($tel,0,2) =='02'){
|
||||||
|
return preg_replace("/([0-9]{2})([0-9]{3,4})([0-9]{4})$/","\\1-\\2-\\3", $tel);
|
||||||
|
} else if(substr($tel,0,2) =='8' && substr($tel,0,2) =='15' || substr($tel,0,2) =='16'|| substr($tel,0,2) =='18' ) {
|
||||||
|
return preg_replace("/([0-9]{4})([0-9]{4})$/","\\1-\\2",$tel); // 지능망 번호이면
|
||||||
|
} else {
|
||||||
|
return preg_replace("/([0-9]{3})([0-9]{3,4})([0-9]{4})$/","\\1-\\2-\\3" ,$tel); //핸드폰번호만 이용한다면 이것만있어도됨
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@ -20,7 +20,7 @@ define('G5_ICODE_LMS_MAX_LENGTH', 1500); // 구버전 LMS 최대길이
|
|||||||
define('G5_ICODE_JSON_MAX_LENGTH', 2000); // JSON 버전 LMS 최대길이
|
define('G5_ICODE_JSON_MAX_LENGTH', 2000); // JSON 버전 LMS 최대길이
|
||||||
|
|
||||||
// SMS 테이블명
|
// SMS 테이블명
|
||||||
$g5['sms5_prefix'] = 'sms5_';
|
$g5['sms5_prefix'] = G5_TABLE_PREFIX.'sms5_';
|
||||||
$g5['sms5_config_table'] = $g5['sms5_prefix'] . 'config';
|
$g5['sms5_config_table'] = $g5['sms5_prefix'] . 'config';
|
||||||
$g5['sms5_write_table'] = $g5['sms5_prefix'] . 'write';
|
$g5['sms5_write_table'] = $g5['sms5_prefix'] . 'write';
|
||||||
$g5['sms5_history_table'] = $g5['sms5_prefix'] . 'history';
|
$g5['sms5_history_table'] = $g5['sms5_prefix'] . 'history';
|
||||||
|
|||||||
@ -276,6 +276,7 @@ CREATE TABLE IF NOT EXISTS `g5_config` (
|
|||||||
`cf_max_po_id` int(11) NOT NULL DEFAULT '0',
|
`cf_max_po_id` int(11) NOT NULL DEFAULT '0',
|
||||||
`cf_stipulation` text NOT NULL,
|
`cf_stipulation` text NOT NULL,
|
||||||
`cf_privacy` text NOT NULL,
|
`cf_privacy` text NOT NULL,
|
||||||
|
`cf_use_promotion` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
`cf_open_modify` int(11) NOT NULL DEFAULT '0',
|
`cf_open_modify` int(11) NOT NULL DEFAULT '0',
|
||||||
`cf_memo_send_point` int(11) NOT NULL DEFAULT '0',
|
`cf_memo_send_point` int(11) NOT NULL DEFAULT '0',
|
||||||
`cf_mobile_new_skin` varchar(50) NOT NULL DEFAULT '',
|
`cf_mobile_new_skin` varchar(50) NOT NULL DEFAULT '',
|
||||||
@ -298,6 +299,8 @@ CREATE TABLE IF NOT EXISTS `g5_config` (
|
|||||||
`cf_cert_kcp_enckey` varchar(100) NOT NULL DEFAULT '',
|
`cf_cert_kcp_enckey` varchar(100) NOT NULL DEFAULT '',
|
||||||
`cf_lg_mid` varchar(100) NOT NULL DEFAULT '',
|
`cf_lg_mid` varchar(100) NOT NULL DEFAULT '',
|
||||||
`cf_lg_mert_key` varchar(100) NOT NULL DEFAULT '',
|
`cf_lg_mert_key` varchar(100) NOT NULL DEFAULT '',
|
||||||
|
`cf_toss_client_key` varchar(100) NOT NULL DEFAULT '',
|
||||||
|
`cf_toss_secret_key` varchar(100) NOT NULL DEFAULT '',
|
||||||
`cf_cert_limit` int(11) NOT NULL DEFAULT '0',
|
`cf_cert_limit` int(11) NOT NULL DEFAULT '0',
|
||||||
`cf_cert_req` tinyint(4) NOT NULL DEFAULT '0',
|
`cf_cert_req` tinyint(4) NOT NULL DEFAULT '0',
|
||||||
`cf_sms_use` varchar(255) NOT NULL DEFAULT '',
|
`cf_sms_use` varchar(255) NOT NULL DEFAULT '',
|
||||||
@ -520,13 +523,20 @@ CREATE TABLE IF NOT EXISTS `g5_member` (
|
|||||||
`mb_memo` text NOT NULL,
|
`mb_memo` text NOT NULL,
|
||||||
`mb_lost_certify` varchar(255) NOT NULL,
|
`mb_lost_certify` varchar(255) NOT NULL,
|
||||||
`mb_mailling` tinyint(4) NOT NULL default '0',
|
`mb_mailling` tinyint(4) NOT NULL default '0',
|
||||||
|
`mb_mailling_date` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||||
`mb_sms` tinyint(4) NOT NULL default '0',
|
`mb_sms` tinyint(4) NOT NULL default '0',
|
||||||
|
`mb_sms_date` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||||
`mb_open` tinyint(4) NOT NULL default '0',
|
`mb_open` tinyint(4) NOT NULL default '0',
|
||||||
`mb_open_date` date NOT NULL default '0000-00-00',
|
`mb_open_date` date NOT NULL default '0000-00-00',
|
||||||
`mb_profile` text NOT NULL,
|
`mb_profile` text NOT NULL,
|
||||||
`mb_memo_call` varchar(255) NOT NULL default '',
|
`mb_memo_call` varchar(255) NOT NULL default '',
|
||||||
`mb_memo_cnt` int(11) NOT NULL DEFAULT '0',
|
`mb_memo_cnt` int(11) NOT NULL DEFAULT '0',
|
||||||
`mb_scrap_cnt` int(11) NOT NULL default '0',
|
`mb_scrap_cnt` int(11) NOT NULL default '0',
|
||||||
|
`mb_marketing_agree` tinyint(1) NOT NULL default '0',
|
||||||
|
`mb_marketing_date` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||||
|
`mb_thirdparty_agree` tinyint(1) NOT NULL default '0',
|
||||||
|
`mb_thirdparty_date` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||||
|
`mb_agree_log` TEXT NOT NULL,
|
||||||
`mb_1` varchar(255) NOT NULL default '',
|
`mb_1` varchar(255) NOT NULL default '',
|
||||||
`mb_2` varchar(255) NOT NULL default '',
|
`mb_2` varchar(255) NOT NULL default '',
|
||||||
`mb_3` varchar(255) NOT NULL default '',
|
`mb_3` varchar(255) NOT NULL default '',
|
||||||
@ -542,7 +552,6 @@ CREATE TABLE IF NOT EXISTS `g5_member` (
|
|||||||
KEY `mb_today_login` (`mb_today_login`),
|
KEY `mb_today_login` (`mb_today_login`),
|
||||||
KEY `mb_datetime` (`mb_datetime`)
|
KEY `mb_datetime` (`mb_datetime`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|||||||
@ -258,6 +258,12 @@ function url_auto_link($str)
|
|||||||
global $g5;
|
global $g5;
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
if ($replace_str = run_replace('url_auto_link_before', '', $str)) {
|
||||||
|
return $replace_str;
|
||||||
|
}
|
||||||
|
|
||||||
|
$ori_str = $str;
|
||||||
|
|
||||||
// 140326 유창화님 제안코드로 수정
|
// 140326 유창화님 제안코드로 수정
|
||||||
// http://sir.kr/pg_lecture/461
|
// http://sir.kr/pg_lecture/461
|
||||||
// http://sir.kr/pg_lecture/463
|
// http://sir.kr/pg_lecture/463
|
||||||
@ -290,7 +296,7 @@ function url_auto_link($str)
|
|||||||
$str = preg_replace("/\t_gt_\t/", ">", $str);
|
$str = preg_replace("/\t_gt_\t/", ">", $str);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
return run_replace('url_auto_link', $str);
|
return run_replace('url_auto_link', $str, $ori_str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1132,6 +1138,10 @@ function insert_use_point($mb_id, $point, $po_id='')
|
|||||||
{
|
{
|
||||||
global $g5, $config;
|
global $g5, $config;
|
||||||
|
|
||||||
|
if ($replace_insert = run_replace('insert_use_point_before', '', $mb_id, $point, $po_id)) {
|
||||||
|
return $replace_insert;
|
||||||
|
}
|
||||||
|
|
||||||
if($config['cf_point_term'])
|
if($config['cf_point_term'])
|
||||||
$sql_order = " order by po_expire_date asc, po_id asc ";
|
$sql_order = " order by po_expire_date asc, po_id asc ";
|
||||||
else
|
else
|
||||||
@ -3411,6 +3421,9 @@ function clean_xss_tags($str, $check_entities=0, $is_remove_tags=0, $cur_str_len
|
|||||||
$result = preg_replace('#([^\p{L}]|^)(?:javascript|jar|applescript|vbscript|vbs|wscript|jscript|behavior|mocha|livescript|view-source)\s*:(?:.*?([/\\\;()\'">]|$))#ius',
|
$result = preg_replace('#([^\p{L}]|^)(?:javascript|jar|applescript|vbscript|vbs|wscript|jscript|behavior|mocha|livescript|view-source)\s*:(?:.*?([/\\\;()\'">]|$))#ius',
|
||||||
'$1$2', $result);
|
'$1$2', $result);
|
||||||
|
|
||||||
|
// 따옴표 + 속성으로 강제 진입 차단 (예: "style=..., 'onerror=...)
|
||||||
|
$result = preg_replace('/["\']\s*(?:on\w+|style)\s*=\s*/i', '', $result);
|
||||||
|
|
||||||
if((string)$result === (string)$str) break;
|
if((string)$result === (string)$str) break;
|
||||||
|
|
||||||
$str = $result;
|
$str = $result;
|
||||||
@ -3667,6 +3680,10 @@ function check_url_host($url, $msg='', $return_url=G5_URL, $is_redirect=false)
|
|||||||
alert('url 에 올바르지 않은 값이 포함되어 있습니다.');
|
alert('url 에 올바르지 않은 값이 포함되어 있습니다.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (preg_match('#//[^/@]+@#', $url)) {
|
||||||
|
alert('url에 사용자 정보가 포함되어 있어 접근할 수 없습니다.');
|
||||||
|
}
|
||||||
|
|
||||||
while ( ( $replace_url = preg_replace(array('/\/{2,}/', '/\\@/'), array('//', ''), urldecode($url)) ) != $url ) {
|
while ( ( $replace_url = preg_replace(array('/\/{2,}/', '/\\@/'), array('//', ''), urldecode($url)) ) != $url ) {
|
||||||
$url = $replace_url;
|
$url = $replace_url;
|
||||||
}
|
}
|
||||||
@ -4225,7 +4242,7 @@ function is_include_path_check($path='', $is_input='')
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( preg_match('/\/data\/(file|editor|qa|cache|member|member_image|session|tmp)\/[A-Za-z0-9_]{1,20}\//i', $replace_path) ){
|
if (preg_match('/\/data\/(file|editor|qa|cache|member|member_image|session|tmp)\/[A-Za-z0-9_]{1,20}\//i', $replace_path) || preg_match('/pe(?:ar|cl)(?:cmd)?\.php/i', $replace_path)){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if( preg_match('/'.G5_PLUGIN_DIR.'\//i', $replace_path) && (preg_match('/'.G5_OKNAME_DIR.'\//i', $replace_path) || preg_match('/'.G5_KCPCERT_DIR.'\//i', $replace_path) || preg_match('/'.G5_LGXPAY_DIR.'\//i', $replace_path)) || (preg_match('/search\.skin\.php/i', $replace_path) ) ){
|
if( preg_match('/'.G5_PLUGIN_DIR.'\//i', $replace_path) && (preg_match('/'.G5_OKNAME_DIR.'\//i', $replace_path) || preg_match('/'.G5_KCPCERT_DIR.'\//i', $replace_path) || preg_match('/'.G5_LGXPAY_DIR.'\//i', $replace_path)) || (preg_match('/search\.skin\.php/i', $replace_path) ) ){
|
||||||
|
|||||||
@ -5,6 +5,7 @@ include_once(G5_PHPMAILER_PATH.'/PHPMailerAutoload.php');
|
|||||||
|
|
||||||
// 메일 보내기 (파일 여러개 첨부 가능)
|
// 메일 보내기 (파일 여러개 첨부 가능)
|
||||||
// type : text=0, html=1, text+html=2
|
// type : text=0, html=1, text+html=2
|
||||||
|
/* 원본 이메일 발송 기능
|
||||||
function mailer($fname, $fmail, $to, $subject, $content, $type=0, $file="", $cc="", $bcc="")
|
function mailer($fname, $fmail, $to, $subject, $content, $type=0, $file="", $cc="", $bcc="")
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
@ -64,6 +65,65 @@ function mailer($fname, $fmail, $to, $subject, $content, $type=0, $file="", $cc=
|
|||||||
|
|
||||||
return $mail_send_result;
|
return $mail_send_result;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
function mailer($fname, $fmail, $to, $subject, $content, $type=0, $file="", $cc="", $bcc="")
|
||||||
|
{
|
||||||
|
|
||||||
|
global $config;
|
||||||
|
global $g5;
|
||||||
|
|
||||||
|
// 메일발송 사용을 하지 않는다면
|
||||||
|
if (!$config['cf_email_use']) return;
|
||||||
|
|
||||||
|
if ($type != 1)
|
||||||
|
|
||||||
|
$content = nl2br($content);
|
||||||
|
$mail = new PHPMailer(); // defaults to using php “mail()”
|
||||||
|
|
||||||
|
if (defined('G5_SMTP') && G5_SMTP) {
|
||||||
|
|
||||||
|
// Modified By taeho. 2015.12.31, 메일을 보낼 때 메일서버에 접속하기 위한 설정입니다.
|
||||||
|
$mail->IsSMTP();
|
||||||
|
$mail->SMTPAuth = true; // enable SMTP authentication
|
||||||
|
$mail->SMTPSecure = "ssl"; // sets the prefix to the servier
|
||||||
|
$mail->Host = "smtp.daum.net"; // sets GMAIL as the SMTP server
|
||||||
|
$mail->Port = 465; // set the SMTP port for the GMAIL server
|
||||||
|
$mail->Username = "first_garden@daum.net"; // MAIL username
|
||||||
|
$mail->Password = "rsdkjqeaxzdtsfrx"; // MAIL password
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 아래 두개를 설정하지 않으면 한글 깨짐
|
||||||
|
$mail->CharSet = 'UTF-8'; // 문자셋 설정
|
||||||
|
$mail->Encoding = 'base64'; // 인코딩 설정
|
||||||
|
$mail->isHTML(true); // HTML 메일 명시
|
||||||
|
$mail->AddAddress($to);
|
||||||
|
// $mail->AddAddress($to); // 중복 제거
|
||||||
|
|
||||||
|
|
||||||
|
$mail->From = 'firstgarden@firstgarden.co.kr'; // 사용자에게 보여줄 보내는이 메일주소
|
||||||
|
$mail->FromName = '퍼스트가든'; // 사용자에게 보여줄 보내는 사람의 이름 등
|
||||||
|
$mail->Subject = $subject;
|
||||||
|
$mail->AltBody = ''; // optional, comment out and test
|
||||||
|
$mail->MsgHTML($content);
|
||||||
|
$mail->AddAddress($to);
|
||||||
|
$mail->AddAddress($to);
|
||||||
|
|
||||||
|
if ($cc)
|
||||||
|
$mail->AddCC($cc);
|
||||||
|
if ($bcc)
|
||||||
|
$mail->AddBCC($bcc);
|
||||||
|
//print_r2($file); exit;
|
||||||
|
|
||||||
|
if ($file != "") {
|
||||||
|
foreach ($file as $f) {
|
||||||
|
$mail->AddAttachment($f['path'], $f['name']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $mail->Send();
|
||||||
|
}
|
||||||
|
|
||||||
// 파일을 첨부함
|
// 파일을 첨부함
|
||||||
function attach_file($filename, $tmp_name)
|
function attach_file($filename, $tmp_name)
|
||||||
|
|||||||
@ -50,6 +50,7 @@ function create_hash($password, $force_compat = false)
|
|||||||
$salt = base64_encode(mcrypt_create_iv(PBKDF2_COMPAT_SALT_BYTES, MCRYPT_DEV_URANDOM));
|
$salt = base64_encode(mcrypt_create_iv(PBKDF2_COMPAT_SALT_BYTES, MCRYPT_DEV_URANDOM));
|
||||||
} elseif (@file_exists('/dev/urandom') && $fp = @fopen('/dev/urandom', 'r')) {
|
} elseif (@file_exists('/dev/urandom') && $fp = @fopen('/dev/urandom', 'r')) {
|
||||||
$salt = base64_encode(fread($fp, PBKDF2_COMPAT_SALT_BYTES));
|
$salt = base64_encode(fread($fp, PBKDF2_COMPAT_SALT_BYTES));
|
||||||
|
fclose($fp); // 파일 닫기
|
||||||
} else {
|
} else {
|
||||||
$salt = '';
|
$salt = '';
|
||||||
for ($i = 0; $i < PBKDF2_COMPAT_SALT_BYTES; $i += 2) {
|
for ($i = 0; $i < PBKDF2_COMPAT_SALT_BYTES; $i += 2) {
|
||||||
|
|||||||
@ -1010,7 +1010,7 @@ function get_item_options($it_id, $subject, $is_div='', $is_first_option_title='
|
|||||||
for($k=0; $k<$opt_count; $k++) {
|
for($k=0; $k<$opt_count; $k++) {
|
||||||
$opt_val = $opt[$k];
|
$opt_val = $opt[$k];
|
||||||
if(strlen($opt_val)) {
|
if(strlen($opt_val)) {
|
||||||
$select .= '<option value="'.$opt_val.'">'.$opt_val.'</option>'.PHP_EOL;
|
$select .= '<option value="'.get_text($opt_val).'">'.get_text($opt_val).'</option>'.PHP_EOL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$select .= '</select>'.PHP_EOL;
|
$select .= '</select>'.PHP_EOL;
|
||||||
@ -1046,7 +1046,7 @@ function get_item_options($it_id, $subject, $is_div='', $is_first_option_title='
|
|||||||
else
|
else
|
||||||
$soldout = '';
|
$soldout = '';
|
||||||
|
|
||||||
$select .= '<option value="'.$row['io_id'].','.$row['io_price'].','.$row['io_stock_qty'].'">'.$row['io_id'].$price.$soldout.'</option>'.PHP_EOL;
|
$select .= '<option value="'.get_text($row['io_id']).','.$row['io_price'].','.$row['io_stock_qty'].'">'.get_text($row['io_id']).$price.$soldout.'</option>'.PHP_EOL;
|
||||||
}
|
}
|
||||||
$select .= '</select>'.PHP_EOL;
|
$select .= '</select>'.PHP_EOL;
|
||||||
|
|
||||||
@ -1101,7 +1101,7 @@ function get_item_supply($it_id, $subject, $is_div='', $is_first_option_title=''
|
|||||||
else
|
else
|
||||||
$soldout = '';
|
$soldout = '';
|
||||||
|
|
||||||
$options[$opt_id[0]][] = '<option value="'.$opt_id[1].','.$row['io_price'].','.$io_stock_qty.'">'.$opt_id[1].$price.$soldout.'</option>';
|
$options[$opt_id[0]][] = '<option value="'.get_text($opt_id[1]).','.$row['io_price'].','.$io_stock_qty.'">'.get_text($opt_id[1]).$price.$soldout.'</option>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1122,7 +1122,7 @@ function get_item_supply($it_id, $subject, $is_div='', $is_first_option_title=''
|
|||||||
$first_option_title = $is_first_option_title ? $subj[$i] : '선택';
|
$first_option_title = $is_first_option_title ? $subj[$i] : '선택';
|
||||||
|
|
||||||
$select = '<select id="it_supply_'.$seq.'" class="it_supply">'.PHP_EOL;
|
$select = '<select id="it_supply_'.$seq.'" class="it_supply">'.PHP_EOL;
|
||||||
$select .= '<option value="">'.$first_option_title.'</option>'.PHP_EOL;
|
$select .= '<option value="">'.get_text($first_option_title).'</option>'.PHP_EOL;
|
||||||
for($k=0; $k<$opt_count; $k++) {
|
for($k=0; $k<$opt_count; $k++) {
|
||||||
$opt_val = $opt[$k];
|
$opt_val = $opt[$k];
|
||||||
if($opt_val) {
|
if($opt_val) {
|
||||||
@ -2823,7 +2823,7 @@ function check_pay_name_replace($payname, $od=array(), $is_client=0){
|
|||||||
} else if( isset($od['od_pg']) && $od['od_pg'] === 'inicis' ){
|
} else if( isset($od['od_pg']) && $od['od_pg'] === 'inicis' ){
|
||||||
return 'KPAY';
|
return 'KPAY';
|
||||||
} else if( isset($od['od_pg']) && $od['od_pg'] === 'kcp' ){
|
} else if( isset($od['od_pg']) && $od['od_pg'] === 'kcp' ){
|
||||||
if( isset($od['od_other_pay_type']) && $od['od_other_pay_type'] === 'OT16' ){
|
if( isset($od['od_other_pay_type']) && ($od['od_other_pay_type'] === 'OT16' || $od['od_other_pay_type'] === 'NHNKCP_NAVERMONEY')){
|
||||||
return '네이버페이_NHNKCP'.$add_str;
|
return '네이버페이_NHNKCP'.$add_str;
|
||||||
} else if( isset($od['od_other_pay_type']) && ($od['od_other_pay_type'] === 'OT13' || $od['od_other_pay_type'] === 'NHNKCP_KAKAOMONEY') ){
|
} else if( isset($od['od_other_pay_type']) && ($od['od_other_pay_type'] === 'OT13' || $od['od_other_pay_type'] === 'NHNKCP_KAKAOMONEY') ){
|
||||||
return '카카오페이_NHNKCP'.$add_str;
|
return '카카오페이_NHNKCP'.$add_str;
|
||||||
|
|||||||
@ -254,10 +254,11 @@ if (!$authInfo) {
|
|||||||
|
|
||||||
<?php $i++;
|
<?php $i++;
|
||||||
} // endforeach
|
} // endforeach
|
||||||
|
$sumData = getBakeryInvenSummaryData($searchDate);
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
<!-- 합계 데이터 출력 -->
|
|
||||||
<tfoot>
|
<tfoot>
|
||||||
|
<!-- 합계 데이터 출력 -->
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3" class="text-center">합계</th>
|
<td colspan="3" class="text-center">합계</th>
|
||||||
<td class="text-end" id="total_prev_stock"><?=number_format($t_prev_stock)?></th>
|
<td class="text-end" id="total_prev_stock"><?=number_format($t_prev_stock)?></th>
|
||||||
@ -272,6 +273,21 @@ if (!$authInfo) {
|
|||||||
<td class="text-end" id="total_payment_amount"><?=number_format($t_payment_amount)?></th>
|
<td class="text-end" id="total_payment_amount"><?=number_format($t_payment_amount)?></th>
|
||||||
<td class="text-end" id="total_current_stock"><?=number_format($t_current_stock)?></th>
|
<td class="text-end" id="total_current_stock"><?=number_format($t_current_stock)?></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
<!-- 누계 데이터 출력 -->
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" class="text-center">누계</th>
|
||||||
|
<td class="text-end" id="summary_prev_stock"></th>
|
||||||
|
<td class="text-end" id="summary_production"><?=number_format($sumData['total_production'])?></th>
|
||||||
|
<td class="text-end" id="summary_inhouse_use"><?=number_format($sumData['total_inhouse_use'])?></th>
|
||||||
|
<td class="text-end" id="summary_recycling"><?=number_format($sumData['total_recycling'])?></th>
|
||||||
|
<td class="text-end" id="summary_disposal"><?=number_format($sumData['total_disposal'])?></th>
|
||||||
|
<td class="text-end" id="summary_sales"><?=number_format($sumData['total_sales'])?></th>
|
||||||
|
<td class="text-end" id="summary_unit_price"></th>
|
||||||
|
<td class="text-end" id="summary_sales_amount"><?=number_format($sumData['total_sales_amount'])?></th>
|
||||||
|
<td class="text-end" id="summary_menu_discount"><?=number_format($sumData['total_menu_discount'])?></th>
|
||||||
|
<td class="text-end" id="summary_payment_amount"><?=number_format($sumData['total_payment_amount'])?></th>
|
||||||
|
<td class="text-end" id="summary_current_stock"></th>
|
||||||
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -7,6 +7,10 @@ if(!$_SESSION['user_id']) exit; // 로그인 되어있지 않으면 확인 불
|
|||||||
$searchDate = $_POST['searchDate'];
|
$searchDate = $_POST['searchDate'];
|
||||||
$ord_by = $_POST['ordBy'];
|
$ord_by = $_POST['ordBy'];
|
||||||
$result = getBakeryInvenData($searchDate, $ord_by);
|
$result = getBakeryInvenData($searchDate, $ord_by);
|
||||||
|
$authInfo = getAuthorInfo($searchDate);
|
||||||
|
|
||||||
|
// 누계 데이터 가져오기
|
||||||
|
$sumData = getBakeryInvenSummaryData($searchDate);
|
||||||
|
|
||||||
// UTF-8 BOM 추가
|
// UTF-8 BOM 추가
|
||||||
echo "\xEF\xBB\xBF";
|
echo "\xEF\xBB\xBF";
|
||||||
@ -17,26 +21,105 @@ header("Content-Description: PHP Generated Data");
|
|||||||
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.tit { background-color:#C0C0C0; height:30px; }
|
table {border-collapse:collapse; border:none;}
|
||||||
|
.head {background-color:#C0C0C0; border: 1px solid black;}
|
||||||
|
.foot {background-color:#C0C0C0; border: 1px solid black;}
|
||||||
.no-text {mso-number-format:'\@'; text-align: center; }
|
.no-text {mso-number-format:'\@'; text-align: center; }
|
||||||
|
.line {border: 1px solid black;}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<table cellspacing="0" cellpadding="0" border="1">
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="tit">품목</th>
|
<th>베이커리일일현황</th>
|
||||||
<th class="tit">바코드</th>
|
<th></th>
|
||||||
<th class="tit">전일재고</th>
|
<th></th>
|
||||||
<th class="tit">생산</th>
|
<th></th>
|
||||||
<th class="tit">업장사용</th>
|
<th></th>
|
||||||
<th class="tit">재활용</th>
|
<th></th>
|
||||||
<th class="tit">폐기</th>
|
<th></th>
|
||||||
<th class="tit">판매수량</th>
|
<th></th>
|
||||||
<th class="tit">판매단가</th>
|
<th></th>
|
||||||
<th class="tit">판매금액</th>
|
<th></th>
|
||||||
<th class="tit">메뉴별할인</th>
|
<th></th>
|
||||||
<th class="tit">결제금액</th>
|
<th></th>
|
||||||
<th class="tit">현재고</th>
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>날짜</th>
|
||||||
|
<th><?=$searchDate?></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>근무자</th>
|
||||||
|
<th><?=$authInfo['worker']?></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>작성자</th>
|
||||||
|
<th><?=$authInfo['author']?></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="head">품목</th>
|
||||||
|
<th class="head">바코드</th>
|
||||||
|
<th class="head">전일재고</th>
|
||||||
|
<th class="head">생산</th>
|
||||||
|
<th class="head">업장사용</th>
|
||||||
|
<th class="head">재활용</th>
|
||||||
|
<th class="head">폐기</th>
|
||||||
|
<th class="head">판매수량</th>
|
||||||
|
<th class="head">판매단가</th>
|
||||||
|
<th class="head">판매금액</th>
|
||||||
|
<th class="head">메뉴별할인</th>
|
||||||
|
<th class="head">결제금액</th>
|
||||||
|
<th class="head">현재고</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -45,11 +128,12 @@ $t_prev_stock = $t_production = $t_inhouse_use = $t_recycling = $t_disposal = $t
|
|||||||
|
|
||||||
// 데이터 출력
|
// 데이터 출력
|
||||||
foreach ( $result as $row) {
|
foreach ( $result as $row) {
|
||||||
|
$previous_stock = getPrevStock($searchDate, $row['barcode']);
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?=$row['product_name']?></td>
|
<td><?=$row['product_name']?></td>
|
||||||
<td><?=$row['barcode']?></td>
|
<td><?=$row['barcode']?></td>
|
||||||
<td><?=number_format(getPrevStock($searchDate, $row['barcode']))?></td>
|
<td><?=number_format($previous_stock)?></td>
|
||||||
<td><?=number_format($row['production'])?></td>
|
<td><?=number_format($row['production'])?></td>
|
||||||
<td><?=number_format($row['inhouse_use'])?></td>
|
<td><?=number_format($row['inhouse_use'])?></td>
|
||||||
<td><?=number_format($row['recycling'])?></td>
|
<td><?=number_format($row['recycling'])?></td>
|
||||||
@ -61,10 +145,10 @@ foreach ( $result as $row) {
|
|||||||
<td><?=number_format($row['payment_amount'])?></td>
|
<td><?=number_format($row['payment_amount'])?></td>
|
||||||
<td><?=number_format($row['current_stock'])?></td>
|
<td><?=number_format($row['current_stock'])?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
|
||||||
|
|
||||||
|
<?php
|
||||||
// 합계 함수 처리
|
// 합계 함수 처리
|
||||||
$t_prev_stock += $row['previous_stock'];
|
$t_prev_stock += $previous_stock;
|
||||||
$t_production += $row['production'];
|
$t_production += $row['production'];
|
||||||
$t_inhouse_use += $row['inhouse_use'];
|
$t_inhouse_use += $row['inhouse_use'];
|
||||||
$t_recycling += $row['recycling'];
|
$t_recycling += $row['recycling'];
|
||||||
@ -75,23 +159,40 @@ foreach ( $result as $row) {
|
|||||||
$t_payment_amount += $row['payment_amount'];
|
$t_payment_amount += $row['payment_amount'];
|
||||||
$t_current_stock += $row['current_stock'];
|
$t_current_stock += $row['current_stock'];
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot class="table-group-divider">
|
<tfoot class="table-group-divider">
|
||||||
<tr class="bakery_total">
|
<tr class="bakery_total">
|
||||||
<td>합계</td>
|
<td class="foot">합계</td>
|
||||||
<td></td>
|
<td class="foot"></td>
|
||||||
<td><?=number_format($t_prev_stock) ?></td>
|
<td class="foot"><?=number_format($t_prev_stock) ?></td>
|
||||||
<td><?=number_format($t_production) ?></td>
|
<td class="foot"><?=number_format($t_production) ?></td>
|
||||||
<td><?=number_format($t_inhouse_use) ?></td>
|
<td class="foot"><?=number_format($t_inhouse_use) ?></td>
|
||||||
<td><?=number_format($t_recycling) ?></td>
|
<td class="foot"><?=number_format($t_recycling) ?></td>
|
||||||
<td><?=number_format($t_disposal) ?></td>
|
<td class="foot"><?=number_format($t_disposal) ?></td>
|
||||||
<td><?=number_format($t_sales) ?></td>
|
<td class="foot"><?=number_format($t_sales) ?></td>
|
||||||
<td></td>
|
<td class="foot"></td>
|
||||||
<td><?=number_format($t_sales_amount) ?></td>
|
<td class="foot"><?=number_format($t_sales_amount) ?></td>
|
||||||
<td><?=number_format($t_menu_discount) ?></td>
|
<td class="foot"><?=number_format($t_menu_discount) ?></td>
|
||||||
<td><?=number_format($t_payment_amount) ?></td>
|
<td class="foot"><?=number_format($t_payment_amount) ?></td>
|
||||||
<td><?=number_format($t_current_stock) ?></td>
|
<td class="foot"><?=number_format($t_current_stock) ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="foot">누계</th>
|
||||||
|
<td class="foot"></th>
|
||||||
|
<td class="foot"></th>
|
||||||
|
<td class="foot"><?=number_format($sumData['total_production'])?></th>
|
||||||
|
<td class="foot"><?=number_format($sumData['total_inhouse_use'])?></th>
|
||||||
|
<td class="foot"><?=number_format($sumData['total_recycling'])?></th>
|
||||||
|
<td class="foot"><?=number_format($sumData['total_disposal'])?></th>
|
||||||
|
<td class="foot"><?=number_format($sumData['total_sales'])?></th>
|
||||||
|
<td class="foot"></th>
|
||||||
|
<td class="foot"><?=number_format($sumData['total_sales_amount'])?></th>
|
||||||
|
<td class="foot"><?=number_format($sumData['total_menu_discount'])?></th>
|
||||||
|
<td class="foot"><?=number_format($sumData['total_payment_amount'])?></th>
|
||||||
|
<td class="foot"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
if (!isset($_SESSION['user_id'])) exit; //페이지 직접 실행 방지
|
if (!isset($_SESSION['user_id'])) exit; //페이지 직접 실행 방지
|
||||||
|
|
||||||
// 권한부여 및 체크
|
// 권한부여 및 체크
|
||||||
if ( !in_array($_SESSION['user_id'], $pageAuth['bakery']) || $_SESSION['user_id'], $pageAuth['admin']) ) {
|
if ( !in_array($_SESSION['user_id'], $pageAuth['bakery']) && !in_array($_SESSION['user_id'], $pageAuth['admin']) ) {
|
||||||
alert('권한이 없습니다', false);
|
alert('권한이 없습니다'.$pageAuth['admin'].','.$pageAuth['bakery'].'만 이용할 수 있습니다.', false);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@ -384,7 +384,53 @@ function get_total_count($db_name) {
|
|||||||
return sql_fetch($query); // 결과 없으면 false 반환
|
return sql_fetch($query); // 결과 없으면 false 반환
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 누계 구하기
|
||||||
|
function getBakeryInvenSummaryData($date, $ord_by = "b.product_name ASC") {
|
||||||
|
global $fg;
|
||||||
|
|
||||||
|
// 해당 월의 시작일과 종료일 계산
|
||||||
|
$month_start = date('Y-m-01', strtotime($date));
|
||||||
|
$month_end = $date;
|
||||||
|
|
||||||
|
// 전월 마지막 날짜 계산
|
||||||
|
$prev_month_last_day = date('Y-m-t', strtotime($month_start . ' -1 month'));
|
||||||
|
|
||||||
|
// 전월 current_stock 조회
|
||||||
|
$prev_query = "
|
||||||
|
SELECT SUM(current_stock) AS total_previous_stock
|
||||||
|
FROM {$fg['bakery_inventory_table']} AS a
|
||||||
|
LEFT JOIN {$fg['bakery_product_table']} AS b
|
||||||
|
ON a.barcode = b.barcode
|
||||||
|
WHERE b.used = 1
|
||||||
|
AND a.date = '{$prev_month_last_day}'
|
||||||
|
";
|
||||||
|
$prev_result = sql_fetch($prev_query);
|
||||||
|
$total_previous_stock = $prev_result['total_previous_stock'] ?? '';
|
||||||
|
|
||||||
|
// 현재 월 누적 합산 조회
|
||||||
|
$query = "
|
||||||
|
SELECT
|
||||||
|
SUM(a.production) AS total_production,
|
||||||
|
SUM(a.inhouse_use) AS total_inhouse_use,
|
||||||
|
SUM(a.recycling) AS total_recycling,
|
||||||
|
SUM(a.disposal) AS total_disposal,
|
||||||
|
SUM(a.sales) AS total_sales,
|
||||||
|
SUM(a.sales_amount) AS total_sales_amount,
|
||||||
|
SUM(a.menu_discount) AS total_menu_discount,
|
||||||
|
SUM(a.payment_amount) AS total_payment_amount
|
||||||
|
FROM {$fg['bakery_inventory_table']} AS a
|
||||||
|
LEFT JOIN {$fg['bakery_product_table']} AS b
|
||||||
|
ON a.barcode = b.barcode
|
||||||
|
WHERE b.used = 1
|
||||||
|
AND a.date BETWEEN '{$month_start}' AND '{$month_end}'
|
||||||
|
";
|
||||||
|
$result = sql_fetch($query);
|
||||||
|
|
||||||
|
// previous_stock 추가
|
||||||
|
// $result['total_previous_stock'] = $total_previous_stock;
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
// 전체 품명 불러오기
|
// 전체 품명 불러오기
|
||||||
function getBakeryProductList($ord_by = "ASC") {
|
function getBakeryProductList($ord_by = "ASC") {
|
||||||
|
|||||||
@ -23,6 +23,14 @@ jQuery(function($){
|
|||||||
|
|
||||||
if( nhnkcp_settle_case == "naverpay" ){
|
if( nhnkcp_settle_case == "naverpay" ){
|
||||||
if(typeof nhnkcp_pay_form.naverpay_direct !== "undefined") nhnkcp_pay_form.naverpay_direct.value = "Y";
|
if(typeof nhnkcp_pay_form.naverpay_direct !== "undefined") nhnkcp_pay_form.naverpay_direct.value = "Y";
|
||||||
|
|
||||||
|
var is_money = jQuery("input[name='od_settle_case']:checked" ).attr("data-money");
|
||||||
|
|
||||||
|
if (is_money) { // 머니/포인트 결제
|
||||||
|
jQuery(nhnkcp_pay_form).find("input[name='naverpay_point_direct']").val("Y");
|
||||||
|
} else { // 카드 결제
|
||||||
|
jQuery(nhnkcp_pay_form).find("input[name='naverpay_point_direct']").val("");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ! jQuery("form[name='sm_form']").length ){
|
if( ! jQuery("form[name='sm_form']").length ){
|
||||||
|
|||||||
@ -37,7 +37,7 @@ include_once('./_common.php');
|
|||||||
$tran_cd = isset($_POST["tran_cd"]) ? $_POST["tran_cd"] : ''; // 트랜잭션 코드
|
$tran_cd = isset($_POST["tran_cd"]) ? $_POST["tran_cd"] : ''; // 트랜잭션 코드
|
||||||
$ordr_idxx = isset($_POST["ordr_idxx"]) ? $_POST["ordr_idxx"] : ''; // 쇼핑몰 주문번호
|
$ordr_idxx = isset($_POST["ordr_idxx"]) ? $_POST["ordr_idxx"] : ''; // 쇼핑몰 주문번호
|
||||||
$good_name = isset($_POST["good_name"]) ? $_POST["good_name"] : ''; // 상품명
|
$good_name = isset($_POST["good_name"]) ? $_POST["good_name"] : ''; // 상품명
|
||||||
$good_mny = isset($_POST["good_mny"]) ? $_POST["good_mny"] : ''; // 결제 총금액
|
$good_mny = isset($_POST["good_mny"]) ? (int) $_POST["good_mny"] : ''; // 결제 총금액
|
||||||
$buyr_name = isset($_POST["buyr_name"]) ? $_POST["buyr_name"] : ''; // 주문자명
|
$buyr_name = isset($_POST["buyr_name"]) ? $_POST["buyr_name"] : ''; // 주문자명
|
||||||
$buyr_tel1 = isset($_POST["buyr_tel1"]) ? $_POST["buyr_tel1"] : ''; // 주문자 전화번호
|
$buyr_tel1 = isset($_POST["buyr_tel1"]) ? $_POST["buyr_tel1"] : ''; // 주문자 전화번호
|
||||||
$buyr_tel2 = isset($_POST["buyr_tel2"]) ? $_POST["buyr_tel2"] : ''; // 주문자 핸드폰 번호
|
$buyr_tel2 = isset($_POST["buyr_tel2"]) ? $_POST["buyr_tel2"] : ''; // 주문자 핸드폰 번호
|
||||||
@ -60,9 +60,9 @@ include_once('./_common.php');
|
|||||||
$bask_cntx = isset($_POST["bask_cntx"]) ? $_POST["bask_cntx"] : ''; // 장바구니 상품수
|
$bask_cntx = isset($_POST["bask_cntx"]) ? $_POST["bask_cntx"] : ''; // 장바구니 상품수
|
||||||
$tablet_size = isset($_POST["tablet_size"]) ? $_POST["tablet_size"] : ''; // 모바일기기 화면비율
|
$tablet_size = isset($_POST["tablet_size"]) ? $_POST["tablet_size"] : ''; // 모바일기기 화면비율
|
||||||
|
|
||||||
$comm_tax_mny = isset($_POST["comm_tax_mny"]) ? $_POST["comm_tax_mny"] : ''; // 과세금액
|
$comm_tax_mny = isset($_POST["comm_tax_mny"]) ? (int) $_POST["comm_tax_mny"] : ''; // 과세금액
|
||||||
$comm_vat_mny = isset($_POST["comm_vat_mny"]) ? $_POST["comm_vat_mny"] : ''; // 부가세
|
$comm_vat_mny = isset($_POST["comm_vat_mny"]) ? (int) $_POST["comm_vat_mny"] : ''; // 부가세
|
||||||
$comm_free_mny = isset($_POST["comm_free_mny"]) ? $_POST["comm_free_mny"] : ''; // 비과세금액
|
$comm_free_mny = isset($_POST["comm_free_mny"]) ? (int) $_POST["comm_free_mny"] : ''; // 비과세금액
|
||||||
|
|
||||||
$payco_direct = isset($_POST["payco_direct"]) ? $_POST["payco_direct"] : ''; // PAYCO 결제창 호출
|
$payco_direct = isset($_POST["payco_direct"]) ? $_POST["payco_direct"] : ''; // PAYCO 결제창 호출
|
||||||
$naverpay_direct = isset($_POST["naverpay_direct"]) ? $_POST["naverpay_direct"] : ''; // NAVERPAY 결제창 호출
|
$naverpay_direct = isset($_POST["naverpay_direct"]) ? $_POST["naverpay_direct"] : ''; // NAVERPAY 결제창 호출
|
||||||
@ -253,7 +253,7 @@ if($enc_data != '' && $enc_info != '' && $tran_cd != '') {
|
|||||||
echo make_order_field($data, $exclude);
|
echo make_order_field($data, $exclude);
|
||||||
|
|
||||||
foreach($_POST as $key=>$value) {
|
foreach($_POST as $key=>$value) {
|
||||||
echo '<input type="hidden" name="'.$key.'" value="'.$value.'">'.PHP_EOL;
|
echo '<input type="hidden" name="'.get_text($key).'" value="'.get_text($value).'">'.PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '</form>'.PHP_EOL;
|
echo '</form>'.PHP_EOL;
|
||||||
@ -262,12 +262,12 @@ if($enc_data != '' && $enc_info != '' && $tran_cd != '') {
|
|||||||
|
|
||||||
<form name="sm_form" method="POST" accept-charset="euc-kr">
|
<form name="sm_form" method="POST" accept-charset="euc-kr">
|
||||||
|
|
||||||
<input type="hidden" name="good_name" value="<?php echo $good_name; ?>">
|
<input type="hidden" name="good_name" value="<?php echo get_text($good_name); ?>">
|
||||||
<input type="hidden" name="good_mny" value="<?php echo $good_mny; ?>" >
|
<input type="hidden" name="good_mny" value="<?php echo $good_mny; ?>" >
|
||||||
<input type="hidden" name='buyr_name' value="<?php echo $buyr_name; ?>">
|
<input type="hidden" name='buyr_name' value="<?php echo get_text($buyr_name); ?>">
|
||||||
<input type="hidden" name="buyr_tel1" value="<?php echo $buyr_tel1; ?>">
|
<input type="hidden" name="buyr_tel1" value="<?php echo get_text($buyr_tel1); ?>">
|
||||||
<input type="hidden" name="buyr_tel2" value="<?php echo $buyr_tel2; ?>">
|
<input type="hidden" name="buyr_tel2" value="<?php echo get_text($buyr_tel2); ?>">
|
||||||
<input type="hidden" name="buyr_mail" value="<?php echo $buyr_mail; ?>">
|
<input type="hidden" name="buyr_mail" value="<?php echo get_text($buyr_mail); ?>">
|
||||||
<?php
|
<?php
|
||||||
// 가상계좌 입금 마감일을 설정하려면 아래 주석을 풀어서 사용해 주세요.
|
// 가상계좌 입금 마감일을 설정하려면 아래 주석을 풀어서 사용해 주세요.
|
||||||
//$ipgm_date = date("Ymd", (G5_SERVER_TIME + 86400 * 5));
|
//$ipgm_date = date("Ymd", (G5_SERVER_TIME + 86400 * 5));
|
||||||
@ -279,7 +279,7 @@ if($enc_data != '' && $enc_info != '' && $tran_cd != '') {
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if($naverpay_direct){ ?>
|
<?php if($naverpay_direct){ ?>
|
||||||
<input type="hidden" name="naverpay_direct" value="<?php echo get_text($naverpay_direct); ?>"> <!-- 네이버페이 결제창 호출 -->
|
<input type="hidden" name="naverpay_direct" value="<?php echo get_text($naverpay_direct); ?>"> <!-- 네이버페이 결제창 호출 -->
|
||||||
<?php if(isset($default['de_easy_pay_services']) && in_array('used_nhnkcp_naverpay_point', explode(',', $default['de_easy_pay_services'])) ){ // 네이버페이 포인트 결제 옵션 ?>
|
<?php if(isset($_POST['naverpay_point_direct']) && $_POST['naverpay_point_direct'] && isset($default['de_easy_pay_services']) && in_array('used_nhnkcp_naverpay_point', explode(',', $default['de_easy_pay_services'])) ){ // 네이버페이 포인트 결제 옵션 ?>
|
||||||
<input type="hidden" name="naverpay_point_direct" value="Y"> <!-- 네이버페이 포인트 결제를 하려면 naverpay_point_direct 를 Y -->
|
<input type="hidden" name="naverpay_point_direct" value="Y"> <!-- 네이버페이 포인트 결제를 하려면 naverpay_point_direct 를 Y -->
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@ -294,13 +294,13 @@ if($enc_data != '' && $enc_info != '' && $tran_cd != '') {
|
|||||||
<!-- 요청 구분 -->
|
<!-- 요청 구분 -->
|
||||||
<input type="hidden" name="req_tx" value="pay">
|
<input type="hidden" name="req_tx" value="pay">
|
||||||
<!-- 사이트 코드 -->
|
<!-- 사이트 코드 -->
|
||||||
<input type="hidden" name="site_cd" value="<?php echo $g_conf_site_cd; ?>">
|
<input type="hidden" name="site_cd" value="<?php echo get_text($g_conf_site_cd); ?>">
|
||||||
<!-- 사이트 이름 -->
|
<!-- 사이트 이름 -->
|
||||||
<input type="hidden" name="shop_name" value="<?php echo $g_conf_site_name; ?>">
|
<input type="hidden" name="shop_name" value="<?php echo get_text($g_conf_site_name); ?>">
|
||||||
<!-- 결제수단-->
|
<!-- 결제수단-->
|
||||||
<input type="hidden" name="pay_method" value="<?php echo $pay_method; ?>">
|
<input type="hidden" name="pay_method" value="<?php echo get_text($pay_method); ?>">
|
||||||
<!-- 주문번호 -->
|
<!-- 주문번호 -->
|
||||||
<input type="hidden" name="ordr_idxx" value="<?php echo $ordr_idxx; ?>">
|
<input type="hidden" name="ordr_idxx" value="<?php echo get_text($ordr_idxx); ?>">
|
||||||
<!-- 최대 할부개월수 -->
|
<!-- 최대 할부개월수 -->
|
||||||
<input type="hidden" name="quotaopt" value="12">
|
<input type="hidden" name="quotaopt" value="12">
|
||||||
<!-- 통화 코드 -->
|
<!-- 통화 코드 -->
|
||||||
@ -311,29 +311,29 @@ if($enc_data != '' && $enc_info != '' && $tran_cd != '') {
|
|||||||
<!-- 반드시 가맹점 주문페이지의 URL을 입력 해주시기 바랍니다. -->
|
<!-- 반드시 가맹점 주문페이지의 URL을 입력 해주시기 바랍니다. -->
|
||||||
<input type="hidden" name="Ret_URL" value="<?php echo G5_MSHOP_URL; ?>/kcp/order_approval_form.php">
|
<input type="hidden" name="Ret_URL" value="<?php echo G5_MSHOP_URL; ?>/kcp/order_approval_form.php">
|
||||||
<!-- 인증시 필요한 파라미터(변경불가)-->
|
<!-- 인증시 필요한 파라미터(변경불가)-->
|
||||||
<input type="hidden" name="ActionResult" value="<?php echo $ActionResult; ?>">
|
<input type="hidden" name="ActionResult" value="<?php echo get_text($ActionResult); ?>">
|
||||||
<!-- 에스크로 사용유무 에스크로 사용 업체(가상계좌만 해당)는 Y로 세팅 해주시기 바랍니다.-->
|
<!-- 에스크로 사용유무 에스크로 사용 업체(가상계좌만 해당)는 Y로 세팅 해주시기 바랍니다.-->
|
||||||
<input type="hidden" name="escw_used" value="<?php echo $escw_used; ?>">
|
<input type="hidden" name="escw_used" value="<?php echo get_text($escw_used); ?>">
|
||||||
<!-- 에스크로 결제처리모드 -->
|
<!-- 에스크로 결제처리모드 -->
|
||||||
<input type="hidden" name="pay_mod" value="<?php echo ($default['de_escrow_use']?'O':'N'); ?>">
|
<input type="hidden" name="pay_mod" value="<?php echo ($default['de_escrow_use']?'O':'N'); ?>">
|
||||||
<!-- 수취인이름 -->
|
<!-- 수취인이름 -->
|
||||||
<input type="hidden" name="rcvr_name" value="<?php echo $rcvr_name; ?>">
|
<input type="hidden" name="rcvr_name" value="<?php echo get_text($rcvr_name); ?>">
|
||||||
<!-- 수취인 연락처 -->
|
<!-- 수취인 연락처 -->
|
||||||
<input type="hidden" name="rcvr_tel1" value="<?php echo $rcvr_tel1; ?>">
|
<input type="hidden" name="rcvr_tel1" value="<?php echo get_text($rcvr_tel1); ?>">
|
||||||
<!-- 수취인 휴대폰 번호 -->
|
<!-- 수취인 휴대폰 번호 -->
|
||||||
<input type="hidden" name="rcvr_tel2" value="<?php echo $rcvr_tel2; ?>">
|
<input type="hidden" name="rcvr_tel2" value="<?php echo get_text($rcvr_tel2); ?>">
|
||||||
<!-- 수취인 E-MAIL -->
|
<!-- 수취인 E-MAIL -->
|
||||||
<input type="hidden" name="rcvr_add1" value="<?php echo $rcvr_add1; ?>">
|
<input type="hidden" name="rcvr_add1" value="<?php echo get_text($rcvr_add1); ?>">
|
||||||
<!-- 수취인 우편번호 -->
|
<!-- 수취인 우편번호 -->
|
||||||
<input type="hidden" name="rcvr_add2" value="<?php echo $rcvr_add2; ?>">
|
<input type="hidden" name="rcvr_add2" value="<?php echo get_text($rcvr_add2); ?>">
|
||||||
<!-- 수취인 주소 -->
|
<!-- 수취인 주소 -->
|
||||||
<input type="hidden" name="rcvr_mail" value="<?php echo $rcvr_mail; ?>">
|
<input type="hidden" name="rcvr_mail" value="<?php echo get_text($rcvr_mail); ?>">
|
||||||
<!-- 수취인 상세 주소 -->
|
<!-- 수취인 상세 주소 -->
|
||||||
<input type="hidden" name="rcvr_zipx" value="<?php echo $rcvr_zipx; ?>">
|
<input type="hidden" name="rcvr_zipx" value="<?php echo get_text($rcvr_zipx); ?>">
|
||||||
<!-- 장바구니 상품 개수 -->
|
<!-- 장바구니 상품 개수 -->
|
||||||
<input type="hidden" name="bask_cntx" value="<?php echo $bask_cntx; ?>">
|
<input type="hidden" name="bask_cntx" value="<?php echo get_text($bask_cntx); ?>">
|
||||||
<!-- 장바구니 정보(상단 스크립트 참조) -->
|
<!-- 장바구니 정보(상단 스크립트 참조) -->
|
||||||
<input type="hidden" name="good_info" value="<?php echo $good_info; ?>">
|
<input type="hidden" name="good_info" value="<?php echo get_text($good_info); ?>">
|
||||||
<!-- 배송소요기간 -->
|
<!-- 배송소요기간 -->
|
||||||
<input type="hidden" name="deli_term" value="03">
|
<input type="hidden" name="deli_term" value="03">
|
||||||
<!-- 기타 파라메터 추가 부분 - Start - -->
|
<!-- 기타 파라메터 추가 부분 - Start - -->
|
||||||
@ -343,7 +343,7 @@ if($enc_data != '' && $enc_info != '' && $tran_cd != '') {
|
|||||||
<input type="hidden" name="disp_tax_yn" value="N">
|
<input type="hidden" name="disp_tax_yn" value="N">
|
||||||
<!-- 기타 파라메터 추가 부분 - End - -->
|
<!-- 기타 파라메터 추가 부분 - End - -->
|
||||||
<!-- 화면 크기조정 부분 - Start - -->
|
<!-- 화면 크기조정 부분 - Start - -->
|
||||||
<input type="hidden" name="tablet_size" value="<?php echo $tablet_size; ?>"/>
|
<input type="hidden" name="tablet_size" value="<?php echo get_text($tablet_size); ?>"/>
|
||||||
<!-- 화면 크기조정 부분 - End - -->
|
<!-- 화면 크기조정 부분 - End - -->
|
||||||
<!--
|
<!--
|
||||||
사용 카드 설정
|
사용 카드 설정
|
||||||
@ -383,15 +383,15 @@ if($default['de_tax_flag_use']) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<input type="hidden" name="res_cd" value="<?php echo $res_cd; ?>"> <!-- 결과 코드 -->
|
<input type="hidden" name="res_cd" value="<?php echo get_text($res_cd); ?>"> <!-- 결과 코드 -->
|
||||||
<input type="hidden" name="tran_cd" value="<?php echo $tran_cd; ?>"> <!-- 트랜잭션 코드 -->
|
<input type="hidden" name="tran_cd" value="<?php echo get_text($tran_cd); ?>"> <!-- 트랜잭션 코드 -->
|
||||||
<input type="hidden" name="enc_info" value="<?php echo $enc_info; ?>"> <!-- 암호화 정보 -->
|
<input type="hidden" name="enc_info" value="<?php echo get_text($enc_info); ?>"> <!-- 암호화 정보 -->
|
||||||
<input type="hidden" name="enc_data" value="<?php echo $enc_data; ?>"> <!-- 암호화 데이터 -->
|
<input type="hidden" name="enc_data" value="<?php echo get_text($enc_data); ?>"> <!-- 암호화 데이터 -->
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div id="pay_fail">
|
<div id="pay_fail">
|
||||||
<p>결제가 실패한 경우 아래 돌아가기 버튼을 클릭해주세요.</p>
|
<p>결제가 실패한 경우 아래 돌아가기 버튼을 클릭해주세요.</p>
|
||||||
<a href="<?php echo $js_return_url; ?>">돌아가기</a>
|
<a href="<?php echo get_text($js_return_url); ?>">돌아가기</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="show_progress" style="display:none;">
|
<div id="show_progress" style="display:none;">
|
||||||
<span style="display:block; text-align:center;margin-top:120px"><img src="<?php echo G5_MOBILE_URL; ?>/shop/img/loading.gif" alt="" ></span>
|
<span style="display:block; text-align:center;margin-top:120px"><img src="<?php echo G5_MOBILE_URL; ?>/shop/img/loading.gif" alt="" ></span>
|
||||||
|
|||||||
@ -23,6 +23,9 @@ $param_opt_3 = isset($_REQUEST['param_opt_3']) ? clean_xss_tags($_REQUEST['param
|
|||||||
<input type="hidden" name="settle_method" value="">
|
<input type="hidden" name="settle_method" value="">
|
||||||
<input type="hidden" name="payco_direct" value=""> <!-- PAYCO 결제창 호출 -->
|
<input type="hidden" name="payco_direct" value=""> <!-- PAYCO 결제창 호출 -->
|
||||||
<input type="hidden" name="naverpay_direct" value="A" > <!-- NAVERPAY 결제창 호출 -->
|
<input type="hidden" name="naverpay_direct" value="A" > <!-- NAVERPAY 결제창 호출 -->
|
||||||
|
<?php if(isset($default['de_easy_pay_services']) && in_array('used_nhnkcp_naverpay_point', explode(',', $default['de_easy_pay_services'])) ){ // 네이버페이 포인트 결제 옵션 ?>
|
||||||
|
<input type="hidden" name="naverpay_point_direct" value="Y"> <!-- 네이버페이 포인트 결제를 하려면 naverpay_point_direct 를 Y -->
|
||||||
|
<?php } ?>
|
||||||
<input type="hidden" name="kakaopay_direct" value="A" > <!-- KAKAOPAY 결제창 호출 -->
|
<input type="hidden" name="kakaopay_direct" value="A" > <!-- KAKAOPAY 결제창 호출 -->
|
||||||
<input type="hidden" name="applepay_direct" value="A" > <!-- APPLEPAY 결제창 호출 -->
|
<input type="hidden" name="applepay_direct" value="A" > <!-- APPLEPAY 결제창 호출 -->
|
||||||
<!-- 주문번호 -->
|
<!-- 주문번호 -->
|
||||||
|
|||||||
@ -223,11 +223,14 @@
|
|||||||
|
|
||||||
$kcp_pay_method = $c_PayPlus->mf_get_res_data( "pay_method" ); // 카카오페이 결제수단
|
$kcp_pay_method = $c_PayPlus->mf_get_res_data( "pay_method" ); // 카카오페이 결제수단
|
||||||
// 카드 코드는 PACA, 카카오머니 코드는 PAKM
|
// 카드 코드는 PACA, 카카오머니 코드는 PAKM
|
||||||
|
// https://developer.kcp.co.kr/page/document/directpay
|
||||||
|
|
||||||
if( $kcp_pay_method == "PAKM" ){ // 카카오머니
|
if( $kcp_pay_method == "PAKM" ){ // 카카오머니
|
||||||
$card_mny = $kakaomny_mny = $c_PayPlus->mf_get_res_data( "kakaomny_mny" );
|
$card_mny = $kakaomny_mny = $c_PayPlus->mf_get_res_data( "kakaomny_mny" );
|
||||||
$app_time = $app_kakaomny_time = $c_PayPlus->mf_get_res_data( "app_kakaomny_time" );
|
$app_time = $app_kakaomny_time = $c_PayPlus->mf_get_res_data( "app_kakaomny_time" );
|
||||||
$od_other_pay_type = 'NHNKCP_KAKAOMONEY';
|
$od_other_pay_type = 'NHNKCP_KAKAOMONEY';
|
||||||
|
} else if( $kcp_pay_method == "PANP" ){ // 네이버페이머니
|
||||||
|
$od_other_pay_type = 'NHNKCP_NAVERMONEY';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -62,6 +62,9 @@ ob_start();
|
|||||||
$comm_free_mny = 0; // 면세금액
|
$comm_free_mny = 0; // 면세금액
|
||||||
$tot_tax_mny = 0;
|
$tot_tax_mny = 0;
|
||||||
|
|
||||||
|
// 토스페이먼츠 escrowProducts 배열 생성
|
||||||
|
$escrow_products = array();
|
||||||
|
|
||||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -130,6 +133,15 @@ ob_start();
|
|||||||
$point = $sum['point'];
|
$point = $sum['point'];
|
||||||
$sell_price = $sum['price'];
|
$sell_price = $sum['price'];
|
||||||
|
|
||||||
|
// 토스페이먼츠 escrowProducts 배열에 상품 정보 추가
|
||||||
|
$escrow_products[] = array(
|
||||||
|
'id' => $row['ct_id'],
|
||||||
|
'name' => $row['it_name'],
|
||||||
|
'code' => $row['it_id'],
|
||||||
|
'unitPrice' => (int) $row['ct_price'],
|
||||||
|
'quantity' => (int) $row['ct_qty']
|
||||||
|
);
|
||||||
|
|
||||||
$cp_button = '';
|
$cp_button = '';
|
||||||
// 쿠폰
|
// 쿠폰
|
||||||
if($is_member) {
|
if($is_member) {
|
||||||
@ -632,7 +644,7 @@ if($is_kakaopay_use) {
|
|||||||
// 계좌이체 사용
|
// 계좌이체 사용
|
||||||
if ($default['de_iche_use']) {
|
if ($default['de_iche_use']) {
|
||||||
$multi_settle++;
|
$multi_settle++;
|
||||||
echo '<li><input type="radio" id="od_settle_iche" name="od_settle_case" value="계좌이체" '.$checked.'> <label for="od_settle_iche" class="lb_icon iche_icon">'.$escrow_title.'계좌이체</label></li>'.PHP_EOL;
|
echo '<li><input type="radio" id="od_settle_iche" name="od_settle_case" value="계좌이체" '.$checked.'> <label for="od_settle_iche" class="lb_icon iche_icon">'.$escrow_title. ($default['de_pg_service'] == 'toss' ? '퀵계좌이체' :'계좌이체') . '</label></li>'.PHP_EOL;
|
||||||
$checked = '';
|
$checked = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -676,7 +688,13 @@ if($is_kakaopay_use) {
|
|||||||
$easypay_prints['nhnkcp_payco'] = '<li><input type="radio" id="od_settle_nhnkcp_payco" name="od_settle_case" data-pay="payco" value="간편결제"> <label for="od_settle_nhnkcp_payco" class="PAYCO nhnkcp_payco lb_icon" title="NHN_KCP - PAYCO">PAYCO</label></li>';
|
$easypay_prints['nhnkcp_payco'] = '<li><input type="radio" id="od_settle_nhnkcp_payco" name="od_settle_case" data-pay="payco" value="간편결제"> <label for="od_settle_nhnkcp_payco" class="PAYCO nhnkcp_payco lb_icon" title="NHN_KCP - PAYCO">PAYCO</label></li>';
|
||||||
}
|
}
|
||||||
if( in_array('nhnkcp_naverpay', $de_easy_pay_service_array) ){
|
if( in_array('nhnkcp_naverpay', $de_easy_pay_service_array) ){
|
||||||
$easypay_prints['nhnkcp_naverpay'] = '<li><input type="radio" id="od_settle_nhnkcp_naverpay" name="od_settle_case" data-pay="naverpay" value="간편결제" > <label for="od_settle_nhnkcp_naverpay" class="naverpay_icon nhnkcp_naverpay lb_icon" title="NHN_KCP - 네이버페이">네이버페이</label></li>';
|
if(isset($default['de_easy_pay_services']) && in_array('used_nhnkcp_naverpay_point', explode(',', $default['de_easy_pay_services'])) ){
|
||||||
|
$easypay_prints['nhnkcp_naverpay_card'] = '<li><input type="radio" id="od_settle_nhnkcp_naverpay" name="od_settle_case" data-pay="naverpay" value="간편결제" > <label for="od_settle_nhnkcp_naverpay" class="naverpay_icon nhnkcp_naverpay lb_icon nhnkcp_icon nhnkcp_card" title="NHN_KCP - 네이버페이 카드결제">카드</label></li>';
|
||||||
|
|
||||||
|
$easypay_prints['nhnkcp_naverpay_money'] = '<li><input type="radio" id="od_settle_nhnkcp_naverpay_money" name="od_settle_case" data-pay="naverpay" data-money="1" value="간편결제" > <label for="od_settle_nhnkcp_naverpay_money" class="naverpay_icon nhnkcp_naverpay lb_icon nhnkcp_icon nhnkcp_money" title="NHN_KCP - 네이버페이 머니/포인트 결제">머니</label></li>';
|
||||||
|
} else {
|
||||||
|
$easypay_prints['nhnkcp_naverpay_card'] = '<li><input type="radio" id="od_settle_nhnkcp_naverpay" name="od_settle_case" data-pay="naverpay" value="간편결제" > <label for="od_settle_nhnkcp_naverpay" class="naverpay_icon nhnkcp_naverpay lb_icon" title="NHN_KCP - 네이버페이 카드결제">네이버페이</label></li>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if( in_array('nhnkcp_kakaopay', $de_easy_pay_service_array) ){
|
if( in_array('nhnkcp_kakaopay', $de_easy_pay_service_array) ){
|
||||||
$easypay_prints['nhnkcp_kakaopay'] = '<li><input type="radio" id="od_settle_nhnkcp_kakaopay" name="od_settle_case" data-pay="kakaopay" value="간편결제" > <label for="od_settle_nhnkcp_kakaopay" class="kakaopay_icon nhnkcp_kakaopay lb_icon" title="NHN_KCP - 카카오페이">카카오페이</label></li>';
|
$easypay_prints['nhnkcp_kakaopay'] = '<li><input type="radio" id="od_settle_nhnkcp_kakaopay" name="od_settle_case" data-pay="kakaopay" value="간편결제" > <label for="od_settle_nhnkcp_kakaopay" class="kakaopay_icon nhnkcp_kakaopay lb_icon" title="NHN_KCP - 카카오페이">카카오페이</label></li>';
|
||||||
@ -718,8 +736,15 @@ if($is_kakaopay_use) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( ! isset($easypay_prints['nhnkcp_naverpay']) && function_exists('is_use_easypay') && is_use_easypay('global_nhnkcp') ){
|
if( ! isset($easypay_prints['nhnkcp_naverpay']) && function_exists('is_use_easypay') && is_use_easypay('global_nhnkcp') ){
|
||||||
|
|
||||||
|
if(isset($default['de_easy_pay_services']) && in_array('used_nhnkcp_naverpay_point', explode(',', $default['de_easy_pay_services'])) ){
|
||||||
|
$easypay_prints['nhnkcp_naverpay_card'] = '<li><input type="radio" id="od_settle_nhnkcp_naverpay" name="od_settle_case" data-pay="naverpay" value="간편결제" > <label for="od_settle_nhnkcp_naverpay" class="naverpay_icon nhnkcp_naverpay lb_icon nhnkcp_icon nhnkcp_card" title="NHN_KCP - 네이버페이 카드결제">카드</label></li>';
|
||||||
|
|
||||||
|
$easypay_prints['nhnkcp_naverpay_money'] = '<li><input type="radio" id="od_settle_nhnkcp_naverpay_money" name="od_settle_case" data-pay="naverpay" data-money="1" value="간편결제" > <label for="od_settle_nhnkcp_naverpay_money" class="naverpay_icon nhnkcp_naverpay lb_icon nhnkcp_icon nhnkcp_money" title="NHN_KCP - 네이버페이 머니/포인트 결제">머니</label></li>';
|
||||||
|
} else {
|
||||||
$easypay_prints['nhnkcp_naverpay'] = '<li><input type="radio" id="od_settle_nhnkcp_naverpay" name="od_settle_case" data-pay="naverpay" value="간편결제" > <label for="od_settle_nhnkcp_naverpay" class="naverpay_icon nhnkcp_naverpay lb_icon" title="NHN_KCP - 네이버페이">네이버페이</label></li>';
|
$easypay_prints['nhnkcp_naverpay'] = '<li><input type="radio" id="od_settle_nhnkcp_naverpay" name="od_settle_case" data-pay="naverpay" value="간편결제" > <label for="od_settle_nhnkcp_naverpay" class="naverpay_icon nhnkcp_naverpay lb_icon" title="NHN_KCP - 네이버페이">네이버페이</label></li>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if($easypay_prints) {
|
if($easypay_prints) {
|
||||||
$multi_settle++;
|
$multi_settle++;
|
||||||
@ -1113,7 +1138,7 @@ $(function() {
|
|||||||
$("#show_pay_btn").css("display", "inline");
|
$("#show_pay_btn").css("display", "inline");
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#od_settle_iche,#od_settle_card,#od_settle_vbank,#od_settle_hp,#od_settle_easy_pay,#od_settle_kakaopay,#od_settle_samsungpay,#od_settle_nhnkcp_payco,#od_settle_nhnkcp_naverpay,#od_settle_nhnkcp_kakaopay,#od_settle_inicislpay,#od_settle_inicis_kakaopay").bind("click", function() {
|
$("#od_settle_iche,#od_settle_card,#od_settle_vbank,#od_settle_hp,#od_settle_easy_pay,#od_settle_kakaopay,#od_settle_samsungpay,#od_settle_nhnkcp_payco,#od_settle_nhnkcp_naverpay,#od_settle_nhnkcp_naverpay_money,#od_settle_nhnkcp_kakaopay,#od_settle_inicislpay,#od_settle_inicis_kakaopay").bind("click", function() {
|
||||||
$("#settle_bank").hide();
|
$("#settle_bank").hide();
|
||||||
$("#show_req_btn").css("display", "inline");
|
$("#show_req_btn").css("display", "inline");
|
||||||
$("#show_pay_btn").css("display", "none");
|
$("#show_pay_btn").css("display", "none");
|
||||||
@ -1399,6 +1424,15 @@ function pay_approval()
|
|||||||
if(typeof f.naverpay_direct !== "undefined"){
|
if(typeof f.naverpay_direct !== "undefined"){
|
||||||
f.naverpay_direct.value = "Y";
|
f.naverpay_direct.value = "Y";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var is_money = jQuery("input[name='od_settle_case']:checked").attr("data-money");
|
||||||
|
|
||||||
|
if (is_money) { // 머니/포인트 결제
|
||||||
|
jQuery(f).find("input[name='naverpay_point_direct']").val("Y");
|
||||||
|
} else { // 카드 결제
|
||||||
|
jQuery(f).find("input[name='naverpay_point_direct']").val("");
|
||||||
|
}
|
||||||
|
|
||||||
} else if(nhnkcp_easy_pay === "kakaopay"){
|
} else if(nhnkcp_easy_pay === "kakaopay"){
|
||||||
if(typeof f.kakaopay_direct !== "undefined") f.kakaopay_direct.value = "Y";
|
if(typeof f.kakaopay_direct !== "undefined") f.kakaopay_direct.value = "Y";
|
||||||
} else if(nhnkcp_easy_pay === "applepay"){
|
} else if(nhnkcp_easy_pay === "applepay"){
|
||||||
@ -1445,6 +1479,55 @@ function pay_approval()
|
|||||||
<?php if($default['de_tax_flag_use']) { ?>
|
<?php if($default['de_tax_flag_use']) { ?>
|
||||||
f.LGD_TAXFREEAMOUNT.value = pf.comm_free_mny.value;
|
f.LGD_TAXFREEAMOUNT.value = pf.comm_free_mny.value;
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
<?php } else if($default['de_pg_service'] == 'toss') { ?>
|
||||||
|
var pay_method = "";
|
||||||
|
switch(settle_method) {
|
||||||
|
case "계좌이체":
|
||||||
|
pay_method = "TRANSFER";
|
||||||
|
break;
|
||||||
|
case "가상계좌":
|
||||||
|
pay_method = "VIRTUAL_ACCOUNT";
|
||||||
|
break;
|
||||||
|
case "휴대폰":
|
||||||
|
pay_method = "MOBILE_PHONE";
|
||||||
|
break;
|
||||||
|
case "신용카드":
|
||||||
|
pay_method = "CARD";
|
||||||
|
break;
|
||||||
|
case "간편결제":
|
||||||
|
pay_method = "CARD";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
f.method.value = pay_method;
|
||||||
|
f.orderId.value = '<?=$od_id?>';
|
||||||
|
f.orderName.value = '<?=$goods?>';
|
||||||
|
|
||||||
|
f.customerName.value = pf.od_name.value;
|
||||||
|
f.customerEmail.value = pf.od_email.value;
|
||||||
|
f.customerMobilePhone.value = pf.od_hp.value.replace(/[^0-9]/g, '');
|
||||||
|
if (f.customerMobilePhone.value == '') {
|
||||||
|
f.customerMobilePhone.value = pf.od_tel.value.replace(/[^0-9]/g, '');
|
||||||
|
}
|
||||||
|
|
||||||
|
f.cardUseCardPoint.value = false;
|
||||||
|
f.cardUseAppCardOnly.value = false;
|
||||||
|
|
||||||
|
<?php if($default['de_escrow_use']) { ?>
|
||||||
|
f.cardUseEscrow.value = 'true';
|
||||||
|
f.escrowProducts.value = JSON.stringify(<?php echo json_encode($escrow_products, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); ?>);
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
if(settle_method == "간편결제") {
|
||||||
|
f.cardflowMode.value = 'DIRECT';
|
||||||
|
}
|
||||||
|
|
||||||
|
f.amountCurrency.value = 'KRW';
|
||||||
|
f.amountValue.value = f.good_mny.value;
|
||||||
|
<?php if($default['de_tax_flag_use']) { ?>
|
||||||
|
f.taxFreeAmount.value = pf.comm_free_mny.value;
|
||||||
|
<?php } ?>
|
||||||
|
f.windowTarget.value = 'self';
|
||||||
|
|
||||||
<?php } else if($default['de_pg_service'] == 'inicis') { ?>
|
<?php } else if($default['de_pg_service'] == 'inicis') { ?>
|
||||||
var paymethod = "";
|
var paymethod = "";
|
||||||
var width = 330;
|
var width = 330;
|
||||||
|
|||||||
@ -7,6 +7,7 @@ $post_enc_data = isset($_POST['enc_data']) ? $_POST['enc_data'] : '';
|
|||||||
$post_enc_info = isset($_POST['enc_info']) ? $_POST['enc_info'] : '';
|
$post_enc_info = isset($_POST['enc_info']) ? $_POST['enc_info'] : '';
|
||||||
$post_tran_cd = isset($_POST['tran_cd']) ? $_POST['tran_cd'] : '';
|
$post_tran_cd = isset($_POST['tran_cd']) ? $_POST['tran_cd'] : '';
|
||||||
$post_lgd_paykey = isset($_POST['LGD_PAYKEY']) ? $_POST['LGD_PAYKEY'] : '';
|
$post_lgd_paykey = isset($_POST['LGD_PAYKEY']) ? $_POST['LGD_PAYKEY'] : '';
|
||||||
|
$paymentKey = isset($_POST['paymentKey']) ? $_POST['paymentKey'] : '';
|
||||||
|
|
||||||
//삼성페이 또는 lpay 또는 이니시스 카카오페이 요청으로 왔다면 현재 삼성페이 또는 lpay 또는 이니시스 카카오페이는 이니시스 밖에 없으므로 $default['de_pg_service'] 값을 이니시스로 변경한다.
|
//삼성페이 또는 lpay 또는 이니시스 카카오페이 요청으로 왔다면 현재 삼성페이 또는 lpay 또는 이니시스 카카오페이는 이니시스 밖에 없으므로 $default['de_pg_service'] 값을 이니시스로 변경한다.
|
||||||
if( is_inicis_order_pay($od_settle_case) && !empty($_POST['P_HASH']) ){
|
if( is_inicis_order_pay($od_settle_case) && !empty($_POST['P_HASH']) ){
|
||||||
@ -41,6 +42,9 @@ if($od_settle_case != '무통장' && $od_settle_case != 'KAKAOPAY') {
|
|||||||
if($default['de_pg_service'] == 'lg' && ! $post_lgd_paykey)
|
if($default['de_pg_service'] == 'lg' && ! $post_lgd_paykey)
|
||||||
alert('결제등록 요청 후 주문해 주십시오.', $page_return_url);
|
alert('결제등록 요청 후 주문해 주십시오.', $page_return_url);
|
||||||
|
|
||||||
|
if($default['de_pg_service'] == 'toss' && ! $paymentKey)
|
||||||
|
alert('결제등록 요청 후 주문해 주십시오.', $page_return_url);
|
||||||
|
|
||||||
if($default['de_pg_service'] == 'inicis' && ! $post_p_hash)
|
if($default['de_pg_service'] == 'inicis' && ! $post_p_hash)
|
||||||
alert('결제등록 요청 후 주문해 주십시오.', $page_return_url);
|
alert('결제등록 요청 후 주문해 주십시오.', $page_return_url);
|
||||||
}
|
}
|
||||||
@ -383,6 +387,9 @@ else if ($od_settle_case == "계좌이체")
|
|||||||
case 'lg':
|
case 'lg':
|
||||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||||
break;
|
break;
|
||||||
|
case 'toss':
|
||||||
|
include G5_SHOP_PATH.'/toss/toss_result.php';
|
||||||
|
break;
|
||||||
case 'inicis':
|
case 'inicis':
|
||||||
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
||||||
break;
|
break;
|
||||||
@ -412,6 +419,9 @@ else if ($od_settle_case == "가상계좌")
|
|||||||
case 'lg':
|
case 'lg':
|
||||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||||
break;
|
break;
|
||||||
|
case 'toss':
|
||||||
|
include G5_SHOP_PATH.'/toss/toss_result.php';
|
||||||
|
break;
|
||||||
case 'inicis':
|
case 'inicis':
|
||||||
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
||||||
break;
|
break;
|
||||||
@ -441,6 +451,9 @@ else if ($od_settle_case == "휴대폰")
|
|||||||
case 'lg':
|
case 'lg':
|
||||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||||
break;
|
break;
|
||||||
|
case 'toss':
|
||||||
|
include G5_SHOP_PATH.'/toss/toss_result.php';
|
||||||
|
break;
|
||||||
case 'inicis':
|
case 'inicis':
|
||||||
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
||||||
break;
|
break;
|
||||||
@ -468,6 +481,9 @@ else if ($od_settle_case == "신용카드")
|
|||||||
case 'lg':
|
case 'lg':
|
||||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||||
break;
|
break;
|
||||||
|
case 'toss':
|
||||||
|
include G5_SHOP_PATH.'/toss/toss_result.php';
|
||||||
|
break;
|
||||||
case 'inicis':
|
case 'inicis':
|
||||||
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
||||||
break;
|
break;
|
||||||
@ -497,6 +513,9 @@ else if ($od_settle_case == "간편결제")
|
|||||||
case 'lg':
|
case 'lg':
|
||||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||||
break;
|
break;
|
||||||
|
case 'toss':
|
||||||
|
include G5_SHOP_PATH.'/toss/toss_result.php';
|
||||||
|
break;
|
||||||
case 'inicis':
|
case 'inicis':
|
||||||
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
||||||
break;
|
break;
|
||||||
@ -568,6 +587,9 @@ if($tno) {
|
|||||||
case 'lg':
|
case 'lg':
|
||||||
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
||||||
break;
|
break;
|
||||||
|
case 'toss':
|
||||||
|
include G5_SHOP_PATH.'/toss/toss_cancel.php';
|
||||||
|
break;
|
||||||
case 'inicis':
|
case 'inicis':
|
||||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||||
break;
|
break;
|
||||||
@ -723,6 +745,9 @@ if(! $result || ! (isset($exists_order['od_id']) && $od_id && $exists_order['od_
|
|||||||
case 'lg':
|
case 'lg':
|
||||||
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
||||||
break;
|
break;
|
||||||
|
case 'toss':
|
||||||
|
include G5_SHOP_PATH.'/toss/toss_cancel.php';
|
||||||
|
break;
|
||||||
case 'inicis':
|
case 'inicis':
|
||||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||||
break;
|
break;
|
||||||
@ -785,6 +810,9 @@ if(!$result) {
|
|||||||
case 'lg':
|
case 'lg':
|
||||||
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
||||||
break;
|
break;
|
||||||
|
case 'toss':
|
||||||
|
include G5_SHOP_PATH.'/toss/toss_cancel.php';
|
||||||
|
break;
|
||||||
case 'inicis':
|
case 'inicis':
|
||||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -338,6 +338,8 @@ if($od['od_pg'] == 'lg') {
|
|||||||
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
|
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
|
||||||
|
|
||||||
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
|
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
|
||||||
|
} else if($od['od_pg'] == 'toss') {
|
||||||
|
$hp_receipt_script = 'window.open(\'https://dashboard.tosspayments.com/receipt/phone?transactionId='.$od['od_tno'].'&ref=PX\',\'receipt\',\'width=430,height=700\');';
|
||||||
} else if($od['od_pg'] == 'inicis') {
|
} else if($od['od_pg'] == 'inicis') {
|
||||||
$hp_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
|
$hp_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
|
||||||
} else if($od['od_pg'] == 'nicepay') {
|
} else if($od['od_pg'] == 'nicepay') {
|
||||||
@ -359,6 +361,8 @@ if($od['od_pg'] == 'lg') {
|
|||||||
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
|
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
|
||||||
|
|
||||||
$card_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
|
$card_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
|
||||||
|
} else if($od['od_pg'] == 'toss') {
|
||||||
|
$card_receipt_script = 'window.open(\'https://dashboard.tosspayments.com/receipt/redirection?transactionId='.$od['od_tno'].'&ref=PX\',\'receipt\',\'width=430,height=700\');';
|
||||||
} else if($od['od_pg'] == 'nicepay') {
|
} else if($od['od_pg'] == 'nicepay') {
|
||||||
$card_receipt_script = 'window.open(\'https://npg.nicepay.co.kr/issue/IssueLoader.do?type=0&TID='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
|
$card_receipt_script = 'window.open(\'https://npg.nicepay.co.kr/issue/IssueLoader.do?type=0&TID='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
|
||||||
} else if($od['od_pg'] == 'inicis') {
|
} else if($od['od_pg'] == 'inicis') {
|
||||||
@ -432,6 +436,8 @@ if($od['od_pg'] == 'lg') {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$cash_receipt_script = 'javascript:showCashReceipts(\''.$LGD_MID.'\',\''.$od['od_id'].'\',\''.$od['od_casseqno'].'\',\''.$trade_type.'\',\''.$CST_PLATFORM.'\');';
|
$cash_receipt_script = 'javascript:showCashReceipts(\''.$LGD_MID.'\',\''.$od['od_id'].'\',\''.$od['od_casseqno'].'\',\''.$trade_type.'\',\''.$CST_PLATFORM.'\');';
|
||||||
|
} else if($od['od_pg'] == 'toss') {
|
||||||
|
$cash_receipt_script = 'window.open(\'https://dashboard.tosspayments.com/receipt/mids/si_'.$config['cf_lg_mid'].'/orders/'.$od['od_id'].'/cash-receipt?ref=dashboard\',\'receipt\',\'width=430,height=700\');';
|
||||||
} else if($od['od_pg'] == 'inicis') {
|
} else if($od['od_pg'] == 'inicis') {
|
||||||
$cash = unserialize($od['od_cash_info']);
|
$cash = unserialize($od['od_cash_info']);
|
||||||
$cash_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid='.$cash['TID'].'&clpaymethod=22\',\'showreceipt\',\'width=380,height=540,scrollbars=no,resizable=no\');';
|
$cash_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid='.$cash['TID'].'&clpaymethod=22\',\'showreceipt\',\'width=380,height=540,scrollbars=no,resizable=no\');';
|
||||||
|
|||||||
@ -76,8 +76,18 @@ $tablet_size = "1.0"; // 화면 사이즈 조정 - 기기화면에 맞게 수정
|
|||||||
$checked = '';
|
$checked = '';
|
||||||
|
|
||||||
$escrow_title = "";
|
$escrow_title = "";
|
||||||
|
$escrow_products = array(); // 토스페이먼츠 escrowProducts 배열 생성
|
||||||
if ($default['de_escrow_use']) {
|
if ($default['de_escrow_use']) {
|
||||||
$escrow_title = "에스크로 ";
|
$escrow_title = "에스크로 ";
|
||||||
|
|
||||||
|
// 토스페이먼츠 escrowProducts 배열에 상품 정보 추가
|
||||||
|
$escrow_products[] = array(
|
||||||
|
'id' => $pp['pp_id'],
|
||||||
|
'name' => $pp['pp_name'].'님 개인결제',
|
||||||
|
'code' => $pp['pp_id'],
|
||||||
|
'unitPrice' => (int) $pp['pp_price'],
|
||||||
|
'quantity' => (int) 1
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_use']) {
|
if ($default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_use']) {
|
||||||
@ -96,7 +106,7 @@ $tablet_size = "1.0"; // 화면 사이즈 조정 - 기기화면에 맞게 수정
|
|||||||
// 계좌이체 사용
|
// 계좌이체 사용
|
||||||
if ($default['de_iche_use']) {
|
if ($default['de_iche_use']) {
|
||||||
$multi_settle++;
|
$multi_settle++;
|
||||||
echo '<li><input type="radio" id="pp_settle_iche" name="pp_settle_case" value="계좌이체" '.$checked.'> <label for="pp_settle_iche">'.$escrow_title.'계좌이체</label></li>'.PHP_EOL;
|
echo '<li><input type="radio" id="pp_settle_iche" name="pp_settle_case" value="계좌이체" '.$checked.'> <label for="pp_settle_iche"><span></span>'.$escrow_title. ($default['de_pg_service'] == 'toss' ? '퀵계좌이체' :'계좌이체') . '</label></li>'.PHP_EOL;
|
||||||
$checked = '';
|
$checked = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -201,6 +211,51 @@ function pay_approval()
|
|||||||
<?php if($default['de_tax_flag_use']) { ?>
|
<?php if($default['de_tax_flag_use']) { ?>
|
||||||
f.LGD_TAXFREEAMOUNT.value = pf.comm_free_mny.value;
|
f.LGD_TAXFREEAMOUNT.value = pf.comm_free_mny.value;
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
<?php } else if($default['de_pg_service'] == 'toss') { ?>
|
||||||
|
var pay_method = "";
|
||||||
|
switch(settle_method) {
|
||||||
|
case "계좌이체":
|
||||||
|
pay_method = "TRANSFER";
|
||||||
|
break;
|
||||||
|
case "가상계좌":
|
||||||
|
pay_method = "VIRTUAL_ACCOUNT";
|
||||||
|
break;
|
||||||
|
case "휴대폰":
|
||||||
|
pay_method = "MOBILE_PHONE";
|
||||||
|
break;
|
||||||
|
case "신용카드":
|
||||||
|
pay_method = "CARD";
|
||||||
|
break;
|
||||||
|
case "간편결제":
|
||||||
|
pay_method = "CARD";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
f.method.value = pay_method;
|
||||||
|
f.orderId.value = '<?=$od_id?>';
|
||||||
|
f.orderName.value = '<?=$goods?>';
|
||||||
|
|
||||||
|
f.customerName.value = pf.pp_name.value;
|
||||||
|
f.customerEmail.value = pf.pp_email.value;
|
||||||
|
f.customerMobilePhone.value = pf.pp_hp.value.replace(/[^0-9]/g, '');
|
||||||
|
|
||||||
|
f.cardUseCardPoint.value = false;
|
||||||
|
f.cardUseAppCardOnly.value = false;
|
||||||
|
|
||||||
|
<?php if($default['de_escrow_use']) { ?>
|
||||||
|
f.cardUseEscrow.value = 'true';
|
||||||
|
f.escrowProducts.value = JSON.stringify(<?php echo json_encode($escrow_products, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); ?>);
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
if(settle_method == "간편결제") {
|
||||||
|
f.cardflowMode.value = 'DIRECT';
|
||||||
|
}
|
||||||
|
|
||||||
|
f.amountCurrency.value = 'KRW';
|
||||||
|
f.amountValue.value = f.good_mny.value;
|
||||||
|
<?php if($default['de_tax_flag_use']) { ?>
|
||||||
|
f.taxFreeAmount.value = pf.comm_free_mny.value;
|
||||||
|
<?php } ?>
|
||||||
|
f.windowTarget.value = 'self';
|
||||||
<?php } else if($default['de_pg_service'] == 'inicis') { ?>
|
<?php } else if($default['de_pg_service'] == 'inicis') { ?>
|
||||||
var paymethod = "";
|
var paymethod = "";
|
||||||
var width = 330;
|
var width = 330;
|
||||||
|
|||||||
@ -9,6 +9,7 @@ $post_enc_info = isset($_POST['enc_info']) ? $_POST['enc_info'] : '';
|
|||||||
$post_enc_data = isset($_POST['enc_data']) ? $_POST['enc_data'] : '';
|
$post_enc_data = isset($_POST['enc_data']) ? $_POST['enc_data'] : '';
|
||||||
|
|
||||||
$post_lgd_paykey = isset($_POST['LGD_PAYKEY']) ? $_POST['LGD_PAYKEY'] : '';
|
$post_lgd_paykey = isset($_POST['LGD_PAYKEY']) ? $_POST['LGD_PAYKEY'] : '';
|
||||||
|
$paymentKey = isset($_POST['paymentKey']) ? $_POST['paymentKey'] : '';
|
||||||
|
|
||||||
$post_p_hash = isset($_POST['P_HASH']) ? $_POST['P_HASH'] : '';
|
$post_p_hash = isset($_POST['P_HASH']) ? $_POST['P_HASH'] : '';
|
||||||
|
|
||||||
@ -22,6 +23,9 @@ if($default['de_pg_service'] == 'kcp' && ($post_tran_cd === '' || $post_enc_info
|
|||||||
if($default['de_pg_service'] == 'lg' && ! $post_lgd_paykey)
|
if($default['de_pg_service'] == 'lg' && ! $post_lgd_paykey)
|
||||||
alert('결제등록 요청 후 주문해 주십시오.', $page_return_url);
|
alert('결제등록 요청 후 주문해 주십시오.', $page_return_url);
|
||||||
|
|
||||||
|
if($default['de_pg_service'] == 'toss' && ! $paymentKey)
|
||||||
|
alert('결제등록 요청 후 주문해 주십시오.', $page_return_url);
|
||||||
|
|
||||||
if($default['de_pg_service'] == 'inicis' && ! $post_p_hash)
|
if($default['de_pg_service'] == 'inicis' && ! $post_p_hash)
|
||||||
alert('결제등록 요청 후 주문해 주십시오.', $page_return_url);
|
alert('결제등록 요청 후 주문해 주십시오.', $page_return_url);
|
||||||
|
|
||||||
@ -32,6 +36,13 @@ $pp = sql_fetch($sql);
|
|||||||
if(! (isset($pp['pp_id']) && $pp['pp_id']))
|
if(! (isset($pp['pp_id']) && $pp['pp_id']))
|
||||||
alert('개인결제 정보가 존재하지 않습니다.', G5_SHOP_URL.'/personalpay.php');
|
alert('개인결제 정보가 존재하지 않습니다.', G5_SHOP_URL.'/personalpay.php');
|
||||||
|
|
||||||
|
// PG사의 가상계좌 또는 계좌이체의 자동 현금영수증 초기배열값
|
||||||
|
$pg_receipt_infos = array(
|
||||||
|
'od_cash' => 0,
|
||||||
|
'od_cash_no' => '',
|
||||||
|
'od_cash_info' => '',
|
||||||
|
);
|
||||||
|
|
||||||
$hash_data = md5($pp_id.$good_mny.$pp['pp_time']);
|
$hash_data = md5($pp_id.$good_mny.$pp['pp_time']);
|
||||||
|
|
||||||
if($pp['pp_tno']){
|
if($pp['pp_tno']){
|
||||||
@ -54,6 +65,9 @@ if ($pp_settle_case == "계좌이체")
|
|||||||
case 'lg':
|
case 'lg':
|
||||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||||
break;
|
break;
|
||||||
|
case 'toss':
|
||||||
|
include G5_SHOP_PATH.'/toss/toss_result.php';
|
||||||
|
break;
|
||||||
case 'inicis':
|
case 'inicis':
|
||||||
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
||||||
break;
|
break;
|
||||||
@ -79,6 +93,9 @@ else if ($pp_settle_case == "가상계좌")
|
|||||||
case 'lg':
|
case 'lg':
|
||||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||||
break;
|
break;
|
||||||
|
case 'toss':
|
||||||
|
include G5_SHOP_PATH.'/toss/toss_result.php';
|
||||||
|
break;
|
||||||
case 'inicis':
|
case 'inicis':
|
||||||
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
||||||
break;
|
break;
|
||||||
@ -105,6 +122,9 @@ else if ($pp_settle_case == "휴대폰")
|
|||||||
case 'lg':
|
case 'lg':
|
||||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||||
break;
|
break;
|
||||||
|
case 'toss':
|
||||||
|
include G5_SHOP_PATH.'/toss/toss_result.php';
|
||||||
|
break;
|
||||||
case 'inicis':
|
case 'inicis':
|
||||||
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
||||||
break;
|
break;
|
||||||
@ -128,6 +148,9 @@ else if ($pp_settle_case == "신용카드")
|
|||||||
case 'lg':
|
case 'lg':
|
||||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||||
break;
|
break;
|
||||||
|
case 'toss':
|
||||||
|
include G5_SHOP_PATH.'/toss/toss_result.php';
|
||||||
|
break;
|
||||||
case 'inicis':
|
case 'inicis':
|
||||||
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
||||||
break;
|
break;
|
||||||
@ -159,6 +182,9 @@ if((int)$pp['pp_price'] !== (int)$pg_price) {
|
|||||||
case 'lg':
|
case 'lg':
|
||||||
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
||||||
break;
|
break;
|
||||||
|
case 'toss':
|
||||||
|
include G5_SHOP_PATH.'/toss/toss_result.php';
|
||||||
|
break;
|
||||||
case 'inicis':
|
case 'inicis':
|
||||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||||
break;
|
break;
|
||||||
@ -186,7 +212,10 @@ $sql = " update {$g5['g5_shop_personalpay_table']}
|
|||||||
pp_bank_account = '$pp_bank_account',
|
pp_bank_account = '$pp_bank_account',
|
||||||
pp_deposit_name = '$pp_deposit_name',
|
pp_deposit_name = '$pp_deposit_name',
|
||||||
pp_receipt_time = '$pp_receipt_time',
|
pp_receipt_time = '$pp_receipt_time',
|
||||||
pp_receipt_ip = '{$_SERVER['REMOTE_ADDR']}'
|
pp_receipt_ip = '{$_SERVER['REMOTE_ADDR']}',
|
||||||
|
pp_cash = '{$pg_receipt_infos['od_cash']}',
|
||||||
|
pp_cash_no = '{$pg_receipt_infos['od_cash_no']}',
|
||||||
|
pp_cash_info = '{$pg_receipt_infos['od_cash_info']}'
|
||||||
where pp_id = '{$pp['pp_id']}' ";
|
where pp_id = '{$pp['pp_id']}' ";
|
||||||
$result = sql_query($sql, false);
|
$result = sql_query($sql, false);
|
||||||
|
|
||||||
@ -197,6 +226,9 @@ if(!$result) {
|
|||||||
case 'lg':
|
case 'lg':
|
||||||
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
||||||
break;
|
break;
|
||||||
|
case 'toss':
|
||||||
|
include G5_SHOP_PATH.'/toss/toss_cancel.php';
|
||||||
|
break;
|
||||||
case 'inicis':
|
case 'inicis':
|
||||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||||
break;
|
break;
|
||||||
@ -224,6 +256,9 @@ if($pp_receipt_price > 0 && $pp['pp_id'] && $pp['od_id']) {
|
|||||||
od_settle_case = '$pp_settle_case',
|
od_settle_case = '$pp_settle_case',
|
||||||
od_deposit_name = '$pp_deposit_name',
|
od_deposit_name = '$pp_deposit_name',
|
||||||
od_bank_account = '$pp_bank_account',
|
od_bank_account = '$pp_bank_account',
|
||||||
|
od_cash = '{$pg_receipt_infos['od_cash']}',
|
||||||
|
od_cash_no = '{$pg_receipt_infos['od_cash_no']}',
|
||||||
|
od_cash_info = '{$pg_receipt_infos['od_cash_info']}',
|
||||||
od_shop_memo = concat(od_shop_memo, \"\\n개인결제 ".$pp['pp_id']." 로 결제완료 - ".$pp_receipt_time."\")
|
od_shop_memo = concat(od_shop_memo, \"\\n개인결제 ".$pp['pp_id']." 로 결제완료 - ".$pp_receipt_time."\")
|
||||||
where od_id = '{$pp['od_id']}' ";
|
where od_id = '{$pp['od_id']}' ";
|
||||||
$result = sql_query($sql, false);
|
$result = sql_query($sql, false);
|
||||||
@ -235,6 +270,9 @@ if($pp_receipt_price > 0 && $pp['pp_id'] && $pp['od_id']) {
|
|||||||
case 'lg':
|
case 'lg':
|
||||||
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
||||||
break;
|
break;
|
||||||
|
case 'toss':
|
||||||
|
include G5_SHOP_PATH.'/toss/toss_result.php';
|
||||||
|
break;
|
||||||
case 'inicis':
|
case 'inicis':
|
||||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -145,6 +145,8 @@ if($pp['pp_pg'] == 'lg') {
|
|||||||
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
|
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
|
||||||
|
|
||||||
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
|
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
|
||||||
|
} else if($pp['pp_pg'] == 'toss') {
|
||||||
|
$hp_receipt_script = 'window.open(\'https://dashboard.tosspayments.com/receipt/phone?transactionId='.$pp['pp_tno'].'&ref=PX\',\'receipt\',\'width=430,height=700\');';
|
||||||
} else if($pp['pp_pg'] == 'inicis') {
|
} else if($pp['pp_pg'] == 'inicis') {
|
||||||
$hp_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$pp['pp_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
|
$hp_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$pp['pp_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
|
||||||
} else if($pp['pp_pg'] == 'nicepay') {
|
} else if($pp['pp_pg'] == 'nicepay') {
|
||||||
@ -166,6 +168,8 @@ if($pp['pp_pg'] == 'lg') {
|
|||||||
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
|
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
|
||||||
|
|
||||||
$card_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
|
$card_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
|
||||||
|
} else if($pp['pp_pg'] == 'toss') {
|
||||||
|
$card_receipt_script = 'window.open(\'https://dashboard.tosspayments.com/receipt/redirection?transactionId='.$pp['pp_tno'].'&ref=PX\',\'receipt\',\'width=430,height=700\');';
|
||||||
} else if($pp['pp_pg'] == 'nicepay') {
|
} else if($pp['pp_pg'] == 'nicepay') {
|
||||||
$card_receipt_script = 'window.open(\'https://npg.nicepay.co.kr/issue/IssueLoader.do?type=0&TID='.$pp['pp_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
|
$card_receipt_script = 'window.open(\'https://npg.nicepay.co.kr/issue/IssueLoader.do?type=0&TID='.$pp['pp_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
|
||||||
} else if($pp['pp_pg'] == 'inicis') {
|
} else if($pp['pp_pg'] == 'inicis') {
|
||||||
@ -221,6 +225,8 @@ if($pp['pp_pg'] == 'lg') {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$cash_receipt_script = 'javascript:showCashReceipts(\''.$LGD_MID.'\',\''.$pp['pp_id'].'\',\''.$pp['pp_casseqno'].'\',\''.$trade_type.'\',\''.$CST_PLATFORM.'\');';
|
$cash_receipt_script = 'javascript:showCashReceipts(\''.$LGD_MID.'\',\''.$pp['pp_id'].'\',\''.$pp['pp_casseqno'].'\',\''.$trade_type.'\',\''.$CST_PLATFORM.'\');';
|
||||||
|
} else if($pp['pp_pg'] == 'toss') {
|
||||||
|
$cash_receipt_script = 'window.open(\'https://dashboard.tosspayments.com/receipt/mids/si_'.$config['cf_lg_mid'].'/orders/'.$pp['pp_id'].'/cash-receipt?ref=dashboard\',\'receipt\',\'width=430,height=700\');';
|
||||||
} else if($pp['pp_pg'] == 'inicis') {
|
} else if($pp['pp_pg'] == 'inicis') {
|
||||||
$cash = unserialize($pp['pp_cash_info']);
|
$cash = unserialize($pp['pp_cash_info']);
|
||||||
$cash_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid='.$cash['TID'].'&clpaymethod=22\',\'showreceipt\',\'width=380,height=540,scrollbars=no,resizable=no\');';
|
$cash_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid='.$cash['TID'].'&clpaymethod=22\',\'showreceipt\',\'width=380,height=540,scrollbars=no,resizable=no\');';
|
||||||
|
|||||||
15
mobile/shop/settle_toss.inc.php
Normal file
15
mobile/shop/settle_toss.inc.php
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
|
require_once(G5_SHOP_PATH.'/toss/toss.inc.php');
|
||||||
|
|
||||||
|
// var_dump($default['cf_toss_client_key']);
|
||||||
|
|
||||||
|
$toss = new TossPayments(
|
||||||
|
$config['cf_toss_client_key'],
|
||||||
|
$config['cf_toss_secret_key'],
|
||||||
|
$config['cf_lg_mid']
|
||||||
|
);
|
||||||
|
|
||||||
|
$toss->setPaymentHeader();
|
||||||
|
?>
|
||||||
6
mobile/shop/toss/_common.php
Normal file
6
mobile/shop/toss/_common.php
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?php
|
||||||
|
include_once('../../../common.php');
|
||||||
|
|
||||||
|
if (!defined('G5_USE_SHOP') || !G5_USE_SHOP)
|
||||||
|
die('<p>쇼핑몰 설치 후 이용해 주십시오.</p>');
|
||||||
|
define('_SHOP_', true);
|
||||||
33
mobile/shop/toss/orderform.1.php
Normal file
33
mobile/shop/toss/orderform.1.php
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form name="sm_form" method="POST" action="<?php echo G5_MSHOP_URL; ?>/toss/toss_approval.php">
|
||||||
|
<input type="hidden" name="method" value="">
|
||||||
|
<input type="hidden" name="orderId" value="<?php echo isset($od_id) ? $od_id : ''; ?>">
|
||||||
|
<input type="hidden" name="orderName" value="<?php echo isset($goods) ? $goods : ''; ?>">
|
||||||
|
<input type="hidden" name="customerName" value="<?php echo isset($od_name) ? $od_name : ''; ?>">
|
||||||
|
<input type="hidden" name="customerEmail" value="<?php echo isset($od_email) ? $od_email : ''; ?>">
|
||||||
|
<input type="hidden" name="customerMobilePhone" value="<?php echo isset($od_hp) ? $od_hp : ''; ?>">
|
||||||
|
<input type="hidden" name="cardUseEscrow" value="false">
|
||||||
|
<input type="hidden" name="escrowProducts" value=''>
|
||||||
|
<input type="hidden" name="cardflowMode" value="DEFAULT">
|
||||||
|
<input type="hidden" name="cardeasyPay" value="PAYCO">
|
||||||
|
<input type="hidden" name="cardUseCardPoint" value="false">
|
||||||
|
<input type="hidden" name="cardUseAppCardOnly" value="false">
|
||||||
|
<input type="hidden" name="amountCurrency" value="KRW">
|
||||||
|
<input type="hidden" name="amountValue" value="<?php echo isset($tot_price) ? $tot_price : 0; ?>">
|
||||||
|
<input type="hidden" name="taxFreeAmount" value="<?php echo isset($comm_free_mny) ? $comm_free_mny : 0; ?>">
|
||||||
|
<input type="hidden" name="windowTarget" value="iframe">
|
||||||
|
|
||||||
|
<input type="hidden" name="good_mny" value="<?php echo $tot_price; ?>">
|
||||||
|
<?php
|
||||||
|
if($default['de_tax_flag_use']) {
|
||||||
|
?>
|
||||||
|
<input type="hidden" name="comm_tax_mny" value="<?php echo isset($comm_tax_mny) ? $comm_tax_mny : 0; ?>"> <!-- 과세금액 -->
|
||||||
|
<input type="hidden" name="comm_vat_mny" value="<?php echo isset($comm_vat_mny) ? $comm_vat_mny : 0; ?>"> <!-- 부가세 -->
|
||||||
|
<input type="hidden" name="comm_free_mny" value="<?php echo isset($comm_free_mny) ? $comm_free_mny : 0; ?>"> <!-- 비과세 금액 -->
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</form>
|
||||||
37
mobile/shop/toss/orderform.2.php
Normal file
37
mobile/shop/toss/orderform.2.php
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
|
?>
|
||||||
|
<input type="hidden" name="method" value="">
|
||||||
|
<input type="hidden" name="orderId" value="<?php echo isset($od_id) ? $od_id : ''; ?>">
|
||||||
|
<input type="hidden" name="orderName" value="<?php echo isset($goods) ? $goods : ''; ?>">
|
||||||
|
<input type="hidden" name="customerName" value="<?php echo isset($od_name) ? $od_name : ''; ?>">
|
||||||
|
<input type="hidden" name="customerEmail" value="<?php echo isset($od_email) ? $od_email : ''; ?>">
|
||||||
|
<input type="hidden" name="customerMobilePhone" value="<?php echo isset($od_hp) ? $od_hp : ''; ?>">
|
||||||
|
<input type="hidden" name="cardUseEscrow" value="false">
|
||||||
|
<input type="hidden" name="escrowProducts" value=''>
|
||||||
|
<input type="hidden" name="cardflowMode" value="DEFAULT">
|
||||||
|
<input type="hidden" name="cardeasyPay" value="PAYCO">
|
||||||
|
<input type="hidden" name="cardUseCardPoint" value="false">
|
||||||
|
<input type="hidden" name="cardUseAppCardOnly" value="false">
|
||||||
|
<input type="hidden" name="amountCurrency" value="KRW">
|
||||||
|
<input type="hidden" name="amountValue" value="<?php echo isset($tot_price) ? $tot_price : 0; ?>">
|
||||||
|
<input type="hidden" name="taxFreeAmount" value="<?php echo isset($comm_free_mny) ? $comm_free_mny : 0; ?>">
|
||||||
|
<input type="hidden" name="windowTarget" value="iframe">
|
||||||
|
|
||||||
|
<input type="hidden" name="good_mny" value="<?php echo $tot_price; ?>">
|
||||||
|
<?php
|
||||||
|
if($default['de_tax_flag_use']) {
|
||||||
|
?>
|
||||||
|
<input type="hidden" name="comm_tax_mny" value="<?php echo isset($comm_tax_mny) ? $comm_tax_mny : 0; ?>"> <!-- 과세금액 -->
|
||||||
|
<input type="hidden" name="comm_vat_mny" value="<?php echo isset($comm_vat_mny) ? $comm_vat_mny : 0; ?>"> <!-- 부가세 -->
|
||||||
|
<input type="hidden" name="comm_free_mny" value="<?php echo isset($comm_free_mny) ? $comm_free_mny : 0; ?>"> <!-- 비과세 금액 -->
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="display_pay_button" class="btn_confirm">
|
||||||
|
<span id="show_req_btn"><input type="button" name="submitChecked" onClick="pay_approval();" value="결제등록요청" class="btn_submit"></span>
|
||||||
|
<span id="show_pay_btn" style="display:none;"><input type="button" onClick="forderform_check();" value="주문하기" class="btn_submit"></span>
|
||||||
|
<a href="<?php echo G5_SHOP_URL; ?>" class="btn_cancel">취소</a>
|
||||||
|
</div>
|
||||||
3
mobile/shop/toss/orderform.3.php
Normal file
3
mobile/shop/toss/orderform.3.php
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||||
|
?>
|
||||||
77
mobile/shop/toss/returnurl.php
Normal file
77
mobile/shop/toss/returnurl.php
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
<?php
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
// 결제 실패 처리인 경우
|
||||||
|
if (isset($_REQUEST['mode']) && $_REQUEST['mode'] === 'fail') {
|
||||||
|
$code = isset($_REQUEST['code']) ? trim($_REQUEST['code']) : '';
|
||||||
|
$message = isset($_REQUEST['message']) ? trim($_REQUEST['message']) : '';
|
||||||
|
|
||||||
|
alert('결제에 실패하였습니다.\\n\\n[' . $code . '] ' . $message, G5_SHOP_URL . '/orderform.php');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!isset($_SESSION['PAYREQ_MAP'])){
|
||||||
|
alert('세션이 만료 되었거나 유효하지 않은 요청 입니다.', G5_MSHOP_URL);
|
||||||
|
}
|
||||||
|
|
||||||
|
$payReqMap = $_SESSION['PAYREQ_MAP']; //결제 요청시, Session에 저장했던 파라미터 MAP
|
||||||
|
|
||||||
|
$g5['title'] = '토스페이먼츠 결제인증 완료처리';
|
||||||
|
$g5['body_script'] = ' onload="setTossResult();"';
|
||||||
|
include_once(G5_PATH.'/head.sub.php');
|
||||||
|
|
||||||
|
// 토스페이먼츠 결제인증 성공시 인증키 주문 임시데이터에 업데이트
|
||||||
|
$paymentKey = isset($_REQUEST['paymentKey']) ? trim($_REQUEST['paymentKey']) : '';
|
||||||
|
$orderId = isset($_REQUEST['orderId']) ? trim($_REQUEST['orderId']) : '';
|
||||||
|
$amount = isset($_REQUEST['amount']) ? trim($_REQUEST['amount']) : '';
|
||||||
|
|
||||||
|
if (empty($paymentKey) || empty($orderId)) {
|
||||||
|
alert('결제정보가 올바르지 않습니다.', G5_MSHOP_URL);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = " select * from {$g5['g5_shop_order_data_table']} where od_id = '$orderId' ";
|
||||||
|
$row = sql_fetch($sql);
|
||||||
|
|
||||||
|
$data = isset($row['dt_data']) ? unserialize(base64_decode($row['dt_data'])) : array();
|
||||||
|
|
||||||
|
// 주문 임시데이터에 paymentKey 업데이트
|
||||||
|
$data['paymentKey'] = $paymentKey;
|
||||||
|
$data_new = base64_encode(serialize($data));
|
||||||
|
$sql = " update {$g5['g5_shop_order_data_table']} set dt_data = '$data_new' where od_id = '$orderId' limit 1 ";
|
||||||
|
sql_query($sql);
|
||||||
|
|
||||||
|
if(isset($data['pp_id']) && $data['pp_id']) {
|
||||||
|
$order_action_url = G5_HTTPS_MSHOP_URL.'/personalpayformupdate.php';
|
||||||
|
} else {
|
||||||
|
$order_action_url = G5_HTTPS_MSHOP_URL.'/orderformupdate.php';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$exclude = array();
|
||||||
|
|
||||||
|
echo '<form name="forderform" method="post" action="'.$order_action_url.'" autocomplete="off">'.PHP_EOL;
|
||||||
|
|
||||||
|
echo make_order_field($data, $exclude);
|
||||||
|
|
||||||
|
echo '</form>'.PHP_EOL;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div id="show_progress">
|
||||||
|
<span style="display:block; text-align:center;margin-top:120px"><img src="<?php echo G5_MOBILE_URL; ?>/shop/img/loading.gif" alt=""></span>
|
||||||
|
<span style="display:block; text-align:center;margin-top:10px; font-size:14px">주문완료 중입니다. 잠시만 기다려 주십시오.</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function setTossResult() {
|
||||||
|
setTimeout( function() {
|
||||||
|
document.forderform.submit();
|
||||||
|
}, 300);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once(G5_PATH.'/tail.sub.php');
|
||||||
192
mobile/shop/toss/toss_approval.php
Normal file
192
mobile/shop/toss/toss_approval.php
Normal file
@ -0,0 +1,192 @@
|
|||||||
|
<?php
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
// 토스페이먼츠 class
|
||||||
|
require_once(G5_SHOP_PATH.'/toss/toss.inc.php');
|
||||||
|
|
||||||
|
// 개인결제 ID와 주문 ID 설정
|
||||||
|
$ss_order_id = isset($_REQUEST['orderId']) ? $_REQUEST['orderId'] : '';
|
||||||
|
$ss_personalpay_id = get_session('ss_personalpay_id');
|
||||||
|
|
||||||
|
// 장바구니 ID 설정 (바로구매 여부 확인)
|
||||||
|
$ss_cart_id = get_session('ss_direct') ? get_session('ss_cart_direct') : get_session('ss_cart_id');
|
||||||
|
|
||||||
|
// WHERE 조건 추가용 변수
|
||||||
|
$addQuery = "";
|
||||||
|
if (!empty($ss_order_id)) {
|
||||||
|
$addQuery .= " AND od_id = '{$ss_order_id}'";
|
||||||
|
}
|
||||||
|
if (isset($member['mb_id']) && $member['mb_id'] !== '') {
|
||||||
|
$addQuery .= " AND mb_id = '{$member['mb_id']}'";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 개인결제가 아닌 경우 장바구니 ID 조건 추가
|
||||||
|
if (empty($ss_personalpay_id)) {
|
||||||
|
if (!empty($ss_cart_id)) {
|
||||||
|
$addQuery .= " AND cart_id = '{$ss_cart_id}'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 최종 검증 (원래 로직 유지)
|
||||||
|
if (empty($ss_order_id) || (empty($ss_personalpay_id) && empty($ss_cart_id))) {
|
||||||
|
alert('주문정보가 올바르지 않습니다.');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 기존 dt_data 가져오기
|
||||||
|
$sql = "
|
||||||
|
SELECT * FROM {$g5['g5_shop_order_data_table']}
|
||||||
|
WHERE 1=1
|
||||||
|
{$addQuery}
|
||||||
|
";
|
||||||
|
$res = sql_fetch($sql);
|
||||||
|
$dt_data = [];
|
||||||
|
if (isset($res['dt_data'])) {
|
||||||
|
$dt_data = unserialize(base64_decode($res['dt_data']));
|
||||||
|
}
|
||||||
|
|
||||||
|
$payReqMap = $dt_data;
|
||||||
|
|
||||||
|
$_SESSION['PAYREQ_MAP'] = $payReqMap;
|
||||||
|
|
||||||
|
if(isset($payReqMap['pp_id']) && $payReqMap['pp_id']) {
|
||||||
|
$page_return_url = G5_SHOP_URL.'/personalpayform.php?pp_id='.$payReqMap['pp_id'];
|
||||||
|
} else {
|
||||||
|
$page_return_url = G5_SHOP_URL.'/orderform.php';
|
||||||
|
if ($_SESSION['ss_direct']) {
|
||||||
|
$page_return_url .= '?sw_direct=1';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$g5['title'] = '토스페이먼츠 eCredit서비스 결제';
|
||||||
|
$g5['body_script'] = ' onload="launchCrossPlatform(frm);"';
|
||||||
|
include_once(G5_PATH.'/head.sub.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form name="forderform">
|
||||||
|
<?php
|
||||||
|
foreach($payReqMap as $key => $value) {
|
||||||
|
if (isset($_REQUEST[$key]) && $_REQUEST[$key]) {
|
||||||
|
$value = $_REQUEST[$key];
|
||||||
|
}
|
||||||
|
if (is_array($value)) {
|
||||||
|
$value = implode(',', $value);
|
||||||
|
}
|
||||||
|
if ($key === 'escrowProducts') {
|
||||||
|
$value = str_replace("\\", "", $value);
|
||||||
|
echo '<input type="hidden" name="'.$key.'" value=\''.$value.'\'>'.PHP_EOL;
|
||||||
|
} else {
|
||||||
|
echo '<input type="hidden" name="'.$key.'" value="'.$value.'">'.PHP_EOL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<script language="javascript" src="https://js.tosspayments.com/v2/standard"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 수정불가.
|
||||||
|
*/
|
||||||
|
const clientKey = "<?php echo $config['cf_toss_client_key']; ?>";
|
||||||
|
const customerKey = "<?php echo isset($member['mb_id']) ? $member['mb_id'] : ''; ?>";
|
||||||
|
const tossPayments = TossPayments(clientKey);
|
||||||
|
|
||||||
|
const payment = tossPayments.payment({ customerKey });
|
||||||
|
|
||||||
|
const frm = document.forderform;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 수정불가
|
||||||
|
*/
|
||||||
|
async function launchCrossPlatform(frm) {
|
||||||
|
// 필수 값들 체크
|
||||||
|
if (!frm.amountValue || !frm.amountValue.value) {
|
||||||
|
alert('결제 금액이 설정되지 않았습니다.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const amount = parseInt(frm.amountValue.value);
|
||||||
|
if (isNaN(amount) || amount <= 0) {
|
||||||
|
alert('올바른 결제 금액을 입력해주세요.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 기본 결제 옵션
|
||||||
|
const paymentOptions = {
|
||||||
|
method: frm.method.value,
|
||||||
|
amount: {
|
||||||
|
currency: "KRW",
|
||||||
|
value: parseInt(frm.amountValue.value),
|
||||||
|
},
|
||||||
|
taxFreeAmount: parseInt(frm.taxFreeAmount.value),
|
||||||
|
orderId: frm.orderId.value, // 고유 주문번호
|
||||||
|
orderName: frm.orderName.value,
|
||||||
|
successUrl: "<?php echo G5_MSHOP_URL;?>/toss/returnurl.php", // 결제 요청이 성공하면 리다이렉트되는 URL
|
||||||
|
failUrl: "<?php echo G5_MSHOP_URL;?>/toss/returnurl.php?mode=fail", // 결제 요청이 실패하면 리다이렉트되는 URL
|
||||||
|
customerEmail: frm.customerEmail.value,
|
||||||
|
customerName: frm.customerName.value,
|
||||||
|
customerMobilePhone: frm.customerMobilePhone.value,
|
||||||
|
};
|
||||||
|
|
||||||
|
// escrowProducts 추가 함수
|
||||||
|
function addEscrowProducts(paymentMethodOptions) {
|
||||||
|
if (frm.cardUseEscrow.value === "true") {
|
||||||
|
if (frm.escrowProducts && frm.escrowProducts.value) {
|
||||||
|
paymentMethodOptions.escrowProducts = JSON.parse(frm.escrowProducts.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 결제 방법에 따른 추가 옵션
|
||||||
|
if (frm.method.value == 'CARD') {
|
||||||
|
// 신용카드
|
||||||
|
paymentOptions.card = {
|
||||||
|
flowMode: frm.cardflowMode.value, // 통합결제창 여는 옵션
|
||||||
|
easyPay: frm.cardeasyPay.value,
|
||||||
|
useCardPoint: frm.cardUseCardPoint.value == "true" ? true : false,
|
||||||
|
useAppCardOnly: frm.cardUseAppCardOnly.value == "true" ? true : false,
|
||||||
|
useEscrow: frm.cardUseEscrow.value == "true" ? true : false,
|
||||||
|
};
|
||||||
|
|
||||||
|
// escrowProducts 추가
|
||||||
|
addEscrowProducts(paymentOptions.card);
|
||||||
|
} else if (frm.method.value == 'VIRTUAL_ACCOUNT') {
|
||||||
|
// 가상계좌
|
||||||
|
paymentOptions.virtualAccount = {
|
||||||
|
cashReceipt: {
|
||||||
|
type: "소득공제",
|
||||||
|
},
|
||||||
|
useEscrow: frm.cardUseEscrow.value == "true" ? true : false,
|
||||||
|
validHours: 168,
|
||||||
|
};
|
||||||
|
|
||||||
|
// escrowProducts 추가
|
||||||
|
addEscrowProducts(paymentOptions.virtualAccount);
|
||||||
|
} else if (frm.method.value == 'TRANSFER') {
|
||||||
|
// 계좌이체
|
||||||
|
paymentOptions.transfer = {
|
||||||
|
cashReceipt: {
|
||||||
|
type: "소득공제",
|
||||||
|
},
|
||||||
|
useEscrow: frm.cardUseEscrow.value == "true" ? true : false,
|
||||||
|
};
|
||||||
|
|
||||||
|
// escrowProducts 추가
|
||||||
|
addEscrowProducts(paymentOptions.transfer);
|
||||||
|
}
|
||||||
|
|
||||||
|
await payment.requestPayment(paymentOptions);
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* FORM 명만 수정 가능
|
||||||
|
*/
|
||||||
|
function getFormObject() {
|
||||||
|
return document.getElementById("forderform");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once(G5_PATH.'/tail.sub.php');
|
||||||
85
mobile/skin/member/basic/consent_modal.inc.php
Normal file
85
mobile/skin/member/basic/consent_modal.inc.php
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
<!-- HTML -->
|
||||||
|
<?php if (!defined('_GNUBOARD_')) exit; ?>
|
||||||
|
<dialog id="consentDialog" aria-labelledby="consentDialogTitle" aria-describedby="consentDialogBody">
|
||||||
|
<form method="dialog" class="cd-card">
|
||||||
|
<header class="cd-head">
|
||||||
|
<h3 id="consentDialogTitle" class="cd-title">안내</h3>
|
||||||
|
</header>
|
||||||
|
<div id="consentDialogBody" class="cd-body"></div>
|
||||||
|
<footer class="cd-actions">
|
||||||
|
<button type="button" class="cd-agree">동의합니다</button>
|
||||||
|
<button value="close" class="cd-close">닫기</button>
|
||||||
|
</footer>
|
||||||
|
</form>
|
||||||
|
</dialog>
|
||||||
|
|
||||||
|
<!-- 스타일 -->
|
||||||
|
<style>
|
||||||
|
#consentDialog { padding:0; border:none; border-radius:12px; }
|
||||||
|
#consentDialog::backdrop { background: rgba(0,0,0,.45); backdrop-filter: blur(5px);}
|
||||||
|
.cd-card { max-width: 560px; background:#fff; border-radius:12px; }
|
||||||
|
.cd-head { display:flex; align-items:center; justify-content:space-between; padding:16px; }
|
||||||
|
.cd-title { margin:0; font-size:18px; font-weight:bold; word-break:keep-all; }
|
||||||
|
.cd-body { max-height:500px; overflow-y:auto; padding:16px; border-top:1px solid #e6e6e9; border-bottom:1px solid #e6e6e9; line-height:1.6; font-size:14px; color:#222; }
|
||||||
|
.cd-actions { display:flex; gap:8px; justify-content:flex-end; padding:12px 16px 16px; }
|
||||||
|
.cd-actions .cd-agree { padding:8px 14px; border:1px solid #3a8afd; background:#3a8afd; color:#fff; border-radius:8px; }
|
||||||
|
.cd-actions .cd-close { padding:8px 14px; border:1px solid #ccc; background:#fff; color:#111; border-radius:8px; }
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<!-- JS -->
|
||||||
|
<script>
|
||||||
|
(function(){
|
||||||
|
const dlg = document.getElementById('consentDialog');
|
||||||
|
if (!dlg) return;
|
||||||
|
|
||||||
|
const body = document.getElementById('consentDialogBody');
|
||||||
|
const titleE = document.getElementById('consentDialogTitle');
|
||||||
|
let opener = null;
|
||||||
|
|
||||||
|
const openFrom = (btn) => {
|
||||||
|
opener = btn;
|
||||||
|
const tplSel = btn.getAttribute('data-template');
|
||||||
|
const title = btn.getAttribute('data-title') || '안내';
|
||||||
|
const tpl = tplSel ? document.querySelector(tplSel) : null;
|
||||||
|
|
||||||
|
titleE.textContent = title;
|
||||||
|
body.innerHTML = tpl ? tpl.innerHTML : '';
|
||||||
|
|
||||||
|
dlg.dataset.check = btn.getAttribute('data-check') || '';
|
||||||
|
dlg.dataset.checkGroup = btn.getAttribute('data-check-group') || '';
|
||||||
|
|
||||||
|
if (dlg.showModal) dlg.showModal(); else dlg.setAttribute('open','');
|
||||||
|
};
|
||||||
|
|
||||||
|
const closeDialog = () => {
|
||||||
|
if (dlg.close) dlg.close(); else dlg.removeAttribute('open');
|
||||||
|
if (opener) opener.focus();
|
||||||
|
};
|
||||||
|
|
||||||
|
document.addEventListener('click', (e)=>{
|
||||||
|
const trigger = e.target.closest('.js-open-consent');
|
||||||
|
if (trigger) { openFrom(trigger); return; }
|
||||||
|
|
||||||
|
if (e.target.classList.contains('cd-agree')) {
|
||||||
|
const sel = dlg.dataset.check;
|
||||||
|
const groupSel = dlg.dataset.checkGroup;
|
||||||
|
|
||||||
|
if (groupSel) {
|
||||||
|
document.querySelectorAll(groupSel).forEach(cb => {
|
||||||
|
cb.checked = true;
|
||||||
|
cb.dispatchEvent(new Event('change', {bubbles:true}));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (sel) {
|
||||||
|
const cb = document.querySelector(sel);
|
||||||
|
if (cb) { cb.checked = true; cb.dispatchEvent(new Event('change', {bubbles:true})); }
|
||||||
|
}
|
||||||
|
closeDialog();
|
||||||
|
e.preventDefault();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
dlg.addEventListener('cancel', (e)=>{ e.preventDefault(); closeDialog(); });
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
@ -22,7 +22,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<section id="fregister_term">
|
<section id="fregister_term">
|
||||||
<h2>회원가입약관</h2>
|
<h2>(필수) 회원가입약관</h2>
|
||||||
<textarea readonly><?php echo get_text($config['cf_stipulation']) ?></textarea>
|
<textarea readonly><?php echo get_text($config['cf_stipulation']) ?></textarea>
|
||||||
<fieldset class="fregister_agree">
|
<fieldset class="fregister_agree">
|
||||||
<input type="checkbox" name="agree" value="1" id="agree11" class="selec_chk">
|
<input type="checkbox" name="agree" value="1" id="agree11" class="selec_chk">
|
||||||
@ -31,7 +31,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="fregister_private">
|
<section id="fregister_private">
|
||||||
<h2>개인정보 수집 및 이용</h2>
|
<h2>(필수) 개인정보 수집 및 이용</h2>
|
||||||
<div class="tbl_head01 tbl_wrap">
|
<div class="tbl_head01 tbl_wrap">
|
||||||
<table>
|
<table>
|
||||||
<caption>개인정보 수집 및 이용</caption>
|
<caption>개인정보 수집 및 이용</caption>
|
||||||
|
|||||||
@ -45,7 +45,6 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
|
|||||||
<div class="form_01">
|
<div class="form_01">
|
||||||
<h2>개인정보 입력</h2>
|
<h2>개인정보 입력</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
|
||||||
<?php
|
<?php
|
||||||
$desc_name = '';
|
$desc_name = '';
|
||||||
$desc_phone = '';
|
$desc_phone = '';
|
||||||
@ -56,7 +55,9 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
|
|||||||
if (!$config['cf_cert_simple'] && !$config['cf_cert_hp'] && $config['cf_cert_ipin']) {
|
if (!$config['cf_cert_simple'] && !$config['cf_cert_hp'] && $config['cf_cert_ipin']) {
|
||||||
$desc_phone = '';
|
$desc_phone = '';
|
||||||
}
|
}
|
||||||
|
?>
|
||||||
|
<li>
|
||||||
|
<?php
|
||||||
if($config['cf_cert_simple']) {
|
if($config['cf_cert_simple']) {
|
||||||
echo '<button type="button" id="win_sa_kakao_cert" class="btn_frmline btn win_sa_cert" data-type="">간편인증</button>'.PHP_EOL;
|
echo '<button type="button" id="win_sa_kakao_cert" class="btn_frmline btn win_sa_cert" data-type="">간편인증</button>'.PHP_EOL;
|
||||||
}
|
}
|
||||||
@ -67,10 +68,9 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
|
|||||||
|
|
||||||
echo '<span class="cert_req">(필수)</span>';
|
echo '<span class="cert_req">(필수)</span>';
|
||||||
echo '<noscript>본인확인을 위해서는 자바스크립트 사용이 가능해야합니다.</noscript>'.PHP_EOL;
|
echo '<noscript>본인확인을 위해서는 자바스크립트 사용이 가능해야합니다.</noscript>'.PHP_EOL;
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
<?php
|
<?php
|
||||||
if ($config['cf_cert_use'] && $member['mb_certify']) {
|
if ($member['mb_certify']) {
|
||||||
switch ($member['mb_certify']) {
|
switch ($member['mb_certify']) {
|
||||||
case "simple":
|
case "simple":
|
||||||
$mb_cert = "간편인증";
|
$mb_cert = "간편인증";
|
||||||
@ -88,6 +88,7 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
|
|||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</li>
|
</li>
|
||||||
|
<?php } ?>
|
||||||
<li class="rgs_name_li">
|
<li class="rgs_name_li">
|
||||||
<label for="reg_mb_name" class="sound_only">이름 (필수)<?php echo $desc_name ?></label>
|
<label for="reg_mb_name" class="sound_only">이름 (필수)<?php echo $desc_name ?></label>
|
||||||
<input type="text" id="reg_mb_name" name="mb_name" value="<?php echo get_text($member['mb_name']) ?>" <?php echo $required ?> <?php echo $name_readonly; ?> class="frm_input full_input <?php echo $required ?> <?php echo $name_readonly ?>" placeholder="이름 (필수)<?php echo $desc_name ?>">
|
<input type="text" id="reg_mb_name" name="mb_name" value="<?php echo get_text($member['mb_name']) ?>" <?php echo $required ?> <?php echo $name_readonly; ?> class="frm_input full_input <?php echo $required ?> <?php echo $name_readonly ?>" placeholder="이름 (필수)<?php echo $desc_name ?>">
|
||||||
@ -129,7 +130,7 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
|
|||||||
<?php if ($config['cf_use_tel']) { ?>
|
<?php if ($config['cf_use_tel']) { ?>
|
||||||
<li>
|
<li>
|
||||||
<label for="reg_mb_tel" class="sound_only">전화번호<?php if ($config['cf_req_tel']) { ?> (필수)<?php } ?></label>
|
<label for="reg_mb_tel" class="sound_only">전화번호<?php if ($config['cf_req_tel']) { ?> (필수)<?php } ?></label>
|
||||||
<input type="text" name="mb_tel" value="<?php echo get_text($member['mb_tel']) ?>" id="reg_mb_tel" class="frm_input full_input <?php echo $config['cf_req_tel']?"required":""; ?>" <?php if ($config['cf_cert_use'] && ($config['cf_cert_hp'] || $config['cf_cert_simple']) && $member['mb_certify']) { echo "readonly"; } ?> maxlength="20" <?php echo $config['cf_req_tel']?"required":""; ?> placeholder="전화번호<?php if ($config['cf_req_tel']) { ?> (필수)<?php } ?>">
|
<input type="text" name="mb_tel" value="<?php echo get_text($member['mb_tel']) ?>" id="reg_mb_tel" class="frm_input full_input <?php echo $config['cf_req_tel']?"required":""; ?>" maxlength="20" <?php echo $config['cf_req_tel']?"required":""; ?> placeholder="전화번호<?php if ($config['cf_req_tel']) { ?> (필수)<?php } ?>">
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
@ -218,26 +219,6 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
|
|||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<li class="chk_box">
|
|
||||||
<input type="checkbox" name="mb_mailling" value="1" id="reg_mb_mailling" <?php echo ($w=='' || $member['mb_mailling'])?'checked':''; ?> class="selec_chk">
|
|
||||||
<label for="reg_mb_mailling">
|
|
||||||
<span></span>
|
|
||||||
<b class="sound_only">메일링서비스</b>
|
|
||||||
</label>
|
|
||||||
<span class="chk_li">정보 메일을 받겠습니다.</span>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<?php if ($config['cf_use_hp']) { ?>
|
|
||||||
<li class="chk_box">
|
|
||||||
<input type="checkbox" name="mb_sms" value="1" id="reg_mb_sms" <?php echo ($w=='' || $member['mb_sms'])?'checked':''; ?> class="selec_chk">
|
|
||||||
<label for="reg_mb_sms">
|
|
||||||
<span></span>
|
|
||||||
<b class="sound_only">SMS 수신여부</b>
|
|
||||||
</label>
|
|
||||||
<span class="chk_li">휴대폰 문자메세지를 받겠습니다.</span>
|
|
||||||
</li>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<?php if (isset($member['mb_open_date']) && $member['mb_open_date'] <= date("Y-m-d", G5_SERVER_TIME - ($config['cf_open_modify'] * 86400)) || empty($member['mb_open_date'])) { // 정보공개 수정일이 지났다면 수정가능 ?>
|
<?php if (isset($member['mb_open_date']) && $member['mb_open_date'] <= date("Y-m-d", G5_SERVER_TIME - ($config['cf_open_modify'] * 86400)) || empty($member['mb_open_date'])) { // 정보공개 수정일이 지났다면 수정가능 ?>
|
||||||
<li class="chk_box">
|
<li class="chk_box">
|
||||||
<input type="checkbox" name="mb_open" value="1" id="reg_mb_open" <?php echo ($w=='' || $member['mb_open'])?'checked':''; ?> class="selec_chk">
|
<input type="checkbox" name="mb_open" value="1" id="reg_mb_open" <?php echo ($w=='' || $member['mb_open'])?'checked':''; ?> class="selec_chk">
|
||||||
@ -246,7 +227,7 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
|
|||||||
<b class="sound_only">정보공개</b>
|
<b class="sound_only">정보공개</b>
|
||||||
</label>
|
</label>
|
||||||
<span class="chk_li">다른분들이 나의 정보를 볼 수 있도록 합니다.</span>
|
<span class="chk_li">다른분들이 나의 정보를 볼 수 있도록 합니다.</span>
|
||||||
<span class="frm_info">
|
<span class="frm_info add_info">
|
||||||
정보공개를 바꾸시면 앞으로 <?php echo (int)$config['cf_open_modify'] ?>일 이내에는 변경이 안됩니다.
|
정보공개를 바꾸시면 앞으로 <?php echo (int)$config['cf_open_modify'] ?>일 이내에는 변경이 안됩니다.
|
||||||
</span>
|
</span>
|
||||||
<input type="hidden" name="mb_open_default" value="<?php echo $member['mb_open'] ?>">
|
<input type="hidden" name="mb_open_default" value="<?php echo $member['mb_open'] ?>">
|
||||||
@ -276,7 +257,114 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
|
|||||||
<input type="text" name="mb_recommend" id="reg_mb_recommend" class="frm_input full_input" placeholder="추천인아이디">
|
<input type="text" name="mb_recommend" id="reg_mb_recommend" class="frm_input full_input" placeholder="추천인아이디">
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 회원가입 약관 동의에 광고성 정보 수신 동의 표시 여부가 사용시에만 -->
|
||||||
|
<?php if($config['cf_use_promotion'] == 1) { ?>
|
||||||
|
<div class="form_01">
|
||||||
|
<h2>수신설정</h2>
|
||||||
|
<!-- 수신설정만 팝업 및 체크박스 관련 class 적용 -->
|
||||||
|
<ul>
|
||||||
|
<!-- (선택) 마케팅 목적의 개인정보 수집 및 이용 -->
|
||||||
|
<li class="chk_box">
|
||||||
|
<div class="consent-line">
|
||||||
|
<input type="checkbox" name="mb_marketing_agree" value="1" id="reg_mb_marketing_agree" aria-describedby="desc_marketing" <?php echo $member['mb_marketing_agree'] ? 'checked' : ''; ?> class="selec_chk marketing-sync">
|
||||||
|
<label for="reg_mb_marketing_agree"><span></span><b class="sound_only">(선택) 마케팅 목적의 개인정보 수집 및 이용</b></label>
|
||||||
|
<span class="chk_li">(선택) 마케팅 목적의 개인정보 수집 및 이용</span>
|
||||||
|
<button type="button" class="js-open-consent" data-title="마케팅 목적의 개인정보 수집 및 이용" data-template="#tpl_marketing" data-check="#reg_mb_marketing_agree" aria-controls="consentDialog">자세히보기</button>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="mb_marketing_agree_default" value="<?php echo $member['mb_marketing_agree'] ?>">
|
||||||
|
<div id="desc_marketing" class="sound_only">마케팅 목적의 개인정보 수집·이용에 대한 안내입니다. 자세히보기를 눌러 전문을 확인할 수 있습니다.</div>
|
||||||
|
<div class="consent-date"><?php if ($member['mb_marketing_agree'] == 1 && $member['mb_marketing_date'] != "0000-00-00 00:00:00") echo "(동의일자: ".$member['mb_marketing_date'].")"; ?></div>
|
||||||
|
|
||||||
|
<template id="tpl_marketing">
|
||||||
|
* 목적: 서비스 마케팅 및 프로모션<br>
|
||||||
|
* 항목: 이름, 이메일<?php echo ($config['cf_use_hp'] || ($config["cf_cert_use"] && ($config['cf_cert_hp'] || $config['cf_cert_simple']))) ? ", 휴대폰 번호" : "";?><br>
|
||||||
|
* 보유기간: 회원 탈퇴 시까지<br>
|
||||||
|
동의를 거부하셔도 서비스 기본 이용은 가능하나, 맞춤형 혜택 제공은 제한될 수 있습니다.
|
||||||
|
</template>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<!-- (선택) 광고성 정보 수신 동의 (상위) -->
|
||||||
|
<li class="chk_box consent-group">
|
||||||
|
<div class="consent-line">
|
||||||
|
<input type="checkbox" name="mb_promotion_agree" value="1" id="reg_mb_promotion_agree" aria-describedby="desc_promotion" class="selec_chk marketing-sync parent-promo">
|
||||||
|
<label for="reg_mb_promotion_agree"><span></span><b class="sound_only">(선택) 광고성 정보 수신 동의</b></label>
|
||||||
|
<span class="chk_li">(선택) 광고성 정보 수신 동의</span>
|
||||||
|
<button type="button" class="js-open-consent" data-title="광고성 정보 수신 동의" data-template="#tpl_promotion" data-check="#reg_mb_promotion_agree" data-check-group=".child-promo" aria-controls="consentDialog">자세히보기</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="desc_promotion" class="sound_only">광고성 정보(이메일/SMS·카카오톡) 수신 동의의 상위 항목입니다. 자세히보기를 눌러 전문을 확인할 수 있습니다.</div>
|
||||||
|
|
||||||
|
<!-- 하위 채널(이메일/SMS) -->
|
||||||
|
<ul class="sub-consents">
|
||||||
|
<li class="chk_box is-inline">
|
||||||
|
<input type="checkbox" name="mb_mailling" value="1" id="reg_mb_mailling" <?php echo $member['mb_mailling'] ? 'checked' : ''; ?> class="selec_chk child-promo">
|
||||||
|
<label for="reg_mb_mailling"><span></span><b class="sound_only">광고성 이메일 수신 동의</b></label>
|
||||||
|
<span class="chk_li">광고성 이메일 수신 동의</span>
|
||||||
|
<input type="hidden" name="mb_mailling_default" value="<?php echo $member['mb_mailling']; ?>">
|
||||||
|
<div class="consent-date"><?php if ($w == 'u' && $member['mb_mailling'] == 1 && $member['mb_mailling_date'] != "0000-00-00 00:00:00") echo "(동의일자: ".$member['mb_mailling_date'].")"; ?></div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<!-- 휴대폰번호 입력 보이기 or 필수입력일 경우에만 -->
|
||||||
|
<?php if ($config['cf_use_hp'] || $config['cf_req_hp']) { ?>
|
||||||
|
<li class="chk_box is-inline">
|
||||||
|
<input type="checkbox" name="mb_sms" value="1" id="reg_mb_sms" <?php echo $member['mb_sms'] ? 'checked' : ''; ?> class="selec_chk child-promo">
|
||||||
|
<label for="reg_mb_sms"><span></span><b class="sound_only">광고성 SMS/카카오톡 수신 동의</b></label>
|
||||||
|
<span class="chk_li">광고성 SMS/카카오톡 수신 동의</span>
|
||||||
|
<input type="hidden" name="mb_sms_default" value="<?php echo $member['mb_sms']; ?>">
|
||||||
|
<div class="consent-date"><?php if ($w == 'u' && $member['mb_sms'] == 1 && $member['mb_sms_date'] != "0000-00-00 00:00:00") echo "(동의일자: ".$member['mb_sms_date'].")"; ?></div>
|
||||||
|
</li>
|
||||||
|
<?php } ?>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<template id="tpl_promotion">
|
||||||
|
수집·이용에 동의한 개인정보를 이용하여 이메일/SMS/카카오톡 등으로 오전 8시~오후 9시에 광고성 정보를 전송할 수 있습니다.<br>
|
||||||
|
동의는 언제든지 마이페이지에서 철회할 수 있습니다.
|
||||||
|
</template>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<!-- (선택) 개인정보 제3자 제공 동의 -->
|
||||||
|
<!-- SMS 사용시에만 -->
|
||||||
|
<?php
|
||||||
|
$configKeys = ['cf_sms_use'];
|
||||||
|
$companies = ['icode' => '아이코드'];
|
||||||
|
|
||||||
|
$usedCompanies = [];
|
||||||
|
foreach ($configKeys as $key) {
|
||||||
|
if (!empty($config[$key]) && isset($companies[$config[$key]])) {
|
||||||
|
$usedCompanies[] = $companies[$config[$key]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php if (!empty($usedCompanies)) { ?>
|
||||||
|
<li class="chk_box">
|
||||||
|
<div class="consent-line">
|
||||||
|
<input type="checkbox" name="mb_thirdparty_agree" value="1" id="reg_mb_thirdparty_agree" aria-describedby="desc_thirdparty" <?php echo $member['mb_thirdparty_agree'] ? 'checked' : ''; ?> class="selec_chk marketing-sync">
|
||||||
|
<label for="reg_mb_thirdparty_agree"><span></span><b class="sound_only">(선택) 개인정보 제3자 제공 동의</b></label>
|
||||||
|
<span class="chk_li">(선택) 개인정보 제3자 제공 동의</span>
|
||||||
|
<button type="button" class="js-open-consent" data-title="개인정보 제3자 제공 동의" data-template="#tpl_thirdparty" data-check="#reg_mb_thirdparty_agree" aria-controls="consentDialog">자세히보기</button>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="mb_thirdparty_agree_default" value="<?php echo $member['mb_thirdparty_agree'] ?>">
|
||||||
|
<div id="desc_thirdparty" class="sound_only">개인정보 제3자 제공 동의에 대한 안내입니다. 자세히보기를 눌러 전문을 확인할 수 있습니다.</div>
|
||||||
|
<div class="consent-date"><?php if ($member['mb_thirdparty_agree'] == 1 && $member['mb_thirdparty_date'] != "0000-00-00 00:00:00") echo "(동의일자: ".$member['mb_thirdparty_date'].")"; ?></div>
|
||||||
|
|
||||||
|
<template id="tpl_thirdparty">
|
||||||
|
* 목적: 상품/서비스, 사은/판촉행사, 이벤트 등의 마케팅 안내(카카오톡 등)<br>
|
||||||
|
* 항목: 이름, 휴대폰 번호<br>
|
||||||
|
* 제공받는 자: <?php echo implode(', ', $usedCompanies);?><br>
|
||||||
|
* 보유기간: 제공 목적 서비스 기간 또는 동의 철회 시까지
|
||||||
|
</template>
|
||||||
|
</li>
|
||||||
|
<?php } ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<div class="form_01">
|
||||||
|
<h2>자동등록방지</h2>
|
||||||
|
<ul>
|
||||||
<li class="is_captcha_use">
|
<li class="is_captcha_use">
|
||||||
<span class="frm_label">자동등록방지</span>
|
<span class="frm_label">자동등록방지</span>
|
||||||
<?php echo captcha_html(); ?>
|
<?php echo captcha_html(); ?>
|
||||||
@ -290,6 +378,8 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<?php include_once(__DIR__ . '/consent_modal.inc.php'); ?>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
$("#reg_zip_find").css("display", "inline-block");
|
$("#reg_zip_find").css("display", "inline-block");
|
||||||
@ -513,5 +603,29 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
|
|||||||
}
|
}
|
||||||
$(this).siblings('.fileName').val(filename);
|
$(this).siblings('.fileName').val(filename);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
const parentPromo = document.getElementById('reg_mb_promotion_agree');
|
||||||
|
const childPromo = Array.from(document.querySelectorAll('.child-promo'));
|
||||||
|
if (!parentPromo || childPromo.length === 0) return;
|
||||||
|
|
||||||
|
const syncParentFromChildren = () => {
|
||||||
|
const anyChecked = childPromo.some(cb => cb.checked);
|
||||||
|
parentPromo.checked = anyChecked; // 하나라도 체크되면 부모 체크
|
||||||
|
};
|
||||||
|
|
||||||
|
const syncChildrenFromParent = () => {
|
||||||
|
const isChecked = parentPromo.checked;
|
||||||
|
childPromo.forEach(cb => {
|
||||||
|
cb.checked = isChecked;
|
||||||
|
cb.dispatchEvent(new Event('change', { bubbles: true }));
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
syncParentFromChildren();
|
||||||
|
|
||||||
|
parentPromo.addEventListener('change', syncChildrenFromParent);
|
||||||
|
childPromo.forEach(cb => cb.addEventListener('change', syncParentFromChildren));
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
@ -5,6 +5,8 @@
|
|||||||
.mbskin h1 {font-size:1.75em;margin:40px 0 25px}
|
.mbskin h1 {font-size:1.75em;margin:40px 0 25px}
|
||||||
.mbskin p {padding-bottom:20px;border-bottom:1px solid #c8c8c8}
|
.mbskin p {padding-bottom:20px;border-bottom:1px solid #c8c8c8}
|
||||||
.mbskin p strong {color:#4162ff;padding-bottom:5px;display:block;font-size:1.083em}
|
.mbskin p strong {color:#4162ff;padding-bottom:5px;display:block;font-size:1.083em}
|
||||||
|
|
||||||
|
/* 버튼 */
|
||||||
.mbskin .btn_submit {display:block;width:100%;height:40px;line-height:40px;padding:0 10px;border:0;font-weight:bold;background:#3a8afd;color:#fff;border-radius:3px}
|
.mbskin .btn_submit {display:block;width:100%;height:40px;line-height:40px;padding:0 10px;border:0;font-weight:bold;background:#3a8afd;color:#fff;border-radius:3px}
|
||||||
/* ### 기본 스타일 커스터마이징 끝 ### */
|
/* ### 기본 스타일 커스터마이징 끝 ### */
|
||||||
|
|
||||||
@ -68,7 +70,10 @@
|
|||||||
.fregister_agree input[type="checkbox"]:checked + label {color:#000}
|
.fregister_agree input[type="checkbox"]:checked + label {color:#000}
|
||||||
.fregister_agree input[type="checkbox"]:checked + label span {background:url('./img/chk.png') no-repeat 50% 50% #3a8afd;border-color:#1471f6;border-radius:3px}
|
.fregister_agree input[type="checkbox"]:checked + label span {background:url('./img/chk.png') no-repeat 50% 50% #3a8afd;border-color:#1471f6;border-radius:3px}
|
||||||
.fregister_agree.chk_all input[type="checkbox"] + label span {top:15px}
|
.fregister_agree.chk_all input[type="checkbox"] + label span {top:15px}
|
||||||
|
#fregisterform .consent-line {display: flex; align-items: baseline;}
|
||||||
|
#fregisterform .consent-date { margin: 5px 0 0 20px !important; }
|
||||||
|
#fregisterform .consent-group .sub-consents {padding: 10px 20px 0;}
|
||||||
|
#fregisterform .js-open-consent {flex:1 0 auto; margin-left: 10px; text-align: right; font-size: 12px; color: #3f51b5; background: none; border: none; cursor: pointer; text-decoration: underline; }
|
||||||
|
|
||||||
/* 회원가입 완료 */
|
/* 회원가입 완료 */
|
||||||
#reg_result {padding:20px 10px 10px}
|
#reg_result {padding:20px 10px 10px}
|
||||||
@ -135,8 +140,9 @@
|
|||||||
#flogin {background:#fff;margin:20px 0}
|
#flogin {background:#fff;margin:20px 0}
|
||||||
|
|
||||||
#mb_login_notmb {background:#fff;border-bottom:1px solid #ccc;padding:20px}
|
#mb_login_notmb {background:#fff;border-bottom:1px solid #ccc;padding:20px}
|
||||||
|
#mb_login_notmb .chk_box input[type="checkbox"] + label{padding-left:20px}
|
||||||
#mb_login_notmb h2 {font-size:1.25em;padding:10px;background:#f3f3f3}
|
#mb_login_notmb h2 {font-size:1.25em;padding:10px;background:#f3f3f3}
|
||||||
#mb_login_notmb p {border:0;padding:0;margin:10px;color:#}
|
#mb_login_notmb p {border:0;padding:0;margin:10px;}
|
||||||
#guest_privacy {border:1px solid #ccc;text-align:left;line-height:1.6em;color:#666;background:#fafafa;padding:10px;height:200px;margin:10px 0;overflow-y:auto}
|
#guest_privacy {border:1px solid #ccc;text-align:left;line-height:1.6em;color:#666;background:#fafafa;padding:10px;height:200px;margin:10px 0;overflow-y:auto}
|
||||||
#mb_login_notmb .btn_submit {width:100%;display:block;height:40px;line-height:40px}
|
#mb_login_notmb .btn_submit {width:100%;display:block;height:40px;line-height:40px}
|
||||||
|
|
||||||
@ -154,7 +160,6 @@
|
|||||||
#mb_login #sns_login .sns-icon:nth-child(odd) {margin-right:2%}
|
#mb_login #sns_login .sns-icon:nth-child(odd) {margin-right:2%}
|
||||||
#mb_login #sns_login .txt {font-size:0.95em;padding-left:5px !important;border-left:0 !important}
|
#mb_login #sns_login .txt {font-size:0.95em;padding-left:5px !important;border-left:0 !important}
|
||||||
|
|
||||||
|
|
||||||
/* 쪽지 */
|
/* 쪽지 */
|
||||||
.memo_list {border-top:1px solid #ececec;}
|
.memo_list {border-top:1px solid #ececec;}
|
||||||
.memo_list li {border-bottom:1px solid #ececec;background:#fff;padding:10px 15px;list-style:none;position:relative}
|
.memo_list li {border-bottom:1px solid #ececec;background:#fff;padding:10px 15px;list-style:none;position:relative}
|
||||||
@ -198,7 +203,7 @@
|
|||||||
.memo_from li.memo_view_date {display:block;color:#555;line-height:24px}
|
.memo_from li.memo_view_date {display:block;color:#555;line-height:24px}
|
||||||
.memo_from li.memo_op_btn {position:absolute}
|
.memo_from li.memo_op_btn {position:absolute}
|
||||||
.memo_from li.list_btn {right:53px;}
|
.memo_from li.list_btn {right:53px;}
|
||||||
.memo_from li.del_btn {right:15px;padding}
|
.memo_from li.del_btn {right:15px;}
|
||||||
.memo_from:after {display:block;visibility:hidden;clear:both;content:""}
|
.memo_from:after {display:block;visibility:hidden;clear:both;content:""}
|
||||||
|
|
||||||
.memo_btn {width:100%}
|
.memo_btn {width:100%}
|
||||||
@ -292,7 +297,6 @@
|
|||||||
.chk_box input[type="radio"]:checked + label span {border-color:#3a8afd}
|
.chk_box input[type="radio"]:checked + label span {border-color:#3a8afd}
|
||||||
.chk_box input[type="radio"]:checked + label span:before {width:7px;height:7px;background:#3a8afd;content:'';position:absolute;top:3px;left:3px;border-radius:50%}
|
.chk_box input[type="radio"]:checked + label span:before {width:7px;height:7px;background:#3a8afd;content:'';position:absolute;top:3px;left:3px;border-radius:50%}
|
||||||
|
|
||||||
|
|
||||||
/* 자기소개 */
|
/* 자기소개 */
|
||||||
#profile section {margin:10px}
|
#profile section {margin:10px}
|
||||||
#profile h2 {margin:0}
|
#profile h2 {margin:0}
|
||||||
|
|||||||
85
mobile/skin/social/consent_modal.inc.php
Normal file
85
mobile/skin/social/consent_modal.inc.php
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
<!-- HTML -->
|
||||||
|
<?php if (!defined('_GNUBOARD_')) exit; ?>
|
||||||
|
<dialog id="consentDialog" aria-labelledby="consentDialogTitle" aria-describedby="consentDialogBody">
|
||||||
|
<form method="dialog" class="cd-card">
|
||||||
|
<header class="cd-head">
|
||||||
|
<h3 id="consentDialogTitle" class="cd-title">안내</h3>
|
||||||
|
</header>
|
||||||
|
<div id="consentDialogBody" class="cd-body"></div>
|
||||||
|
<footer class="cd-actions">
|
||||||
|
<button type="button" class="cd-agree">동의합니다</button>
|
||||||
|
<button value="close" class="cd-close">닫기</button>
|
||||||
|
</footer>
|
||||||
|
</form>
|
||||||
|
</dialog>
|
||||||
|
|
||||||
|
<!-- 스타일 -->
|
||||||
|
<style>
|
||||||
|
#consentDialog { padding:0; border:none; border-radius:12px; }
|
||||||
|
#consentDialog::backdrop { background: rgba(0,0,0,.45); backdrop-filter: blur(5px);}
|
||||||
|
.cd-card { max-width: 560px; background:#fff; border-radius:12px; }
|
||||||
|
.cd-head { display:flex; align-items:center; justify-content:space-between; padding:16px; }
|
||||||
|
.cd-title { margin:0; font-size:18px; font-weight:bold; word-break:keep-all; }
|
||||||
|
.cd-body { max-height:500px; overflow-y:auto; padding:16px; border-top:1px solid #e6e6e9; border-bottom:1px solid #e6e6e9; line-height:1.6; font-size:14px; color:#222; }
|
||||||
|
.cd-actions { display:flex; gap:8px; justify-content:flex-end; padding:12px 16px 16px; }
|
||||||
|
.cd-actions .cd-agree { padding:8px 14px; border:1px solid #3a8afd; background:#3a8afd; color:#fff; border-radius:8px; }
|
||||||
|
.cd-actions .cd-close { padding:8px 14px; border:1px solid #ccc; background:#fff; color:#111; border-radius:8px; }
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<!-- JS -->
|
||||||
|
<script>
|
||||||
|
(function(){
|
||||||
|
const dlg = document.getElementById('consentDialog');
|
||||||
|
if (!dlg) return;
|
||||||
|
|
||||||
|
const body = document.getElementById('consentDialogBody');
|
||||||
|
const titleE = document.getElementById('consentDialogTitle');
|
||||||
|
let opener = null;
|
||||||
|
|
||||||
|
const openFrom = (btn) => {
|
||||||
|
opener = btn;
|
||||||
|
const tplSel = btn.getAttribute('data-template');
|
||||||
|
const title = btn.getAttribute('data-title') || '안내';
|
||||||
|
const tpl = tplSel ? document.querySelector(tplSel) : null;
|
||||||
|
|
||||||
|
titleE.textContent = title;
|
||||||
|
body.innerHTML = tpl ? tpl.innerHTML : '';
|
||||||
|
|
||||||
|
dlg.dataset.check = btn.getAttribute('data-check') || '';
|
||||||
|
dlg.dataset.checkGroup = btn.getAttribute('data-check-group') || '';
|
||||||
|
|
||||||
|
if (dlg.showModal) dlg.showModal(); else dlg.setAttribute('open','');
|
||||||
|
};
|
||||||
|
|
||||||
|
const closeDialog = () => {
|
||||||
|
if (dlg.close) dlg.close(); else dlg.removeAttribute('open');
|
||||||
|
if (opener) opener.focus();
|
||||||
|
};
|
||||||
|
|
||||||
|
document.addEventListener('click', (e)=>{
|
||||||
|
const trigger = e.target.closest('.js-open-consent');
|
||||||
|
if (trigger) { openFrom(trigger); return; }
|
||||||
|
|
||||||
|
if (e.target.classList.contains('cd-agree')) {
|
||||||
|
const sel = dlg.dataset.check;
|
||||||
|
const groupSel = dlg.dataset.checkGroup;
|
||||||
|
|
||||||
|
if (groupSel) {
|
||||||
|
document.querySelectorAll(groupSel).forEach(cb => {
|
||||||
|
cb.checked = true;
|
||||||
|
cb.dispatchEvent(new Event('change', {bubbles:true}));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (sel) {
|
||||||
|
const cb = document.querySelector(sel);
|
||||||
|
if (cb) { cb.checked = true; cb.dispatchEvent(new Event('change', {bubbles:true})); }
|
||||||
|
}
|
||||||
|
closeDialog();
|
||||||
|
e.preventDefault();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
dlg.addEventListener('cancel', (e)=>{ e.preventDefault(); closeDialog(); });
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
@ -145,6 +145,108 @@ $email_msg = $is_exists_email ? '등록할 이메일이 중복되었습니다.
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 회원가입 약관 동의에 광고성 정보 수신 동의 표시 여부가 사용시에만 -->
|
||||||
|
<?php if($config['cf_use_promotion'] == 1) { ?>
|
||||||
|
<div class="form_01">
|
||||||
|
<h2>수신설정</h2>
|
||||||
|
<!-- 수신설정만 팝업 및 체크박스 관련 class 적용 -->
|
||||||
|
<ul>
|
||||||
|
<!-- (선택) 마케팅 목적의 개인정보 수집 및 이용 -->
|
||||||
|
<li class="chk_box">
|
||||||
|
<div class="consent-line">
|
||||||
|
<input type="checkbox" name="mb_marketing_agree" value="1" id="reg_mb_marketing_agree" aria-describedby="desc_marketing" <?php echo $member['mb_marketing_agree'] ? 'checked' : ''; ?> class="selec_chk marketing-sync">
|
||||||
|
<label for="reg_mb_marketing_agree"><span></span><b class="sound_only">(선택) 마케팅 목적의 개인정보 수집 및 이용</b></label>
|
||||||
|
<span class="chk_li">(선택) 마케팅 목적의 개인정보 수집 및 이용</span>
|
||||||
|
<button type="button" class="js-open-consent" data-title="마케팅 목적의 개인정보 수집 및 이용" data-template="#tpl_marketing" data-check="#reg_mb_marketing_agree" aria-controls="consentDialog">자세히보기</button>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="mb_marketing_agree_default" value="<?php echo $member['mb_marketing_agree'] ?>">
|
||||||
|
<div id="desc_marketing" class="sound_only">마케팅 목적의 개인정보 수집·이용에 대한 안내입니다. 자세히보기를 눌러 전문을 확인할 수 있습니다.</div>
|
||||||
|
<?php if ($member['mb_marketing_agree'] == 1 && $member['mb_marketing_date'] != "0000-00-00 00:00:00") echo "<br>(동의일자: ".$member['mb_marketing_date'].")"; ?>
|
||||||
|
|
||||||
|
<template id="tpl_marketing">
|
||||||
|
* 목적: 서비스 마케팅 및 프로모션<br>
|
||||||
|
* 항목: 이름, 이메일<?php echo ($config['cf_use_hp'] || ($config["cf_cert_use"] && ($config['cf_cert_hp'] || $config['cf_cert_simple']))) ? ", 휴대폰 번호" : "";?><br>
|
||||||
|
* 보유기간: 회원 탈퇴 시까지<br>
|
||||||
|
동의를 거부하셔도 서비스 기본 이용은 가능하나, 맞춤형 혜택 제공은 제한될 수 있습니다.
|
||||||
|
</template>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<!-- (선택) 광고성 정보 수신 동의 (상위) -->
|
||||||
|
<li class="chk_box consent-group">
|
||||||
|
<div class="consent-line">
|
||||||
|
<input type="checkbox" name="mb_promotion_agree" value="1" id="reg_mb_promotion_agree" aria-describedby="desc_promotion" class="selec_chk marketing-sync parent-promo">
|
||||||
|
<label for="reg_mb_promotion_agree"><span></span><b class="sound_only">(선택) 광고성 정보 수신 동의</b></label>
|
||||||
|
<span class="chk_li">(선택) 광고성 정보 수신 동의</span>
|
||||||
|
<button type="button" class="js-open-consent" data-title="광고성 정보 수신 동의" data-template="#tpl_promotion" data-check="#reg_mb_promotion_agree" data-check-group=".child-promo" aria-controls="consentDialog">자세히보기</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="desc_promotion" class="sound_only">광고성 정보(이메일/SMS·카카오톡) 수신 동의의 상위 항목입니다. 자세히보기를 눌러 전문을 확인할 수 있습니다.</div>
|
||||||
|
|
||||||
|
<!-- 하위 채널(이메일/SMS) -->
|
||||||
|
<ul class="sub-consents">
|
||||||
|
<li class="chk_box is-inline">
|
||||||
|
<input type="checkbox" name="mb_mailling" value="1" id="reg_mb_mailling" <?php echo $member['mb_mailling'] ? 'checked' : ''; ?> class="selec_chk child-promo">
|
||||||
|
<label for="reg_mb_mailling"><span></span><b class="sound_only">광고성 이메일 수신 동의</b></label>
|
||||||
|
<span class="chk_li">광고성 이메일 수신 동의</span>
|
||||||
|
<input type="hidden" name="mb_mailling_default" value="<?php echo $member['mb_mailling']; ?>">
|
||||||
|
<?php if ($w == 'u' && $member['mb_mailling'] == 1 && $member['mb_mailling_date'] != "0000-00-00 00:00:00") echo "<br>(동의일자: ".$member['mb_mailling_date'].")"; ?>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<!-- 휴대폰번호 입력 보이기 or 필수입력일 경우에만 -->
|
||||||
|
<?php if ($config['cf_use_hp'] || $config['cf_req_hp']) { ?>
|
||||||
|
<li class="chk_box is-inline">
|
||||||
|
<input type="checkbox" name="mb_sms" value="1" id="reg_mb_sms" <?php echo $member['mb_sms'] ? 'checked' : ''; ?> class="selec_chk child-promo">
|
||||||
|
<label for="reg_mb_sms"><span></span><b class="sound_only">광고성 SMS/카카오톡 수신 동의</b></label>
|
||||||
|
<span class="chk_li">광고성 SMS/카카오톡 수신 동의</span>
|
||||||
|
<input type="hidden" name="mb_sms_default" value="<?php echo $member['mb_sms']; ?>">
|
||||||
|
<?php if ($w == 'u' && $member['mb_sms'] == 1 && $member['mb_sms_date'] != "0000-00-00 00:00:00") echo "<br>(동의일자: ".$member['mb_sms_date'].")"; ?>
|
||||||
|
</li>
|
||||||
|
<?php } ?>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<template id="tpl_promotion">
|
||||||
|
수집·이용에 동의한 개인정보를 이용하여 이메일/SMS/카카오톡 등으로 오전 8시~오후 9시에 광고성 정보를 전송할 수 있습니다.<br>
|
||||||
|
동의는 언제든지 마이페이지에서 철회할 수 있습니다.
|
||||||
|
</template>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<!-- (선택) 개인정보 제3자 제공 동의 -->
|
||||||
|
<!-- SMS 사용시에만 -->
|
||||||
|
<?php
|
||||||
|
$configKeys = ['cf_sms_use'];
|
||||||
|
$companies = ['icode' => '아이코드'];
|
||||||
|
|
||||||
|
$usedCompanies = [];
|
||||||
|
foreach ($configKeys as $key) {
|
||||||
|
if (!empty($config[$key]) && isset($companies[$config[$key]])) {
|
||||||
|
$usedCompanies[] = $companies[$config[$key]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php if (!empty($usedCompanies)) { ?>
|
||||||
|
<li class="chk_box">
|
||||||
|
<div class="consent-line">
|
||||||
|
<input type="checkbox" name="mb_thirdparty_agree" value="1" id="reg_mb_thirdparty_agree" aria-describedby="desc_thirdparty" <?php echo $member['mb_thirdparty_agree'] ? 'checked' : ''; ?> class="selec_chk marketing-sync">
|
||||||
|
<label for="reg_mb_thirdparty_agree"><span></span><b class="sound_only">(선택) 개인정보 제3자 제공 동의</b></label>
|
||||||
|
<span class="chk_li">(선택) 개인정보 제3자 제공 동의</span>
|
||||||
|
<button type="button" class="js-open-consent" data-title="개인정보 제3자 제공 동의" data-template="#tpl_thirdparty" data-check="#reg_mb_thirdparty_agree" aria-controls="consentDialog">자세히보기</button>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="mb_thirdparty_agree_default" value="<?php echo $member['mb_thirdparty_agree'] ?>">
|
||||||
|
<div id="desc_thirdparty" class="sound_only">개인정보 제3자 제공 동의에 대한 안내입니다. 자세히보기를 눌러 전문을 확인할 수 있습니다.</div>
|
||||||
|
<?php if ($member['mb_thirdparty_agree'] == 1 && $member['mb_thirdparty_date'] != "0000-00-00 00:00:00") echo "<br>(동의일자: ".$member['mb_thirdparty_date'].")"; ?>
|
||||||
|
|
||||||
|
<template id="tpl_thirdparty">
|
||||||
|
* 목적: 상품/서비스, 사은/판촉행사, 이벤트 등의 마케팅 안내(카카오톡 등)<br>
|
||||||
|
* 항목: 이름, 휴대폰 번호<br>
|
||||||
|
* 제공받는 자: <?php echo implode(', ', $usedCompanies);?><br>
|
||||||
|
* 보유기간: 제공 목적 서비스 기간 또는 동의 철회 시까지
|
||||||
|
</template>
|
||||||
|
</li>
|
||||||
|
<?php } ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<div class="btn_confirm">
|
<div class="btn_confirm">
|
||||||
<a href="<?php echo G5_URL ?>" class="btn_cancel">취소</a>
|
<a href="<?php echo G5_URL ?>" class="btn_cancel">취소</a>
|
||||||
<button type="submit" id="btn_submit" class="btn_submit" accesskey="s"><?php echo $w == '' ? '회원가입' : '정보수정'; ?></button>
|
<button type="submit" id="btn_submit" class="btn_submit" accesskey="s"><?php echo $w == '' ? '회원가입' : '정보수정'; ?></button>
|
||||||
@ -196,6 +298,8 @@ $email_msg = $is_exists_email ? '등록할 이메일이 중복되었습니다.
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php include_once(__DIR__ . '/consent_modal.inc.php'); ?>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
// 모두선택
|
// 모두선택
|
||||||
@ -335,6 +439,30 @@ $email_msg = $is_exists_email ? '등록할 이메일이 중복되었습니다.
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
const parentPromo = document.getElementById('reg_mb_promotion_agree');
|
||||||
|
const childPromo = Array.from(document.querySelectorAll('.child-promo'));
|
||||||
|
if (!parentPromo || childPromo.length === 0) return;
|
||||||
|
|
||||||
|
const syncParentFromChildren = () => {
|
||||||
|
const anyChecked = childPromo.some(cb => cb.checked);
|
||||||
|
parentPromo.checked = anyChecked; // 하나라도 체크되면 부모 체크
|
||||||
|
};
|
||||||
|
|
||||||
|
const syncChildrenFromParent = () => {
|
||||||
|
const isChecked = parentPromo.checked;
|
||||||
|
childPromo.forEach(cb => {
|
||||||
|
cb.checked = isChecked;
|
||||||
|
cb.dispatchEvent(new Event('change', { bubbles: true }));
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
syncParentFromChildren();
|
||||||
|
|
||||||
|
parentPromo.addEventListener('change', syncChildrenFromParent);
|
||||||
|
childPromo.forEach(cb => cb.addEventListener('change', syncParentFromChildren));
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- } 회원정보 입력/수정 끝 -->
|
<!-- } 회원정보 입력/수정 끝 -->
|
||||||
@ -130,6 +130,9 @@
|
|||||||
#fregisterform .rgs_name_li button {margin:5px 0 0;width:auto}
|
#fregisterform .rgs_name_li button {margin:5px 0 0;width:auto}
|
||||||
#fregisterform .reg_mb_img_file {margin-bottom:30px}
|
#fregisterform .reg_mb_img_file {margin-bottom:30px}
|
||||||
#fregisterform .reg_mb_img_file img {max-width:100%;height:auto}
|
#fregisterform .reg_mb_img_file img {max-width:100%;height:auto}
|
||||||
|
#fregisterform .consent-line {display: flex; align-items: baseline;}
|
||||||
|
#fregisterform .consent-group .sub-consents {padding: 10px 20px 0;}
|
||||||
|
#fregisterform .js-open-consent {flex:1 0 auto; margin-left: 10px; text-align: right; font-size: 12px; color: #3f51b5; background: none; border: none; cursor: pointer; text-decoration: underline; }
|
||||||
|
|
||||||
.filebox .fileName {display:inline-block;position:relative;width:100%;height:45px;padding-left:10px;margin-right:5px;line-height:30px;border: 1px solid #d0d3db;background-color:#fff;color:red;vertical-align:middle}
|
.filebox .fileName {display:inline-block;position:relative;width:100%;height:45px;padding-left:10px;margin-right:5px;line-height:30px;border: 1px solid #d0d3db;background-color:#fff;color:red;vertical-align:middle}
|
||||||
.filebox .btn_file {display:inline-block;position:absolute;right:8px;top:8px;border:1px solid #3a8afd;border-radius:3px;width:70px;height:30px;color:#3a8afd;font-size:1em;line-height:30px;font-weight:bold;text-align:center;vertical-align:middle}
|
.filebox .btn_file {display:inline-block;position:absolute;right:8px;top:8px;border:1px solid #3a8afd;border-radius:3px;width:70px;height:30px;color:#3a8afd;font-size:1em;line-height:30px;font-weight:bold;text-align:center;vertical-align:middle}
|
||||||
|
|||||||
@ -78,3 +78,32 @@ if( !class_exists('HTMLPurifier_Filter_Iframevideo') ){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( !class_exists('HTMLPurifierContinueParamFilter') ){
|
||||||
|
class HTMLPurifierContinueParamFilter extends HTMLPurifier_URIFilter
|
||||||
|
{
|
||||||
|
public $name = 'ContinueParamFilter';
|
||||||
|
|
||||||
|
public function filter(&$uri, $config, $context)
|
||||||
|
{
|
||||||
|
// 쿼리 파라미터 검사
|
||||||
|
$query = $uri->query;
|
||||||
|
$path = $uri->path;
|
||||||
|
|
||||||
|
if ($path && preg_match('#[\\\\/]logout#i', $path)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($query) {
|
||||||
|
|
||||||
|
parse_str($query, $query_params);
|
||||||
|
|
||||||
|
if (isset($query_params['continue']) || isset($query_params['pcurl'])) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true; // 조건 통과 시 허용
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -278,6 +278,8 @@ function captcha_html($class="captcha")
|
|||||||
$html .= "\n".'#captcha.m_captcha {border:1px solid #ddd; width: 100%; padding: 10px; box-sizing: border-box; border-radius: 6px; text-align:center}';
|
$html .= "\n".'#captcha.m_captcha {border:1px solid #ddd; width: 100%; padding: 10px; box-sizing: border-box; border-radius: 6px; text-align:center}';
|
||||||
$html .= "\n".'</style>';
|
$html .= "\n".'</style>';
|
||||||
return $html;
|
return $html;
|
||||||
|
|
||||||
|
return run_replace('kcaptcha_captcha_html', $html, $class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -97,6 +97,44 @@ if( defined('G5_SOCIAL_CERTIFY_MAIL') && G5_SOCIAL_CERTIFY_MAIL && $config['cf_u
|
|||||||
$mb_mailling = (isset($_POST['mb_mailling']) && $_POST['mb_mailling']) ? 1 : 0;
|
$mb_mailling = (isset($_POST['mb_mailling']) && $_POST['mb_mailling']) ? 1 : 0;
|
||||||
//회원 정보 공개
|
//회원 정보 공개
|
||||||
$mb_open = (isset($_POST['mb_open']) && $_POST['mb_open']) ? 1 : 0;
|
$mb_open = (isset($_POST['mb_open']) && $_POST['mb_open']) ? 1 : 0;
|
||||||
|
//회원 SMS 동의
|
||||||
|
$mb_sms = isset($_POST['mb_sms']) ? trim($_POST['mb_sms']) : "0";
|
||||||
|
//마케팅 목적의 개인정보 수집 및 이용 동의
|
||||||
|
$mb_marketing_agree = isset($_POST['mb_marketing_agree']) ? trim($_POST['mb_marketing_agree']) : "0";
|
||||||
|
//개인정보 제3자 제공 동의
|
||||||
|
$mb_thirdparty_agree = isset($_POST['mb_thirdparty_agree']) ? trim($_POST['mb_thirdparty_agree']) : "0";
|
||||||
|
|
||||||
|
$agree_items = [];
|
||||||
|
$sql_agree = "";
|
||||||
|
// 마케팅 목적의 개인정보 수집 및 이용
|
||||||
|
if ($mb_marketing_agree == 1) {
|
||||||
|
$sql_agree .= " , mb_marketing_date = '".G5_TIME_YMDHIS."' ";
|
||||||
|
$agree_items[] = "마케팅 목적의 개인정보 수집 및 이용(동의)";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 광고성 이메일 수신
|
||||||
|
if ($mb_mailling == 1) {
|
||||||
|
$sql_agree .= " , mb_mailling_date = '".G5_TIME_YMDHIS."' ";
|
||||||
|
$agree_items[] = "광고성 이메일 수신(동의)";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 광고성 SMS/카카오톡 수신
|
||||||
|
if ($mb_sms == 1) {
|
||||||
|
$sql_agree .= " , mb_sms_date = '".G5_TIME_YMDHIS."' ";
|
||||||
|
$agree_items[] = "광고성 SMS/카카오톡 수신(동의)";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 개인정보 제3자 제공
|
||||||
|
if ($mb_thirdparty_agree == 1) {
|
||||||
|
$sql_agree .= " , mb_thirdparty_date = '".G5_TIME_YMDHIS."' ";
|
||||||
|
$agree_items[] = "개인정보 제3자 제공(동의)";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 동의 로그 추가
|
||||||
|
if (!empty($agree_items)) {
|
||||||
|
$agree_log = "[".G5_TIME_YMDHIS.", ". $provider_name ." 회원가입] " . implode(' | ', $agree_items) . "\n";
|
||||||
|
$sql_agree .= " , mb_agree_log = CONCAT('{$agree_log}', IFNULL(mb_agree_log, ''))";
|
||||||
|
}
|
||||||
|
|
||||||
//===============================================================
|
//===============================================================
|
||||||
// 본인확인
|
// 본인확인
|
||||||
@ -164,9 +202,12 @@ $sql = " insert into {$g5['member_table']}
|
|||||||
mb_level = '{$config['cf_register_level']}',
|
mb_level = '{$config['cf_register_level']}',
|
||||||
mb_login_ip = '{$_SERVER['REMOTE_ADDR']}',
|
mb_login_ip = '{$_SERVER['REMOTE_ADDR']}',
|
||||||
mb_mailling = '{$mb_mailling}',
|
mb_mailling = '{$mb_mailling}',
|
||||||
mb_sms = '0',
|
mb_sms = '{$mb_sms}',
|
||||||
mb_open = '{$mb_open}',
|
mb_open = '{$mb_open}',
|
||||||
mb_open_date = '".G5_TIME_YMD."'
|
mb_open_date = '".G5_TIME_YMD."',
|
||||||
|
mb_marketing_agree = '{$mb_marketing_agree}',
|
||||||
|
mb_thirdparty_agree = '{$mb_thirdparty_agree}'
|
||||||
|
{$sql_agree}
|
||||||
{$sql_certify} ";
|
{$sql_certify} ";
|
||||||
$result = sql_query($sql, false);
|
$result = sql_query($sql, false);
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@ $md_banner_bg = isset($rb_skin['md_banner_bg']) ? $rb_skin['md_banner_bg'] : '';
|
|||||||
.swiper-button-next-wide {right:auto; left: 50px !important; opacity: 1 !important; top:7px !important}
|
.swiper-button-next-wide {right:auto; left: 50px !important; opacity: 1 !important; top:7px !important}
|
||||||
.swiper-button-prev-wide {left:-10px; top:7px !important}
|
.swiper-button-prev-wide {left:-10px; top:7px !important}
|
||||||
.sl_bn_inner {min-height: 800px; background-repeat: no-repeat; background-position: center center; background-size: cover; position: relative;}
|
.sl_bn_inner {min-height: 800px; background-repeat: no-repeat; background-position: center center; background-size: cover; position: relative;}
|
||||||
.sl_overlay {position: absolute;top: 0; left: 0;width: 100%; height: 100%;background: rgba(0, 0, 0, 0.1); z-index: 1;}
|
.sl_overlay {position: absolute;top: 0; left: 0;width: 100%; height: 100%; /*background: rgba(0, 0, 0, 0.1); */z-index: 1;}
|
||||||
.sl_content {position: absolute; bottom:0px; left: 0px; z-index: 2; color:#fff; left: 50%; transform: translateX(-50%); padding-bottom: 100px;}
|
.sl_content {position: absolute; bottom:0px; left: 0px; z-index: 2; color:#fff; left: 50%; transform: translateX(-50%); padding-bottom: 100px;}
|
||||||
.swiper-pagination-wide-page {text-align: center; width: 70px !important; float:left; font-size: 12px;}
|
.swiper-pagination-wide-page {text-align: center; width: 70px !important; float:left; font-size: 12px;}
|
||||||
.sl_arrows {margin-bottom: 100px;}
|
.sl_arrows {margin-bottom: 100px;}
|
||||||
@ -21,9 +21,9 @@ $md_banner_bg = isset($rb_skin['md_banner_bg']) ? $rb_skin['md_banner_bg'] : '';
|
|||||||
.sl_alt1 {font-size: 60px; line-height: 140%; color:#fff; text-shadow: 0px 0px 20px rgba(0,0,0,0.5);}
|
.sl_alt1 {font-size: 60px; line-height: 140%; color:#fff; text-shadow: 0px 0px 20px rgba(0,0,0,0.5);}
|
||||||
.sl_alt2 {font-size: 22px; line-height: 100%; color:#fff; text-shadow: 0px 0px 10px rgba(0,0,0,0.7);}
|
.sl_alt2 {font-size: 22px; line-height: 100%; color:#fff; text-shadow: 0px 0px 10px rgba(0,0,0,0.7);}
|
||||||
.sl_a_links {font-size: 20px; padding: 15px 30px; border-radius: 10px; background-color: #FAE100; color:#483729; line-height: 100%; margin-top: 40px; float:left;}
|
.sl_a_links {font-size: 20px; padding: 15px 30px; border-radius: 10px; background-color: #FAE100; color:#483729; line-height: 100%; margin-top: 40px; float:left;}
|
||||||
.ico_j {float:right; margin-top: -80px; filter: drop-shadow(0px 0px 5px black);}
|
.ico_j {float:right; margin-top: -80px; filter: drop-shadow(0px 0px 5px rgba(0,0,0,0.4));}
|
||||||
.ico_j img {height:90px; width: 90px;}
|
.ico_j img {height:90px; width: 90px;}
|
||||||
.ico_j_ul1 {float: left; font-size: 20px; font-weight: 900; margin-top: 17px; text-shadow: 0px 0px 20px rgba(0,0,0,0.5);}
|
.ico_j_ul1 {float: left; font-size: 20px; font-weight: 900; margin-top: 17px; /*text-shadow: 0px 0px 20px rgba(0,0,0,0.5);*/}
|
||||||
.ico_j_ul1 span {font-size: 40px;}
|
.ico_j_ul1 span {font-size: 40px;}
|
||||||
.ico_j_ul2 {float:right; padding-left: 10px;}
|
.ico_j_ul2 {float:right; padding-left: 10px;}
|
||||||
.image_roll {object-fit: cover; height:800px !important; width: 100%; position: absolute; top:0px; left: 0px;}
|
.image_roll {object-fit: cover; height:800px !important; width: 100%; position: absolute; top:0px; left: 0px;}
|
||||||
|
|||||||
@ -28,6 +28,14 @@ jQuery(function($){
|
|||||||
|
|
||||||
if( nhnkcp_settle_case == "naverpay" ){
|
if( nhnkcp_settle_case == "naverpay" ){
|
||||||
if(typeof nhnkcp_pay_form.naverpay_direct !== "undefined") nhnkcp_pay_form.naverpay_direct.value = "Y";
|
if(typeof nhnkcp_pay_form.naverpay_direct !== "undefined") nhnkcp_pay_form.naverpay_direct.value = "Y";
|
||||||
|
|
||||||
|
var is_money = jQuery("input[name='od_settle_case']:checked" ).attr("data-money");
|
||||||
|
|
||||||
|
if (is_money) { // 머니/포인트 결제
|
||||||
|
jQuery(nhnkcp_pay_form).find("input[name='naverpay_point_direct']").val("Y");
|
||||||
|
} else { // 카드 결제
|
||||||
|
jQuery(nhnkcp_pay_form).find("input[name='naverpay_point_direct']").val("");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nhnkcp_pay_form.pay_method.value = "100000000000";
|
nhnkcp_pay_form.pay_method.value = "100000000000";
|
||||||
|
|||||||
@ -293,11 +293,14 @@ if ( $req_tx == "pay" )
|
|||||||
|
|
||||||
$kcp_pay_method = $c_PayPlus->mf_get_res_data( "pay_method" ); // 카카오페이 결제수단
|
$kcp_pay_method = $c_PayPlus->mf_get_res_data( "pay_method" ); // 카카오페이 결제수단
|
||||||
// 카드 코드는 PACA, 카카오머니 코드는 PAKM
|
// 카드 코드는 PACA, 카카오머니 코드는 PAKM
|
||||||
|
// https://developer.kcp.co.kr/page/document/directpay
|
||||||
|
|
||||||
if( $kcp_pay_method == "PAKM" ){ // 카카오머니
|
if( $kcp_pay_method == "PAKM" ){ // 카카오머니
|
||||||
$card_mny = $kakaomny_mny = $c_PayPlus->mf_get_res_data( "kakaomny_mny" );
|
$card_mny = $kakaomny_mny = $c_PayPlus->mf_get_res_data( "kakaomny_mny" );
|
||||||
$app_time = $app_kakaomny_time = $c_PayPlus->mf_get_res_data( "app_kakaomny_time" );
|
$app_time = $app_kakaomny_time = $c_PayPlus->mf_get_res_data( "app_kakaomny_time" );
|
||||||
$od_other_pay_type = 'NHNKCP_KAKAOMONEY';
|
$od_other_pay_type = 'NHNKCP_KAKAOMONEY';
|
||||||
|
} else if( $kcp_pay_method == "PANP" ){ // 네이버페이머니
|
||||||
|
$od_other_pay_type = 'NHNKCP_NAVERMONEY';
|
||||||
}
|
}
|
||||||
|
|
||||||
/* = -------------------------------------------------------------- = */
|
/* = -------------------------------------------------------------- = */
|
||||||
|
|||||||
@ -84,6 +84,9 @@ if($is_kakaopay_use) {
|
|||||||
$comm_free_mny = 0; // 면세금액
|
$comm_free_mny = 0; // 면세금액
|
||||||
$tot_tax_mny = 0;
|
$tot_tax_mny = 0;
|
||||||
|
|
||||||
|
// 토스페이먼츠 escrowProducts 배열 생성
|
||||||
|
$escrow_products = array();
|
||||||
|
|
||||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -152,6 +155,15 @@ if($is_kakaopay_use) {
|
|||||||
$point = $sum['point'];
|
$point = $sum['point'];
|
||||||
$sell_price = $sum['price'];
|
$sell_price = $sum['price'];
|
||||||
|
|
||||||
|
// 토스페이먼츠 escrowProducts 배열에 상품 정보 추가
|
||||||
|
$escrow_products[] = array(
|
||||||
|
'id' => $row['ct_id'],
|
||||||
|
'name' => $row['it_name'],
|
||||||
|
'code' => $row['it_id'],
|
||||||
|
'unitPrice' => (int) $row['ct_price'],
|
||||||
|
'quantity' => (int) $row['ct_qty']
|
||||||
|
);
|
||||||
|
|
||||||
// 쿠폰
|
// 쿠폰
|
||||||
$cp_button = '';
|
$cp_button = '';
|
||||||
if($is_member) {
|
if($is_member) {
|
||||||
@ -669,7 +681,8 @@ if($is_kakaopay_use) {
|
|||||||
// 계좌이체 사용
|
// 계좌이체 사용
|
||||||
if ($default['de_iche_use']) {
|
if ($default['de_iche_use']) {
|
||||||
$multi_settle++;
|
$multi_settle++;
|
||||||
echo '<input type="radio" id="od_settle_iche" name="od_settle_case" value="계좌이체" '.$checked.'> <label for="od_settle_iche" class="lb_icon iche_icon">'.$escrow_title.'계좌이체</label>'.PHP_EOL;
|
// 토스페이먼츠 v2 - 퀵계좌이체 명칭 사용
|
||||||
|
echo '<input type="radio" id="od_settle_iche" name="od_settle_case" value="계좌이체" '.$checked.'> <label for="od_settle_iche" class="lb_icon iche_icon">'.$escrow_title. ($default['de_pg_service'] == 'toss' ? '퀵계좌이체' :'계좌이체') . '</label>'.PHP_EOL;
|
||||||
$checked = '';
|
$checked = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -713,7 +726,15 @@ if($is_kakaopay_use) {
|
|||||||
$easypay_prints['nhnkcp_payco'] = '<input type="radio" id="od_settle_nhnkcp_payco" name="od_settle_case" data-pay="payco" value="간편결제"> <label for="od_settle_nhnkcp_payco" class="PAYCO nhnkcp_payco lb_icon" title="NHN_KCP - PAYCO">PAYCO</label>';
|
$easypay_prints['nhnkcp_payco'] = '<input type="radio" id="od_settle_nhnkcp_payco" name="od_settle_case" data-pay="payco" value="간편결제"> <label for="od_settle_nhnkcp_payco" class="PAYCO nhnkcp_payco lb_icon" title="NHN_KCP - PAYCO">PAYCO</label>';
|
||||||
}
|
}
|
||||||
if( in_array('nhnkcp_naverpay', $de_easy_pay_service_array) ){
|
if( in_array('nhnkcp_naverpay', $de_easy_pay_service_array) ){
|
||||||
$easypay_prints['nhnkcp_naverpay'] = '<input type="radio" id="od_settle_nhnkcp_naverpay" name="od_settle_case" data-pay="naverpay" value="간편결제" > <label for="od_settle_nhnkcp_naverpay" class="naverpay_icon nhnkcp_naverpay lb_icon" title="NHN_KCP - 네이버페이">네이버페이</label>';
|
|
||||||
|
if(isset($default['de_easy_pay_services']) && in_array('used_nhnkcp_naverpay_point', explode(',', $default['de_easy_pay_services'])) ){
|
||||||
|
$easypay_prints['nhnkcp_naverpay_card'] = '<input type="radio" id="od_settle_nhnkcp_naverpay" name="od_settle_case" data-pay="naverpay" value="간편결제" > <label for="od_settle_nhnkcp_naverpay" class="naverpay_icon nhnkcp_naverpay lb_icon nhnkcp_icon nhnkcp_card" title="NHN_KCP - 네이버페이 카드결제">네이버페이 카드결제</label>';
|
||||||
|
|
||||||
|
$easypay_prints['nhnkcp_naverpay_money'] = '<input type="radio" id="od_settle_nhnkcp_naverpay_money" name="od_settle_case" data-pay="naverpay" data-money="1" value="간편결제" > <label for="od_settle_nhnkcp_naverpay_money" class="naverpay_icon nhnkcp_naverpay lb_icon nhnkcp_icon nhnkcp_money" title="NHN_KCP - 네이버페이 머니/포인트 결제">네이버페이 머니/포인트</label>';
|
||||||
|
} else {
|
||||||
|
$easypay_prints['nhnkcp_naverpay_card'] = '<input type="radio" id="od_settle_nhnkcp_naverpay" name="od_settle_case" data-pay="naverpay" value="간편결제" > <label for="od_settle_nhnkcp_naverpay" class="naverpay_icon nhnkcp_naverpay lb_icon" title="NHN_KCP - 네이버페이 카드결제">네이버페이 카드결제</label>';
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if( in_array('nhnkcp_kakaopay', $de_easy_pay_service_array) ){
|
if( in_array('nhnkcp_kakaopay', $de_easy_pay_service_array) ){
|
||||||
$easypay_prints['nhnkcp_kakaopay'] = '<input type="radio" id="od_settle_nhnkcp_kakaopay" name="od_settle_case" data-pay="kakaopay" value="간편결제" > <label for="od_settle_nhnkcp_kakaopay" class="kakaopay_icon nhnkcp_kakaopay lb_icon" title="NHN_KCP - 카카오페이">카카오페이</label>';
|
$easypay_prints['nhnkcp_kakaopay'] = '<input type="radio" id="od_settle_nhnkcp_kakaopay" name="od_settle_case" data-pay="kakaopay" value="간편결제" > <label for="od_settle_nhnkcp_kakaopay" class="kakaopay_icon nhnkcp_kakaopay lb_icon" title="NHN_KCP - 카카오페이">카카오페이</label>';
|
||||||
@ -748,8 +769,15 @@ if($is_kakaopay_use) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( ! isset($easypay_prints['nhnkcp_naverpay']) && function_exists('is_use_easypay') && is_use_easypay('global_nhnkcp') ){
|
if( ! isset($easypay_prints['nhnkcp_naverpay']) && function_exists('is_use_easypay') && is_use_easypay('global_nhnkcp') ){
|
||||||
|
|
||||||
|
if(isset($default['de_easy_pay_services']) && in_array('used_nhnkcp_naverpay_point', explode(',', $default['de_easy_pay_services'])) ){
|
||||||
|
$easypay_prints['nhnkcp_naverpay_card'] = '<input type="radio" id="od_settle_nhnkcp_naverpay" name="od_settle_case" data-pay="naverpay" value="간편결제" > <label for="od_settle_nhnkcp_naverpay" class="naverpay_icon nhnkcp_naverpay lb_icon nhnkcp_icon nhnkcp_card" title="NHN_KCP - 네이버페이 카드결제">네이버페이 카드결제</label>';
|
||||||
|
|
||||||
|
$easypay_prints['nhnkcp_naverpay_money'] = '<input type="radio" id="od_settle_nhnkcp_naverpay_money" name="od_settle_case" data-pay="naverpay" data-money="1" value="간편결제" > <label for="od_settle_nhnkcp_naverpay_money" class="naverpay_icon nhnkcp_naverpay lb_icon nhnkcp_icon nhnkcp_money" title="NHN_KCP - 네이버페이 머니/포인트 결제">네이버페이 머니/포인트</label>';
|
||||||
|
} else {
|
||||||
$easypay_prints['nhnkcp_naverpay'] = '<input type="radio" id="od_settle_nhnkcp_naverpay" name="od_settle_case" data-pay="naverpay" value="간편결제" > <label for="od_settle_nhnkcp_naverpay" class="naverpay_icon nhnkcp_naverpay lb_icon" title="NHN_KCP - 네이버페이">네이버페이</label>';
|
$easypay_prints['nhnkcp_naverpay'] = '<input type="radio" id="od_settle_nhnkcp_naverpay" name="od_settle_case" data-pay="naverpay" value="간편결제" > <label for="od_settle_nhnkcp_naverpay" class="naverpay_icon nhnkcp_naverpay lb_icon" title="NHN_KCP - 네이버페이">네이버페이</label>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if($easypay_prints) {
|
if($easypay_prints) {
|
||||||
$multi_settle++;
|
$multi_settle++;
|
||||||
@ -1123,7 +1151,7 @@ $(function() {
|
|||||||
$("#settle_bank").show();
|
$("#settle_bank").show();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#od_settle_iche,#od_settle_card,#od_settle_vbank,#od_settle_hp,#od_settle_easy_pay,#od_settle_kakaopay,#od_settle_nhnkcp_payco,#od_settle_nhnkcp_naverpay,#od_settle_nhnkcp_kakaopay,#od_settle_inicislpay,#od_settle_inicis_kakaopay").bind("click", function() {
|
$("#od_settle_iche,#od_settle_card,#od_settle_vbank,#od_settle_hp,#od_settle_easy_pay,#od_settle_kakaopay,#od_settle_nhnkcp_payco,#od_settle_nhnkcp_naverpay,#od_settle_nhnkcp_naverpay_money,#od_settle_nhnkcp_kakaopay,#od_settle_inicislpay,#od_settle_inicis_kakaopay").bind("click", function() {
|
||||||
$("#settle_bank").hide();
|
$("#settle_bank").hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1576,6 +1604,15 @@ function forderform_check(f)
|
|||||||
|
|
||||||
if(nhnkcp_easy_pay === "naverpay"){
|
if(nhnkcp_easy_pay === "naverpay"){
|
||||||
if(typeof f.naverpay_direct !== "undefined") f.naverpay_direct.value = "Y";
|
if(typeof f.naverpay_direct !== "undefined") f.naverpay_direct.value = "Y";
|
||||||
|
|
||||||
|
var is_money = jQuery("input[name='od_settle_case']:checked").attr("data-money");
|
||||||
|
|
||||||
|
if (is_money) { // 머니/포인트 결제
|
||||||
|
jQuery(f).find("input[name='naverpay_point_direct']").val("Y");
|
||||||
|
} else { // 카드 결제
|
||||||
|
jQuery(f).find("input[name='naverpay_point_direct']").val("");
|
||||||
|
}
|
||||||
|
|
||||||
} else if(nhnkcp_easy_pay === "kakaopay"){
|
} else if(nhnkcp_easy_pay === "kakaopay"){
|
||||||
if(typeof f.kakaopay_direct !== "undefined") f.kakaopay_direct.value = "Y";
|
if(typeof f.kakaopay_direct !== "undefined") f.kakaopay_direct.value = "Y";
|
||||||
} else {
|
} else {
|
||||||
@ -1628,6 +1665,28 @@ function forderform_check(f)
|
|||||||
f.LGD_CUSTOM_FIRSTPAY.value = "무통장";
|
f.LGD_CUSTOM_FIRSTPAY.value = "무통장";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
<?php } else if($default['de_pg_service'] == 'toss') { ?>
|
||||||
|
switch(settle_method)
|
||||||
|
{
|
||||||
|
case "계좌이체":
|
||||||
|
f.method.value = "TRANSFER";
|
||||||
|
break;
|
||||||
|
case "가상계좌":
|
||||||
|
f.method.value = "VIRTUAL_ACCOUNT";
|
||||||
|
break;
|
||||||
|
case "휴대폰":
|
||||||
|
f.method.value = "MOBILE_PHONE";
|
||||||
|
break;
|
||||||
|
case "신용카드":
|
||||||
|
f.method.value = "CARD";
|
||||||
|
break;
|
||||||
|
case "간편결제":
|
||||||
|
f.method.value = "CARD";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
f.method.value = "무통장";
|
||||||
|
break;
|
||||||
|
}
|
||||||
<?php } else if($default['de_pg_service'] == 'inicis') { ?>
|
<?php } else if($default['de_pg_service'] == 'inicis') { ?>
|
||||||
switch(settle_method)
|
switch(settle_method)
|
||||||
{
|
{
|
||||||
@ -1763,6 +1822,62 @@ function forderform_check(f)
|
|||||||
f.submit();
|
f.submit();
|
||||||
}
|
}
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
<?php if($default['de_pg_service'] == 'toss') { ?>
|
||||||
|
|
||||||
|
f.orderId.value = '<?=$od_id?>';
|
||||||
|
f.orderName.value = '<?=$goods?>';
|
||||||
|
|
||||||
|
f.customerName.value = f.od_name.value;
|
||||||
|
f.customerEmail.value = f.od_email.value;
|
||||||
|
f.customerMobilePhone.value = f.od_hp.value.replace(/[^0-9]/g, '');
|
||||||
|
if (f.customerMobilePhone.value == '') {
|
||||||
|
f.customerMobilePhone.value = f.od_tel.value.replace(/[^0-9]/g, '');
|
||||||
|
}
|
||||||
|
|
||||||
|
f.cardUseCardPoint.value = false;
|
||||||
|
f.cardUseAppCardOnly.value = false;
|
||||||
|
|
||||||
|
<?php if($default['de_escrow_use']) { ?>
|
||||||
|
f.cardUseEscrow.value = 'true';
|
||||||
|
f.escrowProducts.value = JSON.stringify(<?php echo json_encode($escrow_products, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); ?>);
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
if(settle_method == "간편결제") {
|
||||||
|
f.cardflowMode.value = 'DIRECT';
|
||||||
|
}
|
||||||
|
|
||||||
|
f.amountCurrency.value = 'KRW';
|
||||||
|
f.amountValue.value = f.good_mny.value;
|
||||||
|
<?php if($default['de_tax_flag_use']) { ?>
|
||||||
|
f.taxFreeAmount.value = f.comm_free_mny.value;
|
||||||
|
<?php } ?>
|
||||||
|
f.windowTarget.value = 'iframe';
|
||||||
|
|
||||||
|
if(f.method.value != "무통장") {
|
||||||
|
// 주문정보 임시저장
|
||||||
|
var order_data = $(f).serialize();
|
||||||
|
var save_result = "";
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
data: order_data,
|
||||||
|
url: g5_url+"/shop/ajax.orderdatasave.php",
|
||||||
|
cache: false,
|
||||||
|
async: false,
|
||||||
|
success: function(data) {
|
||||||
|
save_result = data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if(save_result) {
|
||||||
|
alert(save_result);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
launchCrossPlatform(f);
|
||||||
|
} else {
|
||||||
|
f.submit();
|
||||||
|
}
|
||||||
|
<?php } ?>
|
||||||
<?php if($default['de_pg_service'] == 'inicis') { ?>
|
<?php if($default['de_pg_service'] == 'inicis') { ?>
|
||||||
f.price.value = f.good_mny.value;
|
f.price.value = f.good_mny.value;
|
||||||
<?php if($default['de_tax_flag_use']) { ?>
|
<?php if($default['de_tax_flag_use']) { ?>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -64,6 +64,10 @@ if($od['od_tno']) {
|
|||||||
alert($msg);
|
alert($msg);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'toss':
|
||||||
|
$cancel_msg = '주문자 본인 취소-'.$cancel_memo;
|
||||||
|
include_once(G5_SHOP_PATH.'/toss/toss_cancel.php');
|
||||||
|
break;
|
||||||
case 'inicis':
|
case 'inicis':
|
||||||
include_once(G5_SHOP_PATH.'/settle_inicis.inc.php');
|
include_once(G5_SHOP_PATH.'/settle_inicis.inc.php');
|
||||||
$cancel_msg = '주문자 본인 취소-'.$cancel_memo;
|
$cancel_msg = '주문자 본인 취소-'.$cancel_memo;
|
||||||
|
|||||||
@ -334,6 +334,8 @@ if($od['od_pg'] == 'lg') {
|
|||||||
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
|
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
|
||||||
|
|
||||||
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
|
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
|
||||||
|
} else if($od['od_pg'] == 'toss') {
|
||||||
|
$hp_receipt_script = 'window.open(\'https://dashboard.tosspayments.com/receipt/phone?transactionId='.$od['od_tno'].'&ref=PX\',\'receipt\',\'width=430,height=700\');';
|
||||||
} else if($od['od_pg'] == 'inicis') {
|
} else if($od['od_pg'] == 'inicis') {
|
||||||
$hp_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
|
$hp_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
|
||||||
} else if($od['od_pg'] == 'nicepay') {
|
} else if($od['od_pg'] == 'nicepay') {
|
||||||
@ -355,6 +357,8 @@ if($od['od_pg'] == 'lg') {
|
|||||||
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
|
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
|
||||||
|
|
||||||
$card_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
|
$card_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
|
||||||
|
} else if($od['od_pg'] == 'toss') {
|
||||||
|
$card_receipt_script = 'window.open(\'https://dashboard.tosspayments.com/receipt/redirection?transactionId='.$od['od_tno'].'&ref=PX\',\'receipt\',\'width=430,height=700\');';
|
||||||
} else if($od['od_pg'] == 'inicis') {
|
} else if($od['od_pg'] == 'inicis') {
|
||||||
$card_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
|
$card_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
|
||||||
} else if($od['od_pg'] == 'nicepay') {
|
} else if($od['od_pg'] == 'nicepay') {
|
||||||
@ -429,6 +433,8 @@ if($od['od_pg'] == 'lg') {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$cash_receipt_script = 'javascript:showCashReceipts(\''.$LGD_MID.'\',\''.$od['od_id'].'\',\''.$od['od_casseqno'].'\',\''.$trade_type.'\',\''.$CST_PLATFORM.'\');';
|
$cash_receipt_script = 'javascript:showCashReceipts(\''.$LGD_MID.'\',\''.$od['od_id'].'\',\''.$od['od_casseqno'].'\',\''.$trade_type.'\',\''.$CST_PLATFORM.'\');';
|
||||||
|
} else if($od['od_pg'] == 'toss') {
|
||||||
|
$cash_receipt_script = 'window.open(\'https://dashboard.tosspayments.com/receipt/mids/si_'.$config['cf_lg_mid'].'/orders/'.$od['od_id'].'/cash-receipt?ref=dashboard\',\'receipt\',\'width=430,height=700\');';
|
||||||
} else if($od['od_pg'] == 'inicis') {
|
} else if($od['od_pg'] == 'inicis') {
|
||||||
$cash = unserialize($od['od_cash_info']);
|
$cash = unserialize($od['od_cash_info']);
|
||||||
$cash_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid='.$cash['TID'].'&clpaymethod=22\',\'showreceipt\',\'width=380,height=540,scrollbars=no,resizable=no\');';
|
$cash_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid='.$cash['TID'].'&clpaymethod=22\',\'showreceipt\',\'width=380,height=540,scrollbars=no,resizable=no\');';
|
||||||
|
|||||||
@ -62,8 +62,18 @@ require_once(G5_SHOP_PATH.'/'.$default['de_pg_service'].'/orderform.1.php');
|
|||||||
$checked = '';
|
$checked = '';
|
||||||
|
|
||||||
$escrow_title = "";
|
$escrow_title = "";
|
||||||
|
$escrow_products = array(); // 토스페이먼츠 escrowProducts 배열 생성
|
||||||
if ($default['de_escrow_use']) {
|
if ($default['de_escrow_use']) {
|
||||||
$escrow_title = "에스크로<br>";
|
$escrow_title = "에스크로<br>";
|
||||||
|
|
||||||
|
// 토스페이먼츠 escrowProducts 배열에 상품 정보 추가
|
||||||
|
$escrow_products[] = array(
|
||||||
|
'id' => $pp['pp_id'],
|
||||||
|
'name' => $pp['pp_name'].'님 개인결제',
|
||||||
|
'code' => $pp['pp_id'],
|
||||||
|
'unitPrice' => (int) $pp['pp_price'],
|
||||||
|
'quantity' => (int) 1
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_use']) {
|
if ($default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_use']) {
|
||||||
@ -89,7 +99,7 @@ require_once(G5_SHOP_PATH.'/'.$default['de_pg_service'].'/orderform.1.php');
|
|||||||
// 계좌이체 사용
|
// 계좌이체 사용
|
||||||
if ($default['de_iche_use']) {
|
if ($default['de_iche_use']) {
|
||||||
$multi_settle++;
|
$multi_settle++;
|
||||||
echo '<input type="radio" id="pp_settle_iche" name="pp_settle_case" value="계좌이체" '.$checked.'> <label for="pp_settle_iche" class="lb_icon"><span></span>'.$escrow_title.'계좌이체</label>'.PHP_EOL;
|
echo '<input type="radio" id="pp_settle_iche" name="pp_settle_case" value="계좌이체" '.$checked.'> <label for="pp_settle_iche" class="lb_icon"><span></span>'.$escrow_title. ($default['de_pg_service'] == 'toss' ? '퀵계좌이체' :'계좌이체') . '</label>'.PHP_EOL;
|
||||||
$checked = '';
|
$checked = '';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@ -235,6 +245,28 @@ function forderform_check(f)
|
|||||||
f.LGD_CUSTOM_FIRSTPAY.value = "무통장";
|
f.LGD_CUSTOM_FIRSTPAY.value = "무통장";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
<?php } else if($default['de_pg_service'] == 'toss') { ?>
|
||||||
|
switch(settle_method)
|
||||||
|
{
|
||||||
|
case "계좌이체":
|
||||||
|
f.method.value = "TRANSFER";
|
||||||
|
break;
|
||||||
|
case "가상계좌":
|
||||||
|
f.method.value = "VIRTUAL_ACCOUNT";
|
||||||
|
break;
|
||||||
|
case "휴대폰":
|
||||||
|
f.method.value = "MOBILE_PHONE";
|
||||||
|
break;
|
||||||
|
case "신용카드":
|
||||||
|
f.method.value = "CARD";
|
||||||
|
break;
|
||||||
|
case "간편결제":
|
||||||
|
f.method.value = "CARD";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
f.method.value = "무통장";
|
||||||
|
break;
|
||||||
|
}
|
||||||
<?php } else if($default['de_pg_service'] == 'inicis') { ?>
|
<?php } else if($default['de_pg_service'] == 'inicis') { ?>
|
||||||
switch(settle_method)
|
switch(settle_method)
|
||||||
{
|
{
|
||||||
@ -312,6 +344,59 @@ function forderform_check(f)
|
|||||||
f.submit();
|
f.submit();
|
||||||
}
|
}
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
<?php if($default['de_pg_service'] == 'toss') { ?>
|
||||||
|
|
||||||
|
f.orderId.value = '<?=$od_id?>';
|
||||||
|
f.orderName.value = '<?=$goods?>';
|
||||||
|
|
||||||
|
f.customerName.value = f.pp_name.value;
|
||||||
|
f.customerEmail.value = f.pp_email.value;
|
||||||
|
f.customerMobilePhone.value = f.pp_hp.value.replace(/[^0-9]/g, '');
|
||||||
|
|
||||||
|
f.cardUseCardPoint.value = false;
|
||||||
|
f.cardUseAppCardOnly.value = false;
|
||||||
|
|
||||||
|
<?php if($default['de_escrow_use']) { ?>
|
||||||
|
f.cardUseEscrow.value = 'true';
|
||||||
|
f.escrowProducts.value = JSON.stringify(<?php echo json_encode($escrow_products, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); ?>);
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
if(settle_method == "간편결제") {
|
||||||
|
f.cardflowMode.value = 'DIRECT';
|
||||||
|
}
|
||||||
|
|
||||||
|
f.amountCurrency.value = 'KRW';
|
||||||
|
f.amountValue.value = f.good_mny.value;
|
||||||
|
<?php if($default['de_tax_flag_use']) { ?>
|
||||||
|
f.taxFreeAmount.value = f.comm_free_mny.value;
|
||||||
|
<?php } ?>
|
||||||
|
f.windowTarget.value = 'iframe';
|
||||||
|
|
||||||
|
if(f.method.value != "무통장") {
|
||||||
|
// 주문정보 임시저장
|
||||||
|
var order_data = $(f).serialize();
|
||||||
|
var save_result = "";
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
data: order_data,
|
||||||
|
url: g5_url+"/shop/ajax.orderdatasave.php",
|
||||||
|
cache: false,
|
||||||
|
async: false,
|
||||||
|
success: function(data) {
|
||||||
|
save_result = data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if(save_result) {
|
||||||
|
alert(save_result);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
launchCrossPlatform(f);
|
||||||
|
} else {
|
||||||
|
f.submit();
|
||||||
|
}
|
||||||
|
<?php } ?>
|
||||||
<?php if($default['de_pg_service'] == 'inicis') { ?>
|
<?php if($default['de_pg_service'] == 'inicis') { ?>
|
||||||
f.price.value = f.good_mny.value;
|
f.price.value = f.good_mny.value;
|
||||||
f.buyername.value = f.pp_name.value;
|
f.buyername.value = f.pp_name.value;
|
||||||
|
|||||||
@ -2,28 +2,42 @@
|
|||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||||
|
|
||||||
|
$page_return_url = G5_SHOP_URL.'/personalpayform.php?pp_id='.get_session('ss_personalpay_id');
|
||||||
|
|
||||||
$pp_id = $_POST['pp_id'] = isset($_POST['pp_id']) ? preg_replace('/[^0-9]/', '', $_POST['pp_id']) : 0;
|
$pp_id = $_POST['pp_id'] = isset($_POST['pp_id']) ? preg_replace('/[^0-9]/', '', $_POST['pp_id']) : 0;
|
||||||
$good_mny = $_POST['good_mny'] = isset($_POST['good_mny']) ? preg_replace('/[^0-9]/', '', $_POST['good_mny']) : 0;
|
$good_mny = $_POST['good_mny'] = isset($_POST['good_mny']) ? preg_replace('/[^0-9]/', '', $_POST['good_mny']) : 0;
|
||||||
$post_lgd_paykey = isset($_POST['LGD_PAYKEY']) ? $_POST['LGD_PAYKEY'] : '';
|
$post_lgd_paykey = isset($_POST['LGD_PAYKEY']) ? $_POST['LGD_PAYKEY'] : '';
|
||||||
|
$paymentKey = isset($_POST['paymentKey']) ? $_POST['paymentKey'] : '';
|
||||||
$pp_deposit_name = '';
|
$pp_deposit_name = '';
|
||||||
|
|
||||||
if($default['de_pg_service'] == 'lg' && ! $post_lgd_paykey)
|
if($default['de_pg_service'] == 'lg' && ! $post_lgd_paykey)
|
||||||
alert('결제등록 요청 후 결제해 주십시오.');
|
alert('결제등록 요청 후 결제해 주십시오.', $page_return_url);
|
||||||
|
|
||||||
|
if($default['de_pg_service'] == 'toss' && ! $paymentKey)
|
||||||
|
alert('결제등록 요청 후 주문해 주십시오.', $page_return_url);
|
||||||
|
|
||||||
|
set_session('ss_order_id', $pp_id);
|
||||||
|
|
||||||
// 개인결제 정보
|
// 개인결제 정보
|
||||||
$pp_check = false;
|
$pp_check = false;
|
||||||
$sql = " select * from {$g5['g5_shop_personalpay_table']} where pp_id = '{$pp_id}' and pp_use = '1' ";
|
$sql = " select * from {$g5['g5_shop_personalpay_table']} where pp_id = '{$pp_id}' and pp_use = '1' ";
|
||||||
$pp = sql_fetch($sql);
|
$pp = sql_fetch($sql);
|
||||||
if(! (isset($pp['pp_id']) && $pp['pp_id']))
|
if(! (isset($pp['pp_id']) && $pp['pp_id']))
|
||||||
alert('개인결제 정보가 존재하지 않습니다.');
|
alert('개인결제 정보가 존재하지 않습니다.', $page_return_url);
|
||||||
|
|
||||||
if($pp['pp_tno'])
|
if($pp['pp_tno'])
|
||||||
alert('이미 결제하신 개인결제 내역입니다.');
|
alert('이미 결제하신 개인결제 내역입니다.', $page_return_url);
|
||||||
|
|
||||||
$hash_data = md5($pp_id.$good_mny.$pp['pp_time']);
|
$hash_data = md5($pp_id.$good_mny.$pp['pp_time']);
|
||||||
if($pp_id != get_session('ss_personalpay_id') || $hash_data != get_session('ss_personalpay_hash'))
|
if($pp_id != get_session('ss_personalpay_id') || $hash_data != get_session('ss_personalpay_hash'))
|
||||||
die('개인결제 정보가 올바르지 않습니다.');
|
die('개인결제 정보가 올바르지 않습니다.');
|
||||||
|
|
||||||
|
// PG사의 가상계좌 또는 계좌이체의 자동 현금영수증 초기배열값
|
||||||
|
$pg_receipt_infos = array(
|
||||||
|
'od_cash' => 0,
|
||||||
|
'od_cash_no' => '',
|
||||||
|
'od_cash_info' => '',
|
||||||
|
);
|
||||||
|
|
||||||
if ($pp_settle_case == "계좌이체")
|
if ($pp_settle_case == "계좌이체")
|
||||||
{
|
{
|
||||||
@ -31,6 +45,9 @@ if ($pp_settle_case == "계좌이체")
|
|||||||
case 'lg':
|
case 'lg':
|
||||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||||
break;
|
break;
|
||||||
|
case 'toss':
|
||||||
|
include G5_SHOP_PATH.'/toss/toss_result.php';
|
||||||
|
break;
|
||||||
case 'inicis':
|
case 'inicis':
|
||||||
include G5_SHOP_PATH.'/inicis/inistdpay_result.php';
|
include G5_SHOP_PATH.'/inicis/inistdpay_result.php';
|
||||||
break;
|
break;
|
||||||
@ -56,6 +73,9 @@ else if ($pp_settle_case == "가상계좌")
|
|||||||
case 'lg':
|
case 'lg':
|
||||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||||
break;
|
break;
|
||||||
|
case 'toss':
|
||||||
|
include G5_SHOP_PATH.'/toss/toss_result.php';
|
||||||
|
break;
|
||||||
case 'inicis':
|
case 'inicis':
|
||||||
include G5_SHOP_PATH.'/inicis/inistdpay_result.php';
|
include G5_SHOP_PATH.'/inicis/inistdpay_result.php';
|
||||||
break;
|
break;
|
||||||
@ -81,6 +101,9 @@ else if ($pp_settle_case == "휴대폰")
|
|||||||
case 'lg':
|
case 'lg':
|
||||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||||
break;
|
break;
|
||||||
|
case 'toss':
|
||||||
|
include G5_SHOP_PATH.'/toss/toss_result.php';
|
||||||
|
break;
|
||||||
case 'inicis':
|
case 'inicis':
|
||||||
include G5_SHOP_PATH.'/inicis/inistdpay_result.php';
|
include G5_SHOP_PATH.'/inicis/inistdpay_result.php';
|
||||||
break;
|
break;
|
||||||
@ -104,6 +127,9 @@ else if ($pp_settle_case == "신용카드")
|
|||||||
case 'lg':
|
case 'lg':
|
||||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||||
break;
|
break;
|
||||||
|
case 'toss':
|
||||||
|
include G5_SHOP_PATH.'/toss/toss_result.php';
|
||||||
|
break;
|
||||||
case 'inicis':
|
case 'inicis':
|
||||||
include G5_SHOP_PATH.'/inicis/inistdpay_result.php';
|
include G5_SHOP_PATH.'/inicis/inistdpay_result.php';
|
||||||
break;
|
break;
|
||||||
@ -134,6 +160,9 @@ if((int)$pp['pp_price'] !== (int)$pg_price) {
|
|||||||
case 'lg':
|
case 'lg':
|
||||||
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
||||||
break;
|
break;
|
||||||
|
case 'toss':
|
||||||
|
include G5_SHOP_PATH.'/toss/toss_cancel.php';
|
||||||
|
break;
|
||||||
case 'inicis':
|
case 'inicis':
|
||||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||||
break;
|
break;
|
||||||
@ -164,7 +193,10 @@ $sql = " update {$g5['g5_shop_personalpay_table']}
|
|||||||
pp_bank_account = '$pp_bank_account',
|
pp_bank_account = '$pp_bank_account',
|
||||||
pp_deposit_name = '$pp_deposit_name',
|
pp_deposit_name = '$pp_deposit_name',
|
||||||
pp_receipt_time = '$pp_receipt_time',
|
pp_receipt_time = '$pp_receipt_time',
|
||||||
pp_receipt_ip = '{$_SERVER['REMOTE_ADDR']}'
|
pp_receipt_ip = '{$_SERVER['REMOTE_ADDR']}',
|
||||||
|
pp_cash = '{$pg_receipt_infos['od_cash']}',
|
||||||
|
pp_cash_no = '{$pg_receipt_infos['od_cash_no']}',
|
||||||
|
pp_cash_info = '{$pg_receipt_infos['od_cash_info']}'
|
||||||
where pp_id = '{$pp['pp_id']}' ";
|
where pp_id = '{$pp['pp_id']}' ";
|
||||||
$result = sql_query($sql, false);
|
$result = sql_query($sql, false);
|
||||||
|
|
||||||
@ -202,6 +234,9 @@ if($pp_receipt_price > 0 && $pp['pp_id'] && $pp['od_id']) {
|
|||||||
od_settle_case = '$pp_settle_case',
|
od_settle_case = '$pp_settle_case',
|
||||||
od_deposit_name = '$pp_deposit_name',
|
od_deposit_name = '$pp_deposit_name',
|
||||||
od_bank_account = '$pp_bank_account',
|
od_bank_account = '$pp_bank_account',
|
||||||
|
od_cash = '{$pg_receipt_infos['od_cash']}',
|
||||||
|
od_cash_no = '{$pg_receipt_infos['od_cash_no']}',
|
||||||
|
od_cash_info = '{$pg_receipt_infos['od_cash_info']}',
|
||||||
od_shop_memo = concat(od_shop_memo, \"\\n개인결제 ".$pp['pp_id']." 로 결제완료 - ".$pp_receipt_time."\")
|
od_shop_memo = concat(od_shop_memo, \"\\n개인결제 ".$pp['pp_id']." 로 결제완료 - ".$pp_receipt_time."\")
|
||||||
where od_id = '{$pp['od_id']}' ";
|
where od_id = '{$pp['od_id']}' ";
|
||||||
$result = sql_query($sql, false);
|
$result = sql_query($sql, false);
|
||||||
@ -213,6 +248,9 @@ if($pp_receipt_price > 0 && $pp['pp_id'] && $pp['od_id']) {
|
|||||||
case 'lg':
|
case 'lg':
|
||||||
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
||||||
break;
|
break;
|
||||||
|
case 'toss':
|
||||||
|
include G5_SHOP_PATH.'/toss/toss_cancel.php';
|
||||||
|
break;
|
||||||
case 'inicis':
|
case 'inicis':
|
||||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -149,6 +149,8 @@ if($pp['pp_pg'] == 'lg') {
|
|||||||
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
|
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
|
||||||
|
|
||||||
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
|
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
|
||||||
|
} else if($pp['pp_pg'] == 'toss') {
|
||||||
|
$hp_receipt_script = 'window.open(\'https://dashboard.tosspayments.com/receipt/phone?transactionId='.$pp['pp_tno'].'&ref=PX\',\'receipt\',\'width=430,height=700\');';
|
||||||
} else if($pp['pp_pg'] == 'inicis') {
|
} else if($pp['pp_pg'] == 'inicis') {
|
||||||
$hp_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$pp['pp_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
|
$hp_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$pp['pp_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
|
||||||
} else if($pp['pp_pg'] == 'nicepay') {
|
} else if($pp['pp_pg'] == 'nicepay') {
|
||||||
@ -170,6 +172,8 @@ if($pp['pp_pg'] == 'lg') {
|
|||||||
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
|
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
|
||||||
|
|
||||||
$card_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
|
$card_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
|
||||||
|
} else if($pp['pp_pg'] == 'toss') {
|
||||||
|
$card_receipt_script = 'window.open(\'https://dashboard.tosspayments.com/receipt/redirection?transactionId='.$pp['pp_tno'].'&ref=PX\',\'receipt\',\'width=430,height=700\');';
|
||||||
} else if($pp['pp_pg'] == 'inicis') {
|
} else if($pp['pp_pg'] == 'inicis') {
|
||||||
$card_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$pp['pp_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
|
$card_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$pp['pp_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
|
||||||
} else if($pp['pp_pg'] == 'nicepay') {
|
} else if($pp['pp_pg'] == 'nicepay') {
|
||||||
@ -225,6 +229,8 @@ if($pp['pp_pg'] == 'lg') {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$cash_receipt_script = 'javascript:showCashReceipts(\''.$LGD_MID.'\',\''.$pp['pp_id'].'\',\''.$pp['pp_casseqno'].'\',\''.$trade_type.'\',\''.$CST_PLATFORM.'\');';
|
$cash_receipt_script = 'javascript:showCashReceipts(\''.$LGD_MID.'\',\''.$pp['pp_id'].'\',\''.$pp['pp_casseqno'].'\',\''.$trade_type.'\',\''.$CST_PLATFORM.'\');';
|
||||||
|
} else if($pp['pp_pg'] == 'toss') {
|
||||||
|
$cash_receipt_script = 'window.open(\'https://dashboard.tosspayments.com/receipt/mids/si_'.$config['cf_lg_mid'].'/orders/'.$pp['pp_id'].'/cash-receipt?ref=dashboard\',\'receipt\',\'width=430,height=700\');';
|
||||||
} else if($pp['pp_pg'] == 'inicis') {
|
} else if($pp['pp_pg'] == 'inicis') {
|
||||||
$cash = unserialize($pp['pp_cash_info']);
|
$cash = unserialize($pp['pp_cash_info']);
|
||||||
$cash_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid='.$cash['TID'].'&clpaymethod=22\',\'showreceipt\',\'width=380,height=540,scrollbars=no,resizable=no\');';
|
$cash_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid='.$cash['TID'].'&clpaymethod=22\',\'showreceipt\',\'width=380,height=540,scrollbars=no,resizable=no\');';
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* [상점 결제결과처리(DB) 페이지]
|
* [상점 결제결과처리(DB) 페이지]
|
||||||
*
|
*
|
||||||
|
|||||||
@ -117,7 +117,6 @@ if (in_array($_SERVER['REMOTE_ADDR'], $pg_allow_ips)) {
|
|||||||
where od_id = '$od_id' ";
|
where od_id = '$od_id' ";
|
||||||
sql_query($sql, FALSE);
|
sql_query($sql, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
11
shop/settle_toss.inc.php
Normal file
11
shop/settle_toss.inc.php
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||||
|
require_once(G5_SHOP_PATH.'/toss/toss.inc.php');
|
||||||
|
|
||||||
|
$toss = new TossPayments(
|
||||||
|
$config['cf_toss_client_key'],
|
||||||
|
$config['cf_toss_secret_key'],
|
||||||
|
$config['cf_lg_mid']
|
||||||
|
);
|
||||||
|
|
||||||
|
$toss->setPaymentHeader();
|
||||||
422
shop/settle_toss_common.php
Normal file
422
shop/settle_toss_common.php
Normal file
@ -0,0 +1,422 @@
|
|||||||
|
<?php
|
||||||
|
include_once('./_common.php');
|
||||||
|
include_once(G5_KAKAO5_PATH.'/kakao5.lib.php'); // 카카오톡 알림톡 설정
|
||||||
|
require_once(G5_SHOP_PATH.'/toss/toss.inc.php'); // 토스페이먼츠 v2 공통 설정
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
**
|
||||||
|
** 토스페이먼츠 v2 가상계좌 입금 결과 처리 - 웹훅
|
||||||
|
**
|
||||||
|
*************************************************************************/
|
||||||
|
|
||||||
|
$payLog = true; // 로그 사용 여부
|
||||||
|
$log_file = G5_DATA_PATH . '/log/tosspayment_result_log.txt';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 로그 기록 함수
|
||||||
|
*/
|
||||||
|
function write_toss_log($reason, $orderId = '', $status = '')
|
||||||
|
{
|
||||||
|
global $payLog, $log_file;
|
||||||
|
|
||||||
|
if($payLog) {
|
||||||
|
$logfile = fopen($log_file, "a+");
|
||||||
|
|
||||||
|
fwrite( $logfile,"************************************************\r\n");
|
||||||
|
fwrite( $logfile,"Reason : ".$reason."\r\n");
|
||||||
|
fwrite( $logfile,"Status : ".$status."\r\n");
|
||||||
|
fwrite( $logfile,"OrderId : ".$orderId."\r\n");
|
||||||
|
fwrite( $logfile,"************************************************\r\n");
|
||||||
|
|
||||||
|
fclose( $logfile );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 입금통보 결과 데이터 읽기
|
||||||
|
$raw = file_get_contents('php://input');
|
||||||
|
if ($raw == false) {
|
||||||
|
write_toss_log("입력 데이터 읽기 실패");
|
||||||
|
http_response_code(400);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// json 파싱 체크
|
||||||
|
$data = json_decode($raw, true);
|
||||||
|
if (!is_array($data)) {
|
||||||
|
$json_error = json_last_error_msg();
|
||||||
|
write_toss_log("데이터 파싱 실패: " . $json_error);
|
||||||
|
http_response_code(400);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 공통 필드 정리
|
||||||
|
$TOSS_CREATEDAT = isset($data["createdAt"]) ? $data["createdAt"] : '';
|
||||||
|
$TOSS_SECRET = isset($data["secret"]) ? $data["secret"] : '';
|
||||||
|
$TOSS_ORDERID = isset($data["orderId"]) ? $data["orderId"] : '';
|
||||||
|
$TOSS_STATUS = isset($data["status"]) ? $data["status"] : '';
|
||||||
|
$TOSS_TRANSACTIONKEY = isset($data["transactionKey"]) ? $data["transactionKey"] : '';
|
||||||
|
|
||||||
|
// 결제 상세 조회
|
||||||
|
$toss = new TossPayments(
|
||||||
|
$config['cf_toss_client_key'],
|
||||||
|
$config['cf_toss_secret_key'],
|
||||||
|
$config['cf_lg_mid']
|
||||||
|
);
|
||||||
|
$toss->setPaymentHeader();
|
||||||
|
|
||||||
|
$orderResult = $toss->getPaymentByOrderId($TOSS_ORDERID);
|
||||||
|
$order_info = $toss->responseData;
|
||||||
|
|
||||||
|
if (!$orderResult || $order_info['secret'] !== $TOSS_SECRET) {
|
||||||
|
$error_msg = isset($order_info['message']) ? $order_info['message'] : '주문 정보 조회 실패';
|
||||||
|
$error_code = isset($order_info['code']) ? $order_info['code'] : 'UNKNOWN_ERROR';
|
||||||
|
write_toss_log("주문 정보 조회 실패 - {$error_code} : {$error_msg}", $TOSS_ORDERID, $TOSS_STATUS);
|
||||||
|
http_response_code(400);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 결제 정보
|
||||||
|
$paymentKey = isset($order_info["paymentKey"]) ? clean_xss_tags($order_info["paymentKey"]) : ''; // 결제 키
|
||||||
|
$customerName = isset($order_info["virtualAccount"]["customerName"]) ? clean_xss_tags($order_info["virtualAccount"]["customerName"]) : ''; // 주문자명 (가상계좌 발급 시 고객명)
|
||||||
|
$depositorName = isset($order_info["virtualAccount"]["depositorName"]) ? clean_xss_tags($order_info["virtualAccount"]["depositorName"]) : ''; // 입금자명 (실제 입금자 입력 이름)
|
||||||
|
$totalAmount = isset($order_info["totalAmount"]) ? clean_xss_tags($order_info["totalAmount"]) : ''; // 입금 금액 (결제 총액)
|
||||||
|
$bankCode = isset($order_info["virtualAccount"]["bankCode"]) ? clean_xss_tags($order_info["virtualAccount"]["bankCode"]) : ''; // 은행코드 (가상계좌 발급 은행, 예: 11 → 농협)
|
||||||
|
$accountNumber = isset($order_info["virtualAccount"]["accountNumber"]) ? clean_xss_tags($order_info["virtualAccount"]["accountNumber"]) : ''; // 가상계좌 입금계좌번호
|
||||||
|
$approvedAt = isset($order_info['approvedAt']) ? clean_xss_tags($order_info['approvedAt']) : ''; //입금일시
|
||||||
|
$dueDate = isset($order_info["virtualAccount"]['dueDate']) ? clean_xss_tags($order_info['virtualAccount']['dueDate']) : ''; // 만료일시
|
||||||
|
$receipt_time = $approvedAt ? (strtotime($approvedAt) !== false ? date("Y-m-d H:i:s", strtotime($approvedAt)) : '') : '';
|
||||||
|
$due_time = $dueDate ? (strtotime($dueDate) !== false ? date("Y-m-d H:i:s", strtotime($dueDate)) : '') : '';
|
||||||
|
|
||||||
|
// 가상계좌 채번시 현금영수증 자동발급신청이 되었을 경우 전달되며
|
||||||
|
// RcptTID에 값이 있는 경우만 발급처리 됨
|
||||||
|
$RcptTID = isset($order_info['cashReceipt']['receiptKey']) ? clean_xss_tags($order_info['cashReceipt']['receiptKey']) : ''; // 현금영수증 거래번호
|
||||||
|
$RcptAuthCode = isset($order_info['cashReceipt']['issueNumber']) ? clean_xss_tags($order_info['cashReceipt']['issueNumber']) : ''; // 현금영수증 승인번호
|
||||||
|
// 현금영수증 구분(0:미발행, 1:소득공제용, 2:지출증빙용)
|
||||||
|
$RcptType = isset($order_info['cashReceipt']['type']) ? clean_xss_tags($order_info['cashReceipt']['type'] === '소득공제' ? '1' : ($order_info['cashReceipt']['type'] === '지출증빙' ? '2' : '0')) : '0';
|
||||||
|
$RcptReceiptUrl = isset($order_info['cashReceipt']['receiptUrl']) ? clean_xss_tags($order_info['cashReceipt']['receiptUrl']) : ''; // 현금영수증 URL
|
||||||
|
|
||||||
|
$result = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 입금 완료 처리
|
||||||
|
*/
|
||||||
|
if($TOSS_STATUS == "DONE"){
|
||||||
|
|
||||||
|
// 입금결과 처리
|
||||||
|
$sql = " select pp_id, od_id from {$g5['g5_shop_personalpay_table']} where pp_id = '{$TOSS_ORDERID}' and pp_tno = '{$paymentKey}'";
|
||||||
|
$row = sql_fetch($sql);
|
||||||
|
|
||||||
|
if($row['pp_id']) {
|
||||||
|
// 개인결제 UPDATE
|
||||||
|
$add_update_sql = '';
|
||||||
|
|
||||||
|
// 현금영수증 발급시 1 또는 2 이면
|
||||||
|
if ($RcptType) {
|
||||||
|
$add_update_sql = "
|
||||||
|
, pp_cash = '1',
|
||||||
|
pp_cash_no = '".$RcptAuthCode."',
|
||||||
|
pp_cash_info = '".serialize(array('TID'=>$RcptTID, 'ApplNum'=>$RcptAuthCode, 'AuthDate'=>$approvedAt, 'receiptUrl'=>$RcptReceiptUrl))."'
|
||||||
|
";
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = " update {$g5['g5_shop_personalpay_table']}
|
||||||
|
set pp_receipt_price = '$totalAmount',
|
||||||
|
pp_receipt_time = '$receipt_time',
|
||||||
|
pp_deposit_name = '$depositorName'
|
||||||
|
$add_update_sql
|
||||||
|
where pp_id = '$TOSS_ORDERID'";
|
||||||
|
$result = sql_query($sql, false);
|
||||||
|
|
||||||
|
if($row['od_id']) {
|
||||||
|
// 주문서 UPDATE
|
||||||
|
$sql = " update {$g5['g5_shop_order_table']}
|
||||||
|
set od_receipt_price = od_receipt_price + '$totalAmount',
|
||||||
|
od_receipt_time = '$receipt_time',
|
||||||
|
od_deposit_name = '$depositorName',
|
||||||
|
od_shop_memo = concat(od_shop_memo, \"\\n개인결제 ".$row['pp_id']." 로 결제완료 - ".$receipt_time."\")
|
||||||
|
where od_id = '{$row['od_id']}' ";
|
||||||
|
$result = sql_query($sql, FALSE);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 주문내역에 secret 검증 추가
|
||||||
|
$sql = " select od_id from {$g5['g5_shop_order_table']} where od_id = '$TOSS_ORDERID' and od_tno = '$paymentKey'";
|
||||||
|
$row = sql_fetch($sql);
|
||||||
|
if(!$row['od_id']) {
|
||||||
|
write_toss_log("주문내역 조회 실패", $TOSS_ORDERID, $TOSS_STATUS);
|
||||||
|
http_response_code(400);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 주문서 UPDATE
|
||||||
|
$sql = " update {$g5['g5_shop_order_table']}
|
||||||
|
set od_receipt_price = '$totalAmount',
|
||||||
|
od_receipt_time = '$receipt_time',
|
||||||
|
od_deposit_name = '$depositorName'
|
||||||
|
where od_id = '$TOSS_ORDERID'
|
||||||
|
and od_tno = '$paymentKey'";
|
||||||
|
$result = sql_query($sql, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($result) {
|
||||||
|
if (isset($row['od_id']) && $row['od_id'])
|
||||||
|
$od_id = $row['od_id'];
|
||||||
|
else
|
||||||
|
$od_id = $TOSS_ORDERID;
|
||||||
|
|
||||||
|
// 주문정보 체크
|
||||||
|
$sql = " select count(od_id) as cnt
|
||||||
|
from {$g5['g5_shop_order_table']}
|
||||||
|
where od_id = '$od_id'
|
||||||
|
and od_status = '주문' ";
|
||||||
|
$row = sql_fetch($sql);
|
||||||
|
|
||||||
|
if($row['cnt'] == 1) {
|
||||||
|
// 미수금 정보 업데이트
|
||||||
|
$info = get_order_info($od_id);
|
||||||
|
|
||||||
|
$add_update_sql = '';
|
||||||
|
|
||||||
|
// 현금영수증 발급시 1 또는 2 이면
|
||||||
|
if ($RcptType) {
|
||||||
|
$add_update_sql = "
|
||||||
|
, od_cash = '1',
|
||||||
|
od_cash_no = '".$RcptAuthCode."',
|
||||||
|
od_cash_info = '".serialize(array('TID'=>$RcptTID, 'ApplNum'=>$RcptAuthCode, 'AuthDate'=>$approvedAt, 'receiptUrl'=>$RcptReceiptUrl))."'
|
||||||
|
";
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = " update {$g5['g5_shop_order_table']}
|
||||||
|
set od_misu = '{$info['od_misu']}' $add_update_sql ";
|
||||||
|
if($info['od_misu'] == 0)
|
||||||
|
$sql .= " , od_status = '입금' ";
|
||||||
|
$sql .= " where od_id = '$od_id' ";
|
||||||
|
sql_query($sql, FALSE);
|
||||||
|
|
||||||
|
// 장바구니 상태변경
|
||||||
|
if($info['od_misu'] == 0) {
|
||||||
|
$sql = " update {$g5['g5_shop_cart_table']}
|
||||||
|
set ct_status = '입금'
|
||||||
|
where od_id = '$od_id' ";
|
||||||
|
sql_query($sql, FALSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 입금 오류 처리 (입금 오류로 인해 WAITING_FOR_DEPOSIT으로 되돌아온 경우)
|
||||||
|
*/
|
||||||
|
elseif($TOSS_STATUS == "WAITING_FOR_DEPOSIT")
|
||||||
|
{
|
||||||
|
// 개인결제 정보 조회
|
||||||
|
$sql = " select pp_id, od_id, pp_name, pp_hp, pp_tel from {$g5['g5_shop_personalpay_table']} where pp_id = '{$TOSS_ORDERID}' and pp_tno = '{$paymentKey}'";
|
||||||
|
$row = sql_fetch($sql);
|
||||||
|
|
||||||
|
if($row['pp_id']) {
|
||||||
|
// 개인결제 정보 롤백
|
||||||
|
$sql = " update {$g5['g5_shop_personalpay_table']}
|
||||||
|
set pp_receipt_price = 0,
|
||||||
|
pp_receipt_time = '',
|
||||||
|
pp_cash = 0,
|
||||||
|
pp_cash_no = '',
|
||||||
|
pp_cash_info = ''
|
||||||
|
where pp_id = '{$TOSS_ORDERID}' and pp_tno = '{$paymentKey}'";
|
||||||
|
$result = sql_query($sql, FALSE);
|
||||||
|
|
||||||
|
if($row['od_id']) {
|
||||||
|
// 주문서에서 개인결제 금액 차감
|
||||||
|
$sql = " update {$g5['g5_shop_order_table']}
|
||||||
|
set od_receipt_price = od_receipt_price - '$totalAmount',
|
||||||
|
od_shop_memo = concat(od_shop_memo, \"\\n개인결제 ".$row['pp_id']." 가상계좌 입금 오류로 취소 - ".date('Y-m-d H:i:s')."\")
|
||||||
|
where od_id = '{$row['od_id']}' ";
|
||||||
|
$result = sql_query($sql, FALSE);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 일반 주문 롤백 전에 데이터 존재 확인
|
||||||
|
$sql = " select od_id, od_name, od_hp, od_tel from {$g5['g5_shop_order_table']} where od_id = '{$TOSS_ORDERID}' and od_tno = '{$paymentKey}'";
|
||||||
|
$row = sql_fetch($sql);
|
||||||
|
if(empty($row['od_id'])) {
|
||||||
|
write_toss_log("주문 데이터가 존재하지 않음", $TOSS_ORDERID, $TOSS_STATUS);
|
||||||
|
http_response_code(400);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 일반 주문 입금완료 - 주문 상태 롤백 (입금 → 주문)
|
||||||
|
$sql = " update {$g5['g5_shop_order_table']}
|
||||||
|
set od_status = '주문',
|
||||||
|
od_receipt_price = 0,
|
||||||
|
od_receipt_time = '',
|
||||||
|
od_shop_memo = concat(od_shop_memo, \"\\n가상계좌 입금 오류로 취소 - ".date('Y-m-d H:i:s')."\"),
|
||||||
|
od_cash = 0,
|
||||||
|
od_cash_no = '',
|
||||||
|
od_cash_info = ''
|
||||||
|
where od_id = '{$TOSS_ORDERID}' and od_tno = '{$paymentKey}' ";
|
||||||
|
$result = sql_query($sql, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 공통 처리: 미수금 정보 재계산 및 상태 롤백
|
||||||
|
if($result) {
|
||||||
|
if (isset($row['od_id']) && $row['od_id'])
|
||||||
|
$od_id = $row['od_id'];
|
||||||
|
else
|
||||||
|
$od_id = $TOSS_ORDERID;
|
||||||
|
|
||||||
|
// 미수금 정보 재계산
|
||||||
|
$info = get_order_info($od_id);
|
||||||
|
|
||||||
|
if($info) {
|
||||||
|
$sql = " update {$g5['g5_shop_order_table']}
|
||||||
|
set od_misu = '{$info['od_misu']}',
|
||||||
|
od_status = '주문',
|
||||||
|
od_cash = 0,
|
||||||
|
od_cash_no = '',
|
||||||
|
od_cash_info = ''
|
||||||
|
where od_id = '{$od_id}' ";
|
||||||
|
sql_query($sql, FALSE);
|
||||||
|
|
||||||
|
// 장바구니 상태 롤백 (입금 → 주문)
|
||||||
|
$sql = " update {$g5['g5_shop_cart_table']}
|
||||||
|
set ct_status = '주문'
|
||||||
|
where od_id = '{$od_id}' ";
|
||||||
|
sql_query($sql, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// SMS 발송 - 재입금 안내
|
||||||
|
$sms_message = '';
|
||||||
|
|
||||||
|
// 개인결제인지 일반주문인지 확인하여 연락처 조회
|
||||||
|
if($row['pp_id']) {
|
||||||
|
// 개인결제인 경우
|
||||||
|
$customer_name = $row['pp_name'];
|
||||||
|
$customer_phone = $row['pp_hp'] ? $row['pp_hp'] : ($row['pp_tel'] ? $row['pp_tel'] : '');
|
||||||
|
$title = "개인결제번호 {$TOSS_ORDERID}";
|
||||||
|
} else {
|
||||||
|
// 일반주문인 경우
|
||||||
|
$customer_name = $row['od_name'];
|
||||||
|
$customer_phone = $row['od_hp'] ? $row['od_hp'] : ($row['od_tel'] ? $row['od_tel'] : '');
|
||||||
|
$title = "주문번호 {$od_id}";
|
||||||
|
}
|
||||||
|
|
||||||
|
if($customer_phone) {
|
||||||
|
$sms_message = "{$customer_name}님, {$title} 가상계좌 입금이 완료되지 않았습니다. 재입금 또는 관리자 문의 바랍니다.\n";
|
||||||
|
$sms_message .= $default['de_admin_company_name'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 전화번호가 있고 SMS 발송 설정이 활성화된 경우에만 발송
|
||||||
|
if($customer_phone && $sms_message && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||||
|
// SMS 발송
|
||||||
|
$sms_messages = array();
|
||||||
|
$receive_number = preg_replace("/[^0-9]/", "", $customer_phone); // 수신자번호
|
||||||
|
$send_number = preg_replace("/[^0-9]/", "", $default['de_admin_company_tel']); // 발신자번호
|
||||||
|
$sms_messages[] = array('recv' => $receive_number, 'send' => $send_number, 'cont' => $sms_message);
|
||||||
|
|
||||||
|
// SMS 발송 처리
|
||||||
|
if($config['cf_sms_type'] == 'LMS') {
|
||||||
|
include_once(G5_LIB_PATH.'/icode.lms.lib.php');
|
||||||
|
|
||||||
|
$port_setting = get_icode_port_type($config['cf_icode_id'], $config['cf_icode_pw']);
|
||||||
|
|
||||||
|
if($port_setting !== false) {
|
||||||
|
$SMS = new LMS;
|
||||||
|
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $port_setting);
|
||||||
|
|
||||||
|
for($s=0; $s<count($sms_messages); $s++) {
|
||||||
|
$strDest = array();
|
||||||
|
$strDest[] = $sms_messages[$s]['recv'];
|
||||||
|
$strCallBack = $sms_messages[$s]['send'];
|
||||||
|
$strCaller = iconv_euckr(trim($default['de_admin_company_name']));
|
||||||
|
$strSubject = '';
|
||||||
|
$strURL = '';
|
||||||
|
$strData = iconv_euckr($sms_messages[$s]['cont']);
|
||||||
|
$strDate = '';
|
||||||
|
$nCount = count($strDest);
|
||||||
|
|
||||||
|
$res = $SMS->Add($strDest, $strCallBack, $strCaller, $strSubject, $strURL, $strData, $strDate, $nCount);
|
||||||
|
$SMS->Send();
|
||||||
|
$SMS->Init();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
include_once(G5_LIB_PATH.'/icode.sms.lib.php');
|
||||||
|
|
||||||
|
$SMS = new SMS;
|
||||||
|
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
|
||||||
|
|
||||||
|
for($s=0; $s<count($sms_messages); $s++) {
|
||||||
|
$recv_number = $sms_messages[$s]['recv'];
|
||||||
|
$send_number = $sms_messages[$s]['send'];
|
||||||
|
$sms_content = iconv_euckr($sms_messages[$s]['cont']);
|
||||||
|
|
||||||
|
$SMS->Add($recv_number, $send_number, $config['cf_icode_id'], $sms_content, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
$SMS->Send();
|
||||||
|
$SMS->Init();
|
||||||
|
}
|
||||||
|
|
||||||
|
// SMS 발송 로그 기록
|
||||||
|
write_toss_log("가상계좌 재입금 안내 SMS 발송 완료", $TOSS_ORDERID, "SMS_SENT");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 입금 전 취소 처리
|
||||||
|
*/
|
||||||
|
elseif($TOSS_STATUS == "CANCELED")
|
||||||
|
{
|
||||||
|
$sql = " update {$g5['g5_shop_order_table']}
|
||||||
|
set od_shop_memo = concat(od_shop_memo, \"\\n가상계좌 입금 전 취소 - ".date('Y-m-d H:i:s')."\")
|
||||||
|
where od_id = '{$TOSS_ORDERID}' ";
|
||||||
|
$result = sql_query($sql, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
//************************************************************************************
|
||||||
|
// 위에서 상점 데이터베이스에 등록 성공유무에 따라서 성공시에는 성공응답인 `HTTP 200` 상태 코드를 리턴해야 합니다.
|
||||||
|
// (주의) 성공응답인 `HTTP 200` 상태 코드를 리턴하지 않으면 토스페이먼츠에서 7회까지 재전송에 실패하면 웹훅 상태가 실패로 변경됩니다.
|
||||||
|
|
||||||
|
// 로그 기록
|
||||||
|
if($payLog) {
|
||||||
|
$logfile = fopen($log_file, "a+");
|
||||||
|
|
||||||
|
// 은행명 조회
|
||||||
|
$bankName = '';
|
||||||
|
if($bankCode && isset($toss->bankCode[$bankCode])) {
|
||||||
|
$bankName = $toss->bankCode[$bankCode];
|
||||||
|
}
|
||||||
|
|
||||||
|
fwrite( $logfile,"************************************************\r\n");
|
||||||
|
fwrite( $logfile,"GoodsName : 토스페이먼츠 가상계좌\r\n");
|
||||||
|
fwrite( $logfile,"OrderId : ".$TOSS_ORDERID."\r\n");
|
||||||
|
fwrite( $logfile,"Status : ".$TOSS_STATUS."\r\n");
|
||||||
|
fwrite( $logfile,"ResultMsg : ".($result ? "SUCCESS" : "FAIL")."\r\n");
|
||||||
|
fwrite( $logfile,"Amt : ".$totalAmount."\r\n");
|
||||||
|
fwrite( $logfile,"name : ".$customerName."\r\n");
|
||||||
|
fwrite( $logfile,"TID : ".$paymentKey."\r\n");
|
||||||
|
fwrite( $logfile,"AuthDate : ".$approvedAt."\r\n");
|
||||||
|
fwrite( $logfile,"VbankNum : ".$accountNumber."\r\n");
|
||||||
|
fwrite( $logfile,"VbankCode : ".$bankCode."\r\n");
|
||||||
|
fwrite( $logfile,"VbankName : ".$bankName."\r\n");
|
||||||
|
fwrite( $logfile,"VbankInputName: ".$depositorName."\r\n");
|
||||||
|
fwrite( $logfile,"RcptTID : ".$RcptTID."\r\n");
|
||||||
|
fwrite( $logfile,"RcptAuthCode : ".$RcptAuthCode."\r\n");
|
||||||
|
fwrite( $logfile,"RcptType : ".$RcptType."\r\n");
|
||||||
|
fwrite( $logfile,"************************************************\r\n");
|
||||||
|
|
||||||
|
fclose( $logfile );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($result)
|
||||||
|
{
|
||||||
|
http_response_code(200); // 절대로 지우지마세요
|
||||||
|
echo "OK";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
http_response_code(400);
|
||||||
|
echo "FAIL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
//*************************************************************************************
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user