Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e002199d5 | ||
|
|
7dde02d396 | ||
|
|
31871ee3e6 | ||
|
|
ff9a7534ed | ||
|
|
9869be5970 | ||
|
|
1fa4467cd1 | ||
|
|
3e75ccea65 | ||
|
|
be9f50f96b | ||
|
|
7c217cb41b | ||
|
|
5fc1c3bc27 | ||
|
|
d707c5abac | ||
|
|
eeea46cb69 | ||
|
|
669cce7011 | ||
|
|
ee8b57eb13 | ||
|
|
c927925a05 | ||
|
|
d914a7843d | ||
|
|
c04591e24a | ||
|
|
a6fbbe6ad2 | ||
|
|
4c00c60006 | ||
|
|
56b1958d37 | ||
|
|
6b2f9e094c | ||
|
|
a781b4aef3 | ||
|
|
8be4476f56 | ||
|
|
59d0b3c19c | ||
|
|
f4f8c57a74 | ||
|
|
d5619707bc | ||
|
|
9e7465319b | ||
|
|
f1f2150c67 | ||
|
|
3de722d3df | ||
|
|
7119b4f612 | ||
|
|
efaefbbd0e | ||
|
|
b12bf551ec | ||
|
|
65a419e9cd | ||
|
|
3f32ecd3e6 | ||
|
|
b5d218d446 | ||
|
|
f2e7dbc5ed | ||
|
|
c38de4c94b | ||
|
|
7d8a660642 | ||
|
|
5875e8b86b | ||
|
|
68a5b9c25a | ||
|
|
2dff49914b | ||
|
|
51518e45e4 | ||
|
|
7883ff65dc | ||
|
|
a2608754bd | ||
|
|
758bb67b7b | ||
|
|
0037f72cce | ||
|
|
df940f8168 | ||
|
|
614b040960 | ||
|
|
dccb50d8a3 | ||
|
|
5331aa8be5 | ||
|
|
79f915988b | ||
|
|
3cfe8b6b84 | ||
|
|
31ef78e916 | ||
|
|
a612e69d3e | ||
|
|
29e55de1fa | ||
|
|
c4db6e7751 | ||
|
|
47a3790c57 | ||
|
|
2894c269ea | ||
|
|
c00c73465a | ||
|
|
3e0e8be6da | ||
|
|
92a052fa7a | ||
|
|
4ebdd8ba30 | ||
|
|
4d5c597665 | ||
|
|
7e65a297bf | ||
|
|
ddcc82d89b | ||
|
|
ad99ea7673 | ||
|
|
b3fa6dc127 | ||
|
|
e6780f3b4b | ||
|
|
bededeaf01 | ||
|
|
73b868a444 | ||
|
|
eb249a2aee | ||
|
|
813fdef0c7 | ||
|
|
f8561e9398 | ||
|
|
52590509d5 | ||
|
|
604cef808e | ||
|
|
82574fd4a8 | ||
|
|
c3db9b454e | ||
|
|
bf19cd8bf5 | ||
|
|
b2c0e1af29 | ||
|
|
60d37b853b | ||
|
|
919b75a138 | ||
|
|
01fab8136e | ||
|
|
5054e24631 | ||
|
|
deff7d2079 | ||
|
|
5e6b4fa668 | ||
|
|
ef1be317e1 | ||
|
|
137d78ff73 | ||
|
|
0ddcda4b0c | ||
|
|
bf27af3925 | ||
|
|
607e15424d | ||
|
|
7c490448ec | ||
|
|
d775d2255f | ||
|
|
b94771de92 | ||
|
|
b29e16a198 | ||
|
|
0e06b4f9ce | ||
|
|
f2ab751e5f | ||
|
|
3432497efe | ||
|
|
60bb03049e | ||
|
|
a7541256cb | ||
|
|
e26fb62f5d | ||
|
|
887833089b | ||
|
|
1438f8d557 | ||
|
|
25e359facd | ||
|
|
b98d45615c | ||
|
|
7e8eff5395 | ||
|
|
f4718a71a2 | ||
|
|
46ea2d03b5 |
+11
@@ -13,6 +13,17 @@ cheditor5.*/
|
||||
log/
|
||||
g5_tree/
|
||||
.vscode/
|
||||
.claude/
|
||||
.cursor/
|
||||
.windsurf/
|
||||
.idea/
|
||||
.playwright-mcp
|
||||
.mcp.json
|
||||
.agents
|
||||
.DS_Store
|
||||
*.swp
|
||||
*.swo
|
||||
CLAUDE.local.md
|
||||
naver*.html
|
||||
initests01/
|
||||
SIRsoft000/
|
||||
|
||||
@@ -3,6 +3,10 @@ define('G5_IS_ADMIN', true);
|
||||
require_once '../common.php';
|
||||
require_once G5_ADMIN_PATH . '/admin.lib.php';
|
||||
|
||||
if (function_exists('g5_check_data_htaccess')) {
|
||||
g5_check_data_htaccess();
|
||||
}
|
||||
|
||||
if (isset($token)) {
|
||||
$token = @htmlspecialchars(strip_tags($token), ENT_QUOTES);
|
||||
}
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ function print_menu2($key, $no = '')
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($is_admin != 'super' && (!array_key_exists($menu[$key][$i][0], $auth) || !strstr($auth[$menu[$key][$i][0]], 'r'))) {
|
||||
if ($is_admin != 'super' && (!array_key_exists($menu[$key][$i][0], $auth) || strpos($auth[$menu[$key][$i][0]], 'r') === false)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -281,7 +281,7 @@ function auth_check($auth, $attr, $return = false)
|
||||
|
||||
$attr = strtolower($attr);
|
||||
|
||||
if (!strstr($auth, $attr)) {
|
||||
if (strpos($auth, $attr) === false) {
|
||||
if ($attr == 'r') {
|
||||
$msg = '읽을 권한이 없습니다.';
|
||||
if ($return) {
|
||||
@@ -389,7 +389,7 @@ function order_select($fld, $sel = '')
|
||||
// 불법접근을 막도록 토큰을 생성하면서 토큰값을 리턴
|
||||
function get_admin_token()
|
||||
{
|
||||
$token = md5(uniqid(rand(), true));
|
||||
$token = get_random_token_string(16);
|
||||
set_session('ss_admin_token', $token);
|
||||
|
||||
return $token;
|
||||
|
||||
@@ -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
-1
@@ -17,7 +17,7 @@ $print_version = ($is_admin == 'super') ? 'Version ' . G5_GNUBOARD_VER : '';
|
||||
</div>
|
||||
<footer id="ft">
|
||||
<p>
|
||||
Copyright © <?php echo $_SERVER['HTTP_HOST']; ?>. All rights reserved. <?php echo $print_version; ?><br>
|
||||
Copyright © <?php echo htmlspecialchars($_SERVER['HTTP_HOST']); ?>. All rights reserved. <?php echo $print_version; ?><br>
|
||||
<button type="button" class="scroll_top"><span class="top_img"></span><span class="top_txt">TOP</span></button>
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
@@ -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);
|
||||
+4
-1
@@ -23,6 +23,9 @@ if (!$sst) {
|
||||
$sst = "a.mb_id, au_menu";
|
||||
$sod = "";
|
||||
}
|
||||
$allowed_sst = array('a.mb_id', 'mb_nick', 'au_menu', 'au_auth', 'a.mb_id, au_menu');
|
||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'a.mb_id, au_menu';
|
||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
||||
$sql_order = " order by $sst $sod ";
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
@@ -151,7 +154,7 @@ $colspan = 5;
|
||||
//if (isset($stx))
|
||||
// echo '<script>document.fsearch.sfl.value = "'.$sfl.'";</script>'."\n";
|
||||
|
||||
if (strstr($sfl, 'mb_id')) {
|
||||
if (strpos($sfl, 'mb_id') !== false) {
|
||||
$mb_id = $stx;
|
||||
} else {
|
||||
$mb_id = '';
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ if ($is_admin != 'super') {
|
||||
}
|
||||
|
||||
$mb = get_member($mb_id);
|
||||
if (!$mb['mb_id']) {
|
||||
if (!(isset($mb['mb_id']) && $mb['mb_id'])) {
|
||||
alert('존재하는 회원아이디가 아닙니다.');
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
+16
-17
@@ -39,14 +39,17 @@ $bo_include_tail = isset($_POST['bo_include_tail']) ? preg_replace(array("#[\\\]
|
||||
$check_captcha = false;
|
||||
|
||||
// 관리자가 자동등록방지 CAPTCHA를 사용해야 할 경우
|
||||
if ($w === 'u') {
|
||||
if (isset($board['bo_include_head'], $board['bo_include_tail']) &&
|
||||
($board['bo_include_head'] !== $bo_include_head || $board['bo_include_tail'] !== $bo_include_tail)) {
|
||||
$check_captcha = true;
|
||||
}
|
||||
} elseif ($w === '') {
|
||||
if ($bo_include_head !== '_head.php' || $bo_include_tail !== '_tail.php') {
|
||||
$check_captcha = true;
|
||||
// 최고 관리자인 경우에만 수정가능
|
||||
if ($is_admin === 'super') {
|
||||
if ($w === 'u') {
|
||||
if (isset($board['bo_include_head'], $board['bo_include_tail']) &&
|
||||
($board['bo_include_head'] !== $bo_include_head || $board['bo_include_tail'] !== $bo_include_tail)) {
|
||||
$check_captcha = true;
|
||||
}
|
||||
} elseif ($w === '') {
|
||||
if ($bo_include_head !== '_head.php' || $bo_include_tail !== '_tail.php') {
|
||||
$check_captcha = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +124,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;
|
||||
@@ -137,7 +139,7 @@ $bo_hot = isset($_POST['bo_hot']) ? (int) $_POST['bo_hot'] : 0;
|
||||
$bo_image_width = isset($_POST['bo_image_width']) ? (int) $_POST['bo_image_width'] : 0;
|
||||
$bo_use_search = isset($_POST['bo_use_search']) ? (int) $_POST['bo_use_search'] : 0;
|
||||
$bo_use_cert = isset($_POST['bo_use_cert']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['bo_use_cert']) : '';
|
||||
$bo_device = isset($_POST['bo_device']) ? clean_xss_tags($_POST['bo_device'], 1, 1) : '';
|
||||
$bo_device = isset($_POST['bo_device']) ? addslashes(clean_xss_tags(stripslashes($_POST['bo_device']), 1, 1)) : '';
|
||||
$bo_list_level = isset($_POST['bo_list_level']) ? (int) $_POST['bo_list_level'] : 0;
|
||||
$bo_read_level = isset($_POST['bo_read_level']) ? (int) $_POST['bo_read_level'] : 0;
|
||||
$bo_write_level = isset($_POST['bo_write_level']) ? (int) $_POST['bo_write_level'] : 0;
|
||||
@@ -153,9 +155,9 @@ $bo_read_point = isset($_POST['bo_read_point']) ? (int) $_POST['bo_read_point']
|
||||
$bo_write_point = isset($_POST['bo_write_point']) ? (int) $_POST['bo_write_point'] : 0;
|
||||
$bo_comment_point = isset($_POST['bo_comment_point']) ? (int) $_POST['bo_comment_point'] : 0;
|
||||
$bo_download_point = isset($_POST['bo_download_point']) ? (int) $_POST['bo_download_point'] : 0;
|
||||
$bo_select_editor = isset($_POST['bo_select_editor']) ? clean_xss_tags($_POST['bo_select_editor'], 1, 1) : '';
|
||||
$bo_skin = isset($_POST['bo_skin']) ? clean_xss_tags($_POST['bo_skin'], 1, 1) : '';
|
||||
$bo_mobile_skin = isset($_POST['bo_mobile_skin']) ? clean_xss_tags($_POST['bo_mobile_skin'], 1, 1) : '';
|
||||
$bo_select_editor = isset($_POST['bo_select_editor']) ? addslashes(clean_xss_tags(stripslashes($_POST['bo_select_editor']), 1, 1)) : '';
|
||||
$bo_skin = isset($_POST['bo_skin']) ? addslashes(clean_xss_tags(stripslashes($_POST['bo_skin']), 1, 1)) : '';
|
||||
$bo_mobile_skin = isset($_POST['bo_mobile_skin']) ? addslashes(clean_xss_tags(stripslashes($_POST['bo_mobile_skin']), 1, 1)) : '';
|
||||
$bo_content_head = isset($_POST['bo_content_head']) ? $_POST['bo_content_head'] : '';
|
||||
$bo_content_tail = isset($_POST['bo_content_tail']) ? $_POST['bo_content_tail'] : '';
|
||||
$bo_mobile_content_head = isset($_POST['bo_mobile_content_head']) ? $_POST['bo_mobile_content_head'] : '';
|
||||
@@ -174,7 +176,7 @@ $bo_write_min = isset($_POST['bo_write_min']) ? (int) $_POST['bo_write_min'] : 0
|
||||
$bo_write_max = isset($_POST['bo_write_max']) ? (int) $_POST['bo_write_max'] : 0;
|
||||
$bo_comment_min = isset($_POST['bo_comment_min']) ? (int) $_POST['bo_comment_min'] : 0;
|
||||
$bo_comment_max = isset($_POST['bo_comment_max']) ? (int) $_POST['bo_comment_max'] : 0;
|
||||
$bo_sort_field = isset($_POST['bo_sort_field']) ? clean_xss_tags($_POST['bo_sort_field'], 1, 1) : '';
|
||||
$bo_sort_field = isset($_POST['bo_sort_field']) ? addslashes(clean_xss_tags(stripslashes($_POST['bo_sort_field']), 1, 1)) : '';
|
||||
|
||||
if (strpbrk($bo_skin.$bo_mobile_skin, "?%*:|\"<>") !== false) {
|
||||
alert('스킨 디렉토리명 오류!');
|
||||
@@ -224,7 +226,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 +410,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 +500,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}' ";
|
||||
|
||||
@@ -32,6 +32,9 @@ if (!$sst) {
|
||||
$sst = "a.gr_id, a.bo_table";
|
||||
$sod = "asc";
|
||||
}
|
||||
$allowed_sst = array('a.gr_id', 'bo_table', 'bo_skin', 'bo_mobile_skin', 'bo_subject', 'bo_use_sns', 'bo_use_search', 'bo_order', 'a.gr_id, a.bo_table');
|
||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'a.gr_id, a.bo_table';
|
||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
||||
$sql_order = " order by $sst $sod ";
|
||||
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||
|
||||
@@ -34,6 +34,9 @@ if ($stx) {
|
||||
$sql_search .= " ) ";
|
||||
}
|
||||
|
||||
$allowed_sst = array('gr_id', 'gr_subject', 'gr_admin', 'gr_order');
|
||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = '';
|
||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
||||
if ($sst) {
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
} else {
|
||||
|
||||
@@ -28,6 +28,9 @@ if (!$sst) {
|
||||
$sst = "gm_datetime";
|
||||
$sod = "desc";
|
||||
}
|
||||
$allowed_sst = array('gm_datetime', 'b.mb_id', 'b.mb_name', 'b.mb_nick', 'b.mb_today_login', 'a.gm_datetime');
|
||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'gm_datetime';
|
||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
|
||||
@@ -21,7 +21,7 @@ if (!is_file(G5_DATA_PATH . '/cache/browscap_cache.php')) {
|
||||
}
|
||||
|
||||
require_once G5_PLUGIN_PATH . '/browscap/Browscap.php';
|
||||
$browscap = new phpbrowscap\Browscap(G5_DATA_PATH . '/cache');
|
||||
$browscap = new Browscap(G5_DATA_PATH . '/cache');
|
||||
$browscap->doAutoUpdate = false;
|
||||
$browscap->cacheFilename = 'browscap_cache.php';
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ if ($is_admin != 'super') {
|
||||
|
||||
require_once G5_PLUGIN_PATH . '/browscap/Browscap.php';
|
||||
|
||||
$browscap = new phpbrowscap\Browscap(G5_DATA_PATH . '/cache');
|
||||
$browscap = new Browscap(G5_DATA_PATH . '/cache');
|
||||
$browscap->updateMethod = 'cURL';
|
||||
$browscap->cacheFilename = 'browscap_cache.php';
|
||||
$browscap->updateCache();
|
||||
|
||||
+37
-146
@@ -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);
|
||||
@@ -417,25 +415,11 @@ if (!isset($config['cf_cert_use_seed'])) {
|
||||
sql_query($sql, false);
|
||||
}
|
||||
if (!isset($config['cf_cert_kcp_enckey'])) {
|
||||
$sql = "ALTER TABLE `{$g5['config_table']}`
|
||||
$sql = "ALTER TABLE `{$g5['config_table']}`
|
||||
ADD COLUMN `cf_cert_kcp_enckey` VARCHAR(100) NOT NULL DEFAULT '' AFTER `cf_cert_kcp_cd`; ";
|
||||
sql_query($sql, false);
|
||||
|
||||
$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
|
||||
);
|
||||
$config['cf_cert_kcp_enckey'] = '';
|
||||
}
|
||||
|
||||
// 광고성 정보 수신 동의 사용 필드 추가
|
||||
@@ -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>
|
||||
@@ -1084,7 +1068,24 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
<?php echo option_selected("", $config['cf_cert_hp'], "사용안함"); ?>
|
||||
<?php echo option_selected("kcb", $config['cf_cert_hp'], "코리아크레딧뷰로(KCB) 휴대폰 본인확인"); ?>
|
||||
<?php echo option_selected("kcp", $config['cf_cert_hp'], "NHN KCP 휴대폰 본인확인"); ?>
|
||||
<?php echo option_selected("kcp_v2", $config['cf_cert_hp'], "NHN KCP 휴대폰 본인확인(api_v2)"); ?>
|
||||
</select>
|
||||
<div id="cf_cert_hp_kcp_v2_notice" style="display:<?php echo ($config['cf_cert_hp'] == 'kcp_v2') ? 'block' : 'none'; ?>; margin-top:8px; padding:10px 12px; background:#fff8e1; border:1px solid #ffd54f; border-radius:4px; color:#5d4037; line-height:1.5;">
|
||||
<strong>NHN KCP 휴대폰 본인확인(api_v2)</strong> 사용 시,<br>
|
||||
NHN KCP 상점관리자 > 부가서비스 > 휴대폰본인확인 > 연동방식 설정 에서 <strong>신규 연동방식(V2) 사용여부를 ‘사용’</strong> 으로 변경해야 정상 동작합니다.
|
||||
</div>
|
||||
<script>
|
||||
jQuery(function($){
|
||||
function toggle_kcp_v2_notice() {
|
||||
var is_kcp_v2 = $('#cf_cert_hp').val() === 'kcp_v2';
|
||||
$('#cf_cert_hp_kcp_v2_notice').toggle(is_kcp_v2);
|
||||
$('#cf_cert_kcp_cd_prefix').toggle(!is_kcp_v2);
|
||||
}
|
||||
|
||||
$('#cf_cert_hp').on('change', toggle_kcp_v2_notice);
|
||||
toggle_kcp_v2_notice();
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -1120,16 +1121,16 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
<tr>
|
||||
<th scope="row" class="cf_cert_service"><label for="cf_cert_kcp_cd">NHN KCP 사이트코드</label></th>
|
||||
<td class="cf_cert_service">
|
||||
<?php echo help('SM으로 시작하는 5자리 사이트 코드중 뒤의 3자리만 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, 본인확인 서비스 신청페이지에서 서비스 신청 후 사이트코드를 발급 받으실 수 있습니다.') ?>
|
||||
<span class="sitecode">SM</span>
|
||||
<input type="text" name="cf_cert_kcp_cd" value="<?php echo get_sanitize_input($config['cf_cert_kcp_cd']); ?>" id="cf_cert_kcp_cd" class="frm_input" size="3"> <a href="http://sir.kr/main/service/p_cert.php" target="_blank" class="btn_frmline">NHN KCP 휴대폰 본인확인 서비스 신청페이지</a>
|
||||
<?php echo help('기존 NHN KCP 휴대폰 본인확인은 SM으로 시작하는 5자리 사이트 코드 중 뒤의 3자리만 입력해 주십시오.<br>NHN KCP 휴대폰 본인확인(api_v2)은 KCP에서 발급받은 5자리 사이트코드를 그대로 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, 본인확인 서비스 신청페이지에서 서비스 신청 후 사이트코드를 발급 받으실 수 있습니다.') ?>
|
||||
<span class="sitecode" id="cf_cert_kcp_cd_prefix" style="display:<?php echo ($config['cf_cert_hp'] == 'kcp_v2') ? 'none' : 'inline'; ?>;">SM</span>
|
||||
<input type="text" name="cf_cert_kcp_cd" value="<?php echo get_sanitize_input($config['cf_cert_kcp_cd']); ?>" id="cf_cert_kcp_cd" class="frm_input" size="10" maxlength="10"> <a href="http://sir.kr/main/service/p_cert.php" target="_blank" class="btn_frmline">NHN KCP 휴대폰 본인확인 서비스 신청페이지</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" class="cf_cert_service"><label for="cf_cert_kcp_enckey">NHN KCP 가맹점 인증키</label></th>
|
||||
<td class="cf_cert_service">
|
||||
<?php echo help('(선택사항, 추후 NHN_KCP 상점관리자에서 인증키 발급 메뉴 오픈일정 이후부터 적용되는 내용입니다.)<br>NHN_KCP 상점관리자 > 기술관리센터 > 인증센터 > 가맹점 인증키관리 에서 인증키 발급 후에 인증키 정보를 입력') ?>
|
||||
<input type="text" name="cf_cert_kcp_enckey" value="<?php echo get_sanitize_input($config['cf_cert_kcp_enckey']); ?>" id="cf_cert_kcp_enckey" class="frm_input" maxlength="100" size="40"> <a href="https://partner.kcp.co.kr" target="_blank" class="btn_frmline">NHN KCP 상점관리자</a>
|
||||
<?php echo help('NHN KCP 상점관리자 > 기술관리센터 > 인증센터 > 가맹점 인증키관리 에서 인증키를 발급받아 입력해 주십시오.<br>NHN KCP 휴대폰 본인확인(api_v2)도 이 인증키 값을 사용합니다.') ?>
|
||||
<input type="text" name="cf_cert_kcp_enckey" value="<?php echo get_sanitize_input($config['cf_cert_kcp_enckey']); ?>" id="cf_cert_kcp_enckey" class="frm_input" maxlength="100" size="70"> <a href="https://partner.kcp.co.kr" target="_blank" class="btn_frmline">NHN KCP 상점관리자</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -1156,12 +1157,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 +1190,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 +1250,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 +1282,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 +1784,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']}',
|
||||
|
||||
@@ -29,14 +29,25 @@ $co_id = isset($_REQUEST['co_id']) ? preg_replace('/[^a-z0-9_]/i', '', $_REQUEST
|
||||
$co_subject = isset($_POST['co_subject']) ? strip_tags(clean_xss_attributes($_POST['co_subject'])) : '';
|
||||
$co_include_head = isset($_POST['co_include_head']) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($_POST['co_include_head'], 0, 255)) : '';
|
||||
$co_include_tail = isset($_POST['co_include_tail']) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($_POST['co_include_tail'], 0, 255)) : '';
|
||||
|
||||
// 최고 관리자가 아니면 include 경로 변경 불가 (board_form_update.php 와 동일 정책)
|
||||
if ($is_admin !== 'super') {
|
||||
if ($w == 'u') {
|
||||
$co_include_head = isset($co_row['co_include_head']) ? $co_row['co_include_head'] : '';
|
||||
$co_include_tail = isset($co_row['co_include_tail']) ? $co_row['co_include_tail'] : '';
|
||||
} else {
|
||||
$co_include_head = '';
|
||||
$co_include_tail = '';
|
||||
}
|
||||
}
|
||||
$co_tag_filter_use = isset($_POST['co_tag_filter_use']) ? (int) $_POST['co_tag_filter_use'] : 1;
|
||||
$co_himg_del = (isset($_POST['co_himg_del']) && $_POST['co_himg_del']) ? 1 : 0;
|
||||
$co_timg_del = (isset($_POST['co_timg_del']) && $_POST['co_timg_del']) ? 1 : 0;
|
||||
$co_html = isset($_POST['co_html']) ? (int) $_POST['co_html'] : 0;
|
||||
$co_content = isset($_POST['co_content']) ? $_POST['co_content'] : '';
|
||||
$co_mobile_content = isset($_POST['co_mobile_content']) ? $_POST['co_mobile_content'] : '';
|
||||
$co_skin = isset($_POST['co_skin']) ? clean_xss_tags($_POST['co_skin'], 1, 1) : '';
|
||||
$co_mobile_skin = isset($_POST['co_mobile_skin']) ? clean_xss_tags($_POST['co_mobile_skin'], 1, 1) : '';
|
||||
$co_skin = isset($_POST['co_skin']) ? addslashes(clean_xss_tags(stripslashes($_POST['co_skin']), 1, 1)) : '';
|
||||
$co_mobile_skin = isset($_POST['co_mobile_skin']) ? addslashes(clean_xss_tags(stripslashes($_POST['co_mobile_skin']), 1, 1)) : '';
|
||||
|
||||
// 관리자가 자동등록방지를 사용해야 할 경우
|
||||
if (((isset($co_row['co_include_head']) && $co_row['co_include_head'] !== $co_include_head) || (isset($co_row['co_include_tail']) && $co_row['co_include_tail'] !== $co_include_tail)) && function_exists('get_admin_captcha_by') && get_admin_captcha_by()) {
|
||||
|
||||
+5
-29
@@ -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}
|
||||
@@ -590,7 +586,7 @@ td.td_grpset {width:160px;border-left:1px solid #e9ecee;text-align:center}
|
||||
.td_time{text-align:center;width:130px}
|
||||
.td_center{text-align:center;}
|
||||
.td_type{width:120px}
|
||||
.td_consent{width:200px}
|
||||
.td_consent{min-width:70px;max-width:200px}
|
||||
|
||||
.td_mng_s{width:60px}
|
||||
.td_mng_m{width:100px}
|
||||
@@ -743,14 +739,15 @@ a.nicepay_btn{display:inline-block;margin:5px 0 0;padding:5px 10px;background:#0
|
||||
|
||||
ul.de_pg_tab{margin:0;padding:0;zoom:1}
|
||||
ul.de_pg_tab:after{display:block;visibility:hidden;clear:both;content:"";}
|
||||
ul.de_pg_tab li{position:relative;display:inline-block;float:left;text-align:center;margin:0;padding:0;width:120px}
|
||||
ul.de_pg_tab li a{margin:0 2px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:2.5;background-color:#f7f7f7;color:#74777b;font-weight:bold;font-size:1.2em;text-decoration:none}
|
||||
ul.de_pg_tab li{position:relative;display:inline-block;float:left;text-align:center;margin:0;padding:0;min-width:130px}
|
||||
ul.de_pg_tab li a{margin:0 2px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:2.5;background-color:#f7f7f7;color:#74777b;font-weight:bold;font-size:1.2em;text-decoration:none; padding:0px 10px;}
|
||||
ul.de_pg_tab li a:hover{text-decoration:none}
|
||||
ul.de_pg_tab li.tab-current a{background:#2CC185;color:#fff}
|
||||
|
||||
.pg_info_fld{position:relative}
|
||||
.kcp_info_fld th{background-color:#F6FCFF}
|
||||
.lg_info_fld th{background-color:#FFF4FA}
|
||||
.lg_info_fld_v2 th{background-color:#ffe8f5}
|
||||
.inicis_info_fld th{background-color:#F6F1FF}
|
||||
.kakao_info_fld th{background-color:#FFFCED}
|
||||
.naver_info_fld th{background-color:#F3FFF3}
|
||||
@@ -1220,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; }
|
||||
}
|
||||
+50
-129
@@ -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,46 +317,62 @@ 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=알림톡)
|
||||
// 쿠폰 로그 테이블에 UNIQUE 인덱스 추가 (쿠폰 이중사용 방지)
|
||||
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
|
||||
);
|
||||
$result = sql_query("SHOW INDEX FROM `{$g5['g5_shop_coupon_log_table']}` WHERE Key_name = 'idx_coupon_use'", false);
|
||||
if (!$result || !sql_num_rows($result)) {
|
||||
// 기존에 동일 쿠폰이 중복 사용된 데이터가 있으면 UNIQUE 인덱스 생성 실패하므로 중복 데이터 정리
|
||||
$dup_sql = " SELECT cp_id, mb_id, MIN(cl_id) as keep_id
|
||||
FROM `{$g5['g5_shop_coupon_log_table']}`
|
||||
GROUP BY cp_id, mb_id
|
||||
HAVING COUNT(*) > 1 ";
|
||||
|
||||
$is_check = true;
|
||||
$dup_result = sql_query($dup_sql, false);
|
||||
if ($dup_result && sql_num_rows($dup_result)) {
|
||||
while ($dup_row = sql_fetch_array($dup_result)) {
|
||||
|
||||
echo $dup_row['cp_id']." 의 동일 쿠폰이 중복 사용된 데이터가 있으므로 인덱스 생성이 불가합니다. <br>";
|
||||
|
||||
$sql = " DELETE FROM `{$g5['g5_shop_coupon_log_table']}`
|
||||
WHERE cp_id = '{$dup_row['cp_id']}'
|
||||
AND mb_id = '{$dup_row['mb_id']}'
|
||||
AND cl_id != '{$dup_row['keep_id']}' ";
|
||||
if ($is_admin === 'super') {
|
||||
echo "데이터베이스에서 검토후에 이 쿼리문을 실행해 주세요.<br>$sql<br>";
|
||||
}
|
||||
// sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
// MyISAM + utf8mb4 환경에서 키 길이 초과 방지: cp_id varchar(100), mb_id varchar(100)으로 조정
|
||||
sql_query("ALTER TABLE `{$g5['g5_shop_coupon_log_table']}` MODIFY `cp_id` varchar(100) NOT NULL DEFAULT '', MODIFY `mb_id` varchar(100) NOT NULL DEFAULT ''", false);
|
||||
sql_query("ALTER TABLE `{$g5['g5_shop_coupon_log_table']}` ADD UNIQUE KEY `idx_coupon_use` (`cp_id`, `mb_id`)", false);
|
||||
$is_check = true;
|
||||
}
|
||||
}
|
||||
|
||||
// 자동 로그인 토큰 테이블 생성 (KVE-2026-0610: 추측 가능한 자동 로그인 쿠키 위조 방지)
|
||||
// 다중 디바이스 지원을 위해 회원당 여러 토큰을 별도 테이블로 관리
|
||||
if (!isset($g5['member_auto_login_table'])) {
|
||||
$g5['member_auto_login_table'] = G5_TABLE_PREFIX.'member_auto_login';
|
||||
}
|
||||
if (!sql_query(" DESC `{$g5['member_auto_login_table']}` ", false)) {
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['member_auto_login_table']}` (
|
||||
`al_id` int(11) NOT NULL auto_increment,
|
||||
`mb_id` varchar(20) NOT NULL default '',
|
||||
`al_token` varchar(64) NOT NULL default '',
|
||||
`al_user_agent` varchar(255) NOT NULL default '',
|
||||
`al_ip` varchar(45) NOT NULL default '',
|
||||
`al_created` datetime DEFAULT NULL,
|
||||
`al_last_used` datetime DEFAULT NULL,
|
||||
`al_expire` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`al_id`),
|
||||
UNIQUE KEY `al_token` (`al_token`),
|
||||
KEY `mb_id` (`mb_id`),
|
||||
KEY `al_expire` (`al_expire`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
$is_check = run_replace('admin_dbupgrade', $is_check);
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.0 KiB |
+9
-4
@@ -284,14 +284,19 @@ if (!auth_check_menu($auth, '200200', 'r', true)) {
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$row2['mb_id'] = '';
|
||||
$row2 = array('mb_id'=>'');
|
||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||
if ($row2['mb_id'] != $row['mb_id']) {
|
||||
if (empty($row2) || $row2['mb_id'] != $row['mb_id']) {
|
||||
$sql2 = " SELECT mb_id, mb_name, mb_nick, mb_email, mb_homepage, mb_point from {$g5['member_table']} where mb_id = '{$row['mb_id']}' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
}
|
||||
|
||||
$mb_nick = get_sideview($row['mb_id'], $row2['mb_nick'], $row2['mb_email'], $row2['mb_homepage']);
|
||||
$mb_nick = get_sideview(
|
||||
$row['mb_id'],
|
||||
isset($row2['mb_nick']) ? $row2['mb_nick'] : '',
|
||||
isset($row2['mb_email']) ? $row2['mb_email'] : '',
|
||||
isset($row2['mb_homepage']) ? $row2['mb_homepage'] : ''
|
||||
);
|
||||
|
||||
$link1 = $link2 = "";
|
||||
if (!preg_match("/^\@/", $row['po_rel_table']) && $row['po_rel_table']) {
|
||||
@@ -302,7 +307,7 @@ if (!auth_check_menu($auth, '200200', 'r', true)) {
|
||||
|
||||
<tr>
|
||||
<td class="td_mbid"><a href="./point_list.php?sfl=mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo $row['mb_id'] ?></a></td>
|
||||
<td class="td_mbname"><?php echo get_text($row2['mb_name']); ?></td>
|
||||
<td class="td_mbname"><?php echo isset($row2['mb_name']) ? get_text($row2['mb_name']) : ''; ?></td>
|
||||
<td class="td_name sv_use">
|
||||
<div><?php echo $mb_nick ?></div>
|
||||
</td>
|
||||
|
||||
@@ -80,7 +80,7 @@ require_once './admin.head.php';
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_email">E-mail</label></th>
|
||||
<td>
|
||||
<?php echo help("메일 주소에 단어 포함 (예 : @" . preg_replace('#^(www[^\.]*\.){1}#', '', $_SERVER['HTTP_HOST']) . ")") ?>
|
||||
<?php echo help("메일 주소에 단어 포함 (예 : @" . htmlspecialchars(preg_replace('#^(www[^\.]*\.){1}#', '', $_SERVER['HTTP_HOST'])) . ")") ?>
|
||||
<input type="text" name="mb_email" value="<?php echo get_sanitize_input($mb_email); ?>" id="mb_email" class="frm_input" size="50">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -12,10 +12,10 @@ $sql_common = " from {$g5['member_table']} ";
|
||||
$sql_where = " where (1) ";
|
||||
|
||||
$mb_id1 = isset($_POST['mb_id1']) ? (int) $_POST['mb_id1'] : 1;
|
||||
$mb_id1_from = isset($_POST['mb_id1_from']) ? clean_xss_tags($_POST['mb_id1_from'], 1, 1, 30) : '';
|
||||
$mb_id1_to = isset($_POST['mb_id1_to']) ? clean_xss_tags($_POST['mb_id1_to'], 1, 1, 30) : '';
|
||||
$mb_email = isset($_POST['mb_email']) ? clean_xss_tags($_POST['mb_email'], 1, 1, 100) : '';
|
||||
$mb_mailling = isset($_POST['mb_mailling']) ? clean_xss_tags($_POST['mb_mailling'], 1, 1, 100) : '';
|
||||
$mb_id1_from = isset($_POST['mb_id1_from']) ? addslashes(clean_xss_tags(stripslashes($_POST['mb_id1_from']), 1, 1, 30)) : '';
|
||||
$mb_id1_to = isset($_POST['mb_id1_to']) ? addslashes(clean_xss_tags(stripslashes($_POST['mb_id1_to']), 1, 1, 30)) : '';
|
||||
$mb_email = isset($_POST['mb_email']) ? addslashes(clean_xss_tags(stripslashes($_POST['mb_email']), 1, 1, 100)) : '';
|
||||
$mb_mailling = isset($_POST['mb_mailling']) ? addslashes(clean_xss_tags(stripslashes($_POST['mb_mailling']), 1, 1, 100)) : '';
|
||||
$mb_level_from = isset($_POST['mb_level_from'])? (int) $_POST['mb_level_from'] : 1;
|
||||
$mb_level_to = isset($_POST['mb_level_to']) ? (int) $_POST['mb_level_to'] : 10;
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
+11
-16
@@ -19,14 +19,8 @@ $mb_certify = isset($_POST['mb_certify']) ? preg_replace('/[^0-9a-z_]/i', ''
|
||||
$mb_zip = isset($_POST['mb_zip']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['mb_zip']) : '';
|
||||
|
||||
// 광고성 정보 수신
|
||||
$mb_marketing_agree = isset($_POST['mb_marketing_agree']) ? clean_xss_tags($_POST['mb_marketing_agree'], 1, 1) : '0';
|
||||
$mb_thirdparty_agree = isset($_POST['mb_thirdparty_agree']) ? clean_xss_tags($_POST['mb_thirdparty_agree'], 1, 1) : '0';
|
||||
|
||||
// 게시판알림 설정
|
||||
$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;
|
||||
$mb_marketing_agree = isset($_POST['mb_marketing_agree']) ? addslashes(clean_xss_tags(stripslashes($_POST['mb_marketing_agree']), 1, 1)) : '0';
|
||||
$mb_thirdparty_agree = isset($_POST['mb_thirdparty_agree']) ? addslashes(clean_xss_tags(stripslashes($_POST['mb_thirdparty_agree']), 1, 1)) : '0';
|
||||
|
||||
// 관리자가 자동등록방지를 사용해야 할 경우 ( 회원의 비밀번호 변경시 캡챠를 체크한다 )
|
||||
if ($mb_password) {
|
||||
@@ -90,9 +84,9 @@ for ($i = 1; $i <= 10; $i++) {
|
||||
|
||||
foreach ($check_keys as $key) {
|
||||
if( in_array($key, array('mb_signature', 'mb_profile')) ){
|
||||
$posts[$key] = isset($_POST[$key]) ? clean_xss_tags($_POST[$key], 1, 1, 0, 0) : '';
|
||||
$posts[$key] = isset($_POST[$key]) ? addslashes(clean_xss_tags(stripslashes($_POST[$key]), 1, 1, 0, 0)) : '';
|
||||
} else {
|
||||
$posts[$key] = isset($_POST[$key]) ? clean_xss_tags($_POST[$key], 1, 1) : '';
|
||||
$posts[$key] = isset($_POST[$key]) ? addslashes(clean_xss_tags(stripslashes($_POST[$key]), 1, 1)) : '';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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']}',
|
||||
@@ -137,6 +127,11 @@ $sql_common = " mb_name = '{$posts['mb_name']}',
|
||||
mb_9 = '{$posts['mb_9']}',
|
||||
mb_10 = '{$posts['mb_10']}' ";
|
||||
|
||||
// 부여하려는 mb_level 상한 검증 (자기보다 높은 권한 부여 차단)
|
||||
if ($is_admin !== 'super' && (int) $posts['mb_level'] >= (int) $member['mb_level']) {
|
||||
alert('자신보다 권한이 높거나 같은 등급은 부여할 수 없습니다.');
|
||||
}
|
||||
|
||||
if ($w == '') {
|
||||
$mb = get_member($mb_id);
|
||||
if (isset($mb['mb_id']) && $mb['mb_id']) {
|
||||
@@ -157,7 +152,7 @@ if ($w == '') {
|
||||
alert('이미 존재하는 이메일입니다.\\nID : ' . $row['mb_id'] . '\\n이름 : ' . $row['mb_name'] . '\\n닉네임 : ' . $row['mb_nick'] . '\\n메일 : ' . $row['mb_email']);
|
||||
}
|
||||
|
||||
$agree_items = [];
|
||||
$agree_items = array();
|
||||
// 마케팅 목적의 개인정보 수집 및 이용
|
||||
if ($mb_marketing_agree == 1) {
|
||||
$sql_common .= " , mb_marketing_date = '".G5_TIME_YMDHIS."' ";
|
||||
@@ -240,7 +235,7 @@ if ($w == '') {
|
||||
|
||||
// 현재 데이터 조회
|
||||
$row = sql_fetch("select * from {$g5['member_table']} where mb_id = '{$mb_id}' ");
|
||||
$agree_items = [];
|
||||
$agree_items = array();
|
||||
|
||||
// 마케팅 목적의 개인정보 수집 및 이용
|
||||
$sql_marketing_date = "";
|
||||
|
||||
+15
-10
@@ -6,6 +6,12 @@ auth_check_menu($auth, $sub_menu, 'r');
|
||||
|
||||
$sql_common = " from {$g5['member_table']} ";
|
||||
|
||||
// $sfl 화이트리스트 검증 (KVE-2026-0340)
|
||||
$allowed_sfl = array('mb_id', 'mb_nick', 'mb_name', 'mb_level', 'mb_email', 'mb_tel', 'mb_hp', 'mb_point', 'mb_datetime', 'mb_ip', 'mb_recommend');
|
||||
if (!in_array($sfl, $allowed_sfl)) {
|
||||
$sfl = 'mb_id';
|
||||
}
|
||||
|
||||
$sql_search = " where (1) ";
|
||||
if ($stx) {
|
||||
$sql_search .= " and ( ";
|
||||
@@ -127,7 +133,7 @@ $colspan = 16;
|
||||
<th scope="col" rowspan="2" id="mb_list_cert"><?php echo subject_sort_link('mb_certify', '', 'desc') ?>본인확인</a></th>
|
||||
<th scope="col" id="mb_list_mailc"><?php echo subject_sort_link('mb_email_certify', '', 'desc') ?>메일인증</a></th>
|
||||
<th scope="col" id="mb_list_open"><?php echo subject_sort_link('mb_open', '', 'desc') ?>정보공개</a></th>
|
||||
<th scope="col" id="mb_list_mailr"><?php echo subject_sort_link('mb_mailling', '', 'desc') ?>광고성이메일수신</a></th>
|
||||
<th scope="col" id="mb_list_mailr"><?php echo subject_sort_link('mb_mailling', '', 'desc') ?>광고성이메일</a></th>
|
||||
<th scope="col" id="mb_list_auth">상태</th>
|
||||
<th scope="col" id="mb_list_mobile">휴대폰</th>
|
||||
<th scope="col" id="mb_list_lastcall"><?php echo subject_sort_link('mb_today_login', '', 'desc') ?>최종접속</a></th>
|
||||
@@ -137,9 +143,9 @@ $colspan = 16;
|
||||
<tr>
|
||||
<th scope="col" id="mb_list_name"><?php echo subject_sort_link('mb_name') ?>이름</a></th>
|
||||
<th scope="col" id="mb_list_nick"><?php echo subject_sort_link('mb_nick') ?>닉네임</a></th>
|
||||
<th scope="col" id="mb_list_sms"><?php echo subject_sort_link('mb_sms', '', 'desc') ?>광고성SMS/카카오톡수신</a></th>
|
||||
<th scope="col" id="mb_list_adultc"><?php echo subject_sort_link('mb_adult', '', 'desc') ?>성인인증</a></th>
|
||||
<th scope="col" id="mb_list_auth"><?php echo subject_sort_link('mb_intercept_date', '', 'desc') ?>접근차단</a></th>
|
||||
<th scope="col" id="mb_list_sms"><?php echo subject_sort_link('mb_sms', '', 'desc') ?>광고성SMS</a></th>
|
||||
<th scope="col" id="mb_list_deny"><?php echo subject_sort_link('mb_level', '', 'desc') ?>권한</a></th>
|
||||
<th scope="col" id="mb_list_tel">전화번호</th>
|
||||
<th scope="col" id="mb_list_join"><?php echo subject_sort_link('mb_datetime', '', 'desc') ?>가입일</a></th>
|
||||
@@ -258,9 +264,9 @@ $colspan = 16;
|
||||
<input type="checkbox" name="mb_open[<?php echo $i; ?>]" <?php echo $row['mb_open'] ? 'checked' : ''; ?> value="1" id="mb_open_<?php echo $i; ?>">
|
||||
</td>
|
||||
<td headers="mb_list_mailr" class="td_consent">
|
||||
<label for="mb_mailling_<?php echo $i; ?>" class="sound_only">메일수신</label>
|
||||
<label for="mb_mailling_<?php echo $i; ?>" class="sound_only">광고성이메일수신</label>
|
||||
<input type="checkbox" name="mb_mailling[<?php echo $i; ?>]" <?php echo $row['mb_mailling'] ? 'checked' : ''; ?> value="1" id="mb_mailling_<?php echo $i; ?>">
|
||||
<input type="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
|
||||
@@ -281,12 +287,6 @@ $colspan = 16;
|
||||
<td headers="mb_list_nick" class="td_name sv_use">
|
||||
<div><?php echo $mb_nick ?></div>
|
||||
</td>
|
||||
|
||||
<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; ?>">
|
||||
</td>
|
||||
<td headers="mb_list_adultc">
|
||||
<label for="mb_adult_<?php echo $i; ?>" class="sound_only">성인인증</label>
|
||||
<input type="checkbox" name="mb_adult[<?php echo $i; ?>]" <?php echo $row['mb_adult'] ? 'checked' : ''; ?> value="1" id="mb_adult_<?php echo $i; ?>">
|
||||
@@ -297,6 +297,11 @@ $colspan = 16;
|
||||
<label for="mb_intercept_date_<?php echo $i; ?>" class="sound_only">접근차단</label>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<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 isset($row['mb_sms']) ? $row['mb_sms'] : '0'; ?> " id="mb_sms_default_<?php echo $i; ?>">
|
||||
</td>
|
||||
<td headers="mb_list_auth" class="td_mbstat">
|
||||
<?php echo get_member_level_select("mb_level[$i]", 1, $member['mb_level'], $row['mb_level']) ?>
|
||||
</td>
|
||||
|
||||
@@ -21,8 +21,8 @@ define('MEMBER_LOG_DIR', G5_DATA_PATH . "/" . MEMBER_BASE_DIR . "/" . "log");
|
||||
*/
|
||||
function get_export_config($type = null)
|
||||
{
|
||||
$config = [
|
||||
'sfl_list' => [
|
||||
$config = array(
|
||||
'sfl_list' => array(
|
||||
'mb_id'=>'아이디',
|
||||
'mb_name'=>'이름',
|
||||
'mb_nick'=>'닉네임',
|
||||
@@ -30,26 +30,26 @@ function get_export_config($type = null)
|
||||
'mb_tel'=>'전화번호',
|
||||
'mb_hp'=>'휴대폰번호',
|
||||
'mb_addr1'=>'주소'
|
||||
],
|
||||
'point_cond_map' => [
|
||||
),
|
||||
'point_cond_map' => array(
|
||||
'gte'=>'≥',
|
||||
'lte'=>'≤',
|
||||
'eq'=>'='
|
||||
],
|
||||
'intercept_list' => [
|
||||
),
|
||||
'intercept_list' => array(
|
||||
'exclude'=>'차단회원 제외',
|
||||
'only'=>'차단회원만'
|
||||
],
|
||||
'ad_range_list' => [
|
||||
),
|
||||
'ad_range_list' => array(
|
||||
'all' => '수신동의 회원 전체',
|
||||
'mailling_only' => '이메일 수신동의 회원만',
|
||||
'sms_only' => 'SMS/카카오톡 수신동의 회원만',
|
||||
'month_confirm' => date('m월').' 수신동의 확인 대상만',
|
||||
'custom_period' => '수신동의 기간 직접 입력'
|
||||
],
|
||||
];
|
||||
),
|
||||
);
|
||||
|
||||
return $type ? ($config[$type] ?? []) : $config;
|
||||
return $type ? (isset($config[$type]) ? $config[$type] : array()) : $config;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -58,58 +58,64 @@ function get_export_config($type = null)
|
||||
function get_member_export_params()
|
||||
{
|
||||
// 친구톡 양식 - 엑셀 양식에 포함할 항목
|
||||
$fieldArray = array_map('trim', explode(',', $_GET['fields'] ?? ''));
|
||||
$vars = [];
|
||||
$fieldArray = array_map('trim', explode(',', isset($_GET['fields']) ? $_GET['fields'] : ''));
|
||||
$vars = array();
|
||||
foreach ($fieldArray as $index => $field) {
|
||||
if(!empty($field)){
|
||||
$vars['var' . ($index + 1)] = $field;
|
||||
}
|
||||
}
|
||||
|
||||
$params = [
|
||||
$params = array(
|
||||
'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,
|
||||
];
|
||||
);
|
||||
|
||||
// 레벨 범위 검증
|
||||
if ($params['level_start'] > $params['level_end']) {
|
||||
[$params['level_start'] , $params['level_end']] = [$params['level_end'], $params['level_start']];
|
||||
$tmp_level = $params['level_start'];
|
||||
$params['level_start'] = $params['level_end'];
|
||||
$params['level_end'] = $tmp_level;
|
||||
}
|
||||
|
||||
// 가입기간 - 날짜 범위 검증
|
||||
if ($params['use_date'] && $params['date_start'] && $params['date_end']) {
|
||||
if ($params['date_start'] > $params['date_end']) {
|
||||
[$params['date_start'] , $params['date_end']] = [$params['date_end'], $params['date_start']];
|
||||
$tmp_date = $params['date_start'];
|
||||
$params['date_start'] = $params['date_end'];
|
||||
$params['date_end'] = $tmp_date;
|
||||
}
|
||||
}
|
||||
|
||||
// 수신동의기간 - 날짜 범위 검증
|
||||
if ($params['ad_range_type'] == 'custom_period' && $params['agree_date_start'] && $params['agree_date_end']) {
|
||||
if ($params['agree_date_start'] > $params['agree_date_end']) {
|
||||
[$params['agree_date_start'] , $params['agree_date_end']] = [$params['agree_date_end'], $params['agree_date_start']];
|
||||
$tmp_agree_date = $params['agree_date_start'];
|
||||
$params['agree_date_start'] = $params['agree_date_end'];
|
||||
$params['agree_date_end'] = $tmp_agree_date;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,7 +147,7 @@ function member_export_get_total_count($params)
|
||||
function member_export_build_where($params)
|
||||
{
|
||||
global $config;
|
||||
$conditions = [];
|
||||
$conditions = array();
|
||||
|
||||
// 기본 조건 - 탈퇴하지 않은 사용자
|
||||
$conditions[] = "mb_leave_date = ''";
|
||||
@@ -212,11 +218,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 +247,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'";
|
||||
@@ -264,7 +269,7 @@ function member_export_build_where($params)
|
||||
$conditions[] = "0=1"; // 둘 다 해제 ⇒ 결과 0건
|
||||
} else {
|
||||
// 조건 조립
|
||||
$parts = [];
|
||||
$parts = array();
|
||||
if ($useEmail) $parts[] = "(mb_mailling = 1 AND {$emailDateCond})";
|
||||
if ($useSms) $parts[] = "(mb_sms = 1 AND {$smsDateCond})";
|
||||
|
||||
|
||||
+23
-118
@@ -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,24 +179,24 @@ $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 = [
|
||||
$ad_range_text = array(
|
||||
'all' => "* <b>광고성 정보 수신(이메일 또는 SMS/카카오톡)</b> / <b>마케팅 목적의 개인정보 수집 및 이용</b>{$thirdpartyLbl}에 모두 동의한 회원을 선택합니다.",
|
||||
'mailling_only' => "* <b>광고성 이메일 수신</b> / <b>마케팅 목적의 개인정보 수집 및 이용</b>{$thirdpartyLbl}에 모두 동의한 회원을 선택합니다.",
|
||||
'sms_only' => "* <b>광고성 SMS/카카오톡 수신</b> / <b>마케팅 목적의 개인정보 수집 및 이용</b>{$thirdpartyLbl}에 모두 동의한 회원을 선택합니다.",
|
||||
'month_confirm' => "* 23개월 전(" . date('Y년 m월', strtotime('-23 month')) . ") <b>광고성 정보 수신 동의(이메일 또는 SMS/카카오톡)</b>한 회원을 선택합니다."
|
||||
];
|
||||
);
|
||||
|
||||
if (isset($_GET['ad_range_only'], $_GET['ad_range_type']) && isset($ad_range_text[$_GET['ad_range_type']])) {
|
||||
echo '<div class="ad_range_box"><p>' . $ad_range_text[$_GET['ad_range_type']] . '</p></div>';
|
||||
@@ -227,7 +210,7 @@ $colspan = 14;
|
||||
</div>
|
||||
|
||||
<!-- 채널 체크박스 -->
|
||||
<div class="sch_row <?php echo isset($_GET['ad_range_only']) && in_array($_GET['ad_range_type'], ['month_confirm', 'custom_period']) ? '' : 'is-hidden'; ?>">
|
||||
<div class="sch_row <?php echo isset($_GET['ad_range_only']) && in_array($_GET['ad_range_type'], array('month_confirm', 'custom_period')) ? '' : 'is-hidden'; ?>">
|
||||
<div class="ad_range_wrap">
|
||||
<div class="ad_range_box">
|
||||
<div class="label">
|
||||
@@ -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) {
|
||||
@@ -575,4 +480,4 @@ function triggerAutoDownload(url, filename) {
|
||||
</script>
|
||||
|
||||
<?php
|
||||
require_once './admin.tail.php';
|
||||
require_once './admin.tail.php';
|
||||
|
||||
@@ -14,7 +14,7 @@ session_write_close(); // 세션 종료 및 잠금 해제 (백그라운드 작
|
||||
$params = get_member_export_params();
|
||||
if (!$params || !is_array($params)) {
|
||||
member_export_send_progress("error", "데이터가 올바르게 전달되지 않아 작업에 실패하였습니다.");
|
||||
member_export_write_log([], ['success' => false, 'error' => '데이터가 올바르게 전달되지 않아 작업에 실패하였습니다.']);
|
||||
member_export_write_log(array(), array('success' => false, 'error' => '데이터가 올바르게 전달되지 않아 작업에 실패하였습니다.'));
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -25,10 +25,10 @@ $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' => '잘못된 요청 입니다.']);
|
||||
member_export_write_log($params, array('success' => false, 'error' => '잘못된 요청 입니다.'));
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ catch (Exception $e)
|
||||
// 에러 로그 저장 및 SSE 에러 전송
|
||||
error_log("[Member Export Error] " . $e->getMessage());
|
||||
member_export_send_progress("error", $e->getMessage());
|
||||
member_export_write_log($params, ['success' => false, 'error' => $e->getMessage()]);
|
||||
member_export_write_log($params, array('success' => false, 'error' => $e->getMessage()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -62,7 +62,7 @@ function main_member_export($params)
|
||||
}
|
||||
|
||||
$fileName = 'member_'.MEMBER_BASE_DATE;
|
||||
$fileList = [];
|
||||
$fileList = array();
|
||||
$zipFileName = '';
|
||||
|
||||
if ($total > MEMBER_EXPORT_PAGE_SIZE) {
|
||||
@@ -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());
|
||||
}
|
||||
@@ -88,7 +88,7 @@ function main_member_export($params)
|
||||
$zipResult = member_export_create_zip($fileList, $fileName); // 압축 파일 생성
|
||||
|
||||
if($zipResult['error']){
|
||||
member_export_write_log($params, ['success' => false, 'error' => $zipResult['error']]);
|
||||
member_export_write_log($params, array('success' => false, 'error' => $zipResult['error']));
|
||||
member_export_send_progress("zippingError", $zipResult['error']);
|
||||
}
|
||||
|
||||
@@ -103,23 +103,23 @@ 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, array('success' => true, 'total' => $total, 'files' => $fileList, 'zip' => isset($zipFileName) ? $zipFileName : null));
|
||||
member_export_send_progress("done", "", 2, $total, $total, $pages, $pages, $fileList, $zipFileName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 진행률 전송
|
||||
*/
|
||||
function member_export_send_progress($status, $message = "", $downloadType = 1, $total = 1, $current = 1, $totalChunks = 1, $currentChunk = 1, $files = [], $zipFile = '')
|
||||
function member_export_send_progress($status, $message = "", $downloadType = 1, $total = 1, $current = 1, $totalChunks = 1, $currentChunk = 1, $files = array(), $zipFile = '')
|
||||
{
|
||||
// 연결 상태 확인
|
||||
if (connection_aborted()) return;
|
||||
|
||||
$data = [
|
||||
$data = array(
|
||||
'status' => $status,
|
||||
'message' => $message,
|
||||
'downloadType' => $downloadType,
|
||||
@@ -130,9 +130,10 @@ function member_export_send_progress($status, $message = "", $downloadType = 1,
|
||||
'files' => $files,
|
||||
'zipFile' => $zipFile,
|
||||
'filePath' => G5_DATA_URL . "/" . MEMBER_BASE_DIR . "/" . MEMBER_BASE_DATE,
|
||||
];
|
||||
);
|
||||
|
||||
echo "data: " . json_encode($data, JSON_UNESCAPED_UNICODE) . "\n\n";
|
||||
$json_options = defined('JSON_UNESCAPED_UNICODE') ? JSON_UNESCAPED_UNICODE : 0;
|
||||
echo "data: " . json_encode($data, $json_options) . "\n\n";
|
||||
|
||||
// 더 안정적인 플러시
|
||||
if (ob_get_level()) ob_end_flush();
|
||||
@@ -142,26 +143,21 @@ function member_export_send_progress($status, $message = "", $downloadType = 1,
|
||||
/**
|
||||
* 엑셀 내보내기 설정
|
||||
*/
|
||||
function member_export_get_config($type)
|
||||
function member_export_get_config()
|
||||
{
|
||||
$configs = [
|
||||
1 => [
|
||||
'title' => ["회원관리파일(일반)"],
|
||||
'headers' => ['아이디', '이름', '닉네임', '휴대폰번호', '전화번호', '이메일', '주소', '회원권한', '포인트', '가입일', '차단',
|
||||
$type = 1;
|
||||
$configs = array(
|
||||
1 => array(
|
||||
'title' => array("회원관리파일(일반)"),
|
||||
'headers' => array('아이디', '이름', '닉네임', '휴대폰번호', '전화번호', '이메일', '주소', '회원권한', '포인트', '가입일', '차단',
|
||||
'광고성 이메일 수신동의', '광고성 이메일 동의일자', '광고성 SMS/카카오톡 수신동의', '광고성 SMS/카카오톡 동의일자',
|
||||
'마케팅목적의개인정보수집및이용동의', '마케팅목적의개인정보수집및이용동의일자', '개인정보제3자제공동의', '개인정보제3자제공동의일자'],
|
||||
'fields' => ['mb_id', 'mb_name', 'mb_nick', 'mb_hp', 'mb_tel', 'mb_email', 'mb_addr1', 'mb_level', 'mb_point', 'mb_datetime', 'mb_intercept_date',
|
||||
'마케팅목적의개인정보수집및이용동의', '마케팅목적의개인정보수집및이용동의일자', '개인정보제3자제공동의', '개인정보제3자제공동의일자'),
|
||||
'fields' => array('mb_id', 'mb_name', 'mb_nick', 'mb_hp', 'mb_tel', 'mb_email', 'mb_addr1', 'mb_level', 'mb_point', 'mb_datetime', 'mb_intercept_date',
|
||||
'mb_mailling','mb_mailling_date', 'mb_sms','mb_sms_date', 'mb_marketing_agree',
|
||||
'mb_marketing_date', 'mb_thirdparty_agree', 'mb_thirdparty_date'],
|
||||
'widths' => [20, 20, 20, 20, 20, 30, 30, 10, 15, 25, 10, 20, 25, 20, 25, 20, 25, 20, 25],
|
||||
],
|
||||
2 => [
|
||||
'title' => ["회원관리파일(팝빌)"],
|
||||
'headers' => ['휴대폰번호', '이름', '변수1', '변수2', '변수3'],
|
||||
'fields' => ['mb_hp', 'mb_name'],
|
||||
'widths' => [20, 15, 30, 30, 30],
|
||||
],
|
||||
];
|
||||
'mb_marketing_date', 'mb_thirdparty_agree', 'mb_thirdparty_date'),
|
||||
'widths' => array(20, 20, 20, 20, 20, 30, 30, 10, 15, 25, 10, 20, 25, 20, 25, 20, 25, 20, 25),
|
||||
),
|
||||
);
|
||||
|
||||
return isset($configs[$type]) ? $configs[$type] : $configs[1];
|
||||
}
|
||||
@@ -195,18 +191,12 @@ 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 변환 맵 (가공이 필요한 필드만 정의)
|
||||
$sqlTransformMap = [
|
||||
$sqlTransformMap = array(
|
||||
'mb_datetime' => "IF(mb_datetime = '0000-00-00 00:00:00', '', mb_datetime) AS mb_datetime",
|
||||
'mb_intercept_date' => "IF(mb_intercept_date != '', '차단됨', '정상') AS mb_intercept_date",
|
||||
'mb_sms' => "IF(mb_sms = '1', '동의', '미동의') AS mb_sms",
|
||||
@@ -217,18 +207,18 @@ function member_export_get_data($params)
|
||||
'mb_marketing_date' => "IF(mb_marketing_agree != '1' OR mb_marketing_date = '0000-00-00 00:00:00', '', mb_marketing_date) AS mb_marketing_date",
|
||||
'mb_thirdparty_agree' => "IF(mb_thirdparty_agree = '1', '동의', '미동의') AS mb_thirdparty_agree",
|
||||
'mb_thirdparty_date' => "IF(mb_thirdparty_agree != '1' OR mb_thirdparty_date = '0000-00-00 00:00:00', '', mb_thirdparty_date) AS mb_thirdparty_date",
|
||||
];
|
||||
);
|
||||
|
||||
// SQL 필드 생성
|
||||
$sqlFields = [];
|
||||
$sqlFields = array();
|
||||
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;
|
||||
|
||||
@@ -239,12 +229,16 @@ function member_export_get_data($params)
|
||||
throw new Exception("데이터 조회에 실패하였습니다");
|
||||
}
|
||||
|
||||
$excelData = [$config['title'], $config['headers']];
|
||||
$excelData = array($config['title'], $config['headers']);
|
||||
|
||||
while ($row = sql_fetch_array($result)) {
|
||||
$rowData = [];
|
||||
$rowData = array();
|
||||
foreach ($fields as $field) {
|
||||
$rowData[] = $row[$field] ?? '';
|
||||
if (isset($row[$field])) {
|
||||
$rowData[] = function_exists('csv_safe_cell') ? csv_safe_cell($row[$field]) : $row[$field];
|
||||
} else {
|
||||
$rowData[] = '';
|
||||
}
|
||||
}
|
||||
$excelData[] = $rowData;
|
||||
}
|
||||
@@ -255,9 +249,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 라이브러리를 찾을 수 없습니다.');
|
||||
@@ -268,10 +262,10 @@ function member_export_create_excel($data, $fileName, $index = 0, $type = 1)
|
||||
$currentCache = PHPExcel_Settings::getCacheStorageMethod();
|
||||
|
||||
// 캐싱 모드 설정 (엑셀 생성 전용)
|
||||
$cacheMethods = [
|
||||
$cacheMethods = array(
|
||||
PHPExcel_CachedObjectStorageFactory::cache_to_discISAM,
|
||||
PHPExcel_CachedObjectStorageFactory::cache_in_memory_serialized
|
||||
];
|
||||
);
|
||||
|
||||
foreach ($cacheMethods as $method) {
|
||||
if (PHPExcel_Settings::setCacheStorageMethod($method)) {
|
||||
@@ -285,12 +279,12 @@ function member_export_create_excel($data, $fileName, $index = 0, $type = 1)
|
||||
|
||||
// 헤더 스타일 적용
|
||||
$last_char = member_export_column_char(count($config['headers']) - 1);
|
||||
$sheet->getStyle("A2:{$last_char}2")->applyFromArray([
|
||||
'fill' => [
|
||||
$sheet->getStyle("A2:{$last_char}2")->applyFromArray(array(
|
||||
'fill' => array(
|
||||
'type' => PHPExcel_Style_Fill::FILL_SOLID,
|
||||
'startcolor' => ['rgb' => 'D9E1F2'], // 연파랑 배경
|
||||
],
|
||||
]);
|
||||
'startcolor' => array('rgb' => 'D9E1F2'), // 연파랑 배경
|
||||
),
|
||||
));
|
||||
|
||||
// 셀 정렬 및 줄바꿈 설정
|
||||
$sheet->getStyle("A:{$last_char}")->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER)->setWrapText(true);
|
||||
@@ -320,14 +314,15 @@ function member_export_create_excel($data, $fileName, $index = 0, $type = 1)
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
throw new Exception("엑셀 파일 생성에 실패하였습니다: " . $e->getMessage());
|
||||
}
|
||||
finally
|
||||
{
|
||||
// 캐싱 모드 원래 상태로 복원
|
||||
if ($currentCache) {
|
||||
PHPExcel_Settings::setCacheStorageMethod($currentCache);
|
||||
}
|
||||
throw new Exception("엑셀 파일 생성에 실패하였습니다: " . $e->getMessage());
|
||||
}
|
||||
|
||||
// 캐싱 모드 원래 상태로 복원
|
||||
if ($currentCache) {
|
||||
PHPExcel_Settings::setCacheStorageMethod($currentCache);
|
||||
}
|
||||
|
||||
return $filename;
|
||||
@@ -340,7 +335,7 @@ function member_export_create_zip($files, $zipFileName)
|
||||
{
|
||||
if (!class_exists('ZipArchive')) {
|
||||
error_log('[Member Export Error] ZipArchive 클래스를 사용할 수 없습니다.');
|
||||
return ['error' => '파일을 압축하는 중 문제가 발생했습니다. 개별 파일로 제공됩니다.<br>: ZipArchive 클래스를 사용할 수 없습니다.'];
|
||||
return array('error' => '파일을 압축하는 중 문제가 발생했습니다. 개별 파일로 제공됩니다.<br>: ZipArchive 클래스를 사용할 수 없습니다.');
|
||||
}
|
||||
|
||||
member_export_ensure_directory(MEMBER_EXPORT_DIR);
|
||||
@@ -348,7 +343,7 @@ function member_export_create_zip($files, $zipFileName)
|
||||
|
||||
$zip = new ZipArchive();
|
||||
if ($zip->open($destinationZipPath, ZipArchive::CREATE | ZipArchive::OVERWRITE) !== TRUE) {
|
||||
return ['error' => "파일을 압축하는 중 문제가 발생했습니다. 개별 파일로 제공됩니다."];
|
||||
return array('error' => "파일을 압축하는 중 문제가 발생했습니다. 개별 파일로 제공됩니다.");
|
||||
}
|
||||
|
||||
foreach ($files as $file) {
|
||||
@@ -360,11 +355,11 @@ function member_export_create_zip($files, $zipFileName)
|
||||
|
||||
$result = $zip->close();
|
||||
|
||||
return [
|
||||
return array(
|
||||
'result' => $result,
|
||||
'zipFile' => $zipFileName . ".zip",
|
||||
'zipPath' => $destinationZipPath,
|
||||
];
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -389,7 +384,7 @@ function member_export_ensure_directory($dir)
|
||||
* - 알집 생성 완료 시 엑셀 파일 제거
|
||||
* - 작업 전 오늘 날짜 폴더 및 log 폴더를 제외한 나머지 파일 모두 제거
|
||||
*/
|
||||
function member_export_delete($fileList = [])
|
||||
function member_export_delete($fileList = array())
|
||||
{
|
||||
$cnt = 0;
|
||||
|
||||
@@ -408,7 +403,7 @@ function member_export_delete($fileList = [])
|
||||
|
||||
function deleteFolder($dir) {
|
||||
foreach (glob($dir . '/{.,}*', GLOB_BRACE) as $item) {
|
||||
if (in_array(basename($item), ['.', '..'])) continue;
|
||||
if (in_array(basename($item), array('.', '..'))) continue;
|
||||
is_dir($item) ? deleteFolder($item) : unlink($item);
|
||||
}
|
||||
rmdir($dir);
|
||||
@@ -435,13 +430,13 @@ function member_export_delete($fileList = [])
|
||||
/**
|
||||
* 로그 작성
|
||||
*/
|
||||
function member_export_write_log($params, $result = [])
|
||||
function member_export_write_log($params, $result = array())
|
||||
{
|
||||
global $member;
|
||||
|
||||
$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)) {
|
||||
@@ -449,12 +444,15 @@ function member_export_write_log($params, $result = [])
|
||||
@chmod(MEMBER_LOG_DIR, G5_DIR_PERMISSION);
|
||||
}
|
||||
|
||||
$logFiles = glob(MEMBER_LOG_DIR . "/export_log_*.log") ?: [];
|
||||
$logFiles = glob(MEMBER_LOG_DIR . "/export_log_*.log");
|
||||
if (!$logFiles) {
|
||||
$logFiles = array();
|
||||
}
|
||||
|
||||
// 최신 파일 기준 정렬 (최신 → 오래된)
|
||||
usort($logFiles, fn($a, $b) => filemtime($b) - filemtime($a));
|
||||
usort($logFiles, 'member_export_compare_log_mtime');
|
||||
|
||||
$latestLogFile = $logFiles[0] ?? null;
|
||||
$latestLogFile = isset($logFiles[0]) ? $logFiles[0] : null;
|
||||
|
||||
// 용량 기준으로 새 파일 생성
|
||||
if (!$latestLogFile || filesize($latestLogFile) >= $maxSize) {
|
||||
@@ -471,18 +469,17 @@ function member_export_write_log($params, $result = [])
|
||||
}
|
||||
}
|
||||
|
||||
$formatType = (isset($params['formatType']) && $params['formatType'] == 2) ? '팝빌' : '일반';
|
||||
$success = isset($result['success']) && $result['success'] === true;
|
||||
$status = $success ? '성공' : '실패';
|
||||
|
||||
// 조건 정리
|
||||
$condition = [];
|
||||
$condition = array();
|
||||
|
||||
// 검색 조건
|
||||
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 +496,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,18 +508,18 @@ 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'])) {
|
||||
$condition[] = "수신동의일: {$params['agree_date_start']}~{$params['agree_date_end']}";
|
||||
}
|
||||
|
||||
if (in_array($params['ad_range_type'], ["month_confirm", "custom_period"])){
|
||||
$channels = array_filter([
|
||||
if (in_array($params['ad_range_type'], array("month_confirm", "custom_period"))){
|
||||
$channels = array_filter(array(
|
||||
!empty($params['ad_mailling']) && (int)$params['ad_mailling'] === 1 ? '이메일' : null,
|
||||
!empty($params['ad_sms']) && (int)$params['ad_sms'] === 1 ? 'SMS/카카오톡' : null,
|
||||
]);
|
||||
));
|
||||
|
||||
if ($channels) {
|
||||
$condition[] = '수신채널: ' . implode(', ', $channels);
|
||||
@@ -533,17 +530,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'] : array());
|
||||
$line1 .= " | 총 {$total}건 | 파일: {$fileCount}개";
|
||||
}
|
||||
|
||||
@@ -560,4 +557,9 @@ function member_export_write_log($params, $result = [])
|
||||
if (@file_put_contents($latestLogFile, $logEntry, FILE_APPEND | LOCK_EX) === false) {
|
||||
error_log("[Member Export Error] 로그 파일 기록 실패: {$latestLogFile}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function member_export_compare_log_mtime($a, $b)
|
||||
{
|
||||
return filemtime($b) - filemtime($a);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ if ($_POST['act_button'] == "선택수정") {
|
||||
$post_mb_sms = isset($_POST['mb_sms'][$k]) ? (int) $_POST['mb_sms'][$k] : 0;
|
||||
$post_mb_open = isset($_POST['mb_open'][$k]) ? (int) $_POST['mb_open'][$k] : 0;
|
||||
|
||||
$agree_items = [];
|
||||
$agree_items = array();
|
||||
// 광고성 이메일 수신동의 일자 추가
|
||||
$post_mb_mailling_default = isset($_POST['mb_mailling_default'][$k]) ? (int) $_POST['mb_mailling_default'][$k] : 0;
|
||||
$sql_mailling_date = "";
|
||||
@@ -57,6 +57,8 @@ if ($_POST['act_button'] == "선택수정") {
|
||||
$msg .= $mb['mb_id'] . ' : 회원자료가 존재하지 않습니다.\\n';
|
||||
} elseif ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level']) {
|
||||
$msg .= $mb['mb_id'] . ' : 자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.\\n';
|
||||
} elseif ($is_admin != 'super' && $post_mb_level >= (int) $member['mb_level']) {
|
||||
$msg .= $mb['mb_id'] . ' : 자신보다 권한이 높거나 같은 등급은 부여할 수 없습니다.\\n';
|
||||
} elseif ($member['mb_id'] == $mb['mb_id']) {
|
||||
$msg .= $mb['mb_id'] . ' : 로그인 중인 관리자는 수정 할 수 없습니다.\\n';
|
||||
} else {
|
||||
|
||||
+4
-1
@@ -25,6 +25,9 @@ if (!$sst) {
|
||||
$sst = "po_id";
|
||||
$sod = "desc";
|
||||
}
|
||||
$allowed_sst = array('po_id', 'mb_id', 'po_content', 'po_point', 'po_datetime');
|
||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'po_id';
|
||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
@@ -66,7 +69,7 @@ if ($config['cf_point_term'] > 0) {
|
||||
$po_expire_term = $config['cf_point_term'];
|
||||
}
|
||||
|
||||
if (strstr($sfl, "mb_id")) {
|
||||
if (strpos($sfl, "mb_id") !== false) {
|
||||
$mb_id = $stx;
|
||||
} else {
|
||||
$mb_id = "";
|
||||
|
||||
@@ -21,6 +21,9 @@ if (!$sst) {
|
||||
$sst = "po_id";
|
||||
$sod = "desc";
|
||||
}
|
||||
$allowed_sst = array('po_id', 'po_subject', 'po_level', 'po_use', 'po_etc');
|
||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'po_id';
|
||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
|
||||
@@ -6,6 +6,8 @@ auth_check_menu($auth, $sub_menu, 'r');
|
||||
|
||||
// 체크된 자료 삭제
|
||||
if (isset($_POST['chk']) && is_array($_POST['chk'])) {
|
||||
check_admin_token();
|
||||
|
||||
for ($i = 0; $i < count($_POST['chk']); $i++) {
|
||||
$pp_id = (int) $_POST['chk'][$i];
|
||||
|
||||
@@ -36,6 +38,9 @@ if (!$sst) {
|
||||
$sst = "pp_id";
|
||||
$sod = "desc";
|
||||
}
|
||||
$allowed_sst = array('pp_id', 'pp_word', 'pp_date', 'pp_ip');
|
||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'pp_id';
|
||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
|
||||
@@ -21,6 +21,12 @@ foreach ($check_keys as $key) {
|
||||
$qa_include_head = isset($qa_include_head) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($qa_include_head, 0, 255)) : '';
|
||||
$qa_include_tail = isset($qa_include_tail) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($qa_include_tail, 0, 255)) : '';
|
||||
|
||||
// 최고 관리자가 아니면 include 경로 변경 불가 (board_form_update.php 와 동일 정책)
|
||||
if ($is_admin !== 'super') {
|
||||
$qa_include_head = isset($qaconfig['qa_include_head']) ? $qaconfig['qa_include_head'] : '';
|
||||
$qa_include_tail = isset($qaconfig['qa_include_tail']) ? $qaconfig['qa_include_tail'] : '';
|
||||
}
|
||||
|
||||
// 관리자가 자동등록방지를 사용해야 할 경우
|
||||
if ($board && ($qaconfig['qa_include_head'] !== $qa_include_head || $qaconfig['qa_include_tail'] !== $qa_include_tail) && function_exists('get_admin_captcha_by') && get_admin_captcha_by()) {
|
||||
include_once G5_CAPTCHA_PATH . '/captcha.lib.php';
|
||||
|
||||
@@ -9,10 +9,14 @@ if (!$config['cf_email_use'])
|
||||
|
||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||
|
||||
$token = get_token();
|
||||
|
||||
$g5['title'] = '메일 테스트';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
if (isset($_POST['email'])) {
|
||||
check_admin_token();
|
||||
|
||||
$_POST['email'] = strip_tags($_POST['email']);
|
||||
$email = explode(',', $_POST['email']);
|
||||
|
||||
@@ -61,6 +65,7 @@ if (isset($_POST['email'])) {
|
||||
</p>
|
||||
</div>
|
||||
<form name="fsendmailtest" method="post">
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
<fieldset id="fsendmailtest">
|
||||
<legend>테스트메일 발송</legend>
|
||||
<label for="email">받는 메일주소<strong class="sound_only"> 필수</strong></label>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -31,7 +31,7 @@ include_once("./admin.head.php");
|
||||
echo $list_tag_st;
|
||||
while($file=readdir($dir)) {
|
||||
|
||||
if (!strstr($file,'sess_')) continue;
|
||||
if (strpos($file,'sess_') === false) continue;
|
||||
if (strpos($file,'sess_')!=0) continue;
|
||||
|
||||
$session_file = G5_DATA_PATH.'/session/'.$file;
|
||||
|
||||
@@ -125,12 +125,15 @@ function pg_setting_check($is_print=false){
|
||||
|
||||
$msg = '';
|
||||
$pg_msg = '';
|
||||
$pg_test_conf_link = G5_ADMIN_URL.'/shop_admin/configform.php#de_card_test1';
|
||||
|
||||
if( $default['de_card_test'] ){
|
||||
if( $default['de_pg_service'] === 'kcp' && $default['de_kcp_mid'] && $default['de_kcp_site_key'] ){
|
||||
$pg_msg = 'NHN KCP';
|
||||
} else if ( $default['de_pg_service'] === 'lg' && $config['cf_lg_mid'] && $config['cf_lg_mert_key'] ){
|
||||
$pg_msg = 'LG유플러스';
|
||||
} else if ( $default['de_pg_service'] === 'toss' && $config['cf_lg_mid'] && $config['cf_toss_client_key'] && $config['cf_toss_secret_key'] ){
|
||||
$msg .= '<div class="admin_pg_notice od_test_caution">(주의!) 토스페이먼츠 결제의 결제 설정이 현재 테스트결제로 되어 있습니다.<br>반드시 <a href="#lg_info_anchor">상점 API키</a>를 <u>[테스트]키</u>로 설정한 후 테스트결제를 진행해야합니다.<br>쇼핑몰 운영 시에는 실결제로 전환하여 <u>[라이브]키</u>로 설정해 주시기 바랍니다.<br>아래 링크를 클릭하여 실결제로 설정하여 운영해 주세요.<br><a href="'.$pg_test_conf_link.'" class="pg_test_conf_link">'.$pg_test_conf_link.'</a></div>';
|
||||
} else if ( $default['de_pg_service'] === 'inicis' && $default['de_inicis_mid'] && $default['de_inicis_sign_key'] ){
|
||||
$pg_msg = 'KG이니시스';
|
||||
} else if ( $default['de_pg_service'] === 'nicepay' && $default['de_nicepay_mid'] && $default['de_nicepay_key'] ){
|
||||
@@ -147,7 +150,6 @@ function pg_setting_check($is_print=false){
|
||||
}
|
||||
|
||||
if( $pg_msg ){
|
||||
$pg_test_conf_link = G5_ADMIN_URL.'/shop_admin/configform.php#de_card_test1';
|
||||
$msg .= '<div class="admin_pg_notice od_test_caution">(주의!) '.$pg_msg.' 결제의 결제 설정이 현재 테스트결제 로 되어 있습니다.<br>테스트결제시 실제 결제가 되지 않으므로, 쇼핑몰 운영중이면 반드시 실결제로 설정하여 운영하셔야 합니다.<br>아래 링크를 클릭하여 실결제로 설정하여 운영해 주세요.<br><a href="'.$pg_test_conf_link.'" class="pg_test_conf_link">'.$pg_test_conf_link.'</a></div>';
|
||||
}
|
||||
|
||||
@@ -170,6 +172,10 @@ function is_cancel_shop_pg_order($od){
|
||||
$is_od_pg_cancel = true;
|
||||
}
|
||||
|
||||
if($od['od_pg'] === 'toss' && in_array($od['od_settle_case'], array('계좌이체', '휴대폰'))) {
|
||||
$is_od_pg_cancel = true;
|
||||
}
|
||||
|
||||
return $is_od_pg_cancel;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,6 +42,9 @@ if (!$sst)
|
||||
$sst = "ca_id";
|
||||
$sod = "asc";
|
||||
}
|
||||
$allowed_sst = array('ca_id', 'ca_name', 'ca_mb_id', 'ca_use');
|
||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'ca_id';
|
||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
||||
$sql_order = "order by $sst $sod";
|
||||
|
||||
// 출력할 레코드를 얻음
|
||||
|
||||
@@ -51,7 +51,7 @@ for ($i=0; $i<$post_ca_id_count; $i++)
|
||||
alert('스킨파일명에 포함될수 없는 문자가 들어있습니다.');
|
||||
}
|
||||
|
||||
if( ! is_include_path_check($file) ){
|
||||
if( ! is_include_path_check($file, 1) ){
|
||||
alert('오류 : 데이터폴더가 포함된 path 또는 잘못된 path 를 포함할수 없습니다.');
|
||||
}
|
||||
|
||||
|
||||
@@ -215,6 +215,14 @@ if (! isset($default['de_nicepay_mid'])) {
|
||||
sql_query($sql, false);
|
||||
}
|
||||
|
||||
// 토스페이먼츠 client, secret key 추가
|
||||
if( ! isset($config['cf_toss_client_key']) ){
|
||||
$sql = "ALTER TABLE `{$g5['config_table']}`
|
||||
ADD COLUMN `cf_toss_client_key` VARCHAR(100) NOT NULL DEFAULT '' AFTER `cf_lg_mert_key`,
|
||||
ADD COLUMN `cf_toss_secret_key` VARCHAR(100) NOT NULL DEFAULT '' AFTER `cf_toss_client_key`; ";
|
||||
sql_query($sql, false);
|
||||
}
|
||||
|
||||
if( function_exists('pg_setting_check') ){
|
||||
pg_setting_check(true);
|
||||
}
|
||||
@@ -632,21 +640,27 @@ if(!$default['de_kakaopay_cancelpwd']){
|
||||
<tr id="kcp_vbank_url" class="pg_vbank_url">
|
||||
<th scope="row">NHN KCP 가상계좌<br>입금통보 URL</th>
|
||||
<td>
|
||||
<?php echo help("NHN KCP 가상계좌 사용시 다음 주소를 <strong><a href=\"http://admin.kcp.co.kr\" target=\"_blank\">NHN KCP 관리자</a> > 상점정보관리 > 정보변경 > 공통URL 정보 > 공통URL 변경후</strong>에 넣으셔야 상점에 자동으로 입금 통보됩니다."); ?>
|
||||
<?php echo help("NHN KCP 가상계좌 사용시 다음 주소를 <strong><a href=\"https://partner.kcp.co.kr\" target=\"_blank\">NHN KCP 관리자</a> > 상점정보관리 > 정보변경 > 공통URL 정보 > 공통URL 변경후</strong>에 넣으셔야 상점에 자동으로 입금 통보됩니다."); ?>
|
||||
<?php echo G5_SHOP_URL; ?>/settle_kcp_common.php</td>
|
||||
</tr>
|
||||
<tr id="inicis_vbank_url" class="pg_vbank_url">
|
||||
<th scope="row">KG이니시스 가상계좌 입금통보 URL</th>
|
||||
<th scope="row">KG이니시스 가상계좌<br>입금통보 URL</th>
|
||||
<td>
|
||||
<?php echo help("KG이니시스 가상계좌 사용시 다음 주소를 <strong><a href=\"https://iniweb.inicis.com/\" target=\"_blank\">KG이니시스 관리자</a> > 거래내역 > 가상계좌 > 입금통보방식선택 > URL 수신 설정</strong>에 넣으셔야 상점에 자동으로 입금 통보됩니다."); ?>
|
||||
<?php echo G5_SHOP_URL; ?>/settle_inicis_common.php</td>
|
||||
</tr>
|
||||
<tr id="nicepay_vbank_url" class="pg_vbank_url">
|
||||
<th scope="row">NICEPAY 가상계좌 입금통보 URL</th>
|
||||
<th scope="row">NICEPAY 가상계좌<br>입금통보 URL</th>
|
||||
<td>
|
||||
<?php echo help("NICEPAY 가상계좌 사용시 다음 주소를 <strong><a href=\"https://npg.nicepay.co.kr/\" target=\"_blank\">NICEPAY 관리자</a> > 가맹점관리자페이지 설정 (메인화면 → 가맹점정보 클릭)</strong>에 넣으셔야 상점에 자동으로 입금 통보됩니다."); ?>
|
||||
<?php echo G5_SHOP_URL; ?>/settle_nicepay_common.php</td>
|
||||
</tr>
|
||||
<tr id="toss_vbank_url" class="pg_vbank_url">
|
||||
<th scope="row">토스페이먼츠 가상계좌<br>입금통보 URL</th>
|
||||
<td>
|
||||
<?php echo help("토스페이먼츠 가상계좌 사용시 다음 주소를 <strong><a href=\"https://app.tosspayments.com/\" target=\"_blank\">토스페이먼츠 상점관리자</a> > 개발자센터 > 웹훅 > 웹훅 등록하기에 URL</strong>에 넣으시고, <strong>구독할 이벤트를 [DEPOSIT_CALLBACK]</strong>을 선택하셔야 상점에 자동으로 입금 통보됩니다."); ?>
|
||||
<?php echo G5_SHOP_URL; ?>/settle_toss_common.php</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="de_hp_use">휴대폰결제사용</label></th>
|
||||
<td>
|
||||
@@ -680,13 +694,14 @@ if(!$default['de_kakaopay_cancelpwd']){
|
||||
<tr>
|
||||
<th scope="row"><label for="de_easy_pay_use">PG사 간편결제 버튼 사용</label></th>
|
||||
<td>
|
||||
<?php echo help("주문서 작성 페이지에 PG사 간편결제(PAYCO, PAYNOW, KPAY) 버튼의 별도 사용 여부를 설정합니다.", 50); ?>
|
||||
<?php echo help("주문서 작성 페이지에 PG사 간편결제(PAYCO, 토스, KPAY...) 버튼의 별도 사용 여부를 설정합니다.", 50); ?>
|
||||
<select id="de_easy_pay_use" name="de_easy_pay_use">
|
||||
<option value="0" <?php echo get_selected($default['de_easy_pay_use'], 0); ?>>노출안함</option>
|
||||
<option value="1" <?php echo get_selected($default['de_easy_pay_use'], 1); ?>>노출함</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="de_taxsave_use">현금영수증<br>발급사용</label></th>
|
||||
<td>
|
||||
@@ -700,13 +715,13 @@ if(!$default['de_kakaopay_cancelpwd']){
|
||||
<?php
|
||||
$account_checked = $vbank_checked = $transfer_checked = '';
|
||||
|
||||
if (strstr($default['de_taxsave_types'], 'account')) {
|
||||
if (strpos($default['de_taxsave_types'], 'account') !== false) {
|
||||
$account_checked = 'checked="checked"';
|
||||
}
|
||||
if (strstr($default['de_taxsave_types'], 'vbank')) {
|
||||
if (strpos($default['de_taxsave_types'], 'vbank') !== false) {
|
||||
$vbank_checked = 'checked="checked"';
|
||||
}
|
||||
if (strstr($default['de_taxsave_types'], 'transfer')) {
|
||||
if (strpos($default['de_taxsave_types'], 'transfer') !== false) {
|
||||
$transfer_checked = 'checked="checked"';
|
||||
}
|
||||
?>
|
||||
@@ -775,7 +790,8 @@ if(!$default['de_kakaopay_cancelpwd']){
|
||||
<?php echo help('쇼핑몰에서 사용할 결제대행사를 선택합니다.'); ?>
|
||||
<ul class="de_pg_tab">
|
||||
<li class="<?php if($default['de_pg_service'] == 'kcp') echo 'tab-current'; ?>"><a href="#kcp_info_anchor" data-value="kcp" title="NHN KCP 선택하기" >NHN KCP</a></li>
|
||||
<li class="<?php if($default['de_pg_service'] == 'lg') echo 'tab-current'; ?>"><a href="#lg_info_anchor" data-value="lg" title="토스페이먼츠 선택하기">토스페이먼츠</a></li>
|
||||
<li class="<?php if($default['de_pg_service'] == 'lg') echo 'tab-current'; ?>"><a href="#lg_info_anchor" data-value="lg" title="토스페이먼츠(구버전) 선택하기">토스페이먼츠(구버전)</a></li>
|
||||
<li class="<?php if($default['de_pg_service'] == 'toss') echo 'tab-current'; ?>"><a href="#lg_info_anchor" data-value="toss" title="토스페이먼츠 선택하기">토스페이먼츠</a></li>
|
||||
<li class="<?php if($default['de_pg_service'] == 'inicis') echo 'tab-current'; ?>"><a href="#inicis_info_anchor" data-value="inicis" title="KG이니시스 선택하기">KG이니시스</a></li>
|
||||
<li class="<?php if($default['de_pg_service'] == 'nicepay') echo 'tab-current'; ?>"><a href="#nicepay_info_anchor" data-value="nicepay" title="NICEPAY 선택하기">NICEPAY</a></li>
|
||||
</ul>
|
||||
@@ -833,12 +849,26 @@ if(!$default['de_kakaopay_cancelpwd']){
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="pg_info_fld lg_info_fld">
|
||||
<th scope="row"><label for="cf_lg_mert_key">토스페이먼츠 MERT KEY</label></th>
|
||||
<th scope="row"><label for="cf_lg_mert_key">토스페이먼츠(구버전) MERT KEY</label></th>
|
||||
<td>
|
||||
<?php echo help("토스페이먼츠 상점MertKey는 상점관리자 -> 개발자센터 -> API키 -> 머트 키에서 확인하실 수 있습니다.\n예) 95160cce09854ef44d2edb2bfb05f9f3"); ?>
|
||||
<?php echo help("토스페이먼츠(구버전) 상점 MertKey는 상점관리자 -> 개발자센터 -> API키 -> 머트 키에서 확인하실 수 있습니다.\n예) 95160cce09854ef44d2edb2bfb05f9f3"); ?>
|
||||
<input type="text" name="cf_lg_mert_key" value="<?php echo get_sanitize_input($config['cf_lg_mert_key']); ?>" id="cf_lg_mert_key" class="frm_input " size="36" maxlength="50">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="pg_info_fld lg_info_fld_v2">
|
||||
<th scope="row"><label for="cf_toss_client_key">토스페이먼츠 API Client Key</label></th>
|
||||
<td>
|
||||
<?php echo help("토스페이먼츠 API 클라이언트 키는 상점관리자 -> 개발자센터 -> API키 -> 클라이언트 키에서 확인하실 수 있습니다. 예) live_ck_tosspayment\n실결제용 [라이브] 키와 테스트용 [테스트] 키는 서로 다르므로, <b>테스트로 결제시에는 [테스트] 키</b>로 변경하여 사용해주시기 바랍니다. 예) 테스트 키: test_ck_tosspayment"); ?>
|
||||
<input type="text" name="cf_toss_client_key" value="<?php echo get_sanitize_input($config['cf_toss_client_key']); ?>" id="cf_toss_client_key" class="frm_input " size="40" maxlength="50">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="pg_info_fld lg_info_fld_v2">
|
||||
<th scope="row"><label for="cf_toss_secret_key">토스페이먼츠 API Secret Key</label></th>
|
||||
<td>
|
||||
<?php echo help("토스페이먼츠 API 시크릿 키는 상점관리자 -> 개발자센터 -> API키 -> 시크릿 키에서 확인하실 수 있습니다. 예) live_sk_tosspayment\n실결제용 [라이브] 키와 테스트용 [테스트] 키는 서로 다르므로, <b>테스트로 결제시에는 [테스트] 키</b>로 변경하여 사용해주시기 바랍니다. 예) 테스트 키: test_sk_tosspayment"); ?>
|
||||
<input type="text" name="cf_toss_secret_key" value="<?php echo get_sanitize_input($config['cf_toss_secret_key']); ?>" id="cf_toss_secret_key" class="frm_input " size="40" maxlength="50">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="pg_info_fld inicis_info_fld" id="inicis_info_anchor">
|
||||
<th scope="row">
|
||||
<label for="de_inicis_mid">KG이니시스 상점아이디</label><br>
|
||||
@@ -1067,8 +1097,10 @@ if(!$default['de_kakaopay_cancelpwd']){
|
||||
<a href="http://testadmin8.kcp.co.kr/" target="_blank" class="btn_frmline">테스트 관리자</a>
|
||||
</div>
|
||||
<div class="scf_cardtest lg_cardtest">
|
||||
<a href="https://app.tosspayments.com/" target="_blank" class="btn_frmline">실결제 관리자</a>
|
||||
<a href="https://pgweb.tosspayments.com/tmert" target="_blank" class="btn_frmline">테스트 관리자</a>
|
||||
<a href="https://app.tosspayments.com/" target="_blank" class="btn_frmline">상점 관리자</a>
|
||||
</div>
|
||||
<div class="scf_cardtest toss_cardtest">
|
||||
<a href="https://app.tosspayments.com/" target="_blank" class="btn_frmline">상점 관리자</a>
|
||||
</div>
|
||||
<div class="scf_cardtest inicis_cardtest">
|
||||
<a href="https://iniweb.inicis.com/" target="_blank" class="btn_frmline">상점 관리자</a>
|
||||
@@ -1089,11 +1121,14 @@ if(!$default['de_kakaopay_cancelpwd']){
|
||||
<dt>휴대폰</dt><dd>테스트 지원되지 않음.</dd>
|
||||
</dl>
|
||||
<ul id="kcp_cardtest_tip" class="scf_cardtest_tip_adm scf_cardtest_tip_adm_hide">
|
||||
<li>테스트결제의 <a href="http://testadmin8.kcp.co.kr/assist/login.LoginAction.do" target="_blank">상점관리자</a> 로그인 정보는 NHN KCP로 문의하시기 바랍니다. (기술지원 1544-8661)</li>
|
||||
<li>테스트결제의 <a href="https://testpartner.kcp.co.kr/" target="_blank">상점관리자</a> 로그인 정보는 NHN KCP로 문의하시기 바랍니다. (기술지원 1544-8661)</li>
|
||||
<li><b>일반결제</b>의 테스트 사이트코드는 <b>T0000</b> 이며, <b>에스크로 결제</b>의 테스트 사이트코드는 <b>T0007</b> 입니다.</li>
|
||||
</ul>
|
||||
<ul id="lg_cardtest_tip" class="scf_cardtest_tip_adm scf_cardtest_tip_adm_hide">
|
||||
<li>테스트결제의 <a href="https://pgweb.tosspayments.com/tmert" target="_blank">상점관리자</a> 로그인 정보는 토스페이먼츠 상점아이디 첫 글자에 t를 추가해서 로그인하시기 바랍니다. 예) tsi_lguplus</li>
|
||||
<li>테스트 결제건에 대한 <a href="https://app.tosspayments.com/" target="_blank">상점관리자</a> 접근은, 상점관리자 상단 '테스트 모드'를 활성화 하여서 접근할 수 있습니다.</li>
|
||||
</ul>
|
||||
<ul id="toss_cardtest_tip" class="scf_cardtest_tip_adm scf_cardtest_tip_adm_hide">
|
||||
<li>테스트 결제건에 대한 <a href="https://app.tosspayments.com/" target="_blank">상점관리자</a> 접근은, 상점관리자 상단 '테스트 모드'를 활성화 하여서 접근할 수 있습니다.</li>
|
||||
</ul>
|
||||
<ul id="inicis_cardtest_tip" class="scf_cardtest_tip_adm scf_cardtest_tip_adm_hide">
|
||||
<li><b>일반결제</b>의 테스트 사이트 mid는 <b>INIpayTest</b> 이며, <b>에스크로 결제</b>의 테스트 사이트 mid는 <b>iniescrow0</b> 입니다.</li>
|
||||
@@ -1769,7 +1804,11 @@ function fconfig_check(f)
|
||||
}
|
||||
} else if ( f.de_pg_service.value == "lg" ) {
|
||||
if( f.cf_lg_mid.value && f.cf_lg_mert_key.value && parseInt(f.de_card_test.value) > 0 ){
|
||||
pg_msg = "토스페이먼츠";
|
||||
pg_msg = "토스페이먼츠(구버전)";
|
||||
}
|
||||
} else if ( f.de_pg_service.value == "toss" ) {
|
||||
if( f.cf_lg_mid.value && f.cf_toss_client_key.value && f.cf_toss_secret_key.value && parseInt(f.de_card_test.value) > 0 ){
|
||||
msg += "(주의!) 토스페이먼츠 결제의 결제 설정이 현재 테스트결제로 되어 있습니다.\n상점 API키를 [테스트]키로 설정한 후 테스트결제를 진행해주세요.\n쇼핑몰 운영중이면 반드시 실결제 전환 및 [라이브]키로 설정하여 운영하셔야 합니다.\n실결제로 변경하려면 결제설정 탭 -> 결제 테스트에서 실결제를 선택해 주세요.\n정말로 테스트결제로 설정하시겠습니까?";
|
||||
}
|
||||
} else if ( f.de_pg_service.value == "inicis" ) {
|
||||
if( f.de_inicis_mid.value && f.de_inicis_sign_key.value && parseInt(f.de_card_test.value) > 0 ){
|
||||
@@ -2102,4 +2141,5 @@ if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use']
|
||||
}
|
||||
}
|
||||
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
|
||||
@@ -64,6 +64,8 @@ foreach($check_skin_keys as $key){
|
||||
if( isset($_POST[$key]) && preg_match('#\.+(\/|\\\)#', $_POST[$key]) ){
|
||||
alert('스킨설정에 유효하지 문자가 포함되어 있습니다.');
|
||||
}
|
||||
|
||||
$$key = $_POST[$key] = sql_real_escape_string($_POST[$key]);
|
||||
}
|
||||
|
||||
// 현금영수증 발급수단
|
||||
@@ -159,6 +161,8 @@ $check_sanitize_keys = array(
|
||||
'de_kcp_site_key', //NHN KCP SITE KEY
|
||||
'cf_lg_mid', //LG유플러스 상점아이디
|
||||
'cf_lg_mert_key', //LG유플러스 MERT KEY
|
||||
'cf_toss_client_key', //토스페이먼츠 MERT KEY
|
||||
'cf_toss_secret_key', //토스페이먼츠 MERT KEY
|
||||
'de_inicis_mid', //KG이니시스 상점아이디
|
||||
'de_inicis_iniapi_key', //KG이니시스 INIAPI KEY
|
||||
'de_inicis_iniapi_iv', //KG이니시스 INIAPI IV
|
||||
@@ -465,7 +469,9 @@ $sql = " update {$g5['config_table']}
|
||||
cf_icode_server_port = '{$_POST['cf_icode_server_port']}',
|
||||
cf_icode_token_key = '{$cf_icode_token_key}',
|
||||
cf_lg_mid = '{$cf_lg_mid}',
|
||||
cf_lg_mert_key = '{$cf_lg_mert_key}' ";
|
||||
cf_lg_mert_key = '{$cf_lg_mert_key}',
|
||||
cf_toss_client_key = '{$cf_toss_client_key}',
|
||||
cf_toss_secret_key = '{$cf_toss_secret_key}' ";
|
||||
sql_query($sql);
|
||||
|
||||
run_event('shop_admin_configformupdate');
|
||||
|
||||
@@ -6,6 +6,8 @@ auth_check_menu($auth, $sub_menu, "r");
|
||||
|
||||
$sql_common = " from {$g5['g5_shop_coupon_table']} ";
|
||||
|
||||
if ($sfl && !in_array($sfl, array('mb_id', 'cp_subject', 'cp_id'))) $sfl = '';
|
||||
|
||||
$sql_search = " where (1) ";
|
||||
if ($stx) {
|
||||
$sql_search .= " and ( ";
|
||||
@@ -24,6 +26,9 @@ if (!$sst) {
|
||||
$sst = "cp_no";
|
||||
$sod = "desc";
|
||||
}
|
||||
$allowed_sst = array('cp_no', 'cp_id', 'cp_subject', 'mb_id', 'cp_end', 'cp_start', 'cp_method');
|
||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'cp_no';
|
||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
|
||||
@@ -212,28 +212,28 @@ if($data['od_settle_case'] == 'KAKAOPAY')
|
||||
$od_pg = 'KAKAOPAY';
|
||||
|
||||
$od_email = get_email_address($data['od_email']);
|
||||
$od_name = clean_xss_tags($data['od_name']);
|
||||
$od_tel = clean_xss_tags($data['od_tel']);
|
||||
$od_hp = clean_xss_tags($data['od_hp']);
|
||||
$od_name = addslashes(clean_xss_tags($data['od_name']));
|
||||
$od_tel = addslashes(clean_xss_tags($data['od_tel']));
|
||||
$od_hp = addslashes(clean_xss_tags($data['od_hp']));
|
||||
$od_zip = preg_replace('/[^0-9]/', '', $data['od_zip']);
|
||||
$od_zip1 = substr($od_zip, 0, 3);
|
||||
$od_zip2 = substr($od_zip, 3);
|
||||
$od_addr1 = clean_xss_tags($data['od_addr1']);
|
||||
$od_addr2 = clean_xss_tags($data['od_addr2']);
|
||||
$od_addr3 = clean_xss_tags($data['od_addr3']);
|
||||
$od_addr_jibeon = preg_match("/^(N|R)$/", $data['od_addr_jibeon']) ? $data['od_addr_jibeon'] : '';
|
||||
$od_b_name = clean_xss_tags($data['od_b_name']);
|
||||
$od_b_tel = clean_xss_tags($data['od_b_tel']);
|
||||
$od_b_hp = clean_xss_tags($data['od_b_hp']);
|
||||
$od_addr1 = addslashes(clean_xss_tags($data['od_addr1']));
|
||||
$od_addr2 = addslashes(clean_xss_tags($data['od_addr2']));
|
||||
$od_addr3 = addslashes(clean_xss_tags($data['od_addr3']));
|
||||
$od_addr_jibeon = preg_match("/^(N|R|J)$/", $data['od_addr_jibeon']) ? $data['od_addr_jibeon'] : '';
|
||||
$od_b_name = addslashes(clean_xss_tags($data['od_b_name']));
|
||||
$od_b_tel = addslashes(clean_xss_tags($data['od_b_tel']));
|
||||
$od_b_hp = addslashes(clean_xss_tags($data['od_b_hp']));
|
||||
$od_b_zip = preg_replace('/[^0-9]/', '', $data['od_b_zip']);
|
||||
$od_b_zip1 = substr($od_b_zip, 0, 3);
|
||||
$od_b_zip2 = substr($od_b_zip, 3);
|
||||
$od_b_addr1 = clean_xss_tags($data['od_b_addr1']);
|
||||
$od_b_addr2 = clean_xss_tags($data['od_b_addr2']);
|
||||
$od_b_addr3 = clean_xss_tags($data['od_b_addr3']);
|
||||
$od_b_addr_jibeon = preg_match("/^(N|R)$/", $data['od_b_addr_jibeon']) ? $data['od_b_addr_jibeon'] : '';
|
||||
$od_memo = clean_xss_tags($data['od_memo'], 0, 1, 0, 0);
|
||||
$od_deposit_name = clean_xss_tags($data['od_deposit_name']);
|
||||
$od_b_addr1 = addslashes(clean_xss_tags($data['od_b_addr1']));
|
||||
$od_b_addr2 = addslashes(clean_xss_tags($data['od_b_addr2']));
|
||||
$od_b_addr3 = addslashes(clean_xss_tags($data['od_b_addr3']));
|
||||
$od_b_addr_jibeon = preg_match("/^(N|R|J)$/", $data['od_b_addr_jibeon']) ? $data['od_b_addr_jibeon'] : '';
|
||||
$od_memo = addslashes(clean_xss_tags($data['od_memo'], 0, 1, 0, 0));
|
||||
$od_deposit_name = addslashes(clean_xss_tags($data['od_deposit_name']));
|
||||
$od_tax_flag = $default['de_tax_flag_use'];
|
||||
$od_receipt_price = $tot_ct_price + $od_send_cost + $od_send_cost2 - ($od_temp_point + $tot_cp_price + $tot_sc_cp_price);
|
||||
$od_receipt_point = $od_temp_point;
|
||||
|
||||
@@ -104,6 +104,12 @@ $colspan = 10;
|
||||
case 'lg':
|
||||
$pg = 'LGU+';
|
||||
break;
|
||||
case 'toss':
|
||||
$pg = '토스페이먼츠';
|
||||
break;
|
||||
case 'nicepay':
|
||||
$pg = 'NICEPAY';
|
||||
break;
|
||||
default:
|
||||
$pg = 'KCP';
|
||||
break;
|
||||
|
||||
@@ -67,7 +67,9 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
for ($i=0; $i<$len; $i++)
|
||||
$nbsp .= " ";
|
||||
|
||||
$category_select .= "<option value=\"{$row['ca_id']}\">$nbsp{$row['ca_name']}</option>\n";
|
||||
// 전체 카테고리 경로 표시
|
||||
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row['ca_id']) : $row['ca_name'];
|
||||
$category_select .= "<option value=\"{$row['ca_id']}\">$nbsp{$category_path}</option>\n";
|
||||
}
|
||||
|
||||
// 모바일 1줄당 이미지수 필드 추가
|
||||
|
||||
@@ -107,7 +107,9 @@ if($ev_id) {
|
||||
$len = strlen($row1['ca_id']) / 2 - 1;
|
||||
$nbsp = "";
|
||||
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
||||
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sel_ca_id, $row1['ca_id']).'>'.$nbsp.$row1['ca_name'].'</option>'.PHP_EOL;
|
||||
// 전체 카테고리 경로 표시
|
||||
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row1['ca_id']) : $row1['ca_name'];
|
||||
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sel_ca_id, $row1['ca_id']).'>'.$nbsp.$category_path.'</option>'.PHP_EOL;
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
@@ -146,9 +146,11 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
$nbsp = "";
|
||||
for ($i=0; $i<$len; $i++)
|
||||
$nbsp .= " ";
|
||||
|
||||
$category_select .= "<option value=\"{$row['ca_id']}\">$nbsp{$row['ca_name']}</option>\n";
|
||||
|
||||
|
||||
// 전체 카테고리 경로 표시 (예: 남성의류 > 상의 > 셔츠)
|
||||
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row['ca_id']) : $row['ca_name'];
|
||||
$category_select .= "<option value=\"{$row['ca_id']}\">$nbsp{$category_path}</option>\n";
|
||||
|
||||
$script .= "ca_use['{$row['ca_id']}'] = {$row['ca_use']};\n";
|
||||
$script .= "ca_stock_qty['{$row['ca_id']}'] = {$row['ca_stock_qty']};\n";
|
||||
//$script .= "ca_explan_html['$row[ca_id]'] = $row[ca_explan_html];\n";
|
||||
@@ -680,9 +682,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>
|
||||
@@ -1394,7 +1396,9 @@ $(function(){
|
||||
for ($i=0; $i<$len; $i++)
|
||||
$nbsp .= " ";
|
||||
|
||||
echo "<option value=\"{$row['ca_id']}\">$nbsp{$row['ca_name']}</option>\n";
|
||||
// 전체 카테고리 경로 표시
|
||||
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row['ca_id']) : $row['ca_name'];
|
||||
echo "<option value=\"{$row['ca_id']}\">$nbsp{$category_path}</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
@@ -365,6 +365,32 @@ $it_explan = isset($_POST['it_explan']) ? $_POST['it_explan'] : '';
|
||||
if ($it_name == "")
|
||||
alert("상품명을 입력해 주십시오.");
|
||||
|
||||
// 스킨 경로 검증
|
||||
$it_skin = isset($_POST['it_skin']) ? strip_tags(clean_xss_attributes($_POST['it_skin'])) : '';
|
||||
$it_mobile_skin = isset($_POST['it_mobile_skin']) ? strip_tags(clean_xss_attributes($_POST['it_mobile_skin'])) : '';
|
||||
|
||||
$check_files = array();
|
||||
if( !empty($it_skin) ) $check_files[] = $it_skin;
|
||||
if( !empty($it_mobile_skin) ) $check_files[] = $it_mobile_skin;
|
||||
|
||||
foreach( $check_files as $file ){
|
||||
if( empty($file) ) continue;
|
||||
|
||||
if( preg_match('#\.+(\/|\\\)#', $file) ){
|
||||
alert('스킨파일명에 포함될수 없는 문자가 들어있습니다.');
|
||||
}
|
||||
|
||||
if( ! is_include_path_check($file, 1) ){
|
||||
alert('오류 : 데이터폴더가 포함된 path 또는 잘못된 path 를 포함할수 없습니다.');
|
||||
}
|
||||
|
||||
$file_ext = pathinfo($file, PATHINFO_EXTENSION);
|
||||
|
||||
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) || ! preg_match('/^.*\.(php|htm|html)$/i', $file) ) {
|
||||
alert('스킨 파일 경로의 확장자는 php, htm, html 만 허용합니다.');
|
||||
}
|
||||
}
|
||||
|
||||
$sql_common = " ca_id = '$ca_id',
|
||||
ca_id2 = '$ca_id2',
|
||||
ca_id3 = '$ca_id3',
|
||||
|
||||
@@ -25,7 +25,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
for ($i=0; $i<$len; $i++) {
|
||||
$nbsp .= ' ';
|
||||
}
|
||||
$ca_list .= '<option value="'.$row['ca_id'].'">'.$nbsp.$row['ca_name'].'</option>'.PHP_EOL;
|
||||
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row['ca_id']) : $row['ca_name'];
|
||||
$ca_list .= '<option value="'.$row['ca_id'].'">'.$nbsp.$category_path.'</option>'.PHP_EOL;
|
||||
}
|
||||
|
||||
$where = " and ";
|
||||
@@ -67,6 +68,9 @@ if (!$sst) {
|
||||
$sst = "it_id";
|
||||
$sod = "desc";
|
||||
}
|
||||
$allowed_sst = array('it_id', 'it_name', 'it_order', 'it_use', 'it_soldout', 'it_hit', 'it_price', 'it_cust_price', 'it_point', 'it_stock_qty');
|
||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'it_id';
|
||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
||||
$sql_order = "order by $sst $sod";
|
||||
|
||||
|
||||
@@ -100,7 +104,9 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
||||
$len = strlen($row1['ca_id']) / 2 - 1;
|
||||
$nbsp = '';
|
||||
for ($i=0; $i<$len; $i++) $nbsp .= ' ';
|
||||
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sca, $row1['ca_id']).'>'.$nbsp.$row1['ca_name'].'</option>'.PHP_EOL;
|
||||
// 전체 카테고리 경로 표시
|
||||
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row1['ca_id']) : $row1['ca_name'];
|
||||
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sca, $row1['ca_id']).'>'.$nbsp.$category_path.'</option>'.PHP_EOL;
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
@@ -31,6 +31,9 @@ if (!$sst) {
|
||||
$sst = "iq_id";
|
||||
$sod = "desc";
|
||||
}
|
||||
$allowed_sst = array('iq_id', 'a.it_id', 'it_name', 'iq_time');
|
||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'iq_id';
|
||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
||||
|
||||
$sql_common = " from {$g5['g5_shop_item_qa_table']} a
|
||||
left join {$g5['g5_shop_item_table']} b on (a.it_id = b.it_id)
|
||||
@@ -79,7 +82,9 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
||||
$nbsp = "";
|
||||
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
||||
$selected = ($row1['ca_id'] == $sca) ? ' selected="selected"' : '';
|
||||
echo '<option value="'.$row1['ca_id'].'"'.$selected.'>'.$nbsp.$row1['ca_name'].'</option>'.PHP_EOL;
|
||||
// 전체 카테고리 경로 표시
|
||||
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row1['ca_id']) : $row1['ca_name'];
|
||||
echo '<option value="'.$row1['ca_id'].'"'.$selected.'>'.$nbsp.$category_path.'</option>'.PHP_EOL;
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
@@ -83,7 +83,9 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
||||
$len = strlen($row1['ca_id']) / 2 - 1;
|
||||
$nbsp = "";
|
||||
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
||||
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sel_ca_id, $row1['ca_id']).'>'.$nbsp.$row1['ca_name'].'</option>'.PHP_EOL;
|
||||
// 전체 카테고리 경로 표시
|
||||
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row1['ca_id']) : $row1['ca_name'];
|
||||
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sel_ca_id, $row1['ca_id']).'>'.$nbsp.$category_path.'</option>'.PHP_EOL;
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
@@ -82,7 +82,9 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
||||
$len = strlen($row1['ca_id']) / 2 - 1;
|
||||
$nbsp = "";
|
||||
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
||||
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sel_ca_id, $row1['ca_id']).'>'.$nbsp.$row1['ca_name'].'</option>'.PHP_EOL;
|
||||
// 전체 카테고리 경로 표시
|
||||
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row1['ca_id']) : $row1['ca_name'];
|
||||
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sel_ca_id, $row1['ca_id']).'>'.$nbsp.$category_path.'</option>'.PHP_EOL;
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -46,6 +46,9 @@ if (!$sst) {
|
||||
$sst = "it_id";
|
||||
$sod = "desc";
|
||||
}
|
||||
$allowed_sst = array('it_id', 'it_name', 'it_type1', 'it_type2', 'it_type3', 'it_type4', 'it_type5', 'ca_id');
|
||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'it_id';
|
||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
||||
$sql_order = "order by $sst $sod";
|
||||
|
||||
$sql_common = " from {$g5['g5_shop_item_table']} ";
|
||||
@@ -98,7 +101,9 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
||||
$len = strlen($row1['ca_id']) / 2 - 1;
|
||||
$nbsp = "";
|
||||
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
||||
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sca, $row1['ca_id']).'>'.$nbsp.$row1['ca_name'].PHP_EOL;
|
||||
// 전체 카테고리 경로 표시
|
||||
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row1['ca_id']) : $row1['ca_name'];
|
||||
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sca, $row1['ca_id']).'>'.$nbsp.$category_path.PHP_EOL;
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
@@ -33,6 +33,9 @@ if (!$sst) {
|
||||
$sst = "is_id";
|
||||
$sod = "desc";
|
||||
}
|
||||
$allowed_sst = array('is_id', 'a.it_id', 'it_name', 'is_name', 'is_score', 'is_time');
|
||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'is_id';
|
||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
||||
|
||||
$sql_common = " from {$g5['g5_shop_item_use_table']} a
|
||||
left join {$g5['g5_shop_item_table']} b on (a.it_id = b.it_id)
|
||||
@@ -81,7 +84,9 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
||||
$nbsp = "";
|
||||
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
||||
$selected = ($row1['ca_id'] == $sca) ? ' selected="selected"' : '';
|
||||
echo '<option value="'.$row1['ca_id'].'"'.$selected.'>'.$nbsp.$row1['ca_name'].'</option>'.PHP_EOL;
|
||||
// 전체 카테고리 경로 표시
|
||||
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row1['ca_id']) : $row1['ca_name'];
|
||||
echo '<option value="'.$row1['ca_id'].'"'.$selected.'>'.$nbsp.$category_path.PHP_EOL;
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
@@ -84,7 +84,9 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
||||
$len = strlen($row1['ca_id']) / 2 - 1;
|
||||
$nbsp = "";
|
||||
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
||||
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sel_ca_id, $row1['ca_id']).'>'.$nbsp.$row1['ca_name'].'</option>'.PHP_EOL;
|
||||
// 전체 카테고리 경로 표시
|
||||
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row1['ca_id']) : $row1['ca_name'];
|
||||
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sel_ca_id, $row1['ca_id']).'>'.$nbsp.$category_path.'</option>'.PHP_EOL;
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
@@ -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 --------------------------------------------------------
|
||||
}
|
||||
@@ -30,17 +30,17 @@ if(! function_exists('column_char')) {
|
||||
$rows = array();
|
||||
|
||||
for($i=1; $row=sql_fetch_array($result); $i++) {
|
||||
$rows[] =
|
||||
array(' '.$row['od_id'],
|
||||
$row['od_name'],
|
||||
' '.$row['od_tel'],
|
||||
' '.$row['od_hp'],
|
||||
$row['od_b_name'],
|
||||
' '.$row['od_b_tel'],
|
||||
' '.$row['od_b_hp'],
|
||||
print_address($row['od_b_addr1'], $row['od_b_addr2'], $row['od_b_addr3'], $row['od_b_addr_jibeon']),
|
||||
$row['od_delivery_company'],
|
||||
$row['od_invoice']);
|
||||
$rows[] =
|
||||
array(' '.$row['od_id'],
|
||||
function_exists('csv_safe_cell') ? csv_safe_cell($row['od_name']) : $row['od_name'],
|
||||
' '.$row['od_tel'],
|
||||
' '.$row['od_hp'],
|
||||
function_exists('csv_safe_cell') ? csv_safe_cell($row['od_b_name']) : $row['od_b_name'],
|
||||
' '.$row['od_b_tel'],
|
||||
' '.$row['od_b_hp'],
|
||||
function_exists('csv_safe_cell') ? csv_safe_cell(print_address($row['od_b_addr1'], $row['od_b_addr2'], $row['od_b_addr3'], $row['od_b_addr_jibeon'])) : print_address($row['od_b_addr1'], $row['od_b_addr2'], $row['od_b_addr3'], $row['od_b_addr_jibeon']),
|
||||
function_exists('csv_safe_cell') ? csv_safe_cell($row['od_delivery_company']) : $row['od_delivery_company'],
|
||||
function_exists('csv_safe_cell') ? csv_safe_cell($row['od_invoice']) : $row['od_invoice']);
|
||||
}
|
||||
|
||||
$data = array_merge(array($headers), $rows);
|
||||
|
||||
@@ -3,10 +3,11 @@ $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");
|
||||
|
||||
check_admin_token();
|
||||
|
||||
define("_ORDERMAIL_", true);
|
||||
|
||||
$sms_count = 0;
|
||||
@@ -99,14 +100,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 ($config['cf_kakaotalk_use']) { ?>
|
||||
<p>* <b>알림톡 프리셋</b>: <b>[준비, 완료, 취소, 반품, 품절]</b>은 <b>자동</b>으로 발송되며, <b>[입금완료, 배송]</b>은 <b>결제상세정보에서 수동</b>으로 발송하셔야 합니다.</p>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
@@ -386,8 +382,8 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
<input type="hidden" name="sel_field" value="<?php echo $sel_field; ?>">
|
||||
<input type="hidden" name="search" value="<?php echo $search; ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
||||
<input type="hidden" name="od_name" value="<?php echo $od['od_name']; ?>">
|
||||
<input type="hidden" name="od_hp" value="<?php echo $od['od_hp']; ?>">
|
||||
<input type="hidden" name="od_name" value="<?php echo get_text($od['od_name']); ?>">
|
||||
<input type="hidden" name="od_hp" value="<?php echo get_text($od['od_hp']); ?>">
|
||||
<input type="hidden" name="od_tno" value="<?php echo $od['od_tno']; ?>">
|
||||
<input type="hidden" name="od_escrow" value="<?php echo $od['od_escrow']; ?>">
|
||||
<input type="hidden" name="od_pg" value="<?php echo $od['od_pg']; ?>">
|
||||
@@ -513,35 +509,33 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
<?php
|
||||
if ($od['od_settle_case'] != '무통장') {
|
||||
switch($od['od_pg']) {
|
||||
case 'lg':
|
||||
$pg_url = 'https://app.tosspayments.com';
|
||||
$pg_test = '토스페이먼츠';
|
||||
if ($default['de_card_test']) {
|
||||
$pg_url = 'https://pgweb.tosspayments.com/tmert';
|
||||
$pg_test .= ' 테스트 ';
|
||||
}
|
||||
break;
|
||||
case 'inicis':
|
||||
$pg_url = 'https://iniweb.inicis.com/';
|
||||
$pg_test = 'KG이니시스';
|
||||
$pg_test = 'KG이니시스 ';
|
||||
break;
|
||||
case 'KAKAOPAY':
|
||||
$pg_url = 'https://mms.cnspay.co.kr';
|
||||
$pg_test = 'KAKAOPAY';
|
||||
$pg_test = 'KAKAOPAY ';
|
||||
break;
|
||||
case 'nicepay':
|
||||
$pg_url = 'https://npg.nicepay.co.kr/';
|
||||
$pg_test = 'NICEPAY';
|
||||
$pg_test = 'NICEPAY ';
|
||||
break;
|
||||
case 'lg':
|
||||
case 'toss':
|
||||
$pg_url = 'https://app.tosspayments.com';
|
||||
$pg_test = '토스페이먼츠 ';
|
||||
// 상점관리자 로그인 후 상단 '테스트 모드' 활성화 시 테스트 화면 노출
|
||||
break;
|
||||
default:
|
||||
$pg_url = 'http://admin8.kcp.co.kr';
|
||||
$pg_test = 'KCP';
|
||||
$pg_url = 'https://partner.kcp.co.kr';
|
||||
$pg_test = 'KCP ';
|
||||
if ($default['de_card_test']) {
|
||||
// 로그인 아이디 / 비번
|
||||
// 일반 : test1234 / test12345
|
||||
// 에스크로 : escrow / escrow913
|
||||
$pg_url = 'http://testadmin8.kcp.co.kr';
|
||||
$pg_test .= ' 테스트 ';
|
||||
$pg_url = 'https://testpartner.kcp.co.kr';
|
||||
$pg_test .= '테스트 ';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -634,6 +628,8 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
break;
|
||||
}
|
||||
$cash_receipt_script = 'javascript:showCashReceipts(\''.$LGD_MID.'\',\''.$od['od_id'].'\',\''.$od['od_casseqno'].'\',\''.$trade_type.'\',\''.$CST_PLATFORM.'\');';
|
||||
} else if($od['od_pg'] == 'toss') {
|
||||
$cash_receipt_script = 'window.open(\'https://dashboard.tosspayments.com/receipt/mids/si_'.$config['cf_lg_mid'].'/orders/'.$od['od_id'].'/cash-receipt?ref=dashboard\',\'receipt\',\'width=430,height=700\');';
|
||||
} else if($od['od_pg'] == 'inicis') {
|
||||
$cash = unserialize($od['od_cash_info']);
|
||||
$cash_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid='.$cash['TID'].'&clpaymethod=22\',\'showreceipt\',\'width=380,height=540,scrollbars=no,resizable=no\');';
|
||||
@@ -724,15 +720,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>
|
||||
@@ -841,16 +828,6 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
<br>
|
||||
<?php } ?>
|
||||
|
||||
<!-- 배송 알림톡 전송 -->
|
||||
<?php
|
||||
$alimtalk = get_alimtalk_preset_info('CU-DE02');
|
||||
if ($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>
|
||||
@@ -1187,4 +1164,4 @@ function chk_receipt_price()
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once(G5_ADMIN_PATH.'/admin.tail.php');
|
||||
include_once(G5_ADMIN_PATH.'/admin.tail.php');
|
||||
|
||||
@@ -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']; // 상품명 배열 : 알림톡 사용
|
||||
}
|
||||
|
||||
// 상품 판매수량 반영
|
||||
@@ -224,6 +220,10 @@ if (in_array($_POST['ct_status'], $status_cancel)) {
|
||||
$pg_res_msg = $xpay->Response_Msg();
|
||||
}
|
||||
break;
|
||||
case 'toss':
|
||||
$cancel_msg = '쇼핑몰 운영자 승인 취소';
|
||||
include_once(G5_SHOP_PATH.'/toss/toss_cancel.php');
|
||||
break;
|
||||
case 'inicis':
|
||||
include_once(G5_SHOP_PATH.'/settle_inicis.inc.php');
|
||||
$cancel_msg = '쇼핑몰 운영자 승인 취소';
|
||||
@@ -379,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)
|
||||
|
||||
@@ -26,8 +26,8 @@ $od_cancel_price = isset($_GET['od_cancel_price']) ? preg_replace('/[^0-9a-z]/i'
|
||||
$od_refund_price = isset($_GET['od_refund_price']) ? preg_replace('/[^0-9a-z]/i', '', $_GET['od_refund_price']) : '';
|
||||
$od_receipt_point = isset($_GET['od_receipt_point']) ? preg_replace('/[^0-9a-z]/i', '', $_GET['od_receipt_point']) : '';
|
||||
$od_coupon = isset($_GET['od_coupon']) ? preg_replace('/[^0-9a-z]/i', '', $_GET['od_coupon']) : '';
|
||||
$od_settle_case = isset($_GET['od_settle_case']) ? clean_xss_tags($_GET['od_settle_case'], 1, 1) : '';
|
||||
$od_escrow = isset($_GET['od_escrow']) ? clean_xss_tags($_GET['od_escrow'], 1, 1) : '';
|
||||
$od_settle_case = isset($_GET['od_settle_case']) ? addslashes(clean_xss_tags(stripslashes($_GET['od_settle_case']), 1, 1)) : '';
|
||||
$od_escrow = isset($_GET['od_escrow']) ? addslashes(clean_xss_tags(stripslashes($_GET['od_escrow']), 1, 1)) : '';
|
||||
|
||||
$tot_itemcount = $tot_orderprice = $tot_receiptprice = $tot_ordercancel = $tot_misu = $tot_couponprice = 0;
|
||||
$sql_search = "";
|
||||
@@ -350,7 +350,7 @@ if( function_exists('pg_setting_check') ){
|
||||
if($default['de_escrow_use'] && $row['od_escrow'])
|
||||
$od_paytype .= '<span class="list_escrow">에스크로</span>';
|
||||
|
||||
$uid = md5($row['od_id'].$row['od_time'].$row['od_ip']);
|
||||
$uid = function_exists('get_shop_uid') ? get_shop_uid('order', $row['od_id'], $row['od_time'], $row['od_ip']) : md5($row['od_id'].$row['od_time'].$row['od_ip']);
|
||||
|
||||
$invoice_time = is_null_time($row['od_invoice_time']) ? G5_TIME_YMDHIS : $row['od_invoice_time'];
|
||||
$delivery_company = $row['od_delivery_company'] ? $row['od_delivery_company'] : $default['de_delivery_company'];
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -4,6 +4,8 @@ include_once('./_common.php');
|
||||
|
||||
auth_check_menu($auth, $sub_menu, "w");
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$tax_mny = isset($_POST['mod_tax_mny']) ? preg_replace('/[^0-9]/', '', $_POST['mod_tax_mny']) : 0;
|
||||
$free_mny = isset($_POST['mod_free_mny']) ? preg_replace('/[^0-9]/', '', $_POST['mod_free_mny']) : 0;
|
||||
|
||||
|
||||
@@ -118,21 +118,21 @@ if ($csv == 'csv')
|
||||
}
|
||||
|
||||
echo '"\''.$row['od_b_zip1'].$row['od_b_zip2'].'"\''.',';
|
||||
echo '"'.$pull_address.'"'.',';
|
||||
echo '"'.$row['od_b_name'].'"'.',';
|
||||
echo '"'.(function_exists('csv_safe_cell') ? csv_safe_cell($pull_address) : $pull_address).'"'.',';
|
||||
echo '"'.(function_exists('csv_safe_cell') ? csv_safe_cell($row['od_b_name']) : $row['od_b_name']).'"'.',';
|
||||
//echo '"'.multibyte_digit((string)$row[od_b_tel]).'"'.',';
|
||||
//echo '"'.multibyte_digit((string)$row[od_b_hp]).'"'.',';
|
||||
echo '"'.conv_telno($row['od_b_tel']) . '"'.',';
|
||||
echo '"'.conv_telno($row['od_b_hp']) . '"'.',';
|
||||
echo '"'.preg_replace("/\"/", """, $row['it_name']) . '"'.',';
|
||||
echo '"'.(function_exists('csv_safe_cell') ? csv_safe_cell(preg_replace("/\"/", """, $row['it_name'])) : preg_replace("/\"/", """, $row['it_name'])) . '"'.',';
|
||||
echo '"'.$row['ct_qty'].'"'.',';
|
||||
echo '"'.$row['ct_option'].'"'.',';
|
||||
echo '"'.(function_exists('csv_safe_cell') ? csv_safe_cell($row['ct_option']) : $row['ct_option']).'"'.',';
|
||||
echo '"'.$ct_send_cost.'"'.',';
|
||||
echo '"\''.$row['it_id'].'\'"'.',';
|
||||
echo '"\''.$row['od_id'].'\'"'.',';
|
||||
echo '"'.$row['od_invoice'].'"'.',';
|
||||
echo '"'.(function_exists('csv_safe_cell') ? csv_safe_cell($row['od_invoice']) : $row['od_invoice']).'"'.',';
|
||||
//echo '"'.preg_replace("/\"/", """, preg_replace("/\n/", "", $row[od_memo])).'"';
|
||||
echo '"'.preg_replace("/\"/", """, $row['od_memo']).'"';
|
||||
echo '"'.(function_exists('csv_safe_cell') ? csv_safe_cell(preg_replace("/\"/", """, $row['od_memo'])) : preg_replace("/\"/", """, $row['od_memo'])).'"';
|
||||
echo "\n";
|
||||
}
|
||||
if ($i == 0)
|
||||
@@ -217,18 +217,18 @@ if ($csv == 'xls')
|
||||
}
|
||||
|
||||
$rows[] = array(' '.$row['od_b_zip1'].$row['od_b_zip2'],
|
||||
$pull_address,
|
||||
$row['od_b_name'],
|
||||
' '.conv_telno($row['od_b_tel']),
|
||||
' '.conv_telno($row['od_b_hp']),
|
||||
preg_replace("/\"/", """, $row['it_name']),
|
||||
' '.$row['ct_qty'],
|
||||
$row['ct_option'],
|
||||
function_exists('csv_safe_cell') ? csv_safe_cell($pull_address) : $pull_address,
|
||||
function_exists('csv_safe_cell') ? csv_safe_cell($row['od_b_name']) : $row['od_b_name'],
|
||||
' '.conv_telno($row['od_b_tel']),
|
||||
' '.conv_telno($row['od_b_hp']),
|
||||
function_exists('csv_safe_cell') ? csv_safe_cell(preg_replace("/\"/", """, $row['it_name'])) : preg_replace("/\"/", """, $row['it_name']),
|
||||
' '.$row['ct_qty'],
|
||||
function_exists('csv_safe_cell') ? csv_safe_cell($row['ct_option']) : $row['ct_option'],
|
||||
$ct_send_cost,
|
||||
' '.$row['it_id'],
|
||||
' '.$row['od_id'],
|
||||
' '.$row['od_invoice'],
|
||||
preg_replace("/\"/", """, $row['od_memo']));
|
||||
function_exists('csv_safe_cell') ? csv_safe_cell(preg_replace("/\"/", """, $row['od_memo'])) : preg_replace("/\"/", """, $row['od_memo']));
|
||||
}
|
||||
|
||||
$data = array_merge(array($headers), $rows);
|
||||
|
||||
@@ -210,6 +210,8 @@ if(!sql_query(" select pp_cash from {$g5['g5_shop_personalpay_table']} limit 1 "
|
||||
break;
|
||||
}
|
||||
$cash_receipt_script = 'javascript:showCashReceipts(\''.$LGD_MID.'\',\''.$pp['pp_id'].'\',\''.$pp['pp_casseqno'].'\',\''.$trade_type.'\',\''.$CST_PLATFORM.'\');';
|
||||
} else if($pp['pp_pg'] == 'toss') {
|
||||
$cash_receipt_script = 'window.open(\'https://dashboard.tosspayments.com/receipt/mids/si_'.$config['cf_lg_mid'].'/orders/'.$pp['pp_id'].'/cash-receipt?ref=dashboard\',\'receipt\',\'width=430,height=700\');';
|
||||
} else if($pp['pp_pg'] == 'inicis') {
|
||||
$cash = unserialize($pp['pp_cash_info']);
|
||||
$cash_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid='.$cash['TID'].'&clpaymethod=22\',\'showreceipt\',\'width=380,height=540,scrollbars=no,resizable=no\');';
|
||||
|
||||
@@ -87,7 +87,7 @@ $result = sql_query($sql);
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_alignc"><a href="./orderform.php?od_id=<?php echo $row['od_id']; ?>"><?php echo $row['od_id']; ?></a></td>
|
||||
<td class="td_name"><?php echo $href; ?><?php echo $row['od_name']; ?></a></td>
|
||||
<td class="td_name"><?php echo $href; ?><?php echo get_text($row['od_name']); ?></a></td>
|
||||
<td class="td_numsum"><?php echo number_format($row['orderprice']); ?></td>
|
||||
<td class="td_numincome"><?php echo number_format($row['couponprice']); ?></td>
|
||||
<td class="td_numincome"><?php echo number_format($receipt_bank); ?></td>
|
||||
|
||||
@@ -71,7 +71,9 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
||||
$len = strlen($row1['ca_id']) / 2 - 1;
|
||||
$nbsp = "";
|
||||
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
||||
echo "<option value='{$row1['ca_id']}'".get_selected($row1['ca_id'], $sel_ca_id).">$nbsp{$row1['ca_name']}\n";
|
||||
// 전체 카테고리 경로 표시
|
||||
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row1['ca_id']) : $row1['ca_name'];
|
||||
echo "<option value='{$row1['ca_id']}'".get_selected($row1['ca_id'], $sel_ca_id).">$nbsp{$category_path}\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
@@ -4,7 +4,7 @@ include_once ('../../common.php');
|
||||
include_once(G5_ADMIN_PATH.'/admin.lib.php');
|
||||
include_once(G5_SMS5_PATH.'/sms5.lib.php');
|
||||
|
||||
if (!strstr($_SERVER['SCRIPT_NAME'], 'install.php')) {
|
||||
if (strpos($_SERVER['SCRIPT_NAME'], 'install.php') === false) {
|
||||
// SMS5 테이블 G5_TABLE_PREFIX 적용
|
||||
if($g5['sms5_prefix'] != 'sms5_' && sql_num_rows(sql_query("show tables like 'sms5_config'")))
|
||||
{
|
||||
|
||||
@@ -10,14 +10,14 @@ check_admin_token();
|
||||
|
||||
$g5['title'] = "SMS 기본설정";
|
||||
|
||||
$cf_phone = isset($_REQUEST['cf_phone']) ? clean_xss_tags($_REQUEST['cf_phone'], 1, 1) : '';
|
||||
$cf_sms_use = isset($_REQUEST['cf_sms_use']) ? clean_xss_tags($_REQUEST['cf_sms_use'], 1, 1) : '';
|
||||
$cf_sms_type = isset($_REQUEST['cf_sms_type']) ? clean_xss_tags($_REQUEST['cf_sms_type'], 1, 1) : '';
|
||||
$cf_icode_id = isset($_REQUEST['cf_icode_id']) ? clean_xss_tags($_REQUEST['cf_icode_id'], 1, 1) : '';
|
||||
$cf_icode_pw = isset($_REQUEST['cf_icode_pw']) ? clean_xss_tags($_REQUEST['cf_icode_pw'], 1, 1) : '';
|
||||
$cf_icode_server_ip = isset($_REQUEST['cf_icode_server_ip']) ? clean_xss_tags($_REQUEST['cf_icode_server_ip'], 1, 1) : '';
|
||||
$cf_phone = isset($_REQUEST['cf_phone']) ? addslashes(clean_xss_tags(stripslashes($_REQUEST['cf_phone']), 1, 1)) : '';
|
||||
$cf_sms_use = isset($_REQUEST['cf_sms_use']) ? addslashes(clean_xss_tags(stripslashes($_REQUEST['cf_sms_use']), 1, 1)) : '';
|
||||
$cf_sms_type = isset($_REQUEST['cf_sms_type']) ? addslashes(clean_xss_tags(stripslashes($_REQUEST['cf_sms_type']), 1, 1)) : '';
|
||||
$cf_icode_id = isset($_REQUEST['cf_icode_id']) ? addslashes(clean_xss_tags(stripslashes($_REQUEST['cf_icode_id']), 1, 1)) : '';
|
||||
$cf_icode_pw = isset($_REQUEST['cf_icode_pw']) ? addslashes(clean_xss_tags(stripslashes($_REQUEST['cf_icode_pw']), 1, 1)) : '';
|
||||
$cf_icode_server_ip = isset($_REQUEST['cf_icode_server_ip']) ? addslashes(clean_xss_tags(stripslashes($_REQUEST['cf_icode_server_ip']), 1, 1)) : '';
|
||||
$cf_icode_server_port = isset($_REQUEST['cf_icode_server_port']) ? clean_xss_tags($_REQUEST['cf_icode_server_port'], 1, 1) : '';
|
||||
$cf_icode_token_key = isset($_REQUEST['cf_icode_token_key']) ? clean_xss_tags($_REQUEST['cf_icode_token_key'], 1, 1) : '';
|
||||
$cf_icode_token_key = isset($_REQUEST['cf_icode_token_key']) ? addslashes(clean_xss_tags(stripslashes($_REQUEST['cf_icode_token_key']), 1, 1)) : '';
|
||||
|
||||
// 회신번호 체크
|
||||
if(!check_vaild_callback($cf_phone))
|
||||
|
||||
@@ -65,7 +65,7 @@ function book_all_checked(chk)
|
||||
function book_del(fo_no)
|
||||
{
|
||||
if (confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n그래도 삭제하시겠습니까?"))
|
||||
location.href = "./form_update.php?w=d&fo_no=" + fo_no + "&page=<?php echo $page?>&fg_no=<?php echo $fg_no?>&st=<?php echo get_text($st); ?>&sv=<?php echo get_text($sv); ?>";
|
||||
location.href = "./form_update.php?w=d&fo_no=" + fo_no + "&page=<?php echo $page?>&fg_no=<?php echo $fg_no?>&st=<?php echo get_text($st); ?>&sv=<?php echo get_text($sv); ?>&token=<?php echo $token; ?>";
|
||||
}
|
||||
|
||||
function multi_update(sel)
|
||||
@@ -114,7 +114,7 @@ function multi_update(sel)
|
||||
<div class="local_sch01 local_sch sms_preset_sch">
|
||||
<form>
|
||||
<label for="fg_no" class="sound_only">그룹명</label>
|
||||
<select name="fg_no" id="fg_no" onchange="location.href='<?php echo $_SERVER['SCRIPT_NAME']?>?fg_no='+this.value;">
|
||||
<select name="fg_no" id="fg_no" onchange="location.href='<?php echo htmlspecialchars($_SERVER['SCRIPT_NAME'])?>?fg_no='+this.value;">
|
||||
<option value="" <?php echo $fg_no?'':'selected'?>> 전체 </option>
|
||||
<option value="0" <?php echo $fg_no=='0'?'selected':''?>> 미분류 (<?php echo number_format($no_count)?>) </option>
|
||||
<?php for($i=0; $i<count($group); $i++) {?>
|
||||
|
||||
@@ -4,6 +4,8 @@ include_once("./_common.php");
|
||||
|
||||
auth_check_menu($auth, $sub_menu, "w");
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$fo_name = isset($_REQUEST['fo_name']) ? strip_tags(clean_xss_attributes($_REQUEST['fo_name'])) : '';
|
||||
$fo_content = isset($_REQUEST['fo_content']) ? strip_tags(clean_xss_attributes($_REQUEST['fo_content'])) : '';
|
||||
$fo_receipt = isset($_REQUEST['fo_receipt']) ? clean_xss_tags($_REQUEST['fo_receipt'], 1, 1) : '';
|
||||
|
||||
@@ -4,6 +4,8 @@ include_once("./_common.php");
|
||||
|
||||
auth_check_menu($auth, $sub_menu, "w");
|
||||
|
||||
$token = get_token();
|
||||
|
||||
$g5['title'] = "이모티콘 ";
|
||||
|
||||
$fo_no = isset($_REQUEST['fo_no']) ? (int) $_REQUEST['fo_no'] : 0;
|
||||
@@ -34,6 +36,7 @@ include_once(G5_ADMIN_PATH.'/admin.head.php');
|
||||
<input type="hidden" name="page" value="<?php echo $page?>">
|
||||
<input type="hidden" name="fo_no" value="<?php echo $write['fo_no']; ?>">
|
||||
<input type="hidden" name="get_fg_no" value="<?php echo $fg_no?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
|
||||
@@ -161,11 +161,12 @@ function all_send()
|
||||
if( $write['wr_memo'] ){
|
||||
$tmp_wr_memo = @unserialize($write['wr_memo']);
|
||||
if( count($tmp_wr_memo) && is_array($tmp_wr_memo) ){
|
||||
if(function_exists('array_fill_keys')){
|
||||
$tmp_wr_hp = array_replace($tmp_wr_memo['hp'],array_fill_keys(array_keys($tmp_wr_memo['hp'], null),''));
|
||||
} else {
|
||||
$tmp_wr_hp = $tmp_wr_memo['hp'];
|
||||
}
|
||||
$tmp_wr_hp = $tmp_wr_memo['hp'];
|
||||
if (is_array($tmp_wr_hp)) {
|
||||
foreach (array_keys($tmp_wr_hp, null) as $empty_key) {
|
||||
$tmp_wr_hp[$empty_key] = '';
|
||||
}
|
||||
}
|
||||
$arr_wr_memo = @array_count_values( $tmp_wr_hp );
|
||||
?>
|
||||
<h2>중복번호 <?php echo $tmp_wr_memo['total'];?>건</h2>
|
||||
@@ -265,4 +266,4 @@ function all_send()
|
||||
<?php echo sms5_sub_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $spage, $total_spage, $_SERVER['SCRIPT_NAME']."?wr_no=$wr_no&wr_renum=$wr_renum&page=$page&st=$st&sv=$sv&sst=$sst&ssv=$ssv", "", "spage"); ?>
|
||||
|
||||
<?php
|
||||
include_once(G5_ADMIN_PATH.'/admin.tail.php');
|
||||
include_once(G5_ADMIN_PATH.'/admin.tail.php');
|
||||
|
||||
@@ -4,6 +4,8 @@ include_once("./_common.php");
|
||||
|
||||
auth_check_menu($auth, $sub_menu, "r");
|
||||
|
||||
$token = get_token();
|
||||
|
||||
$g5['title'] = "회원정보 업데이트";
|
||||
|
||||
include_once(G5_ADMIN_PATH.'/admin.head.php');
|
||||
@@ -37,7 +39,7 @@ include_once(G5_ADMIN_PATH.'/admin.head.php');
|
||||
$( "#mb_update_form" ).submit(function( e ) {
|
||||
e.preventDefault();
|
||||
$("#res_msg").html('업데이트 중입니다. 잠시만 기다려 주십시오...');
|
||||
var params = { mtype : 'json' };
|
||||
var params = { mtype : 'json', token : '<?php echo $token; ?>' };
|
||||
$.ajax({
|
||||
url: $(this).attr("action"),
|
||||
cache:false,
|
||||
|
||||
@@ -26,6 +26,8 @@ if( $mtype == "json" ){
|
||||
auth_check_menu($auth, $sub_menu, "w");
|
||||
}
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$count = 0;
|
||||
$hp_yes = 0;
|
||||
$hp_no = 0;
|
||||
|
||||
@@ -130,7 +130,7 @@ function no_hp_click(val)
|
||||
|
||||
<form name="search_form" class="local_sch01 local_sch">
|
||||
<label for="bg_no" class="sound_only">그룹명</label>
|
||||
<select name="bg_no" id="bg_no" onchange="location.href='<?php echo $_SERVER['SCRIPT_NAME']?>?bg_no='+this.value;">
|
||||
<select name="bg_no" id="bg_no" onchange="location.href='<?php echo htmlspecialchars($_SERVER['SCRIPT_NAME'])?>?bg_no='+this.value;">
|
||||
<option value=""<?php echo get_selected('', $bg_no); ?>> 전체 </option>
|
||||
<option value="<?php echo $no_group['bg_no']?>"<?php echo get_selected($no_group['bg_no'], $bg_no); ?>> <?php echo $no_group['bg_name']?> (<?php echo number_format($no_group['bg_count'])?> 명) </option>
|
||||
<?php for($i=0; $i<count($group); $i++) {?>
|
||||
|
||||
@@ -46,7 +46,7 @@ for($i=1; $res=sql_fetch_array($qry); $i++)
|
||||
|
||||
if ($no_hp && $res['bk_hp'] != '' && !$hp) continue;
|
||||
|
||||
$rows[] = array($res['bk_name'], ' '.$hp);
|
||||
$rows[] = array(function_exists('csv_safe_cell') ? csv_safe_cell($res['bk_name']) : $res['bk_name'], ' '.$hp);
|
||||
}
|
||||
|
||||
$data = array_merge(array($headers), $rows);
|
||||
|
||||
@@ -125,7 +125,7 @@ while ($row = array_shift($send_list))
|
||||
continue 2;
|
||||
}
|
||||
|
||||
array_push($list, array('bk_hp' => $hp, 'bk_name' => $name));
|
||||
array_push($list, array('bk_hp' => $hp, 'bk_name' => $name, 'mb_id' => '', 'bg_no' => '', 'bk_no' => ''));
|
||||
array_push($hps, $hp);
|
||||
break;
|
||||
|
||||
|
||||
+2
-1
@@ -7,7 +7,8 @@ $content = isset($_POST['content']) ? strip_tags($_POST['content']) : '';
|
||||
//$filter = explode(",", strtolower(trim($config['cf_filter'])));
|
||||
// strtolower 에 의한 한글 변형으로 아래 코드로 대체 (곱슬최씨님이 알려 주셨습니다.)
|
||||
$filter = explode(",", trim($config['cf_filter']));
|
||||
for ($i=0; $i<count($filter); $i++) {
|
||||
$filter_cnt = count($filter);
|
||||
for ($i=0; $i<$filter_cnt; $i++) {
|
||||
$str = $filter[$i];
|
||||
|
||||
// 제목 필터링 (찾으면 중지)
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/register.lib.php');
|
||||
|
||||
// 회원 ID 열거 공격 방지를 위한 Rate Limit (분당 30회)
|
||||
if (function_exists('check_rate_limit') && !check_rate_limit('ajax_mb_id_check', 30, 60)) {
|
||||
die('너무 많은 요청이 발생했습니다. 잠시 후 다시 시도해 주세요.');
|
||||
}
|
||||
|
||||
$mb_id = isset($_POST['reg_mb_id']) ? trim($_POST['reg_mb_id']) : '';
|
||||
|
||||
set_session('ss_check_mb_id', '');
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/register.lib.php');
|
||||
|
||||
// 회원 닉네임 열거 공격 방지를 위한 Rate Limit (분당 30회)
|
||||
if (function_exists('check_rate_limit') && !check_rate_limit('ajax_mb_nick_check', 30, 60)) {
|
||||
die('너무 많은 요청이 발생했습니다. 잠시 후 다시 시도해 주세요.');
|
||||
}
|
||||
|
||||
$mb_nick = isset($_POST['reg_mb_nick']) ? trim($_POST['reg_mb_nick']) : '';
|
||||
$mb_id = isset($_POST['reg_mb_id']) ? trim($_POST['reg_mb_id']) : '';
|
||||
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
include_once("./_common.php");
|
||||
include_once(G5_LIB_PATH."/register.lib.php");
|
||||
|
||||
// 추천인 ID 열거 공격 방지를 위한 Rate Limit (분당 30회)
|
||||
if (function_exists('check_rate_limit') && !check_rate_limit('ajax_mb_recommend_check', 30, 60)) {
|
||||
die('너무 많은 요청이 발생했습니다. 잠시 후 다시 시도해 주세요.');
|
||||
}
|
||||
|
||||
$mb_recommend = isset($_POST["reg_mb_recommend"]) ? trim($_POST["reg_mb_recommend"]) : '';
|
||||
|
||||
if ($msg = valid_mb_id($mb_recommend)) {
|
||||
|
||||
+116
-115
@@ -1,116 +1,117 @@
|
||||
<?php
|
||||
global $lo_location;
|
||||
global $lo_url;
|
||||
|
||||
include_once('./_common.php');
|
||||
|
||||
if($error) {
|
||||
$g5['title'] = "오류안내 페이지";
|
||||
} else {
|
||||
$g5['title'] = "결과안내 페이지";
|
||||
}
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
// 필수 입력입니다.
|
||||
// 양쪽 공백 없애기
|
||||
// 필수 (선택 혹은 입력)입니다.
|
||||
// 전화번호 형식이 올바르지 않습니다. 하이픈(-)을 포함하여 입력하세요.
|
||||
// 이메일주소 형식이 아닙니다.
|
||||
// 한글이 아닙니다. (자음, 모음만 있는 한글은 처리하지 않습니다.)
|
||||
// 한글이 아닙니다.
|
||||
// 한글, 영문, 숫자가 아닙니다.
|
||||
// 한글, 영문이 아닙니다.
|
||||
// 숫자가 아닙니다.
|
||||
// 영문이 아닙니다.
|
||||
// 영문 또는 숫자가 아닙니다.
|
||||
// 영문, 숫자, _ 가 아닙니다.
|
||||
// 최소 글자 이상 입력하세요.
|
||||
// 이미지 파일이 아닙니다..gif .jpg .png 파일만 가능합니다.
|
||||
// 파일만 가능합니다.
|
||||
// 공백이 없어야 합니다.
|
||||
|
||||
$msg = isset($msg) ? strip_tags($msg) : '';
|
||||
$msg2 = str_replace("\\n", "<br>", $msg);
|
||||
|
||||
$url = isset($url) ? clean_xss_tags($url, 1) : '';
|
||||
if (!$url) $url = isset($_SERVER['HTTP_REFERER']) ? clean_xss_tags($_SERVER['HTTP_REFERER'], 1) : '';
|
||||
|
||||
$url = preg_replace("/[\<\>\'\"\\\'\\\"\(\)]/", "", $url);
|
||||
$url = preg_replace('/\r\n|\r|\n|[^\x20-\x7e]/','', $url);
|
||||
|
||||
// url 체크
|
||||
check_url_host($url, $msg);
|
||||
|
||||
if($error) {
|
||||
$header2 = "다음 항목에 오류가 있습니다.";
|
||||
} else {
|
||||
$header2 = "다음 내용을 확인해 주세요.";
|
||||
}
|
||||
?>
|
||||
|
||||
<script>
|
||||
alert("<?php echo $msg; ?>");
|
||||
<?php if ($url) { ?>
|
||||
document.location.replace("<?php echo str_replace('&', '&', $url); ?>");
|
||||
<?php } else { ?>
|
||||
history.back();
|
||||
<?php } ?>
|
||||
</script>
|
||||
|
||||
<noscript>
|
||||
<div id="validation_check">
|
||||
<h1><?php echo $header2 ?></h1>
|
||||
<p class="cbg">
|
||||
<?php echo $msg2 ?>
|
||||
</p>
|
||||
<?php if($post) { ?>
|
||||
<form method="post" action="<?php echo $url ?>">
|
||||
<?php
|
||||
foreach($_POST as $key => $value) {
|
||||
|
||||
$key = clean_xss_tags($key);
|
||||
$value = clean_xss_tags($value);
|
||||
|
||||
if(strlen($value) < 1)
|
||||
continue;
|
||||
|
||||
if(preg_match("/pass|pwd|capt|url/", $key))
|
||||
continue;
|
||||
?>
|
||||
<input type="hidden" name="<?php echo htmlspecialchars($key); ?>" value="<?php echo htmlspecialchars($value); ?>">
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<input type="submit" value="돌아가기">
|
||||
</form>
|
||||
<?php } else { ?>
|
||||
<div class="btn_confirm">
|
||||
<a href="<?php echo $url ?>">돌아가기</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php /*
|
||||
<article id="validation_check">
|
||||
<header>
|
||||
<hgroup>
|
||||
<!-- <h1>회원가입 정보 입력 확인</h1> --> <!-- 수행 중이던 작업 내용 -->
|
||||
<h1><?php echo $header ?></h1> <!-- 수행 중이던 작업 내용 -->
|
||||
<h2><?php echo $header2 ?></h2>
|
||||
</hgroup>
|
||||
</header>
|
||||
<p>
|
||||
<!-- <strong>항목</strong> 오류내역 -->
|
||||
<!--
|
||||
<strong>이름</strong> 필수 입력입니다. 한글만 입력할 수 있습니다.<br>
|
||||
<strong>이메일</strong> 올바르게 입력하지 않았습니다.<br>
|
||||
-->
|
||||
<?php echo $msg2 ?>
|
||||
</p>
|
||||
|
||||
<a href="<?php echo $url ?>">돌아가기</a>
|
||||
</article>
|
||||
*/ ?>
|
||||
</div>
|
||||
</noscript>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
global $lo_location;
|
||||
global $lo_url;
|
||||
|
||||
include_once('./_common.php');
|
||||
|
||||
if($error) {
|
||||
$g5['title'] = "오류안내 페이지";
|
||||
} else {
|
||||
$g5['title'] = "결과안내 페이지";
|
||||
}
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
// 필수 입력입니다.
|
||||
// 양쪽 공백 없애기
|
||||
// 필수 (선택 혹은 입력)입니다.
|
||||
// 전화번호 형식이 올바르지 않습니다. 하이픈(-)을 포함하여 입력하세요.
|
||||
// 이메일주소 형식이 아닙니다.
|
||||
// 한글이 아닙니다. (자음, 모음만 있는 한글은 처리하지 않습니다.)
|
||||
// 한글이 아닙니다.
|
||||
// 한글, 영문, 숫자가 아닙니다.
|
||||
// 한글, 영문이 아닙니다.
|
||||
// 숫자가 아닙니다.
|
||||
// 영문이 아닙니다.
|
||||
// 영문 또는 숫자가 아닙니다.
|
||||
// 영문, 숫자, _ 가 아닙니다.
|
||||
// 최소 글자 이상 입력하세요.
|
||||
// 이미지 파일이 아닙니다..gif .jpg .png 파일만 가능합니다.
|
||||
// 파일만 가능합니다.
|
||||
// 공백이 없어야 합니다.
|
||||
|
||||
$msg = isset($msg) ? strip_tags($msg) : '';
|
||||
$msg2 = str_replace(array("\\r\\n", "\\n", "\\r"), "<br>", $msg);
|
||||
$alert_msg = str_replace(array("\\r\\n", "\\n", "\\r"), "\n", $msg);
|
||||
|
||||
$url = isset($url) ? clean_xss_tags($url, 1) : '';
|
||||
if (!$url) $url = isset($_SERVER['HTTP_REFERER']) ? clean_xss_tags($_SERVER['HTTP_REFERER'], 1) : '';
|
||||
|
||||
$url = preg_replace("/[\<\>\'\"\\\'\\\"\(\)]/", "", $url);
|
||||
$url = preg_replace('/\r\n|\r|\n|[^\x20-\x7e]/','', $url);
|
||||
|
||||
// url 체크
|
||||
check_url_host($url, $msg);
|
||||
|
||||
if($error) {
|
||||
$header2 = "다음 항목에 오류가 있습니다.";
|
||||
} else {
|
||||
$header2 = "다음 내용을 확인해 주세요.";
|
||||
}
|
||||
?>
|
||||
|
||||
<script>
|
||||
alert(<?php echo function_exists('get_js_safe_string') ? get_js_safe_string($alert_msg) : '""'; ?>);
|
||||
<?php if ($url) { ?>
|
||||
document.location.replace("<?php echo str_replace('&', '&', $url); ?>");
|
||||
<?php } else { ?>
|
||||
history.back();
|
||||
<?php } ?>
|
||||
</script>
|
||||
|
||||
<noscript>
|
||||
<div id="validation_check">
|
||||
<h1><?php echo $header2 ?></h1>
|
||||
<p class="cbg">
|
||||
<?php echo $msg2 ?>
|
||||
</p>
|
||||
<?php if($post) { ?>
|
||||
<form method="post" action="<?php echo $url ?>">
|
||||
<?php
|
||||
foreach($_POST as $key => $value) {
|
||||
|
||||
$key = clean_xss_tags($key);
|
||||
$value = clean_xss_tags($value);
|
||||
|
||||
if(strlen($value) < 1)
|
||||
continue;
|
||||
|
||||
if(preg_match("/pass|pwd|capt|url/", $key))
|
||||
continue;
|
||||
?>
|
||||
<input type="hidden" name="<?php echo htmlspecialchars($key); ?>" value="<?php echo htmlspecialchars($value); ?>">
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<input type="submit" value="돌아가기">
|
||||
</form>
|
||||
<?php } else { ?>
|
||||
<div class="btn_confirm">
|
||||
<a href="<?php echo $url ?>">돌아가기</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php /*
|
||||
<article id="validation_check">
|
||||
<header>
|
||||
<hgroup>
|
||||
<!-- <h1>회원가입 정보 입력 확인</h1> --> <!-- 수행 중이던 작업 내용 -->
|
||||
<h1><?php echo $header ?></h1> <!-- 수행 중이던 작업 내용 -->
|
||||
<h2><?php echo $header2 ?></h2>
|
||||
</hgroup>
|
||||
</header>
|
||||
<p>
|
||||
<!-- <strong>항목</strong> 오류내역 -->
|
||||
<!--
|
||||
<strong>이름</strong> 필수 입력입니다. 한글만 입력할 수 있습니다.<br>
|
||||
<strong>이메일</strong> 올바르게 입력하지 않았습니다.<br>
|
||||
-->
|
||||
<?php echo $msg2 ?>
|
||||
</p>
|
||||
|
||||
<a href="<?php echo $url ?>">돌아가기</a>
|
||||
</article>
|
||||
*/ ?>
|
||||
</div>
|
||||
</noscript>
|
||||
|
||||
<?php
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
+4
-3
@@ -4,7 +4,8 @@ include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
$msg = isset($msg) ? strip_tags($msg) : '';
|
||||
|
||||
$msg2 = str_replace("\\n", "<br>", $msg);
|
||||
$msg2 = str_replace(array("\\r\\n", "\\n", "\\r"), "<br>", $msg);
|
||||
$alert_msg = str_replace(array("\\r\\n", "\\n", "\\r"), "\n", $msg);
|
||||
|
||||
if($error) {
|
||||
$header2 = "다음 항목에 오류가 있습니다.";
|
||||
@@ -16,7 +17,7 @@ if($error) {
|
||||
?>
|
||||
|
||||
<script>
|
||||
alert("<?php echo $msg; ?>");
|
||||
alert(<?php echo function_exists('get_js_safe_string') ? get_js_safe_string($alert_msg) : '""'; ?>);
|
||||
try {
|
||||
window.close();
|
||||
} catch(error) {
|
||||
@@ -69,4 +70,4 @@ setTimeout(function() {
|
||||
</noscript>
|
||||
|
||||
<?php
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
if (function_exists('check_request_origin')) check_request_origin(G5_BBS_URL);
|
||||
|
||||
$count = (isset($_POST['chk_wr_id']) && is_array($_POST['chk_wr_id'])) ? count($_POST['chk_wr_id']) : 0;
|
||||
$post_btn_submit = isset($_POST['btn_submit']) ? clean_xss_tags($_POST['btn_submit'], 1, 1) : '';
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
$mb_id = isset($_REQUEST['mb_id']) ? clean_xss_tags($_REQUEST['mb_id'], 1, 1) : '';
|
||||
$mb_id = isset($_REQUEST['mb_id']) ? addslashes(clean_xss_tags(stripslashes($_REQUEST['mb_id']), 1, 1)) : '';
|
||||
|
||||
$sql = " select mb_id, mb_email, mb_datetime from {$g5['member_table']} where mb_id = '{$mb_id}' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
+24
-1
@@ -9,6 +9,13 @@ if (!$config['cf_email_use'])
|
||||
if (!$is_member && $config['cf_formmail_is_member'])
|
||||
alert_close('회원만 이용하실 수 있습니다.');
|
||||
|
||||
// 발송 횟수 제한 (직접 POST 우회 방지)
|
||||
$sendmail_count = (int)get_session('ss_sendmail_count') + 1;
|
||||
set_session('ss_sendmail_count', $sendmail_count);
|
||||
if ($sendmail_count > 3) {
|
||||
alert_close('폼메일 발송 횟수를 초과하였습니다.');
|
||||
}
|
||||
|
||||
$email_enc = new str_encrypt();
|
||||
$to = $email_enc->decrypt($to);
|
||||
|
||||
@@ -40,7 +47,23 @@ if ($type) {
|
||||
else
|
||||
$mail_content = $content;
|
||||
|
||||
mailer($fnick, $fmail, $to, $subject, $mail_content, $type, $file);
|
||||
// 발신자 정보 서버측 강제 설정
|
||||
$reply_to_email = '';
|
||||
if ($is_member) {
|
||||
$fnick = (isset($member['mb_nick']) && $member['mb_nick']) ? $member['mb_nick'] : $member['mb_name'];
|
||||
$fmail = $member['mb_email'];
|
||||
} else {
|
||||
// 비회원: From을 관리자 이메일로 고정 (발신자 위장 방지)
|
||||
// 비회원이 입력한 이메일은 Reply-To로 설정하여 회신 기능 유지
|
||||
$user_email = get_email_address(trim($fmail));
|
||||
$fnick = strip_tags(trim($fnick));
|
||||
$fmail = $config['cf_admin_email'];
|
||||
if ($user_email) {
|
||||
$reply_to_email = $user_email;
|
||||
}
|
||||
}
|
||||
|
||||
mailer($fnick, $fmail, $to, $subject, $mail_content, $type, $file, '', '', $reply_to_email);
|
||||
|
||||
// 임시 첨부파일 삭제
|
||||
if(!empty($file)) {
|
||||
|
||||
+19
-8
@@ -76,16 +76,22 @@ if(isset($_POST['js']) && $_POST['js'] === "on") {
|
||||
}
|
||||
else
|
||||
{
|
||||
// 추천(찬성), 비추천(반대) 카운트 증가
|
||||
// 레이스 컨디션 방지: g5_board_good 테이블의 UNIQUE KEY(bo_table, wr_id, mb_id)를
|
||||
// 이용해 INSERT IGNORE를 먼저 수행하고, 성공한 경우에만 카운터를 증가시킨다.
|
||||
sql_query(" insert ignore into {$g5['board_good_table']} set bo_table = '{$bo_table}', wr_id = '{$wr_id}', mb_id = '{$member['mb_id']}', bg_flag = '{$good}', bg_datetime = '".G5_TIME_YMDHIS."' ");
|
||||
if (get_sql_affected_rows() <= 0) {
|
||||
$error = '이미 추천 또는 비추천 하신 글 입니다.';
|
||||
print_result($error, $count);
|
||||
}
|
||||
|
||||
// INSERT 성공 시에만 카운터 증가
|
||||
sql_query(" update {$g5['write_prefix']}{$bo_table} set wr_{$good} = wr_{$good} + 1 where wr_id = '{$wr_id}' ");
|
||||
// 내역 생성
|
||||
sql_query(" insert {$g5['board_good_table']} set bo_table = '{$bo_table}', wr_id = '{$wr_id}', mb_id = '{$member['mb_id']}', bg_flag = '{$good}', bg_datetime = '".G5_TIME_YMDHIS."' ");
|
||||
|
||||
$sql = " select wr_{$good} as count from {$g5['write_prefix']}{$bo_table} where wr_id = '$wr_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$count = $row['count'];
|
||||
|
||||
|
||||
run_event('bbs_increase_good_json', $bo_table, $wr_id, $good);
|
||||
|
||||
print_result($error, $count);
|
||||
@@ -140,10 +146,15 @@ if(isset($_POST['js']) && $_POST['js'] === "on") {
|
||||
}
|
||||
else
|
||||
{
|
||||
// 추천(찬성), 비추천(반대) 카운트 증가
|
||||
// 레이스 컨디션 방지: g5_board_good 테이블의 UNIQUE KEY(bo_table, wr_id, mb_id)를
|
||||
// 이용해 INSERT IGNORE를 먼저 수행하고, 성공한 경우에만 카운터를 증가시킨다.
|
||||
sql_query(" insert ignore into {$g5['board_good_table']} set bo_table = '{$bo_table}', wr_id = '{$wr_id}', mb_id = '{$member['mb_id']}', bg_flag = '{$good}', bg_datetime = '".G5_TIME_YMDHIS."' ");
|
||||
if (get_sql_affected_rows() <= 0) {
|
||||
alert('이미 추천 또는 비추천 하신 글 입니다.');
|
||||
}
|
||||
|
||||
// INSERT 성공 시에만 카운터 증가
|
||||
sql_query(" update {$g5['write_prefix']}{$bo_table} set wr_{$good} = wr_{$good} + 1 where wr_id = '{$wr_id}' ");
|
||||
// 내역 생성
|
||||
sql_query(" insert {$g5['board_good_table']} set bo_table = '{$bo_table}', wr_id = '{$wr_id}', mb_id = '{$member['mb_id']}', bg_flag = '{$good}', bg_datetime = '".G5_TIME_YMDHIS."' ");
|
||||
|
||||
if ($good == 'good')
|
||||
$status = '추천';
|
||||
@@ -151,7 +162,7 @@ if(isset($_POST['js']) && $_POST['js'] === "on") {
|
||||
$status = '비추천';
|
||||
|
||||
$href = get_pretty_url($bo_table, $wr_id);
|
||||
|
||||
|
||||
run_event('bbs_increase_good_html', $bo_table, $wr_id, $good, $href);
|
||||
|
||||
alert("이 글을 $status 하셨습니다.", '', false);
|
||||
|
||||
+90
-43
@@ -14,7 +14,8 @@ if ($board['bo_use_category']) {
|
||||
$category_option .= '>전체</a></li>';
|
||||
|
||||
$categories = explode('|', $board['bo_category_list']); // 구분자가 , 로 되어 있음
|
||||
for ($i=0; $i<count($categories); $i++) {
|
||||
$categories_cnt = count($categories);
|
||||
for ($i=0; $i<$categories_cnt; $i++) {
|
||||
$category = trim($categories[$i]);
|
||||
if ($category=='') continue;
|
||||
$category_option .= '<li><a href="'.(get_pretty_url($bo_table,'','sca='.urlencode($category))).'"';
|
||||
@@ -89,15 +90,31 @@ if (!$is_search_bbs) {
|
||||
$from_notice_idx = ($page - 1) * $page_rows;
|
||||
if($from_notice_idx < 0)
|
||||
$from_notice_idx = 0;
|
||||
$board_notice_count = count($arr_notice);
|
||||
|
||||
for ($k=0; $k<$board_notice_count; $k++) {
|
||||
if (trim($arr_notice[$k]) == '') continue;
|
||||
// 유효한 공지 wr_id만 수집 (정수화로 SQL injection 방지)
|
||||
$notice_ids_int = array();
|
||||
foreach ($arr_notice as $k_idx => $nid_raw) {
|
||||
$nid_int = (int) trim($nid_raw);
|
||||
if ($nid_int > 0) {
|
||||
$notice_ids_int[$k_idx] = $nid_int;
|
||||
}
|
||||
}
|
||||
|
||||
$row = sql_fetch(" select * from {$write_table} where wr_id = '{$arr_notice[$k]}' ");
|
||||
// N+1 쿼리 제거: 공지 전체를 단일 IN 쿼리로 일괄 조회
|
||||
$notice_rows_by_id = array();
|
||||
if (!empty($notice_ids_int)) {
|
||||
$sql = " select * from {$write_table} where wr_id in (" . implode(',', $notice_ids_int) . ") ";
|
||||
$result = sql_query($sql);
|
||||
while ($nrow = sql_fetch_array($result)) {
|
||||
$notice_rows_by_id[$nrow['wr_id']] = $nrow;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($row['wr_id']) || !$row['wr_id']) continue;
|
||||
// 원래 bo_notice 순서대로 처리 (페이징 로직의 $k 인덱스 의미 보존)
|
||||
foreach ($notice_ids_int as $k => $nid) {
|
||||
if (!isset($notice_rows_by_id[$nid])) continue;
|
||||
|
||||
$row = $notice_rows_by_id[$nid];
|
||||
$notice_array[] = $row['wr_id'];
|
||||
|
||||
if($k < $from_notice_idx) continue;
|
||||
@@ -106,7 +123,7 @@ if (!$is_search_bbs) {
|
||||
$list[$i]['is_notice'] = true;
|
||||
$list[$i]['list_content'] = $list[$i]['wr_content'];
|
||||
|
||||
// 비밀글인 경우 리스트에서 내용이 출력되지 않게 글 내용을 지웁니다.
|
||||
// 비밀글인 경우 리스트에서 내용이 출력되지 않게 글 내용을 지웁니다.
|
||||
if (strstr($list[$i]['wr_option'], "secret")) {
|
||||
$list[$i]['wr_content'] = '';
|
||||
}
|
||||
@@ -174,49 +191,79 @@ if (!$sst) {
|
||||
if(!$sst)
|
||||
$sst = "wr_num, wr_reply";
|
||||
|
||||
// 정렬 방향 화이트리스트
|
||||
$sod = preg_match("/^(asc|desc)$/i", $sod) ? $sod : '';
|
||||
|
||||
if ($sst) {
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
}
|
||||
|
||||
if ($is_search_bbs) {
|
||||
$sql = " select distinct wr_parent from {$write_table} where {$sql_search} {$sql_order} limit {$from_record}, $page_rows ";
|
||||
} else {
|
||||
$sql = " select * from {$write_table} where wr_is_comment = 0 ";
|
||||
if(!empty($notice_array))
|
||||
$sql .= " and wr_id not in (".implode(', ', $notice_array).") ";
|
||||
$sql .= " {$sql_order} limit {$from_record}, $page_rows ";
|
||||
// 페이지의 공지개수가 목록수 보다 작을 때만 실행
|
||||
$rows_to_process = array();
|
||||
if ($page_rows > 0) {
|
||||
if ($is_search_bbs) {
|
||||
// 1차: 검색 결과의 wr_parent ID 목록 조회
|
||||
$sql = " select distinct wr_parent from {$write_table} where {$sql_search} {$sql_order} limit {$from_record}, $page_rows ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$parent_ids_in_order = array();
|
||||
while ($id_row = sql_fetch_array($result)) {
|
||||
$pid = (int) $id_row['wr_parent'];
|
||||
if ($pid > 0) {
|
||||
$parent_ids_in_order[] = $pid;
|
||||
}
|
||||
}
|
||||
|
||||
// 2차: N+1 쿼리 제거 - 단일 IN 쿼리로 전체 행 일괄 조회
|
||||
if (!empty($parent_ids_in_order)) {
|
||||
$batch_sql = " select * from {$write_table} where wr_id in (" . implode(',', $parent_ids_in_order) . ") ";
|
||||
$batch_result = sql_query($batch_sql);
|
||||
|
||||
$rows_by_id = array();
|
||||
while ($br = sql_fetch_array($batch_result)) {
|
||||
$rows_by_id[$br['wr_id']] = $br;
|
||||
}
|
||||
|
||||
// DISTINCT 쿼리의 원래 정렬 순서대로 재구성
|
||||
foreach ($parent_ids_in_order as $pid) {
|
||||
if (isset($rows_by_id[$pid])) {
|
||||
$rows_to_process[] = $rows_by_id[$pid];
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$sql = " select * from {$write_table} where wr_is_comment = 0 ";
|
||||
if(!empty($notice_array))
|
||||
$sql .= " and wr_id not in (".implode(', ', $notice_array).") ";
|
||||
$sql .= " {$sql_order} limit {$from_record}, $page_rows ";
|
||||
|
||||
$result = sql_query($sql);
|
||||
while ($row = sql_fetch_array($result)) {
|
||||
$rows_to_process[] = $row;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 페이지의 공지개수가 목록수 보다 작을 때만 실행
|
||||
if($page_rows > 0) {
|
||||
$result = sql_query($sql);
|
||||
|
||||
$k = 0;
|
||||
|
||||
while ($row = sql_fetch_array($result))
|
||||
{
|
||||
// 검색일 경우 wr_id만 얻었으므로 다시 한행을 얻는다
|
||||
if ($is_search_bbs)
|
||||
$row = sql_fetch(" select * from {$write_table} where wr_id = '{$row['wr_parent']}' ");
|
||||
|
||||
$list[$i] = get_list($row, $board, $board_skin_url, G5_IS_MOBILE ? $board['bo_mobile_subject_len'] : $board['bo_subject_len']);
|
||||
if (strstr($sfl, 'subject')) {
|
||||
$list[$i]['subject'] = search_font($stx, $list[$i]['subject']);
|
||||
}
|
||||
$list[$i]['is_notice'] = false;
|
||||
$list[$i]['list_content'] = $list[$i]['wr_content'];
|
||||
|
||||
// 비밀글인 경우 리스트에서 내용이 출력되지 않게 글 내용을 지웁니다.
|
||||
if (strstr($list[$i]['wr_option'], "secret")) {
|
||||
$list[$i]['wr_content'] = '';
|
||||
}
|
||||
|
||||
$list_num = $total_count - ($page - 1) * $list_page_rows - $notice_count;
|
||||
$list[$i]['num'] = $list_num - $k;
|
||||
|
||||
$i++;
|
||||
$k++;
|
||||
$k = 0;
|
||||
foreach ($rows_to_process as $row)
|
||||
{
|
||||
$list[$i] = get_list($row, $board, $board_skin_url, G5_IS_MOBILE ? $board['bo_mobile_subject_len'] : $board['bo_subject_len']);
|
||||
if (strstr($sfl, 'subject')) {
|
||||
$list[$i]['subject'] = search_font($stx, $list[$i]['subject']);
|
||||
}
|
||||
$list[$i]['is_notice'] = false;
|
||||
$list[$i]['list_content'] = $list[$i]['wr_content'];
|
||||
|
||||
// 비밀글인 경우 리스트에서 내용이 출력되지 않게 글 내용을 지웁니다.
|
||||
if (strstr($list[$i]['wr_option'], "secret")) {
|
||||
$list[$i]['wr_content'] = '';
|
||||
}
|
||||
|
||||
$list_num = $total_count - ($page - 1) * $list_page_rows - $notice_count;
|
||||
$list[$i]['num'] = $list_num - $k;
|
||||
|
||||
$i++;
|
||||
$k++;
|
||||
}
|
||||
|
||||
g5_latest_cache_data($board['bo_table'], $list);
|
||||
|
||||
+27
-4
@@ -54,7 +54,7 @@ if ($mb['mb_leave_date'] && $mb['mb_leave_date'] <= date("Ymd", G5_SERVER_TIME))
|
||||
|
||||
// 메일인증 설정이 되어 있다면
|
||||
if ( is_use_email_certify() && !preg_match("/[1-9]/", $mb['mb_email_certify'])) {
|
||||
$ckey = md5($mb['mb_ip'].$mb['mb_datetime']);
|
||||
$ckey = function_exists('get_email_cert_key') ? get_email_cert_key($mb_id, $mb['mb_datetime']) : md5($mb['mb_ip'].$mb['mb_datetime']);
|
||||
confirm("{$mb['mb_email']} 메일로 메일인증을 받으셔야 로그인 가능합니다. 다른 메일주소로 변경하여 인증하시려면 취소를 클릭하시기 바랍니다.", G5_URL, G5_BBS_URL.'/register_email.php?mb_id='.$mb_id.'&ckey='.$ckey);
|
||||
}
|
||||
|
||||
@@ -90,10 +90,33 @@ if($config['cf_use_point']) {
|
||||
if (isset($auto_login) && $auto_login) {
|
||||
// 3.27
|
||||
// 자동로그인 ---------------------------
|
||||
// 쿠키 한달간 저장
|
||||
$key = md5($_SERVER['SERVER_ADDR'] . $_SERVER['SERVER_SOFTWARE'] . $_SERVER['HTTP_USER_AGENT'] . $mb['mb_password']);
|
||||
// 예측 불가능한 랜덤 토큰을 생성하여 g5_member_auto_login 테이블에 저장.
|
||||
// 다중 디바이스 지원: 디바이스마다 별도의 토큰 행이 생성되며 서로 독립적으로 동작.
|
||||
|
||||
$auto_token = get_random_token_string(32); // 64자 hex - 쿠키에는 원본
|
||||
$auto_token_hash = hash('sha256', $auto_token); // 64자 hex - DB에는 해시
|
||||
$auto_ua = isset($_SERVER['HTTP_USER_AGENT']) ? substr($_SERVER['HTTP_USER_AGENT'], 0, 255) : '';
|
||||
$auto_ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '';
|
||||
$auto_now = G5_TIME_YMDHIS;
|
||||
$auto_expire = date('Y-m-d H:i:s', G5_SERVER_TIME + 86400 * 31);
|
||||
|
||||
// 만료된 토큰 정리 (해당 회원 한정)
|
||||
sql_query(" delete from {$g5['member_auto_login_table']}
|
||||
where mb_id = '{$mb['mb_id']}'
|
||||
and al_expire < '{$auto_now}' ");
|
||||
|
||||
// 새 토큰 INSERT (해시값만 저장)
|
||||
sql_query(" insert into {$g5['member_auto_login_table']}
|
||||
set mb_id = '{$mb['mb_id']}',
|
||||
al_token = '{$auto_token_hash}',
|
||||
al_user_agent = '".addslashes($auto_ua)."',
|
||||
al_ip = '".addslashes($auto_ip)."',
|
||||
al_created = '{$auto_now}',
|
||||
al_last_used = '{$auto_now}',
|
||||
al_expire = '{$auto_expire}' ");
|
||||
|
||||
set_cookie('ck_mb_id', $mb['mb_id'], 86400 * 31);
|
||||
set_cookie('ck_auto', $key, 86400 * 31);
|
||||
set_cookie('ck_auto', $auto_token, 86400 * 31); // 쿠키에는 원본 토큰
|
||||
// 자동로그인 end ---------------------------
|
||||
} else {
|
||||
set_cookie('ck_mb_id', '', 0);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user