충돌수정
This commit is contained in:
@ -6,7 +6,6 @@ $menu['menu100'] = array(
|
||||
array('100280', '테마설정', G5_ADMIN_URL . '/theme.php', 'cf_theme', 1),
|
||||
array('100290', '메뉴설정', G5_ADMIN_URL . '/menu_list.php', 'cf_menu', 1),
|
||||
array('100300', '메일 테스트', G5_ADMIN_URL . '/sendmail_test.php', 'cf_mailtest'),
|
||||
array('100320', '알림톡프리셋관리', G5_ADMIN_URL . '/alimtalkpreset.php', 'alimtalk_preset'),
|
||||
array('100310', '팝업레이어관리', G5_ADMIN_URL . '/newwinlist.php', 'scf_poplayer'),
|
||||
array('100800', '세션파일 일괄삭제', G5_ADMIN_URL . '/session_file_delete.php', 'cf_session', 1),
|
||||
array('100900', '캐시파일 일괄삭제', G5_ADMIN_URL . '/cache_file_delete.php', 'cf_cache', 1),
|
||||
|
||||
@ -8,7 +8,7 @@ $menu['menu500'] = array(
|
||||
array('500110', '매출현황', G5_ADMIN_URL . '/shop_admin/sale1.php', 'sst_order_stats'),
|
||||
array('500100', '상품판매순위', G5_ADMIN_URL . '/shop_admin/itemsellrank.php', 'sst_rank'),
|
||||
array('500120', '주문내역출력', G5_ADMIN_URL . '/shop_admin/orderprint.php', 'sst_print_order', 1),
|
||||
array('500400', '재입고알림', G5_ADMIN_URL . '/shop_admin/itemstocksms.php', 'sst_stock_sms', 1),
|
||||
array('500400', '재입고SMS알림', G5_ADMIN_URL . '/shop_admin/itemstocksms.php', 'sst_stock_sms', 1),
|
||||
array('500300', '이벤트관리', G5_ADMIN_URL . '/shop_admin/itemevent.php', 'scf_event'),
|
||||
array('500310', '이벤트일괄처리', G5_ADMIN_URL . '/shop_admin/itemeventlist.php', 'scf_event_mng'),
|
||||
array('500500', '배너관리', G5_ADMIN_URL . '/shop_admin/bannerlist.php', 'scf_banner', 1),
|
||||
|
||||
@ -1,57 +0,0 @@
|
||||
<?php
|
||||
$sub_menu = '100320';
|
||||
include_once('./_common.php');
|
||||
include_once(G5_KAKAO5_PATH.'/kakao5.lib.php');
|
||||
|
||||
auth_check_menu($auth, $sub_menu, "r");
|
||||
|
||||
$g5['title'] = '알림톡 프리셋 관리';
|
||||
include_once(G5_ADMIN_PATH.'/admin.head.php');
|
||||
|
||||
// 영카트(쇼핑몰) 사용 여부 확인
|
||||
$has_shop = defined('G5_USE_SHOP') && G5_USE_SHOP;
|
||||
|
||||
// SQL 조건
|
||||
$sql_search = $has_shop ? 'where (1)' : "WHERE kp_category <> '쇼핑몰'";
|
||||
|
||||
if ($stx) {
|
||||
$sql_search .= " and ( ";
|
||||
switch ($sfl) {
|
||||
default:
|
||||
$sql_search .= " ({$sfl} like '%{$stx}%') ";
|
||||
break;
|
||||
}
|
||||
$sql_search .= " ) ";
|
||||
}
|
||||
|
||||
if ($sst) {
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
} else {
|
||||
$sql_order = " order by kp_id asc ";
|
||||
}
|
||||
|
||||
// 프리셋 테이블 조회
|
||||
$result = sql_query("SELECT * FROM {$g5['kakao5_preset_table']} {$sql_search} {$sql_order}");
|
||||
?>
|
||||
|
||||
<?php if (!sql_query("DESC {$g5['kakao5_preset_table']}", false)) { ?>
|
||||
<h2 class="h2_frm">카카오톡 프리셋 DB가 설치되지 않았습니다.</h2>
|
||||
<div class="local_desc01 local_desc">
|
||||
<p>카카오톡 프리셋 DB가 설치되지 않아 프리셋을 사용할 수 없습니다.
|
||||
<br><a href="<?php echo G5_ADMIN_URL;?>/dbupgrade.php" class="btn_frmline">DB 업그레이드</a>를 진행해주세요.</p>
|
||||
</div>
|
||||
<?php include_once(G5_ADMIN_PATH.'/admin.tail.php'); exit; ?>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($config['cf_kakaotalk_use'] == 'popbill') { // 팝빌 사용
|
||||
include_once(G5_ADMIN_PATH.'/alimtalkpreset_popbill.php');
|
||||
} else { ?>
|
||||
<h2 class="h2_frm">카카오톡 발송 서비스를 사용할 수 없습니다.</h2>
|
||||
<div class="local_desc01 local_desc">
|
||||
<p>카카오톡 을 사용하지 않고 있기 때문에, 카카오톡 전송을 할 수 없습니다.
|
||||
<br>카카오톡 사용 설정은 <a href="<?php echo G5_ADMIN_URL;?>/config_form.php#anc_cf_mail" class="btn_frmline">환경설정 > 기본환경설정 > 기본알림환경</a> 에서 카카오톡 사용을 변경해 주셔야 사용하실수 있습니다.</p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
include_once(G5_ADMIN_PATH.'/admin.tail.php');
|
||||
@ -1,300 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 팝빌 - 알림톡 프리셋 설정
|
||||
*/
|
||||
// 템플릿 목록 조회
|
||||
$templates = get_popbill_template_list();
|
||||
|
||||
add_javascript('<script src="'.G5_JS_URL.'/kakao5.js"></script>', 1); // 카카오톡5 솔루션 js 추가
|
||||
?>
|
||||
|
||||
<?php
|
||||
// 팝빌 연결이 제대로 안되었을 경우 아래와 같이 표시
|
||||
$check_popbill = get_popbill_service_info();
|
||||
|
||||
if(isset($check_popbill['error'])) { ?>
|
||||
<h2 class="h2_frm">팝빌 카카오톡 발송 서비스를 사용할 수 없습니다.</h2>
|
||||
<div class="local_desc01 local_desc">
|
||||
<p>팝빌 서비스 설정이 되어 있지 않아, 프리셋 서비스를 사용할 수 없습니다.
|
||||
<br>팝빌 설정은 <a href="<?php echo G5_ADMIN_URL;?>/config_form.php#anc_cf_mail" class="btn_frmline">환경설정 > 기본환경설정 > 기본알림환경</a> 에서 확인 및 설정해 주셔야 사용하실 수 있습니다.</p><br>
|
||||
<p>* 설정 오류 내용 : <span style="color:red"><?php echo $check_popbill["error"];?></span></p>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<div class="local_desc01 local_desc">
|
||||
<p><a href="#" class="btn_template_manage" id="btnTemplateManageInfo">템플릿관리</a>를 통해 신청 후 승인된 템플릿만 사용가능합니다.<br>템플릿 내용 작성 시, 동일한 <b>[구분]</b>에 속한 변수만 사용 가능하며, 아래에 제공된 변수 외의 항목을 입력할 경우 적용되지 않습니다.</p><br>
|
||||
<p>아래 표의 <b>#{변수명}</b>만 템플릿 내용에 사용할 수 있으며, 실제 발송 시 값으로 자동 치환됩니다.<br><span style="color:#888;">※ 표에 없는 변수는 치환되지 않습니다.</span></p>
|
||||
<p id="variable_toggle" class="variable_toggle" style="cursor:pointer; font-weight:bold;">[사용 가능한 변수 리스트<span class="btn_toggle_text" style="font-weight:normal;">▼</span>]</p>
|
||||
<div id="variable_table" class="variable_table">
|
||||
<table class="tbl_head01 tbl_wrap">
|
||||
<caption>제공 변수 목록</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">구분</th>
|
||||
<th scope="col">변수명</th>
|
||||
<th scope="col">설명</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
// [정의] $kakao5_preset_variable_list - extend/kakao5.extend.php
|
||||
if (!empty($kakao5_preset_variable_list) && is_array($kakao5_preset_variable_list)) {
|
||||
foreach ($kakao5_preset_variable_list as $category) {
|
||||
$cat_name = isset($category['category']) ? $category['category'] : '';
|
||||
$vars = isset($category['variables']) ? $category['variables'] : [];
|
||||
$rowspan = count($vars);
|
||||
foreach ($vars as $idx => $var) {
|
||||
?>
|
||||
<tr>
|
||||
<?php if ($idx === 0) { ?>
|
||||
<td rowspan="<?php echo $rowspan; ?>"><?php echo htmlspecialchars($cat_name); ?></td>
|
||||
<?php } ?>
|
||||
<td><?php echo htmlspecialchars($var['name'] ?? ''); ?></td>
|
||||
<td style="text-align:left;"><?php echo $var['description'] ?? ''; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<p>아래 표의 <b>#{버튼링크명}</b>은 버튼에 사용할 수 있으며, 실제 발송 시 지정된 URL로 자동 치환됩니다.<br><span style="color:#888;">※ 표에 없는 버튼 링크 변수는 치환되지 않습니다. 등록 시 [<b>https://#{버튼링크명}</b>]으로 작성하시면 됩니다.</span></p>
|
||||
<p id="button_link_toggle" class="button_link_toggle" style="cursor:pointer; font-weight:bold;">[버튼 링크 치환 리스트<span class="button_link_toggle_text" style="font-weight:normal;">▼</span>]</p>
|
||||
<div id="button_link_table" class="variable_table">
|
||||
<table class="tbl_head01 tbl_wrap">
|
||||
<caption>제공 변수 목록</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">버튼링크명</th>
|
||||
<th scope="col">설명</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
// [정의] $kakao5_preset_button_links - extend/kakao5.extend.php
|
||||
if (!empty($kakao5_preset_button_links) && is_array($kakao5_preset_button_links)) {
|
||||
foreach ($kakao5_preset_button_links as $key => $val) {
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo htmlspecialchars($key); ?></td>
|
||||
<td style="text-align:left;"><?php echo isset($val['description']) ? $val['description'] : ''; ?><br>
|
||||
<?php if (isset($val['url'])) { ?>
|
||||
<span style="color:#888;">* URL: <?php echo htmlspecialchars($val['url']); ?></span>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="local_desc01 local_desc">
|
||||
<p><b>* 관리자 휴대폰번호</b> : 관리자로 설정된 <b>[<?php echo $config['cf_admin'];?>]</b>의 <b>휴대폰 번호</b>를 사용합니다.</p>
|
||||
<p><b>* 그룹 관리자 휴대폰번호</b> : 그룹 관리자로 지정된 아이디의 <b>휴대폰 번호</b>를 사용합니다.</p>
|
||||
<p><b>* 게시판 관리자 휴대폰번호</b> : 게시판 관리자로 지정된 아이디의 <b>휴대폰 번호</b>를 사용합니다.</p>
|
||||
</div>
|
||||
|
||||
<?php if (empty($config['cf_req_hp'])) { ?>
|
||||
<div class="admin_pg_notice od_test_caution">
|
||||
<p>
|
||||
<?php
|
||||
$link = '<br><a href="'.G5_ADMIN_URL.'/config_form.php#anc_cf_join">환경설정 > 기본환경설정 > 회원가입</a>';
|
||||
|
||||
if (!empty($config['cf_use_hp'])) {
|
||||
// 보이기만 설정된 경우
|
||||
echo '<b>[휴대폰번호 입력]</b>이 <b>[보이기]</b>로 설정되어 있습니다. 일부 회원은 휴대폰 번호를 입력하지 않아 발송이 제한될 수 있습니다.'
|
||||
. $link . '에서 <b>[필수입력]</b>으로 설정하는 것을 권장합니다.';
|
||||
} else {
|
||||
// 둘 다 설정 안 된 경우
|
||||
echo '<b>[휴대폰번호 입력]</b>이 <b>[보이기]</b> 또는 <b>[필수입력]</b>으로 설정되어 있지 않습니다. 현재 상태에서는 알림톡 발송이 불가능합니다.'
|
||||
. $link . '에서 반드시 <b>[보이기]</b>나 <b>[필수입력]</b> 중 하나 이상으로 설정해야 합니다.';
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<form name="falimtalkpreset" action="./alimtalkpresetupdate.php" method="post" enctype="MULTIPART/FORM-DATA">
|
||||
<input type="hidden" name="token" value="">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
|
||||
<section id="anc_scf_customer">
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption>알림톡 프리셋 목록</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><?php echo subject_sort_link('kp_active') ?>사용여부</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link('kp_category') ?>구분</a></th>
|
||||
<th scope="col">발송시점</th>
|
||||
<th scope="col"><?php echo subject_sort_link('kp_type') ?>대상</a></th>
|
||||
<th scope="col">템플릿 명</th>
|
||||
<th scope="col">미리보기</th>
|
||||
<th scope="col">버튼정보</th>
|
||||
<th scope="col">문자대체발송</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($ci=0; $row=sql_fetch_array($result); $ci++) {
|
||||
$bg = 'bg'.($ci%2);
|
||||
?>
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_chk2">
|
||||
<label class="preset-toggle">
|
||||
<input type="checkbox" name="kp_active[<?php echo $row['kp_id']; ?>]" value="1" <?php echo $row['kp_active'] == '1' ? 'checked' : ''; ?> onchange="toggleTemplateFields(<?php echo $row['kp_id']; ?>)">
|
||||
<span class="preset-slider"></span>
|
||||
</label>
|
||||
</td>
|
||||
|
||||
<td class="td_chk2"><?php echo get_sanitize_input($row['kp_category']); ?></td>
|
||||
<td class="td_cnt"><?php echo get_sanitize_input($row['kp_preset_name']); ?></td>
|
||||
<td class="td_chk2"><?php echo $row['kp_type']; ?></td>
|
||||
|
||||
<td class="td_category1">
|
||||
<select name="kp_template_name[<?php echo $row['kp_id']; ?>]" id="template_<?php echo $row['kp_id']; ?>" style="min-width: 350px;">
|
||||
<option value="">템플릿 선택</option>
|
||||
<?php
|
||||
$template_content = '';
|
||||
$buttons = '';
|
||||
if (!empty($templates) && is_array($templates)) {
|
||||
foreach ($templates as $tpl) {
|
||||
$tplName = $tpl->templateName ?? '';
|
||||
$tplCode = $tpl->templateCode ?? '';
|
||||
|
||||
if (empty($tplCode)) continue;
|
||||
|
||||
$isSelected = ($row['kp_template_name'] == $tplCode);
|
||||
if ($isSelected) {
|
||||
$template_content = $tpl->template;
|
||||
$buttons = $tpl->btns;
|
||||
}
|
||||
|
||||
echo '<option value="' . $tplCode . '" ' . ($isSelected ? 'selected' : '') . '>[' . ($tpl->plusFriendID ?? '') . "] ". $tplName . ' (' . $tplCode . ')' . '</option>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<!-- 템플릿 보기 버튼 추가 -->
|
||||
<td class="td_cnt">
|
||||
<?php if (!empty($row['kp_template_name'])) { ?>
|
||||
<button type="button" class="btn_template_preview_open">템플릿보기</button>
|
||||
<div class="template_preview">
|
||||
<div class="template_preview_txt"><?php echo nl2br($template_content); ?></div>
|
||||
<button type="button" class="btn_template_preview_close">X 닫기</button>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</td>
|
||||
|
||||
<!-- 버튼 정보 -->
|
||||
<td class="td_addr td_odrnum">
|
||||
<?php if (!empty($buttons)) { ?>
|
||||
<?php foreach ($buttons as $index => $button) {
|
||||
echo '<strong>[' . $button->n . ']</strong><br>';
|
||||
if ($button->t == 'DS') { // 배송조회 버튼
|
||||
echo '<span style="color:#888;">· 카카오톡검색 링크 버튼 자동생성</span><br>';
|
||||
}else{
|
||||
echo ($button->t == 'AL' ? '· iOS링크: ' : ($button->t == 'WL' ? '· Mobile링크: ' : '· 링크: ')) . $button->u1 .
|
||||
($button->u2 ? '<br>' . ($button->t == 'AL' ? '· Android링크: ' : ($button->t == 'WL' ? '· PC링크: ' : '· 링크2: ')) . $button->u2 : '') .
|
||||
($button->tg ? '<br>· 아웃링크: ' . $button->tg : '') . '<br>';
|
||||
|
||||
}
|
||||
} ?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
|
||||
<td class="td_category1">
|
||||
<select name="kp_alt_send[<?php echo $row['kp_id']; ?>]" id="alt_send_<?php echo $row['kp_id']; ?>" style="min-width: 150px;">
|
||||
<option value="1" <?php echo $row['kp_alt_send'] == '1' ? 'selected' : ''; ?>>대체문자발송</option>
|
||||
<option value="0" <?php echo $row['kp_alt_send'] == '0' ? 'selected' : ''; ?>>사용안함</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }
|
||||
if ($ci == 0) echo '<tr><td colspan="7" class="empty_table">등록된 프리셋이 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 상단 버튼 [템플릿관리, 전송내역, 일괄수정] -->
|
||||
<div class="btn_fixed_top">
|
||||
<a href="#" class="btn btn_02 btn_template_manage" id="btnTemplateManage">템플릿관리</a>
|
||||
<a href="#" class="btn btn_02 btn_send_manage" id="btnSendManage">전송내역</a>
|
||||
<input type="submit" value="일괄수정" class="btn_submit btn" accesskey="s">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
// 템플릿 미리보기 열기
|
||||
document.querySelectorAll('.btn_template_preview_open').forEach(button => {
|
||||
button.addEventListener('click', () => {
|
||||
// 모든 preview 닫기
|
||||
document.querySelectorAll('.template_preview').forEach(preview => {
|
||||
preview.classList.remove('is-visible');
|
||||
});
|
||||
|
||||
const previewBox = button.nextElementSibling;
|
||||
if (previewBox?.classList.contains('template_preview')) previewBox.classList.add('is-visible');
|
||||
});
|
||||
});
|
||||
|
||||
// 템플릿 미리보기 닫기
|
||||
document.querySelectorAll('.btn_template_preview_close').forEach(closeBtn => {
|
||||
closeBtn.addEventListener('click', () => {
|
||||
const previewBox = closeBtn.closest('.template_preview');
|
||||
if (previewBox) previewBox.classList.remove('is-visible')
|
||||
});
|
||||
});
|
||||
|
||||
// 변수 리스트 및 버튼 링크 리스트 토글 함수 리팩토링
|
||||
function setupToggleSection(toggleId, tableId, toggleTextClass = '.btn_toggle_text') {
|
||||
const toggleBtn = document.getElementById(toggleId);
|
||||
const table = document.getElementById(tableId);
|
||||
|
||||
if (toggleBtn && table) {
|
||||
toggleBtn.addEventListener('click', () => {
|
||||
const toggleText = toggleBtn.querySelector(toggleTextClass);
|
||||
table.classList.toggle('is-visible');
|
||||
const isVisible = table.classList.contains('is-visible');
|
||||
if (toggleText) toggleText.textContent = isVisible ? '▲' : '▼';
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
setupToggleSection('variable_toggle', 'variable_table');
|
||||
setupToggleSection('button_link_toggle', 'button_link_table');
|
||||
|
||||
// 템플릿 관리 팝업: [정의] openKakao5PopupFromAjax() - js/kakao5.js
|
||||
document.querySelectorAll('#btnTemplateManageInfo, #btnTemplateManage').forEach(btn => {
|
||||
btn.addEventListener('click', async(e) => {
|
||||
e.preventDefault();
|
||||
await openKakao5PopupFromAjax('<?php echo G5_KAKAO5_URL; ?>', 1);
|
||||
});
|
||||
});
|
||||
|
||||
// 전송내역 팝업: [정의] openKakao5PopupFromAjax() - js/kakao5.js
|
||||
document.querySelectorAll('#btnSendManage').forEach(btn => {
|
||||
btn.addEventListener('click', async(e) => {
|
||||
e.preventDefault();
|
||||
await openKakao5PopupFromAjax('<?php echo G5_KAKAO5_URL; ?>', 2);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php } ?>
|
||||
@ -1,37 +0,0 @@
|
||||
<?php
|
||||
$sub_menu = "100320";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check_menu($auth, $sub_menu, "w");
|
||||
|
||||
check_demo();
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$g5['title'] = "알림톡 프리셋 관리";
|
||||
|
||||
// 알림톡 프리셋 일괄 업데이트
|
||||
$kp_active = isset($_REQUEST['kp_active']) ? $_REQUEST['kp_active'] : array();
|
||||
$kp_template_name = isset($_REQUEST['kp_template_name']) ? $_REQUEST['kp_template_name'] : array();
|
||||
$kp_alt_send = isset($_REQUEST['kp_alt_send']) ? $_REQUEST['kp_alt_send'] : array();
|
||||
|
||||
// DB에서 전체 프리셋 목록 조회
|
||||
$presets = array();
|
||||
$sql = "SELECT kp_id, kp_active, kp_template_name, kp_alt_send FROM {$g5['kakao5_preset_table']}";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$kp_id = $row['kp_id'];
|
||||
|
||||
$active = isset($kp_active[$kp_id]) ? (int)$kp_active[$kp_id] : 0;
|
||||
$template_name = isset($kp_template_name[$kp_id]) ? sql_escape_string($kp_template_name[$kp_id]) : '';
|
||||
$alt_send = isset($kp_alt_send[$kp_id]) ? (int)$kp_alt_send[$kp_id] : 0;
|
||||
|
||||
// 값이 하나라도 다르면 UPDATE
|
||||
if ($row['kp_active'] != $active || $row['kp_template_name'] != $template_name || $row['kp_alt_send'] != $alt_send) {
|
||||
$sql = "UPDATE {$g5['kakao5_preset_table']} SET kp_active = '{$active}', kp_template_name = '{$template_name}', kp_alt_send = '{$alt_send}' WHERE kp_id = '{$kp_id}'";
|
||||
sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
goto_url(G5_ADMIN_URL.'/alimtalkpreset.php?' . $qstr);
|
||||
@ -112,7 +112,6 @@ $sql = " insert into {$g5['board_table']}
|
||||
bo_notice = '{$board['bo_notice']}',
|
||||
bo_upload_count = '{$board['bo_upload_count']}',
|
||||
bo_use_email = '{$board['bo_use_email']}',
|
||||
bo_use_kakaotalk = '{$board['bo_use_kakaotalk']}',
|
||||
bo_use_cert = '{$board['bo_use_cert']}',
|
||||
bo_use_sns = '{$board['bo_use_sns']}',
|
||||
bo_use_captcha = '{$board['bo_use_captcha']}',
|
||||
|
||||
@ -89,11 +89,6 @@ if (!isset($board['bo_select_editor'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_select_editor` VARCHAR(50) NOT NULL DEFAULT '' AFTER `bo_use_dhtml_editor` ", false);
|
||||
}
|
||||
|
||||
// SMS/알림톡 사용 여부 추가
|
||||
if (!isset($board['bo_use_kakaotalk'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_use_kakaotalk` VARCHAR(50) NOT NULL DEFAULT '' AFTER `bo_use_email` ", false);
|
||||
}
|
||||
|
||||
$board_default = array(
|
||||
'bo_mobile_subject'=>'',
|
||||
'bo_device'=>'',
|
||||
@ -136,7 +131,6 @@ $board_default = array(
|
||||
'bo_mobile_content_tail'=>'',
|
||||
'bo_insert_content'=>'',
|
||||
'bo_sort_field'=>'',
|
||||
'bo_use_kakaotalk'=>0,
|
||||
);
|
||||
|
||||
for ($i = 0; $i <= 10; $i++) {
|
||||
@ -708,19 +702,6 @@ $pg_anchor = '<ul class="anchor">
|
||||
<label for="chk_all_use_email">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_use_kakaotalk">SMS/알림톡 사용</label></th>
|
||||
<td>
|
||||
<input type="checkbox" name="bo_use_kakaotalk" value="1" id="bo_use_kakaotalk" <?php echo $board['bo_use_kakaotalk']?'checked':''; ?>>
|
||||
사용
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_use_kakaotalk" value="1" id="chk_grp_use_kakaotalk">
|
||||
<label for="chk_grp_use_kakaotalk">그룹적용</label>
|
||||
<input type="checkbox" name="chk_all_use_kakaotalk" value="1" id="chk_all_use_kakaotalk">
|
||||
<label for="chk_all_use_kakaotalk">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_use_cert">본인확인 사용</label></th>
|
||||
<td>
|
||||
|
||||
@ -121,7 +121,6 @@ $bo_use_list_view = isset($_POST['bo_use_list_view']) ? (int) $_POST['bo_use_lis
|
||||
$bo_use_list_file = isset($_POST['bo_use_list_file']) ? (int) $_POST['bo_use_list_file'] : 0;
|
||||
$bo_use_list_content = isset($_POST['bo_use_list_content']) ? (int) $_POST['bo_use_list_content'] : 0;
|
||||
$bo_use_email = isset($_POST['bo_use_email']) ? (int) $_POST['bo_use_email'] : 0;
|
||||
$bo_use_kakaotalk = isset($_POST['bo_use_kakaotalk']) ? (int) $_POST['bo_use_kakaotalk'] : 0;
|
||||
$bo_use_sns = isset($_POST['bo_use_sns']) ? (int) $_POST['bo_use_sns'] : 0;
|
||||
$bo_use_captcha = isset($_POST['bo_use_captcha']) ? (int) $_POST['bo_use_captcha'] : 0;
|
||||
$bo_table_width = isset($_POST['bo_table_width']) ? (int) $_POST['bo_table_width'] : 0;
|
||||
@ -224,7 +223,6 @@ $sql_common = " gr_id = '{$gr_id}',
|
||||
bo_use_list_file = '{$bo_use_list_file}',
|
||||
bo_use_list_content = '{$bo_use_list_content}',
|
||||
bo_use_email = '{$bo_use_email}',
|
||||
bo_use_kakaotalk = '{$bo_use_kakaotalk}',
|
||||
bo_use_cert = '{$bo_use_cert}',
|
||||
bo_use_sns = '{$bo_use_sns}',
|
||||
bo_use_captcha = '{$bo_use_captcha}',
|
||||
@ -409,7 +407,6 @@ if (is_checked('chk_grp_use_list_view')) $grp_fields .= " , bo_use_list_v
|
||||
if (is_checked('chk_grp_use_list_file')) $grp_fields .= " , bo_use_list_file = '{$bo_use_list_file}' ";
|
||||
if (is_checked('chk_grp_use_list_content')) $grp_fields .= " , bo_use_list_content = '{$bo_use_list_content}' ";
|
||||
if (is_checked('chk_grp_use_email')) $grp_fields .= " , bo_use_email = '{$bo_use_email}' ";
|
||||
if (is_checked('chk_grp_use_kakaotalk')) $grp_fields .= " , bo_use_kakaotalk = '{$bo_use_kakaotalk}' ";
|
||||
if (is_checked('chk_grp_use_cert')) $grp_fields .= " , bo_use_cert = '{$bo_use_cert}' ";
|
||||
if (is_checked('chk_grp_use_sns')) $grp_fields .= " , bo_use_sns = '{$bo_use_sns}' ";
|
||||
if (is_checked('chk_grp_use_captcha')) $grp_fields .= " , bo_use_captcha = '{$bo_use_captcha}' ";
|
||||
@ -500,7 +497,6 @@ if (is_checked('chk_all_use_list_view')) $all_fields .= " , bo_use_list_v
|
||||
if (is_checked('chk_all_use_list_file')) $all_fields .= " , bo_use_list_file = '{$bo_use_list_file}' ";
|
||||
if (is_checked('chk_all_use_list_content')) $all_fields .= " , bo_use_list_content = '{$bo_use_list_content}' ";
|
||||
if (is_checked('chk_all_use_email')) $all_fields .= " , bo_use_email = '{$bo_use_email}' ";
|
||||
if (is_checked('chk_all_use_kakaotalk')) $all_fields .= " , bo_use_kakaotalk = '{$bo_use_kakaotalk}' ";
|
||||
if (is_checked('chk_all_use_cert')) $all_fields .= " , bo_use_cert = '{$bo_use_cert}' ";
|
||||
if (is_checked('chk_all_use_sns')) $all_fields .= " , bo_use_sns = '{$bo_use_sns}' ";
|
||||
if (is_checked('chk_all_use_captcha')) $all_fields .= " , bo_use_captcha = '{$bo_use_captcha}' ";
|
||||
|
||||
@ -8,8 +8,6 @@ if ($is_admin != 'super') {
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
}
|
||||
|
||||
include_once(G5_KAKAO5_PATH.'/kakao5.lib.php'); // 카카오톡 설정 확인
|
||||
|
||||
// https://github.com/gnuboard/gnuboard5/issues/296 이슈처리
|
||||
$sql = " select * from {$g5['config_table']} limit 1";
|
||||
$config = sql_fetch($sql);
|
||||
@ -424,20 +422,6 @@ if (!isset($config['cf_cert_kcp_enckey'])) {
|
||||
$config['cf_cert_kcp_enckey'] = '';
|
||||
}
|
||||
|
||||
// 카카오톡 설정 필드 추가
|
||||
if (!isset($config['cf_kakaotalk_use'])) {
|
||||
sql_query(
|
||||
" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_kakaotalk_use` varchar(50) NOT NULL DEFAULT '' AFTER `cf_recaptcha_secret_key`,
|
||||
ADD `cf_kakaotalk_corpnum` varchar(50) NOT NULL DEFAULT '' AFTER `cf_kakaotalk_use`,
|
||||
ADD `cf_kakaotalk_sender_hp` varchar(50) NOT NULL DEFAULT '' AFTER `cf_kakaotalk_corpnum`,
|
||||
ADD `cf_popbill_userid` varchar(100) NOT NULL DEFAULT '' AFTER `cf_kakaotalk_sender_hp`,
|
||||
ADD `cf_popbill_link_id` varchar(100) NOT NULL DEFAULT '' AFTER `cf_popbill_userid`,
|
||||
ADD `cf_popbill_secretkey` varchar(255) NOT NULL DEFAULT '' AFTER `cf_popbill_link_id` ",
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
// 광고성 정보 수신 동의 사용 필드 추가
|
||||
if (!isset($config['cf_use_promotion'])) {
|
||||
sql_query(
|
||||
@ -478,10 +462,10 @@ $pg_anchor = '<ul class="anchor">
|
||||
<li><a href="#anc_cf_join">회원가입</a></li>
|
||||
<li><a href="#anc_cf_cert">본인확인</a></li>
|
||||
<li><a href="#anc_cf_url">짧은주소</a></li>
|
||||
<li><a href="#anc_cf_mail">기본알림환경</a></li>
|
||||
<li><a href="#anc_cf_article_mail">글작성알림</a></li>
|
||||
<li><a href="#anc_cf_join_mail">가입알림</a></li>
|
||||
<li><a href="#anc_cf_vote_mail">투표알림</a></li>
|
||||
<li><a href="#anc_cf_mail">기본메일환경</a></li>
|
||||
<li><a href="#anc_cf_article_mail">글작성메일</a></li>
|
||||
<li><a href="#anc_cf_join_mail">가입메일</a></li>
|
||||
<li><a href="#anc_cf_vote_mail">투표메일</a></li>
|
||||
<li><a href="#anc_cf_sns">SNS</a></li>
|
||||
<li><a href="#anc_cf_lay">레이아웃 추가설정</a></li>
|
||||
<li><a href="#anc_cf_sms">SMS</a></li>
|
||||
@ -1156,12 +1140,12 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
?>
|
||||
|
||||
<section id="anc_cf_mail">
|
||||
<h2 class="h2_frm">기본 알림 환경 설정</h2>
|
||||
<h2 class="h2_frm">기본 메일 환경 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption>기본 알림 환경 설정</caption>
|
||||
<caption>기본 메일 환경 설정</caption>
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
@ -1189,85 +1173,19 @@ 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' : ''; ?>> 회원만 사용
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_kakaotalk_use">카카오톡 사용</label></th>
|
||||
<td>
|
||||
<?php echo help("카카오톡 발송 서비스 회사를 선택하십시오. 서비스 회사를 선택하지 않으면, 카카오톡 발송 기능이 동작하지 않습니다."); ?>
|
||||
<select name="cf_kakaotalk_use" id="cf_kakaotalk_use">
|
||||
<option value="" <?php echo get_selected($config['cf_kakaotalk_use'], ''); ?>>사용안함</option>
|
||||
<option value="popbill" <?php echo get_selected($config['cf_kakaotalk_use'], 'popbill'); ?>>팝빌</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">사업자등록번호</th>
|
||||
<td>
|
||||
<?php echo help('서비스 등록 시 사용했던 사업자등록번호를 입력하세요.'); ?>
|
||||
<input type="text" name="cf_kakaotalk_corpnum" id="cf_kakaotalk_corpnum" value="<?php echo get_sanitize_input($config['cf_kakaotalk_corpnum']); ?>" class="frm_input" size="30">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">회신번호</th>
|
||||
<td>
|
||||
<?php echo help('대체문자 발송 시 사용할 회신번호를 입력하세요.'); ?>
|
||||
<input type="text" name="cf_kakaotalk_sender_hp" id="cf_kakaotalk_sender_hp" value="<?php echo get_sanitize_input($config['cf_kakaotalk_sender_hp']); ?>" class="frm_input" size="30">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_popbill_userid">팝빌 회원아이디</label></th>
|
||||
<td>
|
||||
<?php echo help('팝빌에 가입한 회원 아이디를 입력하세요.'); ?>
|
||||
<input type="text" name="cf_popbill_userid" id="cf_popbill_userid" value="<?php echo get_sanitize_input($config['cf_popbill_userid']); ?>" class="frm_input" size="30">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_popbill_link_id">팝빌 링크아이디(LinkID)</label></th>
|
||||
<td>
|
||||
<?php echo help('팝빌에서 발급한 API KEY - 링크아이디(LinkID)를 입력하세요.'); ?>
|
||||
<input type="text" name="cf_popbill_link_id" id="cf_popbill_link_id" value="<?php echo get_sanitize_input($config['cf_popbill_link_id']); ?>" class="frm_input" size="30">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_popbill_secretkey">팝빌 비밀키(SecretKey)</label></th>
|
||||
<td>
|
||||
<?php echo help('팝빌에서 발급한 API KEY - 비밀키(SecretKey)를 입력하세요.'); ?>
|
||||
<input type="text" name="cf_popbill_secretkey" id="cf_popbill_secretkey" value="<?php echo get_sanitize_input($config['cf_popbill_secretkey']); ?>" class="frm_input" size="60">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_phone">팝빌 설정 확인 및 포인트 조회</label></th>
|
||||
<td>
|
||||
<!-- 팝빌 설정 확인 및 잔여포인트 조회 -->
|
||||
<?php echo help("팝빌 설정 정보를 확인하고, 잔여 포인트를 조회할 수 있습니다.<br>설정 확인 버튼을 클릭하면 팝빌 API와의 연결 상태 및 포인트 정보를 확인할 수 있습니다."); ?>
|
||||
<button type="button" class="btn btn_02" id="btn_check_popbill">설정 확인</button>
|
||||
<div id="popbill_check_result"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">팝빌 연동신청</th>
|
||||
<td>
|
||||
<?php echo help('팝빌 연동신청이 필요할 경우 아래 버튼을 클릭하세요.<br>회원가입 시 연동회원으로 선택후 링크아이디 [SIRSOFT]를 넣어주세요.'); ?>
|
||||
<a href="https://www.popbill.com/App/SignUp" target="_blank" class="btn_frmline">팝빌 연동신청</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">알림톡 프리셋 설정</th>
|
||||
<td>
|
||||
<a href="<?php echo G5_ADMIN_URL; ?>/alimtalkpreset.php" class="btn_frmline">환경설정 > 알림톡프리셋관리</a> 에서 설정하실 수 있습니다.
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<section id="anc_cf_article_mail">
|
||||
<h2 class="h2_frm">게시판 글 작성 시 알림 설정</h2>
|
||||
<h2 class="h2_frm">게시판 글 작성 시 메일 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption>게시판 글 작성 시 알림 설정</caption>
|
||||
<caption>게시판 글 작성 시 메일 설정</caption>
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
@ -1315,12 +1233,12 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
|
||||
|
||||
<section id="anc_cf_join_mail">
|
||||
<h2 class="h2_frm">회원가입 시 알림 설정</h2>
|
||||
<h2 class="h2_frm">회원가입 시 메일 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption>회원가입 시 알림 설정</caption>
|
||||
<caption>회원가입 시 메일 설정</caption>
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
@ -1347,12 +1265,12 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
|
||||
|
||||
<section id="anc_cf_vote_mail">
|
||||
<h2 class="h2_frm">투표 기타의견 작성 시 알림 설정</h2>
|
||||
<h2 class="h2_frm">투표 기타의견 작성 시 메일 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption>투표 기타의견 작성 시 알림 설정</caption>
|
||||
<caption>투표 기타의견 작성 시 메일 설정</caption>
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
@ -1849,50 +1767,6 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- 카카오톡 - 팝빌 설정 확인 -->
|
||||
<?php add_javascript('<script src="'.G5_JS_URL.'/kakao5.js"></script>', 1); // 카카오톡5 솔루션 js 추가 ?>
|
||||
<script>
|
||||
$(function() {
|
||||
$('#btn_check_popbill').on('click', function() {
|
||||
var $resultDiv = $('#popbill_check_result');
|
||||
$resultDiv.html('<i class="fa fa-spinner fa-spin"></i> 확인 중...');
|
||||
|
||||
$.ajax({
|
||||
url: '<?php echo G5_KAKAO5_URL;?>/ajax.check_popbill.php',
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
var html = '';
|
||||
if (data.error) {
|
||||
html = '<div class="alert alert-danger" style="margin-top:10px;"><i class="fa fa-exclamation-triangle"></i> ' + data.error + '</div>';
|
||||
} else {
|
||||
html = '<div class="alert alert-success"><i class="fa fa-check-circle"></i> 팝빌이 정상적으로 설정되었습니다.</div>';
|
||||
if (typeof data.balance !== 'undefined') {
|
||||
html += '<div class="alert alert-info"><i class="fa fa-info-circle"></i> 잔여포인트: ' + Number(data.balance).toLocaleString() + '원';
|
||||
html += ' <a href="#" id="btn_point_charge" class="btn btn_02">포인트 충전하기</a>';
|
||||
html += '</div>';
|
||||
}
|
||||
}
|
||||
$resultDiv.html(html); // 팝빌 설정 결과 출력
|
||||
$('#btn_check_popbill').hide();
|
||||
|
||||
// 포인트 충전 팝업: [정의] openKakao5PopupFromAjax() - js/kakao5.js
|
||||
var $chargeBtn = $('#btn_point_charge');
|
||||
if ($chargeBtn.length) {
|
||||
$chargeBtn.off('click').on('click', async function(e) {
|
||||
e.preventDefault();
|
||||
await openKakao5PopupFromAjax('<?php echo G5_KAKAO5_URL; ?>', 5);
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
$resultDiv.html('<div class="alert alert-danger"><i class="fa fa-exclamation-triangle"></i> 네트워크 오류</div>');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
// 본인확인 모듈 실행권한 체크
|
||||
if ($config['cf_cert_use']) {
|
||||
|
||||
@ -158,13 +158,7 @@ $check_keys = array(
|
||||
'cf_icode_server_ip' => 'char',
|
||||
'cf_captcha' => 'char',
|
||||
'cf_syndi_token' => '',
|
||||
'cf_syndi_except' => '',
|
||||
'cf_kakaotalk_use' => 'char',
|
||||
'cf_kakaotalk_corpnum' => 'char',
|
||||
'cf_kakaotalk_sender_hp' => 'char',
|
||||
'cf_popbill_userid' => 'char',
|
||||
'cf_popbill_link_id' => 'char',
|
||||
'cf_popbill_secretkey' => 'char'
|
||||
'cf_syndi_except' => ''
|
||||
);
|
||||
|
||||
for ($i = 1; $i <= 10; $i++) {
|
||||
@ -356,12 +350,6 @@ $sql = " update {$g5['config_table']}
|
||||
cf_recaptcha_secret_key = '{$_POST['cf_recaptcha_secret_key']}',
|
||||
cf_payco_clientid = '{$_POST['cf_payco_clientid']}',
|
||||
cf_payco_secret = '{$_POST['cf_payco_secret']}',
|
||||
cf_kakaotalk_use = '{$_POST['cf_kakaotalk_use']}',
|
||||
cf_kakaotalk_corpnum = '{$_POST['cf_kakaotalk_corpnum']}',
|
||||
cf_kakaotalk_sender_hp = '{$_POST['cf_kakaotalk_sender_hp']}',
|
||||
cf_popbill_userid = '{$_POST['cf_popbill_userid']}',
|
||||
cf_popbill_link_id = '{$_POST['cf_popbill_link_id']}',
|
||||
cf_popbill_secretkey = '{$_POST['cf_popbill_secretkey']}',
|
||||
cf_1_subj = '{$_POST['cf_1_subj']}',
|
||||
cf_2_subj = '{$_POST['cf_2_subj']}',
|
||||
cf_3_subj = '{$_POST['cf_3_subj']}',
|
||||
|
||||
@ -104,8 +104,6 @@ h2{font-size: 1.083em;font-weight: bold;margin:10px 0}
|
||||
#gnb .on .btn_op.menu-400{background:url(../img/menu-7.png) 50% 50% no-repeat #fff}
|
||||
#gnb .gnb_li .btn_op.menu-500{background:url(../img/menu-6-1.png) 50% 50% no-repeat #ebebeb }
|
||||
#gnb .on .btn_op.menu-500{background:url(../img/menu-6.png) 50% 50% no-repeat #fff}
|
||||
#gnb .gnb_li .btn_op.menu-800{background:url(../img/menu-8-1.png) 50% 50% no-repeat #ebebeb }
|
||||
#gnb .on .btn_op.menu-800{background:url(../img/menu-8.png) 50% 50% no-repeat #fff}
|
||||
#gnb .gnb_li .btn_op.menu-900{background:url(../img/menu-4-1.png) 50% 50% no-repeat #ebebeb }
|
||||
#gnb .on .btn_op.menu-900{background:url(../img/menu-4.png) 50% 50% no-repeat #fff}
|
||||
#gnb .gnb_li button:hover{background-color:#f3f3f3}
|
||||
@ -233,8 +231,6 @@ a.btn_submit{background:#ff4081;color:#fff}
|
||||
|
||||
.btn_02,a.btn_02{background:#9eacc6;color:#fff;}
|
||||
.btn_03,a.btn_03{background:#3f51b5;color:#fff;}
|
||||
.btn_04,a.btn_04{background:#555;color:#fff}
|
||||
.btn_04:hover,a.btn_04:hover{background:#666}
|
||||
|
||||
.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}
|
||||
@ -1221,25 +1217,4 @@ input[type="text"]{max-width:200px}
|
||||
@media only screen and (max-device-width : 480px) and (orientation : portrait){
|
||||
/* Styles */
|
||||
input[type="text"]{max-width:200px}
|
||||
}
|
||||
|
||||
/* 쇼핑몰관리 > 알림톡프리셋관리 */
|
||||
.template_preview {display:none;z-index:10;position:absolute;padding:20px;width:400px;min-height:300px;max-height:300px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;text-align: left;}
|
||||
.template_preview_txt {padding:10px;width:100%;height:300px;border:1px solid #696c71;background:#f7f7f7;overflow-y:scroll;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}
|
||||
.btn_template_preview_open {padding:5px 10px;width:77px;height:30px;line-height:10px;border:0;border-radius:5px;background:#484848;color:#fff}
|
||||
.btn_template_preview_close {margin:0;padding:0;width:100%;height:40px;line-height:40px;border:0;background:#484848;color:#fff}
|
||||
.variable_table {overflow:hidden;max-height:0;transition:max-height 0.7s}
|
||||
.variable_table.is-visible {max-height:1000px !important;}
|
||||
.variable_table .tbl_head01 tbody td {background-color: #fff;}
|
||||
|
||||
.preset-toggle{position:relative;display:inline-block;width:50px;height:24px}
|
||||
.preset-toggle input{opacity:0;width:0;height:0}
|
||||
.preset-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background:#ccc;transition:.4s;border-radius:24px}
|
||||
.preset-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background:#fff;transition:.4s;border-radius:50%}
|
||||
input:checked+.preset-slider{background:#4CAF50}
|
||||
input:checked+.preset-slider:before{transform:translateX(26px)}
|
||||
|
||||
/* 친구톡 전송 관련 */
|
||||
.kakao-send-svg { width: 16px; height: 16px; fill: currentColor; margin-bottom: -3px; }
|
||||
.kakao-setting-btn { height: auto; padding: 7px 12px; background: #3d70ff; color: white; border: none; border-radius: 6px; font-weight: 600; min-width: 110px;}
|
||||
.kakao-setting-btn:hover { background: #2c5bd3; }
|
||||
}
|
||||
@ -289,101 +289,6 @@ if($g5['sms5_prefix'] != 'sms5_' && sql_num_rows(sql_query("show tables like 'sm
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// 카카오톡 프리셋 테이블
|
||||
if( isset($g5['kakao5_preset_table']) && !sql_query(" DESC {$g5['kakao5_preset_table']} ", false)) {
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['kakao5_preset_table']}` (
|
||||
`kp_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`kp_type` varchar(20) NOT NULL DEFAULT '',
|
||||
`kp_category` varchar(20) NOT NULL DEFAULT '',
|
||||
`kp_preset_code` varchar(100) NOT NULL DEFAULT '',
|
||||
`kp_preset_name` varchar(100) NOT NULL DEFAULT '',
|
||||
`kp_template_name` varchar(100) NOT NULL DEFAULT '',
|
||||
`kp_alt_send` varchar(100) NOT NULL DEFAULT '1',
|
||||
`kp_active` tinyint(1) NOT NULL DEFAULT '1',
|
||||
`kp_created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`kp_updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`kp_id`)
|
||||
) ", true);
|
||||
|
||||
// 기본 프리셋 데이터 추가
|
||||
sql_query("INSERT INTO `{$g5['kakao5_preset_table']}`
|
||||
(`kp_type`, `kp_category`, `kp_preset_code`, `kp_preset_name`, `kp_template_name`, `kp_alt_send`, `kp_active`, `kp_created_at`, `kp_updated_at`)
|
||||
VALUES
|
||||
('회원', '회원', 'CU-MB01', '회원가입완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
('최고관리자', '회원', 'AD-MB01', '회원가입완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
|
||||
('작성자', '게시판', 'CU-BO01', '새 게시글 작성', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
('최고관리자', '게시판', 'AD-BO01', '새 게시글 작성', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
('그룹관리자', '게시판', 'AD-BO02', '새 게시글 작성', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
('게시판관리자', '게시판', 'AD-BO03', '새 게시글 작성', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
('작성자', '게시판', 'CU-BO02', '새 댓글 작성', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
('댓글 작성자', '게시판', 'CU-BO03', '새 댓글 작성', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
('답변글 작성자', '게시판', 'CU-BO04', '답변글 작성', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
('최고관리자', '투표', 'AD-VO01', '기타의견 작성', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
|
||||
('주문자', '쇼핑몰', 'CU-OR01', '주문 완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
('최고관리자', '쇼핑몰', 'AD-OR01', '주문 완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
('주문자', '쇼핑몰', 'CU-OR02', '무통장입금 주문 완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
('최고관리자', '쇼핑몰', 'AD-OR02', '무통장입금 주문 완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
('주문자', '쇼핑몰', 'CU-OR03', '무통장입금 완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
('최고관리자', '쇼핑몰', 'AD-OR03', '무통장입금 완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
('주문자', '쇼핑몰', 'CU-OR04', '(주문자)주문 취소', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
('최고관리자', '쇼핑몰', 'AD-OR04', '(주문자)주문 취소', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
('주문자', '쇼핑몰', 'CU-OR05', '(관리자)주문 취소', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
('최고관리자', '쇼핑몰', 'AD-OR05', '(관리자)주문 취소', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
('주문자', '쇼핑몰', 'CU-OR06', '반품', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
('주문자', '쇼핑몰', 'CU-OR07', '품절', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
('주문자', '쇼핑몰', 'CU-DE01', '배송 준비', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
('주문자', '쇼핑몰', 'CU-DE02', '배송중', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
('주문자', '쇼핑몰', 'CU-DE03', '배송 완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
('요청자', '쇼핑몰', 'CU-ST01', '재입고알림', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
|
||||
('문의자', '1:1문의', 'CU-IQ01', '문의 등록', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
('최고관리자', '1:1문의', 'AD-IQ01', '문의 등록', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
|
||||
('문의자', '1:1문의', 'CU-IQ02', '답변 등록', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
|
||||
", true);
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// 카카오톡 프리셋 전송내역 테이블
|
||||
if( isset($g5['kakao5_preset_history_table']) && !sql_query(" DESC {$g5['kakao5_preset_history_table']} ", false)) {
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['kakao5_preset_history_table']}` (
|
||||
`ph_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`kp_id` int(11) NOT NULL DEFAULT '0',
|
||||
`mb_id` varchar(20) NOT NULL DEFAULT '',
|
||||
`ph_rcvnm` varchar(100) NOT NULL DEFAULT '',
|
||||
`ph_rcv` varchar(100) NOT NULL DEFAULT '',
|
||||
`ph_template_code` varchar(100) NOT NULL DEFAULT '',
|
||||
`ph_alt_send` varchar(100) NOT NULL DEFAULT '',
|
||||
`ph_request_num` varchar(100) NOT NULL DEFAULT '',
|
||||
`ph_receipt_num` varchar(100) NOT NULL DEFAULT '',
|
||||
`ph_send_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`ph_state` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`ph_log` text NOT NULL,
|
||||
PRIMARY KEY (`ph_id`),
|
||||
KEY `kp_id` (`kp_id`),
|
||||
KEY `mb_id` (`mb_id`)
|
||||
) ", true);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// 카카오톡 설정 필드 추가
|
||||
if (!isset($config['cf_kakaotalk_use'])) {
|
||||
sql_query(
|
||||
" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_kakaotalk_use` varchar(50) NOT NULL DEFAULT '' AFTER `cf_recaptcha_secret_key`,
|
||||
ADD `cf_kakaotalk_corpnum` varchar(50) NOT NULL DEFAULT '' AFTER `cf_kakaotalk_use`,
|
||||
ADD `cf_kakaotalk_sender_hp` varchar(50) NOT NULL DEFAULT '' AFTER `cf_kakaotalk_corpnum`,
|
||||
ADD `cf_popbill_userid` varchar(100) NOT NULL DEFAULT '' AFTER `cf_kakaotalk_sender_hp`,
|
||||
ADD `cf_popbill_link_id` varchar(100) NOT NULL DEFAULT '' AFTER `cf_popbill_userid`,
|
||||
ADD `cf_popbill_secretkey` varchar(255) NOT NULL DEFAULT '' AFTER `cf_popbill_link_id` ",
|
||||
true
|
||||
);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// 광고성 정보 수신 동의 사용 필드 추가
|
||||
if (!isset($config['cf_use_promotion'])) {
|
||||
sql_query(
|
||||
@ -412,47 +317,6 @@ if (!isset($member['mb_marketing_agree'])) {
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// 게시판 설정 - SMS/알림톡 사용 여부 추가
|
||||
if(!sql_query(" select bo_use_kakaotalk from {$g5['board_table']} limit 1", false)) {
|
||||
sql_query(
|
||||
" ALTER TABLE `{$g5['board_table']}`
|
||||
ADD `bo_use_kakaotalk` VARCHAR(50) NOT NULL DEFAULT '' AFTER `bo_use_email` ",
|
||||
true
|
||||
);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// 게시판 알림 설정 필드 추가
|
||||
if (!isset($member['mb_board_post'])) {
|
||||
sql_query(
|
||||
" ALTER TABLE `{$g5['member_table']}`
|
||||
ADD `mb_board_post` tinyint(1) NOT NULL DEFAULT '0' AFTER `mb_agree_log`,
|
||||
ADD `mb_board_reply` tinyint(1) NOT NULL DEFAULT '0' AFTER `mb_board_post`,
|
||||
ADD `mb_board_comment` tinyint(1) NOT NULL DEFAULT '0' AFTER `mb_board_reply`,
|
||||
ADD `mb_board_recomment` tinyint(1) NOT NULL DEFAULT '0' AFTER `mb_board_comment` ",
|
||||
true
|
||||
);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// 재입고 알림 - 채널 구분 (1=SMS, 2=알림톡)
|
||||
if (defined('G5_USE_SHOP') && G5_USE_SHOP) {
|
||||
if(sql_query(" DESC {$g5['g5_shop_item_stocksms_table']} ", false)) {
|
||||
if(!sql_query(" select ss_channel from {$g5['g5_shop_item_stocksms_table']} limit 1", false)) {
|
||||
sql_query(
|
||||
" ALTER TABLE `{$g5['g5_shop_item_stocksms_table']}`
|
||||
ADD `ss_channel` tinyint(4) NOT NULL DEFAULT '1' AFTER `ss_ip` ",
|
||||
true
|
||||
);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$is_check = run_replace('admin_dbupgrade', $is_check);
|
||||
|
||||
$db_upgrade_msg = $is_check ? 'DB 업그레이드가 완료되었습니다.' : '더 이상 업그레이드 할 내용이 없습니다.<br>현재 DB 업그레이드가 완료된 상태입니다.';
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.0 KiB |
@ -57,10 +57,6 @@ if ($w == '') {
|
||||
$mb['mb_level'] = $config['cf_register_level'];
|
||||
$mb['mb_marketing_agree'] = 0;
|
||||
$mb['mb_thirdparty_agree'] = 0;
|
||||
$mb['mb_board_post'] = 1;
|
||||
$mb['mb_board_reply'] = 1;
|
||||
$mb['mb_board_comment'] = 1;
|
||||
$mb['mb_board_recomment'] = 1;
|
||||
$html_title = '추가';
|
||||
} elseif ($w == 'u') {
|
||||
$mb = get_member($mb_id);
|
||||
@ -154,19 +150,6 @@ $mb_marketing_agree_no = !$mb['mb_marketing_agree'] ? 'checked="checked"' :
|
||||
$mb_thirdparty_agree_yes = $mb['mb_thirdparty_agree'] ? 'checked="checked"' : '';
|
||||
$mb_thirdparty_agree_no = !$mb['mb_thirdparty_agree'] ? 'checked="checked"' : '';
|
||||
|
||||
// 알림 설정 (전용 컬럼 사용)
|
||||
$mb_board_post_yes = !empty($mb['mb_board_post']) ? 'checked="checked"' : '';
|
||||
$mb_board_post_no = empty($mb['mb_board_post']) ? 'checked="checked"' : '';
|
||||
|
||||
$mb_board_reply_yes = !empty($mb['mb_board_reply']) ? 'checked="checked"' : '';
|
||||
$mb_board_reply_no = empty($mb['mb_board_reply']) ? 'checked="checked"' : '';
|
||||
|
||||
$mb_board_comment_yes = !empty($mb['mb_board_comment']) ? 'checked="checked"' : '';
|
||||
$mb_board_comment_no = empty($mb['mb_board_comment']) ? 'checked="checked"' : '';
|
||||
|
||||
$mb_board_recomment_yes = !empty($mb['mb_board_recomment']) ? 'checked="checked"' : '';
|
||||
$mb_board_recomment_no = empty($mb['mb_board_recomment']) ? 'checked="checked"' : '';
|
||||
|
||||
if (isset($mb['mb_certify'])) {
|
||||
// 날짜시간형이라면 drop 시킴
|
||||
if (preg_match("/-/", $mb['mb_certify'])) {
|
||||
@ -639,42 +622,6 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
run_event('admin_member_form_add', $mb, $w, 'table');
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<th scope="row">게시글 작성 완료 알림</th>
|
||||
<td>
|
||||
<input type="radio" name="mb_board_post" value="1" id="mb_board_post_yes" <?php echo !empty($mb['mb_board_post']) ? 'checked' : ''; ?>>
|
||||
<label for="mb_board_post_yes">예</label>
|
||||
<input type="radio" name="mb_board_post" value="0" id="mb_board_post_no" <?php echo empty($mb['mb_board_post']) ? 'checked' : ''; ?>>
|
||||
<label for="mb_board_post_no">아니오</label>
|
||||
</td>
|
||||
|
||||
<th scope="row">게시글 답변 알림</th>
|
||||
<td>
|
||||
<input type="radio" name="mb_board_reply" value="1" id="mb_board_reply_yes" <?php echo !empty($mb['mb_board_reply']) ? 'checked' : ''; ?>>
|
||||
<label for="mb_board_reply_yes">예</label>
|
||||
<input type="radio" name="mb_board_reply" value="0" id="mb_board_reply_no" <?php echo empty($mb['mb_board_reply']) ? 'checked' : ''; ?>>
|
||||
<label for="mb_board_reply_no">아니오</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row">댓글 알림</th>
|
||||
<td>
|
||||
<input type="radio" name="mb_board_comment" value="1" id="mb_board_comment_yes" <?php echo !empty($mb['mb_board_comment']) ? 'checked' : ''; ?>>
|
||||
<label for="mb_board_comment_yes">예</label>
|
||||
<input type="radio" name="mb_board_comment" value="0" id="mb_board_comment_no" <?php echo empty($mb['mb_board_comment']) ? 'checked' : ''; ?>>
|
||||
<label for="mb_board_comment_no">아니오</label>
|
||||
</td>
|
||||
|
||||
<th scope="row">대댓글 알림</th>
|
||||
<td>
|
||||
<input type="radio" name="mb_board_recomment" value="1" id="mb_board_recomment_yes" <?php echo !empty($mb['mb_board_recomment']) ? 'checked' : ''; ?>>
|
||||
<label for="mb_board_recomment_yes">예</label>
|
||||
<input type="radio" name="mb_board_recomment" value="0" id="mb_board_recomment_no" <?php echo empty($mb['mb_board_recomment']) ? 'checked' : ''; ?>>
|
||||
<label for="mb_board_recomment_no">아니오</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php for ($i = 1; $i <= 10; $i++) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_<?php echo $i ?>">여분 필드 <?php echo $i ?></label></th>
|
||||
|
||||
@ -22,12 +22,6 @@ $mb_zip = isset($_POST['mb_zip']) ? preg_replace('/[^0-9a-z_]/i', '', $_
|
||||
$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';
|
||||
|
||||
// 게시판알림 설정
|
||||
$mb_board_post = isset($_POST['mb_board_post']) ? (int)$_POST['mb_board_post'] : 0;
|
||||
$mb_board_reply = isset($_POST['mb_board_reply']) ? (int)$_POST['mb_board_reply'] : 0;
|
||||
$mb_board_comment = isset($_POST['mb_board_comment']) ? (int)$_POST['mb_board_comment'] : 0;
|
||||
$mb_board_recomment = isset($_POST['mb_board_recomment']) ? (int)$_POST['mb_board_recomment'] : 0;
|
||||
|
||||
// 관리자가 자동등록방지를 사용해야 할 경우 ( 회원의 비밀번호 변경시 캡챠를 체크한다 )
|
||||
if ($mb_password) {
|
||||
include_once(G5_CAPTCHA_PATH . '/captcha.lib.php');
|
||||
@ -122,10 +116,6 @@ $sql_common = " mb_name = '{$posts['mb_name']}',
|
||||
mb_level = '{$posts['mb_level']}',
|
||||
mb_marketing_agree = '{$mb_marketing_agree}',
|
||||
mb_thirdparty_agree = '{$mb_thirdparty_agree}',
|
||||
mb_board_post = '{$mb_board_post}',
|
||||
mb_board_reply = '{$mb_board_reply}',
|
||||
mb_board_comment = '{$mb_board_comment}',
|
||||
mb_board_recomment = '{$mb_board_recomment}',
|
||||
mb_1 = '{$posts['mb_1']}',
|
||||
mb_2 = '{$posts['mb_2']}',
|
||||
mb_3 = '{$posts['mb_3']}',
|
||||
|
||||
@ -260,7 +260,7 @@ $colspan = 16;
|
||||
<td headers="mb_list_mailr" class="td_consent">
|
||||
<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="hidden" name="mb_mailling_default[<?php echo $i; ?>]" value="<?php echo $row['mb_mailling'] ?? '0'; ?> " id="mb_mailling_default_<?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 headers="mb_list_auth" class="td_mbstat">
|
||||
<?php
|
||||
@ -285,7 +285,7 @@ $colspan = 16;
|
||||
<td headers="mb_list_sms">
|
||||
<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="hidden" name="mb_sms_default[<?php echo $i; ?>]" value="<?php echo $row['mb_sms'] ?? '0'; ?> " id="mb_sms_default_<?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 headers="mb_list_adultc">
|
||||
<label for="mb_adult_<?php echo $i; ?>" class="sound_only">성인인증</label>
|
||||
|
||||
@ -49,7 +49,7 @@ function get_export_config($type = null)
|
||||
],
|
||||
];
|
||||
|
||||
return $type ? ($config[$type] ?? []) : $config;
|
||||
return $type ? (isset($config[$type]) ? $config[$type] : []) : $config;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -58,7 +58,7 @@ function get_export_config($type = null)
|
||||
function get_member_export_params()
|
||||
{
|
||||
// 친구톡 양식 - 엑셀 양식에 포함할 항목
|
||||
$fieldArray = array_map('trim', explode(',', $_GET['fields'] ?? ''));
|
||||
$fieldArray = array_map('trim', explode(',', isset($_GET['fields']) ? $_GET['fields'] : ''));
|
||||
$vars = [];
|
||||
foreach ($fieldArray as $index => $field) {
|
||||
if(!empty($field)){
|
||||
@ -68,29 +68,29 @@ function get_member_export_params()
|
||||
|
||||
$params = [
|
||||
'page' => 1,
|
||||
'formatType' => (int)($_GET['formatType'] ?? 1),
|
||||
'use_stx' => $_GET['use_stx'] ?? 0,
|
||||
'stx_cond' => clean_xss_tags($_GET['stx_cond'] ?? 'like'),
|
||||
'sfl' => clean_xss_tags($_GET['sfl'] ?? ''),
|
||||
'stx' => clean_xss_tags($_GET['stx'] ?? ''),
|
||||
'use_level' => $_GET['use_level'] ?? 0,
|
||||
'level_start' => (int)($_GET['level_start'] ?? 1),
|
||||
'level_end' => (int)($_GET['level_end'] ?? 10),
|
||||
'use_date' => $_GET['use_date'] ?? 0,
|
||||
'date_start' => clean_xss_tags($_GET['date_start'] ?? ''),
|
||||
'date_end' => clean_xss_tags($_GET['date_end'] ?? ''),
|
||||
'use_point' => $_GET['use_point'] ?? 0,
|
||||
'point' => $_GET['point'] ?? '',
|
||||
'point_cond' => $_GET['point_cond'] ?? 'gte',
|
||||
'use_hp_exist' => $_GET['use_hp_exist'] ?? 0,
|
||||
'ad_range_only' => $_GET['ad_range_only'] ?? 0,
|
||||
'ad_range_type' => clean_xss_tags($_GET['ad_range_type'] ?? 'all'),
|
||||
'ad_mailling' => $_GET['ad_mailling'] ?? 0,
|
||||
'ad_sms' => $_GET['ad_sms'] ?? 0,
|
||||
'agree_date_start' => clean_xss_tags($_GET['agree_date_start'] ?? ''),
|
||||
'agree_date_end' => clean_xss_tags($_GET['agree_date_end'] ?? ''),
|
||||
'use_intercept' => $_GET['use_intercept'] ?? 0,
|
||||
'intercept' => clean_xss_tags($_GET['intercept'] ?? 'exclude'),
|
||||
'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,
|
||||
];
|
||||
|
||||
@ -212,11 +212,10 @@ function member_export_build_where($params)
|
||||
|
||||
// 정보수신동의 조건
|
||||
if (!empty($params['ad_range_only']) && $params['ad_range_only'] === '1') {
|
||||
$range = $params['ad_range_type'] ?? '';
|
||||
$range = isset($params['ad_range_type']) ? $params['ad_range_type'] : '';
|
||||
|
||||
// 공통: 마케팅 목적 수집·이용 동의 + (필요 시) 제3자 동의
|
||||
$needs_thirdparty = ($config['cf_sms_use'] !== '' || $config['cf_kakaotalk_use'] !== '');
|
||||
$thirdparty_clause = $needs_thirdparty ? " AND mb_thirdparty_agree = 1" : "";
|
||||
$thirdparty_clause = $config['cf_sms_use'] !== '' ? " AND mb_thirdparty_agree = 1" : "";
|
||||
$base_marketing = "mb_marketing_agree = 1{$thirdparty_clause}";
|
||||
|
||||
if ($range === 'all') {
|
||||
@ -242,8 +241,8 @@ function member_export_build_where($params)
|
||||
|
||||
} else {
|
||||
// 수신동의기간 직접 입력 - custom_period
|
||||
$date_start = $params['agree_date_start'] ?? '';
|
||||
$date_end = $params['agree_date_end'] ?? '';
|
||||
$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'";
|
||||
|
||||
@ -31,25 +31,8 @@ $colspan = 14;
|
||||
<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>
|
||||
|
||||
<br>
|
||||
<p><strong>친구톡 양식</strong>은 <b>카카오톡 사용 시</b>에만 이용 가능합니다.</p>
|
||||
<?php if($config['cf_kakaotalk_use'] == "popbill") { ?>
|
||||
<p><b>친구톡 (광고성 카카오톡 포함)</b>의 경우 기존 회원 데이터 엑셀 파일 다운로드 후 상단 <b>[친구톡 보내기]</b> 버튼을 누르면 <b>팝빌 홈페이지</b>로 이동하여 업로드 진행하실 수 있습니다.</p>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php if($config['cf_kakaotalk_use'] == "popbill") { ?>
|
||||
<div class="btn_fixed_top">
|
||||
<a href="https://popbill.com/App/Kakaotalk/FTS" target="_blank" class="btn btn_submit btn kakao_setting_btn" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="kakao-send-svg">
|
||||
<path d="M2 21l21-9L2 3v7l15 2-15 2z"></path>
|
||||
</svg>
|
||||
친구톡 전송하기
|
||||
</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
<span class="btn_ov01">
|
||||
<span class="ov_txt">총건수 </span>
|
||||
@ -86,10 +69,10 @@ $colspan = 14;
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<input type="text" name="stx" value="<?php echo htmlspecialchars($_GET['stx'] ?? ''); ?>" placeholder="검색어 입력">
|
||||
<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 ($_GET['stx_cond'] ?? 'like') === 'like' ? 'checked' : ''; ?>> 포함</label>
|
||||
<label><input type="radio" name="stx_cond" value="equal" <?php echo ($_GET['stx_cond'] ?? '') === 'equal' ? 'checked' : ''; ?>> 일치</label>
|
||||
<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>
|
||||
@ -119,8 +102,8 @@ $colspan = 14;
|
||||
<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($_GET['date_start'] ?? ''); ?>"> ~
|
||||
<input type="date" name="date_end" max="9999-12-31" value="<?php echo htmlspecialchars($_GET['date_end'] ?? ''); ?>">
|
||||
<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>
|
||||
|
||||
@ -130,11 +113,11 @@ $colspan = 14;
|
||||
<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($_GET['point'] ?? ''); ?>" placeholder="포인트 입력">
|
||||
<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 ($_GET['point_cond'] ?? 'gte') === 'gte' ? 'checked' : ''; ?>> 이상</label>
|
||||
<label><input type="radio" name="point_cond" value="lte" <?php echo ($_GET['point_cond'] ?? '') === 'lte' ? 'checked' : ''; ?>> 이하</label>
|
||||
<label><input type="radio" name="point_cond" value="eq" <?php echo ($_GET['point_cond'] ?? '') === 'eq' ? 'checked' : ''; ?>> 일치</label>
|
||||
<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>
|
||||
@ -149,7 +132,7 @@ $colspan = 14;
|
||||
<?php
|
||||
// 차단회원 옵션 : [정의] get_export_config() - adm/member_list_exel.lib.php
|
||||
foreach (get_export_config('intercept_list') as $val => $label) {
|
||||
$selected = (($_GET['intercept'] ?? '') === $val) ? 'selected' : '';
|
||||
$selected = ((isset($_GET['intercept']) ? $_GET['intercept'] : '') === $val) ? 'selected' : '';
|
||||
echo "<option value=\"$val\" $selected>$label</option>";
|
||||
}
|
||||
?>
|
||||
@ -188,7 +171,7 @@ $colspan = 14;
|
||||
<select name="ad_range_type" id="ad_range_type">
|
||||
<?php
|
||||
foreach (get_export_config('ad_range_list') as $val => $label) {
|
||||
$selected = (($_GET['ad_range_type'] ?? '') === $val) ? 'selected' : '';
|
||||
$selected = ((isset($_GET['ad_range_type']) ? $_GET['ad_range_type'] : '') === $val) ? 'selected' : '';
|
||||
echo "<option value=\"$val\" $selected>$label</option>";
|
||||
}
|
||||
?>
|
||||
@ -196,17 +179,17 @@ $colspan = 14;
|
||||
|
||||
<div class="ad_range_wrap">
|
||||
<!-- 기간 직접 입력 -->
|
||||
<div class="ad_range_box <?php echo isset($_GET['ad_range_only']) && ($_GET['ad_range_type'] ?? '') == 'custom_period' ? '' : 'is-hidden'; ?>">
|
||||
<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($_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($_GET['agree_date_end'] ?? date('Y-m-d')); ?>">
|
||||
<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']) || !empty($config['cf_kakaotalk_use'])) ? ' / <b>개인정보 제3자 제공</b>' : '';
|
||||
$thirdpartyLbl = (!empty($config['cf_sms_use'])) ? ' / <b>개인정보 제3자 제공</b>' : '';
|
||||
|
||||
$ad_range_text = [
|
||||
'all' => "* <b>광고성 정보 수신(이메일 또는 SMS/카카오톡)</b> / <b>마케팅 목적의 개인정보 수집 및 이용</b>{$thirdpartyLbl}에 모두 동의한 회원을 선택합니다.",
|
||||
@ -244,11 +227,6 @@ $colspan = 14;
|
||||
|
||||
<div class="sch_btn">
|
||||
<button type="button" id="btnExcelDownload">엑셀파일 다운로드</button>
|
||||
|
||||
<?php if($config['cf_kakaotalk_use'] == "popbill") { ?>
|
||||
<button type="button" id="btnExcelDownloadPopbill">엑셀파일 다운로드 (친구톡 양식)</button>
|
||||
<?php } ?>
|
||||
|
||||
<button type="button" class="btn_reset" onclick="location.href='?'">초기화</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -280,16 +258,9 @@ let eventSource = null;
|
||||
|
||||
// 일반 엑셀 다운로드 버튼 클릭
|
||||
document.getElementById('btnExcelDownload').addEventListener('click', () => {
|
||||
startExcelDownload(1);
|
||||
startExcelDownload();
|
||||
});
|
||||
|
||||
// 팝빌 양식 다운로드 버튼 클릭
|
||||
<?php if($config['cf_kakaotalk_use'] == "popbill") { ?>
|
||||
document.getElementById('btnExcelDownloadPopbill').addEventListener('click', () => {
|
||||
showDownloadPopupPopill();
|
||||
});
|
||||
<?php } ?>
|
||||
|
||||
// 엑셀 다운로드 실행
|
||||
// 1. 기존 SSE 종료
|
||||
function closePreviousEventSource() {
|
||||
@ -300,25 +271,20 @@ function closePreviousEventSource() {
|
||||
}
|
||||
|
||||
// 2. FormData QueryString 변환
|
||||
function buildDownloadParams(formatType, selectedFields = []) {
|
||||
function buildDownloadParams(selectedFields = []) {
|
||||
const formData = new FormData(document.getElementById('fsearch'));
|
||||
const params = new URLSearchParams(formData);
|
||||
|
||||
params.append('mode', 'start');
|
||||
params.append('formatType', formatType);
|
||||
|
||||
if (formatType === 2 && selectedFields.length > 0) {
|
||||
params.append('fields', selectedFields.join(','));
|
||||
}
|
||||
|
||||
return params.toString();
|
||||
}
|
||||
|
||||
// 3. 메인 함수
|
||||
function startExcelDownload(formatType, selectedFields = []) {
|
||||
function startExcelDownload(selectedFields = []) {
|
||||
closePreviousEventSource();
|
||||
|
||||
const query = buildDownloadParams(formatType, selectedFields);
|
||||
const query = buildDownloadParams(selectedFields);
|
||||
showDownloadPopup();
|
||||
|
||||
eventSource = new EventSource(`member_list_exel_export.php?${query}`);
|
||||
@ -374,47 +340,6 @@ function handlePopupCloseWithConfirm(e) {
|
||||
PopupManager.close('popupOverlay');
|
||||
}
|
||||
|
||||
// 친구톡 양식(팝빌) - 항목 선택 팝업
|
||||
function showDownloadPopupPopill() {
|
||||
const baseFields = [
|
||||
['mb_id', '아이디'], ['mb_nick', '닉네임'], ['mb_point', '포인트'], ['mb_level', '권한'],
|
||||
['mb_email', '이메일'], ['mb_homepage', '홈페이지'], ['mb_datetime', '회원가입일'], ['mb_intercept_date', '차단여부'],
|
||||
['mb_mailling', '광고성 이메일 수신동의'], ['mb_mailling_date', '광고성 이메일 수신동의일자'],
|
||||
['mb_sms', '광고성 SMS/카카오톡 수신동의'], ['mb_sms_date', '광고성 SMS/카카오톡 수신동의일자'],
|
||||
['mb_marketing_agree', '마케팅목적의개인정보수집및이용동의여부'], ['mb_marketing_date', '마케팅목적의개인정보수집및이용동의일자'],
|
||||
['mb_thirdparty_agree', '개인정보제3자제공동의여부'], ['mb_thirdparty_date', '개인정보제3자제공동의일자']
|
||||
];
|
||||
const extraFields = Array.from({ length: 10 }, (_, i) => [`mb_${i + 1}`, `여분 필드 ${i + 1}`]);
|
||||
|
||||
let baseFieldHTML = '';
|
||||
baseFields.forEach(([value, label]) => {
|
||||
baseFieldHTML += `<label><input type="checkbox" name="fields" value="${value}"> ${label}</label>\n`;
|
||||
});
|
||||
|
||||
let extraFieldHTML = '';
|
||||
extraFields.forEach(([value, label]) => {
|
||||
extraFieldHTML += `<label><input type="checkbox" name="fields" value="${value}"> ${label}</label>\n`;
|
||||
});
|
||||
|
||||
const bodyHTML = `
|
||||
<div class="excel-download-progress">
|
||||
<p>팝빌 친구톡 전송을 위한 엑셀 양식을 다운로드하실 수 있습니다.</p>
|
||||
<p><b>전화번호</b>와 <b>이름</b>은 필수 입력 항목이며, 추가로 변수1부터 변수3까지 최대 3개의 선택 항목을 입력하실 수 있습니다.</p>
|
||||
<div id="selectedFieldsPreview" class="selected-fields-preview"><strong>선택된 항목:</strong></div>
|
||||
<div id="fieldSelectForm" class="field-select-form">
|
||||
${baseFieldHTML}
|
||||
<div class="field-separator"></div>
|
||||
${extraFieldHTML}
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
const footerHTML = `<button type="button" onclick="submitSelectedFields()">선택 완료</button>`;
|
||||
PopupManager.render('엑셀 양식에 포함할 항목 선택', bodyHTML, footerHTML, { disableOutsideClose: true });
|
||||
|
||||
bindFieldSelectEvents();
|
||||
}
|
||||
|
||||
// 체크박스 선택 시 최대 3개 제한 및 선택된 항목 미리보기 표시
|
||||
function bindFieldSelectEvents() {
|
||||
const fieldSelectForm = document.getElementById('fieldSelectForm');
|
||||
@ -441,26 +366,6 @@ function bindFieldSelectEvents() {
|
||||
});
|
||||
}
|
||||
|
||||
// 친구톡 양식 - 항목 선택 후 선택완료 버튼 클릭
|
||||
function submitSelectedFields() {
|
||||
const checkboxes = document.querySelectorAll('#fieldSelectForm input[name="fields"]:checked');
|
||||
const selected = Array.from(checkboxes).map(cb => cb.value);
|
||||
|
||||
if (selected.length > 3) {
|
||||
alert("최대 3개까지만 선택할 수 있습니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
// 항목을 하나도 선택하지 않았을 때 안내 알럿
|
||||
if (selected.length === 0) {
|
||||
const confirmProceed = confirm("선택한 항목이 없습니다. 항목 없이 엑셀을 다운로드하시겠습니까?");
|
||||
if (!confirmProceed) return;
|
||||
}
|
||||
|
||||
PopupManager.close('popupOverlay');
|
||||
startExcelDownload(2, selected); // formatType 2: Popbill 다운로드
|
||||
}
|
||||
|
||||
// 엑셀 생성 및 다운로드 실행
|
||||
function handleProgressUpdate() {
|
||||
return function(e) {
|
||||
|
||||
@ -25,7 +25,7 @@ $resultExcelDelete = member_export_delete();
|
||||
member_export_set_sse_headers();
|
||||
|
||||
// 모드 확인
|
||||
$mode = $_GET['mode'] ?? '';
|
||||
$mode = isset($_GET['mode']) ? $_GET['mode'] : '';
|
||||
if ($mode !== 'start') {
|
||||
member_export_send_progress("error", "잘못된 요청 입니다.");
|
||||
member_export_write_log($params, ['success' => false, 'error' => '잘못된 요청 입니다.']);
|
||||
@ -76,7 +76,7 @@ function main_member_export($params)
|
||||
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, $params['formatType']);
|
||||
$fileList[] = member_export_create_excel($data, $fileName, $i);
|
||||
} catch (Exception $e) {
|
||||
throw new Exception("총 {$pages}개 중 {$i}번째 파일을 생성하지 못했습니다<br>" . $e->getMessage());
|
||||
}
|
||||
@ -103,11 +103,11 @@ function main_member_export($params)
|
||||
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, $params['formatType']);
|
||||
$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' => $zipFileName ?? null]);
|
||||
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);
|
||||
}
|
||||
|
||||
@ -142,8 +142,9 @@ function member_export_send_progress($status, $message = "", $downloadType = 1,
|
||||
/**
|
||||
* 엑셀 내보내기 설정
|
||||
*/
|
||||
function member_export_get_config($type)
|
||||
function member_export_get_config()
|
||||
{
|
||||
$type = 1;
|
||||
$configs = [
|
||||
1 => [
|
||||
'title' => ["회원관리파일(일반)"],
|
||||
@ -155,12 +156,6 @@ function member_export_get_config($type)
|
||||
'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],
|
||||
],
|
||||
2 => [
|
||||
'title' => ["회원관리파일(팝빌)"],
|
||||
'headers' => ['휴대폰번호', '이름', '변수1', '변수2', '변수3'],
|
||||
'fields' => ['mb_hp', 'mb_name'],
|
||||
'widths' => [20, 15, 30, 30, 30],
|
||||
],
|
||||
];
|
||||
|
||||
return isset($configs[$type]) ? $configs[$type] : $configs[1];
|
||||
@ -195,14 +190,8 @@ function member_export_get_data($params)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$config = member_export_get_config($params['formatType']);
|
||||
$config = member_export_get_config();
|
||||
$fields = $config['fields'];
|
||||
|
||||
// 팝빌 타입인 경우 var 추가
|
||||
if ($params['formatType'] == 2 && !empty($params['vars'])) {
|
||||
$fields = array_merge($fields, array_values($params['vars']));
|
||||
}
|
||||
|
||||
$fields = array_unique($fields);
|
||||
|
||||
// SQL 변환 맵 (가공이 필요한 필드만 정의)
|
||||
@ -222,13 +211,13 @@ function member_export_get_data($params)
|
||||
// SQL 필드 생성
|
||||
$sqlFields = [];
|
||||
foreach ($fields as $field) {
|
||||
$sqlFields[] = $sqlTransformMap[$field] ?? $field;
|
||||
$sqlFields[] = isset($sqlTransformMap[$field]) ? $sqlTransformMap[$field] : $field;
|
||||
}
|
||||
$field_list = implode(', ', $sqlFields);
|
||||
|
||||
$where = member_export_build_where($params);
|
||||
|
||||
$page = (int)($params['page'] ?? 1);
|
||||
$page = (int)(isset($params['page']) ? $params['page'] : 1);
|
||||
if ($page < 1) $page = 1;
|
||||
$offset = ($page - 1) * MEMBER_EXPORT_PAGE_SIZE;
|
||||
|
||||
@ -244,7 +233,7 @@ function member_export_get_data($params)
|
||||
while ($row = sql_fetch_array($result)) {
|
||||
$rowData = [];
|
||||
foreach ($fields as $field) {
|
||||
$rowData[] = $row[$field] ?? '';
|
||||
$rowData[] = isset($row[$field]) ? $row[$field] : '';
|
||||
}
|
||||
$excelData[] = $rowData;
|
||||
}
|
||||
@ -255,9 +244,9 @@ function member_export_get_data($params)
|
||||
/**
|
||||
* 엑셀 파일 생성
|
||||
*/
|
||||
function member_export_create_excel($data, $fileName, $index = 0, $type = 1)
|
||||
function member_export_create_excel($data, $fileName, $index = 0)
|
||||
{
|
||||
$config = member_export_get_config($type);
|
||||
$config = member_export_get_config();
|
||||
|
||||
if (!class_exists('PHPExcel')) {
|
||||
error_log('[Member Export Error] PHPExcel 라이브러리를 찾을 수 없습니다.');
|
||||
@ -441,7 +430,7 @@ function member_export_write_log($params, $result = [])
|
||||
|
||||
$maxSize = 1024 * 1024 * 2; // 2MB
|
||||
$maxFiles = 10; // 최대 로그 파일 수 (필요시 조정)
|
||||
$username = $member['mb_id'] ?? 'guest';
|
||||
$username = isset($member['mb_id']) ? $member['mb_id'] : 'guest';
|
||||
$datetime = date("Y-m-d H:i:s");
|
||||
|
||||
if (!is_dir(MEMBER_LOG_DIR)) {
|
||||
@ -454,7 +443,7 @@ function member_export_write_log($params, $result = [])
|
||||
// 최신 파일 기준 정렬 (최신 → 오래된)
|
||||
usort($logFiles, fn($a, $b) => filemtime($b) - filemtime($a));
|
||||
|
||||
$latestLogFile = $logFiles[0] ?? null;
|
||||
$latestLogFile = isset($logFiles[0]) ? $logFiles[0] : null;
|
||||
|
||||
// 용량 기준으로 새 파일 생성
|
||||
if (!$latestLogFile || filesize($latestLogFile) >= $maxSize) {
|
||||
@ -471,7 +460,6 @@ function member_export_write_log($params, $result = [])
|
||||
}
|
||||
}
|
||||
|
||||
$formatType = (isset($params['formatType']) && $params['formatType'] == 2) ? '팝빌' : '일반';
|
||||
$success = isset($result['success']) && $result['success'] === true;
|
||||
$status = $success ? '성공' : '실패';
|
||||
|
||||
@ -482,7 +470,7 @@ function member_export_write_log($params, $result = [])
|
||||
if ($params['use_stx'] == 1 && !empty($params['stx'])) {
|
||||
$sfl_list = get_export_config('sfl_list');
|
||||
|
||||
$label = $sfl_list[$params['sfl']] ?? '';
|
||||
$label = isset($sfl_list[$params['sfl']]) ? $sfl_list[$params['sfl']] : '';
|
||||
$condition[] = "검색({$params['stx_cond']}) : {$label} - {$params['stx']}";
|
||||
}
|
||||
|
||||
@ -499,7 +487,7 @@ function member_export_write_log($params, $result = [])
|
||||
// 포인트 조건
|
||||
if ($params['use_point'] == 1 && $params['point'] !== '') {
|
||||
$point_cond_map = get_export_config('point_cond_map');
|
||||
$symbol = $point_cond_map[$params['point_cond']] ?? '≥';
|
||||
$symbol = isset($point_cond_map[$params['point_cond']]) ? $point_cond_map[$params['point_cond']] : '≥';
|
||||
$condition[] = "포인트 {$symbol} {$params['point']}";
|
||||
}
|
||||
|
||||
@ -511,7 +499,7 @@ function member_export_write_log($params, $result = [])
|
||||
// 광고 수신 동의
|
||||
if ($params['ad_range_only'] == 1) {
|
||||
$ad_range_list = get_export_config('ad_range_list');
|
||||
$label = $ad_range_list[$params['ad_range_type']] ?? '';
|
||||
$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'])) {
|
||||
@ -533,17 +521,17 @@ function member_export_write_log($params, $result = [])
|
||||
// 차단회원 처리
|
||||
if ($params['use_intercept'] == 1) {
|
||||
$intercept_list = get_export_config('intercept_list');
|
||||
$label = $intercept_list[$params['intercept']] ?? '';
|
||||
$label = isset($intercept_list[$params['intercept']]) ? $intercept_list[$params['intercept']] : '';
|
||||
if ($label) $condition[] = $label;
|
||||
}
|
||||
|
||||
$conditionStr = !empty($condition) ? implode(', ', $condition) : '없음';
|
||||
$line1 = "[{$datetime}] [{$status}] 관리자: {$username} | 형식: {$formatType}";
|
||||
$line1 = "[{$datetime}] [{$status}] 관리자: {$username}";
|
||||
|
||||
// 성공일 경우 추가 정보
|
||||
if ($success) {
|
||||
$total = $result['total'] ?? 0;
|
||||
$fileCount = isset($result['zip']) ? 1 : count($result['files'] ?? []);
|
||||
$total = isset($result['total']) ? $result['total'] : 0;
|
||||
$fileCount = isset($result['zip']) ? 1 : count(isset($result['files']) ? $result['files'] : []);
|
||||
$line1 .= " | 총 {$total}건 | 파일: {$fileCount}개";
|
||||
}
|
||||
|
||||
|
||||
@ -32,16 +32,6 @@ include_once('./admin.head.php');
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="service_2">
|
||||
<div class="svc_ri svc_sms">
|
||||
<div class="svc_a">
|
||||
<h3>카카오톡 발송 서비스</h3>
|
||||
<p>주문이나 배송시에 상점운영자 또는 고객에게 휴대폰으로 카카오톡을 발송합니다. <b>연동회원</b>으로 선택한 후 링크아이디 [<b>SIRSOFT</b>]를 입력해 주세요.</p>
|
||||
</div>
|
||||
<div class="svc_btn2"><a href="https://www.popbill.com/App/SignUp" target="_blank"><img src="<?php echo G5_ADMIN_URL ?>/img/svc_btn_07.jpg" alt="팝빌 카카오톡 서비스 신청하기"></a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="service_2">
|
||||
<div class="svc_ri svc_sms">
|
||||
<div class="svc_a">
|
||||
|
||||
@ -680,9 +680,9 @@ $(function(){
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="it_stock_sms">재입고 알림</label></th>
|
||||
<th scope="row"><label for="it_stock_sms">재입고SMS 알림</label></th>
|
||||
<td colspan="2">
|
||||
<?php echo help("상품이 품절인 경우에 체크해 놓으면 상품상세보기에서 고객이 재입고 알림(SMS/알림톡)을 신청할 수 있게 됩니다."); ?>
|
||||
<?php echo help("상품이 품절인 경우에 체크해 놓으면 상품상세보기에서 고객이 재입고SMS 알림을 신청할 수 있게 됩니다."); ?>
|
||||
<input type="checkbox" name="it_stock_sms" value="1" id="it_stock_sms" <?php echo ($it['it_stock_sms']) ? "checked" : ""; ?>> 예
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -4,7 +4,7 @@ include_once('./_common.php');
|
||||
|
||||
auth_check_menu($auth, $sub_menu, "r");
|
||||
|
||||
$g5['title'] = '재입고 알림';
|
||||
$g5['title'] = '재입고SMS 알림';
|
||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
|
||||
// 테이블 생성
|
||||
@ -24,12 +24,6 @@ if(!sql_query(" select ss_id from {$g5['g5_shop_item_stocksms_table']} limit 1",
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
|
||||
}
|
||||
|
||||
// 채널 구분 (1=SMS, 2=알림톡)
|
||||
if(!sql_query(" select ss_channel from {$g5['g5_shop_item_stocksms_table']} limit 1", false)) {
|
||||
sql_query(" ALTER TABLE `{$g5['g5_shop_item_stocksms_table']}`
|
||||
ADD `ss_channel` tinyint(4) NOT NULL DEFAULT '1' AFTER `ss_ip` ", true);
|
||||
}
|
||||
|
||||
$doc = isset($_GET['doc']) ? clean_xss_tags($_GET['doc'], 1, 1) : '';
|
||||
$sort1 = (isset($_GET['sort1']) && in_array($_GET['sort1'], array('it_id', 'ss_hp', 'ss_send', 'ss_send_time', 'ss_datetime'))) ? $_GET['sort1'] : 'ss_send';
|
||||
$sort2 = (isset($_GET['sort2']) && in_array($_GET['sort2'], array('desc', 'asc'))) ? $_GET['sort2'] : 'asc';
|
||||
@ -115,9 +109,8 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
||||
</th>
|
||||
<th scope="col">상품명</th>
|
||||
<th scope="col">휴대폰번호</th>
|
||||
<th scope="col">전송결과</th>
|
||||
<th scope="col">전송채널</th>
|
||||
<th scope="col">전송일시</th>
|
||||
<th scope="col">SMS전송</th>
|
||||
<th scope="col">SMS전송일시</th>
|
||||
<th scope="col">등록일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -146,14 +139,13 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
||||
<td class="td_left"><?php echo $it_name; ?></td>
|
||||
<td class="td_telbig"><?php echo $row['ss_hp']; ?></td>
|
||||
<td class="td_stat"><?php echo ($row['ss_send'] ? '전송완료' : '전송전'); ?></td>
|
||||
<td class="td_stat"><?php echo ($row['ss_send'] ? ($row['ss_channel'] == 2 ? " 알림톡" : " SMS") : ''); ?></td>
|
||||
<td class="td_datetime"><?php echo (is_null_time($row['ss_send_time']) ? '' : $row['ss_send_time']); ?></td>
|
||||
<td class="td_datetime"><?php echo (is_null_time($row['ss_datetime']) ? '' : $row['ss_datetime']); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if (!$i)
|
||||
echo '<tr><td colspan="7" class="empty_table"><span>자료가 없습니다.</span></td></tr>';
|
||||
echo '<tr><td colspan="6" class="empty_table"><span>자료가 없습니다.</span></td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -165,10 +157,6 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
||||
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value" class="btn btn_02">
|
||||
<?php } ?>
|
||||
<input type="submit" name="act_button" value="선택SMS전송" class="btn_submit btn" onclick="document.pressed=this.value">
|
||||
|
||||
<?php if($config['cf_kakaotalk_use']) { ?>
|
||||
<input type="submit" name="act_button" value="선택알림톡전송" class="btn_submit btn" onclick="document.pressed=this.value">
|
||||
<?php } ?>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -189,8 +177,6 @@ function fitemstocksms_submit(f)
|
||||
return confirm("선택한 자료를 정말 삭제하시겠습니까?");
|
||||
case "선택SMS전송":
|
||||
return confirm("선택한 자료에 대해서 SMS로 재입고 알림을 전송하시겠습니까?");
|
||||
case "선택알림톡전송":
|
||||
return confirm("선택한 자료에 대해서 알림톡으로 재입고 알림을 전송하시겠습니까?");
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -45,8 +45,7 @@ if ($_POST['act_button'] == "선택SMS전송") {
|
||||
// SMS 전송으로 변경함
|
||||
$sql = " update {$g5['g5_shop_item_stocksms_table']}
|
||||
set ss_send = '1',
|
||||
ss_send_time = '".G5_TIME_YMDHIS."',
|
||||
ss_channel = '1'
|
||||
ss_send_time = '".G5_TIME_YMDHIS."'
|
||||
where ss_id = '{$ss_id}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
@ -99,52 +98,6 @@ if ($_POST['act_button'] == "선택SMS전송") {
|
||||
$SMS->Init(); // 보관하고 있던 결과값을 지웁니다.
|
||||
}
|
||||
}
|
||||
} else if ($_POST['act_button'] == "선택알림톡전송") {
|
||||
// 알림톡 발송 BEGIN: 재입고알림(CU-ST01) -------------------------------------
|
||||
auth_check_menu($auth, $sub_menu, 'w');
|
||||
include_once(G5_KAKAO5_PATH.'/kakao5.lib.php');
|
||||
|
||||
if (!$config['cf_kakaotalk_use']) {
|
||||
alert('카카오톡 사용 설정이 되어 있지 않아 발송할 수 없습니다.\n[환경설정>기본환경설정>기본알림환경]에서 사용 설정을 해주세요.');
|
||||
} else {
|
||||
// 프리셋 정보 가져오기
|
||||
$alimtalk = get_alimtalk_preset_info('CU-ST01');
|
||||
|
||||
if (empty($alimtalk['success'])) {
|
||||
alert('재입고 알림톡 설정이 되어 있지 않아 발송할 수 없습니다.\n[환경설정>알림톡프리셋 관리]에서 설정해주세요.');
|
||||
} else {
|
||||
for ($i=0; $i<$count_post_chk; $i++) {
|
||||
|
||||
// 실제 번호를 넘김
|
||||
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
|
||||
$ss_id = isset($_POST['ss_id'][$k]) ? (int) $_POST['ss_id'][$k] : 0;
|
||||
|
||||
$sql = " select a.ss_id, a.ss_hp, a.ss_send, b.it_id, b.it_name
|
||||
from {$g5['g5_shop_item_stocksms_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id )
|
||||
where a.ss_id = '$ss_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if(!$row['ss_id'] || !$row['it_id'] || $row['ss_send'])
|
||||
continue;
|
||||
|
||||
$conditions = ['it_id' => $row['it_id'], 'it_name' => get_text($row['it_name'])]; // 변수 치환 정보
|
||||
|
||||
$cu_atk = send_alimtalk_preset('CU-ST01', ['rcv' => $row['ss_hp']], $conditions); // 회원
|
||||
|
||||
// 성공한 건만 완료 처리
|
||||
if (!empty($cu_atk) && !empty($cu_atk['success']))
|
||||
{
|
||||
sql_query(" update {$g5['g5_shop_item_stocksms_table']}
|
||||
set ss_send = '1',
|
||||
ss_send_time = '".G5_TIME_YMDHIS."',
|
||||
ss_channel = '2'
|
||||
where ss_id = '{$ss_id}' ");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 알림톡 발송 END -------------------------------------------------------------
|
||||
|
||||
} else if ($_POST['act_button'] == "선택삭제") {
|
||||
|
||||
if ($is_admin != 'super')
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
if (!defined("_ORDERALIMTALK_")) exit;
|
||||
include_once(G5_KAKAO5_PATH.'/kakao5.lib.php');
|
||||
|
||||
$it_name_str = get_alimtalk_cart_item_name($od_id); // 상품명
|
||||
|
||||
// 입금 알림
|
||||
if($od_alimtalk_ipgum_check){
|
||||
// 알림톡 발송 BEGIN: 입금완료(CU-OR03 / AD-OR03) ------------------------------
|
||||
$conditions = ['od_id' => $od_id, 'od_name' => $od_name, 'it_name' => $it_name_str]; // 변수 치환 정보
|
||||
$cu_atk = send_alimtalk_preset('CU-OR03', ['rcv' => $od_hp ?: $od['od_tel'], 'rcvnm' => $od_name], $conditions); // 회원
|
||||
// 알림톡 발송 END --------------------------------------------------------
|
||||
}
|
||||
|
||||
// 배송 알림
|
||||
if($od_alimtalk_baesong_check){
|
||||
// 알림톡 발송 BEGIN: 배송중(CU-DE02) ------------------------------
|
||||
$conditions = ['od_id' => $od_id, 'od_name' => $od_name, 'it_name' => $it_name_str]; // 변수 치환 정보
|
||||
$cu_atk = send_alimtalk_preset('CU-DE02', ['rcv' => $od_hp ?: $od['od_tel'], 'rcvnm' => $od_name], $conditions); // 회원
|
||||
// 알림톡 발송 END --------------------------------------------------------
|
||||
}
|
||||
@ -3,7 +3,6 @@ $sub_menu = '400400';
|
||||
include_once('./_common.php');
|
||||
include_once('./admin.shop.lib.php');
|
||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||
include_once(G5_KAKAO5_PATH.'/kakao5.lib.php');
|
||||
|
||||
auth_check_menu($auth, $sub_menu, "w");
|
||||
|
||||
@ -99,14 +98,6 @@ if(isset($_FILES['excelfile']['tmp_name']) && $_FILES['excelfile']['tmp_name'])
|
||||
|
||||
include(G5_SHOP_PATH.'/'.$od['od_pg'].'/escrow.register.php');
|
||||
}
|
||||
|
||||
// 알림톡 발송 BEGIN: 배송중(CU-DE02/AD-DE02) ------------------------------
|
||||
$it_name_str = get_alimtalk_cart_item_name($od_id); // 상품명
|
||||
|
||||
$conditions = ['od_id' => $od_id, 'od_name' => $od['od_name'], 'it_name' => $it_name_str]; // 변수 치환 정보
|
||||
$cu_atk = send_alimtalk_preset('CU-DE02', ['rcv' => $od['od_hp'] ?: $od['od_tel'], 'rcvnm' => $od['od_name']], $conditions); // 회원
|
||||
$ad_atk = send_admin_alimtalk('AD-DE02', 'super', $conditions); // 관리자
|
||||
// 알림톡 발송 END --------------------------------------------------------
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
$sub_menu = '400400';
|
||||
include_once('./_common.php');
|
||||
include_once(G5_KAKAO5_PATH.'/kakao5.lib.php');
|
||||
|
||||
$cart_title3 = '주문번호';
|
||||
$cart_title4 = '배송완료';
|
||||
@ -283,9 +282,6 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
<div class="local_desc01 local_desc">
|
||||
<p>주문, 입금, 준비, 배송, 완료는 장바구니와 주문서 상태를 모두 변경하지만, 취소, 반품, 품절은 장바구니의 상태만 변경하며, 주문서 상태는 변경하지 않습니다.</p>
|
||||
<p>개별적인(이곳에서의) 상태 변경은 모든 작업을 수동으로 처리합니다. 예를 들어 주문에서 입금으로 상태 변경시 입금액(결제금액)을 포함한 모든 정보는 수동 입력으로 처리하셔야 합니다.</p>
|
||||
<?php if (isset($config['cf_kakaotalk_use']) && $config['cf_kakaotalk_use']) { ?>
|
||||
<p>* <b>알림톡 프리셋</b>: <b>[준비, 완료, 취소, 반품, 품절]</b>은 <b>자동</b>으로 발송되며, <b>[입금완료, 배송]</b>은 <b>결제상세정보에서 수동</b>으로 발송하셔야 합니다.</p>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
@ -730,15 +726,6 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
<br>
|
||||
<?php } ?>
|
||||
|
||||
<!-- 입금완료 알림톡 전송 -->
|
||||
<?php
|
||||
$alimtalk = get_alimtalk_preset_info('CU-OR03');
|
||||
if ($config['cf_kakaotalk_use'] && isset($alimtalk['success'])) {?>
|
||||
<input type="checkbox" name="od_alimtalk_ipgum_check" id="od_alimtalk_ipgum_check">
|
||||
<label for="od_alimtalk_ipgum_check">입금완료 알림톡전송</label>
|
||||
<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">
|
||||
</td>
|
||||
</tr>
|
||||
@ -847,16 +834,6 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
<br>
|
||||
<?php } ?>
|
||||
|
||||
<!-- 배송 알림톡 전송 -->
|
||||
<?php
|
||||
$alimtalk = get_alimtalk_preset_info('CU-DE02');
|
||||
if (isset($config['cf_kakaotalk_use']) && $config['cf_kakaotalk_use'] && isset($alimtalk['success'])) {
|
||||
?>
|
||||
<input type="checkbox" name="od_alimtalk_baesong_check" id="od_alimtalk_baesong_check">
|
||||
<label for="od_alimtalk_baesong_check">배송 알림톡전송</label>
|
||||
<br>
|
||||
<?php } ?>
|
||||
|
||||
<input type="text" name="od_invoice" value="<?php echo $od['od_invoice']; ?>" id="od_invoice" class="frm_input">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
$sub_menu = '400400';
|
||||
include_once('./_common.php');
|
||||
include_once(G5_KAKAO5_PATH.'/kakao5.lib.php');
|
||||
|
||||
auth_check_menu($auth, $sub_menu, "w");
|
||||
|
||||
@ -26,7 +25,6 @@ $sort2 = isset($_REQUEST['sort2']) ? clean_xss_tags($_REQUEST['sort2'], 1, 1) :
|
||||
$sel_field = isset($_REQUEST['sel_field']) ? clean_xss_tags($_REQUEST['sel_field'], 1, 1) : '';
|
||||
|
||||
$mod_history = '';
|
||||
$od_names = [];
|
||||
$cnt = (isset($_POST['ct_id']) && is_array($_POST['ct_id'])) ? count($_POST['ct_id']) : 0;
|
||||
$arr_it_id = array();
|
||||
|
||||
@ -157,8 +155,6 @@ for ($i=0; $i<$cnt; $i++)
|
||||
// it_id를 배열에 저장
|
||||
if($ct_status == '주문' || $ct_status == '취소' || $ct_status == '반품' || $ct_status == '품절' || $ct_status == '완료')
|
||||
$arr_it_id[] = $ct['it_id'];
|
||||
|
||||
$od_names[] = $ct['it_name']; // 상품명 배열 : 알림톡 사용
|
||||
}
|
||||
|
||||
// 상품 판매수량 반영
|
||||
@ -383,28 +379,7 @@ $url = "./orderform.php?od_id=$od_id&$qstr";
|
||||
// 신용카드 취소 때 오류가 있으면 알림
|
||||
if($pg_cancel == 1 && $pg_res_cd && $pg_res_msg) {
|
||||
alert('오류코드 : '.$pg_res_cd.' 오류내용 : '.$pg_res_msg, $url);
|
||||
} else {
|
||||
// 알림톡 발송 BEGIN: 배송준비(DE01) | 배송완료(DE03) | 관리자 주문취소(OR05) | 반품처리(OR06) | 품절안내(OR07) ------------------------------
|
||||
$alimtalk_map = [ '준비' => 'DE01', '완료' => 'DE03', '취소' => 'OR05', '반품' => 'OR06', '품절' => 'OR07' ]; // 알림톡 코드 매핑
|
||||
|
||||
// 처리상품명 및 치환 변수 값 세팅
|
||||
$order = sql_fetch("select * from {$g5['g5_shop_order_table']} where od_id = '$od_id'"); // 주문 정보 조회
|
||||
$it_name = !empty($od_names) ? $od_names[0] . (count($od_names) > 1 ? ' 외 ' . (count($od_names) - 1) . '건' : '') : ''; // 상품명
|
||||
$conditions = [ 'od_id' => $od_id, 'it_name' => $it_name ]; // 변수 치환 정보
|
||||
|
||||
if (isset($alimtalk_map[$_POST['ct_status']])) {
|
||||
$status_code = $alimtalk_map[$_POST['ct_status']];
|
||||
|
||||
// 고객 발송 (준비, 완료, 취소, 반품, 품절 공통)
|
||||
$cu_atk = send_alimtalk_preset('CU-' . $status_code, ['rcv' => $order['od_hp'] ?: $order['od_tel'], 'rcvnm' => $order['od_name']], $conditions); // 회원
|
||||
|
||||
// 관리자 발송 (취소만)
|
||||
if ($_POST['ct_status'] === '취소') {
|
||||
$ad_atk = send_admin_alimtalk('AD-' . $status_code, 'super', $conditions); // 관리자
|
||||
}
|
||||
}
|
||||
// 알림톡 발송 END -------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
} else {
|
||||
// 1.06.06
|
||||
$od = sql_fetch(" select od_receipt_point from {$g5['g5_shop_order_table']} where od_id = '$od_id' ");
|
||||
if ($od['od_receipt_point'])
|
||||
|
||||
@ -161,9 +161,6 @@ include "./ordermail.inc.php";
|
||||
define("_ORDERSMS_", true);
|
||||
include "./ordersms.inc.php";
|
||||
|
||||
// 알림톡 전송 문자전송
|
||||
define("_ORDERALIMTALK_", true);
|
||||
include "./orderalimtalk.inc.php";
|
||||
|
||||
// 에스크로 배송처리
|
||||
if($posts['od_tno'] && $posts['od_escrow'] == 1)
|
||||
|
||||
@ -3,7 +3,6 @@ $sub_menu = '400400';
|
||||
include_once('./_common.php');
|
||||
include_once('./admin.shop.lib.php');
|
||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||
include_once(G5_KAKAO5_PATH.'/kakao5.lib.php');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
@ -49,7 +48,6 @@ for ($i=0; $i<$count_post_chk; $i++)
|
||||
|
||||
$current_status = $od['od_status'];
|
||||
$change_status = isset($_POST['od_status']) ? clean_xss_tags($_POST['od_status'], 1, 1) : '';
|
||||
$it_name_str = get_alimtalk_cart_item_name($od_id); // 상품명
|
||||
|
||||
switch ($current_status)
|
||||
{
|
||||
@ -71,12 +69,6 @@ for ($i=0; $i<$count_post_chk; $i++)
|
||||
}
|
||||
}
|
||||
|
||||
// 알림톡 발송 BEGIN: 입금완료(CU-OR03/AD-OR03) ------------------------------
|
||||
$conditions = ['od_id' => $od_id, 'od_name' => $od['od_name'], 'it_name' => $it_name_str]; // 변수 치환 정보
|
||||
$cu_atk = send_alimtalk_preset('CU-OR03', ['rcv' => $od['od_hp'] ?: $od['od_tel'], 'rcvnm' => $od['od_name']], $conditions); // 회원
|
||||
$ad_atk = send_admin_alimtalk('AD-OR03', 'super', $conditions); // 관리자
|
||||
// 알림톡 발송 END --------------------------------------------------------
|
||||
|
||||
// 메일
|
||||
if($config['cf_email_use'] && $od_send_mail)
|
||||
include './ordermail.inc.php';
|
||||
@ -86,12 +78,6 @@ for ($i=0; $i<$count_post_chk; $i++)
|
||||
case '입금' :
|
||||
if ($change_status != '준비') continue 2;
|
||||
change_status($od_id, '입금', '준비');
|
||||
|
||||
// 알림톡 발송 BEGIN: 배송준비(CU-DE01/AD-DE01) ------------------------------
|
||||
$conditions = ['od_id' => $od_id, 'it_name' => $it_name_str]; // 변수 치환 정보
|
||||
$cu_atk = send_alimtalk_preset('CU-DE01', ['rcv' => $od['od_hp'] ?: $od['od_tel'], 'rcvnm' => $od['od_name']], $conditions); // 회원
|
||||
$ad_atk = send_admin_alimtalk('AD-DE01', 'super', $conditions); // 관리자
|
||||
// 알림톡 발송 END -------------------------------------------------------------
|
||||
break;
|
||||
|
||||
case '준비' :
|
||||
@ -129,11 +115,6 @@ for ($i=0; $i<$count_post_chk; $i++)
|
||||
include(G5_SHOP_PATH.'/'.$od['od_pg'].'/escrow.register.php');
|
||||
}
|
||||
|
||||
// 알림톡 발송 BEGIN: 배송중(CU-DE02/AD-DE02) -------------------------------------
|
||||
$conditions = ['od_id' => $od_id, 'it_name' => $it_name_str]; // 변수 치환 정보
|
||||
$cu_atk = send_alimtalk_preset('CU-DE02', ['rcv' => $od['od_hp'] ?: $od['od_tel'], 'rcvnm' => $od['od_name']], $conditions); // 회원
|
||||
$ad_atk = send_admin_alimtalk('AD-DE02', 'super', $conditions); // 관리자
|
||||
// 알림톡 발송 END -------------------------------------------------------------
|
||||
break;
|
||||
|
||||
case '배송' :
|
||||
@ -158,12 +139,6 @@ for ($i=0; $i<$count_post_chk; $i++)
|
||||
sql_query($sql3);
|
||||
}
|
||||
*/
|
||||
|
||||
// 알림톡 발송 BEGIN: 배송완료(CU-DE03/AD-DE03) -------------------------------------
|
||||
$conditions = ['od_id' => $od_id, 'it_name' => $it_name_str]; // 변수 치환 정보
|
||||
$cu_atk = send_alimtalk_preset('CU-DE03', ['rcv' => $od['od_hp'] ?: $od['od_tel'], 'rcvnm' => $od['od_name']], $conditions); // 회원
|
||||
$ad_atk = send_admin_alimtalk('AD-DE03', 'super', $conditions); // 관리자
|
||||
// 알림톡 발송 END -------------------------------------------------------------
|
||||
break;
|
||||
|
||||
} // switch end
|
||||
|
||||
Reference in New Issue
Block a user