Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1eee11e433 | ||
|
|
a71192a63b | ||
|
|
633ff46596 | ||
|
|
8a1f350d67 | ||
|
|
ef364e1430 | ||
|
|
f6a6a5622d | ||
|
|
63d6f7c43f | ||
|
|
6e101c4647 | ||
|
|
fa792efacb | ||
|
|
66f6a75a10 | ||
|
|
de2502fad5 | ||
|
|
54171e1903 | ||
|
|
44172c1d1f | ||
|
|
41945c62f8 | ||
|
|
37d0dcb48f | ||
|
|
002e43e5fb | ||
|
|
9510aa9cf1 | ||
|
|
6a3c2b1002 | ||
|
|
f69b66dced | ||
|
|
cb1fadba4c | ||
|
|
5da91ab73e | ||
|
|
d5b541724f | ||
|
|
9758007f91 | ||
|
|
9d5f8e137f | ||
|
|
f1da95f055 | ||
|
|
9602f3c7a7 | ||
|
|
d357f5a0a4 | ||
|
|
a9eab8d86a | ||
|
|
9191199ef4 | ||
|
|
2556753530 | ||
|
|
57983a6dbc | ||
|
|
327e7ba7ba | ||
|
|
67415cf8d3 | ||
|
|
aa88ff68a1 | ||
|
|
07a0245f85 | ||
|
|
d3de613a8c | ||
|
|
bb1f69e86c | ||
|
|
dc4c2a79d9 | ||
|
|
38451a7d3d | ||
|
|
87d11d5c78 | ||
|
|
c1bbce1114 | ||
|
|
61576d3e87 | ||
|
|
c9100d2e38 | ||
|
|
7714153faf | ||
|
|
654fd7ba68 | ||
|
|
ea9f618de8 | ||
|
|
eea5a2477b | ||
|
|
8cc101b617 | ||
|
|
316d3542a9 | ||
|
|
c2da219473 | ||
|
|
6874e767c2 | ||
|
|
5a91d37365 | ||
|
|
f9c972d866 | ||
|
|
ada8f28aae | ||
|
|
11afc52b84 | ||
|
|
d9c3f0e66c | ||
|
|
49da5c33df | ||
|
|
29250f264a | ||
|
|
df00641290 | ||
|
|
a05a1403f5 | ||
|
|
c5817594d0 | ||
|
|
68a9e45337 | ||
|
|
b8da0f0890 | ||
|
|
62ff45b31f | ||
|
|
918ad48675 | ||
|
|
e5128bf02e | ||
|
|
0a0d6e7228 | ||
|
|
69180914f8 | ||
|
|
5552fda906 | ||
|
|
13759821fe | ||
|
|
2e7843da56 | ||
|
|
33ee904f60 | ||
|
|
3e8bedb1e9 | ||
|
|
4f3ad37bf4 | ||
|
|
af92ea064e | ||
|
|
dab5abb89a | ||
|
|
8893b112fa | ||
|
|
d65fa99e3c | ||
|
|
29381da2ce | ||
|
|
d96f47f93d | ||
|
|
830994b637 | ||
|
|
0d586e2101 | ||
|
|
5e6549a22c | ||
|
|
ab204cfa59 | ||
|
|
3ca77a38fb | ||
|
|
67051c74a8 | ||
|
|
2a0bf12e65 | ||
|
|
dfa16adf31 | ||
|
|
96b30e0df6 | ||
|
|
ef99a886cc | ||
|
|
20eb993757 | ||
|
|
3474be175d | ||
|
|
532bf6f0f4 | ||
|
|
c4c1e50f68 | ||
|
|
7754e12194 | ||
|
|
287d68790f | ||
|
|
7d396b1749 | ||
|
|
d666e3467f | ||
|
|
d4c158cfa4 | ||
|
|
f1af936c7d | ||
|
|
72d52b594c | ||
|
|
5622b38c17 | ||
|
|
cef3a48ff1 | ||
|
|
c6b58bb16b | ||
|
|
14ffe72574 | ||
|
|
02baf1589f | ||
|
|
9a1067862a | ||
|
|
07f848e1c7 | ||
|
|
80846ac637 | ||
|
|
62c0803cf5 | ||
|
|
08df872863 | ||
|
|
ca30e27b27 | ||
|
|
56615a5e9e | ||
|
|
9c44d234ed | ||
|
|
e03e01d410 | ||
|
|
940e701fa4 | ||
|
|
031f8b4ef9 | ||
|
|
ed6b7f3326 | ||
|
|
0ded1df66d | ||
|
|
f4dfbacf03 | ||
|
|
3fd8740c92 | ||
|
|
68dc0bd4ec | ||
|
|
cc96048dfa | ||
|
|
6697327265 | ||
|
|
a301d3e1f0 | ||
|
|
2c0e05bbcc | ||
|
|
92c1052cf5 | ||
|
|
c4763a64d8 | ||
|
|
02e0996eb4 | ||
|
|
82648dcbfc | ||
|
|
61a0236938 | ||
|
|
712172a0ea | ||
|
|
d0eadcb12e | ||
|
|
f38baea729 | ||
|
|
6048a8a1c5 | ||
|
|
b84a6114f4 | ||
|
|
b3ea5f19a8 | ||
|
|
b52a1f4da4 | ||
|
|
ce89cba2c7 | ||
|
|
c3634c05f7 | ||
|
|
470d65d92a | ||
|
|
2aff3cd491 | ||
|
|
84669cb47f | ||
|
|
baa114c471 | ||
|
|
2bfd995e49 | ||
|
|
1e72d7e81c | ||
|
|
79b0066ec1 | ||
|
|
47e243c0ad | ||
|
|
bf6678e036 | ||
|
|
aba7d75de6 | ||
|
|
474fc8f9a9 | ||
|
|
a0eb804918 | ||
|
|
0d9c773d22 | ||
|
|
6705d014f9 | ||
|
|
985546fbad | ||
|
|
fa6aa881de | ||
|
|
06750e248b | ||
|
|
c1c4089883 | ||
|
|
248cb2b173 | ||
|
|
8d912e3511 | ||
|
|
c67118f374 | ||
|
|
15f2037790 | ||
|
|
cb6b39cb60 | ||
|
|
73a5f4cc47 | ||
|
|
5f910f192e | ||
|
|
bc2c939d72 | ||
|
|
b7c557f44e | ||
|
|
1ff5df8215 | ||
|
|
72d03f305c | ||
|
|
1ec9a0ee12 | ||
|
|
a061d6c863 | ||
|
|
4f2f725de8 | ||
|
|
fae53d3cd5 | ||
|
|
1fc3a343c2 | ||
|
|
5e1ab9c1e7 | ||
|
|
5605b539f4 | ||
|
|
a8baa8dd7d | ||
|
|
16051b3049 | ||
|
|
db1d56e07b | ||
|
|
4455f7d3c9 | ||
|
|
398967f804 | ||
|
|
ee75b32b3c | ||
|
|
c869f29f0d | ||
|
|
c95168fb0c | ||
|
|
b8ffd99362 | ||
|
|
64e1fbe786 | ||
|
|
91715ff830 | ||
|
|
1fb9e28510 | ||
|
|
babbc9afdb | ||
|
|
04030f9274 | ||
|
|
3085703c61 | ||
|
|
20dc211a82 | ||
|
|
a773839338 | ||
|
|
84b22909c5 | ||
|
|
28bfcea9c2 | ||
|
|
8cd1df0f43 | ||
|
|
cf2a8ab282 | ||
|
|
941f3e135a | ||
|
|
4b9b1af01e | ||
|
|
41d48891f4 | ||
|
|
616f5b8d46 | ||
|
|
a96460948c | ||
|
|
337ee4e68f | ||
|
|
7af4888458 | ||
|
|
fdc695d08c | ||
|
|
9fe34dae1d | ||
|
|
4364058313 | ||
|
|
0642c48106 | ||
|
|
d74c7b24bf | ||
|
|
fec5569c71 | ||
|
|
876534a440 | ||
|
|
5d4ba1030e | ||
|
|
e43e424d80 | ||
|
|
5036254b69 | ||
|
|
2ae4046d29 | ||
|
|
ccdbdebdec | ||
|
|
1c4465a692 | ||
|
|
bcbabf50f2 | ||
|
|
3da5145bef | ||
|
|
6868cee8d1 | ||
|
|
870dcec68d | ||
|
|
4735d62770 | ||
|
|
2c88ef6d13 | ||
|
|
12ce06c2d2 | ||
|
|
3a7d06b19e | ||
|
|
641656047d | ||
|
|
3becc03d23 | ||
|
|
6eaa6ee22a | ||
|
|
a8524eb070 | ||
|
|
db9b4ffd50 | ||
|
|
9416b7dd9a | ||
|
|
1634065870 | ||
|
|
14af11d0fa | ||
|
|
ec3fdce5c7 | ||
|
|
79ce9ec984 | ||
|
|
8eb1d46be1 | ||
|
|
cbdaccbdec | ||
|
|
ff6b160774 | ||
|
|
f96ff445b9 | ||
|
|
6e684e80f2 | ||
|
|
ffc8706a76 | ||
|
|
8ec09b0059 | ||
|
|
af64737b63 | ||
|
|
81792d2595 | ||
|
|
bbbc568db8 | ||
|
|
4eba618a82 | ||
|
|
accf20044f | ||
|
|
aaadf1487d | ||
|
|
44798a4ef5 | ||
|
|
992641dfad | ||
|
|
451ece8d8c | ||
|
|
bcda18cbd5 | ||
|
|
2a8f5f6035 | ||
|
|
f4821aa49a | ||
|
|
476b06792a | ||
|
|
9489254bbf | ||
|
|
8bcac60bda | ||
|
|
fe03163cce | ||
|
|
8ecc5ba241 | ||
|
|
4204f7970e | ||
|
|
9cd2841006 | ||
|
|
4b92543c61 | ||
|
|
b01adc51c7 | ||
|
|
bfdc48b021 | ||
|
|
10b3a9c841 | ||
|
|
3f27a5e32d | ||
|
|
a904c5c634 | ||
|
|
d603f2d5b3 | ||
|
|
275f7e5d8a | ||
|
|
2595a7a45d | ||
|
|
cb346b08c1 | ||
|
|
3db2dc8be3 | ||
|
|
b3451f1cc2 | ||
|
|
b557483e1d | ||
|
|
d28be44108 | ||
|
|
f61d6cc09a | ||
|
|
6fa0f0e704 | ||
|
|
66039a4b37 | ||
|
|
aca4733b12 | ||
|
|
85b97f4b29 | ||
|
|
724a4e4bf6 | ||
|
|
9cf8804611 | ||
|
|
8f3893bb43 | ||
|
|
7617aba611 | ||
|
|
d99641d122 | ||
|
|
7516424989 | ||
|
|
1cb12d9f2c | ||
|
|
dbcb6a2cb6 | ||
|
|
18c42a648e | ||
|
|
f5e2252997 | ||
|
|
6fd339174e | ||
|
|
1891b5eb38 | ||
|
|
3fcc1f2d5f | ||
|
|
4958cc9e35 | ||
|
|
1750e957d2 | ||
|
|
abfeee5e92 | ||
|
|
c3272f9170 | ||
|
|
df176c6ad9 | ||
|
|
22bfc5e9bb | ||
|
|
4e0cd0d911 | ||
|
|
25091a201b | ||
|
|
3706ef99d3 | ||
|
|
69a4998fce | ||
|
|
513976b5a2 | ||
|
|
97a8352117 | ||
|
|
21dc36199f | ||
|
|
0a18368759 | ||
|
|
6d9db83789 | ||
|
|
3e53cd8ff6 | ||
|
|
816a32d5c9 | ||
|
|
529b8a1004 | ||
|
|
62d0bf5c4e | ||
|
|
4c6b833f73 | ||
|
|
21532eb9bf | ||
|
|
cd50af93fd | ||
|
|
589b7f4e39 | ||
|
|
9c8f7128f2 | ||
|
|
a93008d392 | ||
|
|
d3561623aa | ||
|
|
311e879563 | ||
|
|
9932b99a51 | ||
|
|
5c9ed36bf2 | ||
|
|
dbc8e1676a | ||
|
|
749345e502 | ||
|
|
7c8a21ecc0 | ||
|
|
8751ab122a | ||
|
|
0f3e6125b5 | ||
|
|
a21d02f4c5 | ||
|
|
2f9fb355e3 | ||
|
|
8074bce274 | ||
|
|
85dbbe946a | ||
|
|
1f2e79b188 | ||
|
|
27434107e8 | ||
|
|
f1a303e445 | ||
|
|
ba062ca5b6 | ||
|
|
34774f0fc3 | ||
|
|
26b22ac9ca | ||
|
|
9e4a8a95b0 | ||
|
|
1bca642b33 | ||
|
|
3a59bca369 | ||
|
|
5ad2307175 | ||
|
|
25b3d8f6ed | ||
|
|
0d02afd712 | ||
|
|
78d5dce761 | ||
|
|
45d5404520 | ||
|
|
1e6710a55b | ||
|
|
463ca06a21 | ||
|
|
71f58f3108 | ||
|
|
a6e302ff84 | ||
|
|
0c275d0907 | ||
|
|
fa7d0bc717 | ||
|
|
95492a5cd8 | ||
|
|
58dc48d3ea | ||
|
|
281bb5427c | ||
|
|
0577882c6c | ||
|
|
be758d57a5 | ||
|
|
3cee6ede91 | ||
|
|
5d86287069 | ||
|
|
1a12b3e52b | ||
|
|
929183b3e3 | ||
|
|
c1a45a1bec | ||
|
|
444c6d88c2 | ||
|
|
2366e8ebfb | ||
|
|
a0bfc2cf6a | ||
|
|
22ea3d39c1 | ||
|
|
d4f4612b22 | ||
|
|
e061ad852b | ||
|
|
4883fb18ae | ||
|
|
32e9797fef | ||
|
|
bafa1c43bf | ||
|
|
d8b6297579 | ||
|
|
251dfc26e8 | ||
|
|
958b9342b5 | ||
|
|
adc8e94774 | ||
|
|
26857a8d50 |
@@ -0,0 +1,3 @@
|
||||
# Gnuboard5 Security Policy
|
||||
|
||||
Please ask [https://sir.kr/security/.](https://sir.kr/co_qa)
|
||||
@@ -87,6 +87,7 @@ if (!empty($_COOKIE['g5_admin_btn_gnb'])) {
|
||||
?>
|
||||
|
||||
<script>
|
||||
var g5_admin_csrf_token_key = "<?php echo (function_exists('admin_csrf_token_key')) ? admin_csrf_token_key() : ''; ?>";
|
||||
var tempX = 0;
|
||||
var tempY = 0;
|
||||
|
||||
|
||||
+112
-6
@@ -1,11 +1,115 @@
|
||||
function check_all(f)
|
||||
{
|
||||
var chk = document.getElementsByName("chk[]");
|
||||
/** 공통 UI 모듈 */
|
||||
window.CommonUI = {
|
||||
bindTabs(tabSelector, contentSelector, options = {}) {
|
||||
const tabs = document.querySelectorAll(tabSelector);
|
||||
const contents = document.querySelectorAll(contentSelector);
|
||||
|
||||
for (i=0; i<chk.length; i++)
|
||||
chk[i].checked = f.chkall.checked;
|
||||
tabs.forEach(tab => {
|
||||
tab.addEventListener('click', () => {
|
||||
const tabName = tab.dataset.tab;
|
||||
const target = document.getElementById(`tab-${tabName}`);
|
||||
|
||||
tabs.forEach(t => t.classList.remove('active'));
|
||||
tab.classList.add('active');
|
||||
|
||||
contents.forEach(c => c.classList.add('is-hidden'));
|
||||
|
||||
if (target) target.classList.remove('is-hidden');
|
||||
|
||||
options.onChange?.(tabName, target);
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function setHtml(el, markup) {
|
||||
if (!el) return;
|
||||
if (markup == null || markup === '') {
|
||||
el.textContent = '';
|
||||
return;
|
||||
}
|
||||
const range = document.createRange();
|
||||
range.selectNodeContents(el);
|
||||
el.replaceChildren(range.createContextualFragment(markup));
|
||||
}
|
||||
|
||||
/** 팝업 관리 모듈 */
|
||||
window.PopupManager = {
|
||||
open(id, options = {}) {
|
||||
const el = document.getElementById(id);
|
||||
if (el) {
|
||||
el.classList.remove('is-hidden');
|
||||
this.bindOutsideClickClose(id);
|
||||
|
||||
if (!options.disableOutsideClose) {
|
||||
this.bindOutsideClickClose(id);
|
||||
} else {
|
||||
this.unbindOutsideClickClose(id);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
close(id) {
|
||||
const el = document.getElementById(id);
|
||||
if (el) el.classList.add('is-hidden');
|
||||
},
|
||||
|
||||
toggle(id) {
|
||||
const el = document.getElementById(id);
|
||||
if (el) el.classList.toggle('is-hidden');
|
||||
},
|
||||
|
||||
bindOutsideClickClose(id) {
|
||||
const el = document.getElementById(id);
|
||||
if (!el) return;
|
||||
el.onclick = () => this.close(id);
|
||||
},
|
||||
|
||||
unbindOutsideClickClose(id) {
|
||||
const el = document.getElementById(id);
|
||||
if (!el) return;
|
||||
el.onclick = null;
|
||||
},
|
||||
|
||||
/**
|
||||
* 팝업 콘텐츠 렌더링 (타이틀, 바디, 푸터 구성)
|
||||
* @param {string} title - 팝업 제목
|
||||
* @param {string} body - 팝업 본문 HTML
|
||||
* @param {string} [footer] - 푸터 HTML
|
||||
* @param {object} [options] - 팝업 열기 옵션
|
||||
*/
|
||||
render(title, body, footer = '', options = {}) {
|
||||
const titleEl = document.getElementById('popupTitle');
|
||||
const bodyEl = document.getElementById('popupBody');
|
||||
const footerEl = document.getElementById('popupFooter');
|
||||
|
||||
if (titleEl) titleEl.textContent = title;
|
||||
if (bodyEl) setHtml(bodyEl, body);
|
||||
if (footerEl) setHtml(footerEl, footer);
|
||||
|
||||
this.open('popupOverlay', options);
|
||||
}
|
||||
};
|
||||
|
||||
/** 형식 체크 */
|
||||
function check_all(target) {
|
||||
const chkboxes = document.getElementsByName("chk[]");
|
||||
let chkall;
|
||||
|
||||
if (target && target.tagName === "FORM") {
|
||||
chkall = target.querySelector('input[name="chkall"]');
|
||||
} else if (target && target.type === "checkbox") {
|
||||
chkall = target;
|
||||
}
|
||||
|
||||
if (!chkall) return;
|
||||
|
||||
for (const checkbox of chkboxes) {
|
||||
checkbox.checked = chkall.checked;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function btn_check(f, act)
|
||||
{
|
||||
if (act == "update") // 선택수정
|
||||
@@ -83,11 +187,13 @@ function delete_confirm2(msg)
|
||||
|
||||
function get_ajax_token()
|
||||
{
|
||||
var token = "";
|
||||
var token = "",
|
||||
admin_csrf_token_key = (typeof g5_admin_csrf_token_key !== "undefined") ? g5_admin_csrf_token_key : "";
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: g5_admin_url+"/ajax.token.php",
|
||||
data : {admin_csrf_token_key:admin_csrf_token_key},
|
||||
cache: false,
|
||||
async: false,
|
||||
dataType: "json",
|
||||
|
||||
+41
-7
@@ -421,6 +421,16 @@ function get_sanitize_input($s, $is_html = false)
|
||||
return $s;
|
||||
}
|
||||
|
||||
function domain_mail_host($is_at=true){
|
||||
list($domain_host,) = explode(':', $_SERVER['HTTP_HOST']);
|
||||
|
||||
if ('www.' === substr($domain_host, 0, 4)) {
|
||||
$domain_host = substr($domain_host, 4);
|
||||
}
|
||||
|
||||
return $is_at ? '@'.$domain_host : $domain_host;
|
||||
}
|
||||
|
||||
function check_log_folder($log_path, $is_delete = true)
|
||||
{
|
||||
|
||||
@@ -481,6 +491,18 @@ function check_admin_token()
|
||||
return true;
|
||||
}
|
||||
|
||||
function admin_csrf_token_key($is_must=0){
|
||||
global $member;
|
||||
|
||||
$key = '';
|
||||
|
||||
if($is_must || !((isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'))){
|
||||
$key = md5((isset($_SERVER['SERVER_SOFTWARE']) ? $_SERVER['SERVER_SOFTWARE'] : '').(defined('G5_TOKEN_ENCRYPTION_KEY') ? G5_TOKEN_ENCRYPTION_KEY : '').$member['mb_id'].$_SERVER['DOCUMENT_ROOT']);
|
||||
}
|
||||
|
||||
return run_replace('admin_csrf_token_key', $key, $is_must);
|
||||
}
|
||||
|
||||
// 관리자 페이지 referer 체크
|
||||
function admin_referer_check($return = false)
|
||||
{
|
||||
@@ -532,9 +554,18 @@ function admin_check_xss_params($params)
|
||||
|
||||
if (is_array($value)) {
|
||||
admin_check_xss_params($value);
|
||||
} else if ((preg_match('/<\s?[^\>]*\/?\s?>/i', $value) && (preg_match('/script.*?\/script/ius', $value) || preg_match('/[onload|onerror]=.*/ius', $value))) || preg_match('/^(?=.*token\()(?=.*xmlhttprequest\()(?=.*send\().*$/im', $value) || (preg_match('/[onload|onerror|focus]=.*/ius', $value) && preg_match('/(eval|expression|exec|prompt)(\s*)\((.*)\)/ius', $value))) {
|
||||
} else if (
|
||||
(preg_match('/<\s?[^\>]*\/?\s?>/i', $value) && (preg_match('/script.*?\/script/ius', $value) || preg_match('/on[a-z]+=*/ius', $value))) || preg_match('/^(?=.*token\()(?=.*xmlhttprequest\()(?=.*send\().*$/im', $value) ||
|
||||
(preg_match('/(on[a-z]+|focus)=.*/ius', $value) && preg_match('/(eval|atob|fetch|expression|exec|prompt)(\s*)\((.*)\)/ius', $value))) {
|
||||
alert('요청 쿼리에 잘못된 스크립트문장이 있습니다.\\nXSS 공격일수도 있습니다.', G5_URL);
|
||||
die();
|
||||
} else if (preg_match('/atob\s*\(\s*[\'"]?([a-zA-Z0-9+\/=]+)[\'"]?\s*\)/ius', $value, $matches)) {
|
||||
$decoded = base64_decode($matches[1], true);
|
||||
if ($decoded && preg_match('/(eval|fetch|script|alert|settimeout|setinterval)/ius', $decoded)) {
|
||||
// error_log("Base64 XSS 시도 감지: key=$key, decoded=$decoded, IP=" . $_SERVER['REMOTE_ADDR']);
|
||||
alert('Base64로 인코딩된 위험한 스크립트가 발견되었습니다.', G5_URL);
|
||||
die();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -595,13 +626,12 @@ if (!$member['mb_id']) {
|
||||
}
|
||||
}
|
||||
|
||||
// 관리자의 아이피, 브라우저와 다르다면 세션을 끊고 관리자에게 메일을 보낸다.
|
||||
$admin_key = md5($member['mb_datetime'] . get_real_client_ip() . $_SERVER['HTTP_USER_AGENT']);
|
||||
if (get_session('ss_mb_key') !== $admin_key) {
|
||||
|
||||
// 관리자의 클라이언트를 검증하여 일치하지 않으면 세션을 끊고 관리자에게 메일을 보낸다.
|
||||
if (!verify_mb_key($member)) {
|
||||
session_destroy();
|
||||
|
||||
include_once G5_LIB_PATH . '/mailer.lib.php';
|
||||
|
||||
// 메일 알림
|
||||
mailer($member['mb_nick'], $member['mb_email'], $member['mb_email'], 'XSS 공격 알림', $_SERVER['REMOTE_ADDR'] . ' 아이피로 XSS 공격이 있었습니다.<br><br>관리자 권한을 탈취하려는 접근이므로 주의하시기 바랍니다.<br><br>해당 아이피는 차단하시고 의심되는 게시물이 있는지 확인하시기 바랍니다.' . G5_URL, 0);
|
||||
|
||||
@@ -663,5 +693,9 @@ if (isset($_REQUEST) && $_REQUEST) {
|
||||
}
|
||||
}
|
||||
|
||||
// 관리자에서는 추가 스크립트는 사용하지 않는다.
|
||||
//$config['cf_add_script'] = '';
|
||||
// 관리자에서는 추가 스크립트와 추가 매타태그, 방문자분석 스크립트가 실행되지 않게 빈값으로 합니다.
|
||||
if (run_replace('safe_admin_add_script_boolean', false) === false) {
|
||||
$config['cf_analytics'] = '';
|
||||
$config['cf_add_script'] = '';
|
||||
$config['cf_add_meta'] = '';
|
||||
}
|
||||
@@ -6,11 +6,13 @@ $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),
|
||||
array('100910', '캡챠파일 일괄삭제', G5_ADMIN_URL . '/captcha_file_delete.php', 'cf_captcha', 1),
|
||||
array('100920', '썸네일파일 일괄삭제', G5_ADMIN_URL . '/thumbnail_file_delete.php', 'cf_thumbnail', 1),
|
||||
array('100930', '회원관리파일 일괄삭제', G5_ADMIN_URL . '/member_list_file_delete.php', 'cf_memberlist', 1),
|
||||
array('100500', 'phpinfo()', G5_ADMIN_URL . '/phpinfo.php', 'cf_phpinfo')
|
||||
);
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
$menu['menu200'] = array(
|
||||
array('200000', '회원관리', G5_ADMIN_URL . '/member_list.php', 'member'),
|
||||
array('200100', '회원관리', G5_ADMIN_URL . '/member_list.php', 'mb_list'),
|
||||
array('200400', '회원관리파일', G5_ADMIN_URL . '/member_list_exel.php', 'mb_list'),
|
||||
array('200300', '회원메일발송', G5_ADMIN_URL . '/mail_list.php', 'mb_mail'),
|
||||
array('200800', '접속자집계', G5_ADMIN_URL . '/visit_list.php', 'mb_visit', 1),
|
||||
array('200810', '접속자검색', G5_ADMIN_URL . '/visit_search.php', 'mb_search', 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', '재입고SMS알림', G5_ADMIN_URL . '/shop_admin/itemstocksms.php', 'sst_stock_sms', 1),
|
||||
array('500400', '재입고알림', 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),
|
||||
|
||||
+19
-3
@@ -5,7 +5,7 @@ if (!defined('_GNUBOARD_')) {
|
||||
|
||||
// 그누보드5.4.5.5 버전과 영카트5.4.5.5.1 버전이 통합됨에 따라 그누보드 버전만 표시
|
||||
// $print_version = defined('G5_YOUNGCART_VER') ? 'YoungCart Version '.G5_YOUNGCART_VER : 'Version '.G5_GNUBOARD_VER;
|
||||
$print_version = 'Version ' . G5_GNUBOARD_VER;
|
||||
$print_version = ($is_admin == 'super') ? 'Version ' . G5_GNUBOARD_VER : '';
|
||||
?>
|
||||
|
||||
<noscript>
|
||||
@@ -14,7 +14,6 @@ $print_version = 'Version ' . G5_GNUBOARD_VER;
|
||||
<strong>자바스크립트를 사용하지 않음</strong>으로 설정하신 경우는 수정이나 삭제시 별도의 경고창이 나오지 않으므로 이점 주의하시기 바랍니다.
|
||||
</p>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
<footer id="ft">
|
||||
<p>
|
||||
@@ -22,8 +21,25 @@ $print_version = 'Version ' . G5_GNUBOARD_VER;
|
||||
<button type="button" class="scroll_top"><span class="top_img"></span><span class="top_txt">TOP</span></button>
|
||||
</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<!-- 공통 레이어 팝업 컨테이너 -->
|
||||
<div id="adminPopupContainer">
|
||||
<div id="popupOverlay" class="popup-overlay is-hidden" onclick="PopupManager.close('popupOverlay')">
|
||||
<div class="popup-content" onclick="event.stopPropagation()">
|
||||
<div class="popup-header">
|
||||
<strong id="popupTitle" class="popup-title"></strong>
|
||||
<button type="button" class="popup-close-btn" onclick="PopupManager.close('popupOverlay')">
|
||||
<i class="fa fa-close"></i><span class="sound_only">팝업 닫기</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="popup-body" id="popupBody">
|
||||
<!-- 동적으로 내용 주입 -->
|
||||
</div>
|
||||
<div class="popup-footer" id="popupFooter">
|
||||
<!-- 버튼 등 동적으로 -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -3,6 +3,12 @@ require_once './_common.php';
|
||||
|
||||
set_session('ss_admin_token', '');
|
||||
|
||||
$admin_csrf_token_key = isset($_POST['admin_csrf_token_key']) ? $_POST['admin_csrf_token_key'] : '';
|
||||
|
||||
if(function_exists('admin_csrf_token_key') && $admin_csrf_token_key !== admin_csrf_token_key(1)){
|
||||
die(json_encode(array('error' => '토큰키 에러!', 'url' => G5_URL)));
|
||||
}
|
||||
|
||||
$error = admin_referer_check(true);
|
||||
if ($error) {
|
||||
die(json_encode(array('error' => $error, 'url' => G5_URL)));
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
<?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');
|
||||
@@ -0,0 +1,300 @@
|
||||
<?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 } ?>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?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);
|
||||
+3
-2
@@ -7,12 +7,13 @@ auth_check_menu($auth, $sub_menu, 'w');
|
||||
$g5['title'] = '게시판 복사';
|
||||
require_once G5_PATH . '/head.sub.php';
|
||||
|
||||
$bo_table = $_REQUEST['bo_table'];
|
||||
if (empty($bo_table)) {
|
||||
alert_close("정상적인 방법으로 이용해주세요.");
|
||||
}
|
||||
?>
|
||||
|
||||
<script>
|
||||
var g5_admin_csrf_token_key = "<?php echo (function_exists('admin_csrf_token_key')) ? admin_csrf_token_key() : ''; ?>";
|
||||
</script>
|
||||
<script src="<?php echo G5_ADMIN_URL ?>/admin.js?ver=<?php echo G5_JS_VER; ?>"></script>
|
||||
|
||||
<div class="new_win">
|
||||
|
||||
@@ -8,7 +8,7 @@ auth_check_menu($auth, $sub_menu, 'w');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$bo_table = isset($_POST['bo_table']) ? $_POST['bo_table'] : null;
|
||||
$bo_table = isset($_POST['bo_table']) ? substr(preg_replace('/[^a-z0-9_]/i', '', $_POST['bo_table']), 0, 20) : null;
|
||||
$target_table = isset($_POST['target_table']) ? trim($_POST['target_table']) : '';
|
||||
$target_subject = isset($_POST['target_subject']) ? trim($_POST['target_subject']) : '';
|
||||
|
||||
@@ -24,6 +24,8 @@ if (!preg_match('/[A-Za-z0-9_]{1,20}/', $target_table)) {
|
||||
alert('게시판 TABLE명은 공백없이 영문자, 숫자, _ 만 사용 가능합니다. (20자 이내)');
|
||||
}
|
||||
|
||||
$target_table = substr(preg_replace('/[^a-z0-9_]/i', '', $target_table), 0, 20);
|
||||
|
||||
// 게시판명이 금지된 단어로 되어 있으면
|
||||
if ($w == '' && in_array($target_table, get_bo_table_banned_word())) {
|
||||
alert('입력한 게시판 TABLE명을 사용할수 없습니다. 다른 이름으로 입력해 주세요.');
|
||||
@@ -89,10 +91,10 @@ $sql = " insert into {$g5['board_table']}
|
||||
bo_new = '{$board['bo_new']}',
|
||||
bo_hot = '{$board['bo_hot']}',
|
||||
bo_image_width = '{$board['bo_image_width']}',
|
||||
bo_skin = '{$board['bo_skin']}',
|
||||
bo_mobile_skin = '{$board['bo_mobile_skin']}',
|
||||
bo_include_head = '{$board['bo_include_head']}',
|
||||
bo_include_tail = '{$board['bo_include_tail']}',
|
||||
bo_skin = '" . sql_real_escape_string($board['bo_skin']). "',
|
||||
bo_mobile_skin = '" . sql_real_escape_string($board['bo_mobile_skin']). "',
|
||||
bo_include_head = '" . sql_real_escape_string($board['bo_include_head']). "',
|
||||
bo_include_tail = '" . sql_real_escape_string($board['bo_include_tail']). "',
|
||||
bo_content_head = '" . addslashes($board['bo_content_head']) . "',
|
||||
bo_content_tail = '" . addslashes($board['bo_content_tail']) . "',
|
||||
bo_mobile_content_head = '" . addslashes($board['bo_mobile_content_head']) . "',
|
||||
@@ -110,6 +112,7 @@ $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']}',
|
||||
@@ -191,7 +194,6 @@ if ($copy_case == 'schema_data_both') {
|
||||
sql_query($sql, false);
|
||||
|
||||
// 4.00.01
|
||||
// 위의 코드는 같은 테이블명을 사용하였다는 오류가 발생함. (희한하네 ㅡㅡ;)
|
||||
$sql = " select * from {$g5['board_file_table']} where bo_table = '$bo_table' ";
|
||||
$result = sql_query($sql, false);
|
||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||
|
||||
+34
-10
@@ -89,6 +89,11 @@ 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'=>'',
|
||||
@@ -131,6 +136,7 @@ $board_default = array(
|
||||
'bo_mobile_content_tail'=>'',
|
||||
'bo_insert_content'=>'',
|
||||
'bo_sort_field'=>'',
|
||||
'bo_use_kakaotalk'=>0,
|
||||
);
|
||||
|
||||
for ($i = 0; $i <= 10; $i++) {
|
||||
@@ -702,6 +708,19 @@ $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>
|
||||
@@ -914,7 +933,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_include_head">상단 파일 경로</label></th>
|
||||
<td>
|
||||
<input type="text" name="bo_include_head" value="<?php echo $board['bo_include_head'] ?>" id="bo_include_head" class="frm_input" size="50">
|
||||
<input type="text" name="bo_include_head" value="<?php echo get_sanitize_input($board['bo_include_head']); ?>" id="bo_include_head" class="frm_input" size="50">
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_include_head" value="1" id="chk_grp_include_head">
|
||||
@@ -926,7 +945,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_include_tail">하단 파일 경로</label></th>
|
||||
<td>
|
||||
<input type="text" name="bo_include_tail" value="<?php echo $board['bo_include_tail'] ?>" id="bo_include_tail" class="frm_input" size="50">
|
||||
<input type="text" name="bo_include_tail" value="<?php echo get_sanitize_input($board['bo_include_tail']); ?>" id="bo_include_tail" class="frm_input" size="50">
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_include_tail" value="1" id="chk_grp_include_tail">
|
||||
@@ -1423,9 +1442,10 @@ function use_captcha_check(){
|
||||
});
|
||||
}
|
||||
|
||||
var bo_include_head = jQuery.trim(jQuery("#bo_include_head").val()),
|
||||
bo_include_tail = jQuery.trim(jQuery("#bo_include_tail").val());
|
||||
|
||||
function frm_check_file(){
|
||||
var bo_include_head = "<?php echo $board['bo_include_head']; ?>";
|
||||
var bo_include_tail = "<?php echo $board['bo_include_tail']; ?>";
|
||||
var head = jQuery.trim(jQuery("#bo_include_head").val());
|
||||
var tail = jQuery.trim(jQuery("#bo_include_tail").val());
|
||||
|
||||
@@ -1438,7 +1458,7 @@ function frm_check_file(){
|
||||
|
||||
return false;
|
||||
} else {
|
||||
jQuery("#admin_captcha_box").hide();
|
||||
// jQuery("#admin_captcha_box").hide();
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -1446,12 +1466,12 @@ function frm_check_file(){
|
||||
|
||||
jQuery(function($){
|
||||
if( window.self !== window.top ){ // frame 또는 iframe을 사용할 경우 체크
|
||||
$("#bo_include_head, #bo_include_tail").on("change paste keyup", function(e) {
|
||||
frm_check_file();
|
||||
});
|
||||
|
||||
use_captcha_check();
|
||||
}
|
||||
|
||||
$("#bo_include_head, #bo_include_tail").on("change paste keyup", function(e) {
|
||||
frm_check_file();
|
||||
});
|
||||
});
|
||||
|
||||
function fboardform_submit(f)
|
||||
@@ -1486,10 +1506,14 @@ function fboardform_submit(f)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (frm_check_file() == false) {
|
||||
jQuery(window).scrollTop($('#bo_include_tail').offset().top - 30);
|
||||
}
|
||||
|
||||
if( captcha_chk ) {
|
||||
<?php echo isset($captcha_js) ? $captcha_js : ''; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -36,10 +36,24 @@ if ($w == '' && in_array($bo_table, get_bo_table_banned_word())) {
|
||||
$bo_include_head = isset($_POST['bo_include_head']) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($_POST['bo_include_head'], 0, 255)) : '';
|
||||
$bo_include_tail = isset($_POST['bo_include_tail']) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($_POST['bo_include_tail'], 0, 255)) : '';
|
||||
|
||||
// 관리자가 자동등록방지를 사용해야 할 경우
|
||||
if ($board && (isset($board['bo_include_head']) && $board['bo_include_head'] !== $bo_include_head || $board['bo_include_tail'] !== $bo_include_tail) && function_exists('get_admin_captcha_by') && get_admin_captcha_by()) {
|
||||
include_once(G5_CAPTCHA_PATH . '/captcha.lib.php');
|
||||
$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;
|
||||
}
|
||||
}
|
||||
|
||||
// 실제 CAPTCHA 검증
|
||||
if ($check_captcha) {
|
||||
include_once(G5_CAPTCHA_PATH . '/captcha.lib.php');
|
||||
|
||||
if (!chk_captcha()) {
|
||||
alert('자동등록방지 숫자가 틀렸습니다.');
|
||||
}
|
||||
@@ -107,6 +121,7 @@ $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;
|
||||
@@ -161,6 +176,10 @@ $bo_comment_min = isset($_POST['bo_comment_min']) ? (int) $_POST['bo_comment_min
|
||||
$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) : '';
|
||||
|
||||
if (strpbrk($bo_skin.$bo_mobile_skin, "?%*:|\"<>") !== false) {
|
||||
alert('스킨 디렉토리명 오류!');
|
||||
}
|
||||
|
||||
$etcs = array();
|
||||
|
||||
for ($i = 1; $i <= 10; $i++) {
|
||||
@@ -205,6 +224,7 @@ $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}',
|
||||
@@ -389,6 +409,7 @@ 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}' ";
|
||||
@@ -479,6 +500,7 @@ 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}' ";
|
||||
|
||||
+299
-21
@@ -8,6 +8,12 @@ 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);
|
||||
|
||||
if (!isset($config['cf_add_script'])) {
|
||||
sql_query(
|
||||
" ALTER TABLE `{$g5['config_table']}`
|
||||
@@ -405,6 +411,57 @@ if (!isset($config['cf_cert_kg_mid'])) {
|
||||
ADD COLUMN `cf_cert_kg_mid` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_cert_kg_cd`; ";
|
||||
sql_query($sql, false);
|
||||
}
|
||||
if (!isset($config['cf_cert_use_seed'])) {
|
||||
$sql = "ALTER TABLE `{$g5['config_table']}`
|
||||
ADD COLUMN `cf_cert_use_seed` TINYINT(4) NOT NULL DEFAULT '1' AFTER `cf_cert_kg_mid`; ";
|
||||
sql_query($sql, false);
|
||||
}
|
||||
if (!isset($config['cf_cert_kcp_enckey'])) {
|
||||
$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
|
||||
);
|
||||
}
|
||||
|
||||
// 광고성 정보 수신 동의 사용 필드 추가
|
||||
if (!isset($config['cf_use_promotion'])) {
|
||||
sql_query(
|
||||
" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_use_promotion` tinyint(1) NOT NULL DEFAULT '0' AFTER `cf_privacy` ",
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
// 광고성 정보 수신 동의 여부 필드 추가 + 메일 / SMS 수신 일자 추가
|
||||
if (!isset($member['mb_marketing_agree'])) {
|
||||
sql_query(
|
||||
" ALTER TABLE `{$g5['member_table']}`
|
||||
ADD `mb_marketing_agree` tinyint(1) NOT NULL DEFAULT '0' AFTER `mb_scrap_cnt`,
|
||||
ADD `mb_marketing_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `mb_marketing_agree`,
|
||||
ADD `mb_thirdparty_agree` tinyint(1) NOT NULL DEFAULT '0' AFTER `mb_marketing_date`,
|
||||
ADD `mb_thirdparty_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `mb_thirdparty_agree`,
|
||||
ADD `mb_agree_log` TEXT NOT NULL AFTER `mb_thirdparty_date`,
|
||||
ADD `mb_mailling_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `mb_mailling`,
|
||||
ADD `mb_sms_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `mb_sms` ",
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
if (!$config['cf_faq_skin']) {
|
||||
$config['cf_faq_skin'] = "basic";
|
||||
}
|
||||
@@ -421,10 +478,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>
|
||||
@@ -475,6 +532,9 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
<td colspan="3">
|
||||
<?php echo help('관리자가 보내고 받는 용도로 사용하는 메일 주소를 입력합니다. (회원가입, 인증메일, 테스트, 회원메일발송 등에서 사용)') ?>
|
||||
<input type="text" name="cf_admin_email" value="<?php echo get_sanitize_input($config['cf_admin_email']); ?>" id="cf_admin_email" required class="required email frm_input" size="40">
|
||||
<?php if (function_exists('domain_mail_host') && $config['cf_admin_email'] && stripos($config['cf_admin_email'], domain_mail_host()) === false) { ?>
|
||||
<?php echo help('외부메일설정이나 기타 설정을 하지 않았다면, 도메인과 다른 헤더로 여겨 스팸이나 차단될 가능성이 있습니다.<br>name'.domain_mail_host().' 과 같은 도메인 형식으로 설정할것을 권장합니다.') ?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -693,14 +753,14 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_analytics">방문자분석 스크립트</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('방문자분석 스크립트 코드를 입력합니다. 예) 구글 애널리틱스'); ?>
|
||||
<?php echo help('방문자분석 스크립트 코드를 입력합니다. 예) 구글 애널리틱스<br>관리자 페이지에서는 이 코드를 사용하지 않습니다.'); ?>
|
||||
<textarea name="cf_analytics" id="cf_analytics"><?php echo get_text($config['cf_analytics']); ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_add_meta">추가 메타태그</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('추가로 사용하실 meta 태그를 입력합니다.'); ?>
|
||||
<?php echo help('추가로 사용하실 meta 태그를 입력합니다.<br>관리자 페이지에서는 이 코드를 사용하지 않습니다.'); ?>
|
||||
<textarea name="cf_add_meta" id="cf_add_meta"><?php echo get_text($config['cf_add_meta']); ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -943,6 +1003,17 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
<th scope="row"><label for="cf_privacy">개인정보처리방침</label></th>
|
||||
<td colspan="3"><textarea id="cf_privacy" name="cf_privacy" rows="10"><?php echo html_purifier($config['cf_privacy']); ?></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_use_promotion">회원가입 약관 동의에<br>광고성 정보 수신 동의 표시 여부</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('<b>광고성 정보 수신 · 마케팅 목적의 개인정보 수집 및 이용 · 개인정보 제 3자 제공</b> 여부를 설정합니다. <b>SMS 또는 카카오톡</b> 사용 시 <b>개인정보 제3자 제공</b>이 활성화됩니다.'); ?>
|
||||
<?php echo help('동의한 회원에게 <b>카카오톡(친구톡)·문자</b>로 광고성 메시지를 발송할 수 있습니다.'); ?>
|
||||
<?php echo help('<b>휴대전화번호</b> 사용을 위해서는 <b>기본환경설정 > 회원가입 > 휴대전화번호 입력</b>을 <b>[보이기]</b> 또는 <b>[필수입력]</b>으로 설정해야 하며, 미설정 시 수집이 불가합니다.'); ?>
|
||||
<?php echo help('* 「정보통신망이용촉진및정보보호등에관한법률」에 따라 <b>광고성 정보 수신 동의</b>를 매 2년마다 반드시 확인해야 합니다.'); ?>
|
||||
<input type="checkbox" name="cf_use_promotion" value="1" id="cf_use_promotion" <?php echo $config['cf_use_promotion'] ? 'checked' : ''; ?>>
|
||||
<label for="cf_use_promotion">사용</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -996,6 +1067,16 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" class="cf_cert_service"><label for="cf_cert_use_seed">통합인증 암호화 적용</label></th>
|
||||
<td class="cf_cert_service">
|
||||
<?php echo help('KG이니시스 통합인증서비스에 암호화를 적용합니다. 만일 글자가 깨지는 문제가 발생하면 사용안함으로 적용해 주세요.') ?>
|
||||
<select name="cf_cert_use_seed" id="cf_cert_use_seed">
|
||||
<?php echo option_selected("0", $config['cf_cert_use_seed'], "사용안함"); ?>
|
||||
<?php echo option_selected("1", $config['cf_cert_use_seed'], "사용함"); ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" class="cf_cert_service"><label for="cf_cert_hp">휴대폰 본인확인</label></th>
|
||||
<td class="cf_cert_service">
|
||||
@@ -1044,6 +1125,13 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
<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>
|
||||
</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>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" class="cf_cert_service"><label for="cf_cert_limit">본인확인 이용제한</label></th>
|
||||
<td class="cf_cert_service">
|
||||
@@ -1068,12 +1156,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>
|
||||
@@ -1101,18 +1189,85 @@ 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>
|
||||
</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>
|
||||
@@ -1160,12 +1315,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>
|
||||
@@ -1192,12 +1347,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>
|
||||
@@ -1489,7 +1644,6 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<section id="anc_cf_extra">
|
||||
<h2 class="h2_frm">여분필드 기본 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
@@ -1520,7 +1674,17 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<div id="config_captcha_wrap" style="display:none">
|
||||
<h2>캡챠입력</h2>
|
||||
<?php
|
||||
require_once G5_CAPTCHA_PATH . '/captcha.lib.php';
|
||||
$captcha_html = captcha_html();
|
||||
$captcha_js = chk_captcha_js();
|
||||
echo $captcha_html;
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="btn_fixed_top btn_confirm">
|
||||
<input type="submit" value="확인" class="btn_submit btn" accesskey="s">
|
||||
</div>
|
||||
@@ -1592,10 +1756,61 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
});
|
||||
});
|
||||
|
||||
// 각 요소의 초기값 저장
|
||||
var initialValues = {
|
||||
cf_admin: $('#cf_admin').val(),
|
||||
cf_analytics: $('#cf_analytics').val(),
|
||||
cf_add_meta: $('#cf_add_meta').val(),
|
||||
cf_add_script: $('#cf_add_script').val()
|
||||
};
|
||||
|
||||
function check_config_captcha_open() {
|
||||
var isChanged = false;
|
||||
|
||||
// 현재 값이 있는 경우에만 변경 여부 체크
|
||||
if ($('#cf_admin').val()) {
|
||||
isChanged = isChanged || $('#cf_admin').val() !== initialValues.cf_admin;
|
||||
}
|
||||
if ($('#cf_analytics').val()) {
|
||||
isChanged = isChanged || $('#cf_analytics').val() !== initialValues.cf_analytics;
|
||||
}
|
||||
if ($('#cf_add_meta').val()) {
|
||||
isChanged = isChanged || $('#cf_add_meta').val() !== initialValues.cf_add_meta;
|
||||
}
|
||||
if ($('#cf_add_script').val()) {
|
||||
isChanged = isChanged || $('#cf_add_script').val() !== initialValues.cf_add_script;
|
||||
}
|
||||
|
||||
var $wrap = $("#config_captcha_wrap"),
|
||||
tooptipid = "mp_captcha_tooltip",
|
||||
$p_text = $("<p>", {id:tooptipid, style:"font-size:0.95em;letter-spacing:-0.1em"}).html("중요정보를 수정할 경우 캡챠를 입력해야 합니다."),
|
||||
$children = $wrap.children(':first'),
|
||||
is_invisible_recaptcha = $("#captcha").hasClass("invisible_recaptcha");
|
||||
|
||||
if(isChanged){
|
||||
$wrap.show();
|
||||
if(! is_invisible_recaptcha) {
|
||||
$wrap.css("margin-top","1em");
|
||||
if(! $("#"+tooptipid).length){ $children.after($p_text) }
|
||||
}
|
||||
} else {
|
||||
$wrap.hide();
|
||||
if($("#"+tooptipid).length && ! is_invisible_recaptcha){ $children.next("#"+tooptipid).remove(); }
|
||||
}
|
||||
|
||||
return isChanged;
|
||||
}
|
||||
|
||||
function fconfigform_submit(f) {
|
||||
var current_user_ip = "<?php echo $_SERVER['REMOTE_ADDR']; ?>";
|
||||
var cf_intercept_ip_val = f.cf_intercept_ip.value;
|
||||
|
||||
|
||||
if (check_config_captcha_open()){
|
||||
jQuery("html, body").scrollTop(jQuery("#config_captcha_wrap").offset().top);
|
||||
|
||||
<?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
|
||||
}
|
||||
|
||||
if (cf_intercept_ip_val && current_user_ip) {
|
||||
var cf_intercept_ips = cf_intercept_ip_val.split("\n");
|
||||
|
||||
@@ -1616,6 +1831,66 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
f.action = "./config_form_update.php";
|
||||
return true;
|
||||
}
|
||||
|
||||
jQuery(function($){
|
||||
$("#captcha_key").prop('required', false).removeAttr("required").removeClass("required");
|
||||
|
||||
// 최고관리자 변경시
|
||||
$(document).on('change', '#cf_admin', check_config_captcha_open);
|
||||
|
||||
// 방문자분석 스크립트 변경시
|
||||
$(document).on('input', '#cf_analytics', check_config_captcha_open);
|
||||
|
||||
// 추가 메타태그 변경시
|
||||
$(document).on('input', '#cf_add_meta', check_config_captcha_open);
|
||||
|
||||
// 추가 script, css 변경시
|
||||
$(document).on('input', '#cf_add_script', check_config_captcha_open);
|
||||
});
|
||||
</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
|
||||
@@ -1647,16 +1922,19 @@ if ($config['cf_cert_use']) {
|
||||
|
||||
// kcp일 때
|
||||
if ($config['cf_cert_hp'] == 'kcp') {
|
||||
|
||||
$bin_path = ((int)$config['cf_cert_use'] === 2 && !$config['cf_cert_kcp_enckey']) ? 'bin_old' : 'bin';
|
||||
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
|
||||
if (PHP_INT_MAX == 2147483647) { // 32-bit
|
||||
$exe = G5_KCPCERT_PATH . '/bin/ct_cli';
|
||||
$exe = G5_KCPCERT_PATH . '/'.$bin_path.'/ct_cli';
|
||||
} else {
|
||||
$exe = G5_KCPCERT_PATH . '/bin/ct_cli_x64';
|
||||
$exe = G5_KCPCERT_PATH . '/'.$bin_path.'/ct_cli_x64';
|
||||
}
|
||||
} else {
|
||||
$exe = G5_KCPCERT_PATH . '/bin/ct_cli_exe.exe';
|
||||
$exe = G5_KCPCERT_PATH . '/'.$bin_path.'/ct_cli_exe.exe';
|
||||
}
|
||||
|
||||
|
||||
echo module_exec_check($exe, 'ct_cli');
|
||||
}
|
||||
|
||||
|
||||
+61
-11
@@ -10,9 +10,11 @@ if ($is_admin != 'super') {
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
}
|
||||
|
||||
$sql = " select * from {$g5['config_table']} limit 1";
|
||||
$ori_config = sql_fetch($sql);
|
||||
|
||||
$cf_title = isset($_POST['cf_title']) ? strip_tags(clean_xss_attributes($_POST['cf_title'])) : '';
|
||||
$cf_admin = isset($_POST['cf_admin']) ? clean_xss_tags($_POST['cf_admin'], 1, 1) : '';
|
||||
$posts = array();
|
||||
|
||||
$mb = get_member($cf_admin);
|
||||
|
||||
@@ -24,15 +26,15 @@ check_admin_token();
|
||||
|
||||
$cf_social_servicelist = !empty($_POST['cf_social_servicelist']) ? implode(',', $_POST['cf_social_servicelist']) : '';
|
||||
|
||||
$check_keys = array('cf_cert_kcb_cd', 'cf_cert_kcp_cd', 'cf_editor', 'cf_recaptcha_site_key', 'cf_recaptcha_secret_key', 'cf_naver_clientid', 'cf_naver_secret', 'cf_facebook_appid', 'cf_facebook_secret', 'cf_twitter_key', 'cf_twitter_secret', 'cf_google_clientid', 'cf_google_secret', 'cf_googl_shorturl_apikey', 'cf_kakao_rest_key', 'cf_kakao_client_secret', 'cf_kakao_js_apikey', 'cf_payco_clientid', 'cf_payco_secret', 'cf_cert_kg_cd', 'cf_cert_kg_mid');
|
||||
$check_keys = array('cf_cert_kcb_cd', 'cf_cert_kcp_cd', 'cf_cert_kcp_enckey', 'cf_editor', 'cf_recaptcha_site_key', 'cf_recaptcha_secret_key', 'cf_naver_clientid', 'cf_naver_secret', 'cf_facebook_appid', 'cf_facebook_secret', 'cf_twitter_key', 'cf_twitter_secret', 'cf_google_clientid', 'cf_google_secret', 'cf_googl_shorturl_apikey', 'cf_kakao_rest_key', 'cf_kakao_client_secret', 'cf_kakao_js_apikey', 'cf_payco_clientid', 'cf_payco_secret', 'cf_cert_kg_cd', 'cf_cert_kg_mid');
|
||||
|
||||
foreach ($check_keys as $key) {
|
||||
if (isset($_POST[$key]) && $_POST[$key]) {
|
||||
$posts[$key] = $_POST[$key] = preg_replace('/[^a-z0-9_\-\.]/i', '', $_POST[$key]);
|
||||
$_POST[$key] = preg_replace('/[^a-z0-9_\-\.]/i', '', $_POST[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
$posts['cf_icode_server_port'] = $_POST['cf_icode_server_port'] = isset($_POST['cf_icode_server_port']) ? preg_replace('/[^0-9]/', '', $_POST['cf_icode_server_port']) : '7295';
|
||||
$_POST['cf_icode_server_port'] = isset($_POST['cf_icode_server_port']) ? preg_replace('/[^0-9]/', '', $_POST['cf_icode_server_port']) : '7295';
|
||||
|
||||
if (isset($_POST['cf_intercept_ip']) && $_POST['cf_intercept_ip']) {
|
||||
$pattern = explode("\n", trim($_POST['cf_intercept_ip']));
|
||||
@@ -105,6 +107,7 @@ $check_keys = array(
|
||||
'cf_cert_ipin' => 'char',
|
||||
'cf_cert_hp' => 'char',
|
||||
'cf_cert_simple' => 'char',
|
||||
'cf_cert_use_seed' => 'int',
|
||||
'cf_admin_email' => 'char',
|
||||
'cf_admin_email_name' => 'char',
|
||||
'cf_add_script' => 'text',
|
||||
@@ -138,6 +141,7 @@ $check_keys = array(
|
||||
'cf_visit' => 'char',
|
||||
'cf_stipulation' => 'text',
|
||||
'cf_privacy' => 'text',
|
||||
'cf_use_promotion' => 'int',
|
||||
'cf_open_modify' => 'int',
|
||||
'cf_memo_send_point' => 'int',
|
||||
'cf_mobile_new_skin' => 'char',
|
||||
@@ -154,7 +158,13 @@ $check_keys = array(
|
||||
'cf_icode_server_ip' => 'char',
|
||||
'cf_captcha' => 'char',
|
||||
'cf_syndi_token' => '',
|
||||
'cf_syndi_except' => ''
|
||||
'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'
|
||||
);
|
||||
|
||||
for ($i = 1; $i <= 10; $i++) {
|
||||
@@ -164,12 +174,12 @@ for ($i = 1; $i <= 10; $i++) {
|
||||
|
||||
foreach ($check_keys as $k => $v) {
|
||||
if ($v === 'int') {
|
||||
$posts[$key] = $_POST[$k] = isset($_POST[$k]) ? (int) $_POST[$k] : 0;
|
||||
$_POST[$k] = isset($_POST[$k]) ? (int) $_POST[$k] : 0;
|
||||
} else {
|
||||
if (in_array($k, array('cf_analytics', 'cf_add_meta', 'cf_add_script', 'cf_stipulation', 'cf_privacy'))) {
|
||||
$posts[$key] = $_POST[$k] = isset($_POST[$k]) ? $_POST[$k] : '';
|
||||
$_POST[$k] = isset($_POST[$k]) ? $_POST[$k] : '';
|
||||
} else {
|
||||
$posts[$key] = $_POST[$k] = isset($_POST[$k]) ? strip_tags(clean_xss_attributes($_POST[$k])) : '';
|
||||
$_POST[$k] = isset($_POST[$k]) ? strip_tags(clean_xss_attributes($_POST[$k])) : '';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -180,9 +190,36 @@ if ($_POST['cf_cert_use'] && !$_POST['cf_cert_ipin'] && !$_POST['cf_cert_hp'] &&
|
||||
}
|
||||
|
||||
if (!$_POST['cf_cert_use']) {
|
||||
$posts[$key] = $_POST['cf_cert_ipin'] = '';
|
||||
$posts[$key] = $_POST['cf_cert_hp'] = '';
|
||||
$posts[$key] = $_POST['cf_cert_simple'] = '';
|
||||
$_POST['cf_cert_ipin'] = '';
|
||||
$_POST['cf_cert_hp'] = '';
|
||||
$_POST['cf_cert_simple'] = '';
|
||||
}
|
||||
|
||||
// 관리자가 자동등록방지를 사용해야 할 경우 ( 기본환경설정에서 최고관리자, 방문자분석 스크립트, 추가 메타태그, 추가 script, css 변경시 )
|
||||
$check_captcha = 0;
|
||||
|
||||
if ($cf_admin && $ori_config['cf_admin'] !== $cf_admin) {
|
||||
$check_captcha = 1;
|
||||
}
|
||||
|
||||
if ($_POST['cf_analytics'] && $ori_config['cf_analytics'] !== stripslashes($_POST['cf_analytics'])) {
|
||||
$check_captcha = 1;
|
||||
}
|
||||
|
||||
if ($_POST['cf_add_meta'] && $ori_config['cf_add_meta'] !== stripslashes($_POST['cf_add_meta'])) {
|
||||
$check_captcha = 1;
|
||||
}
|
||||
|
||||
if ($_POST['cf_add_script'] && $ori_config['cf_add_script'] !== stripslashes($_POST['cf_add_script'])) {
|
||||
$check_captcha = 1;
|
||||
}
|
||||
|
||||
if ($check_captcha) {
|
||||
include_once(G5_CAPTCHA_PATH . '/captcha.lib.php');
|
||||
|
||||
if (!chk_captcha()) {
|
||||
alert('자동등록방지 숫자가 틀렸습니다.');
|
||||
}
|
||||
}
|
||||
|
||||
$sql = " update {$g5['config_table']}
|
||||
@@ -270,6 +307,7 @@ $sql = " update {$g5['config_table']}
|
||||
cf_mobile_page_rows = '{$_POST['cf_mobile_page_rows']}',
|
||||
cf_stipulation = '{$_POST['cf_stipulation']}',
|
||||
cf_privacy = '{$_POST['cf_privacy']}',
|
||||
cf_use_promotion = '{$_POST['cf_use_promotion']}',
|
||||
cf_open_modify = '{$_POST['cf_open_modify']}',
|
||||
cf_memo_send_point = '{$_POST['cf_memo_send_point']}',
|
||||
cf_mobile_new_skin = '{$_POST['cf_mobile_new_skin']}',
|
||||
@@ -284,10 +322,12 @@ $sql = " update {$g5['config_table']}
|
||||
cf_cert_ipin = '{$_POST['cf_cert_ipin']}',
|
||||
cf_cert_hp = '{$_POST['cf_cert_hp']}',
|
||||
cf_cert_simple = '{$_POST['cf_cert_simple']}',
|
||||
cf_cert_use_seed = '".(int)$_POST['cf_cert_use_seed']."',
|
||||
cf_cert_kg_cd = '{$_POST['cf_cert_kg_cd']}',
|
||||
cf_cert_kg_mid = '" . trim($_POST['cf_cert_kg_mid']) . "',
|
||||
cf_cert_kcb_cd = '{$_POST['cf_cert_kcb_cd']}',
|
||||
cf_cert_kcp_cd = '{$_POST['cf_cert_kcp_cd']}',
|
||||
cf_cert_kcp_enckey = '{$_POST['cf_cert_kcp_enckey']}',
|
||||
cf_cert_limit = '{$_POST['cf_cert_limit']}',
|
||||
cf_cert_req = '{$_POST['cf_cert_req']}',
|
||||
cf_sms_use = '{$_POST['cf_sms_use']}',
|
||||
@@ -316,6 +356,12 @@ $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']}',
|
||||
@@ -344,6 +390,10 @@ if (isset($_POST['cf_bbs_rewrite'])) {
|
||||
g5_delete_all_cache();
|
||||
}
|
||||
|
||||
if (function_exists('get_admin_captcha_by')) {
|
||||
get_admin_captcha_by('remove');
|
||||
}
|
||||
|
||||
run_event('admin_config_form_update');
|
||||
|
||||
update_rewrite_rules();
|
||||
|
||||
+5
-2
@@ -57,6 +57,9 @@ if ($w == "u") {
|
||||
if (!$co['co_id']) {
|
||||
alert('등록된 자료가 없습니다.');
|
||||
}
|
||||
|
||||
if (function_exists('check_case_exist_title')) check_case_exist_title($co, G5_CONTENT_DIR, false);
|
||||
|
||||
} else {
|
||||
$html_title .= ' 입력';
|
||||
$co = array(
|
||||
@@ -137,14 +140,14 @@ require_once G5_ADMIN_PATH . '/admin.head.php';
|
||||
<th scope="row"><label for="co_include_head">상단 파일 경로</label></th>
|
||||
<td>
|
||||
<?php echo help("설정값이 없으면 기본 상단 파일을 사용합니다."); ?>
|
||||
<input type="text" name="co_include_head" value="<?php echo $co['co_include_head']; ?>" id="co_include_head" class="frm_input" size="60">
|
||||
<input type="text" name="co_include_head" value="<?php echo get_sanitize_input($co['co_include_head']); ?>" id="co_include_head" class="frm_input" size="60">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="co_include_tail">하단 파일 경로</label></th>
|
||||
<td>
|
||||
<?php echo help("설정값이 없으면 기본 하단 파일을 사용합니다."); ?>
|
||||
<input type="text" name="co_include_tail" value="<?php echo $co['co_include_tail']; ?>" id="co_include_tail" class="frm_input" size="60">
|
||||
<input type="text" name="co_include_tail" value="<?php echo get_sanitize_input($co['co_include_tail']); ?>" id="co_include_tail" class="frm_input" size="60">
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="admin_captcha_box" style="display:none;">
|
||||
|
||||
@@ -113,17 +113,20 @@ if ($w == "") {
|
||||
set co_id = '$co_id',
|
||||
$sql_common ";
|
||||
sql_query($sql);
|
||||
run_event('admin_content_created', $co_id);
|
||||
} elseif ($w == "u") {
|
||||
$sql = " update {$g5['content_table']}
|
||||
set $sql_common
|
||||
where co_id = '$co_id' ";
|
||||
sql_query($sql);
|
||||
run_event('admin_content_updated', $co_id);
|
||||
} elseif ($w == "d") {
|
||||
@unlink(G5_DATA_PATH . "/content/{$co_id}_h");
|
||||
@unlink(G5_DATA_PATH . "/content/{$co_id}_t");
|
||||
|
||||
$sql = " delete from {$g5['content_table']} where co_id = '$co_id' ";
|
||||
sql_query($sql);
|
||||
run_event('admin_content_deleted', $co_id);
|
||||
}
|
||||
|
||||
if (function_exists('get_admin_captcha_by')) {
|
||||
|
||||
+121
-24
@@ -28,6 +28,39 @@ box-sizing: border-box;
|
||||
h2{font-size: 1.083em;font-weight: bold;margin:10px 0}
|
||||
|
||||
#wrapper {min-height:480px}
|
||||
|
||||
/* admin 공통 */
|
||||
/* 공통 - display none/block */
|
||||
.is-hidden { display: none !important; }
|
||||
.is-visible { display: block !important; }
|
||||
|
||||
/* 공통 - 뷰포트 (pc / mobile) 별 display none/block */
|
||||
.pc-only { display: none; }
|
||||
@media (min-width: 769px) { .pc-only { display: block !important; }}
|
||||
.mobile-only { display: block; }
|
||||
@media (min-width: 769px) { .mobile-only { display: none !important; }}
|
||||
|
||||
/* 공통 - 레이어 팝업 */
|
||||
.popup-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.3); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 9999; display: flex; justify-content: center; align-items: center; }
|
||||
.popup-content { background: #fff; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); width: 800px; overflow: hidden; }
|
||||
.popup-header, .popup-footer { padding: 18px 20px; display: flex; align-items: center; }
|
||||
.popup-header { justify-content: space-between; border-bottom: 1px solid #e0e0e0; }
|
||||
.popup-footer { gap: 20px; border-top: 1px solid #e0e0e0;}
|
||||
.popup-close-btn { background: none; border: none; color: #888; font-size: 20px; cursor: pointer; padding: 4px; display: flex; align-items: center; justify-content: center; transition: color 0.2s ease; }
|
||||
.popup-close-btn:hover { color: #333; }
|
||||
.popup-title { font-size: 18px; font-weight: 600; }
|
||||
.popup-body { padding: 20px; max-height: 400px; overflow-y: auto; color: #333; }
|
||||
.popup-footer button { background: #3d70ff; color: white; border: 1px solid #3d70ff; padding: 8px 16px; border-radius: 6px; font-weight: 600; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease; }
|
||||
.popup-footer button:hover { background: #2b3d9f; border-color: #2b3d9f; }
|
||||
|
||||
/* 공통 - tab */
|
||||
.tab-container { display: flex; flex-direction: column; width: 100%; }
|
||||
.tab-header { position: relative; bottom: -1px; display: flex; }
|
||||
.tab-btn { padding: 10px 14px; background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; color: inherit; font: inherit; }
|
||||
.tab-btn.active { border-bottom-color: #000; font-weight: bold; }
|
||||
.tab-body { width: 100%; border-top: 1px solid #ccc; }
|
||||
.tab-content { padding: 16px 0; }
|
||||
|
||||
/* 레이아웃 */
|
||||
#hd h1 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||
#hd_top{position:fixed;top:0;left:0;width:100%;height:50px;background:#3f51b5;z-index:1000}
|
||||
@@ -71,6 +104,8 @@ 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}
|
||||
@@ -95,9 +130,11 @@ box-shadow: 2px 0 2px rgba(150,150,150,0.1);}
|
||||
#container.container-small #container_title{padding-left:70px}
|
||||
.container_wr{padding:20px}
|
||||
|
||||
/* 화면낭독기 사용자용 */
|
||||
/* 화면낭독기 사용자용 (스크린 리더 대응) */
|
||||
/* 일반적인 .blind/.sr-only 사용시에 .sound_only 사용 권장 */
|
||||
#hd_login_msg {position:absolute;top:0;left:0;width:1px;height:1px;overflow:hidden}
|
||||
.msg_sound_only, .sound_only {display:inline-block !important;position:absolute;top:0;left:0;margin:0 !important;padding:0 !important;width:1px !important;height:1px !important;font-size:0;line-height:0;border:0 !important;overflow:hidden !important}
|
||||
.sound_only, .msg_sound_only {overflow:hidden;position:absolute;width:1px;height:1px;margin:-1px;padding:0;clip:rect(0,0,0,0)}
|
||||
|
||||
/* 본문 바로가기 */
|
||||
#to_content a {z-index:100000;position:absolute;top:0;left:0;font-size:0;line-height:0;overflow:hidden}
|
||||
#to_content a:focus, #to_content a:active {width:100%;height:70px;background:#fff;font-size:2em;font-weight:bold;text-align:center;text-decoration:none;line-height:3.1em}
|
||||
@@ -196,6 +233,8 @@ 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}
|
||||
@@ -247,18 +286,14 @@ legend {position:absolute;width:0;height:0;font-size:0;line-height:0;text-indent
|
||||
.anchor a {display:inline-block;padding:5px 10px;border:1px solid #c8ced1;background:#d6dde1;text-decoration:none}
|
||||
.anchor .selected{background:#3f51b5}
|
||||
|
||||
|
||||
|
||||
|
||||
#sort_mb {width:800px}
|
||||
|
||||
#sort_sodr {width:600px}
|
||||
|
||||
|
||||
/* 하단 레이아웃 */
|
||||
#ft{background:#f3f3f3;padding:0 25px;color:#777;text-align:center}
|
||||
#ft p{line-height:50px;}
|
||||
.scroll_top{position:fixed;bottom:10px;right:10px;width:50px;height:50px;border:0;text-align:center;background:#ddd;background:rgba(0,0,0,0.1)}
|
||||
.scroll_top{position:fixed;bottom:10px;right:10px;width:50px;height:50px;border:0;text-align:center;background:#ddd;background:rgba(0,0,0,0.1);z-index:50;}
|
||||
.scroll_top span.top_img{display:inline-block;width: 0; height: 0; border-left: 5px solid transparent;border-right: 5px solid transparent;
|
||||
border-bottom: 5px solid black;}
|
||||
.scroll_top span.top_txt{display:block}
|
||||
@@ -281,9 +316,59 @@ border-bottom: 5px solid black;}
|
||||
.local_sch03 button{height:30px;padding:0 5px;border:0;background:#9eacc6;color:#fff;}
|
||||
.local_sch03 .btn_submit{height:30px;padding:0 5px;border:0;color:#fff;}
|
||||
.local_sch03 .frm_input{height:30px;border:1px solid #dcdcdc;padding:0 5px;}
|
||||
|
||||
/* 회원 관리 데이터 필터링 */
|
||||
.member_list_data { display: flex; flex-direction: column; padding: 20px; margin: 20px 0 40px; background: #f9f9f9; border: 1px solid #f2f2f2; color: #333; }
|
||||
.sch_table { display: flex; flex-direction: column; gap: 10px; font-size: 11.5px; color: #333; }
|
||||
.member_list_data .sch_row { display: flex; align-items: center; gap: 12px; min-height: 30px; }
|
||||
.label { min-width: 120px; font-weight: 500; white-space: nowrap; display: flex; align-items: center; }
|
||||
.label label {display: flex; gap: 10px;}
|
||||
.field { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
|
||||
.field input[type="text"], .field input[type="number"], .field input[type="date"], .field select { height: 30px; min-width: 100px; padding: 0 10px; font-size: 11.5px; border: 1px solid #ddd; border-radius: 8px; background: #fff; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
|
||||
.field input[type="text"]:focus, .field input[type="number"]:focus, .field input[type="date"]:focus, .field select:focus { border-color: #6f809a; box-shadow: 0 0 0 2px rgba(63,81,181,0.1); outline: none; }
|
||||
.field input::placeholder { color: #aaa; }
|
||||
.field input[type="checkbox"], .field input[type="radio"] { width: 14px; height: 14px; accent-color: #536177; }
|
||||
.radio_group { display: flex; gap: 15px; align-items: center; padding: 0 10px;}
|
||||
.radio_group label {display: flex; align-items: center; gap: 5px;}
|
||||
.ad_range_wrap {flex: 1; padding-left: 20px;}
|
||||
.ad_range_box {display: flex;}
|
||||
.ad_range_box .label {width: 109px;}
|
||||
.sch_notice { font-size: 11px; color: #999; }
|
||||
.sch_btn { display: flex; gap: 20px; justify-content: center; margin-top: 40px; }
|
||||
.sch_btn { display: flex; gap: 10px; }
|
||||
|
||||
.btn_reset { display: flex; align-items: center; gap: 6px; padding: 0 20px; height: 40px; background: #9eacc6; color: #fff; font-weight: 600; border: none; border-radius: 8px; cursor: pointer; transition: background 0.2s ease, transform 0.15s ease; }
|
||||
.btn_reset:hover { background: #5f6e89; }
|
||||
.sch_btn button:not(.btn_reset) { padding: 0 20px; height: 40px; border: 1px solid #ccd1d8; background-color: #fff; color: #444; font-weight: 600; border-radius: 8px; cursor: pointer; user-select: none; transition: border-color 0.2s ease, box-shadow 0.2s ease; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
|
||||
.sch_btn button:not(.btn_reset):hover { border-color: #6f809a; box-shadow: 0 2px 4px rgba(111, 128, 154, 0.15); }
|
||||
.sch_btn button:not(.btn_reset):active { box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); }
|
||||
|
||||
/* 회원 관리 다운로드 진행 팝업 */
|
||||
.excel-download-progress p { color: #374151; }
|
||||
.excel-download-progress .progress-desc { padding: 40px 0 32px; text-align: center; }
|
||||
.excel-download-progress .progress-summary { margin-bottom: 6px; font-size: 16px; font-weight: 500; color: #111827; }
|
||||
.excel-download-progress .progress-message { font-size: 20px; font-weight: 600; color: #3b82f6; }
|
||||
.excel-download-progress .progress-error { color:red; }
|
||||
.progress-spinner { display: flex; flex-direction: column; align-items: center; gap: 45px; padding: 24px 0; transition: all 0.2s ease; }
|
||||
.spinner { width: 48px; height: 48px; border: 5px solid #3b82f6; border-top: 5px solid #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
.loading-message { text-align: center; font-size: 14px; color: #374151; }
|
||||
.excel-download-progress .progress-download-box { margin-top: 24px; background: #f9fafb; padding: 20px; border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
|
||||
.excel-download-progress .progress-download-box a { display: block; width: 100%; height: auto; text-align: center; margin-top: 8px; font-weight: 600; font-size: 14px; padding: 10px 20px; background: #fff; border: 1px solid #ccd1d8; border-radius: 8px; color: #444; cursor: pointer; transition: border-color 0.2s ease, box-shadow 0.2s ease; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
|
||||
.excel-download-progress .progress-download-box a:hover { border-color: #6f809a; box-shadow: 0 2px 4px rgba(111, 128, 154, 0.15); }
|
||||
.excel-download-progress .progress-download-box a:active { box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); }
|
||||
|
||||
.field-select-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 15px; gap: 0px 10px; padding: 10px; background-color: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; color: #374151; }
|
||||
.field-select-form label { display: flex; align-items: center; cursor: pointer; padding: 6px 10px; border-radius: 4px; }
|
||||
.field-select-form label:hover { background-color: #f3f4f6; }
|
||||
.field-select-form input[type="checkbox"] { margin-right: 8px; transform: scale(1.2); }
|
||||
.field-separator { grid-column: 1 / -1; border-top: 1px solid #d1d5db; margin: 8px 0; }
|
||||
.selected-fields-preview { padding: 8px; background-color: #eef2f7; border: 1px solid #d1d5db; border-radius: 6px; margin: 10px 0px; color: #1f2937; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
|
||||
.selected-fields-preview strong { padding: 4px 8px; }
|
||||
.selected-fields-preview .field-tag { background-color: #dbeafe; color: #1e40af; padding: 4px 8px; border-radius: 4px; }
|
||||
|
||||
/* 페이지 내 실행 */
|
||||
.local_cmd {min-width:960px}
|
||||
|
||||
.local_cmd01 {margin:0 0 10px;padding:0 }
|
||||
.local_cmd01 .cmd_tit {font-weight:bold}
|
||||
.local_cmd01 .btn_submit {padding:3px 5px;border:1px solid #ff3061;color:#fff;font-size:0.95em;vertical-align:middle}
|
||||
@@ -298,7 +383,7 @@ border-bottom: 5px solid black;}
|
||||
|
||||
.local_desc01 {margin:10px 0 10px ;padding:10px 20px;border:1px solid #f2f2f2;background:#f9f9f9}
|
||||
.local_desc01 strong {color:#ff3061}
|
||||
.local_desc01 a {text-decoration:underline}
|
||||
.local_desc01 a {text-decoration:underline;text-underline-offset:2px;}
|
||||
|
||||
.local_desc02 {margin:10px 0 ;min-width:960px} /* 주로 온라인 서식 관련 안내 내용에 사용 */
|
||||
.local_desc02 p {padding:0;line-height:1.8em}
|
||||
@@ -401,6 +486,7 @@ tfoot th {}
|
||||
.mb_leave_msg {color:#b6b6b6}
|
||||
.mb_intercept_msg {color:#ff0000}
|
||||
#point_mng {margin-top:50px}
|
||||
.ad_agree_log {max-height: 150px !important;}
|
||||
|
||||
/* 게시판추가/수정 */
|
||||
#anc_bo_extra .td_grpset label {width:auto}
|
||||
@@ -447,6 +533,7 @@ tfoot th {}
|
||||
.td_delino {width:130px}
|
||||
.td_device {width:70px;text-align:center}
|
||||
.td_etc {width:80px;text-align:center}
|
||||
.td_use {width:80px;text-align:center}
|
||||
.td_extra label {display:inline-block;width:100px}
|
||||
.td_extra input {margin-right:5px;width:130px}
|
||||
.td_grid {width:60px;text-align:center}
|
||||
@@ -503,6 +590,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_mng_s{width:60px}
|
||||
.td_mng_m{width:100px}
|
||||
@@ -623,6 +711,7 @@ a.lg_btn{display:inline-block;margin:5px 0 0;padding:5px 10px;background:#ED008C
|
||||
a.kg_btn{display:inline-block;margin:5px 0 0;padding:5px 10px;background:#4A2C7C;color:#fff;font-weight:normal;text-decoration:none}
|
||||
a.kakao_btn{display:inline-block;margin:5px 0 0;padding:5px 10px;background:#FDDC2F;color:#3B1E1E;font-weight:normal;text-decoration:none}
|
||||
a.naver_btn {display:inline-block;margin:5px 0 0;padding:5px 10px;background:#00C73C;color:#fff;font-weight:normal;text-decoration:none}
|
||||
a.nicepay_btn{display:inline-block;margin:5px 0 0;padding:5px 10px;background:#0057bf;color:#fff;font-weight:normal;text-decoration:none}
|
||||
|
||||
.scf_cardtest {margin:5px 0 0}
|
||||
.scf_cardtest_btn {margin-left:5px;vertical-align:middle}
|
||||
@@ -665,6 +754,7 @@ ul.de_pg_tab li.tab-current a{background:#2CC185;color:#fff}
|
||||
.inicis_info_fld th{background-color:#F6F1FF}
|
||||
.kakao_info_fld th{background-color:#FFFCED}
|
||||
.naver_info_fld th{background-color:#F3FFF3}
|
||||
.nicepay_info_fld th{background-color:#d1e6ff}
|
||||
|
||||
/* 주문내역 */
|
||||
#sodr_list td {text-align:center}
|
||||
@@ -876,20 +966,6 @@ strong.sodr_nonpay {display:block;padding:5px 0;text-align:right}
|
||||
.sbn_img {text-align:center}
|
||||
.sbn_image {display:none;margin:0 0 10px;text-align:left}
|
||||
|
||||
/* SMS문자전송 */
|
||||
#sms_send {padding-bottom:100px;zoom:1}
|
||||
#sms_send:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
|
||||
#sms_frm {float:left;width:650px}
|
||||
#sms_frm table {margin:0 0 30px}
|
||||
#sms_frm textarea {height:70px}
|
||||
|
||||
#sms_sm {position:relative;float:left;width:229px;height:418px;background:url('../shop_admin/img/mobilebg.jpg') no-repeat}
|
||||
#sms_sm_text {position:absolute;top:75px;left:27px;width:180px;color:#fff;font-size:2em;word-break:break-all}
|
||||
#sms_sm p {position:absolute;bottom:-70px;left:0;font-size:0.95em;letter-spacing:-0.1em}
|
||||
|
||||
#sms_send .local_desc01 {min-width:320px}
|
||||
|
||||
/* 가격비교사이트 */
|
||||
#anc_pricecompare_info li {margin:5px 0 5px -1px}
|
||||
|
||||
@@ -1075,7 +1151,7 @@ box-shadow: 1px 2px 5px rgba(150,150,150,0.5);z-index:1000}
|
||||
#theme_detail:after{display:block;visibility:hidden;clear:both;content:""}
|
||||
#theme_detail h2{font-size:1.25em;background:#fff;padding:0 15px;line-height:40px;border-bottom:1px solid #d8d8d8;margin:0}
|
||||
.theme_dt_img{float:left;padding:20px}
|
||||
.theme_dt_img img{border:1px solid #aaa;}
|
||||
.theme_dt_img img{border:1px solid #aaa;max-width:600px;max-height:460px}
|
||||
.theme_dt_if{float:left;width:235px;padding:20px 0}
|
||||
.theme_dt_if table{width:100%;border-collapse:collapse;margin:15px 0 0 ;font-size:0.92em}
|
||||
.theme_dt_if table th{padding:5px;background:#fff;border-bottom:1px solid #f3f3f3;vertical-align:top;color:#3f51b5}
|
||||
@@ -1145,3 +1221,24 @@ input[type="text"]{max-width:200px}
|
||||
/* 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; }
|
||||
@@ -205,8 +205,254 @@ if (defined('G5_USE_SHOP') && G5_USE_SHOP) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($default['de_id'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}`
|
||||
ADD COLUMN `de_id` INT(11) NOT NULL AUTO_INCREMENT FIRST,
|
||||
ADD PRIMARY KEY (`de_id`); ", true);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
}
|
||||
|
||||
// auth.au_menu 컬럼 크기 조정
|
||||
$sql = " SHOW COLUMNS FROM `{$g5['auth_table']}` LIKE 'au_menu' ";
|
||||
$row = sql_fetch($sql);
|
||||
if (
|
||||
stripos($row['Type'], 'varchar') !== false
|
||||
&& (int) preg_replace('/[^0-9]/', '', $row['Type']) < 50
|
||||
) {
|
||||
sql_query(" ALTER TABLE `{$g5['auth_table']}` CHANGE `au_menu` `au_menu` VARCHAR(50) NOT NULL; ", true);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// qa config 테이블 auto id key 추가
|
||||
$row = sql_fetch("select * from `{$g5['qa_config_table']}` limit 1");
|
||||
if (!isset($row['qa_id'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['qa_config_table']}` ADD COLUMN `qa_id` INT(11) NOT NULL AUTO_INCREMENT FIRST,
|
||||
ADD PRIMARY KEY (`qa_id`); ", true);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// config 기본 테이블 auto id key 추가
|
||||
if (!isset($config['cf_id'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD COLUMN `cf_id` INT(11) NOT NULL AUTO_INCREMENT FIRST,
|
||||
ADD PRIMARY KEY (`cf_id`); ", true);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// login 테이블 auto id key 추가
|
||||
$row = sql_fetch("select * from `{$g5['login_table']}` limit 1");
|
||||
if (!isset($row['lo_id'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['login_table']}`
|
||||
ADD COLUMN `lo_id` INT(11) NOT NULL AUTO_INCREMENT FIRST,
|
||||
DROP PRIMARY KEY,
|
||||
ADD PRIMARY KEY (`lo_id`),
|
||||
ADD UNIQUE KEY `lo_ip_unique` (`lo_ip`) ", true);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// visit 테이블 auto id key 로 변경
|
||||
$result = sql_query("describe `{$g5['visit_table']}`");
|
||||
while ($row = sql_fetch_array($result)){
|
||||
if (isset($row['Field']) && $row['Field'] === 'vi_id' && (isset($row['Default']) && $row['Default'] == 0)){
|
||||
sql_query("ALTER TABLE `{$g5['visit_table']}`
|
||||
CHANGE COLUMN `vi_id` `vi_id` INT(11) NOT NULL AUTO_INCREMENT;
|
||||
", false);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
}
|
||||
|
||||
// SMS5 테이블 G5_TABLE_PREFIX 적용
|
||||
if($g5['sms5_prefix'] != 'sms5_' && sql_num_rows(sql_query("show tables like 'sms5_config'")))
|
||||
{
|
||||
$tables = array('config','write','history','book','book_group','form','form_group');
|
||||
|
||||
foreach($tables as $name){
|
||||
$old_table = 'sms5_' . $name;
|
||||
$new_table = $g5['sms5_prefix'] . $name;
|
||||
|
||||
// 기존 테이블이 있고, G5_TABLE_PREFIX 적용 테이블이 없을 경우 → 테이블명 변경
|
||||
if(sql_num_rows(sql_query("SHOW TABLES LIKE '{$old_table}' "))){
|
||||
if(!sql_num_rows(sql_query("SHOW TABLES LIKE '{$new_table}' "))){
|
||||
sql_query("RENAME TABLE {$old_table} TO {$new_table}", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// 카카오톡 프리셋 테이블
|
||||
if( isset($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(
|
||||
" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_use_promotion` tinyint(1) NOT NULL DEFAULT '0' AFTER `cf_privacy` ",
|
||||
true
|
||||
);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// 광고성 정보 수신 동의 여부 필드 추가 + 메일 / SMS 수신 일자 추가
|
||||
if (!isset($member['mb_marketing_agree'])) {
|
||||
sql_query(
|
||||
" ALTER TABLE `{$g5['member_table']}`
|
||||
ADD `mb_marketing_agree` tinyint(1) NOT NULL DEFAULT '0' AFTER `mb_scrap_cnt`,
|
||||
ADD `mb_marketing_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `mb_marketing_agree`,
|
||||
ADD `mb_thirdparty_agree` tinyint(1) NOT NULL DEFAULT '0' AFTER `mb_marketing_date`,
|
||||
ADD `mb_thirdparty_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `mb_thirdparty_agree`,
|
||||
ADD `mb_agree_log` TEXT NOT NULL AFTER `mb_thirdparty_date`,
|
||||
ADD `mb_mailling_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `mb_mailling`,
|
||||
ADD `mb_sms_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `mb_sms` ",
|
||||
true
|
||||
);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// 게시판 설정 - SMS/알림톡 사용 여부 추가
|
||||
if(!sql_query(" select bo_use_kakaotalk from {$g5['board_table']} limit 1", false)) {
|
||||
sql_query(
|
||||
" ALTER TABLE `{$g5['board_table']}`
|
||||
ADD `bo_use_kakaotalk` VARCHAR(50) NOT NULL DEFAULT '' AFTER `bo_use_email` ",
|
||||
true
|
||||
);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// 게시판 알림 설정 필드 추가
|
||||
if (!isset($member['mb_board_post'])) {
|
||||
sql_query(
|
||||
" ALTER TABLE `{$g5['member_table']}`
|
||||
ADD `mb_board_post` tinyint(1) NOT NULL DEFAULT '0' AFTER `mb_agree_log`,
|
||||
ADD `mb_board_reply` tinyint(1) NOT NULL DEFAULT '0' AFTER `mb_board_post`,
|
||||
ADD `mb_board_comment` tinyint(1) NOT NULL DEFAULT '0' AFTER `mb_board_reply`,
|
||||
ADD `mb_board_recomment` tinyint(1) NOT NULL DEFAULT '0' AFTER `mb_board_comment` ",
|
||||
true
|
||||
);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// 재입고 알림 - 채널 구분 (1=SMS, 2=알림톡)
|
||||
if (defined('G5_USE_SHOP') && G5_USE_SHOP) {
|
||||
if(sql_query(" DESC {$g5['g5_shop_item_stocksms_table']} ", false)) {
|
||||
if(!sql_query(" select ss_channel from {$g5['g5_shop_item_stocksms_table']} limit 1", false)) {
|
||||
sql_query(
|
||||
" ALTER TABLE `{$g5['g5_shop_item_stocksms_table']}`
|
||||
ADD `ss_channel` tinyint(4) NOT NULL DEFAULT '1' AFTER `ss_ip` ",
|
||||
true
|
||||
);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$is_check = run_replace('admin_dbupgrade', $is_check);
|
||||
|
||||
$db_upgrade_msg = $is_check ? 'DB 업그레이드가 완료되었습니다.' : '더 이상 업그레이드 할 내용이 없습니다.<br>현재 DB 업그레이드가 완료된 상태입니다.';
|
||||
|
||||
@@ -30,6 +30,7 @@ if ($w == "")
|
||||
sql_query($sql);
|
||||
|
||||
$fa_id = sql_insert_id();
|
||||
run_event('admin_faq_item_created', $fa_id, $fm_id);
|
||||
}
|
||||
else if ($w == "u")
|
||||
{
|
||||
@@ -37,11 +38,14 @@ else if ($w == "u")
|
||||
set $sql_common
|
||||
where fa_id = '$fa_id' ";
|
||||
sql_query($sql);
|
||||
run_event('admin_faq_item_updated', $fa_id, $fm_id);
|
||||
|
||||
}
|
||||
else if ($w == "d")
|
||||
{
|
||||
$sql = " delete from {$g5['faq_table']} where fa_id = '$fa_id' ";
|
||||
sql_query($sql);
|
||||
run_event('admin_faq_item_deleted', $fa_id, $fm_id);
|
||||
}
|
||||
|
||||
if ($w == 'd')
|
||||
|
||||
@@ -49,9 +49,13 @@ if ($w == "") {
|
||||
sql_query($sql);
|
||||
|
||||
$fm_id = sql_insert_id();
|
||||
run_event('admin_faq_master_created', $fm_id);
|
||||
|
||||
} elseif ($w == "u") {
|
||||
$sql = " update {$g5['faq_master_table']} $sql_common where fm_id = '$fm_id' ";
|
||||
sql_query($sql);
|
||||
run_event('admin_faq_master_updated', $fm_id);
|
||||
|
||||
} elseif ($w == "d") {
|
||||
@unlink(G5_DATA_PATH . "/faq/{$fm_id}_h");
|
||||
@unlink(G5_DATA_PATH . "/faq/{$fm_id}_t");
|
||||
@@ -63,6 +67,8 @@ if ($w == "") {
|
||||
// FAQ상세삭제
|
||||
$sql = " delete from {$g5['faq_table']} where fm_id = '$fm_id' ";
|
||||
sql_query($sql);
|
||||
|
||||
run_event('admin_faq_master_deleted', $fm_id);
|
||||
}
|
||||
|
||||
if ($w == "" || $w == "u") {
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 6.0 KiB |
+298
-277
@@ -3,8 +3,10 @@ $sub_menu = '100000';
|
||||
require_once './_common.php';
|
||||
|
||||
@require_once './safe_check.php';
|
||||
|
||||
if (function_exists('social_log_file_delete')) {
|
||||
social_log_file_delete(86400); //소셜로그인 디버그 파일 24시간 지난것은 삭제
|
||||
//소셜로그인 디버그 파일 24시간 지난것은 삭제
|
||||
social_log_file_delete(86400);
|
||||
}
|
||||
|
||||
$g5['title'] = '관리자메인';
|
||||
@@ -14,304 +16,323 @@ $new_member_rows = 5;
|
||||
$new_point_rows = 5;
|
||||
$new_write_rows = 5;
|
||||
|
||||
$sql_common = " from {$g5['member_table']} ";
|
||||
|
||||
$sql_search = " where (1) ";
|
||||
|
||||
if ($is_admin != 'super') {
|
||||
$sql_search .= " and mb_level <= '{$member['mb_level']}' ";
|
||||
$addtional_content_before = run_replace('adm_index_addtional_content_before', '', $is_admin, $auth, $member);
|
||||
if ($addtional_content_before) {
|
||||
echo $addtional_content_before;
|
||||
}
|
||||
|
||||
if (!$sst) {
|
||||
$sst = "mb_datetime";
|
||||
$sod = "desc";
|
||||
}
|
||||
if (!auth_check_menu($auth, '200100', 'r', true)) {
|
||||
$sql_common = " from {$g5['member_table']} ";
|
||||
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
$sql_search = " where (1) ";
|
||||
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
// 탈퇴회원수
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} and mb_leave_date <> '' {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$leave_count = $row['cnt'];
|
||||
|
||||
// 차단회원수
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} and mb_intercept_date <> '' {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$intercept_count = $row['cnt'];
|
||||
|
||||
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$new_member_rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$colspan = 12;
|
||||
?>
|
||||
|
||||
<section>
|
||||
<h2>신규가입회원 <?php echo $new_member_rows ?>건 목록</h2>
|
||||
<div class="local_desc02 local_desc">
|
||||
총회원수 <?php echo number_format($total_count) ?>명 중 차단 <?php echo number_format($intercept_count) ?>명, 탈퇴 : <?php echo number_format($leave_count) ?>명
|
||||
</div>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption>신규가입회원</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">회원아이디</th>
|
||||
<th scope="col">이름</th>
|
||||
<th scope="col">닉네임</th>
|
||||
<th scope="col">권한</th>
|
||||
<th scope="col">포인트</th>
|
||||
<th scope="col">수신</th>
|
||||
<th scope="col">공개</th>
|
||||
<th scope="col">인증</th>
|
||||
<th scope="col">차단</th>
|
||||
<th scope="col">그룹</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||
// 접근가능한 그룹수
|
||||
$sql2 = " select count(*) as cnt from {$g5['group_member_table']} where mb_id = '{$row['mb_id']}' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
$group = "";
|
||||
if ($row2['cnt']) {
|
||||
$group = '<a href="./boardgroupmember_form.php?mb_id=' . $row['mb_id'] . '">' . $row2['cnt'] . '</a>';
|
||||
}
|
||||
|
||||
if ($is_admin == 'group') {
|
||||
$s_mod = '';
|
||||
$s_del = '';
|
||||
} else {
|
||||
$s_mod = '<a href="./member_form.php?$qstr&w=u&mb_id=' . $row['mb_id'] . '">수정</a>';
|
||||
$s_del = '<a href="./member_delete.php?' . $qstr . '&w=d&mb_id=' . $row['mb_id'] . '&url=' . $_SERVER['SCRIPT_NAME'] . '" onclick="return delete_confirm(this);">삭제</a>';
|
||||
}
|
||||
$s_grp = '<a href="./boardgroupmember_form.php?mb_id=' . $row['mb_id'] . '">그룹</a>';
|
||||
|
||||
$leave_date = $row['mb_leave_date'] ? $row['mb_leave_date'] : date("Ymd", G5_SERVER_TIME);
|
||||
$intercept_date = $row['mb_intercept_date'] ? $row['mb_intercept_date'] : date("Ymd", G5_SERVER_TIME);
|
||||
|
||||
$mb_nick = get_sideview($row['mb_id'], get_text($row['mb_nick']), $row['mb_email'], $row['mb_homepage']);
|
||||
|
||||
$mb_id = $row['mb_id'];
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_mbid"><?php echo $mb_id ?></td>
|
||||
<td class="td_mbname"><?php echo get_text($row['mb_name']); ?></td>
|
||||
<td class="td_mbname sv_use">
|
||||
<div><?php echo $mb_nick ?></div>
|
||||
</td>
|
||||
<td class="td_num"><?php echo $row['mb_level'] ?></td>
|
||||
<td><a href="./point_list.php?sfl=mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo number_format($row['mb_point']) ?></a></td>
|
||||
<td class="td_boolean"><?php echo $row['mb_mailling'] ? '예' : '아니오'; ?></td>
|
||||
<td class="td_boolean"><?php echo $row['mb_open'] ? '예' : '아니오'; ?></td>
|
||||
<td class="td_boolean"><?php echo preg_match('/[1-9]/', $row['mb_email_certify']) ? '예' : '아니오'; ?></td>
|
||||
<td class="td_boolean"><?php echo $row['mb_intercept_date'] ? '예' : '아니오'; ?></td>
|
||||
<td class="td_category"><?php echo $group ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if ($i == 0) {
|
||||
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_list03 btn_list">
|
||||
<a href="./member_list.php">회원 전체보기</a>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<?php
|
||||
$sql_common = " from {$g5['board_new_table']} a, {$g5['board_table']} b, {$g5['group_table']} c where a.bo_table = b.bo_table and b.gr_id = c.gr_id ";
|
||||
|
||||
if ($gr_id) {
|
||||
$sql_common .= " and b.gr_id = '$gr_id' ";
|
||||
}
|
||||
if (isset($view) && $view) {
|
||||
if ($view == 'w') {
|
||||
$sql_common .= " and a.wr_id = a.wr_parent ";
|
||||
} elseif ($view == 'c') {
|
||||
$sql_common .= " and a.wr_id <> a.wr_parent ";
|
||||
if ($is_admin != 'super') {
|
||||
$sql_search .= " and mb_level <= '{$member['mb_level']}' ";
|
||||
}
|
||||
}
|
||||
$sql_order = " order by a.bn_id desc ";
|
||||
|
||||
$sql = " select count(*) as cnt {$sql_common} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
if (!$sst) {
|
||||
$sst = "mb_datetime";
|
||||
$sod = "desc";
|
||||
}
|
||||
|
||||
$colspan = 5;
|
||||
?>
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
|
||||
<section>
|
||||
<h2>최근게시물</h2>
|
||||
$sql = " SELECT count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption>최근게시물</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">그룹</th>
|
||||
<th scope="col">게시판</th>
|
||||
<th scope="col">제목</th>
|
||||
<th scope="col">이름</th>
|
||||
<th scope="col">일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$sql = " select a.*, b.bo_subject, c.gr_subject, c.gr_id {$sql_common} {$sql_order} limit {$new_write_rows} ";
|
||||
$result = sql_query($sql);
|
||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||
$tmp_write_table = $g5['write_prefix'] . $row['bo_table'];
|
||||
// 탈퇴회원수
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} and mb_leave_date <> '' {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$leave_count = $row['cnt'];
|
||||
|
||||
// 원글
|
||||
if ($row['wr_id'] == $row['wr_parent']) {
|
||||
$comment = "";
|
||||
$comment_link = "";
|
||||
$row2 = sql_fetch(" select * from $tmp_write_table where wr_id = '{$row['wr_id']}' ");
|
||||
// 차단회원수
|
||||
$sql = " SELECT count(*) as cnt {$sql_common} {$sql_search} and mb_intercept_date <> '' {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$intercept_count = $row['cnt'];
|
||||
|
||||
$name = get_sideview($row2['mb_id'], get_text(cut_str($row2['wr_name'], $config['cf_cut_name'])), $row2['wr_email'], $row2['wr_homepage']);
|
||||
// 당일인 경우 시간으로 표시함
|
||||
$datetime = substr($row2['wr_datetime'], 0, 10);
|
||||
$datetime2 = $row2['wr_datetime'];
|
||||
if ($datetime == G5_TIME_YMD) {
|
||||
$datetime2 = substr($datetime2, 11, 5);
|
||||
} else {
|
||||
$datetime2 = substr($datetime2, 5, 5);
|
||||
}
|
||||
} else // 코멘트
|
||||
{
|
||||
$comment = '댓글. ';
|
||||
$comment_link = '#c_' . $row['wr_id'];
|
||||
$row2 = sql_fetch(" select * from {$tmp_write_table} where wr_id = '{$row['wr_parent']}' ");
|
||||
$row3 = sql_fetch(" select mb_id, wr_name, wr_email, wr_homepage, wr_datetime from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ");
|
||||
$sql = " SELECT * {$sql_common} {$sql_search} {$sql_order} limit {$new_member_rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$name = get_sideview($row3['mb_id'], get_text(cut_str($row3['wr_name'], $config['cf_cut_name'])), $row3['wr_email'], $row3['wr_homepage']);
|
||||
// 당일인 경우 시간으로 표시함
|
||||
$datetime = substr($row3['wr_datetime'], 0, 10);
|
||||
$datetime2 = $row3['wr_datetime'];
|
||||
if ($datetime == G5_TIME_YMD) {
|
||||
$datetime2 = substr($datetime2, 11, 5);
|
||||
} else {
|
||||
$datetime2 = substr($datetime2, 5, 5);
|
||||
}
|
||||
}
|
||||
?>
|
||||
$colspan = 12;
|
||||
?>
|
||||
|
||||
<section>
|
||||
<h2>신규가입회원 <?php echo $new_member_rows ?>건 목록</h2>
|
||||
<div class="local_desc02 local_desc">
|
||||
총회원수 <?php echo number_format($total_count) ?>명 중 차단 <?php echo number_format($intercept_count) ?>명, 탈퇴 : <?php echo number_format($leave_count) ?>명
|
||||
</div>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption>신규가입회원</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="td_category"><a href="<?php echo G5_BBS_URL ?>/new.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo cut_str($row['gr_subject'], 10) ?></a></td>
|
||||
<td class="td_category"><a href="<?php echo get_pretty_url($row['bo_table']) ?>"><?php echo cut_str($row['bo_subject'], 20) ?></a></td>
|
||||
<td><a href="<?php echo get_pretty_url($row['bo_table'], $row2['wr_id']); ?><?php echo $comment_link ?>"><?php echo $comment ?><?php echo conv_subject($row2['wr_subject'], 100) ?></a></td>
|
||||
<td class="td_mbname">
|
||||
<div><?php echo $name ?></div>
|
||||
</td>
|
||||
<td class="td_datetime"><?php echo $datetime ?></td>
|
||||
<th scope="col">회원아이디</th>
|
||||
<th scope="col">이름</th>
|
||||
<th scope="col">닉네임</th>
|
||||
<th scope="col">권한</th>
|
||||
<th scope="col">포인트</th>
|
||||
<th scope="col">수신</th>
|
||||
<th scope="col">공개</th>
|
||||
<th scope="col">인증</th>
|
||||
<th scope="col">차단</th>
|
||||
<th scope="col">그룹</th>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ($i == 0) {
|
||||
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_list03 btn_list">
|
||||
<a href="<?php echo G5_BBS_URL ?>/new.php">최근게시물 더보기</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
$sql_common = " from {$g5['point_table']} ";
|
||||
$sql_search = " where (1) ";
|
||||
$sql_order = " order by po_id desc ";
|
||||
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$new_point_rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$colspan = 7;
|
||||
?>
|
||||
|
||||
<section>
|
||||
<h2>최근 포인트 발생내역</h2>
|
||||
<div class="local_desc02 local_desc">
|
||||
전체 <?php echo number_format($total_count) ?> 건 중 <?php echo $new_point_rows ?>건 목록
|
||||
</div>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption>최근 포인트 발생내역</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">회원아이디</th>
|
||||
<th scope="col">이름</th>
|
||||
<th scope="col">닉네임</th>
|
||||
<th scope="col">일시</th>
|
||||
<th scope="col">포인트 내용</th>
|
||||
<th scope="col">포인트</th>
|
||||
<th scope="col">포인트합</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$row2['mb_id'] = '';
|
||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||
if ($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']}' ";
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||
// 접근가능한 그룹수
|
||||
$sql2 = " SELECT count(*) as cnt from {$g5['group_member_table']} where mb_id = '{$row['mb_id']}' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
$group = "";
|
||||
if ($row2['cnt']) {
|
||||
$group = '<a href="./boardgroupmember_form.php?mb_id=' . $row['mb_id'] . '">' . $row2['cnt'] . '</a>';
|
||||
}
|
||||
|
||||
if ($is_admin == 'group') {
|
||||
$s_mod = '';
|
||||
$s_del = '';
|
||||
} else {
|
||||
$s_mod = '<a href="./member_form.php?$qstr&w=u&mb_id=' . $row['mb_id'] . '">수정</a>';
|
||||
$s_del = '<a href="./member_delete.php?' . $qstr . '&w=d&mb_id=' . $row['mb_id'] . '&url=' . $_SERVER['SCRIPT_NAME'] . '" onclick="return delete_confirm(this);">삭제</a>';
|
||||
}
|
||||
$s_grp = '<a href="./boardgroupmember_form.php?mb_id=' . $row['mb_id'] . '">그룹</a>';
|
||||
|
||||
$leave_date = $row['mb_leave_date'] ? $row['mb_leave_date'] : date("Ymd", G5_SERVER_TIME);
|
||||
$intercept_date = $row['mb_intercept_date'] ? $row['mb_intercept_date'] : date("Ymd", G5_SERVER_TIME);
|
||||
|
||||
$mb_nick = get_sideview($row['mb_id'], get_text($row['mb_nick']), $row['mb_email'], $row['mb_homepage']);
|
||||
|
||||
$mb_id = $row['mb_id'];
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_mbid"><?php echo $mb_id ?></td>
|
||||
<td class="td_mbname"><?php echo get_text($row['mb_name']); ?></td>
|
||||
<td class="td_mbname sv_use">
|
||||
<div><?php echo $mb_nick ?></div>
|
||||
</td>
|
||||
<td class="td_num"><?php echo $row['mb_level'] ?></td>
|
||||
<td><a href="./point_list.php?sfl=mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo number_format($row['mb_point']) ?></a></td>
|
||||
<td class="td_boolean"><?php echo $row['mb_mailling'] ? '예' : '아니오'; ?></td>
|
||||
<td class="td_boolean"><?php echo $row['mb_open'] ? '예' : '아니오'; ?></td>
|
||||
<td class="td_boolean"><?php echo preg_match('/[1-9]/', $row['mb_email_certify']) ? '예' : '아니오'; ?></td>
|
||||
<td class="td_boolean"><?php echo $row['mb_intercept_date'] ? '예' : '아니오'; ?></td>
|
||||
<td class="td_category"><?php echo $group ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
$mb_nick = get_sideview($row['mb_id'], $row2['mb_nick'], $row2['mb_email'], $row2['mb_homepage']);
|
||||
|
||||
$link1 = $link2 = "";
|
||||
if (!preg_match("/^\@/", $row['po_rel_table']) && $row['po_rel_table']) {
|
||||
$link1 = '<a href="' . get_pretty_url($row['po_rel_table'], $row['po_rel_id']) . '" target="_blank">';
|
||||
$link2 = '</a>';
|
||||
if ($i == 0) {
|
||||
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_list03 btn_list">
|
||||
<a href="./member_list.php">회원 전체보기</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
} //endif 최신 회원
|
||||
|
||||
if (!auth_check_menu($auth, '300100', 'r', true)) {
|
||||
|
||||
$sql_common = " from {$g5['board_new_table']} a, {$g5['board_table']} b, {$g5['group_table']} c where a.bo_table = b.bo_table and b.gr_id = c.gr_id ";
|
||||
|
||||
if ($gr_id) {
|
||||
$sql_common .= " and b.gr_id = '{$gr_id}' ";
|
||||
}
|
||||
if (isset($view) && $view) {
|
||||
if ($view == 'w') {
|
||||
$sql_common .= " and a.wr_id = a.wr_parent ";
|
||||
} elseif ($view == 'c') {
|
||||
$sql_common .= " and a.wr_id <> a.wr_parent ";
|
||||
}
|
||||
}
|
||||
$sql_order = " order by a.bn_id desc ";
|
||||
|
||||
$sql = " SELECT count(*) as cnt {$sql_common} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$colspan = 5;
|
||||
?>
|
||||
|
||||
<section>
|
||||
<h2>최근게시물</h2>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption>최근게시물</caption>
|
||||
<thead>
|
||||
<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_name sv_use">
|
||||
<div><?php echo $mb_nick ?></div>
|
||||
</td>
|
||||
<td class="td_datetime"><?php echo $row['po_datetime'] ?></td>
|
||||
<td><?php echo $link1 . $row['po_content'] . $link2 ?></td>
|
||||
<td class="td_numbig"><?php echo number_format($row['po_point']) ?></td>
|
||||
<td class="td_numbig"><?php echo number_format($row['po_mb_point']) ?></td>
|
||||
<th scope="col">그룹</th>
|
||||
<th scope="col">게시판</th>
|
||||
<th scope="col">제목</th>
|
||||
<th scope="col">이름</th>
|
||||
<th scope="col">일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$sql = " SELECT a.*, b.bo_subject, c.gr_subject, c.gr_id {$sql_common} {$sql_order} limit {$new_write_rows} ";
|
||||
$result = sql_query($sql);
|
||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||
$tmp_write_table = $g5['write_prefix'] . $row['bo_table'];
|
||||
|
||||
<?php
|
||||
}
|
||||
if ($row['wr_id'] == $row['wr_parent']) {
|
||||
// 원글
|
||||
$comment = "";
|
||||
$comment_link = "";
|
||||
$row2 = sql_fetch(" SELECT * from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ");
|
||||
|
||||
if ($i == 0) {
|
||||
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
$name = get_sideview($row2['mb_id'], get_text(cut_str($row2['wr_name'], $config['cf_cut_name'])), $row2['wr_email'], $row2['wr_homepage']);
|
||||
// 당일인 경우 시간으로 표시함
|
||||
$datetime = substr($row2['wr_datetime'], 0, 10);
|
||||
$datetime2 = $row2['wr_datetime'];
|
||||
if ($datetime == G5_TIME_YMD) {
|
||||
$datetime2 = substr($datetime2, 11, 5);
|
||||
} else {
|
||||
$datetime2 = substr($datetime2, 5, 5);
|
||||
}
|
||||
} else {
|
||||
// 코멘트
|
||||
$comment = '댓글. ';
|
||||
$comment_link = '#c_' . $row['wr_id'];
|
||||
$row2 = sql_fetch(" SELECT * from {$tmp_write_table} where wr_id = '{$row['wr_parent']}' ");
|
||||
$row3 = sql_fetch(" SELECT mb_id, wr_name, wr_email, wr_homepage, wr_datetime from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ");
|
||||
|
||||
<div class="btn_list03 btn_list">
|
||||
<a href="./point_list.php">포인트내역 전체보기</a>
|
||||
</div>
|
||||
</section>
|
||||
$name = get_sideview($row3['mb_id'], get_text(cut_str($row3['wr_name'], $config['cf_cut_name'])), $row3['wr_email'], $row3['wr_homepage']);
|
||||
// 당일인 경우 시간으로 표시함
|
||||
$datetime = substr($row3['wr_datetime'], 0, 10);
|
||||
$datetime2 = $row3['wr_datetime'];
|
||||
if ($datetime == G5_TIME_YMD) {
|
||||
$datetime2 = substr($datetime2, 11, 5);
|
||||
} else {
|
||||
$datetime2 = substr($datetime2, 5, 5);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
require_once './admin.tail.php';
|
||||
<tr>
|
||||
<td class="td_category"><a href="<?php echo G5_BBS_URL ?>/new.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo cut_str($row['gr_subject'], 10) ?></a></td>
|
||||
<td class="td_category"><a href="<?php echo get_pretty_url($row['bo_table']) ?>"><?php echo cut_str($row['bo_subject'], 20) ?></a></td>
|
||||
<td><a href="<?php echo get_pretty_url($row['bo_table'], $row2['wr_id']); ?><?php echo $comment_link ?>"><?php echo $comment ?><?php echo conv_subject($row2['wr_subject'], 100) ?></a></td>
|
||||
<td class="td_mbname">
|
||||
<div><?php echo $name ?></div>
|
||||
</td>
|
||||
<td class="td_datetime"><?php echo $datetime ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ($i == 0) {
|
||||
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_list03 btn_list">
|
||||
<a href="<?php echo G5_BBS_URL ?>/new.php">최근게시물 더보기</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
} //endif 최근게시물
|
||||
|
||||
if (!auth_check_menu($auth, '200200', 'r', true)) {
|
||||
|
||||
$sql_common = " from {$g5['point_table']} ";
|
||||
$sql_search = " where (1) ";
|
||||
$sql_order = " order by po_id desc ";
|
||||
|
||||
$sql = " SELECT count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$sql = " SELECT * {$sql_common} {$sql_search} {$sql_order} limit {$new_point_rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$colspan = 7;
|
||||
?>
|
||||
|
||||
<section>
|
||||
<h2>최근 포인트 발생내역</h2>
|
||||
<div class="local_desc02 local_desc">
|
||||
전체 <?php echo number_format($total_count) ?> 건 중 <?php echo $new_point_rows ?>건 목록
|
||||
</div>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption>최근 포인트 발생내역</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">회원아이디</th>
|
||||
<th scope="col">이름</th>
|
||||
<th scope="col">닉네임</th>
|
||||
<th scope="col">일시</th>
|
||||
<th scope="col">포인트 내용</th>
|
||||
<th scope="col">포인트</th>
|
||||
<th scope="col">포인트합</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$row2['mb_id'] = '';
|
||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||
if ($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']);
|
||||
|
||||
$link1 = $link2 = "";
|
||||
if (!preg_match("/^\@/", $row['po_rel_table']) && $row['po_rel_table']) {
|
||||
$link1 = '<a href="' . get_pretty_url($row['po_rel_table'], $row['po_rel_id']) . '" target="_blank">';
|
||||
$link2 = '</a>';
|
||||
}
|
||||
?>
|
||||
|
||||
<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_name sv_use">
|
||||
<div><?php echo $mb_nick ?></div>
|
||||
</td>
|
||||
<td class="td_datetime"><?php echo $row['po_datetime'] ?></td>
|
||||
<td><?php echo $link1 . $row['po_content'] . $link2 ?></td>
|
||||
<td class="td_numbig"><?php echo number_format($row['po_point']) ?></td>
|
||||
<td class="td_numbig"><?php echo number_format($row['po_mb_point']) ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0) {
|
||||
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_list03 btn_list">
|
||||
<a href="./point_list.php">포인트내역 전체보기</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
} //endif
|
||||
|
||||
$addtional_content_after = run_replace('adm_index_addtional_content_after', '', $is_admin, $auth, $member);
|
||||
if ($addtional_content_after) {
|
||||
echo $addtional_content_after;
|
||||
}
|
||||
require_once './admin.tail.php';
|
||||
@@ -19,6 +19,7 @@ for ($i = 0; $i < $post_count_chk; $i++) {
|
||||
|
||||
$sql = " delete from {$g5['mail_table']} where ma_id = '$ma_id' ";
|
||||
sql_query($sql);
|
||||
run_event('admin_mail_deleted', $ma_id);
|
||||
}
|
||||
|
||||
goto_url('./mail_list.php');
|
||||
|
||||
@@ -4,18 +4,20 @@ require_once './_common.php';
|
||||
|
||||
auth_check_menu($auth, $sub_menu, 'r');
|
||||
|
||||
$ma_id = isset($_REQUEST['ma_id']) ? (int) $_REQUEST['ma_id'] : 0;
|
||||
|
||||
$ma_last_option = "";
|
||||
|
||||
$sql_common = " from {$g5['member_table']} ";
|
||||
$sql_where = " where (1) ";
|
||||
|
||||
$mb_id1 = isset($_POST['mb_id1']) ? $_POST['mb_id1'] : 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_level_from = isset($_POST['mb_level_from'])? $_POST['mb_level_from'] : 1;
|
||||
$mb_level_to = isset($_POST['mb_level_to']) ? $_POST['mb_level_to'] : 10;
|
||||
$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;
|
||||
|
||||
// 회원ID ..에서 ..까지
|
||||
if ($mb_id1 != 1) {
|
||||
@@ -81,7 +83,7 @@ require_once './admin.head.php';
|
||||
|
||||
<form name="fmailselectlist" id="fmailselectlist" method="post" action="./mail_select_update.php">
|
||||
<input type="hidden" name="token" value="">
|
||||
<input type="hidden" name="ma_id" value="<?php echo $ma_id ?>">
|
||||
<input type="hidden" name="ma_id" value="<?php echo get_text($ma_id); ?>">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
@@ -119,7 +121,7 @@ require_once './admin.head.php';
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<textarea name="ma_list" style="display:none"><?php echo $ma_list ?></textarea>
|
||||
<textarea name="ma_list" style="display:none"><?php echo html_purifier($ma_list); ?></textarea>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
|
||||
@@ -21,6 +21,10 @@ if ($w == '') {
|
||||
ma_time = '" . G5_TIME_YMDHIS . "',
|
||||
ma_ip = '{$_SERVER['REMOTE_ADDR']}' ";
|
||||
sql_query($sql);
|
||||
|
||||
$ma_id = sql_insert_id();
|
||||
run_event('admin_mail_created', $ma_id);
|
||||
|
||||
} elseif ($w == 'u') {
|
||||
$sql = " update {$g5['mail_table']}
|
||||
set ma_subject = '{$ma_subject}',
|
||||
@@ -29,9 +33,12 @@ if ($w == '') {
|
||||
ma_ip = '{$_SERVER['REMOTE_ADDR']}'
|
||||
where ma_id = '{$ma_id}' ";
|
||||
sql_query($sql);
|
||||
run_event('admin_mail_updated', $ma_id);
|
||||
|
||||
} elseif ($w == 'd') {
|
||||
$sql = " delete from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
|
||||
sql_query($sql);
|
||||
run_event('admin_mail_deleted', $ma_id);
|
||||
}
|
||||
|
||||
goto_url('./mail_list.php');
|
||||
|
||||
+157
-8
@@ -52,8 +52,15 @@ if ($w == '') {
|
||||
$sound_only = '<strong class="sound_only">필수</strong>';
|
||||
|
||||
$mb['mb_mailling'] = 1;
|
||||
$mb['mb_sms'] = 1;
|
||||
$mb['mb_open'] = 1;
|
||||
$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);
|
||||
@@ -139,6 +146,27 @@ $mb_sms_no = !$mb['mb_sms'] ? 'checked="checked"' : '';
|
||||
$mb_open_yes = $mb['mb_open'] ? 'checked="checked"' : '';
|
||||
$mb_open_no = !$mb['mb_open'] ? 'checked="checked"' : '';
|
||||
|
||||
// 마케팅 목적의 개인정보 수집 및 이용
|
||||
$mb_marketing_agree_yes = $mb['mb_marketing_agree'] ? 'checked="checked"' : '';
|
||||
$mb_marketing_agree_no = !$mb['mb_marketing_agree'] ? 'checked="checked"' : '';
|
||||
|
||||
// 개인정보 제3자 제공 동의
|
||||
$mb_thirdparty_agree_yes = $mb['mb_thirdparty_agree'] ? 'checked="checked"' : '';
|
||||
$mb_thirdparty_agree_no = !$mb['mb_thirdparty_agree'] ? 'checked="checked"' : '';
|
||||
|
||||
// 알림 설정 (전용 컬럼 사용)
|
||||
$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'])) {
|
||||
@@ -205,7 +233,7 @@ if (isset($mb_id) && $mb_id) {
|
||||
if ($mb['mb_intercept_date']) {
|
||||
$g5['title'] = "차단된 ";
|
||||
} else {
|
||||
$g5['title'] .= "";
|
||||
$g5['title'] = "";
|
||||
}
|
||||
$g5['title'] .= '회원 ' . $html_title;
|
||||
require_once './admin.head.php';
|
||||
@@ -240,7 +268,19 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
<?php if ($w == 'u') { ?><a href="./boardgroupmember_form.php?mb_id=<?php echo $mb['mb_id'] ?>" class="btn_frmline">접근가능그룹보기</a><?php } ?>
|
||||
</td>
|
||||
<th scope="row"><label for="mb_password">비밀번호<?php echo $sound_only ?></label></th>
|
||||
<td><input type="password" name="mb_password" id="mb_password" <?php echo $required_mb_password ?> class="frm_input <?php echo $required_mb_password ?>" size="15" maxlength="20"></td>
|
||||
<td>
|
||||
<div>
|
||||
<input type="password" name="mb_password" id="mb_password" <?php echo $required_mb_password ?> class="frm_input <?php echo $required_mb_password ?>" size="15" maxlength="20">
|
||||
</div>
|
||||
<div id="mb_password_captcha_wrap" style="display:none">
|
||||
<?php
|
||||
require_once G5_CAPTCHA_PATH . '/captcha.lib.php';
|
||||
$captcha_html = captcha_html();
|
||||
$captcha_js = chk_captcha_js();
|
||||
echo $captcha_html;
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_name">이름(실명)<strong class="sound_only">필수</strong></label></th>
|
||||
@@ -342,21 +382,64 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">메일 수신</th>
|
||||
<th scope="row">광고성 이메일 수신</th>
|
||||
<td>
|
||||
<input type="radio" name="mb_mailling" value="1" id="mb_mailling_yes" <?php echo $mb_mailling_yes; ?>>
|
||||
<label for="mb_mailling_yes">예</label>
|
||||
<input type="radio" name="mb_mailling" value="0" id="mb_mailling_no" <?php echo $mb_mailling_no; ?>>
|
||||
<label for="mb_mailling_no">아니오</label>
|
||||
|
||||
<?php if($w == "u" && $mb['mb_mailling_date'] != "0000-00-00 00:00:00"){
|
||||
echo $mb['mb_mailling'] == 1 ? "<br>(동의 일자: ".$mb['mb_mailling_date'].")" : '';
|
||||
} ?>
|
||||
</td>
|
||||
<th scope="row"><label for="mb_sms_yes">SMS 수신</label></th>
|
||||
<th scope="row"><label for="mb_sms_yes">광고성 SMS/카카오톡 수신</label></th>
|
||||
<td>
|
||||
<input type="radio" name="mb_sms" value="1" id="mb_sms_yes" <?php echo $mb_sms_yes; ?>>
|
||||
<label for="mb_sms_yes">예</label>
|
||||
<input type="radio" name="mb_sms" value="0" id="mb_sms_no" <?php echo $mb_sms_no; ?>>
|
||||
<label for="mb_sms_no">아니오</label>
|
||||
<?php if($w == "u" && $mb['mb_sms_date'] != "0000-00-00 00:00:00"){
|
||||
echo $mb['mb_sms'] == 1 ? "<br>(동의 일자: ".$mb['mb_sms_date'].")" : '';
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">마케팅 목적의<br>개인정보 수집 및 이용</th>
|
||||
<td>
|
||||
<input type="radio" name="mb_marketing_agree" value="1" id="mb_marketing_agree_yes" <?php echo $mb_marketing_agree_yes; ?>>
|
||||
<label for="mb_marketing_agree_yes">예</label>
|
||||
<input type="radio" name="mb_marketing_agree" value="0" id="mb_marketing_agree_no" <?php echo $mb_marketing_agree_no; ?>>
|
||||
<label for="mb_marketing_agree_no">아니오</label>
|
||||
|
||||
<?php if($w == "u" && $mb['mb_marketing_date'] != "0000-00-00 00:00:00"){
|
||||
echo $mb['mb_marketing_agree'] == 1 ? "<br>(동의 일자: ".$mb['mb_marketing_date'].")" : '';
|
||||
} ?>
|
||||
</td>
|
||||
<th scope="row"><label for="mb_sms_yes">개인정보 제3자 제공</label></th>
|
||||
<td>
|
||||
<input type="radio" name="mb_thirdparty_agree" value="1" id="mb_thirdparty_agree_yes" <?php echo $mb_thirdparty_agree_yes; ?>>
|
||||
<label for="mb_thirdparty_agree_yes">예</label>
|
||||
<input type="radio" name="mb_thirdparty_agree" value="0" id="mb_thirdparty_agree_no" <?php echo $mb_thirdparty_agree_no; ?>>
|
||||
<label for="mb_thirdparty_agree_no">아니오</label>
|
||||
|
||||
<?php if($w == "u" && $mb['mb_thirdparty_date'] != "0000-00-00 00:00:00"){
|
||||
echo $mb['mb_thirdparty_agree'] == 1 ? "<br>(동의 일자: ".$mb['mb_thirdparty_date'].")" : '';
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if($w == "u"){?>
|
||||
<tr>
|
||||
<th scope="row">약관동의 변경내역</th>
|
||||
<td colspan="3">
|
||||
<section id="sodr_request_log_wrap" class="ad_agree_log">
|
||||
<div>
|
||||
<?php echo conv_content($mb['mb_agree_log'], 0); ?>
|
||||
</div>
|
||||
</section>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<th scope="row">정보 공개</th>
|
||||
<td colspan="3">
|
||||
@@ -364,19 +447,22 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
<label for="mb_open_yes">예</label>
|
||||
<input type="radio" name="mb_open" value="0" id="mb_open_no" <?php echo $mb_open_no; ?>>
|
||||
<label for="mb_open_no">아니오</label>
|
||||
<?php if($w == "u" && $mb['mb_open_date'] != "0000-00-00 00:00:00"){
|
||||
echo $mb['mb_open'] == 1 ? "<br>(동의 일자: ".$mb['mb_open_date'].")" : '';
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_signature">서명</label></th>
|
||||
<td colspan="3"><textarea name="mb_signature" id="mb_signature"><?php echo $mb['mb_signature'] ?></textarea></td>
|
||||
<td colspan="3"><textarea name="mb_signature" id="mb_signature"><?php echo html_purifier($mb['mb_signature']); ?></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_profile">자기 소개</label></th>
|
||||
<td colspan="3"><textarea name="mb_profile" id="mb_profile"><?php echo $mb['mb_profile'] ?></textarea></td>
|
||||
<td colspan="3"><textarea name="mb_profile" id="mb_profile"><?php echo html_purifier($mb['mb_profile']); ?></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_memo">메모</label></th>
|
||||
<td colspan="3"><textarea name="mb_memo" id="mb_memo"><?php echo $mb['mb_memo'] ?></textarea></td>
|
||||
<td colspan="3"><textarea name="mb_memo" id="mb_memo"><?php echo html_purifier($mb['mb_memo']); ?></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_cert_history">본인인증 내역</label></th>
|
||||
@@ -443,7 +529,7 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
<?php if ($config['cf_use_recommend']) { // 추천인 사용 ?>
|
||||
<tr>
|
||||
<th scope="row">추천인</th>
|
||||
<td colspan="3"><?php echo ($mb['mb_recommend'] ? get_text($mb['mb_recommend']) : '없음'); // 081022 : CSRF 보안 결함으로 인한 코드 수정 ?></td>
|
||||
<td colspan="3"><?php echo ((isset($mb['mb_recommend']) && $mb['mb_recommend']) ? get_text($mb['mb_recommend']) : '없음'); // 081022 : CSRF 보안 결함으로 인한 코드 수정 ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
@@ -553,6 +639,42 @@ 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>
|
||||
@@ -582,8 +704,35 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
return false;
|
||||
}
|
||||
|
||||
if( jQuery("#mb_password").val() ){
|
||||
<?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
jQuery(function($){
|
||||
$("#captcha_key").prop('required', false).removeAttr("required").removeClass("required");
|
||||
|
||||
$("#mb_password").on("keyup", function(e) {
|
||||
var $warp = $("#mb_password_captcha_wrap"),
|
||||
tooptipid = "mp_captcha_tooltip",
|
||||
$span_text = $("<span>", {id:tooptipid, style:"font-size:0.95em;letter-spacing:-0.1em"}).html("비밀번호를 수정할 경우 캡챠를 입력해야 합니다."),
|
||||
$parent = $(this).parent(),
|
||||
is_invisible_recaptcha = $("#captcha").hasClass("invisible_recaptcha");
|
||||
|
||||
if($(this).val()){
|
||||
$warp.show();
|
||||
if(! is_invisible_recaptcha) {
|
||||
$warp.css("margin-top","1em");
|
||||
if(! $("#"+tooptipid).length){ $parent.append($span_text) }
|
||||
}
|
||||
} else {
|
||||
$warp.hide();
|
||||
if($("#"+tooptipid).length && ! is_invisible_recaptcha){ $parent.find("#"+tooptipid).remove(); }
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
run_event('admin_member_form_after', $mb, $w);
|
||||
|
||||
+111
-3
@@ -18,6 +18,25 @@ $mb_certify_case = isset($_POST['mb_certify_case']) ? preg_replace('/[^0-9a-z_]/
|
||||
$mb_certify = isset($_POST['mb_certify']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['mb_certify']) : '';
|
||||
$mb_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;
|
||||
|
||||
// 관리자가 자동등록방지를 사용해야 할 경우 ( 회원의 비밀번호 변경시 캡챠를 체크한다 )
|
||||
if ($mb_password) {
|
||||
include_once(G5_CAPTCHA_PATH . '/captcha.lib.php');
|
||||
|
||||
if (!chk_captcha()) {
|
||||
alert('자동등록방지 숫자가 틀렸습니다.');
|
||||
}
|
||||
}
|
||||
|
||||
// 휴대폰번호 체크
|
||||
$mb_hp = hyphen_hp_number($_POST['mb_hp']);
|
||||
if ($mb_hp) {
|
||||
@@ -77,8 +96,6 @@ foreach ($check_keys as $key) {
|
||||
}
|
||||
}
|
||||
|
||||
$mb_memo = isset($_POST['mb_memo']) ? $_POST['mb_memo'] : '';
|
||||
|
||||
$sql_common = " mb_name = '{$posts['mb_name']}',
|
||||
mb_nick = '{$mb_nick}',
|
||||
mb_email = '{$mb_email}',
|
||||
@@ -100,8 +117,15 @@ $sql_common = " mb_name = '{$posts['mb_name']}',
|
||||
mb_mailling = '{$posts['mb_mailling']}',
|
||||
mb_sms = '{$posts['mb_sms']}',
|
||||
mb_open = '{$posts['mb_open']}',
|
||||
mb_open_date = '".G5_TIME_YMDHIS."',
|
||||
mb_profile = '{$posts['mb_profile']}',
|
||||
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']}',
|
||||
@@ -133,6 +157,36 @@ if ($w == '') {
|
||||
alert('이미 존재하는 이메일입니다.\\nID : ' . $row['mb_id'] . '\\n이름 : ' . $row['mb_name'] . '\\n닉네임 : ' . $row['mb_nick'] . '\\n메일 : ' . $row['mb_email']);
|
||||
}
|
||||
|
||||
$agree_items = [];
|
||||
// 마케팅 목적의 개인정보 수집 및 이용
|
||||
if ($mb_marketing_agree == 1) {
|
||||
$sql_common .= " , mb_marketing_date = '".G5_TIME_YMDHIS."' ";
|
||||
$agree_items[] = "마케팅 목적의 개인정보 수집 및 이용(동의)";
|
||||
}
|
||||
|
||||
// 광고성 이메일 수신
|
||||
if ($mb_mailling == 1) {
|
||||
$sql_common .= " , mb_mailling_date = '".G5_TIME_YMDHIS."' ";
|
||||
$agree_items[] = "광고성 이메일 수신(동의)";
|
||||
}
|
||||
|
||||
// 광고성 SMS/카카오톡 수신
|
||||
if ($mb_sms == 1) {
|
||||
$sql_common .= " , mb_sms_date = '".G5_TIME_YMDHIS."' ";
|
||||
$agree_items[] = "광고성 SMS/카카오톡 수신(동의)";
|
||||
}
|
||||
|
||||
// 개인정보 제3자 제공
|
||||
if ($mb_thirdparty_agree == 1) {
|
||||
$sql_common .= " , mb_thirdparty_date = '".G5_TIME_YMDHIS."' ";
|
||||
$agree_items[] = "개인정보 제3자 제공(동의)";
|
||||
}
|
||||
|
||||
// 동의 로그 추가
|
||||
if (!empty($agree_items)) {
|
||||
$agree_log = "[".G5_TIME_YMDHIS.", 관리자 회원추가] " . implode(' | ', $agree_items) . "\n";
|
||||
$sql_common .= " , mb_agree_log = CONCAT('{$agree_log}', IFNULL(mb_agree_log, ''))";
|
||||
}
|
||||
sql_query(" insert into {$g5['member_table']} set mb_id = '{$mb_id}', mb_password = '" . get_encrypt_string($mb_password) . "', mb_datetime = '" . G5_TIME_YMDHIS . "', mb_ip = '{$_SERVER['REMOTE_ADDR']}', mb_email_certify = '" . G5_TIME_YMDHIS . "', {$sql_common} ");
|
||||
} elseif ($w == 'u') {
|
||||
$mb = get_member($mb_id);
|
||||
@@ -149,7 +203,13 @@ if ($w == '') {
|
||||
}
|
||||
|
||||
if ($mb_id === $member['mb_id'] && $_POST['mb_level'] != $mb['mb_level']) {
|
||||
alert($mb['mb_id'] . ' : 로그인 중인 관리자 레벨은 수정 할 수 없습니다.');
|
||||
alert($mb['mb_id'] . ' : 로그인 중인 관리자 레벨은 수정할 수 없습니다.');
|
||||
}
|
||||
|
||||
if ($posts['mb_leave_date'] || $posts['mb_intercept_date']){
|
||||
if ($member['mb_id'] === $mb['mb_id'] || is_admin($mb['mb_id']) === 'super'){
|
||||
alert('해당 관리자의 탈퇴 일자 또는 접근 차단 일자를 수정할 수 없습니다.');
|
||||
}
|
||||
}
|
||||
|
||||
// 닉네임중복체크
|
||||
@@ -178,10 +238,54 @@ if ($w == '') {
|
||||
$sql_certify = "";
|
||||
}
|
||||
|
||||
// 현재 데이터 조회
|
||||
$row = sql_fetch("select * from {$g5['member_table']} where mb_id = '{$mb_id}' ");
|
||||
$agree_items = [];
|
||||
|
||||
// 마케팅 목적의 개인정보 수집 및 이용
|
||||
$sql_marketing_date = "";
|
||||
if ($row['mb_marketing_agree'] !== $mb_marketing_agree) {
|
||||
$sql_marketing_date .= " , mb_marketing_date = '".G5_TIME_YMDHIS."' ";
|
||||
$agree_items[] = "마케팅 목적의 개인정보 수집 및 이용(" . ($mb_marketing_agree == 1 ? "동의" : "철회") . ")";
|
||||
}
|
||||
|
||||
// 광고성 이메일 수신
|
||||
$sql_mailling_date = "";
|
||||
if ($row['mb_mailling'] !== $mb_mailling) {
|
||||
$sql_mailling_date .= " , mb_mailling_date = '".G5_TIME_YMDHIS."' ";
|
||||
$agree_items[] = "광고성 이메일 수신(" . ($mb_mailling == 1 ? "동의" : "철회") . ")";
|
||||
}
|
||||
|
||||
// 광고성 SMS/카카오톡 수신
|
||||
$sql_sms_date = "";
|
||||
if ($row['mb_sms'] !== $mb_sms) {
|
||||
$sql_sms_date .= " , mb_sms_date = '".G5_TIME_YMDHIS."' ";
|
||||
$agree_items[] = "광고성 SMS/카카오톡 수신(" . ($mb_sms == 1 ? "동의" : "철회") . ")";
|
||||
}
|
||||
|
||||
// 개인정보 제3자 제공
|
||||
$sql_thirdparty_date = "";
|
||||
if ($row['mb_thirdparty_agree'] !== $mb_thirdparty_agree) {
|
||||
$sql_thirdparty_date .= " , mb_thirdparty_date = '".G5_TIME_YMDHIS."' ";
|
||||
$agree_items[] = "개인정보 제3자 제공(" . ($mb_thirdparty_agree == 1 ? "동의" : "철회") . ")";
|
||||
}
|
||||
|
||||
// 동의 로그 추가
|
||||
$sql_agree_log = "";
|
||||
if (!empty($agree_items)) {
|
||||
$agree_log = "[".G5_TIME_YMDHIS.", 관리자 회원수정] " . implode(' | ', $agree_items) . "\n";
|
||||
$sql_agree_log .= " , mb_agree_log = CONCAT('{$agree_log}', IFNULL(mb_agree_log, ''))";
|
||||
}
|
||||
|
||||
$sql = " update {$g5['member_table']}
|
||||
set {$sql_common}
|
||||
{$sql_password}
|
||||
{$sql_certify}
|
||||
{$sql_mailling_date}
|
||||
{$sql_sms_date}
|
||||
{$sql_marketing_date}
|
||||
{$sql_thirdparty_date}
|
||||
{$sql_agree_log}
|
||||
where mb_id = '{$mb_id}' ";
|
||||
sql_query($sql);
|
||||
} else {
|
||||
@@ -289,6 +393,10 @@ if ($w == '' || $w == 'u') {
|
||||
}
|
||||
}
|
||||
|
||||
if (function_exists('get_admin_captcha_by')) {
|
||||
get_admin_captcha_by('remove');
|
||||
}
|
||||
|
||||
run_event('admin_member_form_update', $w, $mb_id);
|
||||
|
||||
goto_url('./member_form.php?' . $qstr . '&w=u&mb_id=' . $mb_id, false);
|
||||
|
||||
+7
-5
@@ -127,7 +127,7 @@ $colspan = 16;
|
||||
<th scope="col" rowspan="2" id="mb_list_cert"><?php echo subject_sort_link('mb_certify', '', 'desc') ?>본인확인</a></th>
|
||||
<th scope="col" 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,7 +137,7 @@ $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_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_deny"><?php echo subject_sort_link('mb_level', '', 'desc') ?>권한</a></th>
|
||||
@@ -252,14 +252,15 @@ $colspan = 16;
|
||||
<input type="radio" name="mb_certify[<?php echo $i; ?>]" value="ipin" id="mb_certify_ipin_<?php echo $i; ?>" <?php echo $row['mb_certify'] == 'ipin' ? 'checked' : ''; ?>>
|
||||
<label for="mb_certify_ipin_<?php echo $i; ?>">아이핀</label>
|
||||
</td>
|
||||
<td headers="mb_list_mailc"><?php echo preg_match('/[1-9]/', $row['mb_email_certify']) ? '<span class="txt_true">Yes</span>' : '<span class="txt_false">No</span>'; ?></td>
|
||||
<td headers="mb_list_open">
|
||||
<td headers="mb_list_mailc" class="td_consent"><?php echo preg_match('/[1-9]/', $row['mb_email_certify']) ? '<span class="txt_true">Yes</span>' : '<span class="txt_false">No</span>'; ?></td>
|
||||
<td headers="mb_list_open" class="td_consent">
|
||||
<label for="mb_open_<?php echo $i; ?>" class="sound_only">정보공개</label>
|
||||
<input type="checkbox" name="mb_open[<?php echo $i; ?>]" <?php echo $row['mb_open'] ? 'checked' : ''; ?> value="1" id="mb_open_<?php echo $i; ?>">
|
||||
</td>
|
||||
<td headers="mb_list_mailr">
|
||||
<td headers="mb_list_mailr" class="td_consent">
|
||||
<label for="mb_mailling_<?php echo $i; ?>" class="sound_only">메일수신</label>
|
||||
<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; ?>">
|
||||
</td>
|
||||
<td headers="mb_list_auth" class="td_mbstat">
|
||||
<?php
|
||||
@@ -284,6 +285,7 @@ $colspan = 16;
|
||||
<td headers="mb_list_sms">
|
||||
<label for="mb_sms_<?php echo $i; ?>" class="sound_only">SMS수신</label>
|
||||
<input type="checkbox" name="mb_sms[<?php echo $i; ?>]" <?php echo $row['mb_sms'] ? 'checked' : ''; ?> value="1" id="mb_sms_<?php echo $i; ?>">
|
||||
<input type="hidden" name="mb_sms_default[<?php echo $i; ?>]" value="<?php echo $row['mb_sms'] ?? '0'; ?> " id="mb_sms_default_<?php echo $i; ?>">
|
||||
</td>
|
||||
<td headers="mb_list_adultc">
|
||||
<label for="mb_adult_<?php echo $i; ?>" class="sound_only">성인인증</label>
|
||||
|
||||
@@ -0,0 +1,289 @@
|
||||
<?php
|
||||
/*************************************************************************
|
||||
**
|
||||
** 내보내기 관련 상수 정의
|
||||
**
|
||||
*************************************************************************/
|
||||
define('MEMBER_EXPORT_PAGE_SIZE', 10000); // 파일당 처리할 회원 수
|
||||
define('MEMBER_EXPORT_MAX_SIZE', 300000); // 최대 처리할 회원 수
|
||||
define('MEMBER_BASE_DIR', "member_list"); // 엑셀 베이스 폴더
|
||||
define('MEMBER_BASE_DATE', date('YmdHis')); // 폴더/파일명용 날짜
|
||||
define('MEMBER_EXPORT_DIR', G5_DATA_PATH . "/" . MEMBER_BASE_DIR . "/" . MEMBER_BASE_DATE); // 엑셀 파일 저장 경로
|
||||
define('MEMBER_LOG_DIR', G5_DATA_PATH . "/" . MEMBER_BASE_DIR . "/" . "log"); // 로그 파일 저장 경로
|
||||
|
||||
/*************************************************************************
|
||||
**
|
||||
** 공통 함수 정의
|
||||
**
|
||||
*************************************************************************/
|
||||
/**
|
||||
* 검색 옵션 설정
|
||||
*/
|
||||
function get_export_config($type = null)
|
||||
{
|
||||
$config = [
|
||||
'sfl_list' => [
|
||||
'mb_id'=>'아이디',
|
||||
'mb_name'=>'이름',
|
||||
'mb_nick'=>'닉네임',
|
||||
'mb_email'=>'이메일',
|
||||
'mb_tel'=>'전화번호',
|
||||
'mb_hp'=>'휴대폰번호',
|
||||
'mb_addr1'=>'주소'
|
||||
],
|
||||
'point_cond_map' => [
|
||||
'gte'=>'≥',
|
||||
'lte'=>'≤',
|
||||
'eq'=>'='
|
||||
],
|
||||
'intercept_list' => [
|
||||
'exclude'=>'차단회원 제외',
|
||||
'only'=>'차단회원만'
|
||||
],
|
||||
'ad_range_list' => [
|
||||
'all' => '수신동의 회원 전체',
|
||||
'mailling_only' => '이메일 수신동의 회원만',
|
||||
'sms_only' => 'SMS/카카오톡 수신동의 회원만',
|
||||
'month_confirm' => date('m월').' 수신동의 확인 대상만',
|
||||
'custom_period' => '수신동의 기간 직접 입력'
|
||||
],
|
||||
];
|
||||
|
||||
return $type ? ($config[$type] ?? []) : $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* 파라미터 수집 및 유효성 검사
|
||||
*/
|
||||
function get_member_export_params()
|
||||
{
|
||||
// 친구톡 양식 - 엑셀 양식에 포함할 항목
|
||||
$fieldArray = array_map('trim', explode(',', $_GET['fields'] ?? ''));
|
||||
$vars = [];
|
||||
foreach ($fieldArray as $index => $field) {
|
||||
if(!empty($field)){
|
||||
$vars['var' . ($index + 1)] = $field;
|
||||
}
|
||||
}
|
||||
|
||||
$params = [
|
||||
'page' => 1,
|
||||
'formatType' => (int)($_GET['formatType'] ?? 1),
|
||||
'use_stx' => $_GET['use_stx'] ?? 0,
|
||||
'stx_cond' => clean_xss_tags($_GET['stx_cond'] ?? 'like'),
|
||||
'sfl' => clean_xss_tags($_GET['sfl'] ?? ''),
|
||||
'stx' => clean_xss_tags($_GET['stx'] ?? ''),
|
||||
'use_level' => $_GET['use_level'] ?? 0,
|
||||
'level_start' => (int)($_GET['level_start'] ?? 1),
|
||||
'level_end' => (int)($_GET['level_end'] ?? 10),
|
||||
'use_date' => $_GET['use_date'] ?? 0,
|
||||
'date_start' => clean_xss_tags($_GET['date_start'] ?? ''),
|
||||
'date_end' => clean_xss_tags($_GET['date_end'] ?? ''),
|
||||
'use_point' => $_GET['use_point'] ?? 0,
|
||||
'point' => $_GET['point'] ?? '',
|
||||
'point_cond' => $_GET['point_cond'] ?? 'gte',
|
||||
'use_hp_exist' => $_GET['use_hp_exist'] ?? 0,
|
||||
'ad_range_only' => $_GET['ad_range_only'] ?? 0,
|
||||
'ad_range_type' => clean_xss_tags($_GET['ad_range_type'] ?? 'all'),
|
||||
'ad_mailling' => $_GET['ad_mailling'] ?? 0,
|
||||
'ad_sms' => $_GET['ad_sms'] ?? 0,
|
||||
'agree_date_start' => clean_xss_tags($_GET['agree_date_start'] ?? ''),
|
||||
'agree_date_end' => clean_xss_tags($_GET['agree_date_end'] ?? ''),
|
||||
'use_intercept' => $_GET['use_intercept'] ?? 0,
|
||||
'intercept' => clean_xss_tags($_GET['intercept'] ?? 'exclude'),
|
||||
'vars' => $vars,
|
||||
];
|
||||
|
||||
// 레벨 범위 검증
|
||||
if ($params['level_start'] > $params['level_end']) {
|
||||
[$params['level_start'] , $params['level_end']] = [$params['level_end'], $params['level_start']];
|
||||
}
|
||||
|
||||
// 가입기간 - 날짜 범위 검증
|
||||
if ($params['use_date'] && $params['date_start'] && $params['date_end']) {
|
||||
if ($params['date_start'] > $params['date_end']) {
|
||||
[$params['date_start'] , $params['date_end']] = [$params['date_end'], $params['date_start']];
|
||||
}
|
||||
}
|
||||
|
||||
// 수신동의기간 - 날짜 범위 검증
|
||||
if ($params['ad_range_type'] == 'custom_period' && $params['agree_date_start'] && $params['agree_date_end']) {
|
||||
if ($params['agree_date_start'] > $params['agree_date_end']) {
|
||||
[$params['agree_date_start'] , $params['agree_date_end']] = [$params['agree_date_end'], $params['agree_date_start']];
|
||||
}
|
||||
}
|
||||
|
||||
return $params;
|
||||
}
|
||||
|
||||
/**
|
||||
* 전체 데이터 개수 조회
|
||||
*/
|
||||
function member_export_get_total_count($params)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$where = member_export_build_where($params);
|
||||
$sql = "SELECT COUNT(*) as cnt FROM {$g5['member_table']} {$where}";
|
||||
|
||||
$result = sql_query($sql);
|
||||
if (!$result) {
|
||||
throw new Exception("데이터 조회에 실패하였습니다. 다시 시도해주세요.");
|
||||
}
|
||||
|
||||
$row = sql_fetch_array($result);
|
||||
return (int)$row['cnt'];
|
||||
}
|
||||
|
||||
/**
|
||||
* WHERE 조건절 생성
|
||||
*/
|
||||
function member_export_build_where($params)
|
||||
{
|
||||
global $config;
|
||||
$conditions = [];
|
||||
|
||||
// 기본 조건 - 탈퇴하지 않은 사용자
|
||||
$conditions[] = "mb_leave_date = ''";
|
||||
|
||||
// 검색어 조건 (sql_escape_string 사용으로 보안 강화)
|
||||
if (!empty($params['use_stx']) && $params['use_stx'] === '1') {
|
||||
$sfl_list = get_export_config('sfl_list');
|
||||
$sfl = in_array($params['sfl'], array_keys($sfl_list)) ? $params['sfl'] : '';
|
||||
$stx = sql_escape_string($params['stx']);
|
||||
|
||||
if(!empty($sfl) && !empty($stx)){
|
||||
if ($params['stx_cond'] === 'like') {
|
||||
$conditions[] = "{$sfl} LIKE '%{$stx}%'";
|
||||
} else {
|
||||
$conditions[] = "{$sfl} = '{$stx}'";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 권한 조건
|
||||
if (!empty($params['use_level']) && $params['use_level'] === '1') {
|
||||
$level_start = max(1, (int)$params['level_start']);
|
||||
$level_end = min(10, (int)$params['level_end']);
|
||||
|
||||
$conditions[] = "(mb_level BETWEEN {$level_start} AND {$level_end})";
|
||||
}
|
||||
|
||||
// 가입기간 조건
|
||||
if (!empty($params['use_date']) && $params['use_date'] === '1') {
|
||||
$date_start = isset($params['date_start']) ? sql_escape_string(trim($params['date_start'])) : '';
|
||||
$date_end = isset($params['date_end']) ? sql_escape_string(trim($params['date_end'])) : '';
|
||||
|
||||
if ($date_start && $date_end) {
|
||||
$conditions[] = "mb_datetime BETWEEN '{$date_start} 00:00:00' AND '{$date_end} 23:59:59'";
|
||||
} elseif ($date_start) {
|
||||
$conditions[] = "mb_datetime >= '{$date_start} 00:00:00'";
|
||||
} elseif ($date_end) {
|
||||
$conditions[] = "mb_datetime <= '{$date_end} 23:59:59'";
|
||||
}
|
||||
}
|
||||
|
||||
// 포인트 조건
|
||||
if (!empty($params['use_point']) && $params['use_point'] === '1') {
|
||||
$point = $params['point'];
|
||||
$point_cond = $params['point_cond'];
|
||||
|
||||
if ($point != '') {
|
||||
$point = (int)$point; // 정수로 캐스팅
|
||||
|
||||
switch ($point_cond) {
|
||||
case 'lte':
|
||||
$conditions[] = "mb_point <= {$point}";
|
||||
break;
|
||||
case 'eq':
|
||||
$conditions[] = "mb_point = {$point}";
|
||||
break;
|
||||
default:
|
||||
$conditions[] = "mb_point >= {$point}";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 휴대폰 번호 존재 조건
|
||||
if (!empty($params['use_hp_exist']) && $params['use_hp_exist'] === '1') {
|
||||
$conditions[] = "(mb_hp is not null and mb_hp != '')";
|
||||
}
|
||||
|
||||
// 정보수신동의 조건
|
||||
if (!empty($params['ad_range_only']) && $params['ad_range_only'] === '1') {
|
||||
$range = $params['ad_range_type'] ?? '';
|
||||
|
||||
// 공통: 마케팅 목적 수집·이용 동의 + (필요 시) 제3자 동의
|
||||
$needs_thirdparty = ($config['cf_sms_use'] !== '' || $config['cf_kakaotalk_use'] !== '');
|
||||
$thirdparty_clause = $needs_thirdparty ? " AND mb_thirdparty_agree = 1" : "";
|
||||
$base_marketing = "mb_marketing_agree = 1{$thirdparty_clause}";
|
||||
|
||||
if ($range === 'all') {
|
||||
// 마케팅 동의 + (이메일 OR SMS 동의)
|
||||
$conditions[] = "({$base_marketing} AND (mb_mailling = 1 OR mb_sms = 1))";
|
||||
} elseif ($range === 'mailling_only') {
|
||||
// 마케팅 동의 + 이메일 동의
|
||||
$conditions[] = "({$base_marketing} AND mb_mailling = 1)";
|
||||
} elseif ($range === 'sms_only') {
|
||||
// 마케팅 동의 + SMS/카카오톡 동의
|
||||
$conditions[] = "({$base_marketing} AND mb_sms = 1)";
|
||||
} elseif ($range === 'month_confirm' || $range === 'custom_period') {
|
||||
// 채널 필터 체크
|
||||
$useEmail = !empty($params['ad_mailling']);
|
||||
$useSms = !empty($params['ad_sms']);
|
||||
|
||||
if ($range === 'month_confirm') {
|
||||
// 23개월 전 그 달
|
||||
$start = date('Y-m-01 00:00:00', strtotime('-23 months'));
|
||||
$end = date('Y-m-t 23:59:59', strtotime('-23 months'));
|
||||
$emailDateCond = "mb_mailling_date BETWEEN '{$start}' AND '{$end}'";
|
||||
$smsDateCond = "mb_sms_date BETWEEN '{$start}' AND '{$end}'";
|
||||
|
||||
} else {
|
||||
// 수신동의기간 직접 입력 - custom_period
|
||||
$date_start = $params['agree_date_start'] ?? '';
|
||||
$date_end = $params['agree_date_end'] ?? '';
|
||||
|
||||
if ($date_start && $date_end) {
|
||||
$emailDateCond = "mb_mailling_date BETWEEN '{$date_start} 00:00:00' AND '{$date_end} 23:59:59'";
|
||||
$smsDateCond = "mb_sms_date BETWEEN '{$date_start} 00:00:00' AND '{$date_end} 23:59:59'";
|
||||
} elseif ($date_start) {
|
||||
$emailDateCond = "mb_mailling_date >= '{$date_start} 00:00:00'";
|
||||
$smsDateCond = "mb_sms_date >= '{$date_start} 00:00:00'";
|
||||
} elseif ($date_end) {
|
||||
$emailDateCond = "mb_mailling_date <= '{$date_end} 23:59:59'";
|
||||
$smsDateCond = "mb_sms_date <= '{$date_end} 23:59:59'";
|
||||
} else {
|
||||
$emailDateCond = "mb_mailling_date <> '0000-00-00 00:00:00'";
|
||||
$smsDateCond = "mb_sms_date <> '0000-00-00 00:00:00'";
|
||||
}
|
||||
}
|
||||
|
||||
if (!$useEmail && !$useSms) {
|
||||
$conditions[] = "0=1"; // 둘 다 해제 ⇒ 결과 0건
|
||||
} else {
|
||||
// 조건 조립
|
||||
$parts = [];
|
||||
if ($useEmail) $parts[] = "(mb_mailling = 1 AND {$emailDateCond})";
|
||||
if ($useSms) $parts[] = "(mb_sms = 1 AND {$smsDateCond})";
|
||||
|
||||
$conditions[] = !empty($parts) ? '(' . implode(' OR ', $parts) . ')' : '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 차단 회원 조건
|
||||
if (!empty($params['use_intercept']) && $params['use_intercept'] === '1') {
|
||||
switch ($params['intercept']) {
|
||||
case 'exclude':
|
||||
$conditions[] = "mb_intercept_date = ''";
|
||||
break;
|
||||
case 'only':
|
||||
$conditions[] = "mb_intercept_date != ''";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return empty($conditions) ? '' : 'WHERE ' . implode(' AND ', $conditions);
|
||||
}
|
||||
@@ -0,0 +1,578 @@
|
||||
<?php
|
||||
$sub_menu = "200400";
|
||||
require_once './_common.php';
|
||||
require_once './member_list_exel.lib.php'; // 회원관리파일 공통 라이브러리
|
||||
|
||||
auth_check_menu($auth, $sub_menu, 'r');
|
||||
|
||||
// 파라미터 수집 및 유효성 검사
|
||||
$params = get_member_export_params();
|
||||
|
||||
// 총건수
|
||||
$total_count = 0;
|
||||
$total_error = "";
|
||||
try {
|
||||
$total_count = member_export_get_total_count($params);
|
||||
} catch (Exception $e) {
|
||||
$total_error = $e->getMessage(); // 메서드 호출 괄호 필수
|
||||
}
|
||||
|
||||
$g5['title'] = '회원관리파일';
|
||||
require_once './admin.head.php';
|
||||
$colspan = 14;
|
||||
?>
|
||||
|
||||
<h2>회원 엑셀 생성</h2>
|
||||
|
||||
<div class="local_desc01 local_desc">
|
||||
<p><b>회원수 <?php echo number_format(MEMBER_EXPORT_PAGE_SIZE);?>건 초과 시</b> <?php echo number_format(MEMBER_EXPORT_PAGE_SIZE);?>건 단위로 분리 저장되며, <b>엑셀 생성 최대 건수는 <?php echo number_format(MEMBER_EXPORT_MAX_SIZE);?>건</b>입니다. 초과 시 조건 추가 설정 후 재시도하시기 바랍니다.</p>
|
||||
<p><b>수신동의 확인 대상은 만료일까지 1달 미만인 회원</b>을 기준으로 필터링됩니다.</p>
|
||||
|
||||
<br>
|
||||
<p>파일 생성 시 서버에 임시 생성된 파일 중 <b>오늘 날짜를 제외 한 파일은 자동 삭제</b>되며, 수동 삭제 필요 시 <a href="<?php echo G5_ADMIN_URL;?>/member_list_file_delete.php"><b>회원관리파일 일괄삭제</b></a>에서 진행하시기 바랍니다.</p>
|
||||
<p>회원 정보 수정은 <a href="<?php echo G5_ADMIN_URL;?>/member_list.php" class="link"><b>회원 관리</b></a>에서 진행하실 수 있습니다.</p>
|
||||
|
||||
<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>
|
||||
<?php if($total_error != "") { ?>
|
||||
<span class="ov_num"> <?php echo $total_error ?></span>
|
||||
<?php } else {?>
|
||||
<span class="ov_num"> <?php echo number_format($total_count) ?>건</span>
|
||||
<?php } ?>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- 회원 검색 필터링 폼 -->
|
||||
<form id="fsearch" name="fsearch" class="member_list_data" method="get">
|
||||
<input type="hidden" name="token" value="<?php echo get_token(); ?>">
|
||||
<fieldset>
|
||||
<legend class="sound_only">회원 검색 필터링</legend>
|
||||
<div class="sch_table">
|
||||
|
||||
<!-- 검색어 적용 -->
|
||||
<div class="sch_row">
|
||||
<div class="label">
|
||||
<label>
|
||||
<input type="checkbox" name="use_stx" value="1" <?php echo isset($_GET['use_stx']) ? 'checked' : ''; ?>>
|
||||
검색어 적용
|
||||
</label>
|
||||
</div>
|
||||
<div class="field">
|
||||
<select name="sfl">
|
||||
<?php
|
||||
// 검색어 옵션 : [정의] get_export_config() - adm/member_list_exel.lib.php;
|
||||
foreach (get_export_config('sfl_list') as $val => $label) {
|
||||
$selected = (isset($_GET['sfl']) && $_GET['sfl'] === $val) ? 'selected' : '';
|
||||
echo "<option value=\"$val\" $selected>$label</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<input type="text" name="stx" value="<?php echo htmlspecialchars($_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>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 레벨 적용 -->
|
||||
<div class="sch_row">
|
||||
<div class="label">
|
||||
<label><input type="checkbox" name="use_level" value="1" <?php echo isset($_GET['use_level']) ? 'checked' : ''; ?>> 레벨 적용</label>
|
||||
</div>
|
||||
<div class="field">
|
||||
<select name="level_start">
|
||||
<?php for ($i = 1; $i <= 10; $i++): ?>
|
||||
<option value="<?php echo $i; ?>" <?php echo (isset($_GET['level_start']) && $_GET['level_start'] == $i) ? 'selected' : ''; ?>><?php echo $i; ?></option>
|
||||
<?php endfor; ?>
|
||||
</select> ~
|
||||
<select name="level_end">
|
||||
<?php for ($i = 1; $i <= 10; $i++): ?>
|
||||
<option value="<?php echo $i; ?>" <?php echo (isset($_GET['level_end']) && $_GET['level_end'] == $i) ? 'selected' : ''; ?>><?php echo $i; ?></option>
|
||||
<?php endfor; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 가입기간 적용 -->
|
||||
<div class="sch_row">
|
||||
<div class="label">
|
||||
<label><input type="checkbox" name="use_date" value="1" <?php echo isset($_GET['use_date']) ? 'checked' : ''; ?>> 가입기간 적용</label>
|
||||
</div>
|
||||
<div class="field">
|
||||
<input type="date" name="date_start" max="9999-12-31" value="<?php echo htmlspecialchars($_GET['date_start'] ?? ''); ?>"> ~
|
||||
<input type="date" name="date_end" max="9999-12-31" value="<?php echo htmlspecialchars($_GET['date_end'] ?? ''); ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 포인트 적용 -->
|
||||
<div class="sch_row">
|
||||
<div class="label">
|
||||
<label><input type="checkbox" name="use_point" value="1" <?php echo isset($_GET['use_point']) ? 'checked' : ''; ?>> 포인트 적용</label>
|
||||
</div>
|
||||
<div class="field">
|
||||
<input type="number" name="point" value="<?php echo htmlspecialchars($_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>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 차단회원 조건 -->
|
||||
<div class="sch_row">
|
||||
<div class="label">
|
||||
<label><input type="checkbox" name="use_intercept" value="1" <?php echo isset($_GET['use_intercept']) ? 'checked' : ''; ?>> 차단회원</label>
|
||||
</div>
|
||||
<div class="field">
|
||||
<select name="intercept" id="intercept">
|
||||
<?php
|
||||
// 차단회원 옵션 : [정의] get_export_config() - adm/member_list_exel.lib.php
|
||||
foreach (get_export_config('intercept_list') as $val => $label) {
|
||||
$selected = (($_GET['intercept'] ?? '') === $val) ? 'selected' : '';
|
||||
echo "<option value=\"$val\" $selected>$label</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 휴대폰 번호 조건 - 초기세팅(설정에 휴대폰번호가 보이기/필수입력이면 기본값 checked로 설정) -->
|
||||
<div class="sch_row">
|
||||
<div class="label">
|
||||
<label>
|
||||
<?php $use_hp_checked = isset($_GET['token']) ? (isset($_GET['use_hp_exist']) ? 'checked' : '') : (($config['cf_use_hp'] || $config['cf_req_hp']) ? 'checked' : '');?>
|
||||
<input type="checkbox" name="use_hp_exist" value="1" <?php echo $use_hp_checked; ?>> 휴대폰 번호 있는 경우만
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 정보수신동의 조건 -->
|
||||
<div class="sch_row">
|
||||
<div class="label">
|
||||
<label><input type="checkbox" name="ad_range_only" value="1" <?php echo isset($_GET['ad_range_only']) ? 'checked' : ''; ?>> 정보수신동의에 동의한 경우만</label>
|
||||
</div>
|
||||
<!-- 안내 문구 -->
|
||||
<div class="field">
|
||||
<p class="sch_notice">「정보통신망이용촉진및정보보호등에관한법률」에 따라 <b>광고성 정보 수신동의 여부</b>를 <b>매2년</b>마다 확인해야 합니다.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sch_row <?php echo isset($_GET['ad_range_only']) ? '' : 'is-hidden'; ?>">
|
||||
<div class="ad_range_wrap">
|
||||
<div class="ad_range_box">
|
||||
<div class="label">
|
||||
<label for="ad_range_type">회원범위</label>
|
||||
</div>
|
||||
<div class="field">
|
||||
<select name="ad_range_type" id="ad_range_type">
|
||||
<?php
|
||||
foreach (get_export_config('ad_range_list') as $val => $label) {
|
||||
$selected = (($_GET['ad_range_type'] ?? '') === $val) ? 'selected' : '';
|
||||
echo "<option value=\"$val\" $selected>$label</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
<div class="ad_range_wrap">
|
||||
<!-- 기간 직접 입력 -->
|
||||
<div class="ad_range_box <?php echo isset($_GET['ad_range_only']) && ($_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')); ?>">
|
||||
<p>* 광고성 정보 수신(<b>이메일 또는 SMS/카카오톡</b>) 동의일자 기준</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 설명 문구 -->
|
||||
<?php
|
||||
$thirdpartyLbl = (!empty($config['cf_sms_use']) || !empty($config['cf_kakaotalk_use'])) ? ' / <b>개인정보 제3자 제공</b>' : '';
|
||||
|
||||
$ad_range_text = [
|
||||
'all' => "* <b>광고성 정보 수신(이메일 또는 SMS/카카오톡)</b> / <b>마케팅 목적의 개인정보 수집 및 이용</b>{$thirdpartyLbl}에 모두 동의한 회원을 선택합니다.",
|
||||
'mailling_only' => "* <b>광고성 이메일 수신</b> / <b>마케팅 목적의 개인정보 수집 및 이용</b>{$thirdpartyLbl}에 모두 동의한 회원을 선택합니다.",
|
||||
'sms_only' => "* <b>광고성 SMS/카카오톡 수신</b> / <b>마케팅 목적의 개인정보 수집 및 이용</b>{$thirdpartyLbl}에 모두 동의한 회원을 선택합니다.",
|
||||
'month_confirm' => "* 23개월 전(" . date('Y년 m월', strtotime('-23 month')) . ") <b>광고성 정보 수신 동의(이메일 또는 SMS/카카오톡)</b>한 회원을 선택합니다."
|
||||
];
|
||||
|
||||
if (isset($_GET['ad_range_only'], $_GET['ad_range_type']) && isset($ad_range_text[$_GET['ad_range_type']])) {
|
||||
echo '<div class="ad_range_box"><p>' . $ad_range_text[$_GET['ad_range_type']] . '</p></div>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 채널 체크박스 -->
|
||||
<div class="sch_row <?php echo isset($_GET['ad_range_only']) && in_array($_GET['ad_range_type'], ['month_confirm', 'custom_period']) ? '' : 'is-hidden'; ?>">
|
||||
<div class="ad_range_wrap">
|
||||
<div class="ad_range_box">
|
||||
<div class="label">
|
||||
</div>
|
||||
<div class="field">
|
||||
<?php $ad_mailling_checked = isset($_GET['token']) ? (isset($_GET['ad_mailling']) ? 'checked' : '') : 'checked';?>
|
||||
<?php $ad_sms_checked = isset($_GET['token']) ? (isset($_GET['ad_sms']) ? 'checked' : '') : 'checked';?>
|
||||
<label><input type="checkbox" name="ad_mailling" value="1" <?php echo $ad_mailling_checked; ?>> 광고성 이메일 수신</label>
|
||||
<label><input type="checkbox" name="ad_sms" value="1" <?php echo $ad_sms_checked; ?>> 광고성 SMS/카카오톡 수신</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sch_btn">
|
||||
<button type="button" id="btnExcelDownload">엑셀파일 다운로드</button>
|
||||
|
||||
<?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>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
document.querySelector('input[name="ad_range_only"]').addEventListener('change', function () {
|
||||
document.querySelectorAll('.ad_range_wrap').forEach(el => {
|
||||
el.classList.toggle('is-hidden', !this.checked);
|
||||
});
|
||||
});
|
||||
|
||||
document.querySelectorAll('#fsearch input, #fsearch select').forEach(el => {
|
||||
const submit = () => document.getElementById('fsearch').submit();
|
||||
el.addEventListener(el.type === 'date' ? 'blur' : 'change', submit);
|
||||
|
||||
el.addEventListener('keydown', e => {
|
||||
if (e.key === 'Enter') {
|
||||
e.preventDefault();
|
||||
submit();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
let eventSource = null;
|
||||
|
||||
// 일반 엑셀 다운로드 버튼 클릭
|
||||
document.getElementById('btnExcelDownload').addEventListener('click', () => {
|
||||
startExcelDownload(1);
|
||||
});
|
||||
|
||||
// 팝빌 양식 다운로드 버튼 클릭
|
||||
<?php if($config['cf_kakaotalk_use'] == "popbill") { ?>
|
||||
document.getElementById('btnExcelDownloadPopbill').addEventListener('click', () => {
|
||||
showDownloadPopupPopill();
|
||||
});
|
||||
<?php } ?>
|
||||
|
||||
// 엑셀 다운로드 실행
|
||||
// 1. 기존 SSE 종료
|
||||
function closePreviousEventSource() {
|
||||
if (eventSource) {
|
||||
eventSource.close();
|
||||
eventSource = null;
|
||||
}
|
||||
}
|
||||
|
||||
// 2. FormData QueryString 변환
|
||||
function buildDownloadParams(formatType, 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 = []) {
|
||||
closePreviousEventSource();
|
||||
|
||||
const query = buildDownloadParams(formatType, selectedFields);
|
||||
showDownloadPopup();
|
||||
|
||||
eventSource = new EventSource(`member_list_exel_export.php?${query}`);
|
||||
eventSource.onmessage = handleProgressUpdate();
|
||||
eventSource.onerror = handleDownloadError();
|
||||
}
|
||||
|
||||
// 다운로드 팝업 표시
|
||||
function showDownloadPopup() {
|
||||
const bodyHTML = `
|
||||
<div class="excel-download-progress">
|
||||
<div class="progress-desc">
|
||||
<p class="progress-summary">총 <strong>0</strong>개 파일로 분할됩니다</p>
|
||||
<p class="progress-message"><strong>(0 / 0)</strong> 파일 다운로드 중</p>
|
||||
<p class="progress-error"></p>
|
||||
</div>
|
||||
<div class="progress-spinner">
|
||||
<div class="spinner"></div>
|
||||
<p class="loading-message">
|
||||
엑셀 파일을 생성 중입니다. 잠시만 기다려주세요.<br>
|
||||
현재 데이터 기준으로 <strong id="estimatedTimeText"></strong> 정도 소요될 수 있습니다.<br>
|
||||
<strong>페이지를 벗어나거나 닫으면 다운로드가 중단</strong>되니, 작업 완료까지 기다려 주세요.
|
||||
</p>
|
||||
</div>
|
||||
<div class="progress-box">
|
||||
<div class="progress-download-box"></div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
PopupManager.render('엑셀 다운로드 진행 중', bodyHTML, '', { disableOutsideClose: true });
|
||||
|
||||
// 닫기 버튼 이벤트 핸들링
|
||||
const closeBtn = document.querySelector('.popup-close-btn');
|
||||
if (closeBtn) {
|
||||
closeBtn.removeAttribute('onclick');
|
||||
closeBtn.addEventListener('click', handlePopupCloseWithConfirm);
|
||||
}
|
||||
}
|
||||
|
||||
// 닫기 버튼 클릭 시 다운로드 중단 여부 확인
|
||||
function handlePopupCloseWithConfirm(e) {
|
||||
if (eventSource) {
|
||||
const confirmClose = confirm("엑셀 다운로드가 진행 중입니다.\n정말 중지하시겠습니까?");
|
||||
if (!confirmClose) {
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
eventSource.close();
|
||||
eventSource = null;
|
||||
alert("엑셀 다운로드가 중단되었습니다.");
|
||||
}
|
||||
PopupManager.close('popupOverlay');
|
||||
}
|
||||
|
||||
// 친구톡 양식(팝빌) - 항목 선택 팝업
|
||||
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');
|
||||
if (!fieldSelectForm) return;
|
||||
|
||||
fieldSelectForm.addEventListener('change', function (e) {
|
||||
if (e.target.name === 'fields') {
|
||||
const selected = fieldSelectForm.querySelectorAll('input[name="fields"]:checked');
|
||||
if (selected.length > 3) {
|
||||
alert("최대 3개까지 선택 가능합니다.");
|
||||
e.target.checked = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// 선택된 항목 표시
|
||||
const previewContainer = document.getElementById('selectedFieldsPreview');
|
||||
let spans = '<strong>선택된 항목:</strong>';
|
||||
selected.forEach(field => {
|
||||
const label = field.parentElement.textContent.trim();
|
||||
spans += `<span class="field-tag">${label}</span>`;
|
||||
});
|
||||
previewContainer.innerHTML = spans;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 친구톡 양식 - 항목 선택 후 선택완료 버튼 클릭
|
||||
function 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) {
|
||||
const data = JSON.parse(e.data);
|
||||
const { status, downloadType, message, total, current, totalChunks, currentChunk, zipFile, files, filePath } = data;
|
||||
|
||||
// DOM 요소 캐싱
|
||||
const titleEl = document.getElementById('popupTitle');
|
||||
const summaryEl = document.querySelector('.progress-summary');
|
||||
const messageEl = document.querySelector('.progress-message');
|
||||
const spinnerEl = document.querySelector('.progress-spinner');
|
||||
const resultEl = document.querySelector('.loading-message');
|
||||
const downloadBoxEl = document.querySelector('.progress-download-box');
|
||||
const errorEl = document.querySelector('.progress-error');
|
||||
|
||||
if (status === "progress")
|
||||
{
|
||||
summaryEl.innerHTML = `총 <strong>${totalChunks}</strong>개 파일로 ` + (downloadType === 2 ? `분할 생성됩니다` : `다운로드됩니다`) + ` (총 ${total.toLocaleString('ko-KR')}건)`;
|
||||
messageEl.innerHTML = downloadType === 2 ? `<strong>(${currentChunk} / ${totalChunks})</strong> 파일 생성 중` : `엑셀 파일 생성 중`;
|
||||
|
||||
/* 작업 소요 시간 : 예상 시간 (1만건당 10초) */
|
||||
const sec = Math.max(5, Math.ceil(total * 0.0012 * 1.2)); // 최소 5초 보장
|
||||
const text = `예상 처리 시간은 약 ${sec >= 60 ? `${Math.floor(sec / 60)}분 ${sec % 60}초` : `${sec}초`}`;
|
||||
document.getElementById('estimatedTimeText').innerText = text;
|
||||
}
|
||||
else if (status === "zipping")
|
||||
{
|
||||
summaryEl.innerHTML = `총 <strong>${totalChunks}</strong>개 파일이 압축파일로 생성됩니다`;
|
||||
messageEl.innerHTML = `<strong>${totalChunks}</strong> 파일 압축하는 중`;
|
||||
}
|
||||
else if (status === "zippingError")
|
||||
{
|
||||
errorEl.innerHTML = message;
|
||||
}
|
||||
else if (status === "error")
|
||||
{
|
||||
summaryEl.innerHTML = `엑셀 파일 다운로드 실패`;
|
||||
resultEl.innerHTML = '';
|
||||
spinnerEl?.classList.add('is-hidden');
|
||||
|
||||
const parts = message.split(/<br\s*\/?>/i);
|
||||
messageEl.innerHTML = parts[0] || '';
|
||||
errorEl.innerHTML = parts.slice(1).join('<br>') || '';
|
||||
|
||||
// SSE 작업 닫기
|
||||
eventSource?.close();
|
||||
eventSource = null;
|
||||
}
|
||||
else if (status === "done")
|
||||
{
|
||||
// SSE 작업 닫기
|
||||
eventSource?.close();
|
||||
eventSource = null;
|
||||
|
||||
titleEl.textContent = '엑셀 파일 다운로드 완료';
|
||||
messageEl.innerHTML = `<strong>총 ${total.toLocaleString('ko-KR')}건의 데이터 다운로드가 완료되었습니다!</strong>`;
|
||||
spinnerEl?.classList.add('is-hidden');
|
||||
|
||||
let html = '<p>* 자동으로 다운로드가 되지 않았다면 아래 버튼을 클릭해주세요.</p>';
|
||||
const baseUrl = `<?php echo G5_DATA_URL; ?>/member_list/<?php echo date('Ymdhis'); ?>/`; // 공통 URL 분리
|
||||
|
||||
if (zipFile) {
|
||||
const url = `${filePath}/${zipFile}`;
|
||||
html += `<a href="${url}" class="btn btn_03" download>압축파일 다운로드</a>`;
|
||||
downloadBoxEl.innerHTML = html;
|
||||
triggerAutoDownload(url, zipFile);
|
||||
} else if (files?.length) {
|
||||
files.forEach((file, index) => {
|
||||
const url = `${filePath}/${file}`;
|
||||
html += `<a class="btn btn_03" href="${url}" download>엑셀파일 다운로드 ${index + 1}</a>`;
|
||||
});
|
||||
downloadBoxEl.innerHTML = html;
|
||||
|
||||
if (files.length === 1) {
|
||||
const url = `${filePath}/${files[0]}`;
|
||||
triggerAutoDownload(url, files[0]);
|
||||
} else {
|
||||
summaryEl.innerHTML = `총 <strong>${totalChunks}</strong>개 파일이 생성되었습니다. 아래 버튼을 눌러 다운로드 받아주세요.`;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// SSE 오류 처리
|
||||
function handleDownloadError() {
|
||||
return function(e){
|
||||
const errorMessage = e?.message || e?.data || '알 수 없는 오류가 발생했습니다.';
|
||||
|
||||
document.querySelector('.progress-summary').innerHTML = `엑셀 파일 다운로드 실패`;
|
||||
document.querySelector('.progress-message').innerHTML = `엑셀 파일 다운로드에 실패하였습니다`;
|
||||
document.querySelector('.progress-error').innerHTML = errorMessage;
|
||||
document.querySelector('.loading-message').innerHTML = '';
|
||||
document.querySelector('.progress-spinner').classList.add('is-hidden');
|
||||
|
||||
if (eventSource) {
|
||||
eventSource.close();
|
||||
eventSource = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 자동 다운로드 실행
|
||||
function triggerAutoDownload(url, filename) {
|
||||
const a = document.createElement('a');
|
||||
a.href = url;
|
||||
a.download = filename;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
require_once './admin.tail.php';
|
||||
@@ -0,0 +1,563 @@
|
||||
<?php
|
||||
$sub_menu = "200400";
|
||||
require_once './_common.php';
|
||||
require_once './member_list_exel.lib.php'; // 회원관리파일 공통 라이브러리 (상수, 검색 옵션 설정, SQL WHERE 등)
|
||||
include_once(G5_LIB_PATH.'/PHPExcel.php');
|
||||
|
||||
check_demo();
|
||||
auth_check_menu($auth, $sub_menu, 'w');
|
||||
|
||||
ini_set('memory_limit', '-1');
|
||||
session_write_close(); // 세션 종료 및 잠금 해제 (백그라운드 작업을 위해 필요)
|
||||
|
||||
// 파라미터 수집 및 유효성 검사
|
||||
$params = get_member_export_params();
|
||||
if (!$params || !is_array($params)) {
|
||||
member_export_send_progress("error", "데이터가 올바르게 전달되지 않아 작업에 실패하였습니다.");
|
||||
member_export_write_log([], ['success' => false, 'error' => '데이터가 올바르게 전달되지 않아 작업에 실패하였습니다.']);
|
||||
exit;
|
||||
}
|
||||
|
||||
// 기존 생성된 엑셀 파일 삭제 - LOG 및 오늘 날짜 폴더 제외
|
||||
$resultExcelDelete = member_export_delete();
|
||||
|
||||
// 서버 전송 이벤트(SSE)를 위한 헤더 설정
|
||||
member_export_set_sse_headers();
|
||||
|
||||
// 모드 확인
|
||||
$mode = $_GET['mode'] ?? '';
|
||||
if ($mode !== 'start') {
|
||||
member_export_send_progress("error", "잘못된 요청 입니다.");
|
||||
member_export_write_log($params, ['success' => false, 'error' => '잘못된 요청 입니다.']);
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 회원 내보내기 처리 실행 (예외 처리 포함)
|
||||
*/
|
||||
try {
|
||||
main_member_export($params);
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
// 에러 로그 저장 및 SSE 에러 전송
|
||||
error_log("[Member Export Error] " . $e->getMessage());
|
||||
member_export_send_progress("error", $e->getMessage());
|
||||
member_export_write_log($params, ['success' => false, 'error' => $e->getMessage()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 메인 내보내기 프로세스
|
||||
*/
|
||||
function main_member_export($params)
|
||||
{
|
||||
$total = member_export_get_total_count($params);
|
||||
|
||||
if($total > MEMBER_EXPORT_MAX_SIZE){
|
||||
throw new Exception("엑셀 다운로드 가능 범위(최대 " . number_format(MEMBER_EXPORT_MAX_SIZE) . "건)를 초과했습니다.<br>조건을 추가로 설정하신 후 다시 시도해 주세요.");
|
||||
}
|
||||
|
||||
if($total <= 0){
|
||||
throw new Exception("조회된 데이터가 없어 엑셀 파일을 생성할 수 없습니다.<br>조건을 추가로 설정하신 후 다시 시도해 주세요.");
|
||||
}
|
||||
|
||||
$fileName = 'member_'.MEMBER_BASE_DATE;
|
||||
$fileList = [];
|
||||
$zipFileName = '';
|
||||
|
||||
if ($total > MEMBER_EXPORT_PAGE_SIZE) {
|
||||
// 대용량 데이터 - 분할 처리
|
||||
$pages = (int)ceil($total / MEMBER_EXPORT_PAGE_SIZE);
|
||||
member_export_send_progress("progress", "", 2, $total, 0, $pages, 0);
|
||||
|
||||
for ($i = 1; $i <= $pages; $i++) {
|
||||
$params['page'] = $i;
|
||||
|
||||
member_export_send_progress("progress", "", 2, $total, ($pages == $i ? $total : $i * MEMBER_EXPORT_PAGE_SIZE), $pages, $i);
|
||||
try {
|
||||
$data = member_export_get_data($params);
|
||||
$fileList[] = member_export_create_excel($data, $fileName, $i, $params['formatType']);
|
||||
} catch (Exception $e) {
|
||||
throw new Exception("총 {$pages}개 중 {$i}번째 파일을 생성하지 못했습니다<br>" . $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
// 압축 파일 생성
|
||||
if (count($fileList) > 1) {
|
||||
member_export_send_progress("zipping", "", 2, $total, $total, $pages, $i);
|
||||
$zipResult = member_export_create_zip($fileList, $fileName); // 압축 파일 생성
|
||||
|
||||
if($zipResult['error']){
|
||||
member_export_write_log($params, ['success' => false, 'error' => $zipResult['error']]);
|
||||
member_export_send_progress("zippingError", $zipResult['error']);
|
||||
}
|
||||
|
||||
if ($zipResult && $zipResult['result']) {
|
||||
member_export_delete($fileList); // 압축 후 엑셀 파일 제거
|
||||
$zipFileName = $zipResult['zipFile'];
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
// 소용량 데이터 - 단일 파일
|
||||
member_export_send_progress("progress", "", 1, $total, 0);
|
||||
$data = member_export_get_data($params);
|
||||
member_export_send_progress("progress", "", 1, $total, $total/2);
|
||||
$fileList[] = member_export_create_excel($data, $fileName, 0, $params['formatType']);
|
||||
member_export_send_progress("progress", "", 1, $total, $total);
|
||||
}
|
||||
|
||||
member_export_write_log($params, ['success' => true, 'total' => $total, 'files' => $fileList, 'zip' => $zipFileName ?? null]);
|
||||
member_export_send_progress("done", "", 2, $total, $total, $pages, $pages, $fileList, $zipFileName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 진행률 전송
|
||||
*/
|
||||
function member_export_send_progress($status, $message = "", $downloadType = 1, $total = 1, $current = 1, $totalChunks = 1, $currentChunk = 1, $files = [], $zipFile = '')
|
||||
{
|
||||
// 연결 상태 확인
|
||||
if (connection_aborted()) return;
|
||||
|
||||
$data = [
|
||||
'status' => $status,
|
||||
'message' => $message,
|
||||
'downloadType' => $downloadType,
|
||||
'total' => $total,
|
||||
'current' => $current,
|
||||
'totalChunks' => $totalChunks,
|
||||
'currentChunk' => $currentChunk,
|
||||
'files' => $files,
|
||||
'zipFile' => $zipFile,
|
||||
'filePath' => G5_DATA_URL . "/" . MEMBER_BASE_DIR . "/" . MEMBER_BASE_DATE,
|
||||
];
|
||||
|
||||
echo "data: " . json_encode($data, JSON_UNESCAPED_UNICODE) . "\n\n";
|
||||
|
||||
// 더 안정적인 플러시
|
||||
if (ob_get_level()) ob_end_flush();
|
||||
flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* 엑셀 내보내기 설정
|
||||
*/
|
||||
function member_export_get_config($type)
|
||||
{
|
||||
$configs = [
|
||||
1 => [
|
||||
'title' => ["회원관리파일(일반)"],
|
||||
'headers' => ['아이디', '이름', '닉네임', '휴대폰번호', '전화번호', '이메일', '주소', '회원권한', '포인트', '가입일', '차단',
|
||||
'광고성 이메일 수신동의', '광고성 이메일 동의일자', '광고성 SMS/카카오톡 수신동의', '광고성 SMS/카카오톡 동의일자',
|
||||
'마케팅목적의개인정보수집및이용동의', '마케팅목적의개인정보수집및이용동의일자', '개인정보제3자제공동의', '개인정보제3자제공동의일자'],
|
||||
'fields' => ['mb_id', 'mb_name', 'mb_nick', 'mb_hp', 'mb_tel', 'mb_email', 'mb_addr1', 'mb_level', 'mb_point', 'mb_datetime', 'mb_intercept_date',
|
||||
'mb_mailling','mb_mailling_date', 'mb_sms','mb_sms_date', 'mb_marketing_agree',
|
||||
'mb_marketing_date', 'mb_thirdparty_agree', 'mb_thirdparty_date'],
|
||||
'widths' => [20, 20, 20, 20, 20, 30, 30, 10, 15, 25, 10, 20, 25, 20, 25, 20, 25, 20, 25],
|
||||
],
|
||||
2 => [
|
||||
'title' => ["회원관리파일(팝빌)"],
|
||||
'headers' => ['휴대폰번호', '이름', '변수1', '변수2', '변수3'],
|
||||
'fields' => ['mb_hp', 'mb_name'],
|
||||
'widths' => [20, 15, 30, 30, 30],
|
||||
],
|
||||
];
|
||||
|
||||
return isset($configs[$type]) ? $configs[$type] : $configs[1];
|
||||
}
|
||||
|
||||
/**
|
||||
* SSE 헤더 설정
|
||||
*/
|
||||
function member_export_set_sse_headers()
|
||||
{
|
||||
header('Content-Type: text/event-stream');
|
||||
header('Cache-Control: no-cache');
|
||||
header('Connection: keep-alive');
|
||||
header('X-Accel-Buffering: no');
|
||||
|
||||
if (ob_get_level()) ob_end_flush();
|
||||
ob_implicit_flush(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 엑셀 컬럼 문자 반환
|
||||
*/
|
||||
function member_export_column_char($i)
|
||||
{
|
||||
return chr(65 + $i);
|
||||
}
|
||||
|
||||
/**
|
||||
* 회원 데이터 조회
|
||||
*/
|
||||
function member_export_get_data($params)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$config = member_export_get_config($params['formatType']);
|
||||
$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 = [
|
||||
'mb_datetime' => "IF(mb_datetime = '0000-00-00 00:00:00', '', mb_datetime) AS mb_datetime",
|
||||
'mb_intercept_date' => "IF(mb_intercept_date != '', '차단됨', '정상') AS mb_intercept_date",
|
||||
'mb_sms' => "IF(mb_sms = '1', '동의', '미동의') AS mb_sms",
|
||||
'mb_sms_date' => "IF(mb_sms != '1' OR mb_sms_date = '0000-00-00 00:00:00', '', mb_sms_date) AS mb_sms_date",
|
||||
'mb_mailling' => "IF(mb_mailling = '1', '동의', '미동의') AS mb_mailling",
|
||||
'mb_mailling_date' => "IF(mb_mailling != '1' OR mb_mailling_date = '0000-00-00 00:00:00', '', mb_mailling_date) AS mb_mailling_date",
|
||||
'mb_marketing_agree' => "IF(mb_marketing_agree = '1', '동의', '미동의') AS mb_marketing_agree",
|
||||
'mb_marketing_date' => "IF(mb_marketing_agree != '1' OR mb_marketing_date = '0000-00-00 00:00:00', '', mb_marketing_date) AS mb_marketing_date",
|
||||
'mb_thirdparty_agree' => "IF(mb_thirdparty_agree = '1', '동의', '미동의') AS mb_thirdparty_agree",
|
||||
'mb_thirdparty_date' => "IF(mb_thirdparty_agree != '1' OR mb_thirdparty_date = '0000-00-00 00:00:00', '', mb_thirdparty_date) AS mb_thirdparty_date",
|
||||
];
|
||||
|
||||
// SQL 필드 생성
|
||||
$sqlFields = [];
|
||||
foreach ($fields as $field) {
|
||||
$sqlFields[] = $sqlTransformMap[$field] ?? $field;
|
||||
}
|
||||
$field_list = implode(', ', $sqlFields);
|
||||
|
||||
$where = member_export_build_where($params);
|
||||
|
||||
$page = (int)($params['page'] ?? 1);
|
||||
if ($page < 1) $page = 1;
|
||||
$offset = ($page - 1) * MEMBER_EXPORT_PAGE_SIZE;
|
||||
|
||||
$sql = "SELECT {$field_list} FROM {$g5['member_table']} {$where} ORDER BY mb_no DESC LIMIT {$offset}, " . MEMBER_EXPORT_PAGE_SIZE;
|
||||
|
||||
$result = sql_query($sql);
|
||||
if (!$result) {
|
||||
throw new Exception("데이터 조회에 실패하였습니다");
|
||||
}
|
||||
|
||||
$excelData = [$config['title'], $config['headers']];
|
||||
|
||||
while ($row = sql_fetch_array($result)) {
|
||||
$rowData = [];
|
||||
foreach ($fields as $field) {
|
||||
$rowData[] = $row[$field] ?? '';
|
||||
}
|
||||
$excelData[] = $rowData;
|
||||
}
|
||||
|
||||
return $excelData;
|
||||
}
|
||||
|
||||
/**
|
||||
* 엑셀 파일 생성
|
||||
*/
|
||||
function member_export_create_excel($data, $fileName, $index = 0, $type = 1)
|
||||
{
|
||||
$config = member_export_get_config($type);
|
||||
|
||||
if (!class_exists('PHPExcel')) {
|
||||
error_log('[Member Export Error] PHPExcel 라이브러리를 찾을 수 없습니다.');
|
||||
throw new Exception('파일 생성 중 내부 오류가 발생했습니다: PHPExcel 라이브러리를 찾을 수 없습니다.');
|
||||
}
|
||||
|
||||
// 현재 설정값 백업
|
||||
$currentCache = PHPExcel_Settings::getCacheStorageMethod();
|
||||
|
||||
// 캐싱 모드 설정 (엑셀 생성 전용)
|
||||
$cacheMethods = [
|
||||
PHPExcel_CachedObjectStorageFactory::cache_to_discISAM,
|
||||
PHPExcel_CachedObjectStorageFactory::cache_in_memory_serialized
|
||||
];
|
||||
|
||||
foreach ($cacheMethods as $method) {
|
||||
if (PHPExcel_Settings::setCacheStorageMethod($method)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
$excel = new PHPExcel();
|
||||
$sheet = $excel->setActiveSheetIndex(0);
|
||||
|
||||
// 헤더 스타일 적용
|
||||
$last_char = member_export_column_char(count($config['headers']) - 1);
|
||||
$sheet->getStyle("A2:{$last_char}2")->applyFromArray([
|
||||
'fill' => [
|
||||
'type' => PHPExcel_Style_Fill::FILL_SOLID,
|
||||
'startcolor' => ['rgb' => 'D9E1F2'], // 연파랑 배경
|
||||
],
|
||||
]);
|
||||
|
||||
// 셀 정렬 및 줄바꿈 설정
|
||||
$sheet->getStyle("A:{$last_char}")->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER)->setWrapText(true);
|
||||
|
||||
// 컬럼 너비 설정
|
||||
foreach ($config['widths'] as $i => $width) {
|
||||
$sheet->getColumnDimension(member_export_column_char($i))->setWidth($width);
|
||||
}
|
||||
|
||||
// 데이터 입력
|
||||
$sheet->fromArray($data, NULL, 'A1');
|
||||
|
||||
// 디렉토리 확인
|
||||
member_export_ensure_directory(MEMBER_EXPORT_DIR);
|
||||
|
||||
// 파일명 생성
|
||||
$subname = $index == 0 ? 'all' : sprintf("%02d", $index);
|
||||
$filename = $fileName . "_" . $subname . ".xlsx";
|
||||
$filePath = MEMBER_EXPORT_DIR . "/" . $filename;
|
||||
|
||||
// 파일 저장
|
||||
$writer = PHPExcel_IOFactory::createWriter($excel, 'Excel2007');
|
||||
$writer->setPreCalculateFormulas(false);
|
||||
$writer->save($filePath);
|
||||
|
||||
unset($excel, $sheet, $writer); // 생성 완료 후 메모리 해제
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
throw new Exception("엑셀 파일 생성에 실패하였습니다: " . $e->getMessage());
|
||||
}
|
||||
finally
|
||||
{
|
||||
// 캐싱 모드 원래 상태로 복원
|
||||
if ($currentCache) {
|
||||
PHPExcel_Settings::setCacheStorageMethod($currentCache);
|
||||
}
|
||||
}
|
||||
|
||||
return $filename;
|
||||
}
|
||||
|
||||
/**
|
||||
* 압축 파일 생성
|
||||
*/
|
||||
function member_export_create_zip($files, $zipFileName)
|
||||
{
|
||||
if (!class_exists('ZipArchive')) {
|
||||
error_log('[Member Export Error] ZipArchive 클래스를 사용할 수 없습니다.');
|
||||
return ['error' => '파일을 압축하는 중 문제가 발생했습니다. 개별 파일로 제공됩니다.<br>: ZipArchive 클래스를 사용할 수 없습니다.'];
|
||||
}
|
||||
|
||||
member_export_ensure_directory(MEMBER_EXPORT_DIR);
|
||||
$destinationZipPath = rtrim(MEMBER_EXPORT_DIR, "/") . "/" . $zipFileName . ".zip";
|
||||
|
||||
$zip = new ZipArchive();
|
||||
if ($zip->open($destinationZipPath, ZipArchive::CREATE | ZipArchive::OVERWRITE) !== TRUE) {
|
||||
return ['error' => "파일을 압축하는 중 문제가 발생했습니다. 개별 파일로 제공됩니다."];
|
||||
}
|
||||
|
||||
foreach ($files as $file) {
|
||||
$filePath = MEMBER_EXPORT_DIR . "/" . $file;
|
||||
if (file_exists($filePath)) {
|
||||
$zip->addFile($filePath, basename($filePath));
|
||||
}
|
||||
}
|
||||
|
||||
$result = $zip->close();
|
||||
|
||||
return [
|
||||
'result' => $result,
|
||||
'zipFile' => $zipFileName . ".zip",
|
||||
'zipPath' => $destinationZipPath,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 디렉토리 생성 및 확인
|
||||
*/
|
||||
function member_export_ensure_directory($dir)
|
||||
{
|
||||
if (!is_dir($dir)) {
|
||||
if (!@mkdir($dir, G5_DIR_PERMISSION, true)) {
|
||||
throw new Exception("디렉토리 생성 실패");
|
||||
}
|
||||
@chmod($dir, G5_DIR_PERMISSION);
|
||||
}
|
||||
|
||||
if (!is_writable($dir)) {
|
||||
throw new Exception("디렉토리 쓰기 권한 없음");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 파일 삭제 - 값이 있으면 해당 파일만 삭제, 없으면 디렉토리 내 모든 파일 삭제
|
||||
* - 알집 생성 완료 시 엑셀 파일 제거
|
||||
* - 작업 전 오늘 날짜 폴더 및 log 폴더를 제외한 나머지 파일 모두 제거
|
||||
*/
|
||||
function member_export_delete($fileList = [])
|
||||
{
|
||||
$cnt = 0;
|
||||
|
||||
// 파일 리스트가 있는 경우 -> 해당 파일만 삭제
|
||||
if (!empty($fileList)) {
|
||||
foreach ($fileList as $file) {
|
||||
$filePath = rtrim(MEMBER_EXPORT_DIR, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $file;
|
||||
if (file_exists($filePath) && is_file($filePath) && @unlink($filePath)) {
|
||||
$cnt++;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 파일 리스트가 없는 경우 -> 디렉토리 내 모든 파일 삭제
|
||||
else {
|
||||
$files = glob(rtrim(G5_DATA_PATH . "/" . MEMBER_BASE_DIR, '/') . '/*');
|
||||
|
||||
function deleteFolder($dir) {
|
||||
foreach (glob($dir . '/{.,}*', GLOB_BRACE) as $item) {
|
||||
if (in_array(basename($item), ['.', '..'])) continue;
|
||||
is_dir($item) ? deleteFolder($item) : unlink($item);
|
||||
}
|
||||
rmdir($dir);
|
||||
}
|
||||
|
||||
foreach ($files as $file) {
|
||||
$name = basename($file);
|
||||
|
||||
// log 폴더와 오늘 날짜로 시작하는 폴더는 제외
|
||||
if ($name === 'log' || preg_match('/^' . date('Ymd') . '\d{6}$/', $name)) continue;
|
||||
|
||||
if (is_file($file) && pathinfo($file, PATHINFO_EXTENSION) !== 'log' && @unlink($file)) {
|
||||
$cnt++;
|
||||
} elseif (is_dir($file)) {
|
||||
deleteFolder($file); // 재귀 폴더 삭제 함수 사용
|
||||
$cnt++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $cnt;
|
||||
}
|
||||
|
||||
/**
|
||||
* 로그 작성
|
||||
*/
|
||||
function member_export_write_log($params, $result = [])
|
||||
{
|
||||
global $member;
|
||||
|
||||
$maxSize = 1024 * 1024 * 2; // 2MB
|
||||
$maxFiles = 10; // 최대 로그 파일 수 (필요시 조정)
|
||||
$username = $member['mb_id'] ?? 'guest';
|
||||
$datetime = date("Y-m-d H:i:s");
|
||||
|
||||
if (!is_dir(MEMBER_LOG_DIR)) {
|
||||
@mkdir(MEMBER_LOG_DIR, G5_DIR_PERMISSION, true);
|
||||
@chmod(MEMBER_LOG_DIR, G5_DIR_PERMISSION);
|
||||
}
|
||||
|
||||
$logFiles = glob(MEMBER_LOG_DIR . "/export_log_*.log") ?: [];
|
||||
|
||||
// 최신 파일 기준 정렬 (최신 → 오래된)
|
||||
usort($logFiles, fn($a, $b) => filemtime($b) - filemtime($a));
|
||||
|
||||
$latestLogFile = $logFiles[0] ?? null;
|
||||
|
||||
// 용량 기준으로 새 파일 생성
|
||||
if (!$latestLogFile || filesize($latestLogFile) >= $maxSize) {
|
||||
$latestLogFile = MEMBER_LOG_DIR . "/export_log_" . date("YmdHi") . ".log";
|
||||
file_put_contents($latestLogFile, '');
|
||||
array_unshift($logFiles, $latestLogFile);
|
||||
}
|
||||
|
||||
// 최대 파일 수 초과 시 오래된 파일 제거
|
||||
if (count($logFiles) > $maxFiles) {
|
||||
$filesToDelete = array_slice($logFiles, $maxFiles);
|
||||
foreach ($filesToDelete as $file) {
|
||||
@unlink($file);
|
||||
}
|
||||
}
|
||||
|
||||
$formatType = (isset($params['formatType']) && $params['formatType'] == 2) ? '팝빌' : '일반';
|
||||
$success = isset($result['success']) && $result['success'] === true;
|
||||
$status = $success ? '성공' : '실패';
|
||||
|
||||
// 조건 정리
|
||||
$condition = [];
|
||||
|
||||
// 검색 조건
|
||||
if ($params['use_stx'] == 1 && !empty($params['stx'])) {
|
||||
$sfl_list = get_export_config('sfl_list');
|
||||
|
||||
$label = $sfl_list[$params['sfl']] ?? '';
|
||||
$condition[] = "검색({$params['stx_cond']}) : {$label} - {$params['stx']}";
|
||||
}
|
||||
|
||||
// 레벨 조건
|
||||
if ($params['use_level'] == 1 && ($params['level_start'] || $params['level_end'])) {
|
||||
$condition[] = "레벨: {$params['level_start']}~{$params['level_end']}";
|
||||
}
|
||||
|
||||
// 가입일 조건
|
||||
if ($params['use_date'] == 1 && ($params['date_start'] || $params['date_end'])) {
|
||||
$condition[] = "가입일: {$params['date_start']}~{$params['date_end']}";
|
||||
}
|
||||
|
||||
// 포인트 조건
|
||||
if ($params['use_point'] == 1 && $params['point'] !== '') {
|
||||
$point_cond_map = get_export_config('point_cond_map');
|
||||
$symbol = $point_cond_map[$params['point_cond']] ?? '≥';
|
||||
$condition[] = "포인트 {$symbol} {$params['point']}";
|
||||
}
|
||||
|
||||
// 휴대폰 여부
|
||||
if ($params['use_hp_exist'] == 1) {
|
||||
$condition[] = "휴대폰번호 있는 경우만";
|
||||
}
|
||||
|
||||
// 광고 수신 동의
|
||||
if ($params['ad_range_only'] == 1) {
|
||||
$ad_range_list = get_export_config('ad_range_list');
|
||||
$label = $ad_range_list[$params['ad_range_type']] ?? '';
|
||||
$condition[] = "수신동의: 예 ({$label})";
|
||||
|
||||
if ($params['ad_range_type'] == "custom_period" && ($params['agree_date_start'] || $params['agree_date_end'])) {
|
||||
$condition[] = "수신동의일: {$params['agree_date_start']}~{$params['agree_date_end']}";
|
||||
}
|
||||
|
||||
if (in_array($params['ad_range_type'], ["month_confirm", "custom_period"])){
|
||||
$channels = array_filter([
|
||||
!empty($params['ad_mailling']) && (int)$params['ad_mailling'] === 1 ? '이메일' : null,
|
||||
!empty($params['ad_sms']) && (int)$params['ad_sms'] === 1 ? 'SMS/카카오톡' : null,
|
||||
]);
|
||||
|
||||
if ($channels) {
|
||||
$condition[] = '수신채널: ' . implode(', ', $channels);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 차단회원 처리
|
||||
if ($params['use_intercept'] == 1) {
|
||||
$intercept_list = get_export_config('intercept_list');
|
||||
$label = $intercept_list[$params['intercept']] ?? '';
|
||||
if ($label) $condition[] = $label;
|
||||
}
|
||||
|
||||
$conditionStr = !empty($condition) ? implode(', ', $condition) : '없음';
|
||||
$line1 = "[{$datetime}] [{$status}] 관리자: {$username} | 형식: {$formatType}";
|
||||
|
||||
// 성공일 경우 추가 정보
|
||||
if ($success) {
|
||||
$total = $result['total'] ?? 0;
|
||||
$fileCount = isset($result['zip']) ? 1 : count($result['files'] ?? []);
|
||||
$line1 .= " | 총 {$total}건 | 파일: {$fileCount}개";
|
||||
}
|
||||
|
||||
$logEntry = $line1 . PHP_EOL;
|
||||
$logEntry .= "조건: {$conditionStr}" . PHP_EOL;
|
||||
|
||||
if (!$success && !empty($result['error'])) {
|
||||
$logEntry .= "오류 메시지: {$result['error']}" . PHP_EOL;
|
||||
}
|
||||
|
||||
$logEntry .= PHP_EOL;
|
||||
|
||||
// 파일에 기록
|
||||
if (@file_put_contents($latestLogFile, $logEntry, FILE_APPEND | LOCK_EX) === false) {
|
||||
error_log("[Member Export Error] 로그 파일 기록 실패: {$latestLogFile}");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
$sub_menu = '100930';
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.', G5_URL);
|
||||
|
||||
$g5['title'] = '회원관리파일 일괄삭제';
|
||||
include_once(G5_ADMIN_PATH.'/admin.head.php');
|
||||
?>
|
||||
|
||||
<div class="local_desc02 local_desc">
|
||||
<p>
|
||||
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
flush();
|
||||
|
||||
if (!$dir = @opendir(G5_DATA_PATH . '/member_list')) {
|
||||
echo '<p>회원관리파일를 열지못했습니다.</p>';
|
||||
}
|
||||
|
||||
$cnt = 0;
|
||||
echo '<ul class="session_del">' . PHP_EOL;
|
||||
|
||||
$files = glob(G5_DATA_PATH . '/member_list/*');
|
||||
$cnt = 0;
|
||||
|
||||
// 폴더 및 하위 파일 재귀 삭제 함수
|
||||
function deleteFolder($folderPath) {
|
||||
$items = glob($folderPath . '/*');
|
||||
foreach ($items as $item) {
|
||||
if (is_dir($item)) {
|
||||
deleteFolder($item);
|
||||
} else {
|
||||
unlink($item);
|
||||
}
|
||||
}
|
||||
rmdir($folderPath); // 폴더 자체 삭제
|
||||
}
|
||||
|
||||
if (is_array($files)) {
|
||||
foreach ($files as $member_list_file) {
|
||||
// log 확장자가 아닌 파일/디렉토리 처리
|
||||
$ext = strtolower(pathinfo($member_list_file, PATHINFO_EXTENSION));
|
||||
$basename = basename($member_list_file);
|
||||
|
||||
if (is_file($member_list_file) && $ext !== 'log') {
|
||||
unlink($member_list_file);
|
||||
echo '<li>파일 삭제: ' . $member_list_file . '</li>' . PHP_EOL;
|
||||
$cnt++;
|
||||
} elseif (is_dir($member_list_file) && $basename !== 'log') {
|
||||
deleteFolder($member_list_file);
|
||||
echo '<li>폴더 삭제: ' . $member_list_file . '</li>' . PHP_EOL;
|
||||
$cnt++;
|
||||
}
|
||||
|
||||
flush();
|
||||
|
||||
if ($cnt % 10 == 0) {
|
||||
echo PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
echo '<li>완료됨</li></ul>' . PHP_EOL;
|
||||
echo '<div class="local_desc01 local_desc"><p><strong>회원관리파일 ' . $cnt . '건 삭제 완료됐습니다.</strong><br>프로그램의 실행을 끝마치셔도 좋습니다.</p></div>' . PHP_EOL;
|
||||
?>
|
||||
|
||||
<?php
|
||||
include_once(G5_ADMIN_PATH.'/admin.tail.php');
|
||||
@@ -27,6 +27,30 @@ if ($_POST['act_button'] == "선택수정") {
|
||||
$post_mb_sms = isset($_POST['mb_sms'][$k]) ? (int) $_POST['mb_sms'][$k] : 0;
|
||||
$post_mb_open = isset($_POST['mb_open'][$k]) ? (int) $_POST['mb_open'][$k] : 0;
|
||||
|
||||
$agree_items = [];
|
||||
// 광고성 이메일 수신동의 일자 추가
|
||||
$post_mb_mailling_default = isset($_POST['mb_mailling_default'][$k]) ? (int) $_POST['mb_mailling_default'][$k] : 0;
|
||||
$sql_mailling_date = "";
|
||||
if ($post_mb_mailling_default != $post_mb_mailling) {
|
||||
$sql_mailling_date = " , mb_mailling_date = '".G5_TIME_YMDHIS."' ";
|
||||
$agree_items[] = "광고성 이메일 수신(" . ($post_mb_mailling == 1 ? "동의" : "철회") . ")";
|
||||
}
|
||||
|
||||
// 광고성 SMS/카카오톡 수신동의 일자 추가
|
||||
$post_mb_sms_default = isset($_POST['mb_sms_default'][$k]) ? (int) $_POST['mb_sms_default'][$k] : 0;
|
||||
$sql_sms_date = "";
|
||||
if ($post_mb_sms_default != $post_mb_sms) {
|
||||
$sql_sms_date = " , mb_sms_date = '".G5_TIME_YMDHIS."' ";
|
||||
$agree_items[] = "광고성 SMS/카카오톡 수신(" . ($post_mb_sms == 1 ? "동의" : "철회") . ")";
|
||||
}
|
||||
|
||||
// 동의 로그 추가
|
||||
$sql_agree_log = "";
|
||||
if (!empty($agree_items)) {
|
||||
$agree_log = "[".G5_TIME_YMDHIS.", 회원관리 선택수정] " . implode(' | ', $agree_items) . "\n";
|
||||
$sql_agree_log .= " , mb_agree_log = CONCAT('{$agree_log}', IFNULL(mb_agree_log, ''))";
|
||||
}
|
||||
|
||||
$mb_datas[] = $mb = get_member($_POST['mb_id'][$k]);
|
||||
|
||||
if (!(isset($mb['mb_id']) && $mb['mb_id'])) {
|
||||
@@ -50,6 +74,9 @@ if ($_POST['act_button'] == "선택수정") {
|
||||
mb_open = '" . $post_mb_open . "',
|
||||
mb_certify = '" . sql_real_escape_string($post_mb_certify) . "',
|
||||
mb_adult = '{$mb_adult}'
|
||||
{$sql_mailling_date}
|
||||
{$sql_sms_date}
|
||||
{$sql_agree_log}
|
||||
where mb_id = '" . sql_real_escape_string($mb['mb_id']) . "' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
+13
-1
@@ -117,6 +117,15 @@ if ($new == 'new' || !$code) {
|
||||
});
|
||||
});
|
||||
|
||||
function htmlEscape(str) {
|
||||
return str
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''');
|
||||
}
|
||||
|
||||
function add_menu_list(name, link, code) {
|
||||
var $menulist = $("#menulist", opener.document);
|
||||
var ms = new Date().getTime();
|
||||
@@ -126,7 +135,10 @@ if ($new == 'new' || !$code) {
|
||||
<?php } else { ?>
|
||||
sub_menu_class = " class=\"td_category sub_menu_class\"";
|
||||
<?php } ?>
|
||||
|
||||
|
||||
name = htmlEscape(name);
|
||||
link = htmlEscape(link);
|
||||
|
||||
var list = "<tr class=\"menu_list menu_group_<?php echo $code; ?>\">";
|
||||
list += "<td" + sub_menu_class + ">";
|
||||
list += "<label for=\"me_name_" + ms + "\" class=\"sound_only\">메뉴<strong class=\"sound_only\"> 필수</strong></label>";
|
||||
|
||||
@@ -59,14 +59,16 @@ $sql_common = " nw_device = '{$posts['nw_device']}',
|
||||
if ($w == "") {
|
||||
$sql = " insert {$g5['new_win_table']} set $sql_common ";
|
||||
sql_query($sql);
|
||||
|
||||
$nw_id = sql_insert_id();
|
||||
run_event('admin_newwin_created', $nw_id);
|
||||
} elseif ($w == "u") {
|
||||
$sql = " update {$g5['new_win_table']} set $sql_common where nw_id = '$nw_id' ";
|
||||
sql_query($sql);
|
||||
run_event('admin_newwin_updated', $nw_id);
|
||||
} elseif ($w == "d") {
|
||||
$sql = " delete from {$g5['new_win_table']} where nw_id = '$nw_id' ";
|
||||
sql_query($sql);
|
||||
run_event('admin_newwin_deleted', $nw_id);
|
||||
}
|
||||
|
||||
if ($w == "d") {
|
||||
|
||||
+10
-2
@@ -23,6 +23,10 @@ if ($w == '') {
|
||||
alert('w 값이 제대로 넘어오지 않았습니다.');
|
||||
}
|
||||
|
||||
if (!isset($po['po_use'])) {
|
||||
sql_query(" alter table `{$g5['poll_table']}` add `po_use` tinyint not null default '0' after `mb_ids` ", false);
|
||||
}
|
||||
|
||||
$g5['title'] = $html_title;
|
||||
require_once './admin.head.php';
|
||||
?>
|
||||
@@ -94,17 +98,21 @@ require_once './admin.head.php';
|
||||
</tr>
|
||||
|
||||
<?php if ($w == 'u') { ?>
|
||||
<tr>
|
||||
<th scope="row">투표사용</th>
|
||||
<td><input type="checkbox" name="po_use" id="po_use" value="1" <?php if ($po['po_use']) { echo 'checked="checked"'; } ?>> <label for="po_use">사용</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">투표등록일</th>
|
||||
<td><?php echo $po['po_date']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="po_ips">투표참가 IP</label></th>
|
||||
<td><textarea name="po_ips" id="po_ips" readonly rows="10"><?php echo preg_replace("/\n/", " / ", $po['po_ips']) ?></textarea></td>
|
||||
<td><textarea name="po_ips" id="po_ips" readonly rows="10"><?php echo html_purifier(preg_replace("/\n/", " / ", $po['po_ips'])); ?></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_ids">투표참가 회원</label></th>
|
||||
<td><textarea name="mb_ids" id="mb_ids" readonly rows="10"><?php echo preg_replace("/\n/", " / ", $po['mb_ids']) ?></textarea></td>
|
||||
<td><textarea name="mb_ids" id="mb_ids" readonly rows="10"><?php echo html_purifier(preg_replace("/\n/", " / ", $po['mb_ids'])); ?></textarea></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
|
||||
@@ -51,8 +51,8 @@ $po_id = isset($_POST['po_id']) ? $_POST['po_id'] : '';
|
||||
|
||||
if ($w == '') {
|
||||
$sql = " insert {$g5['poll_table']}
|
||||
( po_subject, po_poll1, po_poll2, po_poll3, po_poll4, po_poll5, po_poll6, po_poll7, po_poll8, po_poll9, po_cnt1, po_cnt2, po_cnt3, po_cnt4, po_cnt5, po_cnt6, po_cnt7, po_cnt8, po_cnt9, po_etc, po_level, po_point, po_date )
|
||||
values ( '{$_POST['po_subject']}', '{$_POST['po_poll1']}', '{$_POST['po_poll2']}', '{$_POST['po_poll3']}', '{$_POST['po_poll4']}', '{$_POST['po_poll5']}', '{$_POST['po_poll6']}', '{$_POST['po_poll7']}', '{$_POST['po_poll8']}', '{$_POST['po_poll9']}', '{$_POST['po_cnt1']}', '{$_POST['po_cnt2']}', '{$_POST['po_cnt3']}', '{$_POST['po_cnt4']}', '{$_POST['po_cnt5']}', '{$_POST['po_cnt6']}', '{$_POST['po_cnt7']}', '{$_POST['po_cnt8']}', '{$_POST['po_cnt9']}', '{$_POST['po_etc']}', '{$_POST['po_level']}', '{$_POST['po_point']}', '" . G5_TIME_YMD . "' ) ";
|
||||
( po_subject, po_poll1, po_poll2, po_poll3, po_poll4, po_poll5, po_poll6, po_poll7, po_poll8, po_poll9, po_cnt1, po_cnt2, po_cnt3, po_cnt4, po_cnt5, po_cnt6, po_cnt7, po_cnt8, po_cnt9, po_etc, po_level, po_point, po_date, po_use )
|
||||
values ( '{$_POST['po_subject']}', '{$_POST['po_poll1']}', '{$_POST['po_poll2']}', '{$_POST['po_poll3']}', '{$_POST['po_poll4']}', '{$_POST['po_poll5']}', '{$_POST['po_poll6']}', '{$_POST['po_poll7']}', '{$_POST['po_poll8']}', '{$_POST['po_poll9']}', '{$_POST['po_cnt1']}', '{$_POST['po_cnt2']}', '{$_POST['po_cnt3']}', '{$_POST['po_cnt4']}', '{$_POST['po_cnt5']}', '{$_POST['po_cnt6']}', '{$_POST['po_cnt7']}', '{$_POST['po_cnt8']}', '{$_POST['po_cnt9']}', '{$_POST['po_etc']}', '{$_POST['po_level']}', '{$_POST['po_point']}', '" . G5_TIME_YMD . "', 1 ) ";
|
||||
sql_query($sql);
|
||||
|
||||
$po_id = sql_insert_id();
|
||||
@@ -79,7 +79,8 @@ if ($w == '') {
|
||||
po_cnt9 = '{$_POST['po_cnt9']}',
|
||||
po_etc = '{$_POST['po_etc']}',
|
||||
po_level = '{$_POST['po_level']}',
|
||||
po_point = '{$_POST['po_point']}'
|
||||
po_point = '{$_POST['po_point']}',
|
||||
po_use = '{$_POST['po_use']}'
|
||||
where po_id = '{$_POST['po_id']}' ";
|
||||
sql_query($sql);
|
||||
} elseif ($w == 'd') {
|
||||
|
||||
+4
-1
@@ -49,7 +49,7 @@ $listall = '<a href="' . $_SERVER['SCRIPT_NAME'] . '" class="ov_listall">전체
|
||||
$g5['title'] = '투표관리';
|
||||
require_once './admin.head.php';
|
||||
|
||||
$colspan = 7;
|
||||
$colspan = 8;
|
||||
?>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
@@ -92,6 +92,7 @@ $colspan = 7;
|
||||
<th scope="col">투표권한</th>
|
||||
<th scope="col">투표수</th>
|
||||
<th scope="col">기타의견</th>
|
||||
<th scope="col">사용</th>
|
||||
<th scope="col">관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -101,6 +102,7 @@ $colspan = 7;
|
||||
$sql2 = " select sum(po_cnt1+po_cnt2+po_cnt3+po_cnt4+po_cnt5+po_cnt6+po_cnt7+po_cnt8+po_cnt9) as sum_po_cnt from {$g5['poll_table']} where po_id = '{$row['po_id']}' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
$po_etc = ($row['po_etc']) ? "사용" : "미사용";
|
||||
$po_use = ($row['po_use']) ? "사용" : "미사용";
|
||||
|
||||
$s_mod = '<a href="./poll_form.php?' . $qstr . '&w=u&po_id=' . $row['po_id'] . '" class="btn btn_03">수정</a>';
|
||||
|
||||
@@ -117,6 +119,7 @@ $colspan = 7;
|
||||
<td class="td_num"><?php echo $row['po_level'] ?></td>
|
||||
<td class="td_num"><?php echo $row2['sum_po_cnt'] ?></td>
|
||||
<td class="td_etc"><?php echo $po_etc ?></td>
|
||||
<td class="td_use"><?php echo $po_use ?></td>
|
||||
<td class="td_mng td_mng_s"><?php echo $s_mod ?></td>
|
||||
</tr>
|
||||
|
||||
|
||||
+8
-6
@@ -12,6 +12,7 @@ require_once './admin.head.php';
|
||||
if (!sql_query(" DESCRIBE `{$g5['qa_config_table']}` ", false)) {
|
||||
sql_query(
|
||||
" CREATE TABLE IF NOT EXISTS `{$g5['qa_config_table']}` (
|
||||
`qa_id` int(11) NOT NULL auto_increment,
|
||||
`qa_title` varchar(255) NOT NULL DEFAULT'',
|
||||
`qa_category` varchar(255) NOT NULL DEFAULT'',
|
||||
`qa_skin` varchar(255) NOT NULL DEFAULT '',
|
||||
@@ -46,7 +47,8 @@ if (!sql_query(" DESCRIBE `{$g5['qa_config_table']}` ", false)) {
|
||||
`qa_2` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_3` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_4` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_5` varchar(255) NOT NULL DEFAULT ''
|
||||
`qa_5` varchar(255) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`qa_id`)
|
||||
)",
|
||||
true
|
||||
);
|
||||
@@ -266,13 +268,13 @@ if (!isset($qaconfig['qa_include_head'])) {
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_include_head">상단 파일 경로</label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_include_head" value="<?php echo $qaconfig['qa_include_head'] ?>" id="qa_include_head" class="frm_input" size="50">
|
||||
<input type="text" name="qa_include_head" value="<?php echo get_sanitize_input($qaconfig['qa_include_head']); ?>" id="qa_include_head" class="frm_input" size="50">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_include_tail">하단 파일 경로</label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_include_tail" value="<?php echo $qaconfig['qa_include_tail'] ?>" id="qa_include_tail" class="frm_input" size="50">
|
||||
<input type="text" name="qa_include_tail" value="<?php echo get_sanitize_input($qaconfig['qa_include_tail']); ?>" id="qa_include_tail" class="frm_input" size="50">
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="admin_captcha_box" style="display:none;">
|
||||
@@ -344,7 +346,9 @@ if (!isset($qaconfig['qa_include_head'])) {
|
||||
</form>
|
||||
|
||||
<script>
|
||||
var captcha_chk = false;
|
||||
var captcha_chk = false,
|
||||
qa_include_head = jQuery.trim(jQuery("#qa_include_head").val()),
|
||||
qa_include_tail = jQuery.trim(jQuery("#qa_include_tail").val());
|
||||
|
||||
function use_captcha_check() {
|
||||
$.ajax({
|
||||
@@ -361,8 +365,6 @@ if (!isset($qaconfig['qa_include_head'])) {
|
||||
}
|
||||
|
||||
function frm_check_file() {
|
||||
var qa_include_head = "<?php echo $qaconfig['qa_include_head']; ?>";
|
||||
var qa_include_tail = "<?php echo $qaconfig['qa_include_tail']; ?>";
|
||||
var head = jQuery.trim(jQuery("#qa_include_head").val());
|
||||
var tail = jQuery.trim(jQuery("#qa_include_tail").val());
|
||||
|
||||
|
||||
@@ -108,6 +108,8 @@ $sql = " update {$g5['qa_config_table']}
|
||||
qa_5 = '{$_POST['qa_5']}' ";
|
||||
sql_query($sql);
|
||||
|
||||
run_event('admin_qa_config_updated');
|
||||
|
||||
if (function_exists('get_admin_captcha_by')) {
|
||||
get_admin_captcha_by('remove');
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ if (isset($_POST['email'])) {
|
||||
echo '해당 주소로 테스트 메일이 도착했는지 확인해 주십시오.<br>';
|
||||
echo '만약, 테스트 메일이 오지 않는다면 더 다양한 계정의 메일 주소로 메일을 보내 보십시오.<br>';
|
||||
echo '그래도 메일이 하나도 도착하지 않는다면 메일 서버(sendmail server)의 오류일 가능성이 높으니, 웹 서버관리자에게 문의하여 주십시오.<br>';
|
||||
echo '도메인을 소유하고 있을시 SPF, DKIM 설정이 필요할수 있습니다.<br>';
|
||||
echo '</p></div>';
|
||||
echo '</section>';
|
||||
}
|
||||
@@ -53,6 +54,10 @@ if (isset($_POST['email'])) {
|
||||
<p>
|
||||
메일서버가 정상적으로 동작 중인지 확인할 수 있습니다.<br>
|
||||
아래 입력칸에 테스트 메일을 발송하실 메일 주소를 입력하시면, [메일검사] 라는 제목으로 테스트 메일을 발송합니다.<br>
|
||||
보내는 메일주소 : <?php echo get_sanitize_input($config['cf_admin_email']); ?><br>
|
||||
<?php if (function_exists('domain_mail_host') && $config['cf_admin_email'] && stripos($config['cf_admin_email'], domain_mail_host()) === false) { ?>
|
||||
<?php echo '외부메일설정이나 기타 설정을 하지 않았다면, 도메인과 다른 헤더로 여겨 스팸이나 차단될 가능성이 있습니다.<br>기본환경설정에서 관리자 메일 주소를 name'.domain_mail_host().' 과 같은 도메인 형식으로 설정할것을 권장합니다.'; ?>
|
||||
<?php } ?>
|
||||
</p>
|
||||
</div>
|
||||
<form name="fsendmailtest" method="post">
|
||||
|
||||
@@ -32,6 +32,16 @@ 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">
|
||||
|
||||
@@ -72,7 +72,7 @@ function order_update_delivery($od_id, $mb_id, $change_status, $delivery)
|
||||
if($change_status != '배송')
|
||||
return;
|
||||
|
||||
$sql = " update {$g5['g5_shop_order_table']} set od_delivery_company = '{$delivery['delivery_company']}', od_invoice = '{$delivery['invoice']}', od_invoice_time = '{$delivery['invoice_time']}' where od_id = '$od_id' and od_status = '준비' ";
|
||||
$sql = " update {$g5['g5_shop_order_table']} set od_delivery_company = '".sql_real_escape_string($delivery['delivery_company'])."', od_invoice = '".sql_real_escape_string($delivery['invoice'])."', od_invoice_time = '".sql_real_escape_string($delivery['invoice_time'])."' where od_id = '$od_id' and od_status = '준비' ";
|
||||
sql_query($sql);
|
||||
|
||||
$sql = " select * from {$g5['g5_shop_cart_table']} where od_id = '$od_id' ";
|
||||
@@ -133,6 +133,8 @@ function pg_setting_check($is_print=false){
|
||||
$pg_msg = 'LG유플러스';
|
||||
} 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'] ){
|
||||
$pg_msg = 'NICEPAY';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,6 +158,21 @@ function pg_setting_check($is_print=false){
|
||||
}
|
||||
}
|
||||
|
||||
function is_cancel_shop_pg_order($od){
|
||||
|
||||
$is_od_pg_cancel = false;
|
||||
|
||||
if (($od['od_settle_case'] == '신용카드' || $od['od_settle_case'] == '간편결제' || $od['od_settle_case'] == 'KAKAOPAY') || ($od['od_pg'] == 'inicis' && is_inicis_order_pay($od['od_settle_case']))) {
|
||||
$is_od_pg_cancel = true;
|
||||
}
|
||||
|
||||
if ($od['od_pg'] === 'nicepay' && in_array($od['od_settle_case'], array('계좌이체', '휴대폰'))) {
|
||||
$is_od_pg_cancel = true;
|
||||
}
|
||||
|
||||
return $is_od_pg_cancel;
|
||||
}
|
||||
|
||||
function check_order_inicis_tmps(){
|
||||
global $g5, $config, $default, $member;
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ $ca = array(
|
||||
'ca_name'=>'',
|
||||
'ca_order'=>'',
|
||||
'ca_mb_id'=>'',
|
||||
'ca_skin_dir'=>'',
|
||||
'ca_cert_use'=>0,
|
||||
'ca_adult_use'=>0,
|
||||
'ca_sell_email'=>'',
|
||||
|
||||
@@ -193,6 +193,7 @@ if ($w == "")
|
||||
ca_name = '$ca_name',
|
||||
$sql_common ";
|
||||
sql_query($sql);
|
||||
run_event('shop_admin_category_created', $ca_id);
|
||||
}
|
||||
else if ($w == "u")
|
||||
{
|
||||
@@ -212,6 +213,7 @@ else if ($w == "u")
|
||||
$sql .= " and ca_mb_id = '{$member['mb_id']}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
run_event('shop_admin_category_updated', $ca_id);
|
||||
}
|
||||
else if ($w == "d")
|
||||
{
|
||||
@@ -243,6 +245,7 @@ else if ($w == "d")
|
||||
// 분류 삭제
|
||||
$sql = " delete from {$g5['g5_shop_category_table']} where ca_id = '$ca_id' ";
|
||||
sql_query($sql);
|
||||
run_event('shop_admin_category_deleted', $ca_id);
|
||||
}
|
||||
|
||||
if(function_exists('get_admin_captcha_by'))
|
||||
|
||||
@@ -17,7 +17,7 @@ if ($stx != "") {
|
||||
$sql_search .= " $where $sfl like '%$stx%' ";
|
||||
$where = " and ";
|
||||
}
|
||||
if ($save_stx && ($save_stx != $stx))
|
||||
if (isset($save_stx) && $save_stx && ($save_stx != $stx))
|
||||
$page = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,8 +13,6 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
$userinfo = get_icode_userinfo($config['cf_icode_id'], $config['cf_icode_pw']);
|
||||
}
|
||||
|
||||
check_log_folder(G5_SHOP_PATH.'/inicis/key', false);
|
||||
|
||||
$g5['title'] = '쇼핑몰설정';
|
||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
|
||||
@@ -68,8 +66,7 @@ if(!isset($default['de_pg_service'])) {
|
||||
// inicis 필드 추가
|
||||
if(!isset($default['de_inicis_mid'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}`
|
||||
ADD `de_inicis_mid` varchar(255) NOT NULL DEFAULT '' AFTER `de_kcp_site_key`,
|
||||
ADD `de_inicis_admin_key` varchar(255) NOT NULL DEFAULT '' AFTER `de_inicis_mid` ", true);
|
||||
ADD `de_inicis_mid` varchar(255) NOT NULL DEFAULT '' AFTER `de_kcp_site_key` ", true);
|
||||
}
|
||||
|
||||
// 모바일 초기화면 이미지 줄 수 필드 추가
|
||||
@@ -137,7 +134,7 @@ if(!isset($default['de_kakaopay_mid'])) {
|
||||
// 이니시스 웹결제 사인키 필드 추가
|
||||
if(!isset($default['de_inicis_sign_key'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}`
|
||||
ADD `de_inicis_sign_key` varchar(255) NOT NULL DEFAULT '' AFTER `de_inicis_admin_key` ", true);
|
||||
ADD `de_inicis_sign_key` varchar(255) NOT NULL DEFAULT '' ", true);
|
||||
}
|
||||
|
||||
// 네이버페이 필드추가
|
||||
@@ -202,6 +199,22 @@ if( ! isset($default['de_easy_pay_services']) ){
|
||||
sql_query($sql, false);
|
||||
}
|
||||
|
||||
// KG 이니시스 iniapi_key 추가
|
||||
if( ! isset($default['de_inicis_iniapi_key']) ){
|
||||
$sql = "ALTER TABLE `{$g5['g5_shop_default_table']}`
|
||||
ADD COLUMN `de_inicis_iniapi_key` VARCHAR(30) NOT NULL DEFAULT '' AFTER `de_inicis_sign_key`,
|
||||
ADD COLUMN `de_inicis_iniapi_iv` VARCHAR(30) NOT NULL DEFAULT '' AFTER `de_inicis_iniapi_key`; ";
|
||||
sql_query($sql, false);
|
||||
}
|
||||
|
||||
// NICEPAY mid, key 추가
|
||||
if (! isset($default['de_nicepay_mid'])) {
|
||||
$sql = "ALTER TABLE `{$g5['g5_shop_default_table']}`
|
||||
ADD COLUMN `de_nicepay_mid` VARCHAR(20) NOT NULL DEFAULT '' AFTER `de_inicis_cartpoint_use`,
|
||||
ADD COLUMN `de_nicepay_key` VARCHAR(150) NOT NULL DEFAULT '' AFTER `de_nicepay_mid`; ";
|
||||
sql_query($sql, false);
|
||||
}
|
||||
|
||||
if( function_exists('pg_setting_check') ){
|
||||
pg_setting_check(true);
|
||||
}
|
||||
@@ -593,7 +606,7 @@ if(!$default['de_kakaopay_cancelpwd']){
|
||||
<tr>
|
||||
<th scope="row"><label for="de_bank_account">은행계좌번호</label></th>
|
||||
<td>
|
||||
<textarea name="de_bank_account" id="de_bank_account"><?php echo $default['de_bank_account']; ?></textarea>
|
||||
<textarea name="de_bank_account" id="de_bank_account"><?php echo html_purifier($default['de_bank_account']); ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -628,6 +641,12 @@ if(!$default['de_kakaopay_cancelpwd']){
|
||||
<?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>
|
||||
<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>
|
||||
<th scope="row"><label for="de_hp_use">휴대폰결제사용</label></th>
|
||||
<td>
|
||||
@@ -758,6 +777,7 @@ if(!$default['de_kakaopay_cancelpwd']){
|
||||
<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'] == '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>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -781,10 +801,11 @@ if(!$default['de_kakaopay_cancelpwd']){
|
||||
<tr class="pg_info_fld kcp_info_fld">
|
||||
<th scope="row"><label for="de_kcp_easy_pays">NHN KCP 간편결제</label></th>
|
||||
<td>
|
||||
<?php echo help("체크시 NHN KCP 간편결제들을 활성화 합니다.\nNHN_KCP > 네이버페이, 카카오페이는 테스트결제가 되지 않습니다."); ?>
|
||||
<?php echo help("체크시 NHN KCP 간편결제들을 활성화 합니다.\nNHN_KCP > 네이버페이, 카카오페이는 테스트결제가 되지 않습니다.\n애플페이는 IOS 기기에 모바일결제만 가능합니다."); ?>
|
||||
<input type="checkbox" id="de_easy_nhnkcp_payco" name="de_easy_pays[]" value="nhnkcp_payco" <?php if(stripos($default['de_easy_pay_services'], 'nhnkcp_payco') !== false){ echo 'checked="checked"'; } ?> > <label for="de_easy_nhnkcp_payco" disabled>PAYCO (페이코)</label><br>
|
||||
<input type="checkbox" id="de_easy_nhnkcp_naverpay" name="de_easy_pays[]" value="nhnkcp_naverpay" <?php if(stripos($default['de_easy_pay_services'], 'nhnkcp_naverpay') !== false){ echo 'checked="checked"'; } ?> > <label for="de_easy_nhnkcp_naverpay">NAVERPAY (네이버페이)</label><br>
|
||||
<input type="checkbox" id="de_easy_nhnkcp_kakaopay" name="de_easy_pays[]" value="nhnkcp_kakaopay" <?php if(stripos($default['de_easy_pay_services'], 'nhnkcp_kakaopay') !== false){ echo 'checked="checked"'; } ?> > <label for="de_easy_nhnkcp_kakaopay">KAKAOPAY (카카오페이)</label>
|
||||
<input type="checkbox" id="de_easy_nhnkcp_kakaopay" name="de_easy_pays[]" value="nhnkcp_kakaopay" <?php if(stripos($default['de_easy_pay_services'], 'nhnkcp_kakaopay') !== false){ echo 'checked="checked"'; } ?> > <label for="de_easy_nhnkcp_kakaopay">KAKAOPAY (카카오페이)</label><br>
|
||||
<input type="checkbox" id="de_easy_nhnkcp_applepay" name="de_easy_pays[]" value="nhnkcp_applepay" <?php if(stripos($default['de_easy_pay_services'], 'nhnkcp_applepay') !== false){ echo 'checked="checked"'; } ?> > <label for="de_easy_nhnkcp_applepay">APPLEPAY (애플페이)</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="pg_info_fld kcp_info_fld">
|
||||
@@ -814,7 +835,7 @@ if(!$default['de_kakaopay_cancelpwd']){
|
||||
<tr class="pg_info_fld lg_info_fld">
|
||||
<th scope="row"><label for="cf_lg_mert_key">토스페이먼츠 MERT KEY</label></th>
|
||||
<td>
|
||||
<?php echo help("토스페이먼츠 상점MertKey는 상점관리자 -> 계약정보 -> 상점정보관리에서 확인하실 수 있습니다.\n예) 95160cce09854ef44d2edb2bfb05f9f3\n<a href=\"".G5_ADMIN_URL."/config_form.php#anc_cf_cert\">기본환경설정 > 본인확인</a> 설정의 토스페이먼츠 MERT KEY와 동일합니다."); ?>
|
||||
<?php echo help("토스페이먼츠 상점MertKey는 상점관리자 -> 개발자센터 -> API키 -> 머트 키에서 확인하실 수 있습니다.\n예) 95160cce09854ef44d2edb2bfb05f9f3"); ?>
|
||||
<input type="text" name="cf_lg_mert_key" value="<?php echo get_sanitize_input($config['cf_lg_mert_key']); ?>" id="cf_lg_mert_key" class="frm_input " size="36" maxlength="50">
|
||||
</td>
|
||||
</tr>
|
||||
@@ -829,17 +850,24 @@ if(!$default['de_kakaopay_cancelpwd']){
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="pg_info_fld inicis_info_fld">
|
||||
<th scope="row"><label for="de_inicis_admin_key">KG이니시스 키패스워드</label></th>
|
||||
<th scope="row"><label for="de_inicis_sign_key">KG이니시스 웹결제 사인키</label></th>
|
||||
<td>
|
||||
<?php echo help("KG이니시스에서 발급받은 4자리 상점 키패스워드를 입력합니다.\nKG이니시스 상점관리자 패스워드와 관련이 없습니다.\n키패스워드 값을 확인하시려면 상점측에 발급된 키파일 안의 readme.txt 파일을 참조해 주십시오"); ?>
|
||||
<input type="text" name="de_inicis_admin_key" value="<?php echo get_sanitize_input($default['de_inicis_admin_key']); ?>" id="de_inicis_admin_key" class="frm_input" size="5" maxlength="4">
|
||||
<?php echo help("KG이니시스에서 발급받은 웹결제 사인키를 입력합니다.\n<a href='https://iniweb.inicis.com/' target='_blank'>KG이니시스 가맹점관리자</a> > 상점정보 > 계약정보 > 부가정보의 웹결제 signkey생성 조회 버튼 클릭, 팝업창에서 생성 버튼 클릭 후 해당 값을 입력합니다."); ?>
|
||||
<input type="text" name="de_inicis_sign_key" value="<?php echo get_sanitize_input($default['de_inicis_sign_key']); ?>" id="de_inicis_sign_key" class="frm_input" size="40" maxlength="50">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="pg_info_fld inicis_info_fld">
|
||||
<th scope="row"><label for="de_inicis_sign_key">KG이니시스 웹결제 사인키</label></th>
|
||||
<th scope="row"><label for="de_inicis_iniapi_key">KG이니시스 INIAPI KEY</label></th>
|
||||
<td>
|
||||
<?php echo help("KG이니시스에서 발급받은 웹결제 사인키를 입력합니다.\nKG이니시스 상점관리자 > 상점정보 > 계약정보 > 부가정보의 웹결제 signkey생성 조회 버튼 클릭, 팝업창에서 생성 버튼 클릭 후 해당 값을 입력합니다."); ?>
|
||||
<input type="text" name="de_inicis_sign_key" value="<?php echo get_sanitize_input($default['de_inicis_sign_key']); ?>" id="de_inicis_sign_key" class="frm_input" size="40" maxlength="50">
|
||||
<?php echo help("<a href='https://iniweb.inicis.com/' target='_blank'>KG이니시스 가맹점관리자</a> > 상점정보 > 계약정보 > 부가정보 > INIAPI key 생성 조회 하여 KEY를 여기에 입력합니다.\n이 항목은 영카트 주문에서 kg이니시스 PG 결제 취소, 부분취소, 에스크로 배송등록, 현금영수증 발급에 필요합니다."); ?>
|
||||
<input type="text" name="de_inicis_iniapi_key" value="<?php echo get_sanitize_input($default['de_inicis_iniapi_key']); ?>" id="de_inicis_iniapi_key" class="frm_input" size="30" maxlength="30">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="pg_info_fld inicis_info_fld">
|
||||
<th scope="row"><label for="de_inicis_iniapi_iv">KG이니시스 INIAPI IV</label></th>
|
||||
<td>
|
||||
<?php echo help("<a href='https://iniweb.inicis.com/' target='_blank'>KG이니시스 가맹점관리자</a> > 상점정보 > 계약정보 > 부가정보 > INIAPI IV 생성 조회 하여 KEY를 여기에 입력합니다.\n이 항목은 영카트 주문에서 kg이니시스 현금영수증 발급에 필요합니다."); ?>
|
||||
<input type="text" name="de_inicis_iniapi_iv" value="<?php echo get_sanitize_input($default['de_inicis_iniapi_iv']); ?>" id="de_inicis_iniapi_iv" class="frm_input" size="30" maxlength="30">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="pg_info_fld inicis_info_fld">
|
||||
@@ -848,7 +876,7 @@ if(!$default['de_kakaopay_cancelpwd']){
|
||||
<a href="http://sir.kr/main/service/samsungpay.php" target="_blank" class="kg_btn">삼성페이 서비스신청하기</a>
|
||||
</th>
|
||||
<td>
|
||||
<?php echo help("KG이니시스와 별도로 <strong>삼성페이 사용 계약을 하신 경우</strong>에만 체크해주세요. (모바일 주문서 결제수단에 삼성페이가 노출됩니다.) <br >실결제시 반드시 결제대행사 KG이니시스 항목에 상점 아이디와 키패스워드를 입력해 주세요.", 50); ?>
|
||||
<?php echo help("KG이니시스와 별도로 <strong>삼성페이 사용 계약을 하신 경우</strong>에만 체크해주세요. (모바일 주문서 결제수단에 삼성페이가 노출됩니다.) <br >실결제시 반드시 결제대행사 KG이니시스 항목에 상점 아이디와 웹결제 사인키를 입력해 주세요.", 50); ?>
|
||||
<input type="checkbox" name="de_samsung_pay_use" value="1" id="de_samsung_pay_use"<?php echo $default['de_samsung_pay_use']?' checked':''; ?>> <label for="de_samsung_pay_use">사용</label>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -857,7 +885,7 @@ if(!$default['de_kakaopay_cancelpwd']){
|
||||
<label for="de_inicis_lpay_use">KG이니시스 L.pay 사용</label>
|
||||
</th>
|
||||
<td>
|
||||
<?php echo help("체크시 KG이니시스 L.pay를 사용합니다. <br >실결제시 반드시 결제대행사 KG이니시스 항목의 상점 정보( 아이디, 키패스워드, 웹결제 사인키 )를 입력해 주세요.", 50); ?>
|
||||
<?php echo help("체크시 KG이니시스 L.pay를 사용합니다. <br >실결제시 반드시 결제대행사 KG이니시스 항목의 상점 정보( 아이디, 웹결제 사인키 )를 입력해 주세요.", 50); ?>
|
||||
<input type="checkbox" name="de_inicis_lpay_use" value="1" id="de_inicis_lpay_use"<?php echo $default['de_inicis_lpay_use']?' checked':''; ?>> <label for="de_inicis_lpay_use">사용</label>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -866,7 +894,7 @@ if(!$default['de_kakaopay_cancelpwd']){
|
||||
<label for="de_inicis_kakaopay_use">KG이니시스 카카오페이 사용</label>
|
||||
</th>
|
||||
<td>
|
||||
<?php echo help("체크시 KG이니시스 결제의 카카오페이를 사용합니다. 주문서 결제수단에 카카오페이가 노출됩니다. <br>실결제시 반드시 결제대행사 KG이니시스 항목의 상점 정보( 아이디, 키패스워드, 웹결제 사인키 )를 입력해 주세요.", 50); ?>
|
||||
<?php echo help("체크시 KG이니시스 결제의 카카오페이를 사용합니다. 주문서 결제수단에 카카오페이가 노출됩니다. <br>실결제시 반드시 결제대행사 KG이니시스 항목의 상점 정보( 아이디, 웹결제 사인키 )를 입력해 주세요.", 50); ?>
|
||||
<input type="checkbox" name="de_inicis_kakaopay_use" value="1" id="de_inicis_kakaopay_use"<?php echo $default['de_inicis_kakaopay_use']?' checked':''; ?>> <label for="de_inicis_kakaopay_use">사용</label>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -905,7 +933,7 @@ if(!$default['de_kakaopay_cancelpwd']){
|
||||
</tr>
|
||||
<tr class="kakao_info_fld">
|
||||
<th scope="row">
|
||||
<label for="de_kakaopay_enckey">카카오페이 사용</label>
|
||||
<label for="de_kakaopay_enckey">KG이니시스<br>카카오페이 사용</label>
|
||||
</th>
|
||||
<td>
|
||||
<?php echo help("체크시 카카오페이 (KG 이니시스)를 사용합니다. <br >KG 이니시스의 SIRK****** 아이디를 받은 상점만 해당됩니다.", 50); ?>
|
||||
@@ -919,6 +947,38 @@ if(!$default['de_kakaopay_cancelpwd']){
|
||||
<input type="text" name="de_kakaopay_hashkey" value="<?php echo get_sanitize_input($default['de_kakaopay_hashkey']); ?>" id="de_kakaopay_hashkey" class="frm_input" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="pg_info_fld nicepay_info_fld" id="nicepay_info_anchor">
|
||||
<th scope="row"><label for="de_nicepay_mid">NICEPAY MID</label><br><a href="http://sir.kr/main/service/nicepayments_pg.php" target="_blank" id="scf_nicepay_reg" class="nicepay_btn">NICEPAY 신청하기</a></th>
|
||||
<td>
|
||||
<span class="frm_info">NICEPAY로 부터 발급 받으신 상점MID를 SR 을 제외한 나머지 자리를 입력 합니다.<br>NICEPAY 상점관리자 > 가맹점정보 > KEY관리에서 확인 할수 있습니다.<br>만약, 상점아이디가 SR로 시작하지 않는다면 계약담당자에게 변경 요청을 해주시기 바랍니다. 예) SRpaytestm</span>
|
||||
<span class="sitecode">SR</span>
|
||||
<input type="text" name="de_nicepay_mid" value="<?php echo get_sanitize_input($default['de_nicepay_mid']); ?>" id="de_nicepay_mid" class="frm_input" size="12" maxlength="12">
|
||||
영문소문자(숫자포함 가능)
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="pg_info_fld nicepay_info_fld">
|
||||
<th scope="row"><label for="de_nicepay_key">NICEPAY KEY</label></th>
|
||||
<td>
|
||||
<input type="text" name="de_nicepay_key" value="<?php echo get_sanitize_input($default['de_nicepay_key']); ?>" id="de_nicepay_key" class="frm_input" size="100" maxlength="100">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="pg_info_fld nicepay_info_fld">
|
||||
<th scope="row"><label for="de_nicepay_easy_pays">NICEPAY 간편결제</label></th>
|
||||
<td>
|
||||
<?php echo help("체크시 NICEPAY 간편결제들을 활성화 합니다.\nNICEPAY > 간편결제는 테스트결제가 되지 않습니다. 실결제에만 정상작동 합니다.\n애플페이는 IOS 기기에 모바일결제만 가능합니다."); ?>
|
||||
<input type="checkbox" id="de_easy_nicepay_samsungpay" name="de_easy_pays[]" value="nicepay_samsungpay" <?php if(stripos($default['de_easy_pay_services'], 'nicepay_samsungpay') !== false){ echo 'checked="checked"'; } ?> > <label for="de_easy_nicepay_samsungpay" disabled>삼성페이</label><br>
|
||||
<input type="checkbox" id="de_easy_nicepay_naverpay" name="de_easy_pays[]" value="nicepay_naverpay" <?php if(stripos($default['de_easy_pay_services'], 'nicepay_naverpay') !== false){ echo 'checked="checked"'; } ?> > <label for="de_easy_nicepay_naverpay">NAVERPAY (네이버페이)</label><br>
|
||||
<input type="checkbox" id="de_easy_nicepay_kakaopay" name="de_easy_pays[]" value="nicepay_kakaopay" <?php if(stripos($default['de_easy_pay_services'], 'nicepay_kakaopay') !== false){ echo 'checked="checked"'; } ?> > <label for="de_easy_nicepay_kakaopay">KAKAOPAY (카카오페이)</label><br>
|
||||
<input type="checkbox" id="de_easy_nicepay_applepay" name="de_easy_pays[]" value="nicepay_applepay" <?php if(stripos($default['de_easy_pay_services'], 'nicepay_applepay') !== false){ echo 'checked="checked"'; } ?> > <label for="de_easy_nicepay_applepay">APPLEPAY (애플페이)</label><br>
|
||||
<input type="checkbox" id="de_easy_nicepay_paycopay" name="de_easy_pays[]" value="nicepay_paycopay" <?php if(stripos($default['de_easy_pay_services'], 'nicepay_paycopay') !== false){ echo 'checked="checked"'; } ?> > <label for="de_easy_nicepay_paycopay">페이코</label><br>
|
||||
<input type="checkbox" id="de_easy_nicepay_skpay" name="de_easy_pays[]" value="nicepay_skpay" <?php if(stripos($default['de_easy_pay_services'], 'nicepay_skpay') !== false){ echo 'checked="checked"'; } ?> > <label for="de_easy_nicepay_skpay">SK페이</label><br>
|
||||
<input type="checkbox" id="de_easy_nicepay_ssgpay" name="de_easy_pays[]" value="nicepay_ssgpay" <?php if(stripos($default['de_easy_pay_services'], 'nicepay_ssgpay') !== false){ echo 'checked="checked"'; } ?> > <label for="de_easy_nicepay_ssgpay">SSG페이</label><br>
|
||||
<input type="checkbox" id="de_easy_nicepay_lpay" name="de_easy_pays[]" value="nicepay_lpay" <?php if(stripos($default['de_easy_pay_services'], 'nicepay_lpay') !== false){ echo 'checked="checked"'; } ?> > <label for="de_easy_nicepay_lpay">LPAY</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if (defined('G5_SHOP_DIRECT_NAVERPAY') && G5_SHOP_DIRECT_NAVERPAY) { ?>
|
||||
<tr class="naver_info_fld">
|
||||
<th scope="row">
|
||||
@@ -1007,8 +1067,8 @@ 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://pgweb.uplus.co.kr/" target="_blank" class="btn_frmline">실결제 관리자</a>
|
||||
<a href="https://pgweb.uplus.co.kr/tmert" target="_blank" class="btn_frmline">테스트 관리자</a>
|
||||
<a href="https://app.tosspayments.com/" target="_blank" class="btn_frmline">실결제 관리자</a>
|
||||
<a href="https://pgweb.tosspayments.com/tmert" target="_blank" class="btn_frmline">테스트 관리자</a>
|
||||
</div>
|
||||
<div class="scf_cardtest inicis_cardtest">
|
||||
<a href="https://iniweb.inicis.com/" target="_blank" class="btn_frmline">상점 관리자</a>
|
||||
@@ -1033,7 +1093,7 @@ if(!$default['de_kakaopay_cancelpwd']){
|
||||
<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="http://pgweb.dacom.net:7085/" target="_blank">상점관리자</a> 로그인 정보는 토스페이먼츠 상점아이디 첫 글자에 t를 추가해서 로그인하시기 바랍니다. 예) tsi_lguplus</li>
|
||||
<li>테스트결제의 <a href="https://pgweb.tosspayments.com/tmert" target="_blank">상점관리자</a> 로그인 정보는 토스페이먼츠 상점아이디 첫 글자에 t를 추가해서 로그인하시기 바랍니다. 예) tsi_lguplus</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>
|
||||
@@ -1715,6 +1775,10 @@ function fconfig_check(f)
|
||||
if( f.de_inicis_mid.value && f.de_inicis_sign_key.value && parseInt(f.de_card_test.value) > 0 ){
|
||||
pg_msg = "KG이니시스";
|
||||
}
|
||||
} else if ( f.de_pg_service.value == "nicepay" ) {
|
||||
if( f.de_nicepay_mid.value && f.de_nicepay_key.value && parseInt(f.de_card_test.value) > 0 ){
|
||||
pg_msg = "NICEPAY";
|
||||
}
|
||||
}
|
||||
|
||||
if( pg_msg ){
|
||||
@@ -2011,20 +2075,8 @@ if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use']
|
||||
} catch(Exception $e) {
|
||||
}
|
||||
|
||||
if(!is_dir($log_path)) {
|
||||
echo '<script>'.PHP_EOL;
|
||||
echo 'alert("'.str_replace(G5_PATH.'/', '', G5_SHOP_PATH).'/inicis 폴더 안에 log 폴더를 생성하신 후 쓰기권한을 부여해 주십시오.\n> mkdir log\n> chmod 707 log");'.PHP_EOL;
|
||||
echo '</script>'.PHP_EOL;
|
||||
} else {
|
||||
if(!is_writable($log_path)) {
|
||||
echo '<script>'.PHP_EOL;
|
||||
echo 'alert("'.str_replace(G5_PATH.'/', '',$log_path).' 폴더에 쓰기권한을 부여해 주십시오.\n> chmod 707 log");'.PHP_EOL;
|
||||
echo '</script>'.PHP_EOL;
|
||||
} else {
|
||||
if( function_exists('check_log_folder') && is_writable($log_path) ){
|
||||
check_log_folder($log_path);
|
||||
}
|
||||
}
|
||||
if( function_exists('check_log_folder') && is_writable($log_path) ){
|
||||
check_log_folder($log_path);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ if ($_FILES['mobile_logo_img2']['name']) upload_file($_FILES['mobile_logo_img2']
|
||||
$de_kcp_mid = isset($_POST['de_kcp_mid']) ? substr($_POST['de_kcp_mid'], 0, 3) : '';
|
||||
$cf_icode_server_port = isset($cf_icode_server_port) ? preg_replace('/[^0-9]/', '', $cf_icode_server_port) : '7295';
|
||||
|
||||
$de_shop_skin = isset($_POST['de_shop_skin']) ? preg_replace('#\.+(\/|\\\)#', '', $_POST['de_shop_skin']) : 'basic';
|
||||
$de_shop_mobile_skin = isset($_POST['de_shop_mobile_skin']) ? preg_replace('#\.+(\/|\\\)#', '', $_POST['de_shop_mobile_skin']) : 'basic';
|
||||
$de_shop_skin = isset($_POST['de_shop_skin']) ? preg_replace(array('#\.+(\/|\\\)#', '#[\'\"]#'), array('', ''), $_POST['de_shop_skin']) : 'basic';
|
||||
$de_shop_mobile_skin = isset($_POST['de_shop_mobile_skin']) ? preg_replace(array('#\.+(\/|\\\)#', '#[\'\"]#'), array('', ''), $_POST['de_shop_mobile_skin']) : 'basic';
|
||||
|
||||
$skins = get_skin_dir('shop');
|
||||
|
||||
@@ -59,7 +59,7 @@ $de_shop_mobile_skin = in_array($de_shop_mobile_skin, $mobile_skins) ? $de_shop_
|
||||
$check_skin_keys = array('de_type1_list_skin', 'de_type2_list_skin', 'de_type3_list_skin', 'de_type4_list_skin', 'de_type5_list_skin', 'de_mobile_type1_list_skin', 'de_mobile_type2_list_skin', 'de_mobile_type3_list_skin', 'de_mobile_type4_list_skin', 'de_mobile_type5_list_skin', 'de_rel_list_skin', 'de_mobile_rel_list_skin', 'de_search_list_skin', 'de_mobile_search_list_skin', 'de_listtype_list_skin', 'de_mobile_listtype_list_skin');
|
||||
|
||||
foreach($check_skin_keys as $key){
|
||||
$$key = $_POST[$key] = isset($_POST[$key]) ? preg_replace('#\.+(\/|\\\)#', '', strip_tags($_POST[$key])) : '';
|
||||
$$key = $_POST[$key] = isset($_POST[$key]) ? preg_replace(array('#\.+(\/|\\\)#', '#[\'\"]#'), array('', ''), strip_tags($_POST[$key])) : '';
|
||||
|
||||
if( isset($_POST[$key]) && preg_match('#\.+(\/|\\\)#', $_POST[$key]) ){
|
||||
alert('스킨설정에 유효하지 문자가 포함되어 있습니다.');
|
||||
@@ -160,12 +160,15 @@ $check_sanitize_keys = array(
|
||||
'cf_lg_mid', //LG유플러스 상점아이디
|
||||
'cf_lg_mert_key', //LG유플러스 MERT KEY
|
||||
'de_inicis_mid', //KG이니시스 상점아이디
|
||||
'de_inicis_admin_key', //KG이니시스 키패스워드
|
||||
'de_inicis_iniapi_key', //KG이니시스 INIAPI KEY
|
||||
'de_inicis_iniapi_iv', //KG이니시스 INIAPI IV
|
||||
'de_inicis_sign_key', //KG이니시스 웹결제 사인키
|
||||
'de_samsung_pay_use', //KG이니시스 삼성페이 사용
|
||||
'de_inicis_lpay_use', //KG이니시스 Lpay 사용
|
||||
'de_inicis_kakaopay_use', //KG이니시스 카카오페이 사용
|
||||
'de_inicis_cartpoint_use', //KG이니시스 신용카드 포인트 결제
|
||||
'de_nicepay_mid', //NICEPAY 상점아이디
|
||||
'de_nicepay_key', //NICEPAY 상점키
|
||||
'de_kakaopay_mid', //카카오페이 상점MID
|
||||
'de_kakaopay_key', //카카오페이 상점키
|
||||
'de_kakaopay_enckey', //카카오페이 상점 EncKey
|
||||
@@ -376,6 +379,8 @@ $sql = " update {$g5['g5_shop_default_table']}
|
||||
de_inicis_lpay_use = '{$de_inicis_lpay_use}',
|
||||
de_inicis_kakaopay_use = '{$de_inicis_kakaopay_use}',
|
||||
de_inicis_cartpoint_use = '{$de_inicis_cartpoint_use}',
|
||||
de_nicepay_mid = '{$de_nicepay_mid}',
|
||||
de_nicepay_key = '{$de_nicepay_key}',
|
||||
de_card_noint_use = '{$de_card_noint_use}',
|
||||
de_card_point = '{$de_card_point}',
|
||||
de_settle_min_point = '{$de_settle_min_point}',
|
||||
@@ -399,7 +404,8 @@ $sql = " update {$g5['g5_shop_default_table']}
|
||||
de_kcp_mid = '{$de_kcp_mid}',
|
||||
de_kcp_site_key = '{$de_kcp_site_key}',
|
||||
de_inicis_mid = '{$de_inicis_mid}',
|
||||
de_inicis_admin_key = '{$de_inicis_admin_key}',
|
||||
de_inicis_iniapi_key = '{$de_inicis_iniapi_key}',
|
||||
de_inicis_iniapi_iv = '{$de_inicis_iniapi_iv}',
|
||||
de_inicis_sign_key = '{$de_inicis_sign_key}',
|
||||
de_iche_use = '{$de_iche_use}',
|
||||
de_sms_cont1 = '{$_POST['de_sms_cont1']}',
|
||||
|
||||
@@ -46,13 +46,13 @@ include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
|
||||
?>
|
||||
|
||||
<form name="fcouponform" action="./couponformupdate.php" method="post" onsubmit="return form_check(this);">
|
||||
<input type="hidden" name="w" value="<?php echo $w; ?>">
|
||||
<input type="hidden" name="cp_id" value="<?php echo $cp_id; ?>">
|
||||
<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;?>">
|
||||
<input type="hidden" name="w" value="<?php echo get_sanitize_input($w); ?>">
|
||||
<input type="hidden" name="cp_id" value="<?php echo get_sanitize_input($cp_id); ?>">
|
||||
<input type="hidden" name="sst" value="<?php echo get_sanitize_input($sst); ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo get_sanitize_input($sod); ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo get_sanitize_input($sfl); ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo get_sanitize_input($stx); ?>">
|
||||
<input type="hidden" name="page" value="<?php echo get_sanitize_input($page);?>">
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
|
||||
@@ -45,7 +45,7 @@ $qstr1 = 'mb_name='.urlencode($mb_name);
|
||||
<form name="fmember" method="get">
|
||||
<div id="scp_list_find">
|
||||
<label for="mb_name">회원이름</label>
|
||||
<input type="text" name="mb_name" id="mb_name" value="<?php echo get_text($mb_name); ?>" class="frm_input required" required size="20">
|
||||
<input type="text" name="mb_name" id="mb_name" value="<?php echo get_text($mb_name); ?>" class="frm_input" size="20">
|
||||
<input type="submit" value="검색" class="btn_frmline">
|
||||
</div>
|
||||
<div class="tbl_head01 tbl_wrap new_win_con">
|
||||
|
||||
+62
-60
@@ -112,7 +112,7 @@ function get_max_value($arr)
|
||||
return array_pop($arr);
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if (! auth_check_menu($auth, '400400', 'r', true)) { ?>
|
||||
<div class="sidx">
|
||||
<section id="anc_sidx_ord">
|
||||
<h2>주문현황</h2>
|
||||
@@ -368,6 +368,66 @@ function get_max_value($arr)
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
jQuery(function($) {
|
||||
graph_draw();
|
||||
|
||||
$("#sidx_graph_area div").hover(
|
||||
function() {
|
||||
if($(this).is(":animated"))
|
||||
return false;
|
||||
|
||||
var title = $(this).attr("title");
|
||||
if(title && $(this).data("title") == undefined)
|
||||
$(this).data("title", title);
|
||||
var left = parseInt($(this).css("left")) + 10;
|
||||
var bottom = $(this).height() + 5;
|
||||
|
||||
$(this)
|
||||
.attr("title", "")
|
||||
.append("<div id=\"price_tooltip\"><div></div></div>");
|
||||
$("#price_tooltip")
|
||||
.find("div")
|
||||
.html(title)
|
||||
.end()
|
||||
// .css({ left: left+"px", bottom: bottom+"px" })
|
||||
.show(200);
|
||||
},
|
||||
function() {
|
||||
if($(this).is(":animated"))
|
||||
return false;
|
||||
|
||||
$(this).attr("title", $(this).data("title"));
|
||||
$("#price_tooltip").remove();
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
function graph_draw()
|
||||
{
|
||||
var g_h1 = new Array("<?php echo implode('", "', $h_val['order']); ?>");
|
||||
var g_h2 = new Array("<?php echo implode('", "', $h_val['cancel']); ?>");
|
||||
var duration = 600;
|
||||
|
||||
var $el = $("#sidx_graph_area li");
|
||||
var h1, h2;
|
||||
var $g1, $g2;
|
||||
|
||||
$el.each(function(index) {
|
||||
h1 = g_h1[index];
|
||||
h2 = g_h2[index];
|
||||
|
||||
$g1 = $(this).find(".order");
|
||||
$g2 = $(this).find(".cancel");
|
||||
|
||||
$g1.animate({ height: h1+"px" }, duration);
|
||||
$g2.animate({ height: h2+"px" }, duration);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php } //endif ?>
|
||||
<?php if ($is_admin === 'super') { ?>
|
||||
<div class="sidx sidx_cs">
|
||||
<section id="anc_sidx_oneq">
|
||||
<h2>1:1문의</h2>
|
||||
@@ -480,64 +540,6 @@ function get_max_value($arr)
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
graph_draw();
|
||||
|
||||
$("#sidx_graph_area div").hover(
|
||||
function() {
|
||||
if($(this).is(":animated"))
|
||||
return false;
|
||||
|
||||
var title = $(this).attr("title");
|
||||
if(title && $(this).data("title") == undefined)
|
||||
$(this).data("title", title);
|
||||
var left = parseInt($(this).css("left")) + 10;
|
||||
var bottom = $(this).height() + 5;
|
||||
|
||||
$(this)
|
||||
.attr("title", "")
|
||||
.append("<div id=\"price_tooltip\"><div></div></div>");
|
||||
$("#price_tooltip")
|
||||
.find("div")
|
||||
.html(title)
|
||||
.end()
|
||||
// .css({ left: left+"px", bottom: bottom+"px" })
|
||||
.show(200);
|
||||
},
|
||||
function() {
|
||||
if($(this).is(":animated"))
|
||||
return false;
|
||||
|
||||
$(this).attr("title", $(this).data("title"));
|
||||
$("#price_tooltip").remove();
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
function graph_draw()
|
||||
{
|
||||
var g_h1 = new Array("<?php echo implode('", "', $h_val['order']); ?>");
|
||||
var g_h2 = new Array("<?php echo implode('", "', $h_val['cancel']); ?>");
|
||||
var duration = 600;
|
||||
|
||||
var $el = $("#sidx_graph_area li");
|
||||
var h1, h2;
|
||||
var $g1, $g2;
|
||||
|
||||
$el.each(function(index) {
|
||||
h1 = g_h1[index];
|
||||
h2 = g_h2[index];
|
||||
|
||||
$g1 = $(this).find(".order");
|
||||
$g2 = $(this).find(".cancel");
|
||||
|
||||
$g1.animate({ height: h1+"px" }, duration);
|
||||
$g2.animate({ height: h2+"px" }, duration);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
} //end if
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
@@ -32,6 +32,8 @@ include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
<script>
|
||||
// <![CDATA[
|
||||
var g5_admin_csrf_token_key = "<?php echo (function_exists('admin_csrf_token_key')) ? admin_csrf_token_key() : ''; ?>";
|
||||
|
||||
function _copy(link)
|
||||
{
|
||||
var new_it_id = document.getElementById('new_it_id').value;
|
||||
|
||||
@@ -53,6 +53,7 @@ $opt_sql = " insert ignore into {$g5['g5_shop_item_option_table']} ( io_id, io_t
|
||||
sql_query($opt_sql);
|
||||
|
||||
// html 에디터로 첨부된 이미지 파일 복사
|
||||
$copied_editor_images = array();
|
||||
if($cp['it_explan']) {
|
||||
$matchs = get_editor_image($cp['it_explan'], false);
|
||||
$count_matchs = (isset($matchs[1]) && is_array($matchs[1])) ? count($matchs[1]) : 0;
|
||||
@@ -73,7 +74,13 @@ if($cp['it_explan']) {
|
||||
|
||||
$newfile = preg_replace("/\.([^\.]+)$/", "_".$new_it_id.".\\1", $matchs[1][$i]);
|
||||
$cp['it_explan'] = str_replace($matchs[1][$i], $newfile, $cp['it_explan']);
|
||||
|
||||
$copied_editor_images[] = array(
|
||||
'original' => $srcfile,
|
||||
'new' => $dstfile
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$sql = " update {$g5['g5_shop_item_table']} set it_explan = '".addslashes($cp['it_explan'])."' where it_id = '$new_it_id' ";
|
||||
@@ -100,6 +107,11 @@ if($cp['it_mobile_explan']) {
|
||||
|
||||
$newfile = preg_replace("/\.([^\.]+)$/", "_".$new_it_id.".\\1", $matchs[1][$i]);
|
||||
$cp['it_mobile_explan'] = str_replace($matchs[1][$i], $newfile, $cp['it_mobile_explan']);
|
||||
|
||||
$copied_editor_images[] = array(
|
||||
'original' => $srcfile,
|
||||
'new' => $dstfile
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,6 +152,7 @@ function copy_directory($src_dir, $dest_dir)
|
||||
}
|
||||
|
||||
// 파일복사
|
||||
$copied_item_files = array();
|
||||
$dest_path = G5_DATA_PATH.'/item/'.$new_it_id;
|
||||
@mkdir($dest_path, G5_DIR_PERMISSION);
|
||||
@chmod($dest_path, G5_DIR_PERMISSION);
|
||||
@@ -155,6 +168,11 @@ for($i=1; $i<=10; $i++) {
|
||||
copy($file, $dstfile);
|
||||
@chmod($dstfile, G5_FILE_PERMISSION);
|
||||
$new_img = $new_it_id.'/'.basename($file);
|
||||
|
||||
$copied_item_files[] = array(
|
||||
'original' => $file,
|
||||
'new' => $dstfile,
|
||||
);
|
||||
}
|
||||
|
||||
$sql_img .= $comma." it_img{$i} = '$new_img' ";
|
||||
@@ -166,6 +184,24 @@ $sql = " update {$g5['g5_shop_item_table']}
|
||||
where it_id = '$new_it_id' ";
|
||||
sql_query($sql);
|
||||
|
||||
if( function_exists('shop_seo_title_update') ) shop_seo_title_update($new_it_id, true);
|
||||
|
||||
/**
|
||||
* 아이템 복사 처리 후 Event Hook
|
||||
* @var string $it_id 원본 아이템 ID
|
||||
* @var string $new_it_id 복사한 새로운 아이템 ID
|
||||
* @var array $cp 복사한 아이템 정보
|
||||
* @var array $copied_item_files 복사한 파일 목록
|
||||
* @var array $copied_editor_images 복사한 에디터 이미지 목록
|
||||
*/
|
||||
run_event('shop_admin_itemcopy', array(
|
||||
'it_id' => (string) $it_id,
|
||||
'new_it_id' => (string) $new_it_id,
|
||||
'cp' => $cp,
|
||||
'copied_item_files' => $copied_item_files,
|
||||
'copied_editor_images' => $copied_editor_images
|
||||
));
|
||||
|
||||
$qstr = "ca_id=$ca_id&sfl=$sfl&sca=$sca&page=$page&stx=".urlencode($stx);
|
||||
|
||||
goto_url("itemlist.php?$qstr");
|
||||
@@ -41,8 +41,8 @@ if ($ev_mimg_del) @unlink(G5_DATA_PATH."/event/{$ev_id}_m");
|
||||
if ($ev_himg_del) @unlink(G5_DATA_PATH."/event/{$ev_id}_h");
|
||||
if ($ev_timg_del) @unlink(G5_DATA_PATH."/event/{$ev_id}_t");
|
||||
|
||||
$ev_skin = preg_replace('#\.+(\/|\\\)#', '', $ev_skin);
|
||||
$ev_mobile_skin = preg_replace('#\.+(\/|\\\)#', '', $ev_mobile_skin);
|
||||
$ev_skin = preg_replace(array('#\.+(\/|\\\)#', '#[\'\"]#'), array('', ''), $ev_skin);
|
||||
$ev_mobile_skin = preg_replace(array('#\.+(\/|\\\)#', '#[\'\"]#'), array('', ''), $ev_mobile_skin);
|
||||
|
||||
$skin_regex_patten = "^list.[0-9]+\.skin\.php";
|
||||
|
||||
@@ -75,6 +75,7 @@ if ($w == "")
|
||||
$sql_common
|
||||
, ev_id = '$ev_id' ";
|
||||
sql_query($sql);
|
||||
run_event('shop_admin_event_created', $ev_id);
|
||||
}
|
||||
else if ($w == "u")
|
||||
{
|
||||
@@ -82,6 +83,7 @@ else if ($w == "u")
|
||||
$sql_common
|
||||
where ev_id = '$ev_id' ";
|
||||
sql_query($sql);
|
||||
run_event('shop_admin_event_updated', $ev_id);
|
||||
}
|
||||
else if ($w == "d")
|
||||
{
|
||||
@@ -92,6 +94,7 @@ else if ($w == "d")
|
||||
// 이벤트상품삭제
|
||||
$sql = " delete from {$g5['g5_shop_event_item_table']} where ev_id = '$ev_id' ";
|
||||
sql_query($sql);
|
||||
run_event('shop_admin_event_deleted', $ev_id);
|
||||
|
||||
$sql = " delete from {$g5['g5_shop_event_table']} where ev_id = '$ev_id' ";
|
||||
sql_query($sql);
|
||||
|
||||
@@ -112,6 +112,8 @@ else if ($w == "u")
|
||||
|
||||
if(!$it)
|
||||
alert('상품정보가 존재하지 않습니다.');
|
||||
|
||||
if (function_exists('check_case_exist_title')) check_case_exist_title($it, G5_SHOP_DIR, false);
|
||||
|
||||
if (! (isset($ca_id) && $ca_id))
|
||||
$ca_id = $it['ca_id'];
|
||||
@@ -678,9 +680,9 @@ $(function(){
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="it_stock_sms">재입고SMS 알림</label></th>
|
||||
<th scope="row"><label for="it_stock_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>
|
||||
|
||||
@@ -235,6 +235,14 @@ sql_query(" delete from {$g5['g5_shop_event_item_table']} where it_id = '$it_id'
|
||||
// 선택옵션
|
||||
sql_query(" delete from {$g5['g5_shop_item_option_table']} where io_type = '0' and it_id = '$it_id' "); // 기존선택옵션삭제
|
||||
|
||||
// 금지할 패턴 목록
|
||||
$forbidden_patterns = array(
|
||||
'/<\s*script/i', // <script>
|
||||
'/<\s*iframe/i', // <iframe>
|
||||
'/on\w+\s*=/i', // onclick=, onerror= 등 이벤트 핸들러
|
||||
'/javascript:/i' // javascript: 프로토콜
|
||||
);
|
||||
|
||||
$option_count = (isset($_POST['opt_id']) && is_array($_POST['opt_id'])) ? count($_POST['opt_id']) : array();
|
||||
$it_option_subject = '';
|
||||
$it_supply_subject = '';
|
||||
@@ -243,8 +251,18 @@ if($option_count) {
|
||||
// 옵션명
|
||||
$opt1_cnt = $opt2_cnt = $opt3_cnt = 0;
|
||||
for($i=0; $i<$option_count; $i++) {
|
||||
$post_opt_id = isset($_POST['opt_id'][$i]) ? preg_replace(G5_OPTION_ID_FILTER, '', strip_tags($_POST['opt_id'][$i])) : '';
|
||||
|
||||
$post_opt_id = isset($_POST['opt_id'][$i]) ? $_POST['opt_id'][$i] : '';
|
||||
|
||||
foreach ($forbidden_patterns as $pattern) {
|
||||
if (preg_match($pattern, $post_opt_id)) {
|
||||
$post_opt_id = '';
|
||||
$_POST['opt_id'][$i] = '';
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
|
||||
$post_opt_id = preg_replace(G5_OPTION_ID_FILTER, '', strip_tags($post_opt_id));
|
||||
|
||||
$opt_val = explode(chr(30), $post_opt_id);
|
||||
if(isset($opt_val[0]) && $opt_val[0])
|
||||
$opt1_cnt++;
|
||||
@@ -271,8 +289,18 @@ if($supply_count) {
|
||||
// 추가옵션명
|
||||
$arr_spl = array();
|
||||
for($i=0; $i<$supply_count; $i++) {
|
||||
$post_spl_id = isset($_POST['spl_id'][$i]) ? preg_replace(G5_OPTION_ID_FILTER, '', strip_tags($_POST['spl_id'][$i])) : '';
|
||||
|
||||
$post_spl_id = isset($_POST['spl_id'][$i]) ? $_POST['spl_id'][$i] : '';
|
||||
|
||||
foreach ($forbidden_patterns as $pattern) {
|
||||
if (preg_match($pattern, $post_spl_id)) {
|
||||
$post_spl_id = '';
|
||||
$_POST['spl_id'][$i] = '';
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
|
||||
$post_spl_id = preg_replace(G5_OPTION_ID_FILTER, '', strip_tags($post_spl_id));
|
||||
|
||||
$spl_val = explode(chr(30), $post_spl_id);
|
||||
if(!in_array($spl_val[0], $arr_spl))
|
||||
$arr_spl[] = $spl_val[0];
|
||||
@@ -285,8 +313,8 @@ if($supply_count) {
|
||||
$value_array = array();
|
||||
$count_ii_article = (isset($_POST['ii_article']) && is_array($_POST['ii_article'])) ? count($_POST['ii_article']) : 0;
|
||||
for($i=0; $i<$count_ii_article; $i++) {
|
||||
$key = isset($_POST['ii_article'][$i]) ? strip_tags($_POST['ii_article'][$i], '<br><span><strong><b>') : '';
|
||||
$val = isset($_POST['ii_value'][$i]) ? strip_tags($_POST['ii_value'][$i], '<br><span><strong><b>') : '';
|
||||
$key = isset($_POST['ii_article'][$i]) ? html_purifier($_POST['ii_article'][$i]) : '';
|
||||
$val = isset($_POST['ii_value'][$i]) ? html_purifier($_POST['ii_value'][$i]) : '';
|
||||
$value_array[$key] = $val;
|
||||
}
|
||||
$it_info_value = addslashes(serialize($value_array));
|
||||
@@ -476,13 +504,13 @@ if ($w == "" || $w == "u")
|
||||
{
|
||||
$sql = " insert into {$g5['g5_shop_item_relation_table']}
|
||||
set it_id = '$it_id',
|
||||
it_id2 = '$it_id2[$i]',
|
||||
it_id2 = '".sql_real_escape_string($it_id2[$i])."',
|
||||
ir_no = '$i' ";
|
||||
sql_query($sql, false);
|
||||
|
||||
// 관련상품의 반대로도 등록
|
||||
$sql = " insert into {$g5['g5_shop_item_relation_table']}
|
||||
set it_id = '$it_id2[$i]',
|
||||
set it_id = '".sql_real_escape_string($it_id2[$i])."',
|
||||
it_id2 = '$it_id',
|
||||
ir_no = '$i' ";
|
||||
sql_query($sql, false);
|
||||
@@ -496,7 +524,7 @@ if ($w == "" || $w == "u")
|
||||
if (trim($ev_id[$i]))
|
||||
{
|
||||
$sql = " insert into {$g5['g5_shop_event_item_table']}
|
||||
set ev_id = '$ev_id[$i]',
|
||||
set ev_id = '".sql_real_escape_string($ev_id[$i])."',
|
||||
it_id = '$it_id' ";
|
||||
sql_query($sql, false);
|
||||
}
|
||||
@@ -510,7 +538,7 @@ if($option_count) {
|
||||
( `io_id`, `io_type`, `it_id`, `io_price`, `io_stock_qty`, `io_noti_qty`, `io_use` )
|
||||
VALUES ";
|
||||
for($i=0; $i<$option_count; $i++) {
|
||||
$sql .= $comma . " ( '{$_POST['opt_id'][$i]}', '0', '$it_id', '{$_POST['opt_price'][$i]}', '{$_POST['opt_stock_qty'][$i]}', '{$_POST['opt_noti_qty'][$i]}', '{$_POST['opt_use'][$i]}' )";
|
||||
$sql .= $comma . " ( '".sql_real_escape_string($_POST['opt_id'][$i])."', '0', '$it_id', '".sql_real_escape_string($_POST['opt_price'][$i])."', '".sql_real_escape_string($_POST['opt_stock_qty'][$i])."', '".sql_real_escape_string($_POST['opt_noti_qty'][$i])."', '".sql_real_escape_string($_POST['opt_use'][$i])."' )";
|
||||
$comma = ' , ';
|
||||
}
|
||||
|
||||
@@ -524,7 +552,7 @@ if($supply_count) {
|
||||
( `io_id`, `io_type`, `it_id`, `io_price`, `io_stock_qty`, `io_noti_qty`, `io_use` )
|
||||
VALUES ";
|
||||
for($i=0; $i<$supply_count; $i++) {
|
||||
$sql .= $comma . " ( '{$_POST['spl_id'][$i]}', '1', '$it_id', '{$_POST['spl_price'][$i]}', '{$_POST['spl_stock_qty'][$i]}', '{$_POST['spl_noti_qty'][$i]}', '{$_POST['spl_use'][$i]}' )";
|
||||
$sql .= $comma . " ( '".sql_real_escape_string($_POST['spl_id'][$i])."', '1', '$it_id', '".sql_real_escape_string($_POST['spl_price'][$i])."', '".sql_real_escape_string($_POST['spl_stock_qty'][$i])."', '".sql_real_escape_string($_POST['spl_noti_qty'][$i])."', '".sql_real_escape_string($_POST['spl_use'][$i])."' )";
|
||||
$comma = ' , ';
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,10 @@ include_once('./_common.php');
|
||||
|
||||
auth_check_menu($auth, $sub_menu, "r");
|
||||
|
||||
if (isset($sfl) && $sfl && !in_array($sfl, array('it_name','it_id','it_maker','it_brand','it_model','it_origin','it_sell_email'))) {
|
||||
$sfl = '';
|
||||
}
|
||||
|
||||
$g5['title'] = '상품관리';
|
||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
|
||||
|
||||
@@ -84,11 +84,11 @@ if($po_run) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_chk">
|
||||
<input type="hidden" name="opt_id[]" value="<?php echo $opt_id; ?>">
|
||||
<input type="hidden" name="opt_id[]" value="<?php echo get_text($opt_id); ?>">
|
||||
<label for="opt_chk_<?php echo $i; ?>" class="sound_only"></label>
|
||||
<input type="checkbox" name="opt_chk[]" id="opt_chk_<?php echo $i; ?>" value="1">
|
||||
</td>
|
||||
<td class="opt-cell"><?php echo $opt_1; if ($opt_2_len) echo ' <small>></small> '.$opt_2; if ($opt_3_len) echo ' <small>></small> '.$opt_3; ?></td>
|
||||
<td class="opt-cell"><?php echo get_text($opt_1); if ($opt_2_len) echo ' <small>></small> '.get_text($opt_2); if ($opt_3_len) echo ' <small>></small> '.get_text($opt_3); ?></td>
|
||||
<td class="td_numsmall">
|
||||
<label for="opt_price_<?php echo $i; ?>" class="sound_only"></label>
|
||||
<input type="text" name="opt_price[]" value="<?php echo $opt_price; ?>" id="opt_price_<?php echo $i; ?>" class="frm_input" size="9">
|
||||
|
||||
@@ -19,6 +19,7 @@ if ($w == "u")
|
||||
iq_answer = '$iq_answer'
|
||||
where iq_id = '$iq_id' ";
|
||||
sql_query($sql);
|
||||
run_event('shop_admin_item_qa_updated', $iq_id);
|
||||
|
||||
if(trim($iq_answer)) {
|
||||
$sql = " select a.iq_email, a.iq_hp, b.it_name
|
||||
|
||||
@@ -4,6 +4,10 @@ include_once('./_common.php');
|
||||
|
||||
auth_check_menu($auth, $sub_menu, "r");
|
||||
|
||||
if (isset($sfl) && $sfl && !in_array($sfl, array('it_name','a.it_id'))) {
|
||||
$sfl = '';
|
||||
}
|
||||
|
||||
$g5['title'] = '상품문의';
|
||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ if ($_POST['act_button'] == "선택삭제") {
|
||||
|
||||
$sql = "delete from {$g5['g5_shop_item_qa_table']} where iq_id = '{$iiq_id}' ";
|
||||
sql_query($sql);
|
||||
run_event('shop_admin_item_qa_deleted', $iiq_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -68,10 +68,10 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
||||
</div>
|
||||
|
||||
<form name="flist" class="local_sch01 local_sch">
|
||||
<input type="hidden" name="doc" value="<?php echo $doc; ?>">
|
||||
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
|
||||
<input type="hidden" name="sort2" value="<?php echo $sort2; ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
||||
<input type="hidden" name="doc" value="<?php echo get_sanitize_input($doc); ?>">
|
||||
<input type="hidden" name="sort1" value="<?php echo get_sanitize_input($sort1); ?>">
|
||||
<input type="hidden" name="sort2" value="<?php echo get_sanitize_input($sort2); ?>">
|
||||
<input type="hidden" name="page" value="<?php echo get_sanitize_input($page); ?>">
|
||||
|
||||
<label for="sel_ca_id" class="sound_only">검색대상</label>
|
||||
<select name="sel_ca_id" id="sel_ca_id">
|
||||
|
||||
@@ -35,7 +35,7 @@ $sql_common .= $sql_search;
|
||||
// 테이블의 전체 레코드수만 얻음
|
||||
$sql = " select count(*) as cnt " . $sql_common;
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
$total_count = isset($row['cnt']) ? $row['cnt'] : 0;
|
||||
|
||||
$rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
@@ -67,10 +67,10 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
||||
</div>
|
||||
|
||||
<form name="flist" class="local_sch01 local_sch">
|
||||
<input type="hidden" name="doc" value="<?php echo $doc; ?>">
|
||||
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
|
||||
<input type="hidden" name="sort2" value="<?php echo $sort2; ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
||||
<input type="hidden" name="doc" value="<?php echo get_sanitize_input($doc); ?>">
|
||||
<input type="hidden" name="sort1" value="<?php echo get_sanitize_input($sort1); ?>">
|
||||
<input type="hidden" name="sort2" value="<?php echo get_sanitize_input($sort2); ?>">
|
||||
<input type="hidden" name="page" value="<?php echo get_sanitize_input($page); ?>">
|
||||
|
||||
<label for="sel_ca_id" class="sound_only">분류선택</label>
|
||||
<select name="sel_ca_id" id="sel_ca_id">
|
||||
@@ -159,7 +159,6 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
||||
$it_stock_qty_st = ''; // 스타일 정의
|
||||
if($row['it_stock_qty'] <= $row['it_noti_qty']) {
|
||||
$it_stock_qty_st = ' sit_stock_qty_alert';
|
||||
$it_stock_qty = ''.$it_stock_qty.' !<span class="sound_only"> 재고부족 </span>';
|
||||
}
|
||||
|
||||
$bg = 'bg'.($i%2);
|
||||
@@ -171,7 +170,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
||||
<?php echo $row['it_id']; ?>
|
||||
</td>
|
||||
<td class="td_left"><a href="<?php echo $href; ?>"><?php echo get_it_image($row['it_id'], 50, 50); ?> <?php echo cut_str(stripslashes($row['it_name']), 60, "…"); ?></a></td>
|
||||
<td class="td_num<?php echo $it_stock_qty_st; ?>"><?php echo (int)$it_stock_qty; ?></td>
|
||||
<td class="td_num<?php echo $it_stock_qty_st; ?>"><?php echo $it_stock_qty; ?></td>
|
||||
<td class="td_num"><?php echo number_format((float)$wait_qty); ?></td>
|
||||
<td class="td_num"><?php echo number_format((float)$temporary_qty); ?></td>
|
||||
<td class="td_num">
|
||||
|
||||
@@ -4,7 +4,7 @@ include_once('./_common.php');
|
||||
|
||||
auth_check_menu($auth, $sub_menu, "r");
|
||||
|
||||
$g5['title'] = '재입고SMS 알림';
|
||||
$g5['title'] = '재입고 알림';
|
||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
|
||||
// 테이블 생성
|
||||
@@ -24,6 +24,12 @@ 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';
|
||||
@@ -74,10 +80,10 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
||||
</div>
|
||||
|
||||
<form name="flist" class="local_sch01 local_sch">
|
||||
<input type="hidden" name="doc" value="<?php echo $doc; ?>">
|
||||
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
|
||||
<input type="hidden" name="sort2" value="<?php echo $sort2; ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
||||
<input type="hidden" name="doc" value="<?php echo get_sanitize_input($doc); ?>">
|
||||
<input type="hidden" name="sort1" value="<?php echo get_sanitize_input($sort1); ?>">
|
||||
<input type="hidden" name="sort2" value="<?php echo get_sanitize_input($sort2); ?>">
|
||||
<input type="hidden" name="page" value="<?php echo get_sanitize_input($page); ?>">
|
||||
|
||||
<label for="sel_field" class="sound_only">검색대상</label>
|
||||
<select name="sel_field" id="sel_field">
|
||||
@@ -109,8 +115,9 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
||||
</th>
|
||||
<th scope="col">상품명</th>
|
||||
<th scope="col">휴대폰번호</th>
|
||||
<th scope="col">SMS전송</th>
|
||||
<th scope="col">SMS전송일시</th>
|
||||
<th scope="col">전송결과</th>
|
||||
<th scope="col">전송채널</th>
|
||||
<th scope="col">전송일시</th>
|
||||
<th scope="col">등록일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -139,13 +146,14 @@ $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="6" class="empty_table"><span>자료가 없습니다.</span></td></tr>';
|
||||
echo '<tr><td colspan="7" class="empty_table"><span>자료가 없습니다.</span></td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -157,6 +165,10 @@ $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>
|
||||
|
||||
@@ -170,13 +182,18 @@ function fitemstocksms_submit(f)
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택삭제") {
|
||||
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
var action = document.pressed;
|
||||
|
||||
return true;
|
||||
switch (action) {
|
||||
case "선택삭제":
|
||||
return confirm("선택한 자료를 정말 삭제하시겠습니까?");
|
||||
case "선택SMS전송":
|
||||
return confirm("선택한 자료에 대해서 SMS로 재입고 알림을 전송하시겠습니까?");
|
||||
case "선택알림톡전송":
|
||||
return confirm("선택한 자료에 대해서 알림톡으로 재입고 알림을 전송하시겠습니까?");
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -45,7 +45,8 @@ 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_send_time = '".G5_TIME_YMDHIS."',
|
||||
ss_channel = '1'
|
||||
where ss_id = '{$ss_id}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
@@ -98,6 +99,52 @@ 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')
|
||||
|
||||
@@ -55,12 +55,12 @@ if($ps_run) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_chk">
|
||||
<input type="hidden" name="spl_id[]" value="<?php echo $spl_id; ?>">
|
||||
<label for="spl_chk_<?php echo $i; ?>" class="sound_only"><?php echo $spl_subject.' '.$spl; ?></label>
|
||||
<input type="hidden" name="spl_id[]" value="<?php echo get_text($spl_id); ?>">
|
||||
<label for="spl_chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($spl_subject.' '.$spl); ?></label>
|
||||
<input type="checkbox" name="spl_chk[]" id="spl_chk_<?php echo $i; ?>" value="1">
|
||||
</td>
|
||||
<td class="spl-subject-cell"><?php echo $spl_subject; ?></td>
|
||||
<td class="spl-cell"><?php echo $spl; ?></td>
|
||||
<td class="spl-subject-cell"><?php echo get_text($spl_subject); ?></td>
|
||||
<td class="spl-cell"><?php echo get_text($spl); ?></td>
|
||||
<td class="td_numsmall">
|
||||
<label for="spl_price_<?php echo $i; ?>" class="sound_only">상품금액</label>
|
||||
<input type="text" name="spl_price[]" value="<?php echo $spl_price; ?>" id="spl_price_<?php echo $i; ?>" class="frm_input" size="5">
|
||||
@@ -85,7 +85,7 @@ if($ps_run) {
|
||||
} // for
|
||||
} else {
|
||||
for($i=0; $i<$subject_count; $i++) {
|
||||
$spl_subject = isset($_POST['subject'][$i]) ? preg_replace(G5_OPTION_ID_FILTER, '', trim(stripslashes($_POST['subject'][$i]))) : '';
|
||||
$spl_subject = isset($_POST['subject'][$i]) ? preg_replace(G5_OPTION_ID_FILTER, '', strip_tags(trim(stripslashes($_POST['subject'][$i])))) : '';
|
||||
$spl_val = isset($_POST['supply'][$i]) ? explode(',', preg_replace(G5_OPTION_ID_FILTER, '', trim(stripslashes($_POST['supply'][$i])))) : '';
|
||||
$spl_count = count($spl_val);
|
||||
|
||||
@@ -103,7 +103,7 @@ if($ps_run) {
|
||||
$sql = " select io_price, io_stock_qty, io_noti_qty, io_use
|
||||
from {$g5['g5_shop_item_option_table']}
|
||||
where it_id = '{$post_it_id}'
|
||||
and io_id = '$spl_id'
|
||||
and io_id = '".sql_real_escape_string($spl_id)."'
|
||||
and io_type = '1' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
@@ -117,11 +117,11 @@ if($ps_run) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_chk">
|
||||
<input type="hidden" name="spl_id[]" value="<?php echo $spl_id; ?>">
|
||||
<label for="spl_chk_<?php echo $i; ?>" class="sound_only"><?php echo $spl_subject.' '.$spl; ?></label>
|
||||
<input type="hidden" name="spl_id[]" value="<?php echo get_text($spl_id); ?>">
|
||||
<label for="spl_chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($spl_subject.' '.$spl); ?></label>
|
||||
<input type="checkbox" name="spl_chk[]" id="spl_chk_<?php echo $i; ?>" value="1">
|
||||
</td>
|
||||
<td class="spl-subject-cell"><?php echo $spl_subject; ?></td>
|
||||
<td class="spl-subject-cell"><?php echo get_text($spl_subject); ?></td>
|
||||
<td class="spl-cell"><?php echo $spl; ?></td>
|
||||
<td class="td_numsmall">
|
||||
<label for="spl_price_<?php echo $i; ?>" class="sound_only">상품금액</label>
|
||||
|
||||
@@ -85,8 +85,8 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
||||
</div>
|
||||
|
||||
<form name="flist" class="local_sch01 local_sch">
|
||||
<input type="hidden" name="doc" value="<?php echo $doc; ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
||||
<input type="hidden" name="doc" value="<?php echo get_sanitize_input($doc); ?>">
|
||||
<input type="hidden" name="page" value="<?php echo get_sanitize_input($page); ?>">
|
||||
|
||||
<label for="sca" class="sound_only">분류선택</label>
|
||||
<select name="sca" id="sca">
|
||||
|
||||
@@ -34,6 +34,7 @@ if ($w == "u")
|
||||
is_reply_name = '".$member['mb_nick']."'
|
||||
where is_id = '".$posts['is_id']."'";
|
||||
sql_query($sql);
|
||||
run_event('shop_admin_item_use_updated', $posts['is_id']);
|
||||
|
||||
if( isset($_POST['it_id']) ) {
|
||||
update_use_cnt($_POST['it_id']);
|
||||
|
||||
@@ -4,6 +4,10 @@ include_once('./_common.php');
|
||||
|
||||
auth_check_menu($auth, $sub_menu, "r");
|
||||
|
||||
if (isset($sfl) && $sfl && !in_array($sfl, array('it_name','a.it_id','is_name'))) {
|
||||
$sfl = '';
|
||||
}
|
||||
|
||||
$g5['title'] = '사용후기';
|
||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ for ($i=0; $i<$count_post_chk; $i++)
|
||||
{
|
||||
$sql = "delete from {$g5['g5_shop_item_use_table']} where is_id = '{$iis_id}' ";
|
||||
sql_query($sql);
|
||||
run_event('shop_admin_item_use_deleted', $iis_id);
|
||||
}
|
||||
|
||||
if($iit_id){
|
||||
|
||||
@@ -69,10 +69,10 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
||||
</div>
|
||||
|
||||
<form name="flist" class="local_sch01 local_sch">
|
||||
<input type="hidden" name="doc" value="<?php echo $doc; ?>">
|
||||
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
|
||||
<input type="hidden" name="sort2" value="<?php echo $sort2; ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
||||
<input type="hidden" name="doc" value="<?php echo get_sanitize_input($doc); ?>">
|
||||
<input type="hidden" name="sort1" value="<?php echo get_sanitize_input($sort1); ?>">
|
||||
<input type="hidden" name="sort2" value="<?php echo get_sanitize_input($sort2); ?>">
|
||||
<input type="hidden" name="page" value="<?php echo get_sanitize_input($page); ?>">
|
||||
|
||||
<label for="sel_ca_id" class="sound_only">분류선택</label>
|
||||
<select name="sel_ca_id" id="sel_ca_id">
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
if (!defined("_ORDERALIMTALK_")) exit;
|
||||
include_once(G5_KAKAO5_PATH.'/kakao5.lib.php');
|
||||
|
||||
$it_name_str = get_alimtalk_cart_item_name($od_id); // 상품명
|
||||
|
||||
// 입금 알림
|
||||
if($od_alimtalk_ipgum_check){
|
||||
// 알림톡 발송 BEGIN: 입금완료(CU-OR03 / AD-OR03) ------------------------------
|
||||
$conditions = ['od_id' => $od_id, 'od_name' => $od_name, 'it_name' => $it_name_str]; // 변수 치환 정보
|
||||
$cu_atk = send_alimtalk_preset('CU-OR03', ['rcv' => $od_hp ?: $od['od_tel'], 'rcvnm' => $od_name], $conditions); // 회원
|
||||
// 알림톡 발송 END --------------------------------------------------------
|
||||
}
|
||||
|
||||
// 배송 알림
|
||||
if($od_alimtalk_baesong_check){
|
||||
// 알림톡 발송 BEGIN: 배송중(CU-DE02) ------------------------------
|
||||
$conditions = ['od_id' => $od_id, 'od_name' => $od_name, 'it_name' => $it_name_str]; // 변수 치환 정보
|
||||
$cu_atk = send_alimtalk_preset('CU-DE02', ['rcv' => $od_hp ?: $od['od_tel'], 'rcvnm' => $od_name], $conditions); // 회원
|
||||
// 알림톡 발송 END --------------------------------------------------------
|
||||
}
|
||||
@@ -3,6 +3,7 @@ $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");
|
||||
|
||||
@@ -98,6 +99,14 @@ 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,6 +1,7 @@
|
||||
<?php
|
||||
$sub_menu = '400400';
|
||||
include_once('./_common.php');
|
||||
include_once(G5_KAKAO5_PATH.'/kakao5.lib.php');
|
||||
|
||||
$cart_title3 = '주문번호';
|
||||
$cart_title4 = '배송완료';
|
||||
@@ -107,6 +108,12 @@ if($od['od_pg'] == 'lg') {
|
||||
}
|
||||
}
|
||||
|
||||
$print_od_deposit_name = $od['od_deposit_name'];
|
||||
// nicepay 로 주문하고 가상계좌인 경우
|
||||
if ($od['od_pg'] === 'nicepay' && $od['od_settle_case'] === '가상계좌' && $od['od_deposit_name']){
|
||||
$print_od_deposit_name .= '_NICE';
|
||||
}
|
||||
|
||||
// add_javascript('js 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
?>
|
||||
@@ -276,6 +283,9 @@ 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>
|
||||
@@ -408,7 +418,7 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">입금자</th>
|
||||
<td><?php echo get_text($od['od_deposit_name']); ?></td>
|
||||
<td><?php echo get_text($print_od_deposit_name); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">입금확인일시</th>
|
||||
@@ -504,10 +514,10 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
if ($od['od_settle_case'] != '무통장') {
|
||||
switch($od['od_pg']) {
|
||||
case 'lg':
|
||||
$pg_url = 'http://pgweb.uplus.co.kr';
|
||||
$pg_url = 'https://app.tosspayments.com';
|
||||
$pg_test = '토스페이먼츠';
|
||||
if ($default['de_card_test']) {
|
||||
$pg_url = 'http://pgweb.uplus.co.kr/tmert';
|
||||
$pg_url = 'https://pgweb.tosspayments.com/tmert';
|
||||
$pg_test .= ' 테스트 ';
|
||||
}
|
||||
break;
|
||||
@@ -519,6 +529,10 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
$pg_url = 'https://mms.cnspay.co.kr';
|
||||
$pg_test = 'KAKAOPAY';
|
||||
break;
|
||||
case 'nicepay':
|
||||
$pg_url = 'https://npg.nicepay.co.kr/';
|
||||
$pg_test = 'NICEPAY';
|
||||
break;
|
||||
default:
|
||||
$pg_url = 'http://admin8.kcp.co.kr';
|
||||
$pg_test = 'KCP';
|
||||
@@ -623,6 +637,18 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
} 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\');';
|
||||
} else if($od['od_pg'] == 'nicepay') {
|
||||
|
||||
$od_tid = $od['od_tno'];
|
||||
$cash_type = 0;
|
||||
|
||||
if (! $od_tid) {
|
||||
$cash = unserialize($od['od_cash_info']);
|
||||
$od_tid = isset($cash['TID']) ? $cash['TID'] : '';
|
||||
$cash_type = $od_tid ? 1 : 0;
|
||||
}
|
||||
|
||||
$cash_receipt_script = 'window.open(\'https://npg.nicepay.co.kr/issue/IssueLoader.do?type='.$cash_type.'&TID='.$od_tid.'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
|
||||
} else {
|
||||
require G5_SHOP_PATH.'/settle_kcp.inc.php';
|
||||
|
||||
@@ -697,6 +723,16 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
<label for="od_sms_ipgum_check">SMS 입금 문자전송</label>
|
||||
<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>
|
||||
@@ -804,6 +840,17 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
<label for="od_sms_baesong_check">SMS 배송 문자전송</label>
|
||||
<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>
|
||||
@@ -1075,7 +1122,7 @@ function form_submit(f)
|
||||
|
||||
var msg = "";
|
||||
|
||||
<?php if($od['od_settle_case'] == '신용카드' || $od['od_settle_case'] == 'KAKAOPAY' || $od['od_settle_case'] == '간편결제' || ($od['od_pg'] == 'inicis' && is_inicis_order_pay($od['od_settle_case']) )) { ?>
|
||||
<?php if (is_cancel_shop_pg_order($od)) { ?>
|
||||
if(status == "취소" || status == "반품" || status == "품절") {
|
||||
var $ct_chk = $("input[name^=ct_chk]");
|
||||
var chk_cnt = $ct_chk.length;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
$sub_menu = '400400';
|
||||
include_once('./_common.php');
|
||||
include_once(G5_KAKAO5_PATH.'/kakao5.lib.php');
|
||||
|
||||
auth_check_menu($auth, $sub_menu, "w");
|
||||
|
||||
@@ -25,6 +26,7 @@ $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();
|
||||
|
||||
@@ -155,6 +157,8 @@ 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']; // 상품명 배열 : 알림톡 사용
|
||||
}
|
||||
|
||||
// 상품 판매수량 반영
|
||||
@@ -191,7 +195,7 @@ if (in_array($_POST['ct_status'], $status_cancel)) {
|
||||
$sql = " select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' ";
|
||||
$od = sql_fetch($sql);
|
||||
|
||||
if($od['od_tno'] && ($od['od_settle_case'] == '신용카드' || $od['od_settle_case'] == '간편결제' || $od['od_settle_case'] == 'KAKAOPAY') || ($od['od_pg'] == 'inicis' && is_inicis_order_pay($od['od_settle_case']) )) {
|
||||
if ($od['od_tno'] && is_cancel_shop_pg_order($od)) {
|
||||
switch($od['od_pg']) {
|
||||
case 'lg':
|
||||
include_once(G5_SHOP_PATH.'/settle_lg.inc.php');
|
||||
@@ -222,46 +226,53 @@ if (in_array($_POST['ct_status'], $status_cancel)) {
|
||||
break;
|
||||
case 'inicis':
|
||||
include_once(G5_SHOP_PATH.'/settle_inicis.inc.php');
|
||||
$cancel_msg = iconv_euckr('쇼핑몰 운영자 승인 취소');
|
||||
$cancel_msg = '쇼핑몰 운영자 승인 취소';
|
||||
|
||||
$args = array(
|
||||
'paymethod' => get_type_inicis_paymethod($od['od_settle_case']),
|
||||
'tid' => $od['od_tno'],
|
||||
'msg' => $cancel_msg
|
||||
);
|
||||
|
||||
/*********************
|
||||
* 3. 취소 정보 설정 *
|
||||
*********************/
|
||||
$inipay->SetField("type", "cancel"); // 고정 (절대 수정 불가)
|
||||
$inipay->SetField("mid", $default['de_inicis_mid']); // 상점아이디
|
||||
/**************************************************************************************************
|
||||
* admin 은 키패스워드 변수명입니다. 수정하시면 안됩니다. 1111의 부분만 수정해서 사용하시기 바랍니다.
|
||||
* 키패스워드는 상점관리자 페이지(https://iniweb.inicis.com)의 비밀번호가 아닙니다. 주의해 주시기 바랍니다.
|
||||
* 키패스워드는 숫자 4자리로만 구성됩니다. 이 값은 키파일 발급시 결정됩니다.
|
||||
* 키패스워드 값을 확인하시려면 상점측에 발급된 키파일 안의 readme.txt 파일을 참조해 주십시오.
|
||||
**************************************************************************************************/
|
||||
$inipay->SetField("admin", $default['de_inicis_admin_key']); //비대칭 사용키 키패스워드
|
||||
$inipay->SetField("tid", $od['od_tno']); // 취소할 거래의 거래아이디
|
||||
$inipay->SetField("cancelmsg", $cancel_msg); // 취소사유
|
||||
$response = inicis_tid_cancel($args);
|
||||
$result = json_decode($response, true);
|
||||
|
||||
/****************
|
||||
* 4. 취소 요청 *
|
||||
****************/
|
||||
$inipay->startAction();
|
||||
|
||||
/****************************************************************
|
||||
* 5. 취소 결과 *
|
||||
* *
|
||||
* 결과코드 : $inipay->getResult('ResultCode') ("00"이면 취소 성공) *
|
||||
* 결과내용 : $inipay->getResult('ResultMsg') (취소결과에 대한 설명) *
|
||||
* 취소날짜 : $inipay->getResult('CancelDate') (YYYYMMDD) *
|
||||
* 취소시각 : $inipay->getResult('CancelTime') (HHMMSS) *
|
||||
* 현금영수증 취소 승인번호 : $inipay->getResult('CSHR_CancelNum') *
|
||||
* (현금영수증 발급 취소시에만 리턴됨) *
|
||||
****************************************************************/
|
||||
|
||||
$res_cd = $inipay->getResult('ResultCode');
|
||||
$res_msg = $inipay->getResult('ResultMsg');
|
||||
|
||||
if($res_cd != '00') {
|
||||
$pg_res_cd = $res_cd;
|
||||
$pg_res_msg = iconv_utf8($res_msg);
|
||||
if (isset($result['resultCode'])) {
|
||||
if ($result['resultCode'] != '00') {
|
||||
$pg_res_cd = $result['resultCode'];
|
||||
$pg_res_msg = $result['resultMsg'];
|
||||
}
|
||||
} else {
|
||||
$pg_res_cd = '';
|
||||
$pg_res_msg = 'curl 로 데이터를 받지 못했습니다.';
|
||||
}
|
||||
|
||||
break;
|
||||
case 'nicepay':
|
||||
include_once(G5_SHOP_PATH.'/settle_nicepay.inc.php');
|
||||
$cancel_msg = '쇼핑몰 운영자 승인 취소';
|
||||
|
||||
$tno = $od['od_tno'];
|
||||
|
||||
$cancelAmt = $od['od_receipt_price'];
|
||||
|
||||
// 0:전체 취소, 1:부분 취소(별도 계약 필요)
|
||||
$partialCancelCode = 0;
|
||||
|
||||
|
||||
include G5_SHOP_PATH.'/nicepay/cancel_process.php';
|
||||
|
||||
if (isset($result['ResultCode'])) {
|
||||
// 실패했다면
|
||||
if ($result['ResultCode'] !== '2001') {
|
||||
$pg_res_cd = $result['ResultCode'];
|
||||
$pg_res_msg = $result['ResultMsg'];
|
||||
}
|
||||
} else {
|
||||
$pg_res_cd = '';
|
||||
$pg_res_msg = 'curl 로 데이터를 받지 못하거나 통신에 실패했습니다.';
|
||||
}
|
||||
|
||||
break;
|
||||
case 'KAKAOPAY':
|
||||
include_once(G5_SHOP_PATH.'/settle_kakaopay.inc.php');
|
||||
@@ -315,7 +326,7 @@ if (in_array($_POST['ct_status'], $status_cancel)) {
|
||||
|
||||
// PG 취소요청 성공했으면
|
||||
if($pg_res_cd == '') {
|
||||
$pg_cancel_log = ' PG 신용카드 승인취소 처리';
|
||||
$pg_cancel_log = ' PG '.$od['od_settle_case'].' 승인취소 처리';
|
||||
$sql = " update {$g5['g5_shop_order_table']}
|
||||
set od_refund_price = '{$od['od_receipt_price']}'
|
||||
where od_id = '$od_id' ";
|
||||
@@ -368,7 +379,28 @@ $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 {
|
||||
} 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 -------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
// 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,6 +161,9 @@ 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)
|
||||
|
||||
@@ -16,12 +16,13 @@ $sort2 = (isset($_GET['sort2']) && in_array($_GET['sort2'], array('desc', 'asc')
|
||||
$sel_field = (isset($_GET['sel_field']) && in_array($_GET['sel_field'], array('od_id', 'mb_id', 'od_name', 'od_tel', 'od_hp', 'od_b_name', 'od_b_tel', 'od_b_hp', 'od_deposit_name', 'od_invoice')) ) ? $_GET['sel_field'] : '';
|
||||
$od_status = isset($_GET['od_status']) ? get_search_string($_GET['od_status']) : '';
|
||||
$search = isset($_GET['search']) ? get_search_string($_GET['search']) : '';
|
||||
$save_search = isset($_GET['save_search']) ? get_search_string($_GET['save_search']) : '';
|
||||
|
||||
$fr_date = (isset($_GET['fr_date']) && preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/", $_GET['fr_date'])) ? $_GET['fr_date'] : '';
|
||||
$to_date = (isset($_GET['to_date']) && preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/", $_GET['to_date'])) ? $_GET['to_date'] : '';
|
||||
|
||||
$od_misu = isset($_GET['od_misu']) ? preg_replace('/[^0-9a-z]/i', '', $_GET['od_misu']) : '';
|
||||
$od_cancel_price = isset($_GET['od_cancel_price']) ? preg_replace('/[^0-9a-z]/', '', $_GET['od_cancel_price']) : '';
|
||||
$od_cancel_price = isset($_GET['od_cancel_price']) ? preg_replace('/[^0-9a-z]/i', '', $_GET['od_cancel_price']) : '';
|
||||
$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']) : '';
|
||||
@@ -160,11 +161,11 @@ if( function_exists('pg_setting_check') ){
|
||||
</div>
|
||||
|
||||
<form name="frmorderlist" class="local_sch01 local_sch">
|
||||
<input type="hidden" name="doc" value="<?php echo $doc; ?>">
|
||||
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
|
||||
<input type="hidden" name="sort2" value="<?php echo $sort2; ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
||||
<input type="hidden" name="save_search" value="<?php echo $search; ?>">
|
||||
<input type="hidden" name="doc" value="<?php echo get_sanitize_input($doc); ?>">
|
||||
<input type="hidden" name="sort1" value="<?php echo get_sanitize_input($sort1); ?>">
|
||||
<input type="hidden" name="sort2" value="<?php echo get_sanitize_input($sort2); ?>">
|
||||
<input type="hidden" name="page" value="<?php echo get_sanitize_input($page); ?>">
|
||||
<input type="hidden" name="save_search" value="<?php echo get_sanitize_input($search); ?>">
|
||||
|
||||
<label for="sel_field" class="sound_only">검색대상</label>
|
||||
<select name="sel_field" id="sel_field">
|
||||
@@ -222,7 +223,7 @@ if( function_exists('pg_setting_check') ){
|
||||
<input type="radio" name="od_settle_case" value="신용카드" id="od_settle_case06" <?php echo get_checked($od_settle_case, '신용카드'); ?>>
|
||||
<label for="od_settle_case06">신용카드</label>
|
||||
<input type="radio" name="od_settle_case" value="간편결제" id="od_settle_case07" <?php echo get_checked($od_settle_case, '간편결제'); ?>>
|
||||
<label for="od_settle_case07" data-tooltip-text="NHN_KCP 간편결제 : PAYCO, 네이버페이, 카카오페이(NHN_KCP) 
LG유플러스 간편결제 : PAYNOW 
KG 이니시스 간편결제 : KPAY, 삼성페이, LPAY, 카카오페이(KG이니시스)">PG간편결제</label>
|
||||
<label for="od_settle_case07" data-tooltip-text="NHN_KCP 간편결제 : PAYCO, 네이버페이, 카카오페이(NHN_KCP), 애플페이(NHN_KCP) 
LG유플러스 간편결제 : PAYNOW 
KG 이니시스 간편결제 : KPAY, 삼성페이, LPAY, 카카오페이(KG이니시스)">PG간편결제</label>
|
||||
<input type="radio" name="od_settle_case" value="KAKAOPAY" id="od_settle_case08" <?php echo get_checked($od_settle_case, 'KAKAOPAY'); ?>>
|
||||
<label for="od_settle_case08">KAKAOPAY</label>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@ $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();
|
||||
|
||||
@@ -48,6 +49,7 @@ 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)
|
||||
{
|
||||
@@ -69,6 +71,12 @@ 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';
|
||||
@@ -78,6 +86,12 @@ 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 '준비' :
|
||||
@@ -115,6 +129,11 @@ 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 '배송' :
|
||||
@@ -139,6 +158,12 @@ 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
|
||||
|
||||
@@ -49,7 +49,7 @@ if ($csv == 'csv')
|
||||
$to_date = date_conv($to_date);
|
||||
|
||||
|
||||
$sql = " SELECT a.od_id, od_b_zip1, od_b_zip2, od_b_addr1, od_b_addr2, od_b_addr3, od_b_addr_jibeon, od_b_name, od_b_tel, od_b_hp, b.it_name, ct_qty, b.it_id, a.od_id, od_memo, od_invoice, b.ct_option, b.ct_send_cost, b.it_sc_type
|
||||
$sql = " SELECT a.od_id, od_b_zip1, od_b_zip2, od_b_addr1, od_b_addr2, od_b_addr3, od_b_addr_jibeon, od_b_name, od_b_tel, od_b_hp, b.it_name, ct_qty, b.it_id, od_memo, od_invoice, b.ct_option, b.ct_send_cost, b.it_sc_type
|
||||
FROM {$g5['g5_shop_order_table']} a, {$g5['g5_shop_cart_table']} b
|
||||
where a.od_id = b.od_id ";
|
||||
if ($case == 1) // 출력기간
|
||||
@@ -65,7 +65,7 @@ if ($csv == 'csv')
|
||||
alert("출력할 내역이 없습니다.");
|
||||
|
||||
//header('Content-Type: text/x-csv');
|
||||
header("Content-charset=utf-8");
|
||||
header("Content-Type: text/csv; charset=utf-8");
|
||||
header('Content-Type: doesn/matter');
|
||||
header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
header('Content-Disposition: attachment; filename="orderlist-' . date("ymd", time()) . '.csv"');
|
||||
@@ -153,7 +153,7 @@ if ($csv == 'xls')
|
||||
$fr_date = date_conv($fr_date);
|
||||
$to_date = date_conv($to_date);
|
||||
|
||||
$sql = " SELECT a.od_id, od_b_zip1, od_b_zip2, od_b_addr1, od_b_addr2, od_b_addr3, od_b_addr_jibeon, od_b_name, od_b_tel, od_b_hp, b.it_name, ct_qty, b.it_id, a.od_id, od_memo, od_invoice, b.ct_option, b.ct_send_cost, b.it_sc_type
|
||||
$sql = " SELECT a.od_id, od_b_zip1, od_b_zip2, od_b_addr1, od_b_addr2, od_b_addr3, od_b_addr_jibeon, od_b_name, od_b_tel, od_b_hp, b.it_name, ct_qty, b.it_id, od_memo, od_invoice, b.ct_option, b.ct_send_cost, b.it_sc_type
|
||||
FROM {$g5['g5_shop_order_table']} a, {$g5['g5_shop_cart_table']} b
|
||||
where a.od_id = b.od_id ";
|
||||
if ($case == 1) // 출력기간
|
||||
|
||||
@@ -44,6 +44,12 @@ if($popup == 'yes') { // 팝업창일 때
|
||||
$pp['pp_price'] = $od['od_misu'];
|
||||
$wrp_tag_st = '<div class="new_win">'.PHP_EOL.'<h1 id="new_win_title">'.$html_title.'</h1>';
|
||||
$wrp_tag_end = '</div>';
|
||||
|
||||
echo '<script>
|
||||
if (typeof g5_admin_csrf_token_key === "undefined") {
|
||||
var g5_admin_csrf_token_key = "' . (function_exists('admin_csrf_token_key') ? admin_csrf_token_key() : '') . '";
|
||||
}
|
||||
</script>';
|
||||
}
|
||||
else { // 현재페이지일 때
|
||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
@@ -227,7 +233,7 @@ if(!sql_query(" select pp_cash from {$g5['g5_shop_personalpay_table']} limit 1 "
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="pp_shop_memo">상점메모</label></th>
|
||||
<td><textarea name="pp_shop_memo" id="pp_shop_memo" rows="8"><?php echo $pp['pp_shop_memo']; ?></textarea></td>
|
||||
<td><textarea name="pp_shop_memo" id="pp_shop_memo" rows="8"><?php echo html_purifier($pp['pp_shop_memo']); ?></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="pp_use">사용</label></th>
|
||||
|
||||
@@ -58,8 +58,8 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
||||
</div>
|
||||
|
||||
<form name="flist" class="local_sch01 local_sch">
|
||||
<input type="hidden" name="doc" value="<?php echo $doc; ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
||||
<input type="hidden" name="doc" value="<?php echo get_sanitize_input($doc); ?>">
|
||||
<input type="hidden" name="page" value="<?php echo get_sanitize_input($page); ?>">
|
||||
|
||||
<label for="sel_ca_id" class="sound_only">검색대상</label>
|
||||
<select name="sel_ca_id" id="sel_ca_id">
|
||||
|
||||
@@ -5,6 +5,16 @@ include_once(G5_ADMIN_PATH.'/admin.lib.php');
|
||||
include_once(G5_SMS5_PATH.'/sms5.lib.php');
|
||||
|
||||
if (!strstr($_SERVER['SCRIPT_NAME'], 'install.php')) {
|
||||
// SMS5 테이블 G5_TABLE_PREFIX 적용
|
||||
if($g5['sms5_prefix'] != 'sms5_' && sql_num_rows(sql_query("show tables like 'sms5_config'")))
|
||||
{
|
||||
echo '<script>
|
||||
alert("기존 SMS5 테이블을 sms5 prefix 기준으로 변경합니다.\n(DB 업그레이드에서 자동 적용됩니다.)");
|
||||
location.href = "'.G5_ADMIN_URL.'/dbupgrade.php";
|
||||
</script>';
|
||||
exit;
|
||||
}
|
||||
|
||||
if(!sql_num_rows(sql_query(" show tables like '{$g5['sms5_config_table']}' ")))
|
||||
goto_url('install.php');
|
||||
|
||||
|
||||
@@ -66,6 +66,8 @@ while($res = sql_fetch_array($qry))
|
||||
$group_name = '미분류';
|
||||
else
|
||||
$group_name = $tmp['fg_name'];
|
||||
|
||||
$res['fo_content'] = html_purifier($res['fo_content']);
|
||||
$list_text .="
|
||||
<li class=\"screen_list sms5_box\">
|
||||
<span class=\"box_ico\"></span>
|
||||
|
||||
@@ -174,7 +174,7 @@ function multi_update(sel)
|
||||
<input type="checkbox" name="fo_no[]" value="<?php echo $res['fo_no']?>" id="fo_no_<?php echo $i; ?>">
|
||||
</div>
|
||||
<div class="li_preview">
|
||||
<textarea readonly class="box_txt box_square"><?php echo $res['fo_content']?></textarea>
|
||||
<textarea readonly class="box_txt box_square"><?php echo html_purifier($res['fo_content']); ?></textarea>
|
||||
</div>
|
||||
<div class="li_info">
|
||||
<span class="sound_only">그룹 </span><b><?php echo $group_name?></b><br>
|
||||
|
||||
@@ -67,7 +67,7 @@ include_once(G5_ADMIN_PATH.'/admin.head.php');
|
||||
<div class="sms5_box write_wrap">
|
||||
<span class="box_ico"></span>
|
||||
<label for="sms_contents" id="wr_message_lbl">내용</label>
|
||||
<textarea name="fo_content" id="sms_contents" class="box_txt box_square" onkeyup="byte_check('sms_contents', 'sms_bytes');" accesskey="m"><?php echo $write['fo_content']?></textarea>
|
||||
<textarea name="fo_content" id="sms_contents" class="box_txt box_square" onkeyup="byte_check('sms_contents', 'sms_bytes');" accesskey="m"><?php echo html_purifier($write['fo_content']); ?></textarea>
|
||||
|
||||
<div id="sms_byte"><span id="sms_bytes">0</span> / 80 byte</div>
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ function all_send()
|
||||
|
||||
<div id="con_sms" class="sms5_box">
|
||||
<span class="box_ico"></span>
|
||||
<textarea class="box_txt is_overview" readonly><?php echo $write['wr_message'];?></textarea>
|
||||
<textarea class="box_txt is_overview" readonly><?php echo html_purifier($write['wr_message']); ?></textarea>
|
||||
</div>
|
||||
|
||||
<?php if ($write['wr_re_total'] && !$wr_renum) { ?>
|
||||
|
||||
@@ -33,7 +33,16 @@ if ($w == 'u' && is_numeric($bk_no)) {
|
||||
$g5['title'] .= '수정';
|
||||
}
|
||||
else {
|
||||
$write = array('bg_no' => (int) $bg_no);
|
||||
$write = array(
|
||||
'bg_no' => (int) $bg_no,
|
||||
'bk_no' => 0,
|
||||
'mb_id' => '',
|
||||
'bk_name' => '',
|
||||
'bk_hp' => '',
|
||||
'bk_memo' => '',
|
||||
'bk_receipt' => 1,
|
||||
'bk_datetime' => ''
|
||||
);
|
||||
$g5['title'] .= '추가';
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ for ($kk=0;$row = sql_fetch_array($result);$kk++)
|
||||
$bk_no = $row['bk_no'];
|
||||
for ($i=0; $i<count($post_chk_bg_no); $i++)
|
||||
{
|
||||
$bg_no = $post_chk_bg_no[$i];
|
||||
$bg_no = (int) $post_chk_bg_no[$i];
|
||||
if( !$bg_no ) continue;
|
||||
|
||||
$sql = " insert into {$g5['sms5_book_table']}
|
||||
@@ -71,18 +71,16 @@ if( count($save_group) ){ //그룹테이블 업데이트
|
||||
|
||||
$msg = '해당 번호를 선택한 그룹으로 '.$act.' 하였습니다.';
|
||||
$opener_href = './num_book.php?page='.$page;
|
||||
|
||||
echo <<<HEREDOC
|
||||
?>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<script>
|
||||
alert("$msg");
|
||||
opener.document.location.href = "$opener_href";
|
||||
alert("<?php echo $msg; ?>");
|
||||
opener.document.location.href = "<?php echo $opener_href; ?>";
|
||||
window.close();
|
||||
</script>
|
||||
<noscript>
|
||||
<p>
|
||||
"$msg"
|
||||
<?php echo $msg; ?>
|
||||
</p>
|
||||
<a href="$opener_href">돌아가기</a>
|
||||
</noscript>
|
||||
HEREDOC;
|
||||
<a href="<?php echo $opener_href; ?>">돌아가기</a>
|
||||
</noscript>
|
||||
+3
-3
@@ -16,13 +16,13 @@ if( ! $is_admin ){
|
||||
}
|
||||
}
|
||||
|
||||
run_event('admin_request_handler_'.$call, $arr_query, $token);
|
||||
|
||||
$sub_menu = admin_menu_find_by($call, 'sub_menu');
|
||||
$g5['title'] = admin_menu_find_by($call, 'title');
|
||||
|
||||
run_event('admin_request_handler_'.$call, $arr_query, $token);
|
||||
|
||||
include_once ('./admin.head.php');
|
||||
|
||||
run_event('admin_get_page_'.$call, $arr_query, $token);
|
||||
|
||||
include_once ('./admin.tail.php');
|
||||
include_once ('./admin.tail.php');
|
||||
|
||||
@@ -4,8 +4,8 @@ include_once('./_common.php');
|
||||
if (!$is_member) die('0');
|
||||
|
||||
$uid = isset($_REQUEST['uid']) ? preg_replace('/[^0-9]/', '', $_REQUEST['uid']) : 0;
|
||||
$subject = isset($_REQUEST['subject']) ? trim($_REQUEST['subject']) : '';
|
||||
$content = isset($_REQUEST['content']) ? trim($_REQUEST['content']) : '';
|
||||
$subject = isset($_REQUEST['subject']) ? preg_replace("#[\\\]+$#", "", substr(trim($_POST['subject']),0,255)) : '';
|
||||
$content = isset($_REQUEST['content']) ? preg_replace("#[\\\]+$#", "", substr(trim($_POST['content']),0,65536)) : '';
|
||||
|
||||
if ($subject && $content) {
|
||||
$sql = " select count(*) as cnt from {$g5['autosave_table']} where mb_id = '{$member['mb_id']}' and as_subject = '$subject' and as_content = '$content' ";
|
||||
|
||||
+11
-1
@@ -17,7 +17,17 @@ if($error) {
|
||||
|
||||
<script>
|
||||
alert("<?php echo $msg; ?>");
|
||||
window.close();
|
||||
try {
|
||||
window.close();
|
||||
} catch(error) {
|
||||
history.back();
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
if (window.history.length) {
|
||||
window.history.back();
|
||||
}
|
||||
}, 500);
|
||||
</script>
|
||||
|
||||
<noscript>
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
if (G5_IS_MOBILE) {
|
||||
// 모바일의 경우 설정을 따르지 않는다.
|
||||
include_once(G5_BBS_PATH.'/_head.php');
|
||||
echo html_purifier(stripslashes($board['bo_mobile_content_head']));
|
||||
echo run_replace('board_mobile_content_head', html_purifier(stripslashes($board['bo_mobile_content_head'])), $board);
|
||||
} else {
|
||||
// 상단 파일 경로를 입력하지 않았다면 기본 상단 파일도 include 하지 않음
|
||||
if (trim($board['bo_include_head'])) {
|
||||
@@ -15,5 +15,5 @@ if (G5_IS_MOBILE) {
|
||||
include_once(G5_BBS_PATH.'/_head.php');
|
||||
}
|
||||
}
|
||||
echo html_purifier(stripslashes($board['bo_content_head']));
|
||||
echo run_replace('board_content_head', html_purifier(stripslashes($board['bo_content_head'])), $board);
|
||||
}
|
||||
+2
-2
@@ -3,11 +3,11 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 게시판 관리의 하단 파일 경로
|
||||
if (G5_IS_MOBILE) {
|
||||
echo html_purifier(stripslashes($board['bo_mobile_content_tail']));
|
||||
echo run_replace('board_mobile_content_tail', html_purifier(stripslashes($board['bo_mobile_content_tail'])), $board);
|
||||
// 모바일의 경우 설정을 따르지 않는다.
|
||||
include_once(G5_BBS_PATH.'/_tail.php');
|
||||
} else {
|
||||
echo html_purifier(stripslashes($board['bo_content_tail']));
|
||||
echo run_replace('board_content_tail', html_purifier(stripslashes($board['bo_content_tail'])), $board);
|
||||
// 하단 파일 경로를 입력하지 않았다면 기본 하단 파일도 include 하지 않음
|
||||
if (trim($board['bo_include_tail'])) {
|
||||
if (is_include_path_check($board['bo_include_tail'])) { //파일경로 체크
|
||||
|
||||
+3
-3
@@ -81,20 +81,20 @@ $content_skin_url = get_skin_url('content', $co['co_skin']);
|
||||
$skin_file = $content_skin_path.'/content.skin.php';
|
||||
|
||||
if ($is_admin)
|
||||
echo '<div class="ctt_admin"><a href="'.G5_ADMIN_URL.'/contentform.php?w=u&co_id='.$co_id.'" class="btn_admin btn"><span class="sound_only">내용 수정</span><i class="fa fa-cog fa-spin fa-fw"></i></a></div>';
|
||||
echo run_replace('content_admin_button_html', '<div class="ctt_admin"><a href="'.G5_ADMIN_URL.'/contentform.php?w=u&co_id='.$co_id.'" class="btn_admin btn"><span class="sound_only">내용 수정</span><i class="fa fa-cog fa-spin fa-fw"></i></a></div>', $co);
|
||||
?>
|
||||
|
||||
<?php
|
||||
if(is_file($skin_file)) {
|
||||
$himg = G5_DATA_PATH.'/content/'.$co_id.'_h';
|
||||
if (file_exists($himg)) // 상단 이미지
|
||||
echo '<div id="ctt_himg" class="ctt_img"><img src="'.G5_DATA_URL.'/content/'.$co_id.'_h" alt=""></div>';
|
||||
echo run_replace('content_head_image_html', '<div id="ctt_himg" class="ctt_img"><img src="'.G5_DATA_URL.'/content/'.$co_id.'_h" alt=""></div>', $co);
|
||||
|
||||
include($skin_file);
|
||||
|
||||
$timg = G5_DATA_PATH.'/content/'.$co_id.'_t';
|
||||
if (file_exists($timg)) // 하단 이미지
|
||||
echo '<div id="ctt_timg" class="ctt_img"><img src="'.G5_DATA_URL.'/content/'.$co_id.'_t" alt=""></div>';
|
||||
echo run_replace('content_tail_image_html', '<div id="ctt_timg" class="ctt_img"><img src="'.G5_DATA_URL.'/content/'.$co_id.'_t" alt=""></div>', $co);
|
||||
} else {
|
||||
echo '<p>'.str_replace(G5_PATH.'/', '', $skin_file).'이 존재하지 않습니다.</p>';
|
||||
}
|
||||
|
||||
@@ -14,7 +14,9 @@ if($config['cf_visit_del'] > 0) {
|
||||
$tmp_before_date = date("Y-m-d", G5_SERVER_TIME - ($config['cf_visit_del'] * 86400));
|
||||
$sql = " delete from {$g5['visit_table']} where vi_date < '$tmp_before_date' ";
|
||||
sql_query($sql);
|
||||
sql_query(" OPTIMIZE TABLE `{$g5['visit_table']}`, `{$g5['visit_sum_table']}` ");
|
||||
if (defined('G5_USE_OPTIMIZE_DBTABLE') && G5_USE_OPTIMIZE_DBTABLE) {
|
||||
sql_query(" OPTIMIZE TABLE `{$g5['visit_table']}`, `{$g5['visit_sum_table']}` ");
|
||||
}
|
||||
}
|
||||
|
||||
// 설정일이 지난 인기검색어 삭제
|
||||
@@ -22,21 +24,29 @@ if($config['cf_popular_del'] > 0) {
|
||||
$tmp_before_date = date("Y-m-d", G5_SERVER_TIME - ($config['cf_popular_del'] * 86400));
|
||||
$sql = " delete from {$g5['popular_table']} where pp_date < '$tmp_before_date' ";
|
||||
sql_query($sql);
|
||||
sql_query(" OPTIMIZE TABLE `{$g5['popular_table']}` ");
|
||||
if (defined('G5_USE_OPTIMIZE_DBTABLE') && G5_USE_OPTIMIZE_DBTABLE) {
|
||||
sql_query(" OPTIMIZE TABLE `{$g5['popular_table']}` ");
|
||||
}
|
||||
}
|
||||
|
||||
// 설정일이 지난 최근게시물 삭제
|
||||
if($config['cf_new_del'] > 0) {
|
||||
$sql = " delete from {$g5['board_new_table']} where (TO_DAYS('".G5_TIME_YMDHIS."') - TO_DAYS(bn_datetime)) > '{$config['cf_new_del']}' ";
|
||||
sql_query($sql);
|
||||
sql_query(" OPTIMIZE TABLE `{$g5['board_new_table']}` ");
|
||||
|
||||
// 데이터가 많으면 처리시간 때문에 브라우저 응답이 늦을수 있음
|
||||
if (defined('G5_USE_OPTIMIZE_DBTABLE') && G5_USE_OPTIMIZE_DBTABLE) {
|
||||
sql_query(" OPTIMIZE TABLE `{$g5['board_new_table']}` ");
|
||||
}
|
||||
}
|
||||
|
||||
// 설정일이 지난 쪽지 삭제
|
||||
if($config['cf_memo_del'] > 0) {
|
||||
$sql = " delete from {$g5['memo_table']} where (TO_DAYS('".G5_TIME_YMDHIS."') - TO_DAYS(me_send_datetime)) > '{$config['cf_memo_del']}' ";
|
||||
sql_query($sql);
|
||||
sql_query(" OPTIMIZE TABLE `{$g5['memo_table']}` ");
|
||||
if (defined('G5_USE_OPTIMIZE_DBTABLE') && G5_USE_OPTIMIZE_DBTABLE) {
|
||||
sql_query(" OPTIMIZE TABLE `{$g5['memo_table']}` ");
|
||||
}
|
||||
}
|
||||
|
||||
// 탈퇴회원 자동 삭제
|
||||
@@ -65,4 +75,8 @@ if($captcha_mp3 && is_array($captcha_mp3)) {
|
||||
// 실행일 기록
|
||||
if(isset($config['cf_optimize_date'])) {
|
||||
sql_query(" update {$g5['config_table']} set cf_optimize_date = '".G5_TIME_YMD."' ");
|
||||
}
|
||||
|
||||
run_event('cf_optimize_date_update', $config);
|
||||
}
|
||||
|
||||
run_event('db_table_optimize_end', $config);
|
||||
@@ -3,6 +3,7 @@
|
||||
include_once('./_common.php');
|
||||
|
||||
$comment_id = isset($_REQUEST['comment_id']) ? (int) $_REQUEST['comment_id'] : 0;
|
||||
$token = isset($_REQUEST['token']) ? clean_xss_tags($_REQUEST['token']) : 0;
|
||||
|
||||
$delete_comment_token = get_session('ss_delete_comment_'.$comment_id.'_token');
|
||||
set_session('ss_delete_comment_'.$comment_id.'_token', '');
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user