Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8523bb5747 | ||
|
|
f5cfbc1346 | ||
|
|
cde27ea510 | ||
|
|
35d4c2f3b1 | ||
|
|
96c8437d15 | ||
|
|
359b20606e | ||
|
|
682f6620cb | ||
|
|
9a61ea2d59 | ||
|
|
ddde0d7641 | ||
|
|
b3157550b4 | ||
|
|
594cbf76f7 | ||
|
|
dd2834167a | ||
|
|
bfcd66c6c9 | ||
|
|
9db6d7a1da | ||
|
|
aa86ac0c30 | ||
|
|
031949528b | ||
|
|
be4517f0aa | ||
|
|
102715421f | ||
|
|
ddd7090801 | ||
|
|
b01e04a91e | ||
|
|
85697e71b0 | ||
|
|
aceb0a2751 | ||
|
|
233966fb4c | ||
|
|
5c13b8c200 | ||
|
|
977a6de93b | ||
|
|
e927f15282 | ||
|
|
051aff0e8e | ||
|
|
bc0be66aad | ||
|
|
ab7ba78fd2 | ||
|
|
8e679ee4da | ||
|
|
be2f27a7fa | ||
|
|
18bc64ab0a | ||
|
|
5e5cd396c4 | ||
|
|
24268f70b8 | ||
|
|
15ad2b6b35 | ||
|
|
2d1ef8b7bb | ||
|
|
e5ab7456f2 | ||
|
|
3eb07bdfa0 | ||
|
|
242eed5b35 | ||
|
|
caf16b5d6a | ||
|
|
c5c8924b42 | ||
|
|
e6764f4a7c | ||
|
|
6368a5b638 | ||
|
|
12c836104a | ||
|
|
c77a001355 | ||
|
|
5d37a15fb6 | ||
|
|
bb0a1aac75 | ||
|
|
681499f8dd | ||
|
|
51355dffc5 | ||
|
|
389267bb65 | ||
|
|
239b5d7a2c | ||
|
|
b2ec5d7ef2 | ||
|
|
673478d579 | ||
|
|
77b53160b5 | ||
|
|
5f05e5cfe9 | ||
|
|
5ae35f3c34 | ||
|
|
a7fa3a20fc | ||
|
|
83b4c80964 | ||
|
|
582d1a01f4 | ||
|
|
10d377de7d | ||
|
|
6491f13b52 | ||
|
|
ec32a2b066 | ||
|
|
c7092ee1b3 | ||
|
|
74ea8e651a | ||
|
|
de9ba8db5b | ||
|
|
a18cd9d971 | ||
|
|
4ae4bea8e5 | ||
|
|
54e5c1b838 | ||
|
|
68a3d59a57 | ||
|
|
afc8adf737 | ||
|
|
02b085b4be | ||
|
|
765889f67f | ||
|
|
d980c4683d | ||
|
|
75b3e34696 | ||
|
|
10d3847c8d | ||
|
|
424d29a77c | ||
|
|
b6c6644acb | ||
|
|
1fa690cb2c | ||
|
|
ff2e30cd59 | ||
|
|
90ff96c581 | ||
|
|
1cdb1b9397 | ||
|
|
0832f72914 | ||
|
|
4f2e891e62 | ||
|
|
dd8e7d8e30 | ||
|
|
5102e87649 | ||
|
|
ed1d882091 | ||
|
|
26a8d29b38 | ||
|
|
c0a92fdf0f | ||
|
|
714c55485d | ||
|
|
c5ca99cd20 | ||
|
|
e9439c87d1 | ||
|
|
9093603494 | ||
|
|
dff5c711e1 | ||
|
|
e3e6d31c10 | ||
|
|
2e3f53ed8a | ||
|
|
5f27233b00 | ||
|
|
d8746de966 | ||
|
|
8737c67448 | ||
|
|
f1f639070d | ||
|
|
d015f63301 | ||
|
|
0e2cb366e6 | ||
|
|
bf13cf82ee | ||
|
|
94d04817c7 | ||
|
|
1971be3186 | ||
|
|
df9891e68b | ||
|
|
d19cfdc722 | ||
|
|
158a7f50d8 | ||
|
|
2ff4306cc6 | ||
|
|
2f9bb48342 | ||
|
|
69c839ef0f | ||
|
|
5353f75284 | ||
|
|
5ba1e37f04 | ||
|
|
4648b49711 | ||
|
|
cf3a4e9e95 | ||
|
|
fc4b095fa1 | ||
|
|
12eabe4930 | ||
|
|
3e04f1403f | ||
|
|
dd7bd68e72 | ||
|
|
ccf8a27713 | ||
|
|
94a8cc3eb6 | ||
|
|
63822016d5 | ||
|
|
84dd9f0766 | ||
|
|
5aa60540fa | ||
|
|
8aaafeddf6 | ||
|
|
8c49fbafb8 | ||
|
|
c2dbb74920 | ||
|
|
a16926a4de | ||
|
|
73a72af338 | ||
|
|
7cd161c576 | ||
|
|
426e4e2819 | ||
|
|
b90b15ac77 | ||
|
|
6da105bd64 | ||
|
|
f1152df518 | ||
|
|
c875121931 | ||
|
|
c7f1466751 | ||
|
|
045e1363a4 | ||
|
|
812dbc78e0 | ||
|
|
468bc6eb1c | ||
|
|
4c41828e73 | ||
|
|
1dc7e5640d | ||
|
|
e221783c20 | ||
|
|
548b992588 | ||
|
|
6cc2bfdd50 | ||
|
|
101d5995fa | ||
|
|
ecb6226599 | ||
|
|
50edf32875 | ||
|
|
68feb602ff | ||
|
|
7b4a11b99d | ||
|
|
3883924258 | ||
|
|
d6d6773fbb | ||
|
|
1cc2b141f9 | ||
|
|
28d1001d1b | ||
|
|
ab1d514eb4 | ||
|
|
a2bad15bfe | ||
|
|
b069485c53 | ||
|
|
67126bcbe1 | ||
|
|
81444b42b1 | ||
|
|
dad97445f8 | ||
|
|
05a88d12de | ||
|
|
ff4ac1d626 | ||
|
|
7a7af424ce | ||
|
|
ae75f5bf7a | ||
|
|
86f8c1a1c1 | ||
|
|
a5d959deb8 | ||
|
|
f5b7b3000c | ||
|
|
fff7e074ff | ||
|
|
c1adf30b05 | ||
|
|
a8292a51bd | ||
|
|
b28796dd28 | ||
|
|
8dd2fe58e6 | ||
|
|
1395a8f338 | ||
|
|
799aefada2 | ||
|
|
87bb2f1d8a | ||
|
|
6fe20b0a13 | ||
|
|
31705f32c9 | ||
|
|
8ba373a951 | ||
|
|
8067a20d32 | ||
|
|
e72b71ce12 | ||
|
|
596ad4baa6 | ||
|
|
1600f63dee | ||
|
|
fa9aa8da19 | ||
|
|
85e075a5c6 | ||
|
|
1e7d17fd68 | ||
|
|
6ccb8905a0 | ||
|
|
ebac40312f | ||
|
|
3c0cde3fe2 | ||
|
|
3cf0546711 | ||
|
|
120d8cf564 | ||
|
|
992d3d93f4 | ||
|
|
30e0b93ecf | ||
|
|
2581bdba9b | ||
|
|
d982361541 | ||
|
|
e82ebd7ada | ||
|
|
2d1af9a3b2 | ||
|
|
da29b6d0bb | ||
|
|
4493674762 | ||
|
|
2e0b99f65c | ||
|
|
cc5eb6e520 | ||
|
|
b855bbfb96 | ||
|
|
93753162be | ||
|
|
726863de44 | ||
|
|
69ec7348b8 | ||
|
|
d8521d4543 | ||
|
|
e6eab2d040 | ||
|
|
2ad151c0dd | ||
|
|
4c17f79783 | ||
|
|
e329192586 | ||
|
|
f96c3558e8 | ||
|
|
f2a1af5f46 | ||
|
|
aec86e4360 | ||
|
|
6a934c7a36 | ||
|
|
ccfe419bbd | ||
|
|
4b0969d244 | ||
|
|
a5e5531471 | ||
|
|
5a3c2b628d | ||
|
|
b5152b62e8 | ||
|
|
de59f07a66 | ||
|
|
32e024f52e | ||
|
|
ffc43056b4 | ||
|
|
6016db4a95 | ||
|
|
30f6f09372 | ||
|
|
d10a1667c7 | ||
|
|
d560892a80 | ||
|
|
4e11c1fc1f | ||
|
|
54c69dcf35 | ||
|
|
7ccf17b479 | ||
|
|
0e2dbb6145 | ||
|
|
83b85b5d66 | ||
|
|
f68ba794ec | ||
|
|
76c1bde119 | ||
|
|
312fc5daf3 | ||
|
|
080370323a | ||
|
|
c419e2751f | ||
|
|
6977e9d4b5 | ||
|
|
e3ed8a1af3 | ||
|
|
22aad37bfb | ||
|
|
f230dc3522 | ||
|
|
b60daff8f0 | ||
|
|
2fe40edfc5 | ||
|
|
58878593dc | ||
|
|
d72a3b5a73 | ||
|
|
47bee3d294 | ||
|
|
8182cac90d | ||
|
|
b4604fca67 | ||
|
|
7ad199ccd5 | ||
|
|
f0e176033f | ||
|
|
d33753014c | ||
|
|
3c55c4d60d | ||
|
|
c2922aaa13 | ||
|
|
120d42c431 | ||
|
|
863f6011ac | ||
|
|
067bcd2046 | ||
|
|
a1633aec96 | ||
|
|
f675c38441 | ||
|
|
cee88a0f6f | ||
|
|
cbde9c91d7 | ||
|
|
c17fef6778 | ||
|
|
73478d5961 | ||
|
|
846285549a | ||
|
|
27b1a5d8f8 | ||
|
|
2199ffd44d | ||
|
|
86fb983eac | ||
|
|
7d494115b3 | ||
|
|
17238808b5 | ||
|
|
a6d851e174 | ||
|
|
a1dbe22063 | ||
|
|
e6a3270936 | ||
|
|
0954beced9 | ||
|
|
9e14e803e5 | ||
|
|
250c9fc660 | ||
|
|
2534921446 | ||
|
|
2ec7390cd6 | ||
|
|
630e39de16 | ||
|
|
b1ac49a738 | ||
|
|
166727879a | ||
|
|
9773c13d5d | ||
|
|
764cb34957 | ||
|
|
18d4a60e03 | ||
|
|
e234b990ec | ||
|
|
1655e76d04 | ||
|
|
77ea93d50f | ||
|
|
83d7e1a586 | ||
|
|
6e89aff24f | ||
|
|
32924003b9 | ||
|
|
831219e2c2 | ||
|
|
e4a7c1b21d | ||
|
|
896444ce1a | ||
|
|
a844347c4c | ||
|
|
a870fe3777 | ||
|
|
05f1e718e1 | ||
|
|
e97b91cb88 | ||
|
|
4227356108 | ||
|
|
ae729f1525 | ||
|
|
2c61975b49 | ||
|
|
eb8bcb0a24 | ||
|
|
3574a09902 | ||
|
|
4d4064c40d | ||
|
|
92ded4b17a | ||
|
|
04f55c8b95 | ||
|
|
9c03cd85b6 | ||
|
|
d0eb0601ad | ||
|
|
e8abeb47e8 | ||
|
|
40508b05d0 | ||
|
|
31bf6e94ad | ||
|
|
f1a69ff7a4 | ||
|
|
6b67183ec5 | ||
|
|
ab5fb4815d | ||
|
|
2ce07e5ec9 | ||
|
|
826a497e84 | ||
|
|
5fdd38e1ce | ||
|
|
67353c508a | ||
|
|
e069c00ecd | ||
|
|
60387c8a95 | ||
|
|
4cc8284016 | ||
|
|
1ba5bb09fc | ||
|
|
953e301096 | ||
|
|
72bbc0b66b | ||
|
|
82cdd90edc | ||
|
|
1d0f0bf50b | ||
|
|
4366d20410 | ||
|
|
e4d47cc7fd | ||
|
|
3efa500b02 | ||
|
|
129da34249 | ||
|
|
54b1356ab1 | ||
|
|
061e73c014 | ||
|
|
7ae3d6b00d | ||
|
|
c028d34f78 | ||
|
|
53457e3b2f | ||
|
|
39c8182a2f | ||
|
|
038affe798 | ||
|
|
da963964a9 | ||
|
|
82078fc781 | ||
|
|
14f55f7519 | ||
|
|
97ee35e985 | ||
|
|
7e7d73d394 | ||
|
|
70d48e4d5a | ||
|
|
918663a7e2 | ||
|
|
2549172969 | ||
|
|
8399dafd4b | ||
|
|
30a0016d0b | ||
|
|
e14f25d10f | ||
|
|
bc5779fafb | ||
|
|
ccba200fbd | ||
|
|
e7caff2e63 | ||
|
|
ad2419026a | ||
|
|
3fb9c2c15f | ||
|
|
26f6edfd0b | ||
|
|
a45241f4bc | ||
|
|
0329cc9f9c | ||
|
|
c82c937fbb | ||
|
|
798951f4c6 | ||
|
|
a77a6ffafa | ||
|
|
d930b36d61 | ||
|
|
15b2e73e73 | ||
|
|
c8d41381c9 | ||
|
|
0e00f05014 | ||
|
|
6a01a868d1 | ||
|
|
aa7ffdf093 | ||
|
|
784f631896 | ||
|
|
2541664ae2 | ||
|
|
b2858b65ee | ||
|
|
cb29c398cc | ||
|
|
eccdd7d473 | ||
|
|
a4df23fe6d | ||
|
|
908d242e52 | ||
|
|
b7989d617f | ||
|
|
7524d29188 | ||
|
|
a82f61ae2a | ||
|
|
6025f10116 | ||
|
|
d7b209e93c | ||
|
|
37b72f36d6 | ||
|
|
333c1e1af4 | ||
|
|
c0a4d9776b | ||
|
|
4833ff388b | ||
|
|
64f02142b8 | ||
|
|
2b79194f72 | ||
|
|
6dd55f3256 | ||
|
|
5be739934b | ||
|
|
917b12c2c2 | ||
|
|
b0c2c9cea6 | ||
|
|
b1fc952c76 | ||
|
|
ac5d6a4be7 | ||
|
|
a4d3de3227 | ||
|
|
9834a0962e | ||
|
|
c03fec73b9 | ||
|
|
a7a8f45301 | ||
|
|
3c9f4e05fb | ||
|
|
6d7ac7a6be | ||
|
|
02d816154b | ||
|
|
733bca04c8 | ||
|
|
244a496490 | ||
|
|
c6f28c120c | ||
|
|
12ad5e9cb5 | ||
|
|
0bae2cf182 | ||
|
|
85762d4ed6 | ||
|
|
d7cf0ce39d | ||
|
|
a196c91ed5 | ||
|
|
a069ec6c93 | ||
|
|
2a4300b4b2 | ||
|
|
5048ac79d2 | ||
|
|
43cafe7753 | ||
|
|
c24f37421b | ||
|
|
0d9ecfda21 | ||
|
|
980e65361c | ||
|
|
c0fcd3a1ed | ||
|
|
da26d2d020 | ||
|
|
74a8e668e5 | ||
|
|
215ea45b1f | ||
|
|
f6a8b1bacf | ||
|
|
0abf00d793 | ||
|
|
8958f138f4 | ||
|
|
850145bf36 | ||
|
|
0b8ac2f8bb | ||
|
|
00495f4bdb | ||
|
|
4252ba73db | ||
|
|
177cffc9df | ||
|
|
8ce9da7684 | ||
|
|
33451baa46 | ||
|
|
af8494e18f | ||
|
|
e5fd02516f | ||
|
|
4acf2a5686 | ||
|
|
b0fd1e7486 | ||
|
|
ebc35a9c33 | ||
|
|
f7ac06d7d4 | ||
|
|
bf8efdf2ab | ||
|
|
87fdbc7882 | ||
|
|
78a6943ed8 | ||
|
|
0055690e54 | ||
|
|
632ca4c79a | ||
|
|
52f6b39edc | ||
|
|
fddd29388b | ||
|
|
ea9825be61 | ||
|
|
af6d060fa0 | ||
|
|
134e504134 | ||
|
|
2a70b016f6 | ||
|
|
c665cc0557 | ||
|
|
cfc85a327b | ||
|
|
a47002d71f | ||
|
|
6c867f02b4 | ||
|
|
108651c46d | ||
|
|
b95db6a4a7 | ||
|
|
b79a46b857 | ||
|
|
06ad4e534a | ||
|
|
d7b5c9a4bd | ||
|
|
81b39b59c3 | ||
|
|
4aeae4915a | ||
|
|
a4c3a4b5e9 | ||
|
|
c032ed6647 | ||
|
|
5b9b29fdfe | ||
|
|
9e8f75e8fa | ||
|
|
f50b4d419f | ||
|
|
58aaef8261 | ||
|
|
f9b82cfbfb | ||
|
|
80d47facff | ||
|
|
18749864c0 | ||
|
|
fc976f2bed | ||
|
|
fbe2021a38 | ||
|
|
b34f577fbd | ||
|
|
5ba5836ecb | ||
|
|
c1e1f64580 | ||
|
|
5ab91fa0ab | ||
|
|
5abc41cdb9 | ||
|
|
a90a38f096 | ||
|
|
68f8836cfb | ||
|
|
1e41f6a8ff | ||
|
|
875a326344 | ||
|
|
7f9664af0a | ||
|
|
8755c8ece7 | ||
|
|
66358414f2 | ||
|
|
bc68c4bc70 | ||
|
|
82279c376b | ||
|
|
8b096e770c | ||
|
|
6bf57bd4c6 | ||
|
|
ea55f3880e | ||
|
|
19e0ea60a7 | ||
|
|
7831d9dfb6 | ||
|
|
907db24187 | ||
|
|
5a424d5977 | ||
|
|
6c4353fffe | ||
|
|
fd1ec11ad1 | ||
|
|
9f89455b3c |
+1
-2
@@ -1,3 +1,2 @@
|
||||
<?php
|
||||
include_once('./common.php');
|
||||
?>
|
||||
include_once('./common.php');
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
include_once(G5_PATH.'/head.php');
|
||||
?>
|
||||
include_once(G5_PATH.'/head.php');
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
include_once(G5_PATH.'/tail.php');
|
||||
?>
|
||||
include_once(G5_PATH.'/tail.php');
|
||||
+2
-1
@@ -6,4 +6,5 @@ include_once(G5_ADMIN_PATH.'/admin.lib.php');
|
||||
if( isset($token) ){
|
||||
$token = @htmlspecialchars(strip_tags($token), ENT_QUOTES);
|
||||
}
|
||||
?>
|
||||
|
||||
run_event('admin_common');
|
||||
@@ -0,0 +1,120 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
$is_use_apache = (stripos($_SERVER['SERVER_SOFTWARE'], 'apache') !== false);
|
||||
|
||||
$is_use_nginx = (stripos($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false);
|
||||
|
||||
$is_use_iis = !$is_use_apache && (stripos($_SERVER['SERVER_SOFTWARE'], 'microsoft-iis') !== false);
|
||||
|
||||
$is_write_file = false;
|
||||
$is_apache_need_rules = false;
|
||||
$is_apache_rewrite = false;
|
||||
|
||||
if( !($is_use_apache || $is_use_nginx || $is_use_iis) ){ // 셋다 아니면 다 출력시킨다.
|
||||
$is_use_apache = true;
|
||||
$is_use_nginx = true;
|
||||
}
|
||||
|
||||
if ( $is_use_nginx ){
|
||||
$is_write_file = false;
|
||||
}
|
||||
|
||||
if ( $is_use_apache ){
|
||||
$is_write_file = (is_writable(G5_PATH) || (file_exists(G5_PATH.'/.htaccess') && is_writable(G5_PATH.'/.htaccess'))) ? true : false;
|
||||
$is_apache_need_rules = check_need_rewrite_rules();
|
||||
$is_apache_rewrite = function_exists('apache_get_modules') && in_array('mod_rewrite', apache_get_modules());
|
||||
}
|
||||
|
||||
$get_path_url = parse_url( G5_URL );
|
||||
|
||||
$base_path = isset($get_path_url['path']) ? $get_path_url['path'].'/' : '/';
|
||||
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_JS_URL.'/remodal/remodal.css">', 11);
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_JS_URL.'/remodal/remodal-default-theme.css">', 12);
|
||||
add_javascript('<script src="'.G5_JS_URL.'/remodal/remodal.js"></script>', 10);
|
||||
?>
|
||||
<section id="anc_cf_url">
|
||||
<h2 class="h2_frm">짧은 주소 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
<div class="local_desc02 local_desc">
|
||||
<p>
|
||||
게시판과 컨텐츠 페이지에 짧은 URL 을 사용합니다. <a href="https://sir.kr/manual/g5/286" class="btn btn_03" target="_blank" style="margin-left:10px">설정 관련 메뉴얼 보기</a>
|
||||
<?php if( $is_use_apache && ! $is_use_nginx ){ ?>
|
||||
<?php if( ! $is_apache_rewrite ){ ?>
|
||||
<br><strong>Apache 서버인 경우 rewrite_module 이 비활성화 되어 있으면 짧은 주소를 사용할수 없습니다.</strong>
|
||||
<?php } else if( ! $is_write_file && $is_apache_need_rules ) { // apache인 경우 ?>
|
||||
<br><strong>짧은 주소 사용시 아래 Apache 설정 코드를 참고하여 설정해 주세요.</strong>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="server_config_views">
|
||||
<?php if ( $is_use_apache ){ ?>
|
||||
<button type="button" data-remodal-target="modal_apache" class="btn btn_03">Apache 설정 코드 보기</button>
|
||||
<?php } ?>
|
||||
<?php if ( $is_use_nginx ) { ?>
|
||||
<button type="button" data-remodal-target="modal_nginx" class="btn btn_03">Nginx 설정 코드 보기</button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption>짧은주소 설정</caption>
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<?php
|
||||
$short_url_arrs = array(
|
||||
'0'=>array('label'=>'사용안함', 'url'=>G5_URL.'/board.php?bo_table=free&wr_id=123'),
|
||||
'1'=>array('label'=>'숫자', 'url'=>G5_URL.'/free/123'),
|
||||
'2'=>array('label'=>'글 이름', 'url'=>G5_URL.'/free/안녕하세요/'),
|
||||
);
|
||||
foreach($short_url_arrs as $k=>$v){
|
||||
$checked = ((int) $config['cf_bbs_rewrite'] === (int) $k) ? 'checked' : '';
|
||||
?>
|
||||
<tr>
|
||||
<td><input name="cf_bbs_rewrite" id="cf_bbs_rewrite_<?php echo $k; ?>" type="radio" value="<?php echo $k; ?>" <?php echo $checked;?> ><label for="cf_bbs_rewrite_<?php echo $k; ?>" class="rules_label"><?php echo $v['label']; ?></label></td>
|
||||
<td><?php echo $v['url']; ?></td>
|
||||
</tr>
|
||||
<?php } //end foreach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="server_rewrite_info">
|
||||
<div class="is_rewrite remodal" data-remodal-id="modal_apache" role="dialog" aria-labelledby="modalApache" aria-describedby="modal1Desc">
|
||||
|
||||
<button type="button" class="connect-close" data-remodal-action="close">
|
||||
<i class="fa fa-close"></i>
|
||||
<span class="txt">닫기</span>
|
||||
</button>
|
||||
|
||||
<h4 class="copy_title">.htaccess 파일에 적용할 코드입니다.
|
||||
<?php if( ! $is_apache_rewrite ) { ?>
|
||||
<br><span class="info-warning">Apache 서버인 경우 rewrite_module 이 비활성화 되어 있으면 짧은 주소를 사용할수 없습니다.</span>
|
||||
<?php } else if ( ! $is_write_file && $is_apache_need_rules ) { ?>
|
||||
<br><span class="info-warning">자동으로 .htaccess 파일을 수정 할수 있는 권한이 없습니다.<br>.htaccess 파일이 없다면 생성 후에, 아래 코드가 없으면 코드를 복사하여 붙여넣기 해 주세요.</span>
|
||||
<?php } else if ( ! $is_apache_need_rules ){ ?>
|
||||
<br><span class="info-success">정상적으로 적용된 상태입니다.</span>
|
||||
<?php } ?>
|
||||
</h4>
|
||||
<textarea readonly="readonly" rows="10"><?php echo get_mod_rewrite_rules(true); ?></textarea>
|
||||
</div>
|
||||
|
||||
<div class="is_rewrite remodal" data-remodal-id="modal_nginx" role="dialog" aria-labelledby="modalNginx" aria-describedby="modal2Desc">
|
||||
|
||||
<button type="button" class="connect-close" data-remodal-action="close">
|
||||
<i class="fa fa-close"></i>
|
||||
<span class="txt">닫기</span>
|
||||
</button>
|
||||
<h4 class="copy_title">아래 코드를 복사하여 nginx 설정 파일에 적용해 주세요.</h4>
|
||||
<textarea readonly="readonly" rows="10"><?php echo get_nginx_conf_rules(true); ?></textarea>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
+28
-8
@@ -1,7 +1,21 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
$begin_time = get_microtime();
|
||||
$g5_debug['php']['begin_time'] = $begin_time = get_microtime();
|
||||
|
||||
$files = glob(G5_ADMIN_PATH.'/css/admin_extend_*');
|
||||
if (is_array($files)) {
|
||||
foreach ((array) $files as $k=>$css_file) {
|
||||
|
||||
$fileinfo = pathinfo($css_file);
|
||||
$ext = $fileinfo['extension'];
|
||||
|
||||
if( $ext !== 'css' ) continue;
|
||||
|
||||
$css_file = str_replace(G5_ADMIN_PATH, G5_ADMIN_URL, $css_file);
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$css_file.'">', $k);
|
||||
}
|
||||
}
|
||||
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
@@ -18,17 +32,23 @@ function print_menu2($key, $no='')
|
||||
{
|
||||
global $menu, $auth_menu, $is_admin, $auth, $g5, $sub_menu;
|
||||
|
||||
$str .= "<ul>";
|
||||
$str = "<ul>";
|
||||
for($i=1; $i<count($menu[$key]); $i++)
|
||||
{
|
||||
if( ! isset($menu[$key][$i]) ){
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($is_admin != 'super' && (!array_key_exists($menu[$key][$i][0],$auth) || !strstr($auth[$menu[$key][$i][0]], 'r')))
|
||||
continue;
|
||||
|
||||
$gnb_grp_div = $gnb_grp_style = '';
|
||||
|
||||
if (($menu[$key][$i][4] == 1 && $gnb_grp_style == false) || ($menu[$key][$i][4] != 1 && $gnb_grp_style == true)) $gnb_grp_div = 'gnb_grp_div';
|
||||
else $gnb_grp_div = '';
|
||||
if (isset($menu[$key][$i][4])){
|
||||
if (($menu[$key][$i][4] == 1 && $gnb_grp_style == false) || ($menu[$key][$i][4] != 1 && $gnb_grp_style == true)) $gnb_grp_div = 'gnb_grp_div';
|
||||
|
||||
if ($menu[$key][$i][4] == 1) $gnb_grp_style = 'gnb_grp_style';
|
||||
else $gnb_grp_style = '';
|
||||
if ($menu[$key][$i][4] == 1) $gnb_grp_style = 'gnb_grp_style';
|
||||
}
|
||||
|
||||
$current_class = '';
|
||||
|
||||
@@ -87,7 +107,7 @@ function imageview(id, w, h)
|
||||
<h1><?php echo $config['cf_title'] ?></h1>
|
||||
<div id="hd_top">
|
||||
<button type="button" id="btn_gnb" class="btn_gnb_close <?php echo $adm_menu_cookie['btn_gnb'];?>">메뉴</button>
|
||||
<div id="logo"><a href="<?php echo G5_ADMIN_URL ?>"><img src="<?php echo G5_ADMIN_URL ?>/img/logo.png" alt="<?php echo $config['cf_title'] ?> 관리자"></a></div>
|
||||
<div id="logo"><a href="<?php echo correct_goto_url(G5_ADMIN_URL); ?>"><img src="<?php echo G5_ADMIN_URL ?>/img/logo.png" alt="<?php echo get_text($config['cf_title']); ?> 관리자"></a></div>
|
||||
|
||||
<div id="tnb">
|
||||
<ul>
|
||||
@@ -124,7 +144,7 @@ function imageview(id, w, h)
|
||||
$button_title = $menu['menu'.$key][0][1];
|
||||
?>
|
||||
<li class="gnb_li<?php echo $current_class;?>">
|
||||
<button type="button" class="btn_op menu-<?php echo $jj; ?>" title="<?php echo $button_title; ?>"><?php echo $button_title;?></button>
|
||||
<button type="button" class="btn_op menu-<?php echo $key; ?> menu-order-<?php echo $jj; ?>" title="<?php echo $button_title; ?>"><?php echo $button_title;?></button>
|
||||
<div class="gnb_oparea_wr">
|
||||
<div class="gnb_oparea">
|
||||
<h3><?php echo $menu['menu'.$key][0][1];?></h3>
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@ function get_ajax_token()
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$(document).on("click", "form input:submit", function() {
|
||||
$(document).on("click", "form input:submit, form button:submit", function() {
|
||||
var f = this.form;
|
||||
var token = get_ajax_token();
|
||||
|
||||
|
||||
+144
-8
@@ -176,7 +176,7 @@ function get_theme_config_value($dir, $key='*')
|
||||
$tconfig = array();
|
||||
|
||||
$theme_config_file = G5_PATH.'/'.G5_THEME_DIR.'/'.$dir.'/theme.config.php';
|
||||
if(is_file) {
|
||||
if(is_file($theme_config_file)) {
|
||||
include($theme_config_file);
|
||||
|
||||
if($key == '*') {
|
||||
@@ -184,7 +184,7 @@ function get_theme_config_value($dir, $key='*')
|
||||
} else {
|
||||
$keys = array_map('trim', explode(',', $key));
|
||||
foreach($keys as $v) {
|
||||
$tconfig[$v] = trim($theme_config[$v]);
|
||||
$tconfig[$v] = isset($theme_config[$v]) ? trim($theme_config[$v]) : '';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -230,6 +230,14 @@ function get_member_id_select($name, $level, $selected="", $event="")
|
||||
return $str;
|
||||
}
|
||||
|
||||
// php8 버전 호환 권한 검사 함수
|
||||
function auth_check_menu($auth, $sub_menu, $attr, $return=false) {
|
||||
|
||||
$check_auth = isset($auth[$sub_menu]) ? $auth[$sub_menu] : '';
|
||||
return auth_check($check_auth, $attr, $return);
|
||||
|
||||
}
|
||||
|
||||
// 권한 검사
|
||||
function auth_check($auth, $attr, $return=false)
|
||||
{
|
||||
@@ -355,6 +363,70 @@ function get_admin_token()
|
||||
return $token;
|
||||
}
|
||||
|
||||
// 관리자가 자동등록방지를 사용해야 할 경우
|
||||
function get_admin_captcha_by($type='get'){
|
||||
|
||||
$captcha_name = 'ss_admin_use_captcha';
|
||||
|
||||
if($type === 'remove'){
|
||||
set_session($captcha_name, '');
|
||||
}
|
||||
|
||||
return get_session($captcha_name);
|
||||
}
|
||||
|
||||
//input value 에서 xss 공격 filter 역할을 함 ( 반드시 input value='' 타입에만 사용할것 )
|
||||
function get_sanitize_input($s, $is_html=false){
|
||||
|
||||
if(!$is_html){
|
||||
$s = strip_tags($s);
|
||||
}
|
||||
|
||||
$s = htmlspecialchars($s, ENT_QUOTES, 'utf-8');
|
||||
|
||||
return $s;
|
||||
}
|
||||
|
||||
function check_log_folder($log_path){
|
||||
|
||||
if( is_writable($log_path) ){
|
||||
|
||||
// 아파치 서버인 경우 웹에서 해당 폴더 접근 막기
|
||||
$htaccess_file = $log_path.'/.htaccess';
|
||||
if ( !file_exists( $htaccess_file ) ) {
|
||||
if ( $handle = @fopen( $htaccess_file, 'w' ) ) {
|
||||
fwrite( $handle, 'Order deny,allow' . "\n" );
|
||||
fwrite( $handle, 'Deny from all' . "\n" );
|
||||
fclose( $handle );
|
||||
}
|
||||
}
|
||||
|
||||
// 아파치 서버인 경우 해당 디렉토리 파일 목록 안보이게 하기
|
||||
$index_file = $log_path . '/index.php';
|
||||
if ( !file_exists( $index_file ) ) {
|
||||
if ( $handle = @fopen( $index_file, 'w' ) ) {
|
||||
fwrite( $handle, '' );
|
||||
fclose( $handle );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// txt 파일과 log 파일을 조회하여 30일이 지난 파일은 삭제합니다.
|
||||
$txt_files = glob($log_path.'/*.txt');
|
||||
$log_files = glob($log_path.'/*.log');
|
||||
|
||||
$del_files = array_merge($txt_files, $log_files);
|
||||
|
||||
if( $del_files && is_array($del_files) ){
|
||||
foreach ($del_files as $del_file) {
|
||||
$filetime = filemtime($del_file);
|
||||
// 30일이 지난 파일을 삭제
|
||||
if($filetime && $filetime < (G5_SERVER_TIME - 2592000)) {
|
||||
@unlink($del_file);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// POST로 넘어온 토큰과 세션에 저장된 토큰 비교
|
||||
function check_admin_token()
|
||||
@@ -371,7 +443,7 @@ function check_admin_token()
|
||||
// 관리자 페이지 referer 체크
|
||||
function admin_referer_check($return=false)
|
||||
{
|
||||
$referer = trim($_SERVER['HTTP_REFERER']);
|
||||
$referer = isset($_SERVER['HTTP_REFERER']) ? trim($_SERVER['HTTP_REFERER']) : '';
|
||||
if(!$referer) {
|
||||
$msg = '정보가 올바르지 않습니다.';
|
||||
|
||||
@@ -403,10 +475,60 @@ function admin_referer_check($return=false)
|
||||
}
|
||||
}
|
||||
|
||||
function admin_check_xss_params($params){
|
||||
|
||||
if( ! $params ) return;
|
||||
|
||||
foreach( $params as $key=>$value ){
|
||||
|
||||
if ( empty($value) ) continue;
|
||||
|
||||
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)) ){
|
||||
alert('요청 쿼리에 잘못된 스크립트문장이 있습니다.\\nXSS 공격일수도 있습니다.', G5_URL);
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
function admin_menu_find_by($call, $search_key){
|
||||
global $menu;
|
||||
|
||||
static $cache_menu = array();
|
||||
|
||||
if( empty($cache_menu) ){
|
||||
foreach( $menu as $k1=>$arr1 ){
|
||||
|
||||
if (empty($arr1) ) continue;
|
||||
foreach( $arr1 as $k2=>$arr2 ){
|
||||
if (empty($arr2) ) continue;
|
||||
|
||||
$menu_key = isset($arr2[3]) ? $arr2[3] : '';
|
||||
if (empty($menu_key) ) continue;
|
||||
|
||||
$cache_menu[$menu_key] = array(
|
||||
'sub_menu'=>$arr2[0],
|
||||
'title'=>$arr2[1],
|
||||
'link'=>$arr2[2],
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( isset($cache_menu[$call]) && isset($cache_menu[$call][$search_key]) ){
|
||||
return $cache_menu[$call][$search_key];
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
// 접근 권한 검사
|
||||
if (!$member['mb_id'])
|
||||
{
|
||||
alert('로그인 하십시오.', G5_BBS_URL.'/login.php?url=' . urlencode(G5_ADMIN_URL));
|
||||
alert('로그인 하십시오.', G5_BBS_URL.'/login.php?url=' . urlencode(correct_goto_url(G5_ADMIN_URL)));
|
||||
}
|
||||
else if ($is_admin != 'super')
|
||||
{
|
||||
@@ -425,7 +547,7 @@ else if ($is_admin != 'super')
|
||||
}
|
||||
|
||||
// 관리자의 아이피, 브라우저와 다르다면 세션을 끊고 관리자에게 메일을 보낸다.
|
||||
$admin_key = md5($member['mb_datetime'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']);
|
||||
$admin_key = md5($member['mb_datetime'] . get_real_client_ip() . $_SERVER['HTTP_USER_AGENT']);
|
||||
if (get_session('ss_mb_key') !== $admin_key) {
|
||||
|
||||
session_destroy();
|
||||
@@ -437,7 +559,11 @@ if (get_session('ss_mb_key') !== $admin_key) {
|
||||
alert_close('정상적으로 로그인하여 접근하시기 바랍니다.');
|
||||
}
|
||||
|
||||
@ksort($auth);
|
||||
if(isset($auth) && is_array($auth)) {
|
||||
@ksort($auth);
|
||||
} else {
|
||||
$auth = array();
|
||||
}
|
||||
|
||||
// 가변 메뉴
|
||||
unset($auth_menu);
|
||||
@@ -458,6 +584,11 @@ foreach($menu_files as $file){
|
||||
}
|
||||
@ksort($amenu);
|
||||
|
||||
$amenu = run_replace('admin_amenu', $amenu);
|
||||
if( isset($menu) && $menu ){
|
||||
$menu = run_replace('admin_menu', $menu);
|
||||
}
|
||||
|
||||
$arr_query = array();
|
||||
if (isset($sst)) $arr_query[] = 'sst='.$sst;
|
||||
if (isset($sod)) $arr_query[] = 'sod='.$sod;
|
||||
@@ -466,6 +597,11 @@ if (isset($stx)) $arr_query[] = 'stx='.$stx;
|
||||
if (isset($page)) $arr_query[] = 'page='.$page;
|
||||
$qstr = implode("&", $arr_query);
|
||||
|
||||
if ( isset($_REQUEST) && $_REQUEST ){
|
||||
if( admin_referer_check(true) ){
|
||||
admin_check_xss_params($_REQUEST);
|
||||
}
|
||||
}
|
||||
|
||||
// 관리자에서는 추가 스크립트는 사용하지 않는다.
|
||||
//$config['cf_add_script'] = '';
|
||||
?>
|
||||
//$config['cf_add_script'] = '';
|
||||
@@ -19,5 +19,5 @@ if(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') &&
|
||||
$menu['menu100'][] = array('100520', '접속로그 변환', G5_ADMIN_URL.'/browscap_convert.php', 'cf_visit_cnvrt');
|
||||
}
|
||||
|
||||
$menu['menu100'][] = array('100400', '부가서비스', G5_ADMIN_URL.'/service.php', 'cf_service');
|
||||
?>
|
||||
$menu['menu100'][] = array('100410', 'DB업그레이드', G5_ADMIN_URL.'/dbupgrade.php', 'db_upgrade');
|
||||
$menu['menu100'][] = array('100400', '부가서비스', G5_ADMIN_URL.'/service.php', 'cf_service');
|
||||
@@ -8,5 +8,4 @@ $menu['menu200'] = array (
|
||||
array('200820', '접속자로그삭제', G5_ADMIN_URL.'/visit_delete.php', 'mb_delete', 1),
|
||||
array('200200', '포인트관리', G5_ADMIN_URL.'/point_list.php', 'mb_point'),
|
||||
array('200900', '투표관리', G5_ADMIN_URL.'/poll_list.php', 'mb_poll')
|
||||
);
|
||||
?>
|
||||
);
|
||||
@@ -9,5 +9,4 @@ $menu['menu300'] = array (
|
||||
array('300600', '내용관리', G5_ADMIN_URL.'/contentlist.php', 'scf_contents', 1),
|
||||
array('300700', 'FAQ관리', G5_ADMIN_URL.'/faqmasterlist.php', 'scf_faq', 1),
|
||||
array('300820', '글,댓글 현황', G5_ADMIN_URL.'/write_count.php', 'scf_write_count'),
|
||||
);
|
||||
?>
|
||||
);
|
||||
@@ -11,5 +11,4 @@ $menu["menu900"] = array (
|
||||
array('900700', '휴대폰번호 그룹', ''.G5_SMS5_ADMIN_URL.'/num_group.php' , 'hp_group', 1),
|
||||
array('900800', '휴대폰번호 관리', ''.G5_SMS5_ADMIN_URL.'/num_book.php', 'hp_manage', 1),
|
||||
array('900900', '휴대폰번호 파일', ''.G5_SMS5_ADMIN_URL.'/num_book_file.php' , 'hp_file', 1)
|
||||
);
|
||||
?>
|
||||
);
|
||||
+1
-2
@@ -150,5 +150,4 @@ function menu_rearrange(el)
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
?>
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
+1
-2
@@ -10,5 +10,4 @@ if($error)
|
||||
|
||||
$token = get_admin_token();
|
||||
|
||||
die(json_encode(array('error'=>'', 'token'=>$token, 'url'=>'')));
|
||||
?>
|
||||
die(json_encode(array('error'=>'', 'token'=>$token, 'url'=>'')));
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
if( isset($_POST['admin_use_captcha']) ){
|
||||
set_session('ss_admin_use_captcha', true);
|
||||
}
|
||||
+20
-3
@@ -160,7 +160,7 @@ $pagelist = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_w
|
||||
echo $pagelist;
|
||||
?>
|
||||
|
||||
<form name="fauthlist2" id="fauthlist2" action="./auth_update.php" method="post" autocomplete="off">
|
||||
<form name="fauthlist2" id="fauthlist2" action="./auth_update.php" method="post" autocomplete="off" onsubmit="return fauth_add_submit(this);">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
@@ -218,6 +218,17 @@ echo $pagelist;
|
||||
<label for="d">d (삭제)</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">자동등록방지</th>
|
||||
<td>
|
||||
<?php
|
||||
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
|
||||
$captcha_html = captcha_html();
|
||||
$captcha_js = chk_captcha_js();
|
||||
echo $captcha_html;
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -230,6 +241,13 @@ echo $pagelist;
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function fauth_add_submit(f){
|
||||
|
||||
<?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function fauthlist_submit(f)
|
||||
{
|
||||
if (!is_checked("chk[]")) {
|
||||
@@ -248,5 +266,4 @@ function fauthlist_submit(f)
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
include_once ('./admin.tail.php');
|
||||
@@ -9,19 +9,28 @@ if ($is_admin != 'super')
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$count = count($_POST['chk']);
|
||||
$count = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
|
||||
$post_act_button = isset($_POST['act_button']) ? clean_xss_tags($_POST['act_button'], 1, 1) : '';
|
||||
|
||||
if (!$count)
|
||||
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
|
||||
|
||||
if ( (isset($_POST['mb_id']) && ! is_array($_POST['mb_id'])) || (isset($_POST['au_menu']) && ! is_array($_POST['au_menu'])) ){
|
||||
alert("잘못된 요청입니다.");
|
||||
}
|
||||
|
||||
for ($i=0; $i<$count; $i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $chk[$i];
|
||||
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
|
||||
|
||||
$mb_id = isset($_POST['mb_id'][$k]) ? preg_replace('/[^a-zA-Z0-9_]/', '', $_POST['mb_id'][$k]) : '';
|
||||
$au_menu = isset($_POST['au_menu'][$k]) ? preg_replace('/[^a-zA-Z0-9_]/', '', $_POST['au_menu'][$k]) : '';
|
||||
|
||||
$sql = " delete from {$g5['auth_table']} where mb_id = '{$_POST['mb_id'][$k]}' and au_menu = '{$_POST['au_menu'][$k]}' ";
|
||||
$sql = " delete from {$g5['auth_table']} where mb_id = '".$mb_id."' and au_menu = '".$au_menu."' ";
|
||||
sql_query($sql);
|
||||
|
||||
run_event('adm_auth_delete_member', $mb_id, $au_menu);
|
||||
}
|
||||
|
||||
goto_url('./auth_list.php?'.$qstr);
|
||||
?>
|
||||
goto_url('./auth_list.php?'.$qstr);
|
||||
+31
-8
@@ -1,6 +1,12 @@
|
||||
<?php
|
||||
$sub_menu = "100200";
|
||||
include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||
|
||||
$au_menu = isset($_POST['au_menu']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['au_menu']) : '';
|
||||
$post_r = isset($_POST['r']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['r']) : '';
|
||||
$post_w = isset($_POST['w']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['w']) : '';
|
||||
$post_d = isset($_POST['d']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['d']) : '';
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
@@ -11,20 +17,37 @@ if (!$mb['mb_id'])
|
||||
|
||||
check_admin_token();
|
||||
|
||||
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
|
||||
|
||||
if (!chk_captcha()) {
|
||||
alert('자동등록방지 숫자가 틀렸습니다.');
|
||||
}
|
||||
|
||||
$sql = " insert into {$g5['auth_table']}
|
||||
set mb_id = '{$_POST['mb_id']}',
|
||||
au_menu = '{$_POST['au_menu']}',
|
||||
au_auth = '{$_POST['r']},{$_POST['w']},{$_POST['d']}' ";
|
||||
set mb_id = '$mb_id',
|
||||
au_menu = '$au_menu',
|
||||
au_auth = '{$post_r},{$post_w},{$post_d}' ";
|
||||
$result = sql_query($sql, FALSE);
|
||||
if (!$result) {
|
||||
$sql = " update {$g5['auth_table']}
|
||||
set au_auth = '{$_POST['r']},{$_POST['w']},{$_POST['d']}'
|
||||
where mb_id = '{$_POST['mb_id']}'
|
||||
and au_menu = '{$_POST['au_menu']}' ";
|
||||
set au_auth = '{$post_r},{$post_w},{$post_d}'
|
||||
where mb_id = '$mb_id'
|
||||
and au_menu = '$au_menu' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
//sql_query(" OPTIMIZE TABLE `$g5['auth_table']` ");
|
||||
|
||||
goto_url('./auth_list.php?'.$qstr);
|
||||
?>
|
||||
// 세션을 체크하여 하루에 한번만 메일알림이 가게 합니다.
|
||||
if( str_replace('-', '', G5_TIME_YMD) !== get_session('adm_auth_update') ){
|
||||
$site_url = preg_replace('/^www\./', '', strtolower($_SERVER['SERVER_NAME']));
|
||||
$to_email = 'gnuboard@'.$site_url;
|
||||
|
||||
mailer($config['cf_admin_email_name'], $to_email, $config['cf_admin_email'], '['.$config['cf_title'].'] 관리권한설정 알림', '<p><b>['.$config['cf_title'].'] 관리권한설정 변경 안내</b></p><p style="padding-top:1em">회원 아이디 '.$mb['mb_id'].' 에 관리권한이 추가 되었습니다.</p><p style="padding-top:1em">'.G5_TIME_YMDHIS.'</p><p style="padding-top:1em"><a href="'.G5_URL.'" target="_blank">'.$config['cf_title'].'</a></p>', 1);
|
||||
|
||||
set_session('adm_auth_update', str_replace('-', '', G5_TIME_YMD));
|
||||
}
|
||||
|
||||
run_event('adm_auth_update', $mb);
|
||||
|
||||
goto_url('./auth_list.php?'.$qstr);
|
||||
+16
-4
@@ -2,7 +2,7 @@
|
||||
$sub_menu = "300100";
|
||||
include_once("./_common.php");
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
auth_check_menu($auth, $sub_menu, 'w');
|
||||
|
||||
$g5['title'] = '게시판 복사';
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
@@ -31,7 +31,7 @@ include_once(G5_PATH.'/head.sub.php');
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col"><label for="target_subject">게시판 제목<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="target_subject" value="[복사본] <?php echo $board['bo_subject'] ?>" id="target_subject" required class="required frm_input" maxlength="120"></td>
|
||||
<td><input type="text" name="target_subject" value="[복사본] <?php echo get_sanitize_input($board['bo_subject']); ?>" id="target_subject" required class="required frm_input" maxlength="120"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">복사 유형</th>
|
||||
@@ -58,6 +58,19 @@ include_once(G5_PATH.'/head.sub.php');
|
||||
<script>
|
||||
function fboardcopy_check(f)
|
||||
{
|
||||
<?php
|
||||
if(!$w){
|
||||
$js_array = get_bo_table_banned_word();
|
||||
echo "var banned_array = ". json_encode($js_array) . ";\n";
|
||||
}
|
||||
?>
|
||||
|
||||
// 게시판명이 금지된 단어로 되어 있으면
|
||||
if( (typeof banned_array != 'undefined') && jQuery.inArray(f.target_table.value, banned_array) !== -1 ){
|
||||
alert("입력한 게시판 TABLE명을 사용할수 없습니다. 다른 이름으로 입력해 주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (f.bo_table.value == f.target_table.value) {
|
||||
alert("원본 테이블명과 복사할 테이블명이 달라야 합니다.");
|
||||
return false;
|
||||
@@ -69,5 +82,4 @@ function fboardcopy_check(f)
|
||||
|
||||
|
||||
<?php
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
?>
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
+69
-52
@@ -4,17 +4,24 @@ include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
auth_check_menu($auth, $sub_menu, 'w');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$target_table = trim($_POST['target_table']);
|
||||
$target_subject = trim($_POST['target_subject']);
|
||||
$target_table = isset($_POST['target_table']) ? trim($_POST['target_table']) : '';
|
||||
$target_subject = isset($_POST['target_subject']) ? trim($_POST['target_subject']) : '';
|
||||
|
||||
$target_subject = strip_tags(clean_xss_attributes($target_subject));
|
||||
|
||||
if (!preg_match('/[A-Za-z0-9_]{1,20}/', $target_table)) {
|
||||
alert('게시판 TABLE명은 공백없이 영문자, 숫자, _ 만 사용 가능합니다. (20자 이내)');
|
||||
}
|
||||
|
||||
// 게시판명이 금지된 단어로 되어 있으면
|
||||
if ( $w == '' && in_array($target_table, get_bo_table_banned_word()) ){
|
||||
alert('입력한 게시판 TABLE명을 사용할수 없습니다. 다른 이름으로 입력해 주세요.');
|
||||
}
|
||||
|
||||
$row = sql_fetch(" select count(*) as cnt from {$g5['board_table']} where bo_table = '$target_table' ");
|
||||
if ($row['cnt'])
|
||||
alert($target_table.'은(는) 이미 존재하는 게시판 테이블명 입니다.\\n복사할 테이블명으로 사용할 수 없습니다.');
|
||||
@@ -38,43 +45,44 @@ $sql = " insert into {$g5['board_table']}
|
||||
bo_subject = '$target_subject',
|
||||
bo_device = '{$board['bo_device']}',
|
||||
bo_admin = '{$board['bo_admin']}',
|
||||
bo_list_level = '{$board[bo_list_level]}',
|
||||
bo_read_level = '{$board[bo_read_level]}',
|
||||
bo_write_level = '{$board[bo_write_level]}',
|
||||
bo_reply_level = '{$board[bo_reply_level]}',
|
||||
bo_comment_level = '{$board[bo_comment_level]}',
|
||||
bo_upload_level = '{$board[bo_upload_level]}',
|
||||
bo_download_level = '{$board[bo_download_level]}',
|
||||
bo_html_level = '{$board[bo_html_level]}',
|
||||
bo_link_level = '{$board[bo_link_level]}',
|
||||
bo_count_modify = '{$board[bo_count_modify]}',
|
||||
bo_count_delete = '{$board[bo_count_delete]}',
|
||||
bo_read_point = '{$board[bo_read_point]}',
|
||||
bo_write_point = '{$board[bo_write_point]}',
|
||||
bo_comment_point = '{$board[bo_comment_point]}',
|
||||
bo_download_point = '{$board[bo_download_point]}',
|
||||
bo_use_category = '{$board[bo_use_category]}',
|
||||
bo_list_level = '{$board['bo_list_level']}',
|
||||
bo_read_level = '{$board['bo_read_level']}',
|
||||
bo_write_level = '{$board['bo_write_level']}',
|
||||
bo_reply_level = '{$board['bo_reply_level']}',
|
||||
bo_comment_level = '{$board['bo_comment_level']}',
|
||||
bo_upload_level = '{$board['bo_upload_level']}',
|
||||
bo_download_level = '{$board['bo_download_level']}',
|
||||
bo_html_level = '{$board['bo_html_level']}',
|
||||
bo_link_level = '{$board['bo_link_level']}',
|
||||
bo_count_modify = '{$board['bo_count_modify']}',
|
||||
bo_count_delete = '{$board['bo_count_delete']}',
|
||||
bo_read_point = '{$board['bo_read_point']}',
|
||||
bo_write_point = '{$board['bo_write_point']}',
|
||||
bo_comment_point = '{$board['bo_comment_point']}',
|
||||
bo_download_point = '{$board['bo_download_point']}',
|
||||
bo_use_category = '{$board['bo_use_category']}',
|
||||
bo_category_list = '{$board['bo_category_list']}',
|
||||
bo_use_sideview = '{$board[bo_use_sideview]}',
|
||||
bo_use_file_content = '{$board[bo_use_file_content]}',
|
||||
bo_use_secret = '{$board[bo_use_secret]}',
|
||||
bo_use_dhtml_editor = '{$board[bo_use_dhtml_editor]}',
|
||||
bo_use_rss_view = '{$board[bo_use_rss_view]}',
|
||||
bo_use_good = '{$board[bo_use_good]}',
|
||||
bo_use_nogood = '{$board[bo_use_nogood]}',
|
||||
bo_use_name = '{$board[bo_use_name]}',
|
||||
bo_use_signature = '{$board[bo_use_signature]}',
|
||||
bo_use_ip_view = '{$board[bo_use_ip_view]}',
|
||||
bo_use_sideview = '{$board['bo_use_sideview']}',
|
||||
bo_use_file_content = '{$board['bo_use_file_content']}',
|
||||
bo_use_secret = '{$board['bo_use_secret']}',
|
||||
bo_use_dhtml_editor = '{$board['bo_use_dhtml_editor']}',
|
||||
bo_use_rss_view = '{$board['bo_use_rss_view']}',
|
||||
bo_use_good = '{$board['bo_use_good']}',
|
||||
bo_use_nogood = '{$board['bo_use_nogood']}',
|
||||
bo_use_name = '{$board['bo_use_name']}',
|
||||
bo_use_signature = '{$board['bo_use_signature']}',
|
||||
bo_use_ip_view = '{$board['bo_use_ip_view']}',
|
||||
bo_use_list_view = '{$board['bo_use_list_view']}',
|
||||
bo_use_list_content = '{$board[bo_use_list_content]}',
|
||||
bo_table_width = '{$board[bo_table_width]}',
|
||||
bo_subject_len = '{$board[bo_subject_len]}',
|
||||
bo_mobile_subject_len = '{$board[bo_mobile_subject_len]}',
|
||||
bo_page_rows = '{$board[bo_page_rows]}',
|
||||
bo_mobile_page_rows = '{$board[bo_mobile_page_rows]}',
|
||||
bo_new = '{$board[bo_new]}',
|
||||
bo_hot = '{$board[bo_hot]}',
|
||||
bo_image_width = '{$board[bo_image_width]}',
|
||||
bo_use_list_content = '{$board['bo_use_list_content']}',
|
||||
bo_use_list_file = '{$board['bo_use_list_file']}',
|
||||
bo_table_width = '{$board['bo_table_width']}',
|
||||
bo_subject_len = '{$board['bo_subject_len']}',
|
||||
bo_mobile_subject_len = '{$board['bo_mobile_subject_len']}',
|
||||
bo_page_rows = '{$board['bo_page_rows']}',
|
||||
bo_mobile_page_rows = '{$board['bo_mobile_page_rows']}',
|
||||
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']}',
|
||||
@@ -84,20 +92,21 @@ $sql = " insert into {$g5['board_table']}
|
||||
bo_mobile_content_head = '".addslashes($board['bo_mobile_content_head'])."',
|
||||
bo_mobile_content_tail = '".addslashes($board['bo_mobile_content_tail'])."',
|
||||
bo_insert_content = '".addslashes($board['bo_insert_content'])."',
|
||||
bo_gallery_cols = '{$board[bo_gallery_cols]}',
|
||||
bo_gallery_width = '{$board[bo_gallery_width]}',
|
||||
bo_gallery_height = '{$board[bo_gallery_height]}',
|
||||
bo_mobile_gallery_width = '{$board[bo_mobile_gallery_width]}',
|
||||
bo_mobile_gallery_height = '{$board[bo_mobile_gallery_height]}',
|
||||
bo_upload_size = '{$board[bo_upload_size]}',
|
||||
bo_reply_order = '{$board[bo_reply_order]}',
|
||||
bo_use_search = '{$board[bo_use_search]}',
|
||||
bo_order = '{$board[bo_order]}',
|
||||
bo_gallery_cols = '{$board['bo_gallery_cols']}',
|
||||
bo_gallery_width = '{$board['bo_gallery_width']}',
|
||||
bo_gallery_height = '{$board['bo_gallery_height']}',
|
||||
bo_mobile_gallery_width = '{$board['bo_mobile_gallery_width']}',
|
||||
bo_mobile_gallery_height = '{$board['bo_mobile_gallery_height']}',
|
||||
bo_upload_size = '{$board['bo_upload_size']}',
|
||||
bo_reply_order = '{$board['bo_reply_order']}',
|
||||
bo_use_search = '{$board['bo_use_search']}',
|
||||
bo_order = '{$board['bo_order']}',
|
||||
bo_notice = '{$board['bo_notice']}',
|
||||
bo_upload_count = '{$board[bo_upload_count]}',
|
||||
bo_use_email = '{$board[bo_use_email]}',
|
||||
bo_use_cert = '{$board[bo_use_cert]}',
|
||||
bo_use_sns = '{$board[bo_use_sns]}',
|
||||
bo_upload_count = '{$board['bo_upload_count']}',
|
||||
bo_use_email = '{$board['bo_use_email']}',
|
||||
bo_use_cert = '{$board['bo_use_cert']}',
|
||||
bo_use_sns = '{$board['bo_use_sns']}',
|
||||
bo_use_captcha = '{$board['bo_use_captcha']}',
|
||||
bo_sort_field = '{$board['bo_sort_field']}',
|
||||
bo_1_subj = '".addslashes($board['bo_1_subj'])."',
|
||||
bo_2_subj = '".addslashes($board['bo_2_subj'])."',
|
||||
@@ -159,6 +168,8 @@ if ($copy_case == 'schema_data_both') {
|
||||
}
|
||||
}
|
||||
$d->close();
|
||||
|
||||
run_event('admin_board_copy_file', $bo_table, $target_table);
|
||||
|
||||
// 글복사
|
||||
$sql = " insert into {$g5['write_prefix']}$target_table select * from {$g5['write_prefix']}$bo_table ";
|
||||
@@ -180,6 +191,9 @@ if ($copy_case == 'schema_data_both') {
|
||||
|
||||
if (count($file_copy)) {
|
||||
for ($i=0; $i<count($file_copy); $i++) {
|
||||
|
||||
$file_copy[$i] = run_replace('admin_copy_update_file', $file_copy[$i], $file_copy[$i]['bf_file'], $bo_table, $target_table);
|
||||
|
||||
$sql = " insert into {$g5['board_file_table']}
|
||||
set bo_table = '$target_table',
|
||||
wr_id = '{$file_copy[$i]['wr_id']}',
|
||||
@@ -188,11 +202,15 @@ if (count($file_copy)) {
|
||||
bf_file = '{$file_copy[$i]['bf_file']}',
|
||||
bf_download = '{$file_copy[$i]['bf_download']}',
|
||||
bf_content = '".addslashes($file_copy[$i]['bf_content'])."',
|
||||
bf_fileurl = '".addslashes($file_copy[$i]['bf_fileurl'])."',
|
||||
bf_thumburl = '".addslashes($file_copy[$i]['bf_thumburl'])."',
|
||||
bf_storage = '".addslashes($file_copy[$i]['bf_storage'])."',
|
||||
bf_filesize = '{$file_copy[$i]['bf_filesize']}',
|
||||
bf_width = '{$file_copy[$i]['bf_width']}',
|
||||
bf_height = '{$file_copy[$i]['bf_height']}',
|
||||
bf_type = '{$file_copy[$i]['bf_type']}',
|
||||
bf_datetime = '{$file_copy[$i]['bf_datetime']}' ";
|
||||
|
||||
sql_query($sql, false);
|
||||
}
|
||||
}
|
||||
@@ -203,4 +221,3 @@ delete_cache_latest($target_table);
|
||||
echo "<script>opener.document.location.reload();</script>";
|
||||
|
||||
alert("복사에 성공 했습니다.", './board_copy.php?bo_table='.$bo_table.'&'.$qstr);
|
||||
?>
|
||||
@@ -26,8 +26,10 @@ sql_query(" delete from {$g5['board_file_table']} where bo_table = '{$tmp_bo_tab
|
||||
// 게시판 테이블 DROP
|
||||
sql_query(" drop table {$g5['write_prefix']}{$tmp_bo_table} ", FALSE);
|
||||
|
||||
// 좋아요 테이블에서 기록 삭제
|
||||
sql_query(" delete from {$g5['board_good_table']} where bo_table = '{$tmp_bo_table}' ");
|
||||
|
||||
delete_cache_latest($tmp_bo_table);
|
||||
|
||||
// 게시판 폴더 전체 삭제
|
||||
rm_rf(G5_DATA_PATH.'/file/'.$tmp_bo_table);
|
||||
?>
|
||||
rm_rf(G5_DATA_PATH.'/file/'.$tmp_bo_table);
|
||||
+194
-35
@@ -3,7 +3,7 @@ $sub_menu = "300100";
|
||||
include_once('./_common.php');
|
||||
include_once(G5_EDITOR_LIB);
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
auth_check_menu($auth, $sub_menu, 'w');
|
||||
|
||||
$sql = " select count(*) as cnt from {$g5['group_table']} ";
|
||||
$row = sql_fetch($sql);
|
||||
@@ -11,6 +11,8 @@ if (!$row['cnt'])
|
||||
alert('게시판그룹이 한개 이상 생성되어야 합니다.', './boardgroup_form.php');
|
||||
|
||||
$html_title = '게시판';
|
||||
$reaonly = '';
|
||||
$required_valid = '';
|
||||
|
||||
if (!isset($board['bo_device'])) {
|
||||
// 게시판 사용 필드 추가
|
||||
@@ -77,11 +79,69 @@ if (!isset($board['bo_mobile_subject'])) {
|
||||
}
|
||||
|
||||
if (!isset($board['bo_use_captcha'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_use_captcha` TINYINT NOT NULL DEFAULT '0' AFTER `bo_use_sns` ");
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_use_captcha` TINYINT NOT NULL DEFAULT '0' AFTER `bo_use_sns` ", false);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
$board_default = array(
|
||||
'bo_mobile_subject'=>'',
|
||||
'bo_device'=>'',
|
||||
'bo_use_category'=>0,
|
||||
'bo_category_list'=>'',
|
||||
'bo_admin'=>'',
|
||||
'bo_list_level'=>0,
|
||||
'bo_read_level'=>0,
|
||||
'bo_write_level'=>0,
|
||||
'bo_reply_level'=>0,
|
||||
'bo_comment_level'=>0,
|
||||
'bo_link_level'=>0,
|
||||
'bo_upload_level'=>0,
|
||||
'bo_download_level'=>0,
|
||||
'bo_html_level'=>0,
|
||||
'bo_use_sideview'=>0,
|
||||
'bo_select_editor'=>'',
|
||||
'bo_use_rss_view'=>0,
|
||||
'bo_use_good'=>0,
|
||||
'bo_use_nogood'=>0,
|
||||
'bo_use_name'=>0,
|
||||
'bo_use_signature'=>0,
|
||||
'bo_use_ip_view'=>0,
|
||||
'bo_use_list_content'=>0,
|
||||
'bo_use_list_file'=>0,
|
||||
'bo_use_list_view'=>0,
|
||||
'bo_use_email'=>0,
|
||||
'bo_use_file_content'=>0,
|
||||
'bo_use_cert'=>'',
|
||||
'bo_write_min'=>0,
|
||||
'bo_write_max'=>0,
|
||||
'bo_comment_min'=>0,
|
||||
'bo_comment_max'=>0,
|
||||
'bo_use_sns'=>0,
|
||||
'bo_order'=>0,
|
||||
'bo_use_captcha'=>0,
|
||||
'bo_content_head'=>'',
|
||||
'bo_content_tail'=>'',
|
||||
'bo_mobile_content_head'=>'',
|
||||
'bo_mobile_content_tail'=>'',
|
||||
'bo_insert_content'=>'',
|
||||
'bo_sort_field'=>'',
|
||||
);
|
||||
|
||||
for($i=0;$i<=10;$i++){
|
||||
$board_default['bo_'.$i.'_subj'] = '';
|
||||
$board_default['bo_'.$i] = '';
|
||||
}
|
||||
|
||||
$board = array_merge($board_default, $board);
|
||||
|
||||
run_event('adm_board_form_before', $board, $w);
|
||||
|
||||
$required = "";
|
||||
$readonly = "";
|
||||
$sound_only = "";
|
||||
if ($w == '') {
|
||||
|
||||
$html_title .= ' 생성';
|
||||
@@ -181,11 +241,11 @@ $pg_anchor = '<ul class="anchor">
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_table">TABLE<?php echo $sound_only ?></label></th>
|
||||
<td colspan="2">
|
||||
<input type="text" name="bo_table" value="<?php echo $board['bo_table'] ?>" id="bo_table" <?php echo $required ?> <?php echo $readonly ?> class="frm_input <?php echo $reaonly ?> <?php echo $required ?> <?php echo $required_valid ?>" maxlength="20">
|
||||
<input type="text" name="bo_table" value="<?php echo $board['bo_table'] ?>" id="bo_table" <?php echo $required ?> <?php echo $readonly ?> class="frm_input <?php echo $readonly ?> <?php echo $required ?> <?php echo $required_valid ?>" maxlength="20">
|
||||
<?php if ($w == '') { ?>
|
||||
영문자, 숫자, _ 만 가능 (공백없이 20자 이내)
|
||||
<?php } else { ?>
|
||||
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $board['bo_table'] ?>" class="btn_frmline">게시판 바로가기</a>
|
||||
<a href="<?php echo get_pretty_url($board['bo_table']) ?>" class="btn_frmline">게시판 바로가기</a>
|
||||
<a href="./board_list.php?<?php echo $qstr;?>" class="btn_frmline">목록으로</a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
@@ -230,7 +290,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_category_list">분류</label></th>
|
||||
<td>
|
||||
<?php echo help('분류와 분류 사이는 | 로 구분하세요. (예: 질문|답변) 첫자로 #은 입력하지 마세요. (예: #질문|#답변 [X])') ?>
|
||||
<?php echo help('분류와 분류 사이는 | 로 구분하세요. (예: 질문|답변) 첫자로 #은 입력하지 마세요. (예: #질문|#답변 [X])'."\n".'분류명에 일부 특수문자 ()/ 는 사용할수 없습니다.'); ?>
|
||||
<input type="text" name="bo_category_list" value="<?php echo get_text($board['bo_category_list']) ?>" id="bo_category_list" class="frm_input" size="70">
|
||||
<input type="checkbox" name="bo_use_category" value="1" id="bo_use_category" <?php echo $board['bo_use_category']?'checked':''; ?>>
|
||||
<label for="bo_use_category">사용</label>
|
||||
@@ -481,6 +541,27 @@ $pg_anchor = '<ul class="anchor">
|
||||
<label for="chk_all_use_dhtml_editor">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_select_editor">게시판 에디터 선택</label></th>
|
||||
<td>
|
||||
<?php echo help('게시판에 사용할 에디터를 설정합니다. 스킨에 따라 적용되지 않을 수 있습니다.') ?>
|
||||
<select name="bo_select_editor" id="bo_select_editor">
|
||||
<?php
|
||||
$arr = get_skin_dir('', G5_EDITOR_PATH);
|
||||
for ($i=0; $i<count($arr); $i++) {
|
||||
if ($i == 0) echo "<option value=\"\">기본환경설정의 에디터 사용</option>";
|
||||
echo "<option value=\"".$arr[$i]."\"".get_selected($board['bo_select_editor'], $arr[$i]).">".$arr[$i]."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_select_editor" value="1" id="chk_grp_select_editor">
|
||||
<label for="chk_grp_select_editor">그룹적용</label>
|
||||
<input type="checkbox" name="chk_all_select_editor" value="1" id="chk_all_select_editor">
|
||||
<label for="chk_all_select_editor">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_use_rss_view">RSS 보이기 사용</label></th>
|
||||
<td>
|
||||
@@ -825,6 +906,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<label for="chk_all_mobile_skin">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($is_admin === 'super'){ // 슈퍼관리자인 경우에만 수정 가능 ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_include_head">상단 파일 경로</label></th>
|
||||
<td>
|
||||
@@ -849,10 +931,26 @@ $pg_anchor = '<ul class="anchor">
|
||||
<label for="chk_all_include_tail">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="admin_captcha_box" style="display:none;">
|
||||
<th scope="row">자동등록방지</th>
|
||||
<td>
|
||||
<?php
|
||||
echo help("파일 경로를 입력 또는 수정시 캡챠를 반드시 입력해야 합니다.");
|
||||
|
||||
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
|
||||
$captcha_html = captcha_html();
|
||||
$captcha_js = chk_captcha_js();
|
||||
echo $captcha_html;
|
||||
?>
|
||||
<script>
|
||||
jQuery("#captcha_key").removeAttr("required").removeClass("required");
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_content_head">상단 내용</label></th>
|
||||
<td>
|
||||
<?php echo editor_html("bo_content_head", get_text($board['bo_content_head'], 0)); ?>
|
||||
<?php echo editor_html("bo_content_head", get_text(html_purifier($board['bo_content_head']), 0)); ?>
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_content_head" value="1" id="chk_grp_content_head">
|
||||
@@ -864,7 +962,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_content_tail">하단 내용</label></th>
|
||||
<td>
|
||||
<?php echo editor_html("bo_content_tail", get_text($board['bo_content_tail'], 0)); ?>
|
||||
<?php echo editor_html("bo_content_tail", get_text(html_purifier($board['bo_content_tail']), 0)); ?>
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_content_tail" value="1" id="chk_grp_content_tail">
|
||||
@@ -876,7 +974,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_mobile_content_head">모바일 상단 내용</label></th>
|
||||
<td>
|
||||
<?php echo editor_html("bo_mobile_content_head", get_text($board['bo_mobile_content_head'], 0)); ?>
|
||||
<?php echo editor_html("bo_mobile_content_head", get_text(html_purifier($board['bo_mobile_content_head']), 0)); ?>
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_mobile_content_head" value="1" id="chk_grp_mobile_content_head">
|
||||
@@ -888,7 +986,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_mobile_content_tail">모바일 하단 내용</label></th>
|
||||
<td>
|
||||
<?php echo editor_html("bo_mobile_content_tail", get_text($board['bo_mobile_content_tail'], 0)); ?>
|
||||
<?php echo editor_html("bo_mobile_content_tail", get_text(html_purifier($board['bo_mobile_content_tail']), 0)); ?>
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_mobile_content_tail" value="1" id="chk_grp_mobile_content_tail">
|
||||
@@ -897,10 +995,11 @@ $pg_anchor = '<ul class="anchor">
|
||||
<label for="chk_all_mobile_content_tail">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } //end if $is_admin === 'super' ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_insert_content">글쓰기 기본 내용</label></th>
|
||||
<td>
|
||||
<textarea id="bo_insert_content" name="bo_insert_content" rows="5"><?php echo $board['bo_insert_content'] ?></textarea>
|
||||
<textarea id="bo_insert_content" name="bo_insert_content" rows="5"><?php echo html_purifier($board['bo_insert_content']); ?></textarea>
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_insert_content" value="1" id="chk_grp_insert_content">
|
||||
@@ -1096,25 +1195,23 @@ $pg_anchor = '<ul class="anchor">
|
||||
<td>
|
||||
<?php echo help('리스트에서 기본으로 정렬에 사용할 필드를 선택합니다. "기본"으로 사용하지 않으시는 경우 속도가 느려질 수 있습니다.') ?>
|
||||
<select id="bo_sort_field" name="bo_sort_field">
|
||||
<option value="" <?php echo get_selected($board['bo_sort_field'], ""); ?>>wr_num, wr_reply : 기본</option>
|
||||
<option value="wr_datetime asc" <?php echo get_selected($board['bo_sort_field'], "wr_datetime asc"); ?>>wr_datetime asc : 날짜 이전것 부터</option>
|
||||
<option value="wr_datetime desc" <?php echo get_selected($board['bo_sort_field'], "wr_datetime desc"); ?>>wr_datetime desc : 날짜 최근것 부터</option>
|
||||
<option value="wr_hit asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_hit asc, wr_num, wr_reply"); ?>>wr_hit asc : 조회수 낮은것 부터</option>
|
||||
<option value="wr_hit desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_hit desc, wr_num, wr_reply"); ?>>wr_hit desc : 조회수 높은것 부터</option>
|
||||
<option value="wr_last asc" <?php echo get_selected($board['bo_sort_field'], "wr_last asc"); ?>>wr_last asc : 최근글 이전것 부터</option>
|
||||
<option value="wr_last desc" <?php echo get_selected($board['bo_sort_field'], "wr_last desc"); ?>>wr_last desc : 최근글 최근것 부터</option>
|
||||
<option value="wr_comment asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_comment asc, wr_num, wr_reply"); ?>>wr_comment asc : 댓글수 낮은것 부터</option>
|
||||
<option value="wr_comment desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_comment desc, wr_num, wr_reply"); ?>>wr_comment desc : 댓글수 높은것 부터</option>
|
||||
<option value="wr_good asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_good asc, wr_num, wr_reply"); ?>>wr_good asc : 추천수 낮은것 부터</option>
|
||||
<option value="wr_good desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_good desc, wr_num, wr_reply"); ?>>wr_good desc : 추천수 높은것 부터</option>
|
||||
<option value="wr_nogood asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_nogood asc, wr_num, wr_reply"); ?>>wr_nogood asc : 비추천수 낮은것 부터</option>
|
||||
<option value="wr_nogood desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_nogood desc, wr_num, wr_reply"); ?>>wr_nogood desc : 비추천수 높은것 부터</option>
|
||||
<option value="wr_subject asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_subject asc, wr_num, wr_reply"); ?>>wr_subject asc : 제목 오름차순</option>
|
||||
<option value="wr_subject desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_subject desc, wr_num, wr_reply"); ?>>wr_subject desc : 제목 내림차순</option>
|
||||
<option value="wr_name asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_name asc, wr_num, wr_reply"); ?>>wr_name asc : 글쓴이 오름차순</option>
|
||||
<option value="wr_name desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_name desc, wr_num, wr_reply"); ?>>wr_name desc : 글쓴이 내림차순</option>
|
||||
<option value="ca_name asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "ca_name asc, wr_num, wr_reply"); ?>>ca_name asc : 분류명 오름차순</option>
|
||||
<option value="ca_name desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "ca_name desc, wr_num, wr_reply"); ?>>ca_name desc : 분류명 내림차순</option>
|
||||
<?php foreach( get_board_sort_fields($board) as $v ){
|
||||
|
||||
$option_value = $order_by_str = $v[0];
|
||||
if( $v[0] === 'wr_num, wr_reply' ){
|
||||
$selected = (! $board['bo_sort_field']) ? 'selected="selected"' : '';
|
||||
$option_value = '';
|
||||
} else {
|
||||
$selected = ($board['bo_sort_field'] === $v[0]) ? 'selected="selected"' : '';
|
||||
}
|
||||
|
||||
if( $order_by_str !== 'wr_num, wr_reply' ){
|
||||
$tmp = explode(',', $v[0]);
|
||||
$order_by_str = $tmp[0];
|
||||
}
|
||||
|
||||
echo '<option value="'.$option_value.'" '.$selected.' >'.$order_by_str.' : '.$v[1].'</option>';
|
||||
} //end foreach ?>
|
||||
</select>
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
@@ -1224,7 +1321,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<label for="bo_<?php echo $i ?>_subj">여분필드 <?php echo $i ?> 제목</label>
|
||||
<input type="text" name="bo_<?php echo $i ?>_subj" id="bo_<?php echo $i ?>_subj" value="<?php echo get_text($board['bo_'.$i.'_subj']) ?>" class="frm_input">
|
||||
<label for="bo_<?php echo $i ?>">여분필드 <?php echo $i ?> 값</label>
|
||||
<input type="text" name="bo_<?php echo $i ?>" value="<?php echo get_text($board['bo_'.$i]) ?>" id="bo_<?php echo $i ?>" class="frm_input">
|
||||
<input type="text" name="bo_<?php echo $i ?>" value="<?php echo get_text($board['bo_'.$i]) ?>" id="bo_<?php echo $i ?>" class="frm_input extra-value-input">
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_<?php echo $i ?>" value="1" id="chk_grp_<?php echo $i ?>">
|
||||
@@ -1242,9 +1339,9 @@ $pg_anchor = '<ul class="anchor">
|
||||
|
||||
<div class="btn_fixed_top">
|
||||
<?php if( $bo_table && $w ){ ?>
|
||||
<a href="./board_copy.php?bo_table='.$bo_table.'" id="board_copy" target="win_board_copy" class=" btn_02 btn">게시판복사</a>
|
||||
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $board['bo_table']; ?>'" class=" btn_02 btn">게시판 바로가기</a>
|
||||
<a href="./board_thumbnail_delete.php?bo_table=<?php echo $board['bo_table']; ?>'&'.$qstr.'" onclick="return delete_confirm2('게시판 썸네일 파일을 삭제하시겠습니까?');" class="btn_02 btn">게시판 썸네일 삭제</a>
|
||||
<a href="./board_copy.php?bo_table=<?php echo $board['bo_table']; ?>" id="board_copy" target="win_board_copy" class=" btn_02 btn">게시판복사</a>
|
||||
<a href="<?php echo get_pretty_url($board['bo_table']); ?>" class=" btn_02 btn">게시판 바로가기</a>
|
||||
<a href="./board_thumbnail_delete.php?bo_table=<?php echo $board['bo_table'].'&'.$qstr;?>" onclick="return delete_confirm2('게시판 썸네일 파일을 삭제하시겠습니까?');" class="btn_02 btn">게시판 썸네일 삭제</a>
|
||||
<?php } ?>
|
||||
<input type="submit" value="확인" class="btn_submi btn btn_01" accesskey="s">
|
||||
</div>
|
||||
@@ -1308,8 +1405,67 @@ function set_point(f) {
|
||||
}
|
||||
}
|
||||
|
||||
var captcha_chk = false;
|
||||
|
||||
function use_captcha_check(){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: g5_admin_url+"/ajax.use_captcha.php",
|
||||
data: { admin_use_captcha: "1" },
|
||||
cache: false,
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
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());
|
||||
|
||||
if(bo_include_head !== head || bo_include_tail !== tail){
|
||||
// 캡챠를 사용합니다.
|
||||
jQuery("#admin_captcha_box").show();
|
||||
captcha_chk = true;
|
||||
|
||||
use_captcha_check();
|
||||
|
||||
return false;
|
||||
} else {
|
||||
jQuery("#admin_captcha_box").hide();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
});
|
||||
|
||||
function fboardform_submit(f)
|
||||
{
|
||||
<?php
|
||||
if(!$w){
|
||||
$js_array = get_bo_table_banned_word();
|
||||
echo "var banned_array = ". json_encode($js_array) . ";\n";
|
||||
}
|
||||
?>
|
||||
|
||||
// 게시판명이 금지된 단어로 되어 있으면
|
||||
if( (typeof banned_array != 'undefined') && jQuery.inArray(f.bo_table.value, banned_array) !== -1 ){
|
||||
alert("입력한 게시판 TABLE명을 사용할수 없습니다. 다른 이름으로 입력해 주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
<?php echo get_editor_js("bo_content_head"); ?>
|
||||
<?php echo get_editor_js("bo_content_tail"); ?>
|
||||
<?php echo get_editor_js("bo_mobile_content_head"); ?>
|
||||
@@ -1327,10 +1483,13 @@ function fboardform_submit(f)
|
||||
return false;
|
||||
}
|
||||
|
||||
if( captcha_chk ) {
|
||||
<?php echo isset($captcha_js) ? $captcha_js : ''; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
include_once ('./admin.tail.php');
|
||||
+262
-138
@@ -5,42 +5,64 @@ include_once('./_common.php');
|
||||
if ($w == 'u')
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
auth_check_menu($auth, $sub_menu, 'w');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
if (!$_POST['gr_id']) { alert('그룹 ID는 반드시 선택하세요.'); }
|
||||
$gr_id = isset($_POST['gr_id']) ? preg_replace('/[^a-z0-9_]/i', '', $_POST['gr_id']) : '';
|
||||
$bo_admin = isset($_POST['bo_admin']) ? preg_replace('/[^a-z0-9_\, \|\#]/i', '', $_POST['bo_admin']) : '';
|
||||
$bo_subject = isset($_POST['bo_subject']) ? strip_tags(clean_xss_attributes($_POST['bo_subject'])) : '';
|
||||
$bo_mobile_subject = isset($_POST['bo_mobile_subject']) ? strip_tags(clean_xss_attributes($_POST['bo_mobile_subject'])) : '';
|
||||
|
||||
if (!$gr_id) { alert('그룹 ID는 반드시 선택하세요.'); }
|
||||
if (!$bo_table) { alert('게시판 TABLE명은 반드시 입력하세요.'); }
|
||||
if (!preg_match("/^([A-Za-z0-9_]{1,20})$/", $bo_table)) { alert('게시판 TABLE명은 공백없이 영문자, 숫자, _ 만 사용 가능합니다. (20자 이내)'); }
|
||||
if (!$_POST['bo_subject']) { alert('게시판 제목을 입력하세요.'); }
|
||||
if (!$bo_subject) { alert('게시판 제목을 입력하세요.'); }
|
||||
|
||||
$_POST['bo_include_head'] = preg_replace("#[\\\]+$#", "", substr($_POST['bo_include_head'], 0, 255));
|
||||
$_POST['bo_include_tail'] = preg_replace("#[\\\]+$#", "", substr($_POST['bo_include_tail'], 0, 255));
|
||||
// 게시판명이 금지된 단어로 되어 있으면
|
||||
if ( $w == '' && in_array($bo_table, get_bo_table_banned_word()) ){
|
||||
alert('입력한 게시판 TABLE명을 사용할수 없습니다. 다른 이름으로 입력해 주세요.');
|
||||
}
|
||||
|
||||
if ($file = $_POST['bo_include_head']) {
|
||||
$purl = parse_url($file);
|
||||
$file = $purl['path'];
|
||||
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
||||
alert('상단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
||||
$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 && ($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');
|
||||
|
||||
if (!chk_captcha()) {
|
||||
alert('자동등록방지 숫자가 틀렸습니다.');
|
||||
}
|
||||
$_POST['bo_include_head'] = $file;
|
||||
}
|
||||
|
||||
if ($file = $_POST['bo_include_tail']) {
|
||||
$purl = parse_url($file);
|
||||
$file = $purl['path'];
|
||||
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
||||
alert('하단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
||||
if ($file = $bo_include_head) {
|
||||
$file_ext = pathinfo($file, PATHINFO_EXTENSION);
|
||||
|
||||
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) || ! preg_match('/^.*\.(php|htm|html)$/i', $file) ) {
|
||||
alert('상단 파일 경로의 확장자는 php, htm, html 만 허용합니다.');
|
||||
}
|
||||
$_POST['bo_include_tail'] = $file;
|
||||
}
|
||||
|
||||
if(!is_include_path_check($_POST['bo_include_head'], 1)) {
|
||||
alert('/data/file/ 또는 /data/editor/ 포함된 문자를 상단 파일 경로에 포함시킬수 없습니다.');
|
||||
if ($file = $bo_include_tail) {
|
||||
$file_ext = pathinfo($file, PATHINFO_EXTENSION);
|
||||
|
||||
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) || ! preg_match('/^.*\.(php|htm|html)$/i', $file) ) {
|
||||
alert('하단 파일 경로의 확장자는 php, htm, html 만 허용합니다.');
|
||||
}
|
||||
}
|
||||
|
||||
if(!is_include_path_check($_POST['bo_include_tail'], 1)) {
|
||||
alert('/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.');
|
||||
if(!is_include_path_check($bo_include_head, 1)) {
|
||||
alert('상단 파일 경로에 포함시킬수 없는 문자열이 있습니다.');
|
||||
}
|
||||
|
||||
if(!is_include_path_check($bo_include_tail, 1)) {
|
||||
alert('하단 파일 경로에 포함시킬수 없는 문자열이 있습니다.');
|
||||
}
|
||||
|
||||
if( function_exists('filter_input_include_path') ){
|
||||
$bo_include_head = filter_input_include_path($bo_include_head);
|
||||
$bo_include_tail = filter_input_include_path($bo_include_tail);
|
||||
}
|
||||
|
||||
$board_path = G5_DATA_PATH.'/file/'.$bo_table;
|
||||
@@ -51,107 +73,191 @@ $board_path = G5_DATA_PATH.'/file/'.$bo_table;
|
||||
|
||||
// 디렉토리에 있는 파일의 목록을 보이지 않게 한다.
|
||||
$file = $board_path . '/index.php';
|
||||
$f = @fopen($file, 'w');
|
||||
@fwrite($f, '');
|
||||
@fclose($f);
|
||||
@chmod($file, G5_FILE_PERMISSION);
|
||||
if( $f = @fopen($file, 'w') ){
|
||||
@fwrite($f, '');
|
||||
@fclose($f);
|
||||
@chmod($file, G5_FILE_PERMISSION);
|
||||
}
|
||||
|
||||
// 분류에 & 나 = 는 사용이 불가하므로 2바이트로 바꾼다.
|
||||
$src_char = array('&', '=');
|
||||
$dst_char = array('&', '〓');
|
||||
$bo_category_list = str_replace($src_char, $dst_char, $bo_category_list);
|
||||
$bo_category_list = isset($_POST['bo_category_list']) ? str_replace($src_char, $dst_char, $_POST['bo_category_list']) : '';
|
||||
//https://github.com/gnuboard/gnuboard5/commit/f5f4925d4eb28ba1af728e1065fc2bdd9ce1da58 에 따른 조치
|
||||
$str_bo_category_list = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\/\^\*]/", "", $bo_category_list);
|
||||
|
||||
$sql_common = " gr_id = '{$_POST['gr_id']}',
|
||||
bo_subject = '{$_POST['bo_subject']}',
|
||||
bo_mobile_subject = '{$_POST['bo_mobile_subject']}',
|
||||
bo_device = '{$_POST['bo_device']}',
|
||||
bo_admin = '{$_POST['bo_admin']}',
|
||||
bo_list_level = '{$_POST['bo_list_level']}',
|
||||
bo_read_level = '{$_POST['bo_read_level']}',
|
||||
bo_write_level = '{$_POST['bo_write_level']}',
|
||||
bo_reply_level = '{$_POST['bo_reply_level']}',
|
||||
bo_comment_level = '{$_POST['bo_comment_level']}',
|
||||
bo_html_level = '{$_POST['bo_html_level']}',
|
||||
bo_link_level = '{$_POST['bo_link_level']}',
|
||||
bo_count_modify = '{$_POST['bo_count_modify']}',
|
||||
bo_count_delete = '{$_POST['bo_count_delete']}',
|
||||
bo_upload_level = '{$_POST['bo_upload_level']}',
|
||||
bo_download_level = '{$_POST['bo_download_level']}',
|
||||
bo_read_point = '{$_POST['bo_read_point']}',
|
||||
bo_write_point = '{$_POST['bo_write_point']}',
|
||||
bo_comment_point = '{$_POST['bo_comment_point']}',
|
||||
bo_download_point = '{$_POST['bo_download_point']}',
|
||||
bo_use_category = '{$_POST['bo_use_category']}',
|
||||
bo_category_list = '{$_POST['bo_category_list']}',
|
||||
bo_use_sideview = '{$_POST['bo_use_sideview']}',
|
||||
bo_use_file_content = '{$_POST['bo_use_file_content']}',
|
||||
bo_use_secret = '{$_POST['bo_use_secret']}',
|
||||
bo_use_dhtml_editor = '{$_POST['bo_use_dhtml_editor']}',
|
||||
bo_use_rss_view = '{$_POST['bo_use_rss_view']}',
|
||||
bo_use_good = '{$_POST['bo_use_good']}',
|
||||
bo_use_nogood = '{$_POST['bo_use_nogood']}',
|
||||
bo_use_name = '{$_POST['bo_use_name']}',
|
||||
bo_use_signature = '{$_POST['bo_use_signature']}',
|
||||
bo_use_ip_view = '{$_POST['bo_use_ip_view']}',
|
||||
bo_use_list_view = '{$_POST['bo_use_list_view']}',
|
||||
bo_use_list_file = '{$_POST['bo_use_list_file']}',
|
||||
bo_use_list_content = '{$_POST['bo_use_list_content']}',
|
||||
bo_use_email = '{$_POST['bo_use_email']}',
|
||||
bo_use_cert = '{$_POST['bo_use_cert']}',
|
||||
bo_use_sns = '{$_POST['bo_use_sns']}',
|
||||
bo_use_captcha = '{$_POST['bo_use_captcha']}',
|
||||
bo_table_width = '{$_POST['bo_table_width']}',
|
||||
bo_subject_len = '{$_POST['bo_subject_len']}',
|
||||
bo_mobile_subject_len = '{$_POST['bo_mobile_subject_len']}',
|
||||
bo_page_rows = '{$_POST['bo_page_rows']}',
|
||||
bo_mobile_page_rows = '{$_POST['bo_mobile_page_rows']}',
|
||||
bo_new = '{$_POST['bo_new']}',
|
||||
bo_hot = '{$_POST['bo_hot']}',
|
||||
bo_image_width = '{$_POST['bo_image_width']}',
|
||||
bo_skin = '{$_POST['bo_skin']}',
|
||||
bo_mobile_skin = '{$_POST['bo_mobile_skin']}',
|
||||
bo_include_head = '{$_POST['bo_include_head']}',
|
||||
bo_include_tail = '{$_POST['bo_include_tail']}',
|
||||
bo_content_head = '{$_POST['bo_content_head']}',
|
||||
bo_content_tail = '{$_POST['bo_content_tail']}',
|
||||
bo_mobile_content_head = '{$_POST['bo_mobile_content_head']}',
|
||||
bo_mobile_content_tail = '{$_POST['bo_mobile_content_tail']}',
|
||||
bo_insert_content = '{$_POST['bo_insert_content']}',
|
||||
bo_gallery_cols = '{$_POST['bo_gallery_cols']}',
|
||||
bo_gallery_width = '{$_POST['bo_gallery_width']}',
|
||||
bo_gallery_height = '{$_POST['bo_gallery_height']}',
|
||||
bo_mobile_gallery_width = '{$_POST['bo_mobile_gallery_width']}',
|
||||
bo_mobile_gallery_height= '{$_POST['bo_mobile_gallery_height']}',
|
||||
bo_upload_count = '{$_POST['bo_upload_count']}',
|
||||
bo_upload_size = '{$_POST['bo_upload_size']}',
|
||||
bo_reply_order = '{$_POST['bo_reply_order']}',
|
||||
bo_use_search = '{$_POST['bo_use_search']}',
|
||||
bo_order = '{$_POST['bo_order']}',
|
||||
bo_write_min = '{$_POST['bo_write_min']}',
|
||||
bo_write_max = '{$_POST['bo_write_max']}',
|
||||
bo_comment_min = '{$_POST['bo_comment_min']}',
|
||||
bo_comment_max = '{$_POST['bo_comment_max']}',
|
||||
bo_sort_field = '{$_POST['bo_sort_field']}',
|
||||
bo_1_subj = '{$_POST['bo_1_subj']}',
|
||||
bo_2_subj = '{$_POST['bo_2_subj']}',
|
||||
bo_3_subj = '{$_POST['bo_3_subj']}',
|
||||
bo_4_subj = '{$_POST['bo_4_subj']}',
|
||||
bo_5_subj = '{$_POST['bo_5_subj']}',
|
||||
bo_6_subj = '{$_POST['bo_6_subj']}',
|
||||
bo_7_subj = '{$_POST['bo_7_subj']}',
|
||||
bo_8_subj = '{$_POST['bo_8_subj']}',
|
||||
bo_9_subj = '{$_POST['bo_9_subj']}',
|
||||
bo_10_subj = '{$_POST['bo_10_subj']}',
|
||||
bo_1 = '{$_POST['bo_1']}',
|
||||
bo_2 = '{$_POST['bo_2']}',
|
||||
bo_3 = '{$_POST['bo_3']}',
|
||||
bo_4 = '{$_POST['bo_4']}',
|
||||
bo_5 = '{$_POST['bo_5']}',
|
||||
bo_6 = '{$_POST['bo_6']}',
|
||||
bo_7 = '{$_POST['bo_7']}',
|
||||
bo_8 = '{$_POST['bo_8']}',
|
||||
bo_9 = '{$_POST['bo_9']}',
|
||||
bo_10 = '{$_POST['bo_10']}' ";
|
||||
$bo_use_category = isset($_POST['bo_use_category']) ? (int) $_POST['bo_use_category'] : 0;
|
||||
$bo_use_sideview = isset($_POST['bo_use_sideview']) ? (int) $_POST['bo_use_sideview'] : 0;
|
||||
$bo_use_dhtml_editor = isset($_POST['bo_use_dhtml_editor']) ? (int) $_POST['bo_use_dhtml_editor'] : 0;
|
||||
$bo_use_good = isset($_POST['bo_use_good']) ? (int) $_POST['bo_use_good'] : 0;
|
||||
$bo_use_nogood = isset($_POST['bo_use_nogood']) ? (int) $_POST['bo_use_nogood'] : 0;
|
||||
$bo_use_name = isset($_POST['bo_use_name']) ? (int) $_POST['bo_use_name'] : 0;
|
||||
$bo_use_signature = isset($_POST['bo_use_signature']) ? (int) $_POST['bo_use_signature'] : 0;
|
||||
$bo_use_ip_view = isset($_POST['bo_use_ip_view']) ? (int) $_POST['bo_use_ip_view'] : 0;
|
||||
$bo_use_list_view = isset($_POST['bo_use_list_view']) ? (int) $_POST['bo_use_list_view'] : 0;
|
||||
$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_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;
|
||||
$bo_subject_len = isset($_POST['bo_subject_len']) ? (int) $_POST['bo_subject_len'] : 0;
|
||||
$bo_mobile_subject_len = isset($_POST['bo_mobile_subject_len']) ? (int) $_POST['bo_mobile_subject_len'] : 0;
|
||||
$bo_page_rows = isset($_POST['bo_page_rows']) ? (int) $_POST['bo_page_rows'] : 0;
|
||||
$bo_mobile_page_rows = isset($_POST['bo_mobile_page_rows']) ? (int) $_POST['bo_mobile_page_rows'] : 0;
|
||||
$bo_use_rss_view = isset($_POST['bo_use_rss_view']) ? (int) $_POST['bo_use_rss_view'] : 0;
|
||||
$bo_use_secret = isset($_POST['bo_use_secret']) ? (int) $_POST['bo_use_secret'] : 0;
|
||||
$bo_use_file_content = isset($_POST['bo_use_file_content']) ? (int) $_POST['bo_use_file_content'] : 0;
|
||||
$bo_new = isset($_POST['bo_new']) ? (int) $_POST['bo_new'] : 0;
|
||||
$bo_hot = isset($_POST['bo_hot']) ? (int) $_POST['bo_hot'] : 0;
|
||||
$bo_image_width = isset($_POST['bo_image_width']) ? (int) $_POST['bo_image_width'] : 0;
|
||||
$bo_use_search = isset($_POST['bo_use_search']) ? (int) $_POST['bo_use_search'] : 0;
|
||||
$bo_use_cert = isset($_POST['bo_use_cert']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['bo_use_cert']) : '';
|
||||
$bo_device = isset($_POST['bo_device']) ? clean_xss_tags($_POST['bo_device'], 1, 1) : '';
|
||||
$bo_list_level = isset($_POST['bo_list_level']) ? (int) $_POST['bo_list_level'] : 0;
|
||||
$bo_read_level = isset($_POST['bo_read_level']) ? (int) $_POST['bo_read_level'] : 0;
|
||||
$bo_write_level = isset($_POST['bo_write_level']) ? (int) $_POST['bo_write_level'] : 0;
|
||||
$bo_reply_level = isset($_POST['bo_reply_level']) ? (int) $_POST['bo_reply_level'] : 0;
|
||||
$bo_comment_level = isset($_POST['bo_comment_level']) ? (int) $_POST['bo_comment_level'] : 0;
|
||||
$bo_html_level = isset($_POST['bo_html_level']) ? (int) $_POST['bo_html_level'] : 0;
|
||||
$bo_link_level = isset($_POST['bo_link_level']) ? (int) $_POST['bo_link_level'] : 0;
|
||||
$bo_count_modify = isset($_POST['bo_count_modify']) ? (int) $_POST['bo_count_modify'] : 0;
|
||||
$bo_count_delete = isset($_POST['bo_count_delete']) ? (int) $_POST['bo_count_delete'] : 0;
|
||||
$bo_upload_level = isset($_POST['bo_upload_level']) ? (int) $_POST['bo_upload_level'] : 0;
|
||||
$bo_download_level = isset($_POST['bo_download_level']) ? (int) $_POST['bo_download_level'] : 0;
|
||||
$bo_read_point = isset($_POST['bo_read_point']) ? (int) $_POST['bo_read_point'] : 0;
|
||||
$bo_write_point = isset($_POST['bo_write_point']) ? (int) $_POST['bo_write_point'] : 0;
|
||||
$bo_comment_point = isset($_POST['bo_comment_point']) ? (int) $_POST['bo_comment_point'] : 0;
|
||||
$bo_download_point = isset($_POST['bo_download_point']) ? (int) $_POST['bo_download_point'] : 0;
|
||||
$bo_select_editor = isset($_POST['bo_select_editor']) ? clean_xss_tags($_POST['bo_select_editor'], 1, 1) : '';
|
||||
$bo_skin = isset($_POST['bo_skin']) ? clean_xss_tags($_POST['bo_skin'], 1, 1) : '';
|
||||
$bo_mobile_skin = isset($_POST['bo_mobile_skin']) ? clean_xss_tags($_POST['bo_mobile_skin'], 1, 1) : '';
|
||||
$bo_content_head = isset($_POST['bo_content_head']) ? $_POST['bo_content_head'] : '';
|
||||
$bo_content_tail = isset($_POST['bo_content_tail']) ? $_POST['bo_content_tail'] : '';
|
||||
$bo_mobile_content_head = isset($_POST['bo_mobile_content_head']) ? $_POST['bo_mobile_content_head'] : '';
|
||||
$bo_mobile_content_tail = isset($_POST['bo_mobile_content_tail']) ? $_POST['bo_mobile_content_tail'] : '';
|
||||
$bo_insert_content = isset($_POST['bo_insert_content']) ? $_POST['bo_insert_content'] : '';
|
||||
$bo_gallery_cols = isset($_POST['bo_gallery_cols']) ? (int) $_POST['bo_gallery_cols'] : 0;
|
||||
$bo_gallery_width = isset($_POST['bo_gallery_width']) ? (int) $_POST['bo_gallery_width'] : 0;
|
||||
$bo_gallery_height = isset($_POST['bo_gallery_height']) ? (int) $_POST['bo_gallery_height'] : 0;
|
||||
$bo_mobile_gallery_width = isset($_POST['bo_mobile_gallery_width']) ? (int) $_POST['bo_mobile_gallery_width'] : 0;
|
||||
$bo_mobile_gallery_height = isset($_POST['bo_mobile_gallery_height']) ? (int) $_POST['bo_mobile_gallery_height'] : 0;
|
||||
$bo_upload_count = isset($_POST['bo_upload_count']) ? (int) $_POST['bo_upload_count'] : 0;
|
||||
$bo_upload_size = isset($_POST['bo_upload_size']) ? (int) $_POST['bo_upload_size'] : 0;
|
||||
$bo_reply_order = isset($_POST['bo_reply_order']) ? (int) $_POST['bo_reply_order'] : 0;
|
||||
$bo_order = isset($_POST['bo_order']) ? (int) $_POST['bo_order'] : 0;
|
||||
$bo_write_min = isset($_POST['bo_write_min']) ? (int) $_POST['bo_write_min'] : 0;
|
||||
$bo_write_max = isset($_POST['bo_write_max']) ? (int) $_POST['bo_write_max'] : 0;
|
||||
$bo_comment_min = isset($_POST['bo_comment_min']) ? (int) $_POST['bo_comment_min'] : 0;
|
||||
$bo_comment_max = isset($_POST['bo_comment_max']) ? (int) $_POST['bo_comment_max'] : 0;
|
||||
$bo_sort_field = isset($_POST['bo_sort_field']) ? clean_xss_tags($_POST['bo_sort_field'], 1, 1) : '';
|
||||
|
||||
$etcs = array();
|
||||
|
||||
for($i=1;$i<=10;$i++){
|
||||
$etcs['bo_'.$i.'_subj'] = ${'bo_'.$i.'_subj'} = isset($_POST['bo_'.$i.'_subj']) ? $_POST['bo_'.$i.'_subj'] : '';
|
||||
$etcs['bo_'.$i] = ${'bo_'.$i} = isset($_POST['bo_'.$i]) ? $_POST['bo_'.$i] : '';
|
||||
}
|
||||
|
||||
$sql_common = " gr_id = '{$gr_id}',
|
||||
bo_subject = '{$bo_subject}',
|
||||
bo_mobile_subject = '{$bo_mobile_subject}',
|
||||
bo_device = '{$bo_device}',
|
||||
bo_admin = '{$bo_admin}',
|
||||
bo_list_level = '{$bo_list_level}',
|
||||
bo_read_level = '{$bo_read_level}',
|
||||
bo_write_level = '{$bo_write_level}',
|
||||
bo_reply_level = '{$bo_reply_level}',
|
||||
bo_comment_level = '{$bo_comment_level}',
|
||||
bo_html_level = '{$bo_html_level}',
|
||||
bo_link_level = '{$bo_link_level}',
|
||||
bo_count_modify = '{$bo_count_modify}',
|
||||
bo_count_delete = '{$bo_count_delete}',
|
||||
bo_upload_level = '{$bo_upload_level}',
|
||||
bo_download_level = '{$bo_download_level}',
|
||||
bo_read_point = '{$bo_read_point}',
|
||||
bo_write_point = '{$bo_write_point}',
|
||||
bo_comment_point = '{$bo_comment_point}',
|
||||
bo_download_point = '{$bo_download_point}',
|
||||
bo_use_category = '{$bo_use_category}',
|
||||
bo_category_list = '{$str_bo_category_list}',
|
||||
bo_use_sideview = '{$bo_use_sideview}',
|
||||
bo_use_file_content = '{$bo_use_file_content}',
|
||||
bo_use_secret = '{$bo_use_secret}',
|
||||
bo_use_dhtml_editor = '{$bo_use_dhtml_editor}',
|
||||
bo_select_editor = '{$bo_select_editor}',
|
||||
bo_use_rss_view = '{$bo_use_rss_view}',
|
||||
bo_use_good = '{$bo_use_good}',
|
||||
bo_use_nogood = '{$bo_use_nogood}',
|
||||
bo_use_name = '{$bo_use_name}',
|
||||
bo_use_signature = '{$bo_use_signature}',
|
||||
bo_use_ip_view = '{$bo_use_ip_view}',
|
||||
bo_use_list_view = '{$bo_use_list_view}',
|
||||
bo_use_list_file = '{$bo_use_list_file}',
|
||||
bo_use_list_content = '{$bo_use_list_content}',
|
||||
bo_use_email = '{$bo_use_email}',
|
||||
bo_use_cert = '{$bo_use_cert}',
|
||||
bo_use_sns = '{$bo_use_sns}',
|
||||
bo_use_captcha = '{$bo_use_captcha}',
|
||||
bo_table_width = '{$bo_table_width}',
|
||||
bo_subject_len = '{$bo_subject_len}',
|
||||
bo_mobile_subject_len = '{$bo_mobile_subject_len}',
|
||||
bo_page_rows = '{$bo_page_rows}',
|
||||
bo_mobile_page_rows = '{$bo_mobile_page_rows}',
|
||||
bo_new = '{$bo_new}',
|
||||
bo_hot = '{$bo_hot}',
|
||||
bo_image_width = '{$bo_image_width}',
|
||||
bo_skin = '{$bo_skin}',
|
||||
bo_mobile_skin = '{$bo_mobile_skin}',
|
||||
";
|
||||
|
||||
// 최고 관리자인 경우에만 수정가능
|
||||
if ($is_admin === 'super'){
|
||||
$sql_common .= " bo_include_head = '".$bo_include_head."',
|
||||
bo_include_tail = '".$bo_include_tail."',
|
||||
bo_content_head = '{$bo_content_head}',
|
||||
bo_content_tail = '{$bo_content_tail}',
|
||||
bo_mobile_content_head = '{$bo_mobile_content_head}',
|
||||
bo_mobile_content_tail = '{$bo_mobile_content_tail}',
|
||||
";
|
||||
}
|
||||
|
||||
$sql_common .= " bo_insert_content = '{$bo_insert_content}',
|
||||
bo_gallery_cols = '{$bo_gallery_cols}',
|
||||
bo_gallery_width = '{$bo_gallery_width}',
|
||||
bo_gallery_height = '{$bo_gallery_height}',
|
||||
bo_mobile_gallery_width = '{$bo_mobile_gallery_width}',
|
||||
bo_mobile_gallery_height= '{$bo_mobile_gallery_height}',
|
||||
bo_upload_count = '{$bo_upload_count}',
|
||||
bo_upload_size = '{$bo_upload_size}',
|
||||
bo_reply_order = '{$bo_reply_order}',
|
||||
bo_use_search = '{$bo_use_search}',
|
||||
bo_order = '{$bo_order}',
|
||||
bo_write_min = '{$bo_write_min}',
|
||||
bo_write_max = '{$bo_write_max}',
|
||||
bo_comment_min = '{$bo_comment_min}',
|
||||
bo_comment_max = '{$bo_comment_max}',
|
||||
bo_sort_field = '{$bo_sort_field}',
|
||||
bo_1_subj = '{$bo_1_subj}',
|
||||
bo_2_subj = '{$bo_2_subj}',
|
||||
bo_3_subj = '{$bo_3_subj}',
|
||||
bo_4_subj = '{$bo_4_subj}',
|
||||
bo_5_subj = '{$bo_5_subj}',
|
||||
bo_6_subj = '{$bo_6_subj}',
|
||||
bo_7_subj = '{$bo_7_subj}',
|
||||
bo_8_subj = '{$bo_8_subj}',
|
||||
bo_9_subj = '{$bo_9_subj}',
|
||||
bo_10_subj = '{$bo_10_subj}',
|
||||
bo_1 = '{$bo_1}',
|
||||
bo_2 = '{$bo_2}',
|
||||
bo_3 = '{$bo_3}',
|
||||
bo_4 = '{$bo_4}',
|
||||
bo_5 = '{$bo_5}',
|
||||
bo_6 = '{$bo_6}',
|
||||
bo_7 = '{$bo_7}',
|
||||
bo_8 = '{$bo_8}',
|
||||
bo_9 = '{$bo_9}',
|
||||
bo_10 = '{$bo_10}' ";
|
||||
|
||||
if ($w == '') {
|
||||
|
||||
@@ -168,7 +274,9 @@ if ($w == '') {
|
||||
|
||||
// 게시판 테이블 생성
|
||||
$file = file('./sql_write.sql');
|
||||
$sql = implode($file, "\n");
|
||||
$file = get_db_create_replace($file);
|
||||
|
||||
$sql = implode("\n", $file);
|
||||
|
||||
$create_table = $g5['write_prefix'] . $bo_table;
|
||||
|
||||
@@ -258,13 +366,14 @@ if (is_checked('chk_grp_write_point')) $grp_fields .= " , bo_write_poin
|
||||
if (is_checked('chk_grp_comment_point')) $grp_fields .= " , bo_comment_point = '{$bo_comment_point}' ";
|
||||
if (is_checked('chk_grp_download_point')) $grp_fields .= " , bo_download_point = '{$bo_download_point}' ";
|
||||
if (is_checked('chk_grp_category_list')) {
|
||||
$grp_fields .= " , bo_category_list = '{$bo_category_list}' ";
|
||||
$grp_fields .= " , bo_category_list = '{$str_bo_category_list}' ";
|
||||
$grp_fields .= " , bo_use_category = '{$bo_use_category}' ";
|
||||
}
|
||||
if (is_checked('chk_grp_use_sideview')) $grp_fields .= " , bo_use_sideview = '{$bo_use_sideview}' ";
|
||||
if (is_checked('chk_grp_use_file_content')) $grp_fields .= " , bo_use_file_content = '{$bo_use_file_content}' ";
|
||||
if (is_checked('chk_grp_use_secret')) $grp_fields .= " , bo_use_secret = '{$bo_use_secret}' ";
|
||||
if (is_checked('chk_grp_use_dhtml_editor')) $grp_fields .= " , bo_use_dhtml_editor = '{$bo_use_dhtml_editor}' ";
|
||||
if (is_checked('chk_grp_select_editor')) $grp_fields .= " , bo_select_editor = '{$bo_select_editor}' ";
|
||||
if (is_checked('chk_grp_use_rss_view')) $grp_fields .= " , bo_use_rss_view = '{$bo_use_rss_view}' ";
|
||||
if (is_checked('chk_grp_use_good')) $grp_fields .= " , bo_use_good = '{$bo_use_good}' ";
|
||||
if (is_checked('chk_grp_use_nogood')) $grp_fields .= " , bo_use_nogood = '{$bo_use_nogood}' ";
|
||||
@@ -301,19 +410,24 @@ if (is_checked('chk_grp_comment_min')) $grp_fields .= " , bo_comment_mi
|
||||
if (is_checked('chk_grp_comment_max')) $grp_fields .= " , bo_comment_max = '{$bo_comment_max}' ";
|
||||
if (is_checked('chk_grp_upload_count')) $grp_fields .= " , bo_upload_count = '{$bo_upload_count}' ";
|
||||
if (is_checked('chk_grp_upload_size')) $grp_fields .= " , bo_upload_size = '{$bo_upload_size}' ";
|
||||
if (is_checked('chk_grp_include_head')) $grp_fields .= " , bo_include_head = '{$bo_include_head}' ";
|
||||
if (is_checked('chk_grp_include_tail')) $grp_fields .= " , bo_include_tail = '{$bo_include_tail}' ";
|
||||
if (is_checked('chk_grp_content_head')) $grp_fields .= " , bo_content_head = '{$bo_content_head}' ";
|
||||
if (is_checked('chk_grp_content_tail')) $grp_fields .= " , bo_content_tail = '{$bo_content_tail}' ";
|
||||
if (is_checked('chk_grp_mobile_content_head')) $grp_fields .= " , bo_mobile_content_head = '{$bo_mobile_content_head}' ";
|
||||
if (is_checked('chk_grp_mobile_content_tail')) $grp_fields .= " , bo_mobile_content_tail = '{$bo_mobile_content_tail}' ";
|
||||
|
||||
//최고관리자만 수정가능
|
||||
if ($is_admin === 'super'){
|
||||
if (is_checked('chk_grp_include_head')) $grp_fields .= " , bo_include_head = '{$bo_include_head}' ";
|
||||
if (is_checked('chk_grp_include_tail')) $grp_fields .= " , bo_include_tail = '{$bo_include_tail}' ";
|
||||
if (is_checked('chk_grp_content_head')) $grp_fields .= " , bo_content_head = '{$bo_content_head}' ";
|
||||
if (is_checked('chk_grp_content_tail')) $grp_fields .= " , bo_content_tail = '{$bo_content_tail}' ";
|
||||
if (is_checked('chk_grp_mobile_content_head')) $grp_fields .= " , bo_mobile_content_head = '{$bo_mobile_content_head}' ";
|
||||
if (is_checked('chk_grp_mobile_content_tail')) $grp_fields .= " , bo_mobile_content_tail = '{$bo_mobile_content_tail}' ";
|
||||
}
|
||||
|
||||
if (is_checked('chk_grp_insert_content')) $grp_fields .= " , bo_insert_content = '{$bo_insert_content}' ";
|
||||
if (is_checked('chk_grp_use_search')) $grp_fields .= " , bo_use_search = '{$bo_use_search}' ";
|
||||
if (is_checked('chk_grp_order')) $grp_fields .= " , bo_order = '{$bo_order}' ";
|
||||
for ($i=1; $i<=10; $i++) {
|
||||
if (is_checked('chk_grp_'.$i)) {
|
||||
$grp_fields .= " , bo_{$i}_subj = '".$_POST['bo_'.$i.'_subj']."' ";
|
||||
$grp_fields .= " , bo_{$i} = '".$_POST['bo_'.$i]."' ";
|
||||
$grp_fields .= " , bo_{$i}_subj = '".$etcs['bo_'.$i.'_subj']."' ";
|
||||
$grp_fields .= " , bo_{$i} = '".$etcs['bo_'.$i]."' ";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -342,13 +456,14 @@ if (is_checked('chk_all_write_point')) $all_fields .= " , bo_write_poin
|
||||
if (is_checked('chk_all_comment_point')) $all_fields .= " , bo_comment_point = '{$bo_comment_point}' ";
|
||||
if (is_checked('chk_all_download_point')) $all_fields .= " , bo_download_point = '{$bo_download_point}' ";
|
||||
if (is_checked('chk_all_category_list')) {
|
||||
$all_fields .= " , bo_category_list = '{$bo_category_list}' ";
|
||||
$all_fields .= " , bo_category_list = '{$str_bo_category_list}' ";
|
||||
$all_fields .= " , bo_use_category = '{$bo_use_category}' ";
|
||||
}
|
||||
if (is_checked('chk_all_use_sideview')) $all_fields .= " , bo_use_sideview = '{$bo_use_sideview}' ";
|
||||
if (is_checked('chk_all_use_file_content')) $all_fields .= " , bo_use_file_content = '{$bo_use_file_content}' ";
|
||||
if (is_checked('chk_all_use_secret')) $all_fields .= " , bo_use_secret = '{$bo_use_secret}' ";
|
||||
if (is_checked('chk_all_use_dhtml_editor')) $all_fields .= " , bo_use_dhtml_editor = '{$bo_use_dhtml_editor}' ";
|
||||
if (is_checked('chk_all_select_editor')) $all_fields .= " , bo_select_editor = '{$bo_select_editor}' ";
|
||||
if (is_checked('chk_all_use_rss_view')) $all_fields .= " , bo_use_rss_view = '{$bo_use_rss_view}' ";
|
||||
if (is_checked('chk_all_use_good')) $all_fields .= " , bo_use_good = '{$bo_use_good}' ";
|
||||
if (is_checked('chk_all_use_nogood')) $all_fields .= " , bo_use_nogood = '{$bo_use_nogood}' ";
|
||||
@@ -385,19 +500,24 @@ if (is_checked('chk_all_comment_min')) $all_fields .= " , bo_comment_mi
|
||||
if (is_checked('chk_all_comment_max')) $all_fields .= " , bo_comment_max = '{$bo_comment_max}' ";
|
||||
if (is_checked('chk_all_upload_count')) $all_fields .= " , bo_upload_count = '{$bo_upload_count}' ";
|
||||
if (is_checked('chk_all_upload_size')) $all_fields .= " , bo_upload_size = '{$bo_upload_size}' ";
|
||||
if (is_checked('chk_all_include_head')) $all_fields .= " , bo_include_head = '{$bo_include_head}' ";
|
||||
if (is_checked('chk_all_include_tail')) $all_fields .= " , bo_include_tail = '{$bo_include_tail}' ";
|
||||
if (is_checked('chk_all_content_head')) $all_fields .= " , bo_content_head = '{$bo_content_head}' ";
|
||||
if (is_checked('chk_all_content_tail')) $all_fields .= " , bo_content_tail = '{$bo_content_tail}' ";
|
||||
if (is_checked('chk_all_mobile_content_head')) $all_fields .= " , bo_mobile_content_head = '{$bo_mobile_content_head}' ";
|
||||
if (is_checked('chk_all_mobile_content_tail')) $all_fields .= " , bo_mobile_content_tail = '{$bo_mobile_content_tail}' ";
|
||||
|
||||
//최고관리자만 수정가능
|
||||
if ($is_admin === 'super'){
|
||||
if (is_checked('chk_all_include_head')) $all_fields .= " , bo_include_head = '{$bo_include_head}' ";
|
||||
if (is_checked('chk_all_include_tail')) $all_fields .= " , bo_include_tail = '{$bo_include_tail}' ";
|
||||
if (is_checked('chk_all_content_head')) $all_fields .= " , bo_content_head = '{$bo_content_head}' ";
|
||||
if (is_checked('chk_all_content_tail')) $all_fields .= " , bo_content_tail = '{$bo_content_tail}' ";
|
||||
if (is_checked('chk_all_mobile_content_head')) $all_fields .= " , bo_mobile_content_head = '{$bo_mobile_content_head}' ";
|
||||
if (is_checked('chk_all_mobile_content_tail')) $all_fields .= " , bo_mobile_content_tail = '{$bo_mobile_content_tail}' ";
|
||||
}
|
||||
|
||||
if (is_checked('chk_all_insert_content')) $all_fields .= " , bo_insert_content = '{$bo_insert_content}' ";
|
||||
if (is_checked('chk_all_use_search')) $all_fields .= " , bo_use_search = '{$bo_use_search}' ";
|
||||
if (is_checked('chk_all_order')) $all_fields .= " , bo_order = '{$bo_order}' ";
|
||||
for ($i=1; $i<=10; $i++) {
|
||||
if (is_checked('chk_all_'.$i)) {
|
||||
$all_fields .= " , bo_{$i}_subj = '".$_POST['bo_'.$i.'_subj']."' ";
|
||||
$all_fields .= " , bo_{$i} = '".$_POST['bo_'.$i]."' ";
|
||||
$all_fields .= " , bo_{$i}_subj = '".$etcs['bo_'.$i.'_subj']."' ";
|
||||
$all_fields .= " , bo_{$i} = '".$etcs['bo_'.$i]."' ";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -407,5 +527,9 @@ if ($all_fields) {
|
||||
|
||||
delete_cache_latest($bo_table);
|
||||
|
||||
goto_url("./board_form.php?w=u&bo_table={$bo_table}&{$qstr}");
|
||||
?>
|
||||
if(function_exists('get_admin_captcha_by'))
|
||||
get_admin_captcha_by('remove');
|
||||
|
||||
run_event('admin_board_form_update', $bo_table, $w);
|
||||
|
||||
goto_url("./board_form.php?w=u&bo_table={$bo_table}&{$qstr}");
|
||||
+7
-8
@@ -2,7 +2,7 @@
|
||||
$sub_menu = "300100";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
auth_check_menu($auth, $sub_menu, 'r');
|
||||
|
||||
$sql_common = " from {$g5['board_table']} a ";
|
||||
$sql_search = " where (1) ";
|
||||
@@ -63,9 +63,9 @@ $colspan = 15;
|
||||
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="sfl">
|
||||
<option value="bo_table"<?php echo get_selected($_GET['sfl'], "bo_table", true); ?>>TABLE</option>
|
||||
<option value="bo_subject"<?php echo get_selected($_GET['sfl'], "bo_subject"); ?>>제목</option>
|
||||
<option value="a.gr_id"<?php echo get_selected($_GET['sfl'], "a.gr_id"); ?>>그룹ID</option>
|
||||
<option value="bo_table"<?php echo get_selected($sfl, "bo_table", true); ?>>TABLE</option>
|
||||
<option value="bo_subject"<?php echo get_selected($sfl, "bo_subject"); ?>>제목</option>
|
||||
<option value="a.gr_id"<?php echo get_selected($sfl, "a.gr_id"); ?>>그룹ID</option>
|
||||
</select>
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||
@@ -81,7 +81,7 @@ $colspan = 15;
|
||||
<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="token" value="<?php echo $token ?>">
|
||||
<input type="hidden" name="token" value="<?php echo isset($token) ? $token : ''; ?>">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
@@ -131,7 +131,7 @@ $colspan = 15;
|
||||
</td>
|
||||
<td>
|
||||
<input type="hidden" name="board_table[<?php echo $i ?>]" value="<?php echo $row['bo_table'] ?>">
|
||||
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $row['bo_table'] ?>"><?php echo $row['bo_table'] ?></a>
|
||||
<a href="<?php echo get_pretty_url($row['bo_table']) ?>"><?php echo $row['bo_table'] ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<label for="bo_skin_<?php echo $i; ?>" class="sound_only">스킨</label>
|
||||
@@ -235,5 +235,4 @@ $(function(){
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
include_once('./admin.tail.php');
|
||||
+51
-29
@@ -4,22 +4,42 @@ include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
if (!count($_POST['chk'])) {
|
||||
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
|
||||
$post_count_chk = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
|
||||
$chk = (isset($_POST['chk']) && is_array($_POST['chk'])) ? $_POST['chk'] : array();
|
||||
$act_button = isset($_POST['act_button']) ? strip_tags($_POST['act_button']) : '';
|
||||
$board_table = (isset($_POST['board_table']) && is_array($_POST['board_table'])) ? $_POST['board_table'] : array();
|
||||
|
||||
if (! $post_count_chk) {
|
||||
alert($act_button." 하실 항목을 하나 이상 체크하세요.");
|
||||
}
|
||||
|
||||
if ($_POST['act_button'] == "선택수정") {
|
||||
check_admin_token();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
if ($act_button === "선택수정") {
|
||||
|
||||
for ($i=0; $i<count($_POST['chk']); $i++) {
|
||||
auth_check_menu($auth, $sub_menu, 'w');
|
||||
|
||||
for ($i=0; $i<$post_count_chk; $i++) {
|
||||
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
|
||||
|
||||
$post_gr_id = isset($_POST['gr_id'][$k]) ? clean_xss_tags($_POST['gr_id'][$k], 1, 1) : '';
|
||||
$post_bo_device = isset($_POST['bo_device'][$k]) ? clean_xss_tags($_POST['bo_device'][$k], 1, 1) : '';
|
||||
$post_bo_skin = isset($_POST['bo_skin'][$k]) ? clean_xss_tags($_POST['bo_skin'][$k], 1, 1) : '';
|
||||
$post_bo_mobile_skin = isset($_POST['bo_mobile_skin'][$k]) ? clean_xss_tags($_POST['bo_mobile_skin'][$k], 1, 1) : '';
|
||||
$post_bo_read_point = isset($_POST['bo_read_point'][$k]) ? clean_xss_tags($_POST['bo_read_point'][$k], 1, 1) : '';
|
||||
$post_bo_write_point = isset($_POST['bo_write_point'][$k]) ? clean_xss_tags($_POST['bo_write_point'][$k], 1, 1) : '';
|
||||
$post_bo_comment_point = isset($_POST['bo_comment_point'][$k]) ? clean_xss_tags($_POST['bo_comment_point'][$k], 1, 1) : '';
|
||||
$post_bo_download_point = isset($_POST['bo_download_point'][$k]) ? clean_xss_tags($_POST['bo_download_point'][$k], 1, 1) : '';
|
||||
$post_bo_use_search = isset($_POST['bo_use_search'][$k]) ? clean_xss_tags($_POST['bo_use_search'][$k], 1, 1) : '';
|
||||
$post_bo_use_sns = isset($_POST['bo_use_sns'][$k]) ? clean_xss_tags($_POST['bo_use_sns'][$k], 1, 1) : '';
|
||||
$post_bo_order = isset($_POST['bo_order'][$k]) ? clean_xss_tags($_POST['bo_order'][$k], 1, 1) : '';
|
||||
$post_board_table = isset($_POST['board_table'][$k]) ? clean_xss_tags($_POST['board_table'][$k], 1, 1) : '';
|
||||
|
||||
if ($is_admin != 'super') {
|
||||
$sql = " select count(*) as cnt from {$g5['board_table']} a, {$g5['group_table']} b
|
||||
where a.gr_id = '{$_POST['gr_id'][$k]}'
|
||||
where a.gr_id = '".sql_real_escape_string($post_gr_id)."'
|
||||
and a.gr_id = b.gr_id
|
||||
and b.gr_admin = '{$member['mb_id']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
@@ -27,41 +47,42 @@ if ($_POST['act_button'] == "선택수정") {
|
||||
alert('최고관리자가 아닌 경우 다른 관리자의 게시판('.$board_table[$k].')은 수정이 불가합니다.');
|
||||
}
|
||||
|
||||
$p_bo_subject = is_array($_POST['bo_subject']) ? strip_tags(clean_xss_attributes($_POST['bo_subject'][$k])) : '';
|
||||
|
||||
$sql = " update {$g5['board_table']}
|
||||
set gr_id = '{$_POST['gr_id'][$k]}',
|
||||
bo_subject = '{$_POST['bo_subject'][$k]}',
|
||||
bo_device = '{$_POST['bo_device'][$k]}',
|
||||
bo_skin = '{$_POST['bo_skin'][$k]}',
|
||||
bo_mobile_skin = '{$_POST['bo_mobile_skin'][$k]}',
|
||||
bo_read_point = '{$_POST['bo_read_point'][$k]}',
|
||||
bo_write_point = '{$_POST['bo_write_point'][$k]}',
|
||||
bo_comment_point = '{$_POST['bo_comment_point'][$k]}',
|
||||
bo_download_point = '{$_POST['bo_download_point'][$k]}',
|
||||
bo_use_search = '{$_POST['bo_use_search'][$k]}',
|
||||
bo_use_sns = '{$_POST['bo_use_sns'][$k]}',
|
||||
bo_order = '{$_POST['bo_order'][$k]}'
|
||||
where bo_table = '{$_POST['board_table'][$k]}' ";
|
||||
set gr_id = '".sql_real_escape_string($post_gr_id)."',
|
||||
bo_subject = '".$p_bo_subject."',
|
||||
bo_device = '".sql_real_escape_string($post_bo_device)."',
|
||||
bo_skin = '".sql_real_escape_string($post_bo_skin)."',
|
||||
bo_mobile_skin = '".sql_real_escape_string($post_bo_mobile_skin)."',
|
||||
bo_read_point = '".sql_real_escape_string($post_bo_read_point)."',
|
||||
bo_write_point = '".sql_real_escape_string($post_bo_write_point)."',
|
||||
bo_comment_point = '".sql_real_escape_string($post_bo_comment_point)."',
|
||||
bo_download_point = '".sql_real_escape_string($post_bo_download_point)."',
|
||||
bo_use_search = '".sql_real_escape_string($post_bo_use_search)."',
|
||||
bo_use_sns = '".sql_real_escape_string($post_bo_use_sns)."',
|
||||
bo_order = '".sql_real_escape_string($post_bo_order)."'
|
||||
where bo_table = '".sql_real_escape_string($post_board_table)."' ";
|
||||
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
} else if ($_POST['act_button'] == "선택삭제") {
|
||||
} else if ($act_button === "선택삭제") {
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('게시판 삭제는 최고관리자만 가능합니다.');
|
||||
|
||||
auth_check($auth[$sub_menu], 'd');
|
||||
|
||||
check_admin_token();
|
||||
auth_check_menu($auth, $sub_menu, 'd');
|
||||
|
||||
// _BOARD_DELETE_ 상수를 선언해야 board_delete.inc.php 가 정상 작동함
|
||||
define('_BOARD_DELETE_', true);
|
||||
|
||||
for ($i=0; $i<count($_POST['chk']); $i++) {
|
||||
for ($i=0; $i<$post_count_chk; $i++) {
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
|
||||
|
||||
// include 전에 $bo_table 값을 반드시 넘겨야 함
|
||||
$tmp_bo_table = trim($_POST['board_table'][$k]);
|
||||
$tmp_bo_table = isset($_POST['board_table'][$k]) ? trim(clean_xss_tags($_POST['board_table'][$k], 1, 1)) : '';
|
||||
|
||||
if( preg_match("/^[A-Za-z0-9_]+$/", $tmp_bo_table) ){
|
||||
include ('./board_delete.inc.php');
|
||||
@@ -71,5 +92,6 @@ if ($_POST['act_button'] == "선택수정") {
|
||||
|
||||
}
|
||||
|
||||
goto_url('./board_list.php?'.$qstr);
|
||||
?>
|
||||
run_event('admin_board_list_update', $act_button, $chk, $board_table, $qstr);
|
||||
|
||||
goto_url('./board_list.php?'.$qstr);
|
||||
@@ -2,7 +2,7 @@
|
||||
$sub_menu = '300100';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
auth_check_menu($auth, $sub_menu, 'w');
|
||||
|
||||
if(!$board['bo_table'])
|
||||
alert('존재하지 않는 게시판입니다.');
|
||||
@@ -48,5 +48,4 @@ if(is_dir($dir)) {
|
||||
<div class="btn_confirm01 btn_confirm"><a href="./board_form.php?w=u&bo_table=<?php echo $bo_table; ?>&<?php echo $qstr; ?>">게시판 수정으로 돌아가기</a></div>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
include_once('./admin.tail.php');
|
||||
+12
-6
@@ -2,17 +2,24 @@
|
||||
$sub_menu = "300200";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
auth_check_menu($auth, $sub_menu, 'w');
|
||||
|
||||
if ($is_admin != 'super' && $w == '') alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
$html_title = '게시판그룹';
|
||||
$gr_id_attr = '';
|
||||
$sound_only = '';
|
||||
|
||||
if( ! isset($group['gr_id']) ){
|
||||
$group['gr_id'] = '';
|
||||
$group['gr_subject'] = '';
|
||||
$group['gr_device'] = '';
|
||||
}
|
||||
|
||||
if ($w == '') {
|
||||
$gr_id_attr = 'required';
|
||||
$sound_only = '<strong class="sound_only"> 필수</strong>';
|
||||
$gr['gr_use_access'] = 0;
|
||||
$gr = array('gr_use_access' => 0, 'gr_admin'=>'');
|
||||
$html_title .= ' 생성';
|
||||
} else if ($w == 'u') {
|
||||
$gr_id_attr = 'readonly';
|
||||
@@ -115,9 +122,9 @@ include_once('./admin.head.php');
|
||||
<th scope="row">여분필드<?php echo $i ?></th>
|
||||
<td class="td_extra">
|
||||
<label for="gr_<?php echo $i ?>_subj">여분필드 <?php echo $i ?> 제목</label>
|
||||
<input type="text" name="gr_<?php echo $i ?>_subj" value="<?php echo get_text($group['gr_'.$i.'_subj']) ?>" id="gr_<?php echo $i ?>_subj" class="frm_input">
|
||||
<input type="text" name="gr_<?php echo $i ?>_subj" value="<?php echo isset($group['gr_'.$i.'_subj']) ? get_text($group['gr_'.$i.'_subj']) : ''; ?>" id="gr_<?php echo $i ?>_subj" class="frm_input">
|
||||
<label for="gr_<?php echo $i ?>">여분필드 <?php echo $i ?> 내용</label>
|
||||
<input type="text" name="gr_<?php echo $i ?>" value="<?php echo $gr['gr_'.$i] ?>" id="gr_<?php echo $i ?>" class="frm_input">
|
||||
<input type="text" name="gr_<?php echo $i ?>" value="<?php echo isset($gr['gr_'.$i]) ? get_sanitize_input($gr['gr_'.$i]) : ''; ?>" id="gr_<?php echo $i ?>" class="frm_input">
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
@@ -148,5 +155,4 @@ function fboardgroup_check(f)
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
include_once ('./admin.tail.php');
|
||||
@@ -5,40 +5,63 @@ include_once('./_common.php');
|
||||
if ($w == 'u')
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
auth_check_menu($auth, $sub_menu, 'w');
|
||||
|
||||
if ($is_admin != 'super' && $w == '') alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
if (!preg_match("/^([A-Za-z0-9_]{1,10})$/", $_POST['gr_id']))
|
||||
$gr_id = isset($_POST['gr_id']) ? $_POST['gr_id'] : '';
|
||||
|
||||
if (!preg_match("/^([A-Za-z0-9_]{1,10})$/", $gr_id))
|
||||
alert('그룹 ID는 공백없이 영문자, 숫자, _ 만 사용 가능합니다. (10자 이내)');
|
||||
|
||||
if (!$gr_subject) alert('그룹 제목을 입력하세요.');
|
||||
|
||||
$sql_common = " gr_subject = '{$_POST['gr_subject']}',
|
||||
gr_device = '{$_POST['gr_device']}',
|
||||
gr_admin = '{$_POST['gr_admin']}',
|
||||
gr_1_subj = '{$_POST['gr_1_subj']}',
|
||||
gr_2_subj = '{$_POST['gr_2_subj']}',
|
||||
gr_3_subj = '{$_POST['gr_3_subj']}',
|
||||
gr_4_subj = '{$_POST['gr_4_subj']}',
|
||||
gr_5_subj = '{$_POST['gr_5_subj']}',
|
||||
gr_6_subj = '{$_POST['gr_6_subj']}',
|
||||
gr_7_subj = '{$_POST['gr_7_subj']}',
|
||||
gr_8_subj = '{$_POST['gr_8_subj']}',
|
||||
gr_9_subj = '{$_POST['gr_9_subj']}',
|
||||
gr_10_subj = '{$_POST['gr_10_subj']}',
|
||||
gr_1 = '{$_POST['gr_1']}',
|
||||
gr_2 = '{$_POST['gr_2']}',
|
||||
gr_3 = '{$_POST['gr_3']}',
|
||||
gr_4 = '{$_POST['gr_4']}',
|
||||
gr_5 = '{$_POST['gr_5']}',
|
||||
gr_6 = '{$_POST['gr_6']}',
|
||||
gr_7 = '{$_POST['gr_7']}',
|
||||
gr_8 = '{$_POST['gr_8']}',
|
||||
gr_9 = '{$_POST['gr_9']}',
|
||||
gr_10 = '{$_POST['gr_10']}' ";
|
||||
$posts = array();
|
||||
|
||||
$check_keys = array(
|
||||
'gr_subject'=>'',
|
||||
'gr_device'=>'',
|
||||
'gr_admin'=>'',
|
||||
);
|
||||
|
||||
for($i=1;$i<=10;$i++){
|
||||
$check_keys['gr_'.$i.'_subj'] = isset($_POST['gr_'.$i.'_subj']) ? $_POST['gr_'.$i.'_subj'] : '';
|
||||
$check_keys['gr_'.$i] = isset($_POST['gr_'.$i]) ? $_POST['gr_'.$i] : '';
|
||||
}
|
||||
|
||||
foreach( $check_keys as $key=>$value ){
|
||||
if( $key === 'gr_subject' ){
|
||||
$posts[$key] = isset($_POST[$key]) ? strip_tags(clean_xss_attributes($_POST[$key])) : '';
|
||||
} else {
|
||||
$posts[$key] = isset($_POST[$key]) ? $_POST[$key] : '';
|
||||
}
|
||||
}
|
||||
|
||||
$sql_common = " gr_subject = '{$posts['gr_subject']}',
|
||||
gr_device = '{$posts['gr_device']}',
|
||||
gr_admin = '{$posts['gr_admin']}',
|
||||
gr_1_subj = '{$posts['gr_1_subj']}',
|
||||
gr_2_subj = '{$posts['gr_2_subj']}',
|
||||
gr_3_subj = '{$posts['gr_3_subj']}',
|
||||
gr_4_subj = '{$posts['gr_4_subj']}',
|
||||
gr_5_subj = '{$posts['gr_5_subj']}',
|
||||
gr_6_subj = '{$posts['gr_6_subj']}',
|
||||
gr_7_subj = '{$posts['gr_7_subj']}',
|
||||
gr_8_subj = '{$posts['gr_8_subj']}',
|
||||
gr_9_subj = '{$posts['gr_9_subj']}',
|
||||
gr_10_subj = '{$posts['gr_10_subj']}',
|
||||
gr_1 = '{$posts['gr_1']}',
|
||||
gr_2 = '{$posts['gr_2']}',
|
||||
gr_3 = '{$posts['gr_3']}',
|
||||
gr_4 = '{$posts['gr_4']}',
|
||||
gr_5 = '{$posts['gr_5']}',
|
||||
gr_6 = '{$posts['gr_6']}',
|
||||
gr_7 = '{$posts['gr_7']}',
|
||||
gr_8 = '{$posts['gr_8']}',
|
||||
gr_9 = '{$posts['gr_9']}',
|
||||
gr_10 = '{$posts['gr_10']}' ";
|
||||
if (isset($_POST['gr_use_access']))
|
||||
$sql_common .= ", gr_use_access = '{$_POST['gr_use_access']}' ";
|
||||
else
|
||||
@@ -46,13 +69,13 @@ else
|
||||
|
||||
if ($w == '') {
|
||||
|
||||
$sql = " select count(*) as cnt from {$g5['group_table']} where gr_id = '{$_POST['gr_id']}' ";
|
||||
$sql = " select count(*) as cnt from {$g5['group_table']} where gr_id = '{$gr_id}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['cnt'])
|
||||
alert('이미 존재하는 그룹 ID 입니다.');
|
||||
|
||||
$sql = " insert into {$g5['group_table']}
|
||||
set gr_id = '{$_POST['gr_id']}',
|
||||
set gr_id = '{$gr_id}',
|
||||
{$sql_common} ";
|
||||
sql_query($sql);
|
||||
|
||||
@@ -60,12 +83,13 @@ if ($w == '') {
|
||||
|
||||
$sql = " update {$g5['group_table']}
|
||||
set {$sql_common}
|
||||
where gr_id = '{$_POST['gr_id']}' ";
|
||||
where gr_id = '{$gr_id}' ";
|
||||
sql_query($sql);
|
||||
|
||||
} else {
|
||||
alert('제대로 된 값이 넘어오지 않았습니다.');
|
||||
}
|
||||
|
||||
goto_url('./boardgroup_form.php?w=u&gr_id='.$gr_id.'&'.$qstr);
|
||||
?>
|
||||
run_event('admin_boardgroup_form_update', $gr_id, $w);
|
||||
|
||||
goto_url('./boardgroup_form.php?w=u&gr_id='.$gr_id.'&'.$qstr);
|
||||
+9
-10
@@ -2,7 +2,7 @@
|
||||
$sub_menu = "300200";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
auth_check_menu($auth, $sub_menu, 'r');
|
||||
|
||||
if (!isset($group['gr_device'])) {
|
||||
// 게시판 그룹 사용 필드 추가
|
||||
@@ -10,7 +10,7 @@ if (!isset($group['gr_device'])) {
|
||||
// pc : pc 전용 사용
|
||||
// mobile : mobile 전용 사용
|
||||
// none : 사용 안함
|
||||
sql_query(" ALTER TABLE `{$g5['board_group_table']}` ADD `gr_device` ENUM( 'both', 'pc', 'mobile' ) NOT NULL DEFAULT 'both' AFTER `gr_subject` ", false);
|
||||
sql_query(" ALTER TABLE `{$g5['group_table']}` ADD `gr_device` ENUM( 'both', 'pc', 'mobile' ) NOT NULL DEFAULT 'both' AFTER `gr_subject` ", false);
|
||||
}
|
||||
|
||||
$sql_common = " from {$g5['group_table']} ";
|
||||
@@ -66,9 +66,9 @@ $colspan = 10;
|
||||
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="sfl">
|
||||
<option value="gr_subject"<?php echo get_selected($_GET['sfl'], "gr_subject"); ?>>제목</option>
|
||||
<option value="gr_id"<?php echo get_selected($_GET['sfl'], "gr_id"); ?>>ID</option>
|
||||
<option value="gr_admin"<?php echo get_selected($_GET['sfl'], "gr_admin"); ?>>그룹관리자</option>
|
||||
<option value="gr_subject"<?php echo get_selected($sfl, "gr_subject"); ?>>제목</option>
|
||||
<option value="gr_id"<?php echo get_selected($sfl, "gr_id"); ?>>ID</option>
|
||||
<option value="gr_admin"<?php echo get_selected($sfl, "gr_admin"); ?>>그룹관리자</option>
|
||||
</select>
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" id="stx" value="<?php echo $stx ?>" required class="required frm_input">
|
||||
@@ -124,7 +124,7 @@ $colspan = 10;
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_chk">
|
||||
<input type="hidden" name="group_id[<?php echo $i ?>]" value="<?php echo $row['gr_id'] ?>">
|
||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['gr_subject'] ?> 그룹</label>
|
||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($row['gr_subject']); ?> 그룹</label>
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||
</td>
|
||||
<td class="td_left"><a href="<?php echo G5_BBS_URL ?>/group.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo $row['gr_id'] ?></a></td>
|
||||
@@ -135,9 +135,9 @@ $colspan = 10;
|
||||
<td class="td_mng td_input">
|
||||
<?php if ($is_admin == 'super'){ ?>
|
||||
<label for="gr_admin_<?php echo $i; ?>" class="sound_only">그룹관리자</label>
|
||||
<input type="text" name="gr_admin[<?php echo $i ?>]" value="<?php echo $row['gr_admin'] ?>" id="gr_admin_<?php echo $i ?>" class="tbl_input" size="10" maxlength="20">
|
||||
<input type="text" name="gr_admin[<?php echo $i ?>]" value="<?php echo get_sanitize_input($row['gr_admin']); ?>" id="gr_admin_<?php echo $i ?>" class="tbl_input" size="10" maxlength="20">
|
||||
<?php }else{ ?>
|
||||
<input type="hidden" name="gr_admin[<?php echo $i ?>]" value="<?php echo $row['gr_admin'] ?>"><?php echo $row['gr_admin'] ?>
|
||||
<input type="hidden" name="gr_admin[<?php echo $i ?>]" value="<?php echo get_sanitize_input($row['gr_admin']); ?>"><?php echo get_text($row['gr_admin']); ?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td class="td_num"><a href="./board_list.php?sfl=a.gr_id&stx=<?php echo $row['gr_id'] ?>"><?php echo $row2['cnt'] ?></a></td>
|
||||
@@ -207,5 +207,4 @@ function fboardgrouplist_submit(f)
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
include_once('./admin.tail.php');
|
||||
@@ -6,32 +6,41 @@ include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
auth_check_menu($auth, $sub_menu, 'w');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$count = count($_POST['chk']);
|
||||
$post_chk = isset($_POST['chk']) ? (array) $_POST['chk'] : array();
|
||||
$post_group_id = isset($_POST['group_id']) ? (array) $_POST['group_id'] : array();
|
||||
$act_button = isset($_POST['act_button']) ? $_POST['act_button'] : '';
|
||||
|
||||
$count = count($post_chk);
|
||||
|
||||
if(!$count)
|
||||
alert($_POST['act_button'].'할 게시판그룹을 1개이상 선택해 주세요.');
|
||||
alert($act_button.'할 게시판그룹을 1개이상 선택해 주세요.');
|
||||
|
||||
for ($i=0; $i<$count; $i++)
|
||||
{
|
||||
$k = $_POST['chk'][$i];
|
||||
$gr_id = $_POST['group_id'][$k];
|
||||
$k = isset($post_chk[$i]) ? (int) $post_chk[$i] : 0;
|
||||
$gr_id = preg_replace('/[^a-z0-9_]/i', '', $post_group_id[$k]);
|
||||
$gr_subject = isset($_POST['gr_subject'][$k]) ? strip_tags(clean_xss_attributes($_POST['gr_subject'][$k])) : '';
|
||||
$gr_admin = isset($_POST['gr_admin'][$k]) ? strip_tags(clean_xss_attributes($_POST['gr_admin'][$k])) : '';
|
||||
$gr_device = isset($_POST['gr_device'][$k]) ? clean_xss_tags($_POST['gr_device'][$k], 1, 1, 10) : '';
|
||||
$gr_use_access = isset($_POST['gr_use_access'][$k]) ? (int) $_POST['gr_use_access'][$k] : 0;
|
||||
$gr_order = isset($_POST['gr_order'][$k]) ? (int) $_POST['gr_order'][$k] : 0;
|
||||
|
||||
if($_POST['act_button'] == '선택수정') {
|
||||
if($act_button == '선택수정') {
|
||||
$sql = " update {$g5['group_table']}
|
||||
set gr_subject = '{$_POST['gr_subject'][$k]}',
|
||||
gr_device = '{$_POST['gr_device'][$k]}',
|
||||
gr_admin = '{$_POST['gr_admin'][$k]}',
|
||||
gr_use_access = '{$_POST['gr_use_access'][$k]}',
|
||||
gr_order = '{$_POST['gr_order'][$k]}'
|
||||
set gr_subject = '{$gr_subject}',
|
||||
gr_device = '".sql_real_escape_string($gr_device)."',
|
||||
gr_admin = '".sql_real_escape_string($gr_admin)."',
|
||||
gr_use_access = '".$gr_use_access."',
|
||||
gr_order = '".$gr_order."'
|
||||
where gr_id = '{$gr_id}' ";
|
||||
if ($is_admin != 'super')
|
||||
$sql .= " and gr_admin = '{$_POST['gr_admin'][$k]}' ";
|
||||
$sql .= " and gr_admin = '{$gr_admin}' ";
|
||||
sql_query($sql);
|
||||
} else if($_POST['act_button'] == '선택삭제') {
|
||||
} else if($act_button == '선택삭제') {
|
||||
$row = sql_fetch(" select count(*) as cnt from {$g5['board_table']} where gr_id = '$gr_id' ");
|
||||
if ($row['cnt'])
|
||||
alert("이 그룹에 속한 게시판이 존재하여 게시판 그룹을 삭제할 수 없습니다.\\n\\n이 그룹에 속한 게시판을 먼저 삭제하여 주십시오.", './board_list.php?sfl=gr_id&stx='.$gr_id);
|
||||
@@ -44,5 +53,6 @@ for ($i=0; $i<$count; $i++)
|
||||
}
|
||||
}
|
||||
|
||||
goto_url('./boardgroup_list.php?'.$qstr);
|
||||
?>
|
||||
run_event('admin_boardgroup_list_update', $act_button, $chk, $post_group_id, $qstr);
|
||||
|
||||
goto_url('./boardgroup_list.php?'.$qstr);
|
||||
@@ -2,10 +2,12 @@
|
||||
$sub_menu = "300200";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
auth_check_menu($auth, $sub_menu, 'w');
|
||||
|
||||
$mb = get_member($mb_id);
|
||||
if (!$mb['mb_id'])
|
||||
$token = isset($token) ? $token : '';
|
||||
|
||||
if (! (isset($mb['mb_id']) && $mb['mb_id']))
|
||||
alert('존재하지 않는 회원입니다.');
|
||||
|
||||
$g5['title'] = '접근가능그룹';
|
||||
@@ -51,7 +53,7 @@ $colspan = 4;
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>" id="sfl">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>" id="stx">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>" id="page">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>" id="token">
|
||||
<input type="hidden" name="token" value="<?php echo get_sanitize_input($token); ?>" id="token">
|
||||
<input type="hidden" name="mb_id" value="<?php echo $mb['mb_id'] ?>" id="mb_id">
|
||||
<input type="hidden" name="w" value="d" id="w">
|
||||
|
||||
@@ -128,5 +130,4 @@ function boardgroupmember_form_check(f)
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
include_once('./admin.tail.php');
|
||||
@@ -2,7 +2,7 @@
|
||||
$sub_menu = "300200";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
auth_check_menu($auth, $sub_menu, 'r');
|
||||
|
||||
$gr = get_group($gr_id);
|
||||
if (!$gr['gr_id']) {
|
||||
@@ -59,7 +59,7 @@ $colspan = 7;
|
||||
<input type="hidden" name="gr_id" value="<?php echo $gr_id ?>">
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="sfl">
|
||||
<option value="a.mb_id"<?php echo get_selected($_GET['sfl'], "a.mb_id") ?>>회원아이디</option>
|
||||
<option value="a.mb_id"<?php echo get_selected($sfl, "a.mb_id") ?>>회원아이디</option>
|
||||
</select>
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||
@@ -152,5 +152,4 @@ function fboardgroupmember_submit(f)
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
include_once('./admin.tail.php');
|
||||
@@ -6,7 +6,7 @@ sql_query(" ALTER TABLE {$g5['group_member_table']} CHANGE `gm_id` `gm_id` INT(
|
||||
|
||||
if ($w == '')
|
||||
{
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
auth_check_menu($auth, $sub_menu, 'w');
|
||||
|
||||
$mb = get_member($mb_id);
|
||||
if (!$mb['mb_id']) {
|
||||
@@ -39,7 +39,7 @@ if ($w == '')
|
||||
}
|
||||
else if ($w == 'd' || $w == 'ld')
|
||||
{
|
||||
auth_check($auth[$sub_menu], 'd');
|
||||
auth_check_menu($auth, $sub_menu, 'd');
|
||||
|
||||
$count = count($_POST['chk']);
|
||||
if(!$count)
|
||||
@@ -48,7 +48,7 @@ else if ($w == 'd' || $w == 'ld')
|
||||
check_admin_token();
|
||||
|
||||
for($i=0; $i<$count; $i++) {
|
||||
$gm_id = $_POST['chk'][$i];
|
||||
$gm_id = (int) $_POST['chk'][$i];
|
||||
$sql = " select * from {$g5['group_member_table']} where gm_id = '$gm_id' ";
|
||||
$gm = sql_fetch($sql);
|
||||
if (!$gm['gm_id']) {
|
||||
@@ -66,5 +66,4 @@ else if ($w == 'd' || $w == 'ld')
|
||||
if ($w == 'ld')
|
||||
goto_url('./boardgroupmember_list.php?gr_id='.$gr_id);
|
||||
else
|
||||
goto_url('./boardgroupmember_form.php?mb_id='.$mb_id);
|
||||
?>
|
||||
goto_url('./boardgroupmember_form.php?mb_id='.$mb_id);
|
||||
+2
-3
@@ -3,7 +3,7 @@ $sub_menu = "100510";
|
||||
include_once('./_common.php');
|
||||
|
||||
if(!(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') && G5_BROWSCAP_USE))
|
||||
alert('사용할 수 없는 기능입니다.', G5_ADMIN_URL);
|
||||
alert('사용할 수 없는 기능입니다.', correct_goto_url(G5_ADMIN_URL));
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
@@ -41,5 +41,4 @@ $(function() {
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
include_once('./admin.tail.php');
|
||||
@@ -3,12 +3,12 @@ $sub_menu = "100520";
|
||||
include_once('./_common.php');
|
||||
|
||||
if(!(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') && G5_BROWSCAP_USE))
|
||||
alert('사용할 수 없는 기능입니다.', G5_ADMIN_URL);
|
||||
alert('사용할 수 없는 기능입니다.', correct_goto_url(G5_ADMIN_URL));
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
$rows = preg_replace('#[^0-9]#', '', $_GET['rows']);
|
||||
$rows = isset($_GET['rows']) ? preg_replace('#[^0-9]#', '', $_GET['rows']) : 0;
|
||||
if(!$rows)
|
||||
$rows = 100;
|
||||
|
||||
@@ -42,5 +42,4 @@ $(function() {
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
include_once('./admin.tail.php');
|
||||
@@ -71,5 +71,4 @@ for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
if(($total_count - $cnt) == 0 || $total_count == 0)
|
||||
echo '<div class="check_processing"></div><p>변환완료</p>';
|
||||
else
|
||||
echo '<p>총 '.number_format($total_count).'건 중 '.number_format($cnt).'건 변환완료<br><br>접속로그를 추가로 변환하시려면 아래 업데이트 버튼을 클릭해 주세요.</p><button type="button" id="run_update">업데이트</button>';
|
||||
?>
|
||||
echo '<p>총 '.number_format($total_count).'건 중 '.number_format($cnt).'건 변환완료<br><br>접속로그를 추가로 변환하시려면 아래 업데이트 버튼을 클릭해 주세요.</p><button type="button" id="run_update">업데이트</button>';
|
||||
@@ -20,5 +20,4 @@ $browscap->updateMethod = 'cURL';
|
||||
$browscap->cacheFilename = 'browscap_cache.php';
|
||||
$browscap->updateCache();
|
||||
|
||||
die('');
|
||||
?>
|
||||
die('');
|
||||
@@ -5,6 +5,13 @@ include_once('./_common.php');
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.', G5_URL);
|
||||
|
||||
@include_once('./safe_check.php');
|
||||
if(function_exists('social_log_file_delete')){
|
||||
social_log_file_delete();
|
||||
}
|
||||
|
||||
run_event('adm_cache_file_delete_before');
|
||||
|
||||
$g5['title'] = '캐시파일 일괄삭제';
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
@@ -26,6 +33,9 @@ $cnt=0;
|
||||
echo '<ul class="session_del">'.PHP_EOL;
|
||||
|
||||
$files = glob(G5_DATA_PATH.'/cache/latest-*');
|
||||
$content_files = glob(G5_DATA_PATH.'/cache/content-*');
|
||||
|
||||
$files = array_merge($files, $content_files);
|
||||
if (is_array($files)) {
|
||||
foreach ($files as $cache_file) {
|
||||
$cnt++;
|
||||
@@ -39,10 +49,11 @@ if (is_array($files)) {
|
||||
}
|
||||
}
|
||||
|
||||
run_event('adm_cache_file_delete');
|
||||
|
||||
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('./admin.tail.php');
|
||||
?>
|
||||
include_once('./admin.tail.php');
|
||||
@@ -49,5 +49,4 @@ echo '<div class="local_desc01 local_desc"><p><strong>캡챠파일 '.$cnt.'건
|
||||
?>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
include_once('./admin.tail.php');
|
||||
+135
-57
@@ -2,7 +2,7 @@
|
||||
$sub_menu = "100100";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
auth_check_menu($auth, $sub_menu, 'r');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
@@ -253,6 +253,31 @@ if(!sql_query(" DESC {$g5['social_profile_table']} ", false)) {
|
||||
) ", true);
|
||||
}
|
||||
|
||||
// 짧은 URL 주소를 사용 여부 필드 추가
|
||||
if (!isset($config['cf_bbs_rewrite'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_bbs_rewrite` tinyint(4) NOT NULL DEFAULT '0' AFTER `cf_link_target` ", true);
|
||||
}
|
||||
|
||||
// 읽지 않은 메모 수 칼럼 추가
|
||||
if(!isset($member['mb_memo_cnt'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['member_table']}`
|
||||
ADD `mb_memo_cnt` int(11) NOT NULL DEFAULT '0' AFTER `mb_memo_call`", true);
|
||||
}
|
||||
|
||||
// 스크랩 읽은 수 추가
|
||||
if(!isset($member['mb_scrap_cnt'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['member_table']}`
|
||||
ADD `mb_scrap_cnt` int(11) NOT NULL DEFAULT '0' AFTER `mb_memo_cnt`", true);
|
||||
}
|
||||
|
||||
// 아이코드 토큰키 추가
|
||||
if( ! isset($config['cf_icode_token_key']) ){
|
||||
$sql = "ALTER TABLE `{$g5['config_table']}`
|
||||
ADD COLUMN `cf_icode_token_key` VARCHAR(100) NOT NULL DEFAULT '' AFTER `cf_icode_server_port`; ";
|
||||
sql_query($sql, false);
|
||||
}
|
||||
|
||||
if(!$config['cf_faq_skin']) $config['cf_faq_skin'] = "basic";
|
||||
if(!$config['cf_mobile_faq_skin']) $config['cf_mobile_faq_skin'] = "basic";
|
||||
|
||||
@@ -264,6 +289,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<li><a href="#anc_cf_board">게시판기본</a></li>
|
||||
<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>
|
||||
@@ -278,6 +304,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
if (!$config['cf_icode_server_ip']) $config['cf_icode_server_ip'] = '211.172.232.124';
|
||||
if (!$config['cf_icode_server_port']) $config['cf_icode_server_port'] = '7295';
|
||||
|
||||
$userinfo = array('payment'=>'');
|
||||
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']);
|
||||
}
|
||||
@@ -302,7 +329,7 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_title">홈페이지 제목<strong class="sound_only">필수</strong></label></th>
|
||||
<td colspan="3"><input type="text" name="cf_title" value="<?php echo $config['cf_title'] ?>" id="cf_title" required class="required frm_input" size="40"></td>
|
||||
<td colspan="3"><input type="text" name="cf_title" value="<?php echo get_sanitize_input($config['cf_title']); ?>" id="cf_title" required class="required frm_input" size="40"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_admin">최고관리자<strong class="sound_only">필수</strong></label></th>
|
||||
@@ -486,17 +513,15 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" rowspan="2"><label for="cf_recaptcha_site_key">구글 reCAPTCHA Site key</label></th>
|
||||
<td colspan="3" style="border-bottom:none 0">
|
||||
<th scope="row"><label for="cf_recaptcha_site_key">구글 reCAPTCHA Site key</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('reCAPTCHA V2와 Invisible reCAPTCHA 캡챠의 sitekey 와 secret 키는 동일하지 않고, 서로 발급받는 키가 다릅니다.') ?>
|
||||
<input type="text" name="cf_recaptcha_site_key" value="<?php echo $config['cf_recaptcha_site_key']; ?>" id="cf_recaptcha_site_key" class="frm_input" size="52"> <a href="https://www.google.com/recaptcha/admin" target="_blank" class="btn_frmline">reCAPTCHA 등록하기</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" name="cf_recaptcha_site_key" value="<?php echo $config['cf_recaptcha_site_key']; ?>" id="cf_naver_clientid" class="frm_input" size="52"> <a href="https://www.google.com/recaptcha/admin" target="_blank" class="btn_frmline">reCAPTCHA 등록하기</a>
|
||||
</td>
|
||||
<th scope="row"><label for="cf_recaptcha_secret_key">구글 reCAPTCHA Secret key</label></th>
|
||||
<td>
|
||||
<td colspan="3">
|
||||
<input type="text" name="cf_recaptcha_secret_key" value="<?php echo $config['cf_recaptcha_secret_key']; ?>" id="cf_recaptcha_secret_key" class="frm_input" size="52">
|
||||
</td>
|
||||
</tr>
|
||||
@@ -545,14 +570,14 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
<td colspan="3">
|
||||
<?php if (!function_exists('curl_init')) echo help('<b>경고) curl이 지원되지 않아 네이버 신디케이션을 사용할수 없습니다.</b>'); ?>
|
||||
<?php echo help('네이버 신디케이션 연동키(token)을 입력하면 네이버 신디케이션을 사용할 수 있습니다.<br>연동키는 <a href="http://webmastertool.naver.com/" target="_blank"><u>네이버 웹마스터도구</u></a> -> 네이버 신디케이션에서 발급할 수 있습니다.') ?>
|
||||
<input type="text" name="cf_syndi_token" value="<?php echo $config['cf_syndi_token'] ?>" id="cf_syndi_token" class="frm_input" size="70">
|
||||
<input type="text" name="cf_syndi_token" value="<?php echo isset($config['cf_syndi_token']) ? get_sanitize_input($config['cf_syndi_token']) : ''; ?>" id="cf_syndi_token" class="frm_input" size="70">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_syndi_except">네이버 신디케이션 제외게시판</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('네이버 신디케이션 수집에서 제외할 게시판 아이디를 | 로 구분하여 입력하십시오. 예) notice|adult<br>참고로 그룹접근사용 게시판, 글읽기 권한 2 이상 게시판, 비밀글은 신디케이션 수집에서 제외됩니다.') ?>
|
||||
<input type="text" name="cf_syndi_except" value="<?php echo $config['cf_syndi_except'] ?>" id="cf_syndi_except" class="frm_input" size="70">
|
||||
<input type="text" name="cf_syndi_except" value="<?php echo isset($config['cf_syndi_except']) ? get_sanitize_input($config['cf_syndi_except']) : ''; ?>" id="cf_syndi_except" class="frm_input" size="70">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -883,6 +908,9 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
include_once('_rewrite_config_form.php');
|
||||
?>
|
||||
|
||||
<section id="anc_cf_mail">
|
||||
<h2 class="h2_frm">기본 메일 환경 설정</h2>
|
||||
@@ -1057,54 +1085,54 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_social_servicelist">소셜로그인설정</label></th>
|
||||
<td colspan="3" class="social_config_explain">
|
||||
<p>
|
||||
<div class="explain_box">
|
||||
<input type="checkbox" name="cf_social_servicelist[]" id="check_social_naver" value="naver" <?php echo option_array_checked('naver', $config['cf_social_servicelist']); ?> >
|
||||
<label for="check_social_naver">네이버 로그인을 사용합니다</label>
|
||||
<div>
|
||||
<h3>네이버 CallbackURL</h3>
|
||||
<p><?php echo get_social_callbackurl('naver'); ?></p>
|
||||
</div>
|
||||
</p>
|
||||
<p>
|
||||
</div>
|
||||
<div class="explain_box">
|
||||
<input type="checkbox" name="cf_social_servicelist[]" id="check_social_kakao" value="kakao" <?php echo option_array_checked('kakao', $config['cf_social_servicelist']); ?> >
|
||||
<label for="check_social_kakao">카카오 로그인을 사용합니다</label>
|
||||
<div>
|
||||
<h3>카카오 웹 Redirect Path</h3>
|
||||
<h3>카카오 로그인 Redirect URI</h3>
|
||||
<p><?php echo get_social_callbackurl('kakao', true); ?></p>
|
||||
</p>
|
||||
</div>
|
||||
</p>
|
||||
<p>
|
||||
</div>
|
||||
<div class="explain_box">
|
||||
<input type="checkbox" name="cf_social_servicelist[]" id="check_social_facebook" value="facebook" <?php echo option_array_checked('facebook', $config['cf_social_servicelist']); ?> >
|
||||
<label for="check_social_facebook">페이스북 로그인을 사용합니다</label>
|
||||
<div>
|
||||
<h3>페이스북 유효한 OAuth 리디렉션 URI</h3>
|
||||
<p><?php echo get_social_callbackurl('facebook'); ?></p>
|
||||
</div>
|
||||
</p>
|
||||
<p>
|
||||
</div>
|
||||
<div class="explain_box">
|
||||
<input type="checkbox" name="cf_social_servicelist[]" id="check_social_google" value="google" <?php echo option_array_checked('google', $config['cf_social_servicelist']); ?> >
|
||||
<label for="check_social_google">구글 로그인을 사용합니다</label>
|
||||
<div>
|
||||
<h3>구글 승인된 리디렉션 URI</h3>
|
||||
<p><?php echo get_social_callbackurl('google'); ?></p>
|
||||
</div>
|
||||
</p>
|
||||
<p>
|
||||
</div>
|
||||
<div class="explain_box">
|
||||
<input type="checkbox" name="cf_social_servicelist[]" id="check_social_twitter" value="twitter" <?php echo option_array_checked('twitter', $config['cf_social_servicelist']); ?> >
|
||||
<label for="check_social_twitter">트위터 로그인을 사용합니다</label>
|
||||
<div>
|
||||
<h3>트위터 CallbackURL</h3>
|
||||
<p><?php echo get_social_callbackurl('twitter'); ?></p>
|
||||
</div>
|
||||
</p>
|
||||
<p>
|
||||
</div>
|
||||
<div class="explain_box">
|
||||
<input type="checkbox" name="cf_social_servicelist[]" id="check_social_payco" value="payco" <?php echo option_array_checked('payco', $config['cf_social_servicelist']); ?> >
|
||||
<label for="check_social_payco">페이코 로그인을 사용합니다</label>
|
||||
<div>
|
||||
<h3>페이코 CallbackURL</h3>
|
||||
<p><?php echo get_social_callbackurl('payco'); ?></p>
|
||||
<p><?php echo get_social_callbackurl('payco', false, true); ?></p>
|
||||
</div>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -1130,7 +1158,7 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_twitter_key">트위터 컨슈머 Key</label></th>
|
||||
<td>
|
||||
<input type="text" name="cf_twitter_key" value="<?php echo $config['cf_twitter_key'] ?>" id="cf_twitter_key" class="frm_input" size="40"> <a href="https://dev.twitter.com/apps" target="_blank" class="btn_frmline">앱 등록하기</a>
|
||||
<input type="text" name="cf_twitter_key" value="<?php echo $config['cf_twitter_key'] ?>" id="cf_twitter_key" class="frm_input" size="40"> <a href="https://developer.twitter.com/en/apps" target="_blank" class="btn_frmline">앱 등록하기</a>
|
||||
</td>
|
||||
<th scope="row"><label for="cf_twitter_secret">트위터 컨슈머 Secret</label></th>
|
||||
<td>
|
||||
@@ -1156,11 +1184,11 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_kakao_rest_key">카카오 REST API 키</label></th>
|
||||
<td>
|
||||
<input type="text" name="cf_kakao_rest_key" value="<?php echo $config['cf_kakao_rest_key'] ?>" id="cf_kakao_rest_key" class="frm_input" size="40"> <a href="https://developers.kakao.com/apps/new" target="_blank" class="btn_frmline">앱 등록하기</a>
|
||||
<input type="text" name="cf_kakao_rest_key" value="<?php echo $config['cf_kakao_rest_key'] ?>" id="cf_kakao_rest_key" class="frm_input" size="40"> <a href="https://developers.kakao.com/product/kakaoLogin" target="_blank" class="btn_frmline">앱 등록하기</a>
|
||||
</td>
|
||||
<th scope="row"><label for="cf_kakao_client_secret">카카오 Client Secret</label></th>
|
||||
<td>
|
||||
<input type="text" name="cf_kakao_client_secret" value="<?php echo $config['cf_kakao_client_secret'] ?>" id="cf_kakao_js_apikey" class="frm_input" size="45">
|
||||
<input type="text" name="cf_kakao_client_secret" value="<?php echo $config['cf_kakao_client_secret'] ?>" id="cf_kakao_client_secret" class="frm_input" size="45">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -1237,29 +1265,29 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_sms_type">SMS 전송유형</label></th>
|
||||
<td>
|
||||
<?php echo help("전송유형을 SMS로 선택하시면 최대 80바이트까지 전송하실 수 있으며<br>LMS로 선택하시면 90바이트 이하는 SMS로, 그 이상은 1500바이트까지 LMS로 전송됩니다.<br>요금은 건당 SMS는 16원, LMS는 48원입니다."); ?>
|
||||
<?php echo help("전송유형을 SMS로 선택하시면 최대 80바이트까지 전송하실 수 있으며<br>LMS로 선택하시면 90바이트 이하는 SMS로, 그 이상은 ".G5_ICODE_LMS_MAX_LENGTH."바이트까지 LMS로 전송됩니다.<br>요금은 건당 SMS는 16원, LMS는 48원입니다."); ?>
|
||||
<select id="cf_sms_type" name="cf_sms_type">
|
||||
<option value="" <?php echo get_selected($config['cf_sms_type'], ''); ?>>SMS</option>
|
||||
<option value="LMS" <?php echo get_selected($config['cf_sms_type'], 'LMS'); ?>>LMS</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_icode_id">아이코드 회원아이디</label></th>
|
||||
<tr class="icode_old_version">
|
||||
<th scope="row"><label for="cf_icode_id">아이코드 회원아이디<br>(구버전)</label></th>
|
||||
<td>
|
||||
<?php echo help("아이코드에서 사용하시는 회원아이디를 입력합니다."); ?>
|
||||
<input type="text" name="cf_icode_id" value="<?php echo $config['cf_icode_id']; ?>" id="cf_icode_id" class="frm_input" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_icode_pw">아이코드 비밀번호</label></th>
|
||||
<tr class="icode_old_version">
|
||||
<th scope="row"><label for="cf_icode_pw">아이코드 비밀번호<br>(구버전)</label></th>
|
||||
<td>
|
||||
<?php echo help("아이코드에서 사용하시는 비밀번호를 입력합니다."); ?>
|
||||
<input type="password" name="cf_icode_pw" value="<?php echo $config['cf_icode_pw']; ?>" id="cf_icode_pw" class="frm_input">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">요금제</th>
|
||||
<tr class="icode_old_version <?php if(!(isset($userinfo['payment']) && $userinfo['payment'])){ echo 'cf_tr_hide'; } ?>">
|
||||
<th scope="row">요금제<br>(구버전)</th>
|
||||
<td>
|
||||
<input type="hidden" name="cf_icode_server_ip" value="<?php echo $config['cf_icode_server_ip']; ?>">
|
||||
<?php
|
||||
@@ -1276,21 +1304,31 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">아이코드 SMS 신청<br>회원가입</th>
|
||||
<td>
|
||||
<a href="http://icodekorea.com/res/join_company_fix_a.php?sellid=sir2" target="_blank" class="btn_frmline">아이코드 회원가입</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($userinfo['payment'] == 'A') { ?>
|
||||
<tr>
|
||||
<th scope="row">충전 잔액</th>
|
||||
<?php if ($userinfo['payment'] == 'A') { ?>
|
||||
<tr class="icode_old_version">
|
||||
<th scope="row">충전 잔액<br>(구버전)</th>
|
||||
<td>
|
||||
<?php echo number_format($userinfo['coin']); ?> 원.
|
||||
<a href="http://www.icodekorea.com/smsbiz/credit_card_amt.php?icode_id=<?php echo $config['cf_icode_id']; ?>&icode_passwd=<?php echo $config['cf_icode_pw']; ?>" target="_blank" class="btn_frmline">충전하기</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr class="icode_json_version">
|
||||
<th scope="row"><label for="cf_icode_token_key">아이코드 토큰키<br>(JSON버전)</label></th>
|
||||
<td>
|
||||
<?php echo help("아이코드 JSON 버전의 경우 아이코드 토큰키를 입력시 실행됩니다.<br>SMS 전송유형을 LMS로 설정시 90바이트 이내는 SMS, 90 ~ 2000 바이트는 LMS 그 이상은 절삭 되어 LMS로 발송됩니다."); ?>
|
||||
<input type="text" name="cf_icode_token_key" value="<?php echo isset($config['cf_icode_token_key']) ? get_sanitize_input($config['cf_icode_token_key']) : ''; ?>" id="cf_icode_token_key" class="frm_input" size="40">
|
||||
<?php echo help("아이코드 사이트 -> 토큰키관리 메뉴에서 생성한 토큰키를 입력합니다."); ?>
|
||||
<br>
|
||||
서버아이피 : <?php echo $_SERVER['SERVER_ADDR']; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">아이코드 SMS 신청<br>회원가입</th>
|
||||
<td>
|
||||
<a href="http://icodekorea.com/res/join_company_fix_a.php?sellid=sir2" target="_blank" class="btn_frmline">아이코드 회원가입</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -1319,7 +1357,7 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
<label for="cf_<?php echo $i ?>_subj">여분필드<?php echo $i ?> 제목</label>
|
||||
<input type="text" name="cf_<?php echo $i ?>_subj" value="<?php echo get_text($config['cf_'.$i.'_subj']) ?>" id="cf_<?php echo $i ?>_subj" class="frm_input" size="30">
|
||||
<label for="cf_<?php echo $i ?>">여분필드<?php echo $i ?> 값</label>
|
||||
<input type="text" name="cf_<?php echo $i ?>" value="<?php echo $config['cf_'.$i] ?>" id="cf_<?php echo $i ?>" class="frm_input" size="30">
|
||||
<input type="text" name="cf_<?php echo $i ?>" value="<?php echo get_sanitize_input($config['cf_'.$i]); ?>" id="cf_<?php echo $i ?>" class="frm_input extra-value-input" size="30">
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
@@ -1397,6 +1435,26 @@ $(function(){
|
||||
|
||||
function fconfigform_submit(f)
|
||||
{
|
||||
var current_user_ip = "<?php echo $_SERVER['REMOTE_ADDR']; ?>";
|
||||
var cf_intercept_ip_val = f.cf_intercept_ip.value;
|
||||
|
||||
if( cf_intercept_ip_val && current_user_ip ){
|
||||
var cf_intercept_ips = cf_intercept_ip_val.split("\n");
|
||||
|
||||
for(var i=0; i < cf_intercept_ips.length; i++){
|
||||
if ( cf_intercept_ips[i].trim() ) {
|
||||
cf_intercept_ips[i] = cf_intercept_ips[i].replace(".", "\.");
|
||||
cf_intercept_ips[i] = cf_intercept_ips[i].replace("+", "[0-9\.]+");
|
||||
|
||||
var re = new RegExp(cf_intercept_ips[i]);
|
||||
if ( re.test(current_user_ip) ){
|
||||
alert("현재 접속 IP : "+ current_user_ip +" 가 차단될수 있기 때문에, 다른 IP를 입력해 주세요.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
f.action = "./config_form_update.php";
|
||||
return true;
|
||||
}
|
||||
@@ -1421,14 +1479,22 @@ if($config['cf_cert_use']) {
|
||||
}
|
||||
|
||||
echo module_exec_check($exe, 'okname');
|
||||
|
||||
if(is_dir(G5_OKNAME_PATH.'/log') && is_writable(G5_OKNAME_PATH.'/log') && function_exists('check_log_folder') ) {
|
||||
check_log_folder(G5_OKNAME_PATH.'/log');
|
||||
}
|
||||
}
|
||||
|
||||
// kcp일 때
|
||||
if($config['cf_cert_hp'] == 'kcp') {
|
||||
if(PHP_INT_MAX == 2147483647) // 32-bit
|
||||
$exe = G5_KCPCERT_PATH . '/bin/ct_cli';
|
||||
else
|
||||
$exe = G5_KCPCERT_PATH . '/bin/ct_cli_x64';
|
||||
if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
|
||||
if(PHP_INT_MAX == 2147483647) // 32-bit
|
||||
$exe = G5_KCPCERT_PATH . '/bin/ct_cli';
|
||||
else
|
||||
$exe = G5_KCPCERT_PATH . '/bin/ct_cli_x64';
|
||||
} else {
|
||||
$exe = G5_KCPCERT_PATH . '/bin/ct_cli_exe.exe';
|
||||
}
|
||||
|
||||
echo module_exec_check($exe, 'ct_cli');
|
||||
}
|
||||
@@ -1438,18 +1504,30 @@ if($config['cf_cert_use']) {
|
||||
$log_path = G5_LGXPAY_PATH.'/lgdacom/log';
|
||||
|
||||
if(!is_dir($log_path)) {
|
||||
echo '<script>'.PHP_EOL;
|
||||
echo 'alert("'.str_replace(G5_PATH.'/', '', G5_LGXPAY_PATH).'/lgdacom 폴더 안에 log 폴더를 생성하신 후 쓰기권한을 부여해 주십시오.\n> mkdir log\n> chmod 707 log");'.PHP_EOL;
|
||||
echo '</script>'.PHP_EOL;
|
||||
} else {
|
||||
if(!is_writable($log_path)) {
|
||||
|
||||
if( is_writable(G5_LGXPAY_PATH.'/lgdacom/') ){
|
||||
// 디렉토리가 없다면 생성합니다. (퍼미션도 변경하구요.)
|
||||
@mkdir($log_path, G5_DIR_PERMISSION);
|
||||
@chmod($log_path, G5_DIR_PERMISSION);
|
||||
}
|
||||
|
||||
if(!is_dir($log_path)){
|
||||
echo '<script>'.PHP_EOL;
|
||||
echo 'alert("'.str_replace(G5_PATH.'/', '',$log_path).' 폴더에 쓰기권한을 부여해 주십시오.\n> chmod 707 log");'.PHP_EOL;
|
||||
echo 'alert("'.str_replace(G5_PATH.'/', '', G5_LGXPAY_PATH).'/lgdacom 폴더 안에 log 폴더를 생성하신 후 쓰기권한을 부여해 주십시오.\n> mkdir log\n> chmod 707 log");'.PHP_EOL;
|
||||
echo '</script>'.PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
if(is_dir($log_path) && is_writable($log_path)) {
|
||||
if( function_exists('check_log_folder') ){
|
||||
check_log_folder($log_path);
|
||||
}
|
||||
} else if (is_dir($log_path)) {
|
||||
echo '<script>'.PHP_EOL;
|
||||
echo 'alert("'.str_replace(G5_PATH.'/', '',$log_path).' 폴더에 쓰기권한을 부여해 주십시오.\n> chmod 707 log");'.PHP_EOL;
|
||||
echo '</script>'.PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
include_once ('./admin.tail.php');
|
||||
+168
-10
@@ -4,31 +4,180 @@ include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
auth_check_menu($auth, $sub_menu, 'w');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
$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);
|
||||
if (!$mb['mb_id'])
|
||||
|
||||
if (! (isset($mb['mb_id']) && $mb['mb_id']))
|
||||
alert('최고관리자 회원아이디가 존재하지 않습니다.');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$cf_social_servicelist = !empty($_POST['cf_social_servicelist']) ? implode(',', $_POST['cf_social_servicelist']) : '';
|
||||
|
||||
$check_keys = array('cf_lg_mid', 'cf_lg_mert_key', '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');
|
||||
|
||||
foreach( $check_keys as $key ){
|
||||
if ( isset($_POST[$key]) && $_POST[$key] ){
|
||||
$posts[$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';
|
||||
|
||||
if(isset($_POST['cf_intercept_ip']) && $_POST['cf_intercept_ip']){
|
||||
|
||||
$pattern = explode("\n", trim($_POST['cf_intercept_ip']));
|
||||
for ($i=0; $i<count($pattern); $i++) {
|
||||
$pattern[$i] = trim($pattern[$i]);
|
||||
if (empty($pattern[$i]))
|
||||
continue;
|
||||
|
||||
$pattern[$i] = str_replace(".", "\.", $pattern[$i]);
|
||||
$pattern[$i] = str_replace("+", "[0-9\.]+", $pattern[$i]);
|
||||
$pat = "/^{$pattern[$i]}$/";
|
||||
|
||||
if( preg_match($pat, $_SERVER['REMOTE_ADDR']) ){
|
||||
alert("현재 접속 IP : ".$_SERVER['REMOTE_ADDR']." 가 차단될수 있기 때문에, 다른 IP를 입력해 주세요.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$check_keys = array(
|
||||
'cf_use_email_certify' => 'int',
|
||||
'cf_use_homepage' => 'int',
|
||||
'cf_req_homepage' => 'int',
|
||||
'cf_use_tel' => 'int',
|
||||
'cf_req_tel' => 'int',
|
||||
'cf_use_hp' => 'int',
|
||||
'cf_req_hp' => 'int',
|
||||
'cf_use_addr' => 'int',
|
||||
'cf_req_addr' => 'int',
|
||||
'cf_use_signature' => 'int',
|
||||
'cf_req_signature' => 'int',
|
||||
'cf_use_profile' => 'int',
|
||||
'cf_req_profile' => 'int',
|
||||
'cf_register_level' => 'int',
|
||||
'cf_register_point' => 'int',
|
||||
'cf_icon_level' => 'int',
|
||||
'cf_use_recommend' => 'int',
|
||||
'cf_leave_day' => 'int',
|
||||
'cf_search_part' => 'int',
|
||||
'cf_email_use' => 'int',
|
||||
'cf_email_wr_super_admin' => 'int',
|
||||
'cf_email_wr_group_admin' => 'int',
|
||||
'cf_email_wr_board_admin' => 'int',
|
||||
'cf_email_wr_write' => 'int',
|
||||
'cf_email_wr_comment_all' => 'int',
|
||||
'cf_email_mb_super_admin' => 'int',
|
||||
'cf_email_mb_member' => 'int',
|
||||
'cf_email_po_super_admin' => 'int',
|
||||
'cf_prohibit_id' => 'text',
|
||||
'cf_prohibit_email' => 'text',
|
||||
'cf_new_del' => 'int',
|
||||
'cf_memo_del' => 'int',
|
||||
'cf_visit_del' => 'int',
|
||||
'cf_popular_del' => 'int',
|
||||
'cf_use_member_icon' => 'int',
|
||||
'cf_member_icon_size' => 'int',
|
||||
'cf_member_icon_width' => 'int',
|
||||
'cf_member_icon_height' => 'int',
|
||||
'cf_member_img_size' => 'int',
|
||||
'cf_member_img_width' => 'int',
|
||||
'cf_member_img_height' => 'int',
|
||||
'cf_login_minutes' => 'int',
|
||||
'cf_formmail_is_member' => 'int',
|
||||
'cf_page_rows' => 'int',
|
||||
'cf_mobile_page_rows' => 'int',
|
||||
'cf_social_login_use' => 'int',
|
||||
'cf_cert_req' => 'int',
|
||||
'cf_cert_use' => 'int',
|
||||
'cf_cert_ipin' => 'char',
|
||||
'cf_cert_hp' => 'char',
|
||||
'cf_admin_email' => 'char',
|
||||
'cf_admin_email_name' => 'char',
|
||||
'cf_add_script' => 'text',
|
||||
'cf_use_point' => 'int',
|
||||
'cf_point_term' => 'int',
|
||||
'cf_use_copy_log' => 'int',
|
||||
'cf_login_point' => 'int',
|
||||
'cf_cut_name' => 'int',
|
||||
'cf_nick_modify' => 'int',
|
||||
'cf_new_skin' => 'char',
|
||||
'cf_new_rows' => 'int',
|
||||
'cf_search_skin' => 'char',
|
||||
'cf_connect_skin' => 'char',
|
||||
'cf_faq_skin' => 'char',
|
||||
'cf_read_point' => 'int',
|
||||
'cf_write_point' => 'int',
|
||||
'cf_comment_point' => 'int',
|
||||
'cf_download_point' => 'int',
|
||||
'cf_write_pages' => 'int',
|
||||
'cf_mobile_pages' => 'int',
|
||||
'cf_link_target' => 'char',
|
||||
'cf_delay_sec' => 'int',
|
||||
'cf_filter' => 'text',
|
||||
'cf_possible_ip' => 'text',
|
||||
'cf_analytics' => 'text',
|
||||
'cf_add_meta' => 'text',
|
||||
'cf_member_skin' => 'char',
|
||||
'cf_image_extension' => 'char',
|
||||
'cf_flash_extension' => 'char',
|
||||
'cf_movie_extension' => 'char',
|
||||
'cf_visit' => 'char',
|
||||
'cf_stipulation' => 'text',
|
||||
'cf_privacy' => 'text',
|
||||
'cf_open_modify' => 'int',
|
||||
'cf_memo_send_point' => 'int',
|
||||
'cf_mobile_new_skin' => 'char',
|
||||
'cf_mobile_search_skin' => 'char',
|
||||
'cf_mobile_connect_skin' => 'char',
|
||||
'cf_mobile_faq_skin' => 'char',
|
||||
'cf_mobile_member_skin' => 'char',
|
||||
'cf_captcha_mp3' => 'char',
|
||||
'cf_cert_limit' => 'int',
|
||||
'cf_sms_use' => 'char',
|
||||
'cf_sms_type' => 'char',
|
||||
'cf_icode_id' => 'char',
|
||||
'cf_icode_pw' => 'char',
|
||||
'cf_icode_server_ip' => 'char',
|
||||
'cf_captcha' => 'char',
|
||||
'cf_syndi_token' => '',
|
||||
'cf_syndi_except' => ''
|
||||
);
|
||||
|
||||
for($i=1;$i<=10;$i++){
|
||||
$check_keys['cf_'.$i.'_subj'] = isset($_POST['cf_'.$i.'_subj']) ? $_POST['cf_'.$i.'_subj'] : '';
|
||||
$check_keys['cf_'.$i] = isset($_POST['cf_'.$i]) ? $_POST['cf_'.$i] : '';
|
||||
}
|
||||
|
||||
foreach( $check_keys as $k => $v ){
|
||||
if( $v === 'int' ){
|
||||
$posts[$key] = $_POST[$k] = isset($_POST[$k]) ? (int) $_POST[$k] : 0;
|
||||
} else {
|
||||
$posts[$key] = $_POST[$k] = isset($_POST[$k]) ? $_POST[$k] : '';
|
||||
}
|
||||
}
|
||||
|
||||
// 본인확인을 사용할 경우 아이핀, 휴대폰인증 중 하나는 선택되어야 함
|
||||
if($_POST['cf_cert_use'] && !$_POST['cf_cert_ipin'] && !$_POST['cf_cert_hp'])
|
||||
alert('본인확인을 위해 아이핀 또는 휴대폰 본인학인 서비스를 하나이상 선택해 주십시오');
|
||||
|
||||
if(!$_POST['cf_cert_use']) {
|
||||
$_POST['cf_cert_ipin'] = '';
|
||||
$_POST['cf_cert_hp'] = '';
|
||||
$posts[$key] = $_POST['cf_cert_ipin'] = '';
|
||||
$posts[$key] = $_POST['cf_cert_hp'] = '';
|
||||
}
|
||||
|
||||
$cf_social_servicelist = !empty($_POST['cf_social_servicelist']) ? implode(',', $_POST['cf_social_servicelist']) : '';
|
||||
|
||||
$sql = " update {$g5['config_table']}
|
||||
set cf_title = '{$_POST['cf_title']}',
|
||||
cf_admin = '{$_POST['cf_admin']}',
|
||||
set cf_title = '{$cf_title}',
|
||||
cf_admin = '{$cf_admin}',
|
||||
cf_admin_email = '{$_POST['cf_admin_email']}',
|
||||
cf_admin_email_name = '{$_POST['cf_admin_email_name']}',
|
||||
cf_add_script = '{$_POST['cf_add_script']}',
|
||||
@@ -59,6 +208,7 @@ $sql = " update {$g5['config_table']}
|
||||
cf_add_meta = '{$_POST['cf_add_meta']}',
|
||||
cf_syndi_token = '{$_POST['cf_syndi_token']}',
|
||||
cf_syndi_except = '{$_POST['cf_syndi_except']}',
|
||||
cf_bbs_rewrite = '{$_POST['cf_bbs_rewrite']}',
|
||||
cf_member_skin = '{$_POST['cf_member_skin']}',
|
||||
cf_use_homepage = '{$_POST['cf_use_homepage']}',
|
||||
cf_req_homepage = '{$_POST['cf_req_homepage']}',
|
||||
@@ -132,6 +282,7 @@ $sql = " update {$g5['config_table']}
|
||||
cf_sms_type = '{$_POST['cf_sms_type']}',
|
||||
cf_icode_id = '{$_POST['cf_icode_id']}',
|
||||
cf_icode_pw = '{$_POST['cf_icode_pw']}',
|
||||
cf_icode_token_key = '{$_POST['cf_icode_token_key']}',
|
||||
cf_icode_server_ip = '{$_POST['cf_icode_server_ip']}',
|
||||
cf_icode_server_port = '{$_POST['cf_icode_server_port']}',
|
||||
cf_googl_shorturl_apikey = '{$_POST['cf_googl_shorturl_apikey']}',
|
||||
@@ -177,5 +328,12 @@ sql_query($sql);
|
||||
|
||||
//sql_query(" OPTIMIZE TABLE `$g5[config_table]` ");
|
||||
|
||||
goto_url('./config_form.php', false);
|
||||
?>
|
||||
if( isset($_POST['cf_bbs_rewrite']) ){
|
||||
g5_delete_all_cache();
|
||||
}
|
||||
|
||||
run_event('admin_config_form_update');
|
||||
|
||||
update_rewrite_rules();
|
||||
|
||||
goto_url('./config_form.php', false);
|
||||
+96
-11
@@ -3,7 +3,9 @@ $sub_menu = '300600';
|
||||
include_once('./_common.php');
|
||||
include_once(G5_EDITOR_LIB);
|
||||
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
auth_check_menu($auth, $sub_menu, "w");
|
||||
|
||||
$co_id = isset($_REQUEST['co_id']) ? preg_replace('/[^a-z0-9_]/i', '', $_REQUEST['co_id']) : '';
|
||||
|
||||
// 상단, 하단 파일경로 필드 추가
|
||||
if(!sql_query(" select co_include_head from {$g5['content_table']} limit 1 ", false)) {
|
||||
@@ -35,6 +37,7 @@ if(!sql_query(" select co_skin from {$g5['content_table']} limit 1 ", false)) {
|
||||
|
||||
$html_title = "내용";
|
||||
$g5['title'] = $html_title.' 관리';
|
||||
$readonly = '';
|
||||
|
||||
if ($w == "u")
|
||||
{
|
||||
@@ -49,9 +52,18 @@ if ($w == "u")
|
||||
else
|
||||
{
|
||||
$html_title .= ' 입력';
|
||||
$co['co_html'] = 2;
|
||||
$co['co_skin'] = 'basic';
|
||||
$co['co_mobile_skin'] = 'basic';
|
||||
$co = array(
|
||||
'co_id' => '',
|
||||
'co_subject' => '',
|
||||
'co_content' => '',
|
||||
'co_mobile_content' => '',
|
||||
'co_include_head' => '',
|
||||
'co_include_tail' => '',
|
||||
'co_tag_filter_use' => 1,
|
||||
'co_html' => 2,
|
||||
'co_skin' => 'basic',
|
||||
'co_mobile_skin' => 'basic'
|
||||
);
|
||||
}
|
||||
|
||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
@@ -75,7 +87,7 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
<td>
|
||||
<?php echo help('20자 이내의 영문자, 숫자, _ 만 가능합니다.'); ?>
|
||||
<input type="text" value="<?php echo $co['co_id']; ?>" name="co_id" id ="co_id" required <?php echo $readonly; ?> class="required <?php echo $readonly; ?> frm_input" size="20" maxlength="20">
|
||||
<?php if ($w == 'u') { ?><a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=<?php echo $co_id; ?>" class="btn_frmline">내용확인</a><?php } ?>
|
||||
<?php if ($w == 'u') { ?><a href="<?php echo get_pretty_url('content', $co_id); ?>" class="btn_frmline">내용확인</a><?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -84,11 +96,11 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">내용</th>
|
||||
<td><?php echo editor_html('co_content', get_text($co['co_content'], 0)); ?></td>
|
||||
<td><?php echo editor_html('co_content', get_text(html_purifier($co['co_content']), 0)); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">모바일 내용</th>
|
||||
<td><?php echo editor_html('co_mobile_content', get_text($co['co_mobile_content'], 0)); ?></td>
|
||||
<td><?php echo editor_html('co_mobile_content', get_text(html_purifier($co['co_mobile_content']), 0)); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="co_skin">스킨 디렉토리<strong class="sound_only">필수</strong></label></th>
|
||||
@@ -102,16 +114,18 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
<?php echo get_mobile_skin_select('content', 'co_mobile_skin', 'co_mobile_skin', $co['co_mobile_skin'], 'required'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<!--
|
||||
<tr>
|
||||
<th scope="row"><label for="co_tag_filter_use">태그 필터링 사용</label></th>
|
||||
<td>
|
||||
<?php echo help("내용에서 iframe 등의 태그를 사용하려면 사용안함으로 선택해 주십시오."); ?>
|
||||
<select name="co_tag_filter_use" id="co_tag_filter_use">
|
||||
<option value="1"<?php echo get_selected(1, $co['co_tag_filter_use']); ?>>사용함</option>
|
||||
<option value="0"<?php echo get_selected(0, $co['co_tag_filter_use']); ?>>사용안함</option>
|
||||
<option value="1"<?php echo get_selected($co['co_tag_filter_use'], 1); ?>>사용함</option>
|
||||
<option value="0"<?php echo get_selected($co['co_tag_filter_use'], 0); ?>>사용안함</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
-->
|
||||
<tr>
|
||||
<th scope="row"><label for="co_include_head">상단 파일 경로</label></th>
|
||||
<td>
|
||||
@@ -126,12 +140,29 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
<input type="text" name="co_include_tail" value="<?php echo $co['co_include_tail']; ?>" id="co_include_tail" class="frm_input" size="60">
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="admin_captcha_box" style="display:none;">
|
||||
<th scope="row">자동등록방지</th>
|
||||
<td>
|
||||
<?php
|
||||
echo help("파일 경로를 입력 또는 수정시 캡챠를 반드시 입력해야 합니다.");
|
||||
|
||||
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
|
||||
$captcha_html = captcha_html();
|
||||
$captcha_js = chk_captcha_js();
|
||||
echo $captcha_html;
|
||||
?>
|
||||
<script>
|
||||
jQuery("#captcha_key").removeAttr("required").removeClass("required");
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="co_himg">상단이미지</label></th>
|
||||
<td>
|
||||
<input type="file" name="co_himg" id="co_himg">
|
||||
<?php
|
||||
$himg = G5_DATA_PATH.'/content/'.$co['co_id'].'_h';
|
||||
$himg_str = '';
|
||||
if (file_exists($himg)) {
|
||||
$size = @getimagesize($himg);
|
||||
if($size[0] && $size[0] > 750)
|
||||
@@ -156,6 +187,7 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
<input type="file" name="co_timg" id="co_timg">
|
||||
<?php
|
||||
$timg = G5_DATA_PATH.'/content/'.$co['co_id'].'_t';
|
||||
$timg_str = '';
|
||||
if (file_exists($timg)) {
|
||||
$size = @getimagesize($timg);
|
||||
if($size[0] && $size[0] > 750)
|
||||
@@ -185,7 +217,56 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
|
||||
</form>
|
||||
|
||||
<?php
|
||||
// [KVE-2018-2089] 취약점 으로 인해 파일 경로 수정시에만 자동등록방지 코드 사용
|
||||
?>
|
||||
<script>
|
||||
var captcha_chk = false;
|
||||
|
||||
function use_captcha_check(){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: g5_admin_url+"/ajax.use_captcha.php",
|
||||
data: { admin_use_captcha: "1" },
|
||||
cache: false,
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function frm_check_file(){
|
||||
var co_include_head = "<?php echo $co['co_include_head']; ?>";
|
||||
var co_include_tail = "<?php echo $co['co_include_tail']; ?>";
|
||||
var head = jQuery.trim(jQuery("#co_include_head").val());
|
||||
var tail = jQuery.trim(jQuery("#co_include_tail").val());
|
||||
|
||||
if(co_include_head !== head || co_include_tail !== tail){
|
||||
// 캡챠를 사용합니다.
|
||||
jQuery("#admin_captcha_box").show();
|
||||
captcha_chk = true;
|
||||
|
||||
use_captcha_check();
|
||||
|
||||
return false;
|
||||
} else {
|
||||
jQuery("#admin_captcha_box").hide();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
jQuery(function($){
|
||||
if( window.self !== window.top ){ // frame 또는 iframe을 사용할 경우 체크
|
||||
$("#co_include_head, #co_include_tail").on("change paste keyup", function(e) {
|
||||
frm_check_file();
|
||||
});
|
||||
|
||||
use_captcha_check();
|
||||
}
|
||||
});
|
||||
|
||||
function frmcontentform_check(f)
|
||||
{
|
||||
errmsg = "";
|
||||
@@ -204,10 +285,14 @@ function frmcontentform_check(f)
|
||||
errfld.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if( captcha_chk ) {
|
||||
<?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
+62
-20
@@ -6,12 +6,44 @@ if ($w == "u" || $w == "d")
|
||||
check_demo();
|
||||
|
||||
if ($w == 'd')
|
||||
auth_check($auth[$sub_menu], "d");
|
||||
auth_check_menu($auth, $sub_menu, "d");
|
||||
else
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
auth_check_menu($auth, $sub_menu, "w");
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$co_row = array('co_id'=>'', 'co_include_head'=>'', 'co_include_tail'=>'');
|
||||
|
||||
if ($w == "" || $w == "u")
|
||||
{
|
||||
if(isset($_REQUEST['co_id']) && preg_match("/[^a-z0-9_]/i", $_REQUEST['co_id'])) alert("ID 는 영문자, 숫자, _ 만 가능합니다.");
|
||||
|
||||
$sql = " select * from {$g5['content_table']} where co_id = '$co_id' ";
|
||||
$co_row = sql_fetch($sql);
|
||||
}
|
||||
|
||||
$co_id = isset($_REQUEST['co_id']) ? preg_replace('/[^a-z0-9_]/i', '', $_REQUEST['co_id']) : '';
|
||||
$co_subject = isset($_POST['co_subject']) ? strip_tags(clean_xss_attributes($_POST['co_subject'])) : '';
|
||||
$co_include_head = isset($_POST['co_include_head']) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($_POST['co_include_head'], 0, 255)) : '';
|
||||
$co_include_tail = isset($_POST['co_include_tail']) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($_POST['co_include_tail'], 0, 255)) : '';
|
||||
$co_tag_filter_use = isset($_POST['co_tag_filter_use']) ? (int) $_POST['co_tag_filter_use'] : 1;
|
||||
$co_himg_del = (isset($_POST['co_himg_del']) && $_POST['co_himg_del']) ? 1 : 0;
|
||||
$co_timg_del = (isset($_POST['co_timg_del']) && $_POST['co_timg_del']) ? 1 : 0;
|
||||
$co_html = isset($_POST['co_html']) ? (int) $_POST['co_html'] : 0;
|
||||
$co_content = isset($_POST['co_content']) ? $_POST['co_content'] : '';
|
||||
$co_mobile_content = isset($_POST['co_mobile_content']) ? $_POST['co_mobile_content'] : '';
|
||||
$co_skin = isset($_POST['co_skin']) ? clean_xss_tags($_POST['co_skin'], 1, 1) : '';
|
||||
$co_mobile_skin = isset($_POST['co_mobile_skin']) ? clean_xss_tags($_POST['co_mobile_skin'], 1, 1) : '';
|
||||
|
||||
// 관리자가 자동등록방지를 사용해야 할 경우
|
||||
if ((( isset($co_row['co_include_head']) && $co_row['co_include_head'] !== $co_include_head ) || ( isset($co_row['co_include_tail']) && $co_row['co_include_tail'] !== $co_include_tail )) && function_exists('get_admin_captcha_by') && get_admin_captcha_by()){
|
||||
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
|
||||
|
||||
if (!chk_captcha()) {
|
||||
alert('자동등록방지 숫자가 틀렸습니다.');
|
||||
}
|
||||
}
|
||||
|
||||
@mkdir(G5_DATA_PATH."/content", G5_DIR_PERMISSION);
|
||||
@chmod(G5_DATA_PATH."/content", G5_DIR_PERMISSION);
|
||||
|
||||
@@ -21,31 +53,40 @@ if ($co_timg_del) @unlink(G5_DATA_PATH."/content/{$co_id}_t");
|
||||
$error_msg = '';
|
||||
|
||||
if( $co_include_head ){
|
||||
$purl = parse_url($co_include_head);
|
||||
$file = $purl['path'];
|
||||
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
||||
alert('상단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
||||
|
||||
$file_ext = pathinfo($co_include_head, PATHINFO_EXTENSION);
|
||||
|
||||
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) || ! preg_match('/^.*\.(php|htm|html)$/i', $co_include_head) ) {
|
||||
alert('상단 파일 경로의 확장자는 php, htm, html 만 허용합니다.');
|
||||
}
|
||||
}
|
||||
|
||||
if( $co_include_tail ){
|
||||
$purl = parse_url($co_include_tail);
|
||||
$file = $purl['path'];
|
||||
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
||||
alert('하단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
||||
|
||||
$file_ext = pathinfo($co_include_tail, PATHINFO_EXTENSION);
|
||||
|
||||
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) || ! preg_match('/^.*\.(php|htm|html)$/i', $co_include_tail) ) {
|
||||
alert('하단 파일 경로의 확장자는 php, htm, html 만 허용합니다.');
|
||||
}
|
||||
}
|
||||
|
||||
if( $co_include_head && ! is_include_path_check($co_include_head) ){
|
||||
if( $co_include_head && ! is_include_path_check($co_include_head, 1) ){
|
||||
$co_include_head = '';
|
||||
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 상단 파일 경로에 포함시킬수 없습니다.';
|
||||
}
|
||||
|
||||
if( $co_include_tail && ! is_include_path_check($co_include_tail) ){
|
||||
if( $co_include_tail && ! is_include_path_check($co_include_tail, 1) ){
|
||||
$co_include_tail = '';
|
||||
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.';
|
||||
}
|
||||
|
||||
if( function_exists('filter_input_include_path') ){
|
||||
$co_include_head = filter_input_include_path($co_include_head);
|
||||
$co_include_tail = filter_input_include_path($co_include_tail);
|
||||
}
|
||||
|
||||
$co_seo_title = exist_seo_title_recursive('content', generate_seo_title($co_subject), $g5['content_table'], $co_id);
|
||||
|
||||
$sql_common = " co_include_head = '$co_include_head',
|
||||
co_include_tail = '$co_include_tail',
|
||||
co_html = '$co_html',
|
||||
@@ -53,17 +94,14 @@ $sql_common = " co_include_head = '$co_include_head',
|
||||
co_subject = '$co_subject',
|
||||
co_content = '$co_content',
|
||||
co_mobile_content = '$co_mobile_content',
|
||||
co_seo_title = '$co_seo_title',
|
||||
co_skin = '$co_skin',
|
||||
co_mobile_skin = '$co_mobile_skin' ";
|
||||
|
||||
if ($w == "")
|
||||
{
|
||||
//if(eregi("[^a-z0-9_]", $co_id)) alert("ID 는 영문자, 숫자, _ 만 가능합니다.");
|
||||
if(preg_match("/[^a-z0-9_]/i", $co_id)) alert("ID 는 영문자, 숫자, _ 만 가능합니다.");
|
||||
|
||||
$sql = " select co_id from {$g5['content_table']} where co_id = '$co_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['co_id'])
|
||||
$row = $co_row;
|
||||
if (isset($row['co_id']) && $row['co_id'])
|
||||
alert("이미 같은 ID로 등록된 내용이 있습니다.");
|
||||
|
||||
$sql = " insert {$g5['content_table']}
|
||||
@@ -87,6 +125,11 @@ else if ($w == "d")
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
if(function_exists('get_admin_captcha_by'))
|
||||
get_admin_captcha_by('remove');
|
||||
|
||||
g5_delete_cache_by_prefix('content-'.$co_id.'-');
|
||||
|
||||
if ($w == "" || $w == "u")
|
||||
{
|
||||
if ($_FILES['co_himg']['name'])
|
||||
@@ -111,5 +154,4 @@ if ($w == "" || $w == "u")
|
||||
else
|
||||
{
|
||||
goto_url("./contentlist.php");
|
||||
}
|
||||
?>
|
||||
}
|
||||
+3
-4
@@ -2,7 +2,7 @@
|
||||
$sub_menu = '300600';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
auth_check_menu($auth, $sub_menu, "r");
|
||||
|
||||
if( !isset($g5['content_table']) ){
|
||||
die('<meta charset="utf-8">/data/dbconfig.php 파일에 <strong>$g5[\'content_table\'] = G5_TABLE_PREFIX.\'content\';</strong> 를 추가해 주세요.');
|
||||
@@ -77,7 +77,7 @@ $result = sql_query($sql);
|
||||
<td class="td_left"><?php echo htmlspecialchars2($row['co_subject']); ?></td>
|
||||
<td class="td_mng td_mng_l">
|
||||
<a href="./contentform.php?w=u&co_id=<?php echo $row['co_id']; ?>" class="btn btn_03"><span class="sound_only"><?php echo htmlspecialchars2($row['co_subject']); ?> </span>수정</a>
|
||||
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=<?php echo $row['co_id']; ?>" class="btn btn_02"><span class="sound_only"><?php echo htmlspecialchars2($row['co_subject']); ?> </span> 보기</a>
|
||||
<a href="<?php echo get_pretty_url('content', $row['co_id']); ?>" class="btn btn_02"><span class="sound_only"><?php echo htmlspecialchars2($row['co_subject']); ?> </span> 보기</a>
|
||||
<a href="./contentformupdate.php?w=d&co_id=<?php echo $row['co_id']; ?>" onclick="return delete_confirm(this);" class="btn btn_02"><span class="sound_only"><?php echo htmlspecialchars2($row['co_subject']); ?> </span>삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -94,5 +94,4 @@ $result = sql_query($sql);
|
||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&page="); ?>
|
||||
|
||||
<?php
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
+98
-55
@@ -13,23 +13,24 @@ legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-inde
|
||||
label, input, button, select, img {vertical-align:middle}
|
||||
input, button {margin:0;padding:0;font-family:'Malgun Gothic',"맑은 고딕",AppleGothic,Dotum,"돋움", sans-serif;font-size:1em}
|
||||
button,input[type="submit"] {cursor:pointer}
|
||||
textarea, select {font-family:'Malgun Gothic',"맑은 고딕",AppleGothic,Dotum,"돋움", sans-serif;;font-size:1em}
|
||||
textarea, select {font-family:'Malgun Gothic',"맑은 고딕",AppleGothic,Dotum,"돋움", sans-serif;font-size:1em}
|
||||
select {margin:0}
|
||||
p {margin:0;padding:0;word-break:break-all}
|
||||
pre {overflow-x:scroll;font-size:1.1em}
|
||||
a:link, a:visited {color:#000;text-decoration:none}
|
||||
|
||||
* {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
h2{font-size: 1.083em;font-weight: bold;margin:10px 0}
|
||||
|
||||
#wrapper {min-height:480px}
|
||||
/* 레이아웃 */
|
||||
#hd h1 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||
#hd_top{position:fixed;top:0;left:0;width:100%;width:100%;height:50px;background:#3f51b5;z-index:1000}
|
||||
#hd_top{position:fixed;top:0;left:0;width:100%;height:50px;background:#3f51b5;z-index:1000}
|
||||
#hd_top:after{display:block;visibility:hidden;clear:both;content:""}
|
||||
#logo{background:#2f409f;height:100%;float:left;width:220px;padding:15px 0 15px 50px;text-align:center}
|
||||
#btn_gnb{background:url(../img/menu-cl.png) 50% 50% no-repeat #223390;width:50px;height:50px;border:0;position:absolute;top:0;left:0;text-indent:-999px;overflow:hidden}
|
||||
@@ -38,12 +39,12 @@ h2{font-size: 1.083em;font-weight: bold;margin:10px 0}
|
||||
#tnb{float:right;padding:10px}
|
||||
#tnb ul:after{display:block;visibility:hidden;clear:both;content:""}
|
||||
#tnb li{float:left;position:relative;margin-left:3px}
|
||||
#tnb a{color:#fff;;padding:0 10px;display:block;line-height:30px;}
|
||||
#tnb a{color:#fff;padding:0 10px;display:block;line-height:30px;}
|
||||
#tnb .tnb_service{border-radius:3px;background:#4e5eb7;color:#fff;padding:0 10px;text-align:left;height:30px;line-height:30px;}
|
||||
#tnb .tnb_service:hover{background:#5969c3}
|
||||
#tnb button{width:100px;;border:0;border-radius:3px;background:#4e5eb7;color:#fff;padding:0 30px 0 10px;text-align:left;height:30px;position:relative;text-overflow: ellipsis;overflow: hidden;white-space: nowrap;}
|
||||
#tnb button span{display:block;text-indent:-999px;overflow:hidden;width:30px;border-radius:3px;height:30px;position:absolute;top:0;right:0;background:url(../img/op_btn.png) 50% 50% no-repeat #5969c3}
|
||||
#tnb button:hover {background:#5969c3}
|
||||
#tnb button{width:100px;border:0;border-radius:3px;background:#4e5eb7;color:#fff;padding:0 30px 0 10px;text-align:left;height:30px;position:relative;text-overflow: ellipsis;overflow: hidden;white-space: nowrap;}
|
||||
#tnb button span{display:block;text-indent:-999px;overflow:hidden;width:30px;border-radius:3px;height:30px;position:absolute;top:0;right:0;background:url(../img/op_btn.png) 50% 50% no-repeat #5969c3}
|
||||
#tnb button:hover {background:#5969c3}
|
||||
#tnb .tnb_mb_area{display:none;background:#5e6dc2;width:100px;position:absolute;padding:5px;margin-top:1px;}
|
||||
#tnb .tnb_mb_area a{padding:0}
|
||||
#tnb .tnb_mb_area li{float:none;}
|
||||
@@ -58,23 +59,25 @@ h2{font-size: 1.083em;font-weight: bold;margin:10px 0}
|
||||
#gnb .gnb_ul{position:relative;height:100%;background:#ebebeb;width:50px}
|
||||
#gnb .gnb_li{border-bottom:1px solid #ddd }
|
||||
#gnb .gnb_li button{background-color: #ebebeb;border:0;width:50px;height:50px;text-indent:-999px;overflow:hidden;}
|
||||
#gnb .gnb_li .menu-1{background:url(../img/menu-1-1.png) 50% 50% no-repeat #ebebeb }
|
||||
#gnb .on .menu-1{background:url(../img/menu-1.png) 50% 50% no-repeat #fff}
|
||||
#gnb .gnb_li .menu-2{background:url(../img/menu-2-1.png) 50% 50% no-repeat #ebebeb }
|
||||
#gnb .on .menu-2{background:url(../img/menu-2.png) 50% 50% no-repeat #fff}
|
||||
#gnb .gnb_li .menu-3{background:url(../img/menu-3-1.png) 50% 50% no-repeat #ebebeb }
|
||||
#gnb .on .menu-3{background:url(../img/menu-3.png) 50% 50% no-repeat #fff}
|
||||
#gnb .gnb_li .menu-4{background:url(../img/menu-7-1.png) 50% 50% no-repeat #ebebeb }
|
||||
#gnb .on .menu-4{background:url(../img/menu-7.png) 50% 50% no-repeat #fff}
|
||||
#gnb .gnb_li .menu-5{background:url(../img/menu-6-1.png) 50% 50% no-repeat #ebebeb }
|
||||
#gnb .on .menu-5{background:url(../img/menu-6.png) 50% 50% no-repeat #fff}
|
||||
#gnb .gnb_li .menu-6{background:url(../img/menu-4-1.png) 50% 50% no-repeat #ebebeb }
|
||||
#gnb .on .menu-6{background:url(../img/menu-4.png) 50% 50% no-repeat #fff}
|
||||
#gnb .gnb_li .btn_op{background:url(../img/menu_default.png) 50% 50% no-repeat #ebebeb}
|
||||
#gnb .on .btn_op{background:url(../img/menu_default_on.png) 50% 50% no-repeat #fff}
|
||||
#gnb .gnb_li .btn_op.menu-100{background:url(../img/menu-1-1.png) 50% 50% no-repeat #ebebeb }
|
||||
#gnb .on .btn_op.menu-100{background:url(../img/menu-1.png) 50% 50% no-repeat #fff}
|
||||
#gnb .gnb_li .btn_op.menu-200{background:url(../img/menu-2-1.png) 50% 50% no-repeat #ebebeb }
|
||||
#gnb .on .btn_op.menu-200{background:url(../img/menu-2.png) 50% 50% no-repeat #fff}
|
||||
#gnb .gnb_li .btn_op.menu-300{background:url(../img/menu-3-1.png) 50% 50% no-repeat #ebebeb }
|
||||
#gnb .on .btn_op.menu-300{background:url(../img/menu-3.png) 50% 50% no-repeat #fff}
|
||||
#gnb .gnb_li .btn_op.menu-400{background:url(../img/menu-7-1.png) 50% 50% no-repeat #ebebeb }
|
||||
#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-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}
|
||||
#gnb .gnb_oparea{display:none;position:absolute;top:0;left:50px;background:#fff;height:100%;width:170px;padding:20px;border-right:1px solid #dbdbdb;
|
||||
-webkit-box-shadow: 2px 0 2px rgba(150,150,150,100.1);
|
||||
-moz-box-shadow: 2px 0 2px rgba(150,150,150,0.1);
|
||||
box-shadow: 2px 0 2px rgba(150,150,150,0.1);}
|
||||
-webkit-box-shadow: 2px 0 2px rgba(150,150,150,100.1);
|
||||
-moz-box-shadow: 2px 0 2px rgba(150,150,150,0.1);
|
||||
box-shadow: 2px 0 2px rgba(150,150,150,0.1);}
|
||||
#gnb .on .gnb_oparea{display:block}
|
||||
#gnb .gnb_oparea h3{margin-bottom:10px;line-height:18px;font-size:1.17em}
|
||||
#gnb .gnb_oparea li{line-height:28px}
|
||||
@@ -178,10 +181,10 @@ a.btn_submit{background:#ff4081;color:#fff}
|
||||
.btn_add01 button {margin:0}
|
||||
|
||||
|
||||
.td_mng a.btn,.td_mng a{display:inline-block;height:26px;line-height:26px;border:0;;border-radius:3px;padding:0 8px;margin:1px;font-weight:normal}
|
||||
.td_mng button,.td_mng button.btn{height:26px;border:0;border-radius:3px;padding:0 8px;margin:1px;border:0;;font-weight:normal}
|
||||
.btn{height:30px;border:0;;border-radius:5px;padding:0 10px;font-weight:bold;font-size:1.09em;vertical-align:middle}
|
||||
a.btn{display:inline-block;height:30px;line-height:30px;border:0;;border-radius:5px;padding:0 10px;font-weight:bold;font-size:1.09em;;vertical-align:middle}
|
||||
.td_mng a.btn, .td_mng a{display:inline-block;height:26px;line-height:26px;border:0;border-radius:3px;padding:0 8px;margin:1px;font-weight:normal}
|
||||
.td_mng button, .td_mng button.btn{height:26px;border:0;border-radius:3px;padding:0 8px;margin:1px;font-weight:normal}
|
||||
.btn{height:30px;border:0;border-radius:5px;padding:0 10px;font-weight:bold;font-size:1.09em;vertical-align:middle}
|
||||
a.btn{display:inline-block;height:30px;line-height:30px;border:0;border-radius:5px;padding:0 10px;font-weight:bold;font-size:1.09em;vertical-align:middle}
|
||||
.btn_submit{background:#ff4081;color:#fff}
|
||||
a.btn_submit{background:#ff4081;color:#fff}
|
||||
.btn_submit:hover{background:#ff1464}
|
||||
@@ -192,19 +195,21 @@ a.btn_submit{background:#ff4081;color:#fff}
|
||||
.btn_03,a.btn_03{background:#3f51b5;color:#fff;}
|
||||
|
||||
.btn_frmline{display:inline-block;background:#9eacc6;color:#fff;height:35px;border:0;border-radius:5px;padding:0 10px}
|
||||
a.btn_frmline{display:inline-block;background:#9eacc6;color:#fff;height:35px;line-height:33px;border-radius:5px;padding:0 10px;text-decoration:none !important}
|
||||
a.btn_frmline{display:inline-block;background:#9eacc6;color:#fff;height:35px;line-height:33px;border-radius:5px;padding:0 10px;text-decoration:none !important}
|
||||
.btn_ov01{display:inline-block;line-height:30px;height:30px;font-size:0.92em;vertical-align:top}
|
||||
.btn_ov01:after{display:block;visibility:hidden;clear :both;content:""}
|
||||
.btn_ov01 .ov_txt{float:left;background:#9eacc6;color:#fff;border-radius:5px 0 0 5px;padding:0 5px}
|
||||
.btn_ov01 .ov_num{float:left;background:#ededed;color:#666;border-radius:0 5px 5px 0;padding:0 5px}
|
||||
a.btn_ov02,a.ov_listall{display:inline-block;line-height:30px;height:30px;font-size:0.92em;background:#565e8c;color:#fff;vertical-align:top;border-radius:5px;padding:0 7px }
|
||||
a.btn_ov02:hover,a.ov_listall:hover{background:#3f51b5}
|
||||
|
||||
.local_ov01.local_ov [data-tooltip-text]:hover {position:relative}
|
||||
.local_ov01.local_ov [data-tooltip-text]:hover:after{line-height:20px;background-color:#000;background-color:rgba(0,0,0,0.8);-webkit-box-shadow:0 0 3px 1px rgba(50,50,50,0.4);-moz-box-shadow:0 0 3px 1px rgba(50,50,50,0.4);box-shadow:0 0 3px 1px rgba(50,50,50,0.4);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;color:#FFF;font-size:11px;content:attr(data-tooltip-text);white-space: pre;margin-bottom:10px;top:130%;left:0;padding:7px 12px;position:absolute;max-width:500px;word-wrap:break-word;z-index:9999}
|
||||
|
||||
/*form*/
|
||||
.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}
|
||||
.frm_input{height:35px;line-height:32px;border:1px solid #d5d5d5;}
|
||||
.frm_input_full{width:100%}
|
||||
.required{background:url('../img/wrest.gif') top right no-repeat #fff !important}
|
||||
.required{background:url('../img/wrest.gif') top right no-repeat #fff !important}
|
||||
select{height:35px;line-height:32px;border:1px solid #d5d5d5;}
|
||||
textarea{width:100%;border:1px solid #d5d5d5;min-height:80px}
|
||||
legend {position:absolute;width:0;height:0;font-size:0;line-height:0;text-indent:-9999em;border:0;overflow:hidden}
|
||||
@@ -229,7 +234,7 @@ legend {position:absolute;width:0;height:0;font-size:0;line-height:0;text-indent
|
||||
.color_st03{background:#b668d0;color:#fff;display:inline-block;padding:0 3px;font-size:0.92em;line-height:18px}
|
||||
.color_st04{background:#ffa700;color:#fff;display:inline-block;padding:0 3px;font-size:0.92em;line-height:18px}
|
||||
.color_st05{background:#688fef;color:#fff;display:inline-block;padding:0 3px;font-size:0.92em;line-height:18px}
|
||||
.color_st06{;color:#ff0000;border:1px solid #ff0000;display:inline-block;padding:0 3px;font-size:0.92em;line-height:18px}
|
||||
.color_st06{color:#ff0000;border:1px solid #ff0000;display:inline-block;padding:0 3px;font-size:0.92em;line-height:18px}
|
||||
|
||||
/* 폼 안내글 */
|
||||
.frm_info {display:block;padding:0 0 5px;color:#5b747e}
|
||||
@@ -239,7 +244,7 @@ legend {position:absolute;width:0;height:0;font-size:0;line-height:0;text-indent
|
||||
.anchor:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.anchor li{float:left;margin-left:-1px;list-style:none}
|
||||
.anchor a {display:inline-block;padding:5px 10px;border:1px solid #c8ced1;background:#d6dde1;text-decoration:none}
|
||||
.anchor .selected{background:#3f51b5}
|
||||
.anchor .selected{background:#3f51b5}
|
||||
|
||||
|
||||
|
||||
@@ -258,22 +263,22 @@ border-bottom: 5px solid black;}
|
||||
|
||||
/* 페이지 내 검색 */
|
||||
.local_sch{}
|
||||
.local_sch:after ,.local_sch div:after{display:block;visibility:hidden;clear:both;content:""}
|
||||
.local_sch .btn_sch{width:30px;height:30px;border:0;padding:0;float:left;background:url(../img/sch_btn.png) no-repeat 50% 50%;border:1px solid #dcdcdc;border-left:0;text-indent:-999px;overflow:hidden}
|
||||
.local_sch .btn_sch2{width:35px;height:35px;border:0;padding:0;background:url(../img/sch_btn.png) no-repeat 50% 50% #eee;border:1px solid #dcdcdc;text-indent:-999px;overflow:hidden}
|
||||
.local_sch:after, .local_sch div:after{display:block;visibility:hidden;clear:both;content:""}
|
||||
.local_sch .btn_sch{width:30px;height:30px;border:1px solid #dcdcdc;border-left:0;padding:0;float:left;background:url(../img/sch_btn.png) no-repeat 50% 50%;text-indent:-999px;overflow:hidden}
|
||||
.local_sch .btn_sch2{width:35px;height:35px;border:1px solid #dcdcdc;padding:0;background:url(../img/sch_btn.png) no-repeat 50% 50% #eee;text-indent:-999px;overflow:hidden}
|
||||
|
||||
.local_sch .sch_input{height:30px;border:1px solid #dcdcdc;border-right:0;;padding:0 5px;float:left;}
|
||||
.local_sch .sch_input{height:30px;border:1px solid #dcdcdc;border-right:0;padding:0 5px;float:left;}
|
||||
.local_sch select{height:30px;margin-right:3px;border:1px solid #dcdcdc}
|
||||
.local_sch01{margin: 10px 0;}
|
||||
.local_sch02{}
|
||||
.local_sch01 .frm_input{height:30px;border:1px solid #dcdcdc;padding:0 5px;}
|
||||
.local_sch01 .btn_submit{width:30px;height:30px;border:0;padding:0;background:url(../img/sch_btn.png) no-repeat 50% 50% #eee;border:1px solid #dcdcdc;text-indent:-999px;overflow:hidden}
|
||||
.local_sch03{;padding:5px 15px;background:#e9ebf9;margin:10px 0}
|
||||
.local_sch01 .btn_submit{width:30px;height:30px;padding:0;background:url(../img/sch_btn.png) no-repeat 50% 50% #eee;border:1px solid #dcdcdc;text-indent:-999px;overflow:hidden}
|
||||
.local_sch03{padding:5px 15px;background:#e9ebf9;margin:10px 0}
|
||||
.local_sch div{margin:5px 0;}
|
||||
.local_sch03 strong{display:inline-block;width:70px;}
|
||||
.local_sch03 label{margin-right:5px;display:inline-block}
|
||||
.local_sch03 label{margin-right:5px;display:inline-block}
|
||||
.local_sch03 button{height:30px;padding:0 5px;border:0;background:#9eacc6;color:#fff;}
|
||||
.local_sch03 .btn_submit{height:30px;padding:0 5px;border:0;;color:#fff;}
|
||||
.local_sch03 .btn_submit{height:30px;padding:0 5px;border:0;color:#fff;}
|
||||
.local_sch03 .frm_input{height:30px;border:1px solid #dcdcdc;padding:0 5px;}
|
||||
/* 페이지 내 실행 */
|
||||
.local_cmd {min-width:960px}
|
||||
@@ -300,7 +305,7 @@ border-bottom: 5px solid black;}
|
||||
/* 페이지 내 카운트 */
|
||||
.local_ov {min-width:960px}
|
||||
|
||||
.local_ov01 {position:relative;;margin: 10px 0;}
|
||||
.local_ov01 {position:relative;margin: 10px 0;}
|
||||
.local_ov01 .ov_a {display:inline-block;margin:0 0 0 5px;padding:0 0 0 10px;border-left:1px solid #ccc;color:#ff3061}
|
||||
|
||||
|
||||
@@ -401,6 +406,9 @@ tfoot th {}
|
||||
#anc_bo_extra label {display:inline-block;width:100px}
|
||||
#anc_bo_extra input {margin-right:10px}
|
||||
|
||||
/* 환경설정 및 게시판 여분필드 값 input style 로빈아빠님 제안 */
|
||||
#anc_bo_extra input.extra-value-input, #anc_cf_extra input.extra-value-input{width:calc(100% - 370px);}
|
||||
|
||||
/* 접속자집계 목록 */
|
||||
.tbl_visit_list td {text-align:center}
|
||||
.visit_bar {position:relative}
|
||||
@@ -510,8 +518,24 @@ td.td_grpset {width:160px;border-left:1px solid #e9ecee;text-align:center}
|
||||
/* 환경설정 */
|
||||
.cf_cert_hide {display:none}
|
||||
|
||||
.server_config_views {margin-bottom:10px}
|
||||
.rules_label {margin-left:5px;vertical-align:middle}
|
||||
|
||||
.is_rewrite .connect-close {position:absolute;top:10px;right:10px;margin:0;padding:0;width:30px;height:30px;border:0;background:transparent;color:#383838;cursor:pointer;font-size:15px}
|
||||
.is_rewrite .connect-close:hover {color:#ff5191}
|
||||
.is_rewrite .connect-close .fa {margin:0 0 0 1px}
|
||||
.is_rewrite .connect-close .txt {position:absolute;line-height:0;font-size:0;overflow:hidden}
|
||||
.is_rewrite textarea{width:99%;min-height:260px}
|
||||
.is_rewrite .copy_title{margin-top:15px;margin-bottom:10px;font-weight:bold;text-align:left}
|
||||
.is_rewrite .info-success{color:#155724}
|
||||
.is_rewrite .info-warning{color:#856404}
|
||||
|
||||
.icode_old_version th{background-color:#FFFCED}
|
||||
.icode_json_version th{background-color:#F6F1FF}
|
||||
.cf_tr_hide {display:none}
|
||||
|
||||
/* 관리권한설정 */
|
||||
#add_admin fieldset {margin-top:20px}
|
||||
#add_admin fieldset {margin-top:20px;overflow:auto;padding:2px 6px;line-height:1.4;resize:vertical}
|
||||
|
||||
/* 메일 테스트 */
|
||||
|
||||
@@ -602,7 +626,7 @@ td.td_grpset {width:160px;border-left:1px solid #e9ecee;text-align:center}
|
||||
-moz-box-shadow: 2px 2px 3px 0px rgba(0,0,0,0.2);
|
||||
box-shadow: 2px 2px 3px 0px rgba(0,0,0,0.2);}
|
||||
.sv_wrap .sv:before{content: "";position: absolute;top: -6px;left: 15px;width: 0;height: 0;border-style: solid;border-width: 0 6px 6px 6px;border-color: transparent transparent #333 transparent;}
|
||||
.sv_wrap .sv a {display:inline-block;margin:0;padding:0 10px;line-height:30px;width:100px;font-weight:normal;color:#bbb }
|
||||
.sv_wrap .sv a {display:inline-block;margin:0;padding:0 10px;line-height:30px;width:100px;font-weight:normal;color:#bbb }
|
||||
.sv_wrap .sv a:hover{background:#000;color:#fff}
|
||||
.sv_member{color:#333}
|
||||
.sv_on {display:block !important;position:absolute;top:23px;left:0px;width:auto;height:auto}
|
||||
@@ -683,44 +707,53 @@ box-shadow: 2px 2px 3px 0px rgba(0,0,0,0.2);}
|
||||
.sevice_2 .svc_design{overflow:hidden;height:210px;position:relative}
|
||||
.sevice_2 .svc_design .svc_btn a{margin:0 0 20px}
|
||||
|
||||
/* 캡챠 */
|
||||
#captcha {display:inline-block;position:relative}
|
||||
#captcha legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden;}
|
||||
#captcha #captcha_img {height:40px;border:1px solid #898989;vertical-align:top;padding:0;margin:0}
|
||||
#captcha #captcha_mp3 {margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;background:url('../../img/captcha2.png') no-repeat;text-indent:-999px;border-radius:3px}
|
||||
#captcha #captcha_reload {margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;background:url('../../img/captcha2.png') no-repeat 0 -40px;text-indent:-999px;border-radius:3px}
|
||||
#captcha #captcha_key {margin:0 0 0 3px;padding:0 5px;width:90px;height:40px;border:1px solid #ccc;background:#fff;font-size:1.333em;font-weight:bold;text-align:center;border-radius:3px;vertical-align:top}
|
||||
#captcha #captcha_info {display:block;margin:5px 0 0;font-size:0.95em;letter-spacing:-0.1em}
|
||||
|
||||
/*테마*/
|
||||
.theme_p{margin:0 0 10px }
|
||||
#theme_list{padding:0;margin:0;list-style:none; width: 1000px;position:relative}
|
||||
#theme_list{padding:0;margin:0;list-style:none; width: 1000px;position:relative}
|
||||
#theme_list:after{display:block;visibility:hidden;clear:both;content:""}
|
||||
#theme_list li{margin:10px 10px 10px 0 ;margin:0;float:left;}
|
||||
#theme_list li{margin:10px 10px 10px 0;float:left}
|
||||
#theme_list li:after{display:block;visibility:hidden;clear:both;content:""}
|
||||
#theme_list li .tmli_if{border: 1px solid #d1dee2;width:302px;}
|
||||
#theme_list li .tmli_if>img{width:300px;height:225px;}
|
||||
#theme_list li .tmli_if:hover>img{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";filter: alpha(opacity=50);-moz-opacity:0.5;-khtml-opacity: 0.5;opacity: 0.5;}
|
||||
#theme_list li .tmli_tit{position:relative; border-top: 1px solid #d1dee2; background: #e5ecef;}
|
||||
#theme_list li .tmli_tit p{height:40px;line-height:40px;padding:0 10px 0;font-weight:bold;text-overflow: ellipsis; overflow: hidden; white-space: nowrap;}
|
||||
#theme_list li .tmli_tit p{height:40px;line-height:40px;padding:0 10px 0;font-weight:bold;text-overflow: ellipsis; overflow: hidden; white-space: nowrap;}
|
||||
#theme_list li .tmli_tit button.tmli_dt{position:absolute;top:8px;right:10px;padding:5px;background:#111;color:#fff;display:none;border:none}
|
||||
#theme_list li .tmli_if:hover button.tmli_dt{display:block}
|
||||
#theme_list li .theme_sl{float:left;border:none;margin-top:5px;padding:0 5px;height:26px;background:#999;color:#fff}
|
||||
#theme_list li .theme_sl:hover{background:#ff3061}
|
||||
#theme_list li .theme_deactive{margin-left:4px}
|
||||
#theme_list li .theme_sl_use{background:#ff3061;line-height:26px}
|
||||
#theme_list li .theme_pr{float:right;margin-top:5px;padding:0 5px;height:26px;line-height:24px; border: 1px solid #ccc; background: #fafafa; }
|
||||
#theme_list li .theme_preview{ float: right; margin-top: 5px; padding:0 5px;height:26px; border: 1px solid #ccc; background: #fafafa; margin-right:3px}
|
||||
#theme_list li .theme_pr{float:right;margin-top:5px;padding:0 5px;height:26px;line-height:24px; border: 1px solid #ccc; background: #fafafa; }
|
||||
#theme_list li .theme_preview{ float: right; margin-top: 5px; padding:0 5px;height:26px; border: 1px solid #ccc; background: #fafafa; margin-right:3px}
|
||||
|
||||
|
||||
#theme_detail{position:fixed;top:50%;height:540px;width:900px;margin-top:-271px;background:#fff;background:#f3f3f3;border:1px solid #000;
|
||||
-webkit-box-shadow: 1px 2px 5px rgba(150,150,150,100.5);
|
||||
-moz-box-shadow: 1px 2px 5px rgba(150,150,150,0.5);
|
||||
box-shadow: 1px 2px 5px rgba(150,150,150,0.5);z-index:1000}
|
||||
-webkit-box-shadow: 1px 2px 5px rgba(150,150,150,100.5);
|
||||
-moz-box-shadow: 1px 2px 5px rgba(150,150,150,0.5);
|
||||
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_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{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}
|
||||
.theme_dt_if table td{padding:5px;background:#fff;border-bottom:1px solid #f3f3f3;line-height:1.56em}
|
||||
.theme_dt_if table td a{text-decoration:underline}
|
||||
.theme_dt_if p{line-height:1.5em}
|
||||
.if_p_bg{display:inline-block;width:20px;height:1px ;background:#000;margin:30px 0 10px}
|
||||
#theme_detail .theme_dt_btn{position:absolute;top:0px;right:0px;background:#fff;}
|
||||
#theme_detail .theme_dt_btn .close_btn{background:url('../img/close.png') 50% 50% no-repeat;width:40px;height:40px;overflow:hidden;border:0;text-indent:-99999px;border-left:1px solid #d8d8d8}
|
||||
#theme_detail .theme_dt_btn .close_btn{border:0;border-left:1px solid #d8d8d8;background:url('../img/close.png') 50% 50% no-repeat;width:40px;height:40px;overflow:hidden;text-indent:-99999px}
|
||||
|
||||
#theme_detail .theme_dt_btn .close_btn:hover{background-color:#eceffc}
|
||||
#theme_detail .theme_dt_btn .btn_03{line-height:28px;display:inline-block;vertical-align:top;margin-top:6px;padding:0 6px;border-radius:5px}
|
||||
@@ -747,4 +780,14 @@ box-shadow: 2px 2px 3px 0px rgba(0,0,0,0.2);}
|
||||
#processing{margin: 0 auto;padding: 70px 0;border: 1px solid #eee;background: #f9f9f9;text-align:center;}
|
||||
#processing p{font-size:1.2em}
|
||||
.check_processing {width:300px;height:300px;margin:0 auto;background:url(../img/check.png) no-repeat 50% 50% }
|
||||
#processing button{background:#ff3061;border:none;color:#fff;padding: 15px;width:200px;margin-top:15px;border-radius:5px;font-weight:bold;font-size:1.167em}
|
||||
#processing button{background:#ff3061;border:none;color:#fff;padding: 15px;width:200px;margin-top:15px;border-radius:5px;font-weight:bold;font-size:1.167em}
|
||||
|
||||
@media only screen and (max-device-width : 768px) and (orientation : landscape){
|
||||
/* Styles */
|
||||
input[type="text"]{max-width:200px}
|
||||
}
|
||||
|
||||
@media only screen and (max-device-width : 480px) and (orientation : portrait){
|
||||
/* Styles */
|
||||
input[type="text"]{max-width:200px}
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
@charset "utf-8";
|
||||
#preview_item{height:50px}
|
||||
#preview_item ul{margin:0;padding:0;top:0;width:100%margin:0 auto;text-align:center;background:#000;position:fixed;top:0;z-index:999999;width:100%;}
|
||||
#preview_item ul{margin:0;padding:0;top:0;width:100%;margin:0 auto;text-align:center;background:#000;position:fixed;top:0;z-index:999999}
|
||||
#preview_item ul li{list-style:none;display:inline-block;height:50px;line-height:50px;padding:0 2px;*display:inline; zoom:1;}
|
||||
#preview_item ul li a{color:#ccc;padding:0 8px;height:32px;line-height:30px;background:none;font-weight:bold;border-radius:5px;display:inline-block;vertical-align:middle;border:1px solid #aaa;}
|
||||
#preview_item ul li a:hover{background:#fff;text-decoration:none;border:1px solid #ccc;color:#333}
|
||||
|
||||
@@ -0,0 +1,192 @@
|
||||
<?php
|
||||
$sub_menu = '100410';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check_menu($auth, $sub_menu, 'r');
|
||||
|
||||
$g5['title'] = 'DB 업그레이드';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$is_check = false;
|
||||
|
||||
//소셜 로그인 관련 필드 및 구글 리챕챠 필드 추가
|
||||
if(!isset($config['cf_social_login_use'])) {
|
||||
sql_query("ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_social_login_use` tinyint(4) NOT NULL DEFAULT '0' AFTER `cf_googl_shorturl_apikey`,
|
||||
ADD `cf_google_clientid` varchar(100) NOT NULL DEFAULT '' AFTER `cf_twitter_secret`,
|
||||
ADD `cf_google_secret` varchar(100) NOT NULL DEFAULT '' AFTER `cf_google_clientid`,
|
||||
ADD `cf_naver_clientid` varchar(100) NOT NULL DEFAULT '' AFTER `cf_google_secret`,
|
||||
ADD `cf_naver_secret` varchar(100) NOT NULL DEFAULT '' AFTER `cf_naver_clientid`,
|
||||
ADD `cf_kakao_rest_key` varchar(100) NOT NULL DEFAULT '' AFTER `cf_naver_secret`,
|
||||
ADD `cf_social_servicelist` varchar(255) NOT NULL DEFAULT '' AFTER `cf_social_login_use`,
|
||||
ADD `cf_payco_clientid` varchar(100) NOT NULL DEFAULT '' AFTER `cf_social_servicelist`,
|
||||
ADD `cf_payco_secret` varchar(100) NOT NULL DEFAULT '' AFTER `cf_payco_clientid`,
|
||||
ADD `cf_captcha` varchar(100) NOT NULL DEFAULT '' AFTER `cf_kakao_js_apikey`,
|
||||
ADD `cf_recaptcha_site_key` varchar(100) NOT NULL DEFAULT '' AFTER `cf_captcha`,
|
||||
ADD `cf_recaptcha_secret_key` varchar(100) NOT NULL DEFAULT '' AFTER `cf_recaptcha_site_key`
|
||||
", true);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
//소셜 로그인 관련 필드 카카오 클라이언트 시크릿 추가
|
||||
if(!isset($config['cf_kakao_client_secret'])) {
|
||||
sql_query("ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_kakao_client_secret` varchar(100) NOT NULL DEFAULT '' AFTER `cf_kakao_rest_key`
|
||||
", true);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// 회원 이미지 관련 필드 추가
|
||||
if(!isset($config['cf_member_img_size'])) {
|
||||
sql_query("ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_member_img_size` int(11) NOT NULL DEFAULT '0' AFTER `cf_member_icon_height`,
|
||||
ADD `cf_member_img_width` int(11) NOT NULL DEFAULT '0' AFTER `cf_member_img_size`,
|
||||
ADD `cf_member_img_height` int(11) NOT NULL DEFAULT '0' AFTER `cf_member_img_width`
|
||||
", true);
|
||||
|
||||
$sql = " update {$g5['config_table']} set cf_member_img_size = 50000, cf_member_img_width = 60, cf_member_img_height = 60 ";
|
||||
sql_query($sql, false);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// 소셜 로그인 관리 테이블 없을 경우 생성
|
||||
if( isset($g5['social_profile_table']) && !sql_query(" DESC {$g5['social_profile_table']} ", false)) {
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['social_profile_table']}` (
|
||||
`mp_no` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`mb_id` varchar(255) NOT NULL DEFAULT '',
|
||||
`provider` varchar(50) NOT NULL DEFAULT '',
|
||||
`object_sha` varchar(45) NOT NULL DEFAULT '',
|
||||
`identifier` varchar(255) NOT NULL DEFAULT '',
|
||||
`profileurl` varchar(255) NOT NULL DEFAULT '',
|
||||
`photourl` varchar(255) NOT NULL DEFAULT '',
|
||||
`displayname` varchar(150) NOT NULL DEFAULT '',
|
||||
`description` varchar(255) NOT NULL DEFAULT '',
|
||||
`mp_register_day` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`mp_latest_day` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
UNIQUE KEY `mp_no` (`mp_no`),
|
||||
KEY `mb_id` (`mb_id`),
|
||||
KEY `provider` (`provider`)
|
||||
) ", true);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// 게시판 짧은 주소
|
||||
$sql = " select bo_table from {$g5['board_table']} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
while ($row = sql_fetch_array($result)) {
|
||||
$write_table = $g5['write_prefix'] . $row['bo_table']; // 게시판 테이블 전체이름
|
||||
|
||||
$sql = " SHOW COLUMNS FROM {$write_table} LIKE 'wr_seo_title' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if( !$row ){
|
||||
sql_query("ALTER TABLE `{$write_table}`
|
||||
ADD `wr_seo_title` varchar(200) NOT NULL DEFAULT '' AFTER `wr_content`,
|
||||
ADD INDEX `wr_seo_title` (`wr_seo_title`);
|
||||
", false);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
}
|
||||
|
||||
// 내용 관리 짧은 주소
|
||||
$sql = " SHOW COLUMNS FROM `{$g5['content_table']}` LIKE 'co_seo_title' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if( !$row ){
|
||||
sql_query("ALTER TABLE `{$g5['content_table']}`
|
||||
ADD `co_seo_title` varchar(200) NOT NULL DEFAULT '' AFTER `co_content`,
|
||||
ADD INDEX `co_seo_title` (`co_seo_title`);
|
||||
", false);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
$sql = "select * from {$g5['content_table']} limit 100 ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
while ($row = sql_fetch_array($result)) {
|
||||
|
||||
if( ! $row['co_seo_title']){
|
||||
|
||||
$co_seo_title = exist_seo_title_recursive('content', generate_seo_title($row['co_subject']), $g5['content_table'], $row['co_id']);
|
||||
|
||||
$sql = " update {$g5['content_table']}
|
||||
set co_seo_title = '$co_seo_title'
|
||||
where co_id = '{$row['co_id']}' ";
|
||||
sql_query($sql);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 메모 테이블
|
||||
$sql = " SHOW COLUMNS FROM `{$g5['memo_table']}` LIKE 'me_send_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if( !$row ){
|
||||
sql_query("ALTER TABLE `{$g5['memo_table']}`
|
||||
ADD `me_send_id` INT(11) NOT NULL DEFAULT '0',
|
||||
ADD `me_type` ENUM('send','recv') NOT NULL DEFAULT 'recv',
|
||||
ADD `me_send_ip` VARCHAR(100) NOT NULL DEFAULT '',
|
||||
CHANGE COLUMN `me_id` `me_id` INT(11) NOT NULL AUTO_INCREMENT;
|
||||
", false);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// 읽지 않은 메모 수 칼럼
|
||||
if(!isset($member['mb_memo_cnt'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['member_table']}`
|
||||
ADD `mb_memo_cnt` int(11) NOT NULL DEFAULT '0' AFTER `mb_memo_call`", true);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// 스크랩 읽은 수 추가
|
||||
if(!isset($member['mb_scrap_cnt'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['member_table']}`
|
||||
ADD `mb_scrap_cnt` int(11) NOT NULL DEFAULT '0' AFTER `mb_memo_cnt`", true);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// 짧은 URL 주소를 사용 여부 필드 추가
|
||||
if (!isset($config['cf_bbs_rewrite'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_bbs_rewrite` tinyint(4) NOT NULL DEFAULT '0' AFTER `cf_link_target` ", true);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// 파일테이블에 추가 칼럼
|
||||
|
||||
$sql = " SHOW COLUMNS FROM `{$g5['board_file_table']}` LIKE 'bf_fileurl' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if( !$row ) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_file_table']}`
|
||||
ADD COLUMN `bf_fileurl` VARCHAR(255) NOT NULL DEFAULT '' AFTER `bf_content`,
|
||||
ADD COLUMN `bf_thumburl` VARCHAR(255) NOT NULL DEFAULT '' AFTER `bf_fileurl`,
|
||||
ADD COLUMN `bf_storage` VARCHAR(50) NOT NULL DEFAULT '' AFTER `bf_thumburl`", true);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
$is_check = run_replace('admin_dbupgrade', $is_check);
|
||||
|
||||
$db_upgrade_msg = $is_check ? 'DB 업그레이드가 완료되었습니다.' : '더 이상 업그레이드 할 내용이 없습니다.<br>현재 DB 업그레이드가 완료된 상태입니다.';
|
||||
?>
|
||||
|
||||
<div class="local_desc01 local_desc">
|
||||
<p>
|
||||
<?php echo $db_upgrade_msg; ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
+9
-5
@@ -3,13 +3,18 @@ $sub_menu = '300700';
|
||||
include_once('./_common.php');
|
||||
include_once(G5_EDITOR_LIB);
|
||||
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
auth_check_menu($auth, $sub_menu, "w");
|
||||
|
||||
$fm_id = isset($_GET['fm_id']) ? (int) $_GET['fm_id'] : 0;
|
||||
$fa_id = isset($_GET['fa_id']) ? (int) $_GET['fa_id'] : 0;
|
||||
|
||||
$sql = " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
|
||||
$fm = sql_fetch($sql);
|
||||
|
||||
$html_title = 'FAQ '.$fm['fm_subject'];
|
||||
|
||||
$fa = array('fa_id'=>0, 'fm_id'=>0, 'fa_subject'=>'', 'fa_content'=>'', 'fa_order'=>0);
|
||||
|
||||
if ($w == "u")
|
||||
{
|
||||
$html_title .= " 수정";
|
||||
@@ -51,11 +56,11 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">질문</th>
|
||||
<td><?php echo editor_html('fa_subject', get_text($fa['fa_subject'], 0)); ?></td>
|
||||
<td><?php echo editor_html('fa_subject', get_text(html_purifier($fa['fa_subject']), 0)); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">답변</th>
|
||||
<td><?php echo editor_html('fa_content', get_text($fa['fa_content'], 0)); ?></td>
|
||||
<td><?php echo editor_html('fa_content', get_text(html_purifier($fa['fa_content']), 0)); ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -94,5 +99,4 @@ function frmfaqform_check(f)
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
+10
-5
@@ -5,13 +5,19 @@ include_once('./_common.php');
|
||||
if ($w == "u" || $w == "d")
|
||||
check_demo();
|
||||
|
||||
if ($W == 'd')
|
||||
auth_check($auth[$sub_menu], "d");
|
||||
if ($w == 'd')
|
||||
auth_check_menu($auth, $sub_menu, "d");
|
||||
else
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
auth_check_menu($auth, $sub_menu, "w");
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$fm_id = isset($_REQUEST['fm_id']) ? (int) $_REQUEST['fm_id'] : 0;
|
||||
$fa_id = isset($_REQUEST['fa_id']) ? (int) $_REQUEST['fa_id'] : 0;
|
||||
$fa_subject = isset($_POST['fa_subject']) ? $_POST['fa_subject'] : '';
|
||||
$fa_content = isset($_POST['fa_content']) ? $_POST['fa_content'] : '';
|
||||
$fa_order = isset($_POST['fa_order']) ? (int) $_POST['fa_order'] : 0;
|
||||
|
||||
$sql_common = " fa_subject = '$fa_subject',
|
||||
fa_content = '$fa_content',
|
||||
fa_order = '$fa_order' ";
|
||||
@@ -41,5 +47,4 @@ else if ($w == "d")
|
||||
if ($w == 'd')
|
||||
goto_url("./faqlist.php?fm_id=$fm_id");
|
||||
else
|
||||
goto_url("./faqform.php?w=u&fm_id=$fm_id&fa_id=$fa_id");
|
||||
?>
|
||||
goto_url("./faqform.php?w=u&fm_id=$fm_id&fa_id=$fa_id");
|
||||
+16
-9
@@ -2,10 +2,16 @@
|
||||
$sub_menu = '300700';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
auth_check_menu($auth, $sub_menu, "r");
|
||||
|
||||
$g5['title'] = 'FAQ 상세관리';
|
||||
if ($fm_subject) $g5['title'] .= ' : '.$fm_subject;
|
||||
if (isset($_REQUEST['fm_subject'])){
|
||||
$fm_subject = clean_xss_tags($_REQUEST['fm_subject'], 1, 1, 255);
|
||||
$g5['title'] .= ' : '.$fm_subject;
|
||||
}
|
||||
|
||||
$fm_id = (int) $fm_id;
|
||||
|
||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
|
||||
$sql = " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
|
||||
@@ -16,7 +22,7 @@ $sql_common = " from {$g5['faq_table']} where fm_id = '$fm_id' ";
|
||||
// 테이블의 전체 레코드수만 얻음
|
||||
$sql = " select count(*) as cnt " . $sql_common;
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row[cnt];
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$sql = "select * $sql_common order by fa_order , fa_id ";
|
||||
$result = sql_query($sql);
|
||||
@@ -54,7 +60,7 @@ $result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$row1 = sql_fetch(" select COUNT(*) as cnt from {$g5['faq_table']} where fm_id = '{$row['fm_id']}' ");
|
||||
$cnt = $row1[cnt];
|
||||
$cnt = $row1['cnt'];
|
||||
|
||||
$s_mod = icon("수정", "");
|
||||
$s_del = icon("삭제", "");
|
||||
@@ -62,15 +68,17 @@ $result = sql_query($sql);
|
||||
$num = $i + 1;
|
||||
|
||||
$bg = 'bg'.($i%2);
|
||||
|
||||
$fa_subject = conv_content($row['fa_subject'], 1);
|
||||
?>
|
||||
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_num"><?php echo $num; ?></td>
|
||||
<td class="td_left"><?php echo stripslashes($row['fa_subject']); ?></td>
|
||||
<td class="td_left"><?php echo $fa_subject; ?></td>
|
||||
<td class="td_num"><?php echo $row['fa_order']; ?></td>
|
||||
<td class="td_mng td_mng_m">
|
||||
<a href="./faqform.php?w=u&fm_id=<?php echo $row['fm_id']; ?>&fa_id=<?php echo $row['fa_id']; ?>" class="btn btn_03"><span class="sound_only"><?php echo stripslashes($row['fa_subject']); ?> </span>수정</a>
|
||||
<a href="./faqformupdate.php?w=d&fm_id=<?php echo $row['fm_id']; ?>&fa_id=<?php echo $row['fa_id']; ?>" onclick="return delete_confirm(this);" class="btn btn_02"><span class="sound_only"><?php echo stripslashes($row['fa_subject']); ?> </span>삭제</a>
|
||||
<a href="./faqform.php?w=u&fm_id=<?php echo $row['fm_id']; ?>&fa_id=<?php echo $row['fa_id']; ?>" class="btn btn_03"><span class="sound_only"><?php echo $fa_subject; ?> </span>수정</a>
|
||||
<a href="./faqformupdate.php?w=d&fm_id=<?php echo $row['fm_id']; ?>&fa_id=<?php echo $row['fa_id']; ?>" onclick="return delete_confirm(this);" class="btn btn_02"><span class="sound_only"><?php echo $fa_subject; ?> </span>삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -88,5 +96,4 @@ $result = sql_query($sql);
|
||||
|
||||
|
||||
<?php
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
+10
-8
@@ -3,11 +3,11 @@ $sub_menu = '300700';
|
||||
include_once('./_common.php');
|
||||
include_once(G5_EDITOR_LIB);
|
||||
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
auth_check_menu($auth, $sub_menu, "w");
|
||||
|
||||
$html_title = 'FAQ';
|
||||
|
||||
$fm_id = preg_replace('/[^0-9]/', '', $fm_id);
|
||||
$fm_id = isset($_GET['fm_id']) ? preg_replace('/[^0-9]/', '', $_GET['fm_id']) : 0;
|
||||
|
||||
if ($w == "u")
|
||||
{
|
||||
@@ -21,6 +21,7 @@ if ($w == "u")
|
||||
else
|
||||
{
|
||||
$html_title .= ' 입력';
|
||||
$fm = array('fm_order'=>'', 'fm_subject'=>'', 'fm_id'=>0, 'fm_head_html'=> '', 'fm_tail_html'=> '', 'fm_mobile_head_html' => '', 'fm_mobile_tail_html' => '');
|
||||
}
|
||||
|
||||
$g5['title'] = $html_title.' 관리';
|
||||
@@ -71,6 +72,7 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
<input type="file" name="fm_himg" id="fm_himg">
|
||||
<?php
|
||||
$himg = G5_DATA_PATH.'/faq/'.$fm['fm_id'].'_h';
|
||||
$himg_str = '';
|
||||
if (file_exists($himg)) {
|
||||
$size = @getimagesize($himg);
|
||||
if($size[0] && $size[0] > 750)
|
||||
@@ -95,6 +97,7 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
<input type="file" name="fm_timg" id="fm_timg">
|
||||
<?php
|
||||
$timg = G5_DATA_PATH.'/faq/'.$fm['fm_id'].'_t';
|
||||
$timg_str = '';
|
||||
if (file_exists($timg)) {
|
||||
$size = @getimagesize($timg);
|
||||
if($size[0] && $size[0] > 750)
|
||||
@@ -116,25 +119,25 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
<tr>
|
||||
<th scope="row">상단 내용</th>
|
||||
<td>
|
||||
<?php echo editor_html('fm_head_html', get_text($fm['fm_head_html'], 0)); ?>
|
||||
<?php echo editor_html('fm_head_html', get_text(html_purifier($fm['fm_head_html']), 0)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">하단 내용</th>
|
||||
<td>
|
||||
<?php echo editor_html('fm_tail_html', get_text($fm['fm_tail_html'], 0)); ?>
|
||||
<?php echo editor_html('fm_tail_html', get_text(html_purifier($fm['fm_tail_html']), 0)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">모바일상단 내용</th>
|
||||
<td>
|
||||
<?php echo editor_html('fm_mobile_head_html', get_text($fm['fm_mobile_head_html'], 0)); ?>
|
||||
<?php echo editor_html('fm_mobile_head_html', get_text(html_purifier($fm['fm_mobile_head_html']), 0)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">모바일하단 내용</th>
|
||||
<td>
|
||||
<?php echo editor_html('fm_mobile_tail_html', get_text($fm['fm_mobile_tail_html'], 0)); ?>
|
||||
<?php echo editor_html('fm_mobile_tail_html', get_text(html_purifier($fm['fm_mobile_tail_html']), 0)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -161,5 +164,4 @@ function frmfaqmasterform_check(f)
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
@@ -5,16 +5,26 @@ include_once('./_common.php');
|
||||
if ($w == "u" || $w == "d")
|
||||
check_demo();
|
||||
|
||||
if ($W == 'd')
|
||||
auth_check($auth[$sub_menu], "d");
|
||||
if ($w == 'd')
|
||||
auth_check_menu($auth, $sub_menu, "d");
|
||||
else
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
auth_check_menu($auth, $sub_menu, "w");
|
||||
|
||||
check_admin_token();
|
||||
|
||||
@mkdir(G5_DATA_PATH."/faq", G5_DIR_PERMISSION);
|
||||
@chmod(G5_DATA_PATH."/faq", G5_DIR_PERMISSION);
|
||||
|
||||
$fm_id = isset($_REQUEST['fm_id']) ? (int) $_REQUEST['fm_id'] : 0;
|
||||
$fm_himg_del = isset($_POST['fm_himg_del']) ? (int) $_POST['fm_himg_del'] : 0;
|
||||
$fm_timg_del = isset($_POST['fm_timg_del']) ? (int) $_POST['fm_timg_del'] : 0;
|
||||
$fm_subject = isset($_POST['fm_subject']) ? strip_tags(clean_xss_attributes($_POST['fm_subject'])) : '';
|
||||
$fm_head_html = isset($_POST['fm_head_html']) ? $_POST['fm_head_html'] : '';
|
||||
$fm_tail_html = isset($_POST['fm_tail_html']) ? $_POST['fm_tail_html'] : '';
|
||||
$fm_mobile_head_html = isset($_POST['fm_mobile_head_html']) ? $_POST['fm_mobile_head_html'] : '';
|
||||
$fm_mobile_tail_html = isset($_POST['fm_mobile_tail_html']) ? $_POST['fm_mobile_tail_html'] : '';
|
||||
$fm_order = isset($_POST['fm_order']) ? (int) $_POST['fm_order'] : 0;
|
||||
|
||||
if ($fm_himg_del) @unlink(G5_DATA_PATH."/faq/{$fm_id}_h");
|
||||
if ($fm_timg_del) @unlink(G5_DATA_PATH."/faq/{$fm_id}_t");
|
||||
|
||||
@@ -70,5 +80,4 @@ if ($w == "" || $w == "u")
|
||||
goto_url("./faqmasterform.php?w=u&fm_id=$fm_id");
|
||||
}
|
||||
else
|
||||
goto_url("./faqmasterlist.php");
|
||||
?>
|
||||
goto_url("./faqmasterlist.php");
|
||||
@@ -2,7 +2,7 @@
|
||||
$sub_menu = '300700';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
auth_check_menu($auth, $sub_menu, "r");
|
||||
|
||||
//dbconfig파일에 $g5['faq_table'] , $g5['faq_master_table'] 배열변수가 있는지 체크
|
||||
if( !isset($g5['faq_table']) || !isset($g5['faq_master_table']) ){
|
||||
@@ -124,5 +124,4 @@ $result = sql_query($sql);
|
||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&page="); ?>
|
||||
|
||||
<?php
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
+10
-11
@@ -2,6 +2,11 @@
|
||||
$sub_menu = '100000';
|
||||
include_once('./_common.php');
|
||||
|
||||
@include_once('./safe_check.php');
|
||||
if(function_exists('social_log_file_delete')){
|
||||
social_log_file_delete(86400); //소셜로그인 디버그 파일 24시간 지난것은 삭제
|
||||
}
|
||||
|
||||
$g5['title'] = '관리자메인';
|
||||
include_once ('./admin.head.php');
|
||||
|
||||
@@ -95,11 +100,6 @@ $colspan = 12;
|
||||
$mb_nick = get_sideview($row['mb_id'], get_text($row['mb_nick']), $row['mb_email'], $row['mb_homepage']);
|
||||
|
||||
$mb_id = $row['mb_id'];
|
||||
if ($row['mb_leave_date'])
|
||||
$mb_id = $mb_id;
|
||||
else if ($row['mb_intercept_date'])
|
||||
$mb_id = $mb_id;
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_mbid"><?php echo $mb_id ?></td>
|
||||
@@ -133,7 +133,7 @@ $sql_common = " from {$g5['board_new_table']} a, {$g5['board_table']} b, {$g5['g
|
||||
|
||||
if ($gr_id)
|
||||
$sql_common .= " and b.gr_id = '$gr_id' ";
|
||||
if ($view) {
|
||||
if (isset($view) && $view) {
|
||||
if ($view == 'w')
|
||||
$sql_common .= " and a.wr_id = a.wr_parent ";
|
||||
else if ($view == 'c')
|
||||
@@ -207,8 +207,8 @@ $colspan = 5;
|
||||
|
||||
<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 G5_BBS_URL ?>/board.php?bo_table=<?php echo $row['bo_table'] ?>"><?php echo cut_str($row['bo_subject'],20) ?></a></td>
|
||||
<td><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $row['bo_table'] ?>&wr_id=<?php echo $row2['wr_id'] ?><?php echo $comment_link ?>"><?php echo $comment ?><?php echo conv_subject($row2['wr_subject'], 100) ?></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>
|
||||
@@ -278,7 +278,7 @@ $colspan = 7;
|
||||
$link1 = $link2 = "";
|
||||
if (!preg_match("/^\@/", $row['po_rel_table']) && $row['po_rel_table'])
|
||||
{
|
||||
$link1 = '<a href="'.G5_BBS_URL.'/board.php?bo_table='.$row['po_rel_table'].'&wr_id='.$row['po_rel_id'].'" target="_blank">';
|
||||
$link1 = '<a href="'.get_pretty_url($row['po_rel_table'], $row['po_rel_id']).'" target="_blank">';
|
||||
$link2 = '</a>';
|
||||
}
|
||||
?>
|
||||
@@ -309,5 +309,4 @@ $colspan = 7;
|
||||
</section>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
include_once ('./admin.tail.php');
|
||||
+4
-5
@@ -4,21 +4,20 @@ include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'd');
|
||||
auth_check_menu($auth, $sub_menu, 'd');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$count = count($_POST['chk']);
|
||||
$post_count_chk = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
|
||||
|
||||
if(!$count)
|
||||
alert('삭제할 메일목록을 1개이상 선택해 주세요.');
|
||||
|
||||
for($i=0; $i<$count; $i++) {
|
||||
$ma_id = $_POST['chk'][$i];
|
||||
$ma_id = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
|
||||
|
||||
$sql = " delete from {$g5['mail_table']} where ma_id = '$ma_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
goto_url('./mail_list.php');
|
||||
?>
|
||||
goto_url('./mail_list.php');
|
||||
+7
-5
@@ -3,10 +3,13 @@ $sub_menu = "200300";
|
||||
include_once('./_common.php');
|
||||
include_once(G5_EDITOR_LIB);
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
auth_check_menu($auth, $sub_menu, 'r');
|
||||
|
||||
$html_title = '회원메일';
|
||||
|
||||
$ma_id = isset($_GET['ma_id']) ? (int) $_GET['ma_id'] : 0;
|
||||
$ma = array('ma_id'=>0, 'ma_subject'=>'', 'ma_content'=>'');
|
||||
|
||||
if ($w == 'u') {
|
||||
$html_title .= '수정';
|
||||
$readonly = ' readonly';
|
||||
@@ -40,11 +43,11 @@ include_once('./admin.head.php');
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="ma_subject">메일 제목<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="ma_subject" value="<?php echo $ma['ma_subject'] ?>" id="ma_subject" required class="required frm_input" size="100"></td>
|
||||
<td><input type="text" name="ma_subject" value="<?php echo get_sanitize_input($ma['ma_subject']); ?>" id="ma_subject" required class="required frm_input" size="100"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="ma_content">메일 내용<strong class="sound_only">필수</strong></label></th>
|
||||
<td><?php echo editor_html("ma_content", get_text($ma['ma_content'], 0)); ?></td>
|
||||
<td><?php echo editor_html("ma_content", get_text(html_purifier($ma['ma_content']), 0)); ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -80,5 +83,4 @@ document.fmailform.ma_subject.focus();
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
include_once('./admin.tail.php');
|
||||
+2
-3
@@ -2,7 +2,7 @@
|
||||
$sub_menu = '200300';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
auth_check_menu($auth, $sub_menu, 'r');
|
||||
|
||||
$sql_common = " from {$g5['mail_table']} ";
|
||||
|
||||
@@ -101,5 +101,4 @@ $(function() {
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
include_once ('./admin.tail.php');
|
||||
@@ -3,7 +3,9 @@ $sub_menu = "200300";
|
||||
include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
auth_check_menu($auth, $sub_menu, 'r');
|
||||
|
||||
$ma_id = isset($_REQUEST['ma_id']) ? (int) $_REQUEST['ma_id'] : 0;
|
||||
|
||||
$se = sql_fetch("select ma_subject, ma_content from {$g5['mail_table']} where ma_id = '{$ma_id}' ");
|
||||
|
||||
|
||||
@@ -5,7 +5,9 @@ include_once('./_common.php');
|
||||
if (!$config['cf_email_use'])
|
||||
alert('환경설정에서 \'메일발송 사용\'에 체크하셔야 메일을 발송할 수 있습니다.');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
auth_check_menu($auth, $sub_menu, 'r');
|
||||
|
||||
$ma_id = isset($_GET['ma_id']) ? (int) $_GET['ma_id'] : 0;
|
||||
|
||||
$sql = " select * from {$g5['mail_table']} where ma_id = '$ma_id' ";
|
||||
$ma = sql_fetch($sql);
|
||||
@@ -26,8 +28,8 @@ $last_option = explode('||', $ma['ma_last_option']);
|
||||
for ($i=0; $i<count($last_option); $i++) {
|
||||
$option = explode('=', $last_option[$i]);
|
||||
// 동적변수
|
||||
$var = $option[0];
|
||||
$$var = $option[1];
|
||||
$var = isset($option[0]) ? $option[0] : '';
|
||||
if( isset($option[1]) ) $$var = $option[1];
|
||||
}
|
||||
|
||||
if (!isset($mb_id1)) $mb_id1 = 1;
|
||||
@@ -35,6 +37,10 @@ if (!isset($mb_level_from)) $mb_level_from = 1;
|
||||
if (!isset($mb_level_to)) $mb_level_to = 10;
|
||||
if (!isset($mb_mailling)) $mb_mailling = 1;
|
||||
|
||||
$mb_id1_from = isset($mb_id1_from) ? clean_xss_tags($mb_id1_from, 1, 1, 30) : '';
|
||||
$mb_id1_to = isset($mb_id1_to) ? clean_xss_tags($mb_id1_to, 1, 1, 30) : '';
|
||||
$mb_email = isset($mb_email) ? clean_xss_tags($mb_email, 1, 1, 100) : '';
|
||||
|
||||
$g5['title'] = '회원메일발송';
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
@@ -55,15 +61,15 @@ include_once('./admin.head.php');
|
||||
<td>
|
||||
<input type="radio" name="mb_id1" value="1" id="mb_id1_all" <?php echo $mb_id1?"checked":""; ?>> <label for="mb_id1_all">전체</label>
|
||||
<input type="radio" name="mb_id1" value="0" id="mb_id1_section" <?php echo !$mb_id1?"checked":""; ?>> <label for="mb_id1_section">구간</label>
|
||||
<input type="text" name="mb_id1_from" value="<?php echo $mb_id1_from ?>" id="mb_id1_from" title="시작구간" class="frm_input"> 에서
|
||||
<input type="text" name="mb_id1_to" value="<?php echo $mb_id1_to ?>" id="mb_id1_to" title="종료구간" class="frm_input"> 까지
|
||||
<input type="text" name="mb_id1_from" value="<?php echo get_sanitize_input($mb_id1_from); ?>" id="mb_id1_from" title="시작구간" class="frm_input"> 에서
|
||||
<input type="text" name="mb_id1_to" value="<?php echo get_sanitize_input($mb_id1_to); ?>" id="mb_id1_to" title="종료구간" class="frm_input"> 까지
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_email">E-mail</label></th>
|
||||
<td>
|
||||
<?php echo help("메일 주소에 단어 포함 (예 : @".preg_replace('#^(www[^\.]*\.){1}#', '', $_SERVER['HTTP_HOST']).")") ?>
|
||||
<input type="text" name="mb_email" value="<?php echo $mb_email ?>" id="mb_email" class="frm_input" size="50">
|
||||
<input type="text" name="mb_email" value="<?php echo get_sanitize_input($mb_email); ?>" id="mb_email" class="frm_input" size="50">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -118,5 +124,4 @@ include_once('./admin.head.php');
|
||||
</form>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
include_once('./admin.tail.php');
|
||||
@@ -2,7 +2,7 @@
|
||||
$sub_menu = "200300";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
auth_check_menu($auth, $sub_menu, 'r');
|
||||
|
||||
$ma_last_option = "";
|
||||
|
||||
@@ -106,7 +106,7 @@ include_once('./admin.head.php');
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<textarea name="ma_list" style="display:none"><?=$ma_list?></textarea>
|
||||
<textarea name="ma_list" style="display:none"><?php echo $ma_list?></textarea>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
@@ -117,5 +117,4 @@ include_once('./admin.head.php');
|
||||
</form>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
include_once('./admin.tail.php');
|
||||
@@ -2,7 +2,7 @@
|
||||
$sub_menu = "200300";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
auth_check_menu($auth, $sub_menu, 'w');
|
||||
|
||||
$html_title = '회원메일 발송';
|
||||
|
||||
@@ -26,14 +26,12 @@ echo "</span>";
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
|
||||
<?php
|
||||
flush();
|
||||
ob_flush();
|
||||
|
||||
$ma_id = trim($_POST['ma_id']);
|
||||
$select_member_list = trim($_POST['ma_list']);
|
||||
$ma_id = isset($_POST['ma_id']) ? (int) $_POST['ma_id'] : 0;
|
||||
$select_member_list = isset($_POST['ma_list']) ? trim($_POST['ma_list']) : '';
|
||||
|
||||
//print_r2($_POST); EXIT;
|
||||
$member_list = explode("\n", conv_unescape_nl($select_member_list));
|
||||
@@ -84,4 +82,4 @@ for ($i=0; $i<count($member_list); $i++)
|
||||
}
|
||||
}
|
||||
?>
|
||||
<script> document.all.cont.innerHTML += "<br><br>총 <?php echo number_format($cnt) ?>건 발송<br><br><font color=crimson><b>[끝]</b></font>"; document.body.scrollTop += 1000; </script>
|
||||
<script> document.all.cont.innerHTML += "<br><br>총 <?php echo number_format($cnt) ?>건 발송<br><br><font color=crimson><b>[끝]</b></font>"; document.body.scrollTop += 1000; </script>
|
||||
+3
-3
@@ -7,7 +7,7 @@ if (!$config['cf_email_use'])
|
||||
|
||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
auth_check_menu($auth, $sub_menu, 'w');
|
||||
|
||||
check_demo();
|
||||
|
||||
@@ -17,6 +17,7 @@ $name = get_text($member['mb_name']);
|
||||
$nick = $member['mb_nick'];
|
||||
$mb_id = $member['mb_id'];
|
||||
$email = $member['mb_email'];
|
||||
$ma_id = isset($_REQUEST['ma_id']) ? (int) $_REQUEST['ma_id'] : 0;
|
||||
|
||||
$sql = "select ma_subject, ma_content from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
|
||||
$ma = sql_fetch($sql);
|
||||
@@ -35,5 +36,4 @@ $content = $content . '<p>더 이상 정보 수신을 원치 않으시면 [<a hr
|
||||
|
||||
mailer($config['cf_title'], $member['mb_email'], $member['mb_email'], $subject, $content, 1);
|
||||
|
||||
alert($member['mb_nick'].'('.$member['mb_email'].')님께 테스트 메일을 발송하였습니다. 확인하여 주십시오.');
|
||||
?>
|
||||
alert($member['mb_nick'].'('.$member['mb_email'].')님께 테스트 메일을 발송하였습니다. 확인하여 주십시오.');
|
||||
+12
-10
@@ -5,16 +5,19 @@ include_once('./_common.php');
|
||||
if ($w == 'u' || $w == 'd')
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
auth_check_menu($auth, $sub_menu, 'w');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$ma_id = isset($_POST['ma_id']) ? (int) $_POST['ma_id'] : 0;
|
||||
$ma_subject = isset($_POST['ma_subject']) ? strip_tags(clean_xss_attributes($_POST['ma_subject'])) : '';
|
||||
$ma_content = isset($_POST['ma_content']) ? $_POST['ma_content'] : '';
|
||||
|
||||
if ($w == '')
|
||||
{
|
||||
$sql = " insert {$g5['mail_table']}
|
||||
set ma_id = '{$_POST['ma_id']}',
|
||||
ma_subject = '{$_POST['ma_subject']}',
|
||||
ma_content = '{$_POST['ma_content']}',
|
||||
set ma_subject = '{$ma_subject}',
|
||||
ma_content = '{$ma_content}',
|
||||
ma_time = '".G5_TIME_YMDHIS."',
|
||||
ma_ip = '{$_SERVER['REMOTE_ADDR']}' ";
|
||||
sql_query($sql);
|
||||
@@ -22,18 +25,17 @@ if ($w == '')
|
||||
else if ($w == 'u')
|
||||
{
|
||||
$sql = " update {$g5['mail_table']}
|
||||
set ma_subject = '{$_POST['ma_subject']}',
|
||||
ma_content = '{$_POST['ma_content']}',
|
||||
set ma_subject = '{$ma_subject}',
|
||||
ma_content = '{$ma_content}',
|
||||
ma_time = '".G5_TIME_YMDHIS."',
|
||||
ma_ip = '{$_SERVER['REMOTE_ADDR']}'
|
||||
where ma_id = '{$_POST['ma_id']}' ";
|
||||
where ma_id = '{$ma_id}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
else if ($w == 'd')
|
||||
{
|
||||
$sql = " delete from {$g5['mail_table']} where ma_id = '{$_POST['ma_id']}' ";
|
||||
$sql = " delete from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
goto_url('./mail_list.php');
|
||||
?>
|
||||
goto_url('./mail_list.php');
|
||||
@@ -4,11 +4,11 @@ include_once("./_common.php");
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], "d");
|
||||
auth_check_menu($auth, $sub_menu, "d");
|
||||
|
||||
$mb = get_member($_POST['mb_id']);
|
||||
$mb = isset($_POST['mb_id']) ? get_member($_POST['mb_id']) : array();
|
||||
|
||||
if (!$mb['mb_id'])
|
||||
if (! (isset($mb['mb_id']) && $mb['mb_id']))
|
||||
alert("회원자료가 존재하지 않습니다.");
|
||||
else if ($member['mb_id'] == $mb['mb_id'])
|
||||
alert("로그인 중인 관리자는 삭제 할 수 없습니다.");
|
||||
@@ -25,5 +25,4 @@ member_delete($mb['mb_id']);
|
||||
if ($url)
|
||||
goto_url("{$url}?$qstr&w=u&mb_id=$mb_id");
|
||||
else
|
||||
goto_url("./member_list.php?$qstr");
|
||||
?>
|
||||
goto_url("./member_list.php?$qstr");
|
||||
+71
-10
@@ -2,7 +2,46 @@
|
||||
$sub_menu = "200100";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
auth_check_menu($auth, $sub_menu, 'w');
|
||||
|
||||
$mb = array(
|
||||
'mb_certify' => null,
|
||||
'mb_adult' => null,
|
||||
'mb_sms' => null,
|
||||
'mb_intercept_date' => null,
|
||||
'mb_id' => null,
|
||||
'mb_name' => null,
|
||||
'mb_nick' => null,
|
||||
'mb_point' => null,
|
||||
'mb_email' => null,
|
||||
'mb_homepage' => null,
|
||||
'mb_hp' => null,
|
||||
'mb_tel' => null,
|
||||
'mb_zip1' => null,
|
||||
'mb_zip2' => null,
|
||||
'mb_addr1' => null,
|
||||
'mb_addr2' => null,
|
||||
'mb_addr3' => null,
|
||||
'mb_addr_jibeon' => null,
|
||||
'mb_signature' => null,
|
||||
'mb_profile' => null,
|
||||
'mb_memo' => null,
|
||||
'mb_leave_date' => null,
|
||||
'mb_1' => null,
|
||||
'mb_2' => null,
|
||||
'mb_3' => null,
|
||||
'mb_4' => null,
|
||||
'mb_5' => null,
|
||||
'mb_6' => null,
|
||||
'mb_7' => null,
|
||||
'mb_8' => null,
|
||||
'mb_9' => null,
|
||||
'mb_10' => null,
|
||||
);
|
||||
|
||||
$sound_only = '';
|
||||
$required_mb_id_class = '';
|
||||
$required_mb_password = '';
|
||||
|
||||
if ($w == '')
|
||||
{
|
||||
@@ -26,7 +65,6 @@ else if ($w == 'u')
|
||||
alert('자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.');
|
||||
|
||||
$required_mb_id = 'readonly';
|
||||
$required_mb_password = '';
|
||||
$html_title = '수정';
|
||||
|
||||
$mb['mb_name'] = get_text($mb['mb_name']);
|
||||
@@ -240,15 +278,31 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
<input type="file" name="mb_icon" id="mb_icon">
|
||||
<?php
|
||||
$mb_dir = substr($mb['mb_id'],0,2);
|
||||
$icon_file = G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb['mb_id'].'.gif';
|
||||
$icon_file = G5_DATA_PATH.'/member/'.$mb_dir.'/'.get_mb_icon_name($mb['mb_id']).'.gif';
|
||||
if (file_exists($icon_file)) {
|
||||
$icon_url = G5_DATA_URL.'/member/'.$mb_dir.'/'.$mb['mb_id'].'.gif';
|
||||
echo '<img src="'.$icon_url.'" alt="">';
|
||||
$icon_url = str_replace(G5_DATA_PATH, G5_DATA_URL, $icon_file);
|
||||
$icon_filemtile = (defined('G5_USE_MEMBER_IMAGE_FILETIME') && G5_USE_MEMBER_IMAGE_FILETIME) ? '?'.filemtime($icon_file) : '';
|
||||
echo '<img src="'.$icon_url.$icon_filemtile.'" alt="">';
|
||||
echo '<input type="checkbox" id="del_mb_icon" name="del_mb_icon" value="1">삭제';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_img">회원이미지</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('이미지 크기는 <strong>넓이 '.$config['cf_member_img_width'].'픽셀 높이 '.$config['cf_member_img_height'].'픽셀</strong>로 해주세요.') ?>
|
||||
<input type="file" name="mb_img" id="mb_img">
|
||||
<?php
|
||||
$mb_dir = substr($mb['mb_id'],0,2);
|
||||
$icon_file = G5_DATA_PATH.'/member_image/'.$mb_dir.'/'.get_mb_icon_name($mb['mb_id']).'.gif';
|
||||
if (file_exists($icon_file)) {
|
||||
echo get_member_profile_img($mb['mb_id']);
|
||||
echo '<input type="checkbox" id="del_mb_img" name="del_mb_img" value="1">삭제';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">메일 수신</th>
|
||||
<td>
|
||||
@@ -425,6 +479,8 @@ this.form.mb_intercept_date.value=this.form.mb_intercept_date.defaultValue; }">
|
||||
<?php
|
||||
} //end if
|
||||
} //end if
|
||||
|
||||
run_event('admin_member_form_add', $mb, $w, 'table');
|
||||
?>
|
||||
|
||||
<?php for ($i=1; $i<=10; $i++) { ?>
|
||||
@@ -447,15 +503,20 @@ this.form.mb_intercept_date.value=this.form.mb_intercept_date.defaultValue; }">
|
||||
<script>
|
||||
function fmember_submit(f)
|
||||
{
|
||||
if (!f.mb_icon.value.match(/\.gif$/i) && f.mb_icon.value) {
|
||||
alert('아이콘은 gif 파일만 가능합니다.');
|
||||
if (!f.mb_icon.value.match(/\.(gif|jpe?g|png)$/i) && f.mb_icon.value) {
|
||||
alert('아이콘은 이미지 파일만 가능합니다.');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!f.mb_img.value.match(/\.(gif|jpe?g|png)$/i) && f.mb_img.value) {
|
||||
alert('회원이미지는 이미지 파일만 가능합니다.');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
run_event('admin_member_form_after', $mb, $w);
|
||||
|
||||
include_once('./admin.tail.php');
|
||||
+184
-80
@@ -2,15 +2,19 @@
|
||||
$sub_menu = "200100";
|
||||
include_once("./_common.php");
|
||||
include_once(G5_LIB_PATH."/register.lib.php");
|
||||
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
|
||||
|
||||
if ($w == 'u')
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
auth_check_menu($auth, $sub_menu, 'w');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$mb_id = trim($_POST['mb_id']);
|
||||
$mb_id = isset($_POST['mb_id']) ? trim($_POST['mb_id']) : '';
|
||||
$mb_certify_case = isset($_POST['mb_certify_case']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['mb_certify_case']) : '';
|
||||
$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_hp = hyphen_hp_number($_POST['mb_hp']);
|
||||
@@ -21,67 +25,101 @@ if($mb_hp) {
|
||||
}
|
||||
|
||||
// 인증정보처리
|
||||
if($_POST['mb_certify_case'] && $_POST['mb_certify']) {
|
||||
$mb_certify = $_POST['mb_certify_case'];
|
||||
$mb_adult = $_POST['mb_adult'];
|
||||
if($mb_certify_case && $mb_certify) {
|
||||
$mb_certify = isset($_POST['mb_certify_case']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['mb_certify_case']) : '';
|
||||
$mb_adult = isset($_POST['mb_adult']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['mb_adult']) : '';
|
||||
} else {
|
||||
$mb_certify = '';
|
||||
$mb_adult = 0;
|
||||
}
|
||||
|
||||
$mb_zip1 = substr($_POST['mb_zip'], 0, 3);
|
||||
$mb_zip2 = substr($_POST['mb_zip'], 3);
|
||||
$mb_zip1 = substr($mb_zip, 0, 3);
|
||||
$mb_zip2 = substr($mb_zip, 3);
|
||||
|
||||
$sql_common = " mb_name = '{$_POST['mb_name']}',
|
||||
mb_nick = '{$_POST['mb_nick']}',
|
||||
mb_email = '{$_POST['mb_email']}',
|
||||
mb_homepage = '{$_POST['mb_homepage']}',
|
||||
mb_tel = '{$_POST['mb_tel']}',
|
||||
$mb_email = isset($_POST['mb_email']) ? get_email_address(trim($_POST['mb_email'])) : '';
|
||||
$mb_nick = isset($_POST['mb_nick']) ? trim(strip_tags($_POST['mb_nick'])) : '';
|
||||
|
||||
if ($msg = valid_mb_nick($mb_nick)) alert($msg, "", true, true);
|
||||
|
||||
$posts = array();
|
||||
$check_keys = array(
|
||||
'mb_name',
|
||||
'mb_homepage',
|
||||
'mb_tel',
|
||||
'mb_addr1',
|
||||
'mb_addr2',
|
||||
'mb_addr3',
|
||||
'mb_addr_jibeon',
|
||||
'mb_signature',
|
||||
'mb_leave_date',
|
||||
'mb_intercept_date',
|
||||
'mb_mailling',
|
||||
'mb_sms',
|
||||
'mb_open',
|
||||
'mb_profile',
|
||||
'mb_level'
|
||||
);
|
||||
|
||||
for($i=1;$i<=10;$i++){
|
||||
$check_keys[] = 'mb_'.$i;
|
||||
}
|
||||
|
||||
foreach( $check_keys as $key ){
|
||||
$posts[$key] = isset($_POST[$key]) ? clean_xss_tags($_POST[$key], 1, 1) : '';
|
||||
}
|
||||
|
||||
$mb_memo = isset($_POST['mb_memo']) ? $_POST['mb_memo'] : '';
|
||||
|
||||
$sql_common = " mb_name = '{$posts['mb_name']}',
|
||||
mb_nick = '{$mb_nick}',
|
||||
mb_email = '{$mb_email}',
|
||||
mb_homepage = '{$posts['mb_homepage']}',
|
||||
mb_tel = '{$posts['mb_tel']}',
|
||||
mb_hp = '{$mb_hp}',
|
||||
mb_certify = '{$mb_certify}',
|
||||
mb_adult = '{$mb_adult}',
|
||||
mb_zip1 = '$mb_zip1',
|
||||
mb_zip2 = '$mb_zip2',
|
||||
mb_addr1 = '{$_POST['mb_addr1']}',
|
||||
mb_addr2 = '{$_POST['mb_addr2']}',
|
||||
mb_addr3 = '{$_POST['mb_addr3']}',
|
||||
mb_addr_jibeon = '{$_POST['mb_addr_jibeon']}',
|
||||
mb_signature = '{$_POST['mb_signature']}',
|
||||
mb_leave_date = '{$_POST['mb_leave_date']}',
|
||||
mb_intercept_date='{$_POST['mb_intercept_date']}',
|
||||
mb_memo = '{$_POST['mb_memo']}',
|
||||
mb_mailling = '{$_POST['mb_mailling']}',
|
||||
mb_sms = '{$_POST['mb_sms']}',
|
||||
mb_open = '{$_POST['mb_open']}',
|
||||
mb_profile = '{$_POST['mb_profile']}',
|
||||
mb_level = '{$_POST['mb_level']}',
|
||||
mb_1 = '{$_POST['mb_1']}',
|
||||
mb_2 = '{$_POST['mb_2']}',
|
||||
mb_3 = '{$_POST['mb_3']}',
|
||||
mb_4 = '{$_POST['mb_4']}',
|
||||
mb_5 = '{$_POST['mb_5']}',
|
||||
mb_6 = '{$_POST['mb_6']}',
|
||||
mb_7 = '{$_POST['mb_7']}',
|
||||
mb_8 = '{$_POST['mb_8']}',
|
||||
mb_9 = '{$_POST['mb_9']}',
|
||||
mb_10 = '{$_POST['mb_10']}' ";
|
||||
mb_addr1 = '{$posts['mb_addr1']}',
|
||||
mb_addr2 = '{$posts['mb_addr2']}',
|
||||
mb_addr3 = '{$posts['mb_addr3']}',
|
||||
mb_addr_jibeon = '{$posts['mb_addr_jibeon']}',
|
||||
mb_signature = '{$posts['mb_signature']}',
|
||||
mb_leave_date = '{$posts['mb_leave_date']}',
|
||||
mb_intercept_date='{$posts['mb_intercept_date']}',
|
||||
mb_memo = '{$mb_memo}',
|
||||
mb_mailling = '{$posts['mb_mailling']}',
|
||||
mb_sms = '{$posts['mb_sms']}',
|
||||
mb_open = '{$posts['mb_open']}',
|
||||
mb_profile = '{$posts['mb_profile']}',
|
||||
mb_level = '{$posts['mb_level']}',
|
||||
mb_1 = '{$posts['mb_1']}',
|
||||
mb_2 = '{$posts['mb_2']}',
|
||||
mb_3 = '{$posts['mb_3']}',
|
||||
mb_4 = '{$posts['mb_4']}',
|
||||
mb_5 = '{$posts['mb_5']}',
|
||||
mb_6 = '{$posts['mb_6']}',
|
||||
mb_7 = '{$posts['mb_7']}',
|
||||
mb_8 = '{$posts['mb_8']}',
|
||||
mb_9 = '{$posts['mb_9']}',
|
||||
mb_10 = '{$posts['mb_10']}' ";
|
||||
|
||||
if ($w == '')
|
||||
{
|
||||
$mb = get_member($mb_id);
|
||||
if ($mb['mb_id'])
|
||||
if (isset($mb['mb_id']) && $mb['mb_id'])
|
||||
alert('이미 존재하는 회원아이디입니다.\\nID : '.$mb['mb_id'].'\\n이름 : '.$mb['mb_name'].'\\n닉네임 : '.$mb['mb_nick'].'\\n메일 : '.$mb['mb_email']);
|
||||
|
||||
// 닉네임중복체크
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_nick = '{$_POST['mb_nick']}' ";
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_nick = '{$mb_nick}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['mb_id'])
|
||||
if (isset($row['mb_id']) && $row['mb_id'])
|
||||
alert('이미 존재하는 닉네임입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']);
|
||||
|
||||
// 이메일중복체크
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_email = '{$_POST['mb_email']}' ";
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_email = '{$mb_email}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['mb_id'])
|
||||
if (isset($row['mb_id']) && $row['mb_id'])
|
||||
alert('이미 존재하는 이메일입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']);
|
||||
|
||||
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} ");
|
||||
@@ -89,7 +127,7 @@ if ($w == '')
|
||||
else if ($w == 'u')
|
||||
{
|
||||
$mb = get_member($mb_id);
|
||||
if (!$mb['mb_id'])
|
||||
if (! (isset($mb['mb_id']) && $mb['mb_id']))
|
||||
alert('존재하지 않는 회원자료입니다.');
|
||||
|
||||
if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level'])
|
||||
@@ -99,58 +137,27 @@ else if ($w == 'u')
|
||||
alert('최고관리자의 비밀번호를 수정할수 없습니다.');
|
||||
}
|
||||
|
||||
if ($_POST['mb_id'] == $member['mb_id'] && $_POST['mb_level'] != $mb['mb_level'])
|
||||
if ($mb_id === $member['mb_id'] && $_POST['mb_level'] != $mb['mb_level'])
|
||||
alert($mb['mb_id'].' : 로그인 중인 관리자 레벨은 수정 할 수 없습니다.');
|
||||
|
||||
// 닉네임중복체크
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_nick = '{$_POST['mb_nick']}' and mb_id <> '$mb_id' ";
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_nick = '{$mb_nick}' and mb_id <> '$mb_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['mb_id'])
|
||||
if (isset($row['mb_id']) && $row['mb_id'])
|
||||
alert('이미 존재하는 닉네임입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']);
|
||||
|
||||
// 이메일중복체크
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_email = '{$_POST['mb_email']}' and mb_id <> '$mb_id' ";
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_email = '{$mb_email}' and mb_id <> '$mb_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['mb_id'])
|
||||
if (isset($row['mb_id']) && $row['mb_id'])
|
||||
alert('이미 존재하는 이메일입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']);
|
||||
|
||||
$mb_dir = substr($mb_id,0,2);
|
||||
|
||||
// 회원 아이콘 삭제
|
||||
if ($del_mb_icon)
|
||||
@unlink(G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_id.'.gif');
|
||||
|
||||
// 아이콘 업로드
|
||||
if (is_uploaded_file($_FILES['mb_icon']['tmp_name'])) {
|
||||
if (!preg_match("/(\.gif)$/i", $_FILES['mb_icon']['name'])) {
|
||||
alert($_FILES['mb_icon']['name'] . '은(는) gif 파일이 아닙니다.');
|
||||
}
|
||||
|
||||
if (preg_match("/(\.gif)$/i", $_FILES['mb_icon']['name'])) {
|
||||
@mkdir(G5_DATA_PATH.'/member/'.$mb_dir, G5_DIR_PERMISSION);
|
||||
@chmod(G5_DATA_PATH.'/member/'.$mb_dir, G5_DIR_PERMISSION);
|
||||
|
||||
$dest_path = G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_id.'.gif';
|
||||
|
||||
move_uploaded_file($_FILES['mb_icon']['tmp_name'], $dest_path);
|
||||
chmod($dest_path, G5_FILE_PERMISSION);
|
||||
|
||||
if (file_exists($dest_path)) {
|
||||
$size = getimagesize($dest_path);
|
||||
// 아이콘의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 아이콘 삭제
|
||||
if ($size[0] > $config['cf_member_icon_width'] || $size[1] > $config['cf_member_icon_height']) {
|
||||
@unlink($dest_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($mb_password)
|
||||
$sql_password = " , mb_password = '".get_encrypt_string($mb_password)."' ";
|
||||
else
|
||||
$sql_password = "";
|
||||
|
||||
if ($passive_certify)
|
||||
if (isset($passive_certify) && $passive_certify)
|
||||
$sql_certify = " , mb_email_certify = '".G5_TIME_YMDHIS."' ";
|
||||
else
|
||||
$sql_certify = "";
|
||||
@@ -165,5 +172,102 @@ else if ($w == 'u')
|
||||
else
|
||||
alert('제대로 된 값이 넘어오지 않았습니다.');
|
||||
|
||||
goto_url('./member_form.php?'.$qstr.'&w=u&mb_id='.$mb_id, false);
|
||||
?>
|
||||
if( $w == '' || $w == 'u' ){
|
||||
|
||||
$mb_dir = substr($mb_id,0,2);
|
||||
$mb_icon_img = get_mb_icon_name($mb_id).'.gif';
|
||||
|
||||
// 회원 아이콘 삭제
|
||||
if (isset($del_mb_icon) && $del_mb_icon)
|
||||
@unlink(G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_icon_img);
|
||||
|
||||
$image_regex = "/(\.(gif|jpe?g|png))$/i";
|
||||
|
||||
// 아이콘 업로드
|
||||
if (isset($_FILES['mb_icon']) && is_uploaded_file($_FILES['mb_icon']['tmp_name'])) {
|
||||
if (!preg_match($image_regex, $_FILES['mb_icon']['name'])) {
|
||||
alert($_FILES['mb_icon']['name'] . '은(는) 이미지 파일이 아닙니다.');
|
||||
}
|
||||
|
||||
if (preg_match($image_regex, $_FILES['mb_icon']['name'])) {
|
||||
$mb_icon_dir = G5_DATA_PATH.'/member/'.$mb_dir;
|
||||
@mkdir($mb_icon_dir, G5_DIR_PERMISSION);
|
||||
@chmod($mb_icon_dir, G5_DIR_PERMISSION);
|
||||
|
||||
$dest_path = $mb_icon_dir.'/'.$mb_icon_img;
|
||||
|
||||
move_uploaded_file($_FILES['mb_icon']['tmp_name'], $dest_path);
|
||||
chmod($dest_path, G5_FILE_PERMISSION);
|
||||
|
||||
if (file_exists($dest_path)) {
|
||||
$size = @getimagesize($dest_path);
|
||||
if ($size[0] > $config['cf_member_icon_width'] || $size[1] > $config['cf_member_icon_height']) {
|
||||
$thumb = null;
|
||||
if($size[2] === 2 || $size[2] === 3) {
|
||||
//jpg 또는 png 파일 적용
|
||||
$thumb = thumbnail($mb_icon_img, $mb_icon_dir, $mb_icon_dir, $config['cf_member_icon_width'], $config['cf_member_icon_height'], true, true);
|
||||
if($thumb) {
|
||||
@unlink($dest_path);
|
||||
rename($mb_icon_dir.'/'.$thumb, $dest_path);
|
||||
}
|
||||
}
|
||||
if( !$thumb ){
|
||||
// 아이콘의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 아이콘 삭제
|
||||
@unlink($dest_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$mb_img_dir = G5_DATA_PATH.'/member_image/';
|
||||
if( !is_dir($mb_img_dir) ){
|
||||
@mkdir($mb_img_dir, G5_DIR_PERMISSION);
|
||||
@chmod($mb_img_dir, G5_DIR_PERMISSION);
|
||||
}
|
||||
$mb_img_dir .= substr($mb_id,0,2);
|
||||
|
||||
// 회원 이미지 삭제
|
||||
if (isset($del_mb_img) && $del_mb_img)
|
||||
@unlink($mb_img_dir.'/'.$mb_icon_img);
|
||||
|
||||
// 아이콘 업로드
|
||||
if (isset($_FILES['mb_img']) && is_uploaded_file($_FILES['mb_img']['tmp_name'])) {
|
||||
if (!preg_match($image_regex, $_FILES['mb_img']['name'])) {
|
||||
alert($_FILES['mb_img']['name'] . '은(는) 이미지 파일이 아닙니다.');
|
||||
}
|
||||
|
||||
if (preg_match($image_regex, $_FILES['mb_img']['name'])) {
|
||||
@mkdir($mb_img_dir, G5_DIR_PERMISSION);
|
||||
@chmod($mb_img_dir, G5_DIR_PERMISSION);
|
||||
|
||||
$dest_path = $mb_img_dir.'/'.$mb_icon_img;
|
||||
|
||||
move_uploaded_file($_FILES['mb_img']['tmp_name'], $dest_path);
|
||||
chmod($dest_path, G5_FILE_PERMISSION);
|
||||
|
||||
if (file_exists($dest_path)) {
|
||||
$size = @getimagesize($dest_path);
|
||||
if ($size[0] > $config['cf_member_img_width'] || $size[1] > $config['cf_member_img_height']) {
|
||||
$thumb = null;
|
||||
if($size[2] === 2 || $size[2] === 3) {
|
||||
//jpg 또는 png 파일 적용
|
||||
$thumb = thumbnail($mb_icon_img, $mb_img_dir, $mb_img_dir, $config['cf_member_img_width'], $config['cf_member_img_height'], true, true);
|
||||
if($thumb) {
|
||||
@unlink($dest_path);
|
||||
rename($mb_img_dir.'/'.$thumb, $dest_path);
|
||||
}
|
||||
}
|
||||
if( !$thumb ){
|
||||
// 아이콘의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 아이콘 삭제
|
||||
@unlink($dest_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
run_event('admin_member_form_update', $w, $mb_id);
|
||||
|
||||
goto_url('./member_form.php?'.$qstr.'&w=u&mb_id='.$mb_id, false);
|
||||
+15
-16
@@ -2,7 +2,7 @@
|
||||
$sub_menu = "200100";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
auth_check_menu($auth, $sub_menu, 'r');
|
||||
|
||||
$sql_common = " from {$g5['member_table']} ";
|
||||
|
||||
@@ -70,25 +70,25 @@ $colspan = 16;
|
||||
<div class="local_ov01 local_ov">
|
||||
<?php echo $listall ?>
|
||||
<span class="btn_ov01"><span class="ov_txt">총회원수 </span><span class="ov_num"> <?php echo number_format($total_count) ?>명 </span></span>
|
||||
<a href="?sst=mb_intercept_date&sod=desc&sfl=<?php echo $sfl ?>&stx=<?php echo $stx ?>" class="btn_ov01"> <span class="ov_txt">차단 </span><span class="ov_num"><?php echo number_format($intercept_count) ?>명</span></a>
|
||||
<a href="?sst=mb_leave_date&sod=desc&sfl=<?php echo $sfl ?>&stx=<?php echo $stx ?>" class="btn_ov01"> <span class="ov_txt">탈퇴 </span><span class="ov_num"><?php echo number_format($leave_count) ?>명</span></a>
|
||||
<a href="?sst=mb_intercept_date&sod=desc&sfl=<?php echo $sfl ?>&stx=<?php echo $stx ?>" class="btn_ov01" data-tooltip-text="차단된 순으로 정렬합니다.
전체 데이터를 출력합니다."> <span class="ov_txt">차단 </span><span class="ov_num"><?php echo number_format($intercept_count) ?>명</span></a>
|
||||
<a href="?sst=mb_leave_date&sod=desc&sfl=<?php echo $sfl ?>&stx=<?php echo $stx ?>" class="btn_ov01" data-tooltip-text="탈퇴된 순으로 정렬합니다.
전체 데이터를 출력합니다."> <span class="ov_txt">탈퇴 </span><span class="ov_num"><?php echo number_format($leave_count) ?>명</span></a>
|
||||
</div>
|
||||
|
||||
<form id="fsearch" name="fsearch" class="local_sch01 local_sch" method="get">
|
||||
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="sfl">
|
||||
<option value="mb_id"<?php echo get_selected($_GET['sfl'], "mb_id"); ?>>회원아이디</option>
|
||||
<option value="mb_nick"<?php echo get_selected($_GET['sfl'], "mb_nick"); ?>>닉네임</option>
|
||||
<option value="mb_name"<?php echo get_selected($_GET['sfl'], "mb_name"); ?>>이름</option>
|
||||
<option value="mb_level"<?php echo get_selected($_GET['sfl'], "mb_level"); ?>>권한</option>
|
||||
<option value="mb_email"<?php echo get_selected($_GET['sfl'], "mb_email"); ?>>E-MAIL</option>
|
||||
<option value="mb_tel"<?php echo get_selected($_GET['sfl'], "mb_tel"); ?>>전화번호</option>
|
||||
<option value="mb_hp"<?php echo get_selected($_GET['sfl'], "mb_hp"); ?>>휴대폰번호</option>
|
||||
<option value="mb_point"<?php echo get_selected($_GET['sfl'], "mb_point"); ?>>포인트</option>
|
||||
<option value="mb_datetime"<?php echo get_selected($_GET['sfl'], "mb_datetime"); ?>>가입일시</option>
|
||||
<option value="mb_ip"<?php echo get_selected($_GET['sfl'], "mb_ip"); ?>>IP</option>
|
||||
<option value="mb_recommend"<?php echo get_selected($_GET['sfl'], "mb_recommend"); ?>>추천인</option>
|
||||
<option value="mb_id"<?php echo get_selected($sfl, "mb_id"); ?>>회원아이디</option>
|
||||
<option value="mb_nick"<?php echo get_selected($sfl, "mb_nick"); ?>>닉네임</option>
|
||||
<option value="mb_name"<?php echo get_selected($sfl, "mb_name"); ?>>이름</option>
|
||||
<option value="mb_level"<?php echo get_selected($sfl, "mb_level"); ?>>권한</option>
|
||||
<option value="mb_email"<?php echo get_selected($sfl, "mb_email"); ?>>E-MAIL</option>
|
||||
<option value="mb_tel"<?php echo get_selected($sfl, "mb_tel"); ?>>전화번호</option>
|
||||
<option value="mb_hp"<?php echo get_selected($sfl, "mb_hp"); ?>>휴대폰번호</option>
|
||||
<option value="mb_point"<?php echo get_selected($sfl, "mb_point"); ?>>포인트</option>
|
||||
<option value="mb_datetime"<?php echo get_selected($sfl, "mb_datetime"); ?>>가입일시</option>
|
||||
<option value="mb_ip"<?php echo get_selected($sfl, "mb_ip"); ?>>IP</option>
|
||||
<option value="mb_recommend"<?php echo get_selected($sfl, "mb_recommend"); ?>>추천인</option>
|
||||
</select>
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||
@@ -330,5 +330,4 @@ function fmemberlist_submit(f)
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
include_once ('./admin.tail.php');
|
||||
@@ -4,7 +4,7 @@ include_once("./_common.php");
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], "d");
|
||||
auth_check_menu($auth, $sub_menu, "d");
|
||||
|
||||
check_admin_token();
|
||||
|
||||
@@ -33,5 +33,4 @@ for ($i=0; $i<count($chk); $i++)
|
||||
if ($msg)
|
||||
echo "<script type='text/javascript'> alert('$msg'); </script>";
|
||||
|
||||
goto_url("./member_list.php?$qstr");
|
||||
?>
|
||||
goto_url("./member_list.php?$qstr");
|
||||
+31
-18
@@ -4,42 +4,54 @@ include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
if (!count($_POST['chk'])) {
|
||||
if (! (isset($_POST['chk']) && is_array($_POST['chk']))) {
|
||||
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
|
||||
}
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
auth_check_menu($auth, $sub_menu, 'w');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$mb_datas = array();
|
||||
$msg = '';
|
||||
|
||||
if ($_POST['act_button'] == "선택수정") {
|
||||
|
||||
for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
|
||||
|
||||
$post_mb_certify = (isset($_POST['mb_certify'][$k]) && $_POST['mb_certify'][$k]) ? clean_xss_tags($_POST['mb_certify'][$k], 1, 1, 20) : '';
|
||||
$post_mb_level = isset($_POST['mb_level'][$k]) ? (int) $_POST['mb_level'][$k] : 0;
|
||||
$post_mb_intercept_date = (isset($_POST['mb_intercept_date'][$k]) && $_POST['mb_intercept_date'][$k]) ? clean_xss_tags($_POST['mb_intercept_date'][$k], 1, 1, 8) : '';
|
||||
$post_mb_mailling = isset($_POST['mb_mailling'][$k]) ? (int) $_POST['mb_mailling'][$k] : 0;
|
||||
$post_mb_sms = isset($_POST['mb_sms'][$k]) ? (int) $_POST['mb_sms'][$k] : 0;
|
||||
$post_mb_open = isset($_POST['mb_open'][$k]) ? (int) $_POST['mb_open'][$k] : 0;
|
||||
|
||||
$mb = get_member($_POST['mb_id'][$k]);
|
||||
$mb_datas[] = $mb = get_member($_POST['mb_id'][$k]);
|
||||
|
||||
if (!$mb['mb_id']) {
|
||||
if (! (isset($mb['mb_id']) && $mb['mb_id'])) {
|
||||
$msg .= $mb['mb_id'].' : 회원자료가 존재하지 않습니다.\\n';
|
||||
} else if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level']) {
|
||||
$msg .= $mb['mb_id'].' : 자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.\\n';
|
||||
} else if ($member['mb_id'] == $mb['mb_id']) {
|
||||
$msg .= $mb['mb_id'].' : 로그인 중인 관리자는 수정 할 수 없습니다.\\n';
|
||||
} else {
|
||||
if($_POST['mb_certify'][$k])
|
||||
$mb_adult = $_POST['mb_adult'][$k];
|
||||
if($post_mb_certify)
|
||||
$mb_adult = isset($_POST['mb_adult'][$k]) ? (int) $_POST['mb_adult'][$k] : 0;
|
||||
else
|
||||
$mb_adult = 0;
|
||||
|
||||
$sql = " update {$g5['member_table']}
|
||||
set mb_level = '{$_POST['mb_level'][$k]}',
|
||||
mb_intercept_date = '{$_POST['mb_intercept_date'][$k]}',
|
||||
mb_mailling = '{$_POST['mb_mailling'][$k]}',
|
||||
mb_sms = '{$_POST['mb_sms'][$k]}',
|
||||
mb_open = '{$_POST['mb_open'][$k]}',
|
||||
mb_certify = '{$_POST['mb_certify'][$k]}',
|
||||
set mb_level = '".$post_mb_level."',
|
||||
mb_intercept_date = '".sql_real_escape_string($post_mb_intercept_date)."',
|
||||
mb_mailling = '".$post_mb_mailling."',
|
||||
mb_sms = '".$post_mb_sms."',
|
||||
mb_open = '".$post_mb_open."',
|
||||
mb_certify = '".sql_real_escape_string($post_mb_certify)."',
|
||||
mb_adult = '{$mb_adult}'
|
||||
where mb_id = '{$_POST['mb_id'][$k]}' ";
|
||||
where mb_id = '".sql_real_escape_string($mb['mb_id'])."' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
}
|
||||
@@ -49,9 +61,9 @@ if ($_POST['act_button'] == "선택수정") {
|
||||
for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
|
||||
|
||||
$mb = get_member($_POST['mb_id'][$k]);
|
||||
$mb_datas[] = $mb = get_member($_POST['mb_id'][$k]);
|
||||
|
||||
if (!$mb['mb_id']) {
|
||||
$msg .= $mb['mb_id'].' : 회원자료가 존재하지 않습니다.\\n';
|
||||
@@ -72,5 +84,6 @@ if ($msg)
|
||||
//echo '<script> alert("'.$msg.'"); </script>';
|
||||
alert($msg);
|
||||
|
||||
goto_url('./member_list.php?'.$qstr);
|
||||
?>
|
||||
run_event('admin_member_list_update', $_POST['act_button'], $mb_datas);
|
||||
|
||||
goto_url('./member_list.php?'.$qstr);
|
||||
+8
-8
@@ -8,7 +8,8 @@ if ($is_admin != 'super')
|
||||
$g5['title'] = '메뉴 추가';
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
$code = isset($code) ? preg_replace('/[^0-9a-zA-Z]/', '', strip_tags($code)) : '';
|
||||
$new = isset($_GET['new']) ? clean_xss_tags($_GET['new'], 1, 1) : '';
|
||||
$code = isset($_GET['code']) ? preg_replace('/[^0-9a-zA-Z]/', '', $_GET['code']) : '';
|
||||
|
||||
// 코드
|
||||
if($new == 'new' || !$code) {
|
||||
@@ -159,11 +160,11 @@ function add_menu_list(name, link, code)
|
||||
list += "<option value=\"0\">사용안함</option>";
|
||||
list += "</select>";
|
||||
list += "</td>";
|
||||
list += "<td class=\"td_mngsmall\">";
|
||||
list += "<td class=\"td_mng\">";
|
||||
<?php if($new == 'new') { ?>
|
||||
list += "<button type=\"button\" class=\"btn_add_submenu btn\">추가</button>";
|
||||
list += "<button type=\"button\" class=\"btn_add_submenu btn_03\">추가</button>\n";
|
||||
<?php } ?>
|
||||
list += "<button type=\"button\" class=\"btn_del_menu btn\">삭제</button>";
|
||||
list += "<button type=\"button\" class=\"btn_del_menu btn_02\">삭제</button>";
|
||||
list += "</td>";
|
||||
list += "</tr>";
|
||||
|
||||
@@ -174,10 +175,10 @@ function add_menu_list(name, link, code)
|
||||
else
|
||||
$menu_last = $menulist.find("tr.menu_list:last");
|
||||
|
||||
if($menu_last.size() > 0) {
|
||||
if($menu_last.length > 0) {
|
||||
$menu_last.after(list);
|
||||
} else {
|
||||
if($menulist.find("#empty_menu_list").size() > 0)
|
||||
if($menulist.find("#empty_menu_list").length > 0)
|
||||
$menulist.find("#empty_menu_list").remove();
|
||||
|
||||
$menulist.find("table tbody").append(list);
|
||||
@@ -193,5 +194,4 @@ function add_menu_list(name, link, code)
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
?>
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
@@ -4,6 +4,8 @@ include_once('./_common.php');
|
||||
if ($is_admin != 'super')
|
||||
die('최고관리자만 접근 가능합니다.');
|
||||
|
||||
$type = isset($_REQUEST['type']) ? preg_replace('/[^0-9a-z_]/i', '', $_REQUEST['type']) : '';
|
||||
|
||||
switch($type) {
|
||||
case 'group':
|
||||
$sql = " select gr_id as id, gr_subject as subject
|
||||
@@ -24,9 +26,7 @@ switch($type) {
|
||||
$sql = '';
|
||||
break;
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if($sql) {
|
||||
$result = sql_query($sql);
|
||||
|
||||
@@ -55,10 +55,10 @@ if($sql) {
|
||||
$link = G5_BBS_URL.'/group.php?gr_id='.$row['id'];
|
||||
break;
|
||||
case 'board':
|
||||
$link = G5_BBS_URL.'/board.php?bo_table='.$row['id'];
|
||||
$link = get_pretty_url($row['id']);
|
||||
break;
|
||||
case 'content':
|
||||
$link = G5_BBS_URL.'/content.php?co_id='.$row['id'];
|
||||
$link = get_pretty_url(G5_CONTENT_DIR, $row['id']);
|
||||
break;
|
||||
default:
|
||||
$link = '';
|
||||
@@ -123,4 +123,4 @@ if($sql) {
|
||||
<button type="button" id="add_manual" class="btn_submit btn">추가</button>
|
||||
<button type="button" class="btn_02 btn" onclick="window.close();">창닫기</button>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } // end if;
|
||||
+19
-5
@@ -31,6 +31,7 @@ $g5['title'] = "메뉴설정";
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$colspan = 7;
|
||||
$sub_menu_info = '';
|
||||
?>
|
||||
|
||||
<div class="local_desc01 local_desc">
|
||||
@@ -76,7 +77,7 @@ $colspan = 7;
|
||||
<td class="td_category<?php echo $sub_menu_class; ?>">
|
||||
<input type="hidden" name="code[]" value="<?php echo substr($row['me_code'], 0, 2) ?>">
|
||||
<label for="me_name_<?php echo $i; ?>" class="sound_only"><?php echo $sub_menu_info; ?> 메뉴<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="me_name[]" value="<?php echo $me_name; ?>" id="me_name_<?php echo $i; ?>" required class="required tbl_input full_input">
|
||||
<input type="text" name="me_name[]" value="<?php echo get_sanitize_input($me_name); ?>" id="me_name_<?php echo $i; ?>" required class="required tbl_input full_input">
|
||||
</td>
|
||||
<td>
|
||||
<label for="me_link_<?php echo $i; ?>" class="sound_only">링크<strong class="sound_only"> 필수</strong></label>
|
||||
@@ -143,14 +144,14 @@ $(function() {
|
||||
return false;
|
||||
|
||||
var $tr = $(this).closest("tr");
|
||||
if($tr.find("td.sub_menu_class").size() > 0) {
|
||||
if($tr.find("td.sub_menu_class").length > 0) {
|
||||
$tr.remove();
|
||||
} else {
|
||||
var code = $(this).closest("tr").find("input[name='code[]']").val().substr(0, 2);
|
||||
$("tr.menu_group_"+code).remove();
|
||||
}
|
||||
|
||||
if($("#menulist tr.menu_list").size() < 1) {
|
||||
if($("#menulist tr.menu_list").length < 1) {
|
||||
var list = "<tr id=\"empty_menu_list\"><td colspan=\"<?php echo $colspan; ?>\" class=\"empty_table\">자료가 없습니다.</td></tr>\n";
|
||||
$("#menulist table tbody").append(list);
|
||||
} else {
|
||||
@@ -196,10 +197,23 @@ function base_convert(number, frombase, tobase) {
|
||||
|
||||
function fmenulist_submit(f)
|
||||
{
|
||||
|
||||
var me_links = document.getElementsByName('me_link[]');
|
||||
var reg = /^javascript/;
|
||||
|
||||
for (i=0; i<me_links.length; i++){
|
||||
|
||||
if( reg.test(me_links[i].value) ){
|
||||
|
||||
alert('링크에 자바스크립트문을 입력할수 없습니다.');
|
||||
me_links[i].focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
include_once ('./admin.tail.php');
|
||||
+16
-13
@@ -20,11 +20,13 @@ $count = count($_POST['code']);
|
||||
for ($i=0; $i<$count; $i++)
|
||||
{
|
||||
$_POST = array_map_deep('trim', $_POST);
|
||||
|
||||
$_POST['me_link'][$i] = is_array($_POST['me_link']) ? clean_xss_tags(clean_xss_attributes($_POST['me_link'][$i], 1)) : '';
|
||||
|
||||
$code = $_POST['code'][$i];
|
||||
$me_name = $_POST['me_name'][$i];
|
||||
$me_link = $_POST['me_link'][$i];
|
||||
|
||||
$code = is_array($_POST['code']) ? strip_tags($_POST['code'][$i]) : '';
|
||||
$me_name = is_array($_POST['me_name']) ? strip_tags($_POST['me_name'][$i]) : '';
|
||||
$me_link = (preg_match('/^javascript/i', $_POST['me_link'][$i]) || preg_match('/script:/i', $_POST['me_link'][$i])) ? G5_URL : strip_tags(clean_xss_attributes($_POST['me_link'][$i]));
|
||||
|
||||
if(!$code || !$me_name || !$me_link)
|
||||
continue;
|
||||
|
||||
@@ -56,15 +58,16 @@ for ($i=0; $i<$count; $i++)
|
||||
|
||||
// 메뉴 등록
|
||||
$sql = " insert into {$g5['menu_table']}
|
||||
set me_code = '$me_code',
|
||||
me_name = '$me_name',
|
||||
me_link = '$me_link',
|
||||
me_target = '{$_POST['me_target'][$i]}',
|
||||
me_order = '{$_POST['me_order'][$i]}',
|
||||
me_use = '{$_POST['me_use'][$i]}',
|
||||
me_mobile_use = '{$_POST['me_mobile_use'][$i]}' ";
|
||||
set me_code = '".$me_code."',
|
||||
me_name = '".$me_name."',
|
||||
me_link = '".$me_link."',
|
||||
me_target = '".sql_real_escape_string(strip_tags($_POST['me_target'][$i]))."',
|
||||
me_order = '".sql_real_escape_string(strip_tags($_POST['me_order'][$i]))."',
|
||||
me_use = '".sql_real_escape_string(strip_tags($_POST['me_use'][$i]))."',
|
||||
me_mobile_use = '".sql_real_escape_string(strip_tags($_POST['me_mobile_use'][$i]))."' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
goto_url('./menu_list.php');
|
||||
?>
|
||||
run_event('admin_menu_list_update');
|
||||
|
||||
goto_url('./menu_list.php');
|
||||
+12
-7
@@ -3,9 +3,15 @@ $sub_menu = '100310';
|
||||
include_once('./_common.php');
|
||||
include_once(G5_EDITOR_LIB);
|
||||
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
auth_check_menu($auth, $sub_menu, "w");
|
||||
|
||||
$nw_id = preg_replace('/[^0-9]/', '', $nw_id);
|
||||
$nw_id = isset($_REQUEST['nw_id']) ? preg_replace('/[^0-9]/', '', $_REQUEST['nw_id']) : 0;
|
||||
$nw = array(
|
||||
'nw_begin_time'=>'',
|
||||
'nw_end_time'=>'',
|
||||
'nw_subject'=>'',
|
||||
'nw_content'=>'',
|
||||
);
|
||||
|
||||
$html_title = "팝업레이어";
|
||||
if ($w == "u")
|
||||
@@ -13,7 +19,7 @@ if ($w == "u")
|
||||
$html_title .= " 수정";
|
||||
$sql = " select * from {$g5['new_win_table']} where nw_id = '$nw_id' ";
|
||||
$nw = sql_fetch($sql);
|
||||
if (!$nw['nw_id']) alert("등록된 자료가 없습니다.");
|
||||
if (! (isset($nw['nw_id']) && $nw['nw_id'])) alert("등록된 자료가 없습니다.");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -109,12 +115,12 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
<tr>
|
||||
<th scope="row"><label for="nw_subject">팝업 제목<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
<input type="text" name="nw_subject" value="<?php echo stripslashes($nw['nw_subject']) ?>" id="nw_subject" required class="frm_input required" size="80">
|
||||
<input type="text" name="nw_subject" value="<?php echo get_sanitize_input($nw['nw_subject']); ?>" id="nw_subject" required class="frm_input required" size="80">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="nw_content">내용</label></th>
|
||||
<td><?php echo editor_html('nw_content', get_text($nw['nw_content'], 0)); ?></td>
|
||||
<td><?php echo editor_html('nw_content', get_text(html_purifier($nw['nw_content']), 0)); ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -146,5 +152,4 @@ function frmnewwin_check(f)
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
+42
-15
@@ -2,27 +2,55 @@
|
||||
$sub_menu = '100310';
|
||||
include_once('./_common.php');
|
||||
|
||||
$nw_id = isset($_REQUEST['nw_id']) ? preg_replace('/[^0-9]/', '', $_REQUEST['nw_id']) : 0;
|
||||
|
||||
if ($w == "u" || $w == "d")
|
||||
check_demo();
|
||||
|
||||
if ($w == 'd')
|
||||
auth_check($auth[$sub_menu], "d");
|
||||
auth_check_menu($auth, $sub_menu, "d");
|
||||
else
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
auth_check_menu($auth, $sub_menu, "w");
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$sql_common = " nw_device = '{$_POST['nw_device']}',
|
||||
nw_begin_time = '{$_POST['nw_begin_time']}',
|
||||
nw_end_time = '{$_POST['nw_end_time']}',
|
||||
nw_disable_hours = '{$_POST['nw_disable_hours']}',
|
||||
nw_left = '{$_POST['nw_left']}',
|
||||
nw_top = '{$_POST['nw_top']}',
|
||||
nw_height = '{$_POST['nw_height']}',
|
||||
nw_width = '{$_POST['nw_width']}',
|
||||
nw_subject = '{$_POST['nw_subject']}',
|
||||
nw_content = '{$_POST['nw_content']}',
|
||||
nw_content_html = '{$_POST['nw_content_html']}' ";
|
||||
$nw_subject = isset($_POST['nw_subject']) ? strip_tags(clean_xss_attributes($_POST['nw_subject'])) : '';
|
||||
$posts = array();
|
||||
|
||||
$check_keys = array(
|
||||
'nw_device'=>'str',
|
||||
'nw_begin_time'=>'str',
|
||||
'nw_end_time'=>'str',
|
||||
'nw_disable_hours'=>'int',
|
||||
'nw_left'=>'int',
|
||||
'nw_top'=>'int',
|
||||
'nw_height'=>'int',
|
||||
'nw_width'=>'int',
|
||||
'nw_content'=>'text',
|
||||
'nw_content_html'=>'text',
|
||||
);
|
||||
|
||||
foreach($check_keys as $key=>$val){
|
||||
if($val === 'int'){
|
||||
$posts[$key] = isset($_POST[$key]) ? (int) $_POST[$key] : 0;
|
||||
} else if ($val === 'str') {
|
||||
$posts[$key] = isset($_POST[$key]) ? clean_xss_tags($_POST[$key], 1, 1) : 0;
|
||||
} else {
|
||||
$posts[$key] = isset($_POST[$key]) ? trim($_POST[$key]) : 0;
|
||||
}
|
||||
}
|
||||
|
||||
$sql_common = " nw_device = '{$posts['nw_device']}',
|
||||
nw_begin_time = '{$posts['nw_begin_time']}',
|
||||
nw_end_time = '{$posts['nw_end_time']}',
|
||||
nw_disable_hours = '{$posts['nw_disable_hours']}',
|
||||
nw_left = '{$posts['nw_left']}',
|
||||
nw_top = '{$posts['nw_top']}',
|
||||
nw_height = '{$posts['nw_height']}',
|
||||
nw_width = '{$posts['nw_width']}',
|
||||
nw_subject = '{$nw_subject}',
|
||||
nw_content = '{$posts['nw_content']}',
|
||||
nw_content_html = '{$posts['nw_content_html']}' ";
|
||||
|
||||
if($w == "")
|
||||
{
|
||||
@@ -49,5 +77,4 @@ if ($w == "d")
|
||||
else
|
||||
{
|
||||
goto_url("./newwinform.php?w=u&nw_id=$nw_id");
|
||||
}
|
||||
?>
|
||||
}
|
||||
+2
-3
@@ -2,7 +2,7 @@
|
||||
$sub_menu = '100310';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
auth_check_menu($auth, $sub_menu, "r");
|
||||
|
||||
if( !isset($g5['new_win_table']) ){
|
||||
die('<meta charset="utf-8">/data/dbconfig.php 파일에 <strong>$g5[\'new_win_table\'] = G5_TABLE_PREFIX.\'new_win\';</strong> 를 추가해 주세요.');
|
||||
@@ -114,5 +114,4 @@ $result = sql_query($sql);
|
||||
|
||||
|
||||
<?php
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
+2
-3
@@ -4,7 +4,6 @@ include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
auth_check_menu($auth, $sub_menu, 'r');
|
||||
|
||||
phpinfo();
|
||||
?>
|
||||
phpinfo();
|
||||
+6
-7
@@ -2,7 +2,7 @@
|
||||
$sub_menu = "200200";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
auth_check_menu($auth, $sub_menu, 'r');
|
||||
|
||||
$sql_common = " from {$g5['point_table']} ";
|
||||
|
||||
@@ -84,8 +84,8 @@ else
|
||||
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="sfl">
|
||||
<option value="mb_id"<?php echo get_selected($_GET['sfl'], "mb_id"); ?>>회원아이디</option>
|
||||
<option value="po_content"<?php echo get_selected($_GET['sfl'], "po_content"); ?>>내용</option>
|
||||
<option value="mb_id"<?php echo get_selected($sfl, "mb_id"); ?>>회원아이디</option>
|
||||
<option value="po_content"<?php echo get_selected($sfl, "po_content"); ?>>내용</option>
|
||||
</select>
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||
@@ -131,7 +131,7 @@ else
|
||||
|
||||
$link1 = $link2 = '';
|
||||
if (!preg_match("/^\@/", $row['po_rel_table']) && $row['po_rel_table']) {
|
||||
$link1 = '<a href="'.G5_BBS_URL.'/board.php?bo_table='.$row['po_rel_table'].'&wr_id='.$row['po_rel_id'].'" target="_blank">';
|
||||
$link1 = '<a href="'.get_pretty_url($row['po_rel_table'], $row['po_rel_id']).'" target="_blank">';
|
||||
$link2 = '</a>';
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ else
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
<input type="hidden" name="token" value="<?php echo isset($token) ? $token : ''; ?>">
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
@@ -248,5 +248,4 @@ function fpointlist_submit(f)
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
include_once ('./admin.tail.php');
|
||||
@@ -4,11 +4,11 @@ include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'd');
|
||||
auth_check_menu($auth, $sub_menu, 'd');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$count = count($_POST['chk']);
|
||||
$count = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
|
||||
if(!$count)
|
||||
alert($_POST['act_button'].' 하실 항목을 하나 이상 체크하세요.');
|
||||
|
||||
@@ -16,9 +16,11 @@ for ($i=0; $i<$count; $i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
$po_id = (int) $_POST['po_id'][$k];
|
||||
$str_mb_id = sql_real_escape_string($_POST['mb_id'][$k]);
|
||||
|
||||
// 포인트 내역정보
|
||||
$sql = " select * from {$g5['point_table']} where po_id = '{$_POST['po_id'][$k]}' ";
|
||||
$sql = " select * from {$g5['point_table']} where po_id = '{$po_id}' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if(!$row['po_id'])
|
||||
@@ -39,21 +41,20 @@ for ($i=0; $i<$count; $i++)
|
||||
}
|
||||
|
||||
// 포인트 내역삭제
|
||||
$sql = " delete from {$g5['point_table']} where po_id = '{$_POST['po_id'][$k]}' ";
|
||||
$sql = " delete from {$g5['point_table']} where po_id = '{$po_id}' ";
|
||||
sql_query($sql);
|
||||
|
||||
// po_mb_point에 반영
|
||||
$sql = " update {$g5['point_table']}
|
||||
set po_mb_point = po_mb_point - '{$row['po_point']}'
|
||||
where mb_id = '{$_POST['mb_id'][$k]}'
|
||||
and po_id > '{$_POST['po_id'][$k]}' ";
|
||||
where mb_id = '{$str_mb_id}'
|
||||
and po_id > '{$po_id}' ";
|
||||
sql_query($sql);
|
||||
|
||||
// 포인트 UPDATE
|
||||
$sum_point = get_point_sum($_POST['mb_id'][$k]);
|
||||
$sql= " update {$g5['member_table']} set mb_point = '$sum_point' where mb_id = '{$_POST['mb_id'][$k]}' ";
|
||||
$sql= " update {$g5['member_table']} set mb_point = '$sum_point' where mb_id = '{$str_mb_id}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
goto_url('./point_list.php?'.$qstr);
|
||||
?>
|
||||
goto_url('./point_list.php?'.$qstr);
|
||||
@@ -2,14 +2,14 @@
|
||||
$sub_menu = "200200";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
auth_check_menu($auth, $sub_menu, 'w');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$mb_id = $_POST['mb_id'];
|
||||
$po_point = $_POST['po_point'];
|
||||
$po_content = $_POST['po_content'];
|
||||
$expire = preg_replace('/[^0-9]/', '', $_POST['po_expire_term']);
|
||||
$mb_id = isset($_POST['mb_id']) ? strip_tags(clean_xss_attributes($_POST['mb_id'])) : '';
|
||||
$po_point = isset($_POST['po_point']) ? strip_tags(clean_xss_attributes($_POST['po_point'])) : 0;
|
||||
$po_content = isset($_POST['po_content']) ? strip_tags(clean_xss_attributes($_POST['po_content'])) : '';
|
||||
$expire = isset($_POST['po_expire_term']) ? preg_replace('/[^0-9]/', '', $_POST['po_expire_term']) : '';
|
||||
|
||||
$mb = get_member($mb_id);
|
||||
|
||||
@@ -21,5 +21,4 @@ if (($po_point < 0) && ($po_point * (-1) > $mb['mb_point']))
|
||||
|
||||
insert_point($mb_id, $po_point, $po_content, '@passive', $mb_id, $member['mb_id'].'-'.uniqid(''), $expire);
|
||||
|
||||
goto_url('./point_list.php?'.$qstr);
|
||||
?>
|
||||
goto_url('./point_list.php?'.$qstr);
|
||||
+4
-5
@@ -4,17 +4,17 @@ include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'd');
|
||||
auth_check_menu($auth, $sub_menu, 'd');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$count = count($_POST['chk']);
|
||||
$count = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
|
||||
|
||||
if(!$count)
|
||||
alert('삭제할 투표목록을 1개이상 선택해 주세요.');
|
||||
|
||||
for($i=0; $i<$count; $i++) {
|
||||
$po_id = $_POST['chk'][$i];
|
||||
$po_id = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
|
||||
|
||||
$sql = " delete from {$g5['poll_table']} where po_id = '$po_id' ";
|
||||
sql_query($sql);
|
||||
@@ -23,5 +23,4 @@ for($i=0; $i<$count; $i++) {
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
goto_url('./poll_list.php?'.$qstr);
|
||||
?>
|
||||
goto_url('./poll_list.php?'.$qstr);
|
||||
+14
-6
@@ -2,7 +2,15 @@
|
||||
$sub_menu = "200900";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
auth_check_menu($auth, $sub_menu, 'w');
|
||||
|
||||
$po_id = isset($po_id) ? (int) $po_id : 0;
|
||||
$po = array(
|
||||
'po_subject'=>'',
|
||||
'po_etc'=>'',
|
||||
'po_level'=>'',
|
||||
'po_point'=>'',
|
||||
);
|
||||
|
||||
$html_title = '투표';
|
||||
if ($w == '')
|
||||
@@ -35,7 +43,7 @@ include_once('./admin.head.php');
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="po_subject">투표 제목<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="po_subject" value="<?php echo $po['po_subject'] ?>" id="po_subject" required class="required frm_input" size="80" maxlength="125"></td>
|
||||
<td><input type="text" name="po_subject" value="<?php echo get_sanitize_input($po['po_subject']); ?>" id="po_subject" required class="required frm_input" size="80" maxlength="125"></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
@@ -46,7 +54,8 @@ include_once('./admin.head.php');
|
||||
$sound_only = '<strong class="sound_only">필수</strong>';
|
||||
}
|
||||
|
||||
$po_poll = get_text($po['po_poll'.$i]);
|
||||
$po_poll = isset($po['po_poll'.$i]) ? get_text($po['po_poll'.$i]) : '';
|
||||
$po_cnt = isset($po['po_cnt'.$i]) ? get_text($po['po_cnt'.$i]) : 0;
|
||||
?>
|
||||
|
||||
<tr>
|
||||
@@ -54,7 +63,7 @@ include_once('./admin.head.php');
|
||||
<td>
|
||||
<input type="text" name="po_poll<?php echo $i ?>" value="<?php echo $po_poll ?>" id="po_poll<?php echo $i ?>" <?php echo $required ?> class="frm_input <?php echo $required ?>" maxlength="125">
|
||||
<label for="po_cnt<?php echo $i ?>">항목 <?php echo $i ?> 투표수</label>
|
||||
<input type="text" name="po_cnt<?php echo $i ?>" value="<?php echo $po['po_cnt'.$i] ?>" id="po_cnt<?php echo $i ?>" class="frm_input" size="3">
|
||||
<input type="text" name="po_cnt<?php echo $i ?>" value="<?php echo $po_cnt; ?>" id="po_cnt<?php echo $i ?>" class="frm_input" size="3">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -109,5 +118,4 @@ include_once('./admin.head.php');
|
||||
</form>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
include_once('./admin.tail.php');
|
||||
@@ -6,10 +6,44 @@ $w = $_POST['w'];
|
||||
if ($w == 'u' || $w == 'd')
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
auth_check_menu($auth, $sub_menu, 'w');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$check_keys = array(
|
||||
'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_id'
|
||||
);
|
||||
|
||||
foreach( $_POST as $key=>$value ){
|
||||
if( empty($value) ) continue;
|
||||
|
||||
if( in_array($key, $check_keys) ) {
|
||||
$_POST[$key] = strip_tags(clean_xss_attributes($value));
|
||||
}
|
||||
}
|
||||
|
||||
if ($w == '')
|
||||
{
|
||||
$sql = " insert {$g5['poll_table']}
|
||||
@@ -65,5 +99,4 @@ sql_query(" update {$g5['config_table']} set cf_max_po_id = '{$row['max_po_id']}
|
||||
if ($w == 'd')
|
||||
goto_url('./poll_list.php?'.$qstr);
|
||||
else
|
||||
goto_url('./poll_form.php?w=u&po_id='.$po_id.'&'.$qstr);
|
||||
?>
|
||||
goto_url('./poll_form.php?w=u&po_id='.$po_id.'&'.$qstr);
|
||||
+3
-4
@@ -2,7 +2,7 @@
|
||||
$sub_menu = "200900";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
auth_check_menu($auth, $sub_menu, 'r');
|
||||
|
||||
$sql_common = " from {$g5['poll_table']} ";
|
||||
|
||||
@@ -59,7 +59,7 @@ $colspan = 7;
|
||||
<div class="sch_last">
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="sfl">
|
||||
<option value="po_subject"<?php echo get_selected($_GET['sfl'], "po_subject"); ?>>제목</option>
|
||||
<option value="po_subject"<?php echo get_selected($sfl, "po_subject"); ?>>제목</option>
|
||||
</select>
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||
@@ -154,5 +154,4 @@ $(function() {
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
include_once ('./admin.tail.php');
|
||||
@@ -2,12 +2,12 @@
|
||||
$sub_menu = "300300";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
auth_check_menu($auth, $sub_menu, 'r');
|
||||
|
||||
// 체크된 자료 삭제
|
||||
if (isset($_POST['chk']) && is_array($_POST['chk'])) {
|
||||
for ($i=0; $i<count($_POST['chk']); $i++) {
|
||||
$pp_id = $_POST['chk'][$i];
|
||||
$pp_id = (int) $_POST['chk'][$i];
|
||||
|
||||
sql_query(" delete from {$g5['popular_table']} where pp_id = '$pp_id' ", true);
|
||||
}
|
||||
@@ -79,8 +79,8 @@ var list_delete_php = 'popular_list.php';
|
||||
<div class="sch_last">
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="sfl">
|
||||
<option value="pp_word"<?php echo get_selected($_GET['sfl'], "pp_word"); ?>>검색어</option>
|
||||
<option value="pp_date"<?php echo get_selected($_GET['sfl'], "pp_date"); ?>>등록일</option>
|
||||
<option value="pp_word"<?php echo get_selected($sfl, "pp_word"); ?>>검색어</option>
|
||||
<option value="pp_date"<?php echo get_selected($sfl, "pp_date"); ?>>등록일</option>
|
||||
</select>
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||
@@ -94,7 +94,7 @@ var list_delete_php = 'popular_list.php';
|
||||
<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="token" value="<?php echo $token ?>">
|
||||
<input type="hidden" name="token" value="<?php echo isset($token) ? $token : ''; ?>">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
@@ -167,5 +167,4 @@ $(function() {
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
include_once('./admin.tail.php');
|
||||
@@ -2,7 +2,10 @@
|
||||
$sub_menu = "300400";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
auth_check_menu($auth, $sub_menu, 'r');
|
||||
|
||||
$fr_date = isset($_REQUEST['fr_date']) ? $_REQUEST['fr_date'] : '';
|
||||
$to_date = isset($_REQUEST['to_date']) ? $_REQUEST['to_date'] : '';
|
||||
|
||||
if (empty($fr_date) || ! preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/", $fr_date) ) $fr_date = G5_TIME_YMD;
|
||||
if (empty($to_date) || ! preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/", $to_date) ) $to_date = G5_TIME_YMD;
|
||||
@@ -64,7 +67,7 @@ $(function(){
|
||||
<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="token" value="<?php echo $token ?>">
|
||||
<input type="hidden" name="token" value="<?php echo isset($token) ? $token : ''; ?>">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
@@ -105,8 +108,5 @@ $(function(){
|
||||
|
||||
<?php
|
||||
echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&page=");
|
||||
?>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
include_once('./admin.tail.php');
|
||||
+79
-13
@@ -3,7 +3,7 @@ $sub_menu = "300500";
|
||||
include_once('./_common.php');
|
||||
include_once(G5_EDITOR_LIB);
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
auth_check_menu($auth, $sub_menu, 'r');
|
||||
|
||||
$g5['title'] = '1:1문의 설정';
|
||||
include_once ('./admin.head.php');
|
||||
@@ -133,7 +133,7 @@ if(!isset($qaconfig['qa_include_head'])) {
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_title">타이틀<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_title" value="<?php echo $qaconfig['qa_title'] ?>" id="qa_title" required class="required frm_input" size="40">
|
||||
<input type="text" name="qa_title" value="<?php echo get_sanitize_input($qaconfig['qa_title']); ?>" id="qa_title" required class="required frm_input" size="40">
|
||||
<a href="<?php echo G5_BBS_URL; ?>/qalist.php" class="btn_frmline">1:1문의 바로가기</a>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -141,7 +141,7 @@ if(!isset($qaconfig['qa_include_head'])) {
|
||||
<th scope="row"><label for="qa_category">분류<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo help('분류와 분류 사이는 | 로 구분하세요. (예: 질문|답변) 첫자로 #은 입력하지 마세요. (예: #질문|#답변 [X])') ?>
|
||||
<input type="text" name="qa_category" value="<?php echo $qaconfig['qa_category'] ?>" id="qa_category" required class="required frm_input" size="70">
|
||||
<input type="text" name="qa_category" value="<?php echo get_sanitize_input($qaconfig['qa_category']); ?>" id="qa_category" required class="required frm_input" size="70">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -184,21 +184,21 @@ if(!isset($qaconfig['qa_include_head'])) {
|
||||
<th scope="row"><label for="qa_send_number">SMS 발신번호</label></th>
|
||||
<td>
|
||||
<?php echo help('SMS 알림 전송시 발신번호로 사용됩니다.'); ?>
|
||||
<input type="text" name="qa_send_number" value="<?php echo $qaconfig['qa_send_number'] ?>" id="qa_send_number" class="frm_input" size="30">
|
||||
<input type="text" name="qa_send_number" value="<?php echo get_sanitize_input($qaconfig['qa_send_number']); ?>" id="qa_send_number" class="frm_input" size="30">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_admin_hp">관리자 휴대폰번호</label></th>
|
||||
<td>
|
||||
<?php echo help('관리자 휴대폰번호를 입력하시면 문의글 등록시 등록하신 번호로 SMS 알림이 전송됩니다.<br>SMS 알림을 사용하지 않으시면 알림이 전송되지 않습니다.'); ?>
|
||||
<input type="text" name="qa_admin_hp" value="<?php echo $qaconfig['qa_admin_hp'] ?>" id="qa_admin_hp" class="frm_input" size="30">
|
||||
<input type="text" name="qa_admin_hp" value="<?php echo get_sanitize_input($qaconfig['qa_admin_hp']); ?>" id="qa_admin_hp" class="frm_input" size="30">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_admin_email">관리자 이메일</label></th>
|
||||
<td>
|
||||
<?php echo help('관리자 이메일을 입력하시면 문의글 등록시 등록하신 이메일로 알림이 전송됩니다.'); ?>
|
||||
<input type="text" name="qa_admin_email" value="<?php echo $qaconfig['qa_admin_email'] ?>" id="qa_admin_email" class="frm_input" size="50">
|
||||
<input type="text" name="qa_admin_email" value="<?php echo get_sanitize_input($qaconfig['qa_admin_email']); ?>" id="qa_admin_email" class="frm_input" size="50">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -263,34 +263,50 @@ if(!isset($qaconfig['qa_include_head'])) {
|
||||
<input type="text" name="qa_include_tail" value="<?php echo $qaconfig['qa_include_tail'] ?>" id="qa_include_tail" class="frm_input" size="50">
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="admin_captcha_box" style="display:none;">
|
||||
<th scope="row">자동등록방지</th>
|
||||
<td>
|
||||
<?php
|
||||
echo help("파일 경로를 입력 또는 수정시 캡챠를 반드시 입력해야 합니다.");
|
||||
|
||||
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
|
||||
$captcha_html = captcha_html();
|
||||
$captcha_js = chk_captcha_js();
|
||||
echo $captcha_html;
|
||||
?>
|
||||
<script>
|
||||
jQuery("#captcha_key").removeAttr("required").removeClass("required");
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_content_head">상단 내용</label></th>
|
||||
<td>
|
||||
<?php echo editor_html("qa_content_head", get_text($qaconfig['qa_content_head'], 0)); ?>
|
||||
<?php echo editor_html("qa_content_head", get_text(html_purifier($qaconfig['qa_content_head']), 0)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_content_tail">하단 내용</label></th>
|
||||
<td>
|
||||
<?php echo editor_html("qa_content_tail", get_text($qaconfig['qa_content_tail'], 0)); ?>
|
||||
<?php echo editor_html("qa_content_tail", get_text(html_purifier($qaconfig['qa_content_tail']), 0)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_mobile_content_head">모바일 상단 내용</label></th>
|
||||
<td>
|
||||
<?php echo editor_html("qa_mobile_content_head", get_text($qaconfig['qa_mobile_content_head'], 0)); ?>
|
||||
<?php echo editor_html("qa_mobile_content_head", get_text(html_purifier($qaconfig['qa_mobile_content_head']), 0)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_mobile_content_tail">모바일 하단 내용</label></th>
|
||||
<td>
|
||||
<?php echo editor_html("qa_mobile_content_tail", get_text($qaconfig['qa_mobile_content_tail'], 0)); ?>
|
||||
<?php echo editor_html("qa_mobile_content_tail", get_text(html_purifier($qaconfig['qa_mobile_content_tail']), 0)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_insert_content">글쓰기 기본 내용</label></th>
|
||||
<td>
|
||||
<textarea id="qa_insert_content" name="qa_insert_content" rows="5"><?php echo $qaconfig['qa_insert_content'] ?></textarea>
|
||||
<textarea id="qa_insert_content" name="qa_insert_content" rows="5"><?php echo html_purifier($qaconfig['qa_insert_content']); ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<?php for ($i=1; $i<=5; $i++) { ?>
|
||||
@@ -316,6 +332,53 @@ if(!isset($qaconfig['qa_include_head'])) {
|
||||
</form>
|
||||
|
||||
<script>
|
||||
|
||||
var captcha_chk = false;
|
||||
|
||||
function use_captcha_check(){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: g5_admin_url+"/ajax.use_captcha.php",
|
||||
data: { admin_use_captcha: "1" },
|
||||
cache: false,
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
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());
|
||||
|
||||
if(qa_include_head !== head || qa_include_tail !== tail){
|
||||
// 캡챠를 사용합니다.
|
||||
jQuery("#admin_captcha_box").show();
|
||||
captcha_chk = true;
|
||||
|
||||
use_captcha_check();
|
||||
|
||||
return false;
|
||||
} else {
|
||||
jQuery("#admin_captcha_box").hide();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
jQuery(function($){
|
||||
if( window.self !== window.top ){ // frame 또는 iframe을 사용할 경우 체크
|
||||
$("#qa_include_head, #qa_include_tail").on("change paste keyup", function(e) {
|
||||
frm_check_file();
|
||||
});
|
||||
|
||||
use_captcha_check();
|
||||
}
|
||||
});
|
||||
|
||||
function fqaconfigform_submit(f)
|
||||
{
|
||||
<?php echo get_editor_js("qa_content_head"); ?>
|
||||
@@ -323,11 +386,14 @@ function fqaconfigform_submit(f)
|
||||
<?php echo get_editor_js("qa_mobile_content_head"); ?>
|
||||
<?php echo get_editor_js("qa_mobile_content_tail"); ?>
|
||||
|
||||
if( captcha_chk ) {
|
||||
<?php echo isset($captcha_js) ? $captcha_js : ''; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
|
||||
}
|
||||
|
||||
f.action = "./qa_config_update.php";
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
include_once ('./admin.tail.php');
|
||||
+38
-11
@@ -4,25 +4,45 @@ include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
auth_check_menu($auth, $sub_menu, 'w');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$error_msg = '';
|
||||
|
||||
$qaconfig = get_qa_config();
|
||||
|
||||
$check_keys = array('qa_title', 'qa_category', 'qa_skin', 'qa_mobile_skin', 'qa_use_email', 'qa_req_email', 'qa_use_hp', 'qa_req_hp', 'qa_use_sms', 'qa_send_number', 'qa_admin_hp', 'qa_admin_email', 'qa_subject_len', 'qa_mobile_subject_len', 'qa_page_rows', 'qa_mobile_page_rows', 'qa_image_width', 'qa_upload_size');
|
||||
|
||||
foreach($check_keys as $key){
|
||||
$$key = $_POST[$key] = isset($_POST[$key]) ? strip_tags(clean_xss_attributes($_POST[$key])) : '';
|
||||
}
|
||||
|
||||
$qa_include_head = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($qa_include_head, 0, 255));
|
||||
$qa_include_tail = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($qa_include_tail, 0, 255));
|
||||
|
||||
// 관리자가 자동등록방지를 사용해야 할 경우
|
||||
if ($board && ($qaconfig['qa_include_head'] !== $qa_include_head || $qaconfig['qa_include_tail'] !== $qa_include_tail) && function_exists('get_admin_captcha_by') && get_admin_captcha_by()){
|
||||
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
|
||||
|
||||
if (!chk_captcha()) {
|
||||
alert('자동등록방지 숫자가 틀렸습니다.');
|
||||
}
|
||||
}
|
||||
|
||||
if( $qa_include_head ){
|
||||
$purl = parse_url($qa_include_head);
|
||||
$file = $purl['path'];
|
||||
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
||||
alert('상단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
||||
$file_ext = pathinfo($qa_include_head, PATHINFO_EXTENSION);
|
||||
|
||||
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) || ! preg_match('/^.*\.(php|htm|html)$/i', $qa_include_head) ) {
|
||||
alert('상단 파일 경로의 확장자는 php, htm, html 만 허용합니다.');
|
||||
}
|
||||
}
|
||||
|
||||
if( $qa_include_tail ){
|
||||
$purl = parse_url($qa_include_tail);
|
||||
$file = $purl['path'];
|
||||
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
||||
alert('하단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
||||
$file_ext = pathinfo($qa_include_tail, PATHINFO_EXTENSION);
|
||||
|
||||
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) || ! preg_match('/^.*\.(php|htm|html)$/i', $qa_include_tail) ) {
|
||||
alert('하단 파일 경로의 확장자는 php, htm, html 만 허용합니다.');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +56,11 @@ if( $qa_include_tail && ! is_include_path_check($qa_include_tail, 1) ){
|
||||
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.';
|
||||
}
|
||||
|
||||
if( function_exists('filter_input_include_path') ){
|
||||
$qa_include_head = filter_input_include_path($qa_include_head);
|
||||
$qa_include_tail = filter_input_include_path($qa_include_tail);
|
||||
}
|
||||
|
||||
$sql = " update {$g5['qa_config_table']}
|
||||
set qa_title = '{$_POST['qa_title']}',
|
||||
qa_category = '{$_POST['qa_category']}',
|
||||
@@ -75,9 +100,11 @@ $sql = " update {$g5['qa_config_table']}
|
||||
qa_5 = '{$_POST['qa_5']}' ";
|
||||
sql_query($sql);
|
||||
|
||||
if(function_exists('get_admin_captcha_by'))
|
||||
get_admin_captcha_by('remove');
|
||||
|
||||
if($error_msg){
|
||||
alert($error_msg, './qa_config.php');
|
||||
} else {
|
||||
goto_url('./qa_config.php');
|
||||
}
|
||||
?>
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
function social_log_file_delete($second=0){
|
||||
$files = glob(G5_DATA_PATH.'/tmp/social_*');
|
||||
if (is_array($files)) {
|
||||
$before_time = $second ? G5_SERVER_TIME - $second : 0;
|
||||
foreach ($files as $social_log_file) {
|
||||
$modification_time = filemtime($log_file); // 파일접근시간
|
||||
|
||||
if ($before_time && $modification_time > $before_time) continue;
|
||||
|
||||
unlink($social_log_file);
|
||||
}
|
||||
}
|
||||
}
|
||||
+30
-20
@@ -2,7 +2,7 @@
|
||||
$sub_menu = '100300';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
auth_check_menu($auth, $sub_menu, 'r');
|
||||
|
||||
if (!$config['cf_email_use'])
|
||||
alert('환경설정에서 \'메일발송 사용\'에 체크하셔야 메일을 발송할 수 있습니다.');
|
||||
@@ -13,26 +13,37 @@ $g5['title'] = '메일 테스트';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
if (isset($_POST['email'])) {
|
||||
$_POST['email'] = strip_tags($_POST['email']);
|
||||
$email = explode(',', $_POST['email']);
|
||||
for ($i=0; $i<count($email); $i++)
|
||||
mailer($config['cf_admin_email_name'], $config['cf_admin_email'], trim($email[$i]), '[메일검사] 제목', '<span style="font-size:9pt;">[메일검사] 내용<p>이 내용이 제대로 보인다면 보내는 메일 서버에는 이상이 없는것입니다.<p>'.G5_TIME_YMDHIS.'<p>이 메일 주소로는 회신되지 않습니다.</span>', 1);
|
||||
|
||||
echo '<section>';
|
||||
echo '<h2>결과메세지</h2>';
|
||||
echo '<div class="local_desc01 local_desc"><p>';
|
||||
echo '다음 '.count($email).'개의 메일 주소로 테스트 메일 발송이 완료되었습니다.';
|
||||
echo '</p></div>';
|
||||
echo '<ul>';
|
||||
for ($i=0;$i<count($email);$i++) {
|
||||
echo '<li>'.$email[$i].'</li>';
|
||||
$real_email = array();
|
||||
|
||||
for ($i=0; $i<count($email); $i++){
|
||||
|
||||
if (!preg_match("/([0-9a-zA-Z_-]+)@([0-9a-zA-Z_-]+)\.([0-9a-zA-Z_-]+)/", $email[$i])) continue;
|
||||
|
||||
$real_email[] = $email[$i];
|
||||
mailer($config['cf_admin_email_name'], $config['cf_admin_email'], trim($email[$i]), '[메일검사] 제목', '<span style="font-size:9pt;">[메일검사] 내용<p>이 내용이 제대로 보인다면 보내는 메일 서버에는 이상이 없는것입니다.<p>'.G5_TIME_YMDHIS.'<p>이 메일 주소로는 회신되지 않습니다.</span>', 1);
|
||||
}
|
||||
|
||||
if( $real_email ){
|
||||
echo '<section>';
|
||||
echo '<h2>결과메세지</h2>';
|
||||
echo '<div class="local_desc01 local_desc"><p>';
|
||||
echo '다음 '.count($real_email).'개의 메일 주소로 테스트 메일 발송이 완료되었습니다.';
|
||||
echo '</p></div>';
|
||||
echo '<ul>';
|
||||
for ($i=0;$i<count($real_email);$i++) {
|
||||
echo '<li>'.$real_email[$i].'</li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
echo '<div class="local_desc02 local_desc"><p>';
|
||||
echo '해당 주소로 테스트 메일이 도착했는지 확인해 주십시오.<br>';
|
||||
echo '만약, 테스트 메일이 오지 않는다면 더 다양한 계정의 메일 주소로 메일을 보내 보십시오.<br>';
|
||||
echo '그래도 메일이 하나도 도착하지 않는다면 메일 서버(sendmail server)의 오류일 가능성이 높으니, 웹 서버관리자에게 문의하여 주십시오.<br>';
|
||||
echo '</p></div>';
|
||||
echo '</section>';
|
||||
}
|
||||
echo '</ul>';
|
||||
echo '<div class="local_desc02 local_desc"><p>';
|
||||
echo '해당 주소로 테스트 메일이 도착했는지 확인해 주십시오.<br>';
|
||||
echo '만약, 테스트 메일이 오지 않는다면 더 다양한 계정의 메일 주소로 메일을 보내 보십시오.<br>';
|
||||
echo '그래도 메일이 하나도 도착하지 않는다면 메일 서버(sendmail server)의 오류일 가능성이 높으니, 웹 서버관리자에게 문의하여 주십시오.<br>';
|
||||
echo '</p></div>';
|
||||
echo '</section>';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -61,5 +72,4 @@ if (isset($_POST['email'])) {
|
||||
</section>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
include_once('./admin.tail.php');
|
||||
+2
-3
@@ -2,7 +2,7 @@
|
||||
$sub_menu = '100400';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
auth_check_menu($auth, $sub_menu, 'r');
|
||||
|
||||
$g5['title'] = '부가서비스';
|
||||
include_once('./admin.head.php');
|
||||
@@ -45,5 +45,4 @@ include_once('./admin.head.php');
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
include_once('./admin.tail.php');
|
||||
@@ -57,5 +57,4 @@ include_once("./admin.head.php");
|
||||
?>
|
||||
|
||||
<?php
|
||||
include_once("./admin.tail.php");
|
||||
?>
|
||||
include_once("./admin.tail.php");
|
||||
@@ -13,10 +13,10 @@ if (!strstr($_SERVER['SCRIPT_NAME'], 'install.php')) {
|
||||
}
|
||||
|
||||
$sv = isset($_REQUEST['sv']) ? get_search_string($_REQUEST['sv']) : '';
|
||||
$st = (isset($_REQUEST['st']) && $st) ? substr(get_search_string($_REQUEST['st']), 0, 12) : '';
|
||||
|
||||
if( isset($token) ){
|
||||
$token = @htmlspecialchars(strip_tags($token), ENT_QUOTES);
|
||||
}
|
||||
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_SMS5_ADMIN_URL.'/css/sms5.css">', 0);
|
||||
?>
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_SMS5_ADMIN_URL.'/css/sms5.css">', 0);
|
||||
@@ -10,12 +10,14 @@ if( !function_exists('json_encode') ) {
|
||||
}
|
||||
}
|
||||
|
||||
ajax_auth_check($auth[$sub_menu], "r");
|
||||
ajax_auth_check_menu($auth, $sub_menu, "r");
|
||||
|
||||
$err = '';
|
||||
$arr_ajax_msg = array();
|
||||
$exist_hplist = array();
|
||||
|
||||
$bk_hp = isset($_REQUEST['bk_hp']) ? clean_xss_tags($_REQUEST['bk_hp'], 1, 1) : '';
|
||||
|
||||
if( !$bk_hp )
|
||||
$err = '휴대폰번호를 입력해 주십시오.';
|
||||
|
||||
@@ -46,6 +48,4 @@ if(!$row['cnt'] && $w == 'u') {
|
||||
$arr_ajax_msg['error'] = $err;
|
||||
$arr_ajax_msg['exist'] = $exist_hplist;
|
||||
|
||||
die( json_encode($arr_ajax_msg) );
|
||||
|
||||
?>
|
||||
die( json_encode($arr_ajax_msg) );
|
||||
@@ -10,7 +10,9 @@ if( !function_exists('json_encode') ) {
|
||||
}
|
||||
}
|
||||
|
||||
ajax_auth_check($auth[$sub_menu], "r");
|
||||
ajax_auth_check_menu($auth, $sub_menu, "r");
|
||||
|
||||
$fg_no = isset($_REQUEST['fg_no']) ? preg_replace('/[^0-9]/i', '', $_REQUEST['fg_no']) : '';
|
||||
|
||||
$page_size = 6;
|
||||
|
||||
@@ -74,10 +76,12 @@ while($res = sql_fetch_array($qry))
|
||||
";
|
||||
}
|
||||
|
||||
$arr_ajax_msg['error'] = "";
|
||||
$arr_ajax_msg['list_text'] = $list_text;
|
||||
$arr_ajax_msg['page'] = $page;
|
||||
$arr_ajax_msg['total_count'] = $total_count;
|
||||
$arr_ajax_msg['total_page'] = $total_page;
|
||||
die( json_encode($arr_ajax_msg) );
|
||||
?>
|
||||
$arr_ajax_msg = array(
|
||||
'error'=>'',
|
||||
'list_text'=>$list_text,
|
||||
'page'=>$page,
|
||||
'total_count'=>$total_count,
|
||||
'total_page'=>$total_page
|
||||
);
|
||||
|
||||
die( json_encode($arr_ajax_msg) );
|
||||
@@ -4,7 +4,7 @@ include_once("./_common.php");
|
||||
|
||||
$colspan = 3;
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
auth_check_menu($auth, $sub_menu, "r");
|
||||
|
||||
$no_group = sql_fetch("select * from {$g5['sms5_book_group_table']} where bg_no=1");
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ if( !function_exists('json_encode') ) {
|
||||
}
|
||||
}
|
||||
|
||||
ajax_auth_check($auth[$sub_menu], "r");
|
||||
ajax_auth_check_menu($auth, $sub_menu, "r");
|
||||
|
||||
$lev = array();
|
||||
|
||||
@@ -26,6 +26,7 @@ while ($row = sql_fetch_array($qry))
|
||||
$lev[$row['mb_level']] = $row['cnt'];
|
||||
}
|
||||
$str_json = array();
|
||||
$line = 0;
|
||||
$tmp_str = '';
|
||||
$tmp_str .= '
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
@@ -53,5 +54,4 @@ $tmp_str .= '
|
||||
</div>';
|
||||
|
||||
$str_json['html'] = $tmp_str;
|
||||
echo json_encode($str_json);
|
||||
?>
|
||||
echo json_encode($str_json);
|
||||
@@ -5,7 +5,11 @@ include_once("./_common.php");
|
||||
$page_size = 10;
|
||||
$colspan = 5;
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
$bg_no = isset($_REQUEST['bg_no']) ? (int) $_REQUEST['bg_no'] : 0;
|
||||
$ap = isset($_REQUEST['ap']) ? (int) $_REQUEST['ap'] : 0;
|
||||
$no_hp = isset($_REQUEST['no_hp']) ? clean_xss_tags($_REQUEST['no_hp'], 1, 1) : '';
|
||||
|
||||
auth_check_menu($auth, $sub_menu, "r");
|
||||
|
||||
$g5['title'] = "휴대폰번호 관리";
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user