Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
@@ -6,4 +6,6 @@ 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>
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
<?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)) {
|
||||
@@ -101,7 +101,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 $config['cf_title'] ?> 관리자"></a></div>
|
||||
|
||||
<div id="tnb">
|
||||
<ul>
|
||||
|
||||
+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();
|
||||
|
||||
|
||||
+80
-3
@@ -379,6 +379,47 @@ function get_sanitize_input($s, $is_html=false){
|
||||
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()
|
||||
{
|
||||
@@ -435,8 +476,8 @@ function admin_check_xss_params($params){
|
||||
if ( empty($value) ) continue;
|
||||
|
||||
if( is_array($value) ){
|
||||
admin_check_xss_params($params);
|
||||
} else if ( preg_match('/<\s?[^\>]*\/?\s?>/i', $value) && preg_match('/script.*?\/script/ius', $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)) ){
|
||||
alert('요청 쿼리에 잘못된 스크립트문장이 있습니다.\\nXSS 공격일수도 있습니다.');
|
||||
die();
|
||||
}
|
||||
@@ -445,10 +486,41 @@ function admin_check_xss_params($params){
|
||||
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')
|
||||
{
|
||||
@@ -500,6 +572,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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
+63
-48
@@ -15,6 +15,11 @@ 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 +43,43 @@ $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_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 +89,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 +165,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 +188,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 +199,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);
|
||||
}
|
||||
}
|
||||
|
||||
+38
-27
@@ -185,7 +185,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<?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>
|
||||
@@ -869,7 +869,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<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">
|
||||
@@ -881,7 +881,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">
|
||||
@@ -893,7 +893,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">
|
||||
@@ -905,7 +905,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">
|
||||
@@ -918,7 +918,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<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">
|
||||
@@ -1114,25 +1114,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">
|
||||
@@ -1242,7 +1240,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 ?>">
|
||||
@@ -1261,7 +1259,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<div class="btn_fixed_top">
|
||||
<?php if( $bo_table && $w ){ ?>
|
||||
<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 G5_BBS_URL ?>/board.php?bo_table=<?php echo $board['bo_table']; ?>" 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">
|
||||
@@ -1374,6 +1372,19 @@ jQuery(function($){
|
||||
|
||||
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"); ?>
|
||||
|
||||
@@ -9,11 +9,19 @@ auth_check($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']) : '';
|
||||
|
||||
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 ( $w == '' && in_array($bo_table, get_bo_table_banned_word()) ){
|
||||
alert('입력한 게시판 TABLE명을 사용할수 없습니다. 다른 이름으로 입력해 주세요.');
|
||||
}
|
||||
|
||||
$bo_include_head = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($bo_include_head, 0, 255));
|
||||
$bo_include_tail = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($bo_include_tail, 0, 255));
|
||||
|
||||
@@ -68,18 +76,18 @@ $f = @fopen($file, 'w');
|
||||
// 분류에 & 나 = 는 사용이 불가하므로 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 = isset($_POST['bo_category_list']) ? preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\/\^\*]/", "", $_POST['bo_category_list']) : '';
|
||||
$str_bo_category_list = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\/\^\*]/", "", $bo_category_list);
|
||||
|
||||
$_POST['bo_subject'] = strip_tags($_POST['bo_subject']);
|
||||
$_POST['bo_mobile_subject'] = strip_tags($_POST['bo_mobile_subject']);
|
||||
$_POST['bo_subject'] = strip_tags(clean_xss_attributes($_POST['bo_subject']));
|
||||
$_POST['bo_mobile_subject'] = strip_tags(clean_xss_attributes($_POST['bo_mobile_subject']));
|
||||
|
||||
$sql_common = " gr_id = '{$_POST['gr_id']}',
|
||||
$sql_common = " gr_id = '{$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_admin = '{$bo_admin}',
|
||||
bo_list_level = '{$_POST['bo_list_level']}',
|
||||
bo_read_level = '{$_POST['bo_read_level']}',
|
||||
bo_write_level = '{$_POST['bo_write_level']}',
|
||||
@@ -189,6 +197,8 @@ if ($w == '') {
|
||||
|
||||
// 게시판 테이블 생성
|
||||
$file = file('./sql_write.sql');
|
||||
$file = get_db_create_replace($file);
|
||||
|
||||
$sql = implode($file, "\n");
|
||||
|
||||
$create_table = $g5['write_prefix'] . $bo_table;
|
||||
@@ -279,7 +289,7 @@ 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}' ";
|
||||
@@ -368,7 +378,7 @@ 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}' ";
|
||||
@@ -441,5 +451,7 @@ delete_cache_latest($bo_table);
|
||||
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}");
|
||||
?>
|
||||
|
||||
+1
-1
@@ -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>
|
||||
|
||||
+20
-12
@@ -10,6 +10,10 @@ if (!count($_POST['chk'])) {
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$act_button = isset($_POST['act_button']) ? strip_tags($_POST['act_button']) : '';
|
||||
$chk = (isset($_POST['chk']) && is_array($_POST['chk'])) ? $_POST['chk'] : array();
|
||||
$board_table = (isset($_POST['board_table']) && is_array($_POST['board_table'])) ? $_POST['board_table'] : array();
|
||||
|
||||
if ($_POST['act_button'] == "선택수정") {
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
@@ -29,19 +33,21 @@ 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 = '".sql_real_escape_string($_POST['gr_id'][$k])."',
|
||||
bo_subject = '".sql_real_escape_string($_POST['bo_subject'][$k])."',
|
||||
bo_device = '".sql_real_escape_string($_POST['bo_device'][$k])."',
|
||||
bo_skin = '".sql_real_escape_string($_POST['bo_skin'][$k])."',
|
||||
bo_mobile_skin = '".sql_real_escape_string($_POST['bo_mobile_skin'][$k])."',
|
||||
bo_read_point = '".sql_real_escape_string($_POST['bo_read_point'][$k])."',
|
||||
bo_write_point = '".sql_real_escape_string($_POST['bo_write_point'][$k])."',
|
||||
bo_comment_point = '".sql_real_escape_string($_POST['bo_comment_point'][$k])."',
|
||||
bo_download_point = '".sql_real_escape_string($_POST['bo_download_point'][$k])."',
|
||||
bo_use_search = '".sql_real_escape_string($_POST['bo_use_search'][$k])."',
|
||||
bo_use_sns = '".sql_real_escape_string($_POST['bo_use_sns'][$k])."',
|
||||
bo_order = '".sql_real_escape_string($_POST['bo_order'][$k])."'
|
||||
set gr_id = '".sql_real_escape_string(strip_tags($_POST['gr_id'][$k]))."',
|
||||
bo_subject = '".$p_bo_subject."',
|
||||
bo_device = '".sql_real_escape_string(strip_tags($_POST['bo_device'][$k]))."',
|
||||
bo_skin = '".sql_real_escape_string(strip_tags($_POST['bo_skin'][$k]))."',
|
||||
bo_mobile_skin = '".sql_real_escape_string(strip_tags($_POST['bo_mobile_skin'][$k]))."',
|
||||
bo_read_point = '".sql_real_escape_string(strip_tags($_POST['bo_read_point'][$k]))."',
|
||||
bo_write_point = '".sql_real_escape_string(strip_tags($_POST['bo_write_point'][$k]))."',
|
||||
bo_comment_point = '".sql_real_escape_string(strip_tags($_POST['bo_comment_point'][$k]))."',
|
||||
bo_download_point = '".sql_real_escape_string(strip_tags($_POST['bo_download_point'][$k]))."',
|
||||
bo_use_search = '".sql_real_escape_string(strip_tags($_POST['bo_use_search'][$k]))."',
|
||||
bo_use_sns = '".sql_real_escape_string(strip_tags($_POST['bo_use_sns'][$k]))."',
|
||||
bo_order = '".sql_real_escape_string(strip_tags($_POST['bo_order'][$k]))."'
|
||||
where bo_table = '".sql_real_escape_string($_POST['board_table'][$k])."' ";
|
||||
|
||||
sql_query($sql);
|
||||
@@ -72,5 +78,7 @@ if ($_POST['act_button'] == "선택수정") {
|
||||
|
||||
}
|
||||
|
||||
run_event('admin_board_list_update', $act_button, $chk, $board_table, $qstr);
|
||||
|
||||
goto_url('./board_list.php?'.$qstr);
|
||||
?>
|
||||
|
||||
@@ -16,7 +16,7 @@ if (!preg_match("/^([A-Za-z0-9_]{1,10})$/", $_POST['gr_id']))
|
||||
|
||||
if (!$gr_subject) alert('그룹 제목을 입력하세요.');
|
||||
|
||||
$gr_subject = isset($_POST['gr_subject']) ? strip_tags($_POST['gr_subject']) : '';
|
||||
$gr_subject = isset($_POST['gr_subject']) ? strip_tags(clean_xss_attributes($_POST['gr_subject'])) : '';
|
||||
|
||||
$sql_common = " gr_subject = '{$gr_subject}',
|
||||
gr_device = '{$_POST['gr_device']}',
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -18,19 +18,20 @@ if(!$count)
|
||||
for ($i=0; $i<$count; $i++)
|
||||
{
|
||||
$k = $_POST['chk'][$i];
|
||||
$gr_id = $_POST['group_id'][$k];
|
||||
$gr_subject = strip_tags($_POST['gr_subject'][$k]);
|
||||
$gr_id = preg_replace('/[^a-z0-9_]/i', '', $_POST['group_id'][$k]);
|
||||
$gr_subject = is_array($_POST['gr_subject']) ? strip_tags(clean_xss_attributes($_POST['gr_subject'][$k])) : '';
|
||||
$gr_admin = is_array($_POST['gr_admin']) ? strip_tags(clean_xss_attributes($_POST['gr_admin'][$k])) : '';
|
||||
|
||||
if($_POST['act_button'] == '선택수정') {
|
||||
$sql = " update {$g5['group_table']}
|
||||
set gr_subject = '{$gr_subject}',
|
||||
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]}'
|
||||
gr_device = '".sql_real_escape_string($_POST['gr_device'][$k])."',
|
||||
gr_admin = '".sql_real_escape_string($_POST['gr_admin'][$k])."',
|
||||
gr_use_access = '".sql_real_escape_string($_POST['gr_use_access'][$k])."',
|
||||
gr_order = '".sql_real_escape_string($_POST['gr_order'][$k])."'
|
||||
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'] == '선택삭제') {
|
||||
$row = sql_fetch(" select count(*) as cnt from {$g5['board_table']} where gr_id = '$gr_id' ");
|
||||
|
||||
@@ -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']) {
|
||||
|
||||
+1
-1
@@ -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('최고관리자만 접근 가능합니다.');
|
||||
|
||||
@@ -3,7 +3,7 @@ $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('최고관리자만 접근 가능합니다.');
|
||||
|
||||
@@ -10,6 +10,8 @@ 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');
|
||||
?>
|
||||
@@ -31,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++;
|
||||
@@ -44,6 +49,8 @@ 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;
|
||||
?>
|
||||
|
||||
+48
-9
@@ -253,6 +253,24 @@ 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(!$config['cf_faq_skin']) $config['cf_faq_skin'] = "basic";
|
||||
if(!$config['cf_mobile_faq_skin']) $config['cf_mobile_faq_skin'] = "basic";
|
||||
|
||||
@@ -264,6 +282,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>
|
||||
@@ -302,7 +321,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>
|
||||
@@ -881,6 +900,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>
|
||||
@@ -1067,7 +1089,7 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1317,7 +1339,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 get_sanitize_input($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 } ?>
|
||||
@@ -1419,6 +1441,10 @@ 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일 때
|
||||
@@ -1436,16 +1462,29 @@ 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,15 @@ if(!$_POST['cf_cert_use']) {
|
||||
|
||||
$cf_social_servicelist = !empty($_POST['cf_social_servicelist']) ? implode(',', $_POST['cf_social_servicelist']) : '';
|
||||
|
||||
$_POST['cf_title'] = strip_tags($_POST['cf_title']);
|
||||
$_POST['cf_title'] = strip_tags(clean_xss_attributes($_POST['cf_title']));
|
||||
|
||||
$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] ){
|
||||
$_POST[$key] = preg_replace('/[^a-z0-9_\-\.]/i', '', $_POST[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
$sql = " update {$g5['config_table']}
|
||||
set cf_title = '{$_POST['cf_title']}',
|
||||
@@ -61,6 +69,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']}',
|
||||
@@ -179,5 +188,13 @@ sql_query($sql);
|
||||
|
||||
//sql_query(" OPTIMIZE TABLE `$g5[config_table]` ");
|
||||
|
||||
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);
|
||||
?>
|
||||
+6
-3
@@ -35,6 +35,7 @@ if(!sql_query(" select co_skin from {$g5['content_table']} limit 1 ", false)) {
|
||||
|
||||
$html_title = "내용";
|
||||
$g5['title'] = $html_title.' 관리';
|
||||
$readonly = '';
|
||||
|
||||
if ($w == "u")
|
||||
{
|
||||
@@ -77,7 +78,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>
|
||||
@@ -86,11 +87,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>
|
||||
@@ -104,6 +105,7 @@ 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>
|
||||
@@ -114,6 +116,7 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
-->
|
||||
<tr>
|
||||
<th scope="row"><label for="co_include_head">상단 파일 경로</label></th>
|
||||
<td>
|
||||
|
||||
@@ -21,9 +21,10 @@ if ($w == "" || $w == "u")
|
||||
}
|
||||
|
||||
$co_id = preg_replace('/[^a-z0-9_]/i', '', $co_id);
|
||||
$co_subject = strip_tags($co_subject);
|
||||
$co_subject = strip_tags(clean_xss_attributes($co_subject));
|
||||
$co_include_head = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($co_include_head, 0, 255));
|
||||
$co_include_tail = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($co_include_tail, 0, 255));
|
||||
$co_tag_filter_use = isset($_POST['co_tag_filter_use']) ? (int) $_POST['co_tag_filter_use'] : 1;
|
||||
|
||||
// 관리자가 자동등록방지를 사용해야 할 경우
|
||||
if (($co_row['co_include_head'] !== $co_include_head || $co_row['co_include_tail'] !== $co_include_tail) && function_exists('get_admin_captcha_by') && get_admin_captcha_by()){
|
||||
@@ -70,6 +71,8 @@ if( $co_include_tail && ! is_include_path_check($co_include_tail, 1) ){
|
||||
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.';
|
||||
}
|
||||
|
||||
$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',
|
||||
@@ -77,6 +80,7 @@ $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' ";
|
||||
|
||||
@@ -110,6 +114,8 @@ else if ($w == "d")
|
||||
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'])
|
||||
|
||||
+1
-1
@@ -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>
|
||||
|
||||
+17
-1
@@ -27,6 +27,7 @@ a:link, a:visited {color:#000;text-decoration:none}
|
||||
|
||||
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%;height:50px;background:#3f51b5;z-index:1000}
|
||||
@@ -403,6 +404,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}
|
||||
@@ -512,8 +516,20 @@ 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}
|
||||
|
||||
/* 관리권한설정 */
|
||||
#add_admin fieldset {margin-top:20px}
|
||||
#add_admin fieldset {margin-top:20px;overflow:auto;padding:2px 6px;line-height:1.4;resize:vertical}
|
||||
|
||||
/* 메일 테스트 */
|
||||
|
||||
|
||||
@@ -74,6 +74,111 @@ if( isset($g5['social_profile_table']) && !sql_query(" DESC {$g5['social_profile
|
||||
$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 업그레이드가 완료된 상태입니다.';
|
||||
?>
|
||||
|
||||
|
||||
+2
-2
@@ -54,11 +54,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>
|
||||
|
||||
@@ -117,25 +117,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>
|
||||
|
||||
@@ -18,7 +18,7 @@ check_admin_token();
|
||||
if ($fm_himg_del) @unlink(G5_DATA_PATH."/faq/{$fm_id}_h");
|
||||
if ($fm_timg_del) @unlink(G5_DATA_PATH."/faq/{$fm_id}_t");
|
||||
|
||||
$fm_subject = strip_tags($fm_subject);
|
||||
$fm_subject = strip_tags(clean_xss_attributes($fm_subject));
|
||||
|
||||
$sql_common = " set fm_subject = '$fm_subject',
|
||||
fm_head_html = '$fm_head_html',
|
||||
|
||||
+3
-3
@@ -212,8 +212,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>
|
||||
@@ -283,7 +283,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>';
|
||||
}
|
||||
?>
|
||||
|
||||
+4
-2
@@ -10,6 +10,8 @@ $html_title = '회원메일';
|
||||
if ($w == 'u') {
|
||||
$html_title .= '수정';
|
||||
$readonly = ' readonly';
|
||||
|
||||
$ma_id = (int) $ma_id;
|
||||
|
||||
$sql = " select * from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
|
||||
$ma = sql_fetch($sql);
|
||||
@@ -40,11 +42,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>
|
||||
|
||||
+7
-5
@@ -9,11 +9,13 @@ auth_check($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'])) : '';
|
||||
|
||||
if ($w == '')
|
||||
{
|
||||
$sql = " insert {$g5['mail_table']}
|
||||
set ma_id = '{$_POST['ma_id']}',
|
||||
ma_subject = '{$_POST['ma_subject']}',
|
||||
set ma_subject = '{$ma_subject}',
|
||||
ma_content = '{$_POST['ma_content']}',
|
||||
ma_time = '".G5_TIME_YMDHIS."',
|
||||
ma_ip = '{$_SERVER['REMOTE_ADDR']}' ";
|
||||
@@ -22,16 +24,16 @@ if ($w == '')
|
||||
else if ($w == 'u')
|
||||
{
|
||||
$sql = " update {$g5['mail_table']}
|
||||
set ma_subject = '{$_POST['ma_subject']}',
|
||||
set ma_subject = '{$ma_subject}',
|
||||
ma_content = '{$_POST['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);
|
||||
}
|
||||
|
||||
|
||||
+8
-5
@@ -240,9 +240,9 @@ 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';
|
||||
$icon_url = str_replace(G5_DATA_PATH, G5_DATA_URL, $icon_file);
|
||||
echo '<img src="'.$icon_url.'" alt="">';
|
||||
echo '<input type="checkbox" id="del_mb_icon" name="del_mb_icon" value="1">삭제';
|
||||
}
|
||||
@@ -256,9 +256,9 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
<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.'/'.$mb['mb_id'].'.gif';
|
||||
$icon_file = G5_DATA_PATH.'/member_image/'.$mb_dir.'/'.get_mb_icon_name($mb['mb_id']).'.gif';
|
||||
if (file_exists($icon_file)) {
|
||||
$icon_url = G5_DATA_URL.'/member_image/'.$mb_dir.'/'.$mb['mb_id'].'.gif';
|
||||
$icon_url = str_replace(G5_DATA_PATH, G5_DATA_URL, $icon_file);
|
||||
echo '<img src="'.$icon_url.'" alt="">';
|
||||
echo '<input type="checkbox" id="del_mb_img" name="del_mb_img" value="1">삭제';
|
||||
}
|
||||
@@ -441,6 +441,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++) { ?>
|
||||
@@ -476,7 +478,8 @@ function fmember_submit(f)
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
run_event('admin_member_form_after', $mb, $w);
|
||||
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
|
||||
+37
-27
@@ -33,9 +33,14 @@ if($_POST['mb_certify_case'] && $_POST['mb_certify']) {
|
||||
$mb_zip1 = substr($_POST['mb_zip'], 0, 3);
|
||||
$mb_zip2 = substr($_POST['mb_zip'], 3);
|
||||
|
||||
$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);
|
||||
|
||||
$sql_common = " mb_name = '{$_POST['mb_name']}',
|
||||
mb_nick = '{$_POST['mb_nick']}',
|
||||
mb_email = '{$_POST['mb_email']}',
|
||||
mb_nick = '{$mb_nick}',
|
||||
mb_email = '{$mb_email}',
|
||||
mb_homepage = '{$_POST['mb_homepage']}',
|
||||
mb_tel = '{$_POST['mb_tel']}',
|
||||
mb_hp = '{$mb_hp}',
|
||||
@@ -74,13 +79,13 @@ if ($w == '')
|
||||
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'])
|
||||
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'])
|
||||
alert('이미 존재하는 이메일입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']);
|
||||
@@ -104,25 +109,47 @@ else if ($w == 'u')
|
||||
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'])
|
||||
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'])
|
||||
alert('이미 존재하는 이메일입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']);
|
||||
|
||||
if ($mb_password)
|
||||
$sql_password = " , mb_password = '".get_encrypt_string($mb_password)."' ";
|
||||
else
|
||||
$sql_password = "";
|
||||
|
||||
if ($passive_certify)
|
||||
$sql_certify = " , mb_email_certify = '".G5_TIME_YMDHIS."' ";
|
||||
else
|
||||
$sql_certify = "";
|
||||
|
||||
$sql = " update {$g5['member_table']}
|
||||
set {$sql_common}
|
||||
{$sql_password}
|
||||
{$sql_certify}
|
||||
where mb_id = '{$mb_id}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
else
|
||||
alert('제대로 된 값이 넘어오지 않았습니다.');
|
||||
|
||||
if( $w == '' || $w == 'u' ){
|
||||
|
||||
$mb_dir = substr($mb_id,0,2);
|
||||
$mb_icon_img = get_mb_icon_name($mb_id).'.gif';
|
||||
|
||||
// 회원 아이콘 삭제
|
||||
if ($del_mb_icon)
|
||||
@unlink(G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_id.'.gif');
|
||||
@unlink(G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_icon_img);
|
||||
|
||||
$image_regex = "/(\.(gif|jpe?g|png))$/i";
|
||||
$mb_icon_img = $mb_id.'.gif';
|
||||
|
||||
// 아이콘 업로드
|
||||
if (isset($_FILES['mb_icon']) && is_uploaded_file($_FILES['mb_icon']['tmp_name'])) {
|
||||
@@ -207,26 +234,9 @@ else if ($w == 'u')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($mb_password)
|
||||
$sql_password = " , mb_password = '".get_encrypt_string($mb_password)."' ";
|
||||
else
|
||||
$sql_password = "";
|
||||
|
||||
if ($passive_certify)
|
||||
$sql_certify = " , mb_email_certify = '".G5_TIME_YMDHIS."' ";
|
||||
else
|
||||
$sql_certify = "";
|
||||
|
||||
$sql = " update {$g5['member_table']}
|
||||
set {$sql_common}
|
||||
{$sql_password}
|
||||
{$sql_certify}
|
||||
where mb_id = '{$mb_id}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
else
|
||||
alert('제대로 된 값이 넘어오지 않았습니다.');
|
||||
|
||||
run_event('admin_member_form_update', $w, $mb_id);
|
||||
|
||||
goto_url('./member_form.php?'.$qstr.'&w=u&mb_id='.$mb_id, false);
|
||||
?>
|
||||
@@ -12,6 +12,8 @@ auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$mb_datas = array();
|
||||
|
||||
if ($_POST['act_button'] == "선택수정") {
|
||||
|
||||
for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
@@ -19,7 +21,7 @@ if ($_POST['act_button'] == "선택수정") {
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
|
||||
$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';
|
||||
@@ -53,7 +55,7 @@ if ($_POST['act_button'] == "선택수정") {
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
|
||||
$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';
|
||||
@@ -74,5 +76,7 @@ if ($msg)
|
||||
//echo '<script> alert("'.$msg.'"); </script>';
|
||||
alert($msg);
|
||||
|
||||
run_event('admin_member_list_update', $_POST['act_button'], $mb_datas);
|
||||
|
||||
goto_url('./member_list.php?'.$qstr);
|
||||
?>
|
||||
|
||||
@@ -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 = '';
|
||||
|
||||
+1
-1
@@ -76,7 +76,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>
|
||||
|
||||
+12
-10
@@ -20,10 +20,12 @@ $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 = preg_match('/^javascript/i', $_POST['me_link'][$i]) ? G5_URL : strip_tags($_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,13 +58,13 @@ 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);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -114,7 +114,7 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
</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>
|
||||
|
||||
@@ -12,7 +12,7 @@ else
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$nw_subject = isset($_POST['nw_subject']) ? strip_tags($_POST['nw_subject']) : '';
|
||||
$nw_subject = isset($_POST['nw_subject']) ? strip_tags(clean_xss_attributes($_POST['nw_subject'])) : '';
|
||||
|
||||
$sql_common = " nw_device = '{$_POST['nw_device']}',
|
||||
nw_begin_time = '{$_POST['nw_begin_time']}',
|
||||
|
||||
+1
-1
@@ -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>';
|
||||
}
|
||||
|
||||
|
||||
@@ -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,19 +41,19 @@ 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);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$mb_id = strip_tags($_POST['mb_id']);
|
||||
$po_point = strip_tags($_POST['po_point']);
|
||||
$po_content = strip_tags($_POST['po_content']);
|
||||
$mb_id = strip_tags(clean_xss_attributes($_POST['mb_id']));
|
||||
$po_point = strip_tags(clean_xss_attributes($_POST['po_point']));
|
||||
$po_content = strip_tags(clean_xss_attributes($_POST['po_content']));
|
||||
$expire = preg_replace('/[^0-9]/', '', $_POST['po_expire_term']);
|
||||
|
||||
$mb = get_member($mb_id);
|
||||
|
||||
+1
-1
@@ -37,7 +37,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
|
||||
|
||||
@@ -40,7 +40,7 @@ foreach( $_POST as $key=>$value ){
|
||||
if( empty($value) ) continue;
|
||||
|
||||
if( in_array($key, $check_keys) ) {
|
||||
$_POST[$key] = strip_tags($value);
|
||||
$_POST[$key] = strip_tags(clean_xss_attributes($value));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -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>
|
||||
@@ -282,31 +282,31 @@ if(!isset($qaconfig['qa_include_head'])) {
|
||||
<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++) { ?>
|
||||
|
||||
@@ -12,6 +12,12 @@ $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));
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ 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);
|
||||
|
||||
@@ -74,10 +74,13 @@ 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;
|
||||
$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) );
|
||||
?>
|
||||
@@ -12,7 +12,7 @@ $g5['title'] = '이모티콘그룹 이동';
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
$list = array(); //배열 변수 초기화
|
||||
$fo_no_list = isset($_POST['fo_no']) ? implode(',', $_POST['fo_no']) : '';
|
||||
$fo_no_list = isset($_POST['fo_no']) ? clean_xss_tags(strip_tags(implode(',', $_POST['fo_no']))) : '';
|
||||
|
||||
$sql = " select * from {$g5['sms5_form_group_table']} order by fg_no ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
@@ -6,6 +6,8 @@ auth_check($auth[$sub_menu], "r");
|
||||
if(!count($_POST['chk_fg_no']))
|
||||
alert('이모티콘을 이동할 그룹을 한개 이상 선택해 주십시오.', $url);
|
||||
|
||||
$fo_no_list = preg_replace('/[^a-zA-Z0-9\, ]/', '', $fo_no_list);
|
||||
|
||||
$sql = "select * from {$g5['sms5_form_table']} where fo_no in ($fo_no_list) order by fo_no desc ";
|
||||
$result = sql_query($sql);
|
||||
$save = array();
|
||||
|
||||
@@ -11,8 +11,8 @@ if ($w == 'u') // 업데이트
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
$fg_no = (int) $_POST['fg_no'][$k];
|
||||
$fg_name = strip_tags($_POST['fg_name'][$k]);
|
||||
$fg_member = strip_tags($_POST['fg_member'][$k]);
|
||||
$fg_name = isset($_POST['fg_name'][$k]) ? addslashes(strip_tags($_POST['fg_name'][$k])) : '';
|
||||
$fg_member = isset($_POST['fg_member'][$k]) ? addslashes(strip_tags($_POST['fg_member'][$k])) : '';
|
||||
|
||||
if (!is_numeric($fg_no))
|
||||
alert('그룹 고유번호가 없습니다.');
|
||||
@@ -83,7 +83,7 @@ else // 등록
|
||||
if (!strlen(trim($fg_name)))
|
||||
alert('그룹명을 입력해주세요');
|
||||
|
||||
$fg_name = strip_tags($fg_name);
|
||||
$fg_name = addslashes(strip_tags($fg_name));
|
||||
|
||||
$res = sql_fetch("select fg_name from {$g5['sms5_form_group_table']} where fg_name = '$fg_name'");
|
||||
if ($res)
|
||||
|
||||
@@ -4,8 +4,8 @@ include_once("./_common.php");
|
||||
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
|
||||
$fo_name = isset($fo_name) ? strip_tags($fo_name) : '';
|
||||
$fo_content = isset($fo_content) ? strip_tags($fo_content) : '';
|
||||
$fo_name = isset($fo_name) ? strip_tags(clean_xss_attributes($fo_name)) : '';
|
||||
$fo_content = isset($fo_content) ? strip_tags(clean_xss_attributes($fo_content)) : '';
|
||||
|
||||
$g5['title'] = "이모티콘 업데이트";
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@ auth_check($auth[$sub_menu], "w");
|
||||
|
||||
$g5['title'] = "이모티콘 ";
|
||||
|
||||
$fg_no = isset($fg_no) ? (int) $fg_no : '';
|
||||
|
||||
if ($w == 'u' && is_numeric($fo_no)) {
|
||||
$write = sql_fetch("select * from {$g5['sms5_form_table']} where fo_no='$fo_no'");
|
||||
$g5['title'] .= '수정';
|
||||
@@ -48,7 +50,7 @@ include_once(G5_ADMIN_PATH.'/admin.head.php');
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="fo_name">제목<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td><input type="text" name="fo_name" id="fo_name" required value="<?php echo $write['fo_name']?>" class="frm_input required" size="70"></td>
|
||||
<td><input type="text" name="fo_name" id="fo_name" required value="<?php echo get_sanitize_input($write['fo_name']); ?>" class="frm_input required" size="70"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">메세지</th>
|
||||
|
||||
@@ -11,6 +11,10 @@ $g5['title'] = "문자전송 내역 (번호별)";
|
||||
|
||||
if ($page < 1) $page = 1;
|
||||
|
||||
if( isset($st) && !in_array($st, array('hs_name', 'hs_hp', 'bk_no')) ){
|
||||
$st = '';
|
||||
}
|
||||
|
||||
if ($st && trim($sv))
|
||||
$sql_search = " and $st like '%$sv%' ";
|
||||
else
|
||||
|
||||
@@ -8,6 +8,14 @@ $colspan = 10;
|
||||
$st = isset($st) ? strip_tags($st) : '';
|
||||
$ssv = isset($ssv) ? strip_tags($ssv) : '';
|
||||
|
||||
if( $st && !in_array($st, array('hs_name', 'hs_hp', 'bk_no')) ){
|
||||
$st = '';
|
||||
}
|
||||
|
||||
if( $sst && !in_array($sst, array('mb_id', 'bk_no', 'hs_name', 'hs_hp', 'hs_datetime', 'hs_flag', 'hs_code', 'hs_memo', 'hs_log')) ){
|
||||
$sst = '';
|
||||
}
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
|
||||
$g5['title'] = "문자전송 상세내역";
|
||||
@@ -18,7 +26,7 @@ if (!is_numeric($wr_no))
|
||||
if ($spage < 1) $spage = 1;
|
||||
|
||||
if ($sst && trim($ssv))
|
||||
$sql_search = " and $sst like '%$ssv%' ";
|
||||
$sql_search = " and $sst like '%".sql_real_escape_string($ssv)."%' ";
|
||||
else
|
||||
$sql_search = "";
|
||||
|
||||
@@ -127,22 +135,22 @@ function all_send()
|
||||
<tr>
|
||||
<td><?php echo $re_vnum--?></td>
|
||||
<!-- <td><input type=checkbox></td> -->
|
||||
<!-- <td><?php echo $res[wr_message]; ?></span></td>-->
|
||||
<!-- <td><?php echo $res[wr_reply]; ?></td>-->
|
||||
<!-- <td><?php echo $res['wr_message']; ?></span></td>-->
|
||||
<!-- <td><?php echo $res['wr_reply']; ?></td>-->
|
||||
<td><?php echo $res['wr_datetime']?></td>
|
||||
<td><?php echo number_format($res['wr_total'])?></td>
|
||||
<td><?php echo number_format($res['wr_success'])?></td>
|
||||
<td><?php echo number_format($res['wr_failure'])?></td>
|
||||
<td class="td_mng">
|
||||
<a href="./history_view.php?page=<?php echo $page?>&st=<?php echo $st?>&sv=<?php echo $sv?>&wr_no=<?php echo $res['wr_no']?>&wr_renum=<?php echo $res['wr_renum']?>" class="btn btn_03">수정</a>
|
||||
<!-- <a href="./history_del.php?page=<?php echo $page?>&st=<?php echo $st?>&sv=<?php echo $sv?>&wr_no=<?php echo $res[wr_no]?>&wr_renum=<?php echo $res[wr_renum]?>">삭제</a> -->
|
||||
<!-- <a href="./history_del.php?page=<?php echo $page?>&st=<?php echo $st?>&sv=<?php echo $sv?>&wr_no=<?php echo $res['wr_no']?>&wr_renum=<?php echo $res['wr_renum']?>">삭제</a> -->
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
if( $write['wr_memo'] ){
|
||||
|
||||
@@ -53,6 +53,7 @@ eval("\$file = \"$file\";");
|
||||
$f = explode(";", $file);
|
||||
for ($i=0; $i<count($f); $i++) {
|
||||
if (trim($f[$i]) == "") continue;
|
||||
$f[$i] = get_db_create_replace($f[$i]);
|
||||
sql_query($f[$i]) or die(mysqli_error());
|
||||
}
|
||||
// 테이블 생성 ------------------------------------
|
||||
|
||||
@@ -16,6 +16,8 @@ if ($page < 1) $page = 1;
|
||||
$bg_no = isset($bg_no) ? (int) $bg_no : 0;
|
||||
$st = isset($st) ? preg_replace('/[^a-z0-9]/i', '', $st) : '';
|
||||
|
||||
$sql_korean = $sql_group = $sql_search = $sql_no_hp = '';
|
||||
|
||||
if (is_numeric($bg_no))
|
||||
$sql_group = " and bg_no='$bg_no' ";
|
||||
else
|
||||
@@ -127,9 +129,9 @@ function no_hp_click(val)
|
||||
<label for="bg_no" class="sound_only">그룹명</label>
|
||||
<select name="bg_no" id="bg_no" onchange="location.href='<?php echo $_SERVER['SCRIPT_NAME']?>?bg_no='+this.value;">
|
||||
<option value=""<?php echo get_selected('', $bg_no); ?>> 전체 </option>
|
||||
<option value="<?php echo $no_group['bg_no']?>"<?php echo get_selected($bg_no, $no_group['bg_no']); ?>> <?php echo $no_group['bg_name']?> (<?php echo number_format($no_group['bg_count'])?> 명) </option>
|
||||
<option value="<?php echo $no_group['bg_no']?>"<?php echo get_selected($no_group['bg_no'], $bg_no); ?>> <?php echo $no_group['bg_name']?> (<?php echo number_format($no_group['bg_count'])?> 명) </option>
|
||||
<?php for($i=0; $i<count($group); $i++) {?>
|
||||
<option value="<?php echo $group[$i]['bg_no']?>"<?php echo get_selected($bg_no, $group[$i]['bg_no']);?>> <?php echo $group[$i]['bg_name']?> (<?php echo number_format($group[$i]['bg_count'])?> 명) </option>
|
||||
<option value="<?php echo $group[$i]['bg_no']?>"<?php echo get_selected($group[$i]['bg_no'], $bg_no);?>> <?php echo $group[$i]['bg_name']?> (<?php echo number_format($group[$i]['bg_count'])?> 명) </option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<input type="checkbox" name="no_hp" id="no_hp" <?php echo $no_hp_checked?> onclick="no_hp_click(this.checked)">
|
||||
|
||||
@@ -31,8 +31,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
|
||||
<form name="fboardmoveall" method="post" action="./number_move_update.php" onsubmit="return fboardmoveall_submit(this);">
|
||||
<input type="hidden" name="sw" value="<?php echo $sw ?>">
|
||||
<input type="hidden" name="bk_no_list" value="<?php echo $bk_no_list ?>">
|
||||
<input type="hidden" name="act" value="<?php echo $act ?>">
|
||||
<input type="hidden" name="bk_no_list" value="<?php echo get_sanitize_input($bk_no_list); ?>">
|
||||
<input type="hidden" name="act" value="<?php echo get_sanitize_input($act); ?>">
|
||||
<input type="hidden" name="url" value="<?php echo clean_xss_tags(strip_tags($_SERVER['HTTP_REFERER'])); ?>">
|
||||
<div class=" new_win_con">
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
|
||||
@@ -12,6 +12,9 @@ $is_hp_exist = false;
|
||||
|
||||
$bk_hp = get_hp($bk_hp);
|
||||
|
||||
$bk_memo = strip_tags($bk_memo);
|
||||
$bk_name = strip_tags($bk_name);
|
||||
|
||||
if ($w=='u') // 업데이트
|
||||
{
|
||||
if (!$bg_no) $bg_no = 0;
|
||||
@@ -21,8 +24,6 @@ if ($w=='u') // 업데이트
|
||||
if (!strlen(trim($bk_name)))
|
||||
alert('이름을 입력해주세요');
|
||||
|
||||
$bk_name = strip_tags($bk_name);
|
||||
|
||||
if ($bk_hp == '')
|
||||
alert('휴대폰번호만 입력 가능합니다.');
|
||||
/*
|
||||
@@ -48,7 +49,7 @@ if ($w=='u') // 업데이트
|
||||
sql_query("update {$g5['sms5_book_group_table']} set bg_receipt = bg_receipt - 1, bg_reject = bg_reject + 1 where bg_no='$bg_no'");
|
||||
}
|
||||
|
||||
sql_query("update {$g5['sms5_book_table']} set bg_no='$bg_no', bk_name='$bk_name', bk_hp='$bk_hp', bk_receipt='$bk_receipt', bk_datetime='".G5_TIME_YMDHIS."', bk_memo='".addslashes($bk_memo)."' where bk_no='$bk_no'");
|
||||
sql_query("update {$g5['sms5_book_table']} set bg_no='$bg_no', bk_name='".addslashes($bk_name)."', bk_hp='$bk_hp', bk_receipt='$bk_receipt', bk_datetime='".G5_TIME_YMDHIS."', bk_memo='".addslashes($bk_memo)."' where bk_no='$bk_no'");
|
||||
if ($res['mb_id']){ //만약에 mb_id가 있다면...
|
||||
// 휴대폰번호 중복체크
|
||||
$sql = " select mb_id from {$g5['member_table']} where mb_id <> '{$res['mb_id']}' and mb_hp = '{$bk_hp}' ";
|
||||
|
||||
@@ -121,7 +121,7 @@ include_once(G5_ADMIN_PATH."/admin.head.php");
|
||||
<tr>
|
||||
<th scope="row"><label for="bk_memo">메모</label></th>
|
||||
<td>
|
||||
<textarea name="bk_memo" id="bk_memo"><?php echo $write['bk_memo']?></textarea>
|
||||
<textarea name="bk_memo" id="bk_memo"><?php echo html_purifier($write['bk_memo']); ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -129,7 +129,7 @@ function num_group_submit(f)
|
||||
<select name="select_bg_no_999" id="select_bg_no_999" onchange="move(<?php echo $no_group['bg_no']?>, '<?php echo $no_group['bg_name']?>', this);" >
|
||||
<option value=""></option>
|
||||
<?php for ($i=0; $i<count($group); $i++) { ?>
|
||||
<option value="<?php echo $group[$i]['bg_no']?>"> <?php echo $group[$i]['bg_name']?> </option>
|
||||
<option value="<?php echo $group[$i]['bg_no']?>"> <?php echo get_sanitize_input($group[$i]['bg_name']); ?> </option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</td>
|
||||
@@ -150,7 +150,7 @@ function num_group_submit(f)
|
||||
</td>
|
||||
<td>
|
||||
<label for="bg_name_<?php echo $i; ?>" class="sound_only">그룹명</label>
|
||||
<input type="text" name="bg_name[<?php echo $i; ?>]" value="<?php echo $group[$i]['bg_name']?>" id="bg_name_<?php echo $i; ?>" class="frm_input">
|
||||
<input type="text" name="bg_name[<?php echo $i; ?>]" value="<?php echo get_sanitize_input($group[$i]['bg_name']); ?>" id="bg_name_<?php echo $i; ?>" class="frm_input">
|
||||
</td>
|
||||
<td class="td_num"><?php echo number_format($group[$i]['bg_count'])?></td>
|
||||
<td class="td_num"><?php echo number_format($group[$i]['bg_member'])?></td>
|
||||
|
||||
@@ -11,7 +11,7 @@ if ($w == 'u') // 업데이트
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
$bg_no = (int) $_POST['bg_no'][$k];
|
||||
$bg_name = strip_tags($_POST['bg_name'][$k]);
|
||||
$bg_name = strip_tags(clean_xss_attributes($_POST['bg_name'][$k]));
|
||||
|
||||
if (!is_numeric($bg_no))
|
||||
alert('그룹 고유번호가 없습니다.');
|
||||
@@ -23,11 +23,11 @@ if ($w == 'u') // 업데이트
|
||||
if (!strlen(trim($bg_name)))
|
||||
alert('그룹명을 입력해주세요');
|
||||
|
||||
$res = sql_fetch("select bg_name from {$g5['sms5_book_group_table']} where bg_no<>'$bg_no' and bg_name='$bg_name'");
|
||||
$res = sql_fetch("select bg_name from {$g5['sms5_book_group_table']} where bg_no<>'$bg_no' and bg_name='".sql_real_escape_string($bg_name)."'");
|
||||
if ($res)
|
||||
alert('같은 그룹명이 존재합니다.');
|
||||
|
||||
sql_query("update {$g5['sms5_book_group_table']} set bg_name='".addslashes($bg_name)."' where bg_no='$bg_no'");
|
||||
sql_query("update {$g5['sms5_book_group_table']} set bg_name='".sql_real_escape_string($bg_name)."' where bg_no='$bg_no'");
|
||||
}
|
||||
}
|
||||
else if ($w == 'de') // 그룹삭제
|
||||
@@ -63,7 +63,7 @@ else if ($w == 'em') // 비우기
|
||||
}
|
||||
else // 등록
|
||||
{
|
||||
$bg_name = strip_tags($bg_name);
|
||||
$bg_name = strip_tags(clean_xss_attributes($bg_name));
|
||||
|
||||
if (!strlen(trim($bg_name)))
|
||||
alert('그룹명을 입력해주세요');
|
||||
@@ -72,7 +72,7 @@ else // 등록
|
||||
if ($res)
|
||||
alert('같은 그룹명이 존재합니다.');
|
||||
|
||||
sql_query("insert into {$g5['sms5_book_group_table']} set bg_name='".addslashes($bg_name)."'");
|
||||
sql_query("insert into {$g5['sms5_book_group_table']} set bg_name='$bg_name'");
|
||||
}
|
||||
|
||||
goto_url('./num_group.php');
|
||||
|
||||
@@ -6,6 +6,8 @@ auth_check($auth[$sub_menu], "r");
|
||||
if(!count($_POST['chk_bg_no']))
|
||||
alert('번호를 '.$act.'할 그룹을 한개 이상 선택해 주십시오.', $url);
|
||||
|
||||
$bk_no_list = preg_replace('/[^a-zA-Z0-9\, ]/', '', $bk_no_list);
|
||||
|
||||
$sql = "select * from {$g5['sms5_book_table']} where bk_no in ($bk_no_list) order by bk_no desc ";
|
||||
$result = sql_query($sql);
|
||||
$save = array();
|
||||
|
||||
@@ -7,6 +7,8 @@ while ($res = sql_fetch_array($qry)) array_push($group, $res);
|
||||
|
||||
$res = sql_fetch("select count(*) as cnt from `{$g5['sms5_form_table']}` where fg_no=0");
|
||||
$no_count = $res['cnt'];
|
||||
|
||||
$fg_no = isset($fg_no) ? (int) $fg_no : '';
|
||||
?>
|
||||
|
||||
<form name="emo_frm">
|
||||
|
||||
@@ -10,6 +10,7 @@ CREATE TABLE `__TABLE_NAME__` (
|
||||
`wr_option` set('html1','html2','secret','mail') NOT NULL,
|
||||
`wr_subject` varchar(255) NOT NULL,
|
||||
`wr_content` text NOT NULL,
|
||||
`wr_seo_title` varchar(255) NOT NULL DEFAULT '',
|
||||
`wr_link1` text NOT NULL,
|
||||
`wr_link2` text NOT NULL,
|
||||
`wr_link1_hit` int(11) NOT NULL DEFAULT '0',
|
||||
@@ -39,6 +40,7 @@ CREATE TABLE `__TABLE_NAME__` (
|
||||
`wr_9` varchar(255) NOT NULL,
|
||||
`wr_10` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`wr_id`),
|
||||
KEY `wr_seo_title` (`wr_seo_title`),
|
||||
KEY `wr_num_reply_parent` (`wr_num`,`wr_reply`,`wr_parent`),
|
||||
KEY `wr_is_comment` (`wr_is_comment`,`wr_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
@@ -29,7 +29,7 @@ if(!in_array($type, $arr_type)) {
|
||||
}
|
||||
|
||||
if($type == 'board') {
|
||||
$keys = array('bo_gallery_cols', 'bo_gallery_width', 'bo_gallery_height', 'bo_mobile_gallery_width', 'bo_mobile_gallery_height', 'bo_image_width');
|
||||
$keys = run_replace('theme_config_load_keys', array('bo_gallery_cols', 'bo_gallery_width', 'bo_gallery_height', 'bo_mobile_gallery_width', 'bo_mobile_gallery_height', 'bo_image_width'), $type);
|
||||
$tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys));
|
||||
|
||||
$i = 0;
|
||||
@@ -43,7 +43,7 @@ if($type == 'board') {
|
||||
if($i == 0)
|
||||
$data['error'] = '적용할 게시판 이미지 설정이 없습니다.';
|
||||
} else if($type == 'conf_skin') {
|
||||
$keys = array('cf_new_skin', 'cf_mobile_new_skin', 'cf_search_skin', 'cf_mobile_search_skin', 'cf_connect_skin', 'cf_mobile_connect_skin', 'cf_faq_skin', 'cf_mobile_faq_skin');
|
||||
$keys = run_replace('theme_config_load_keys', array('cf_new_skin', 'cf_mobile_new_skin', 'cf_search_skin', 'cf_mobile_search_skin', 'cf_connect_skin', 'cf_mobile_connect_skin', 'cf_faq_skin', 'cf_mobile_faq_skin'), $type);
|
||||
|
||||
$tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys));
|
||||
|
||||
@@ -58,7 +58,7 @@ if($type == 'board') {
|
||||
if($i == 0)
|
||||
$data['error'] = '적용할 기본환경 스킨 설정이 없습니다.';
|
||||
} else if($type == 'conf_member') {
|
||||
$keys = array('cf_member_skin', 'cf_mobile_member_skin');
|
||||
$keys = run_replace('theme_config_load_keys', array('cf_member_skin', 'cf_mobile_member_skin'), $type);
|
||||
|
||||
$tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys));
|
||||
|
||||
|
||||
@@ -68,5 +68,7 @@ if($_POST['set_default_skin'] == 1) {
|
||||
}
|
||||
}
|
||||
|
||||
run_event('adm_theme_update', $theme, $_POST['set_default_skin']);
|
||||
|
||||
die('');
|
||||
?>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
$call = isset($_REQUEST['call']) ? strtolower(preg_replace('/[^a-z0-9_]/i', '', $_REQUEST['call'])) : '';
|
||||
|
||||
if( ! $call ){
|
||||
return;
|
||||
}
|
||||
|
||||
if( ! $is_admin ){
|
||||
$sql = " select count(*) as cnt from {$g5['auth_table']} where mb_id = '{$member['mb_id']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ( ! $row['cnt']) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
run_event('admin_request_handler_'.$call, $arr_query, $token);
|
||||
|
||||
$sub_menu = admin_menu_find_by($call, 'sub_menu');
|
||||
$g5['title'] = admin_menu_find_by($call, 'title');
|
||||
|
||||
include_once ('./admin.head.php');
|
||||
|
||||
run_event('admin_get_page_'.$call, $arr_query, $token);
|
||||
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
+1
-1
@@ -73,7 +73,7 @@ $result = sql_query($sql);
|
||||
}
|
||||
|
||||
$title = str_replace(array('<', '>', '&'), array("<", ">", "&"), $referer);
|
||||
$link = '<a href="'.$row['vi_referer'].'" target="_blank">';
|
||||
$link = '<a href="'.get_text($row['vi_referer']).'" target="_blank">';
|
||||
$link = str_replace('&', "&", $link);
|
||||
$link2 = '</a>';
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'">처음</a>'; //페이지 처
|
||||
}
|
||||
|
||||
$title = str_replace(array("<", ">"), array("<", ">"), $referer);
|
||||
$link = '<a href="'.$row['vi_referer'].'" target="_blank" title="'.$title.'">';
|
||||
$link = '<a href="'.get_text($row['vi_referer']).'" target="_blank" title="'.$title.'">';
|
||||
}
|
||||
|
||||
if ($is_admin == 'super')
|
||||
|
||||
+12
-12
@@ -6,27 +6,27 @@ check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$g5['title'] = '글,댓글 현황';
|
||||
include_once ('./admin.head.php');
|
||||
|
||||
// http://www.jqplot.com/
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_PLUGIN_URL.'/jqplot/jquery.jqplot.css">', 0);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/jquery.jqplot.js"></script>', 0);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/plugins/jqplot.canvasTextRenderer.min.js"></script>', 0);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/plugins/jqplot.categoryAxisRenderer.min.js"></script>', 0);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/plugins/jqplot.pointLabels.min.js"></script>', 0);
|
||||
add_javascript('<!--[if lt IE 9]><script src="'.G5_PLUGIN_URL.'/jqplot/excanvas.js"></script><![endif]-->', 0);
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_PLUGIN_URL.'/jqplot/jquery.jqplot.css">', 1);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/jquery.jqplot.js"></script>', 1);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/plugins/jqplot.canvasTextRenderer.min.js"></script>', 1);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/plugins/jqplot.categoryAxisRenderer.min.js"></script>', 1);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/plugins/jqplot.pointLabels.min.js"></script>', 1);
|
||||
add_javascript('<!--[if lt IE 9]><script src="'.G5_PLUGIN_URL.'/jqplot/excanvas.js"></script><![endif]-->', 1);
|
||||
|
||||
if (!($graph == 'line' || $graph == 'bar'))
|
||||
$graph = 'line';
|
||||
|
||||
if ($graph == 'bar') {
|
||||
// 바 타입으로 사용하는 코드입니다.
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/jqplot.barRenderer.min.js"></script>', 0);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/jqplot.categoryAxisRenderer.min.js"></script>', 0);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/jqplot.pointLabels.min.js"></script>', 0);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/jqplot.barRenderer.min.js"></script>', 1);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/jqplot.categoryAxisRenderer.min.js"></script>', 1);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/jqplot.pointLabels.min.js"></script>', 1);
|
||||
}
|
||||
|
||||
$g5['title'] = '글,댓글 현황';
|
||||
include_once ('./admin.head.php');
|
||||
|
||||
$period_array = array(
|
||||
'오늘'=>array('시간', 0),
|
||||
'어제'=>array('시간', 0),
|
||||
|
||||
+8
-5
@@ -31,10 +31,11 @@ include_once(G5_PATH.'/head.sub.php');
|
||||
$msg = isset($msg) ? strip_tags($msg) : '';
|
||||
$msg2 = str_replace("\\n", "<br>", $msg);
|
||||
|
||||
$url = clean_xss_tags($url);
|
||||
if (!$url) $url = clean_xss_tags($_SERVER['HTTP_REFERER']);
|
||||
$url = clean_xss_tags($url, 1);
|
||||
if (!$url) $url = clean_xss_tags($_SERVER['HTTP_REFERER'], 1);
|
||||
|
||||
$url = preg_replace("/[\<\>\'\"\\\'\\\"\(\)]/", "", $url);
|
||||
$url = preg_replace('/\r\n|\r|\n|[^\x20-\x7e]/','', $url);
|
||||
|
||||
// url 체크
|
||||
check_url_host($url, $msg);
|
||||
@@ -48,11 +49,9 @@ if($error) {
|
||||
|
||||
<script>
|
||||
alert("<?php echo $msg; ?>");
|
||||
//document.location.href = "<?php echo $url; ?>";
|
||||
<?php if ($url) { ?>
|
||||
document.location.replace("<?php echo str_replace('&', '&', $url); ?>");
|
||||
<?php } else { ?>
|
||||
//alert('history.back();');
|
||||
history.back();
|
||||
<?php } ?>
|
||||
</script>
|
||||
@@ -67,13 +66,17 @@ history.back();
|
||||
<form method="post" action="<?php echo $url ?>">
|
||||
<?php
|
||||
foreach($_POST as $key => $value) {
|
||||
|
||||
$key = clean_xss_tags($key);
|
||||
$value = clean_xss_tags($value);
|
||||
|
||||
if(strlen($value) < 1)
|
||||
continue;
|
||||
|
||||
if(preg_match("/pass|pwd|capt|url/", $key))
|
||||
continue;
|
||||
?>
|
||||
<input type="hidden" name="<?php echo $key ?>" value="<?php echo $value ?>">
|
||||
<input type="hidden" name="<?php echo htmlspecialchars($key); ?>" value="<?php echo htmlspecialchars($value); ?>">
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
+10
-10
@@ -8,7 +8,7 @@ if (!$board['bo_table']) {
|
||||
check_device($board['bo_device']);
|
||||
|
||||
if (isset($write['wr_is_comment']) && $write['wr_is_comment']) {
|
||||
goto_url('./board.php?bo_table='.$bo_table.'&wr_id='.$write['wr_parent'].'#c_'.$wr_id);
|
||||
goto_url(get_pretty_url($bo_table, $write['wr_parent'], '#c_'.$wr_id));
|
||||
}
|
||||
|
||||
if (!$bo_table) {
|
||||
@@ -19,18 +19,18 @@ if (!$bo_table) {
|
||||
$g5['board_title'] = ((G5_IS_MOBILE && $board['bo_mobile_subject']) ? $board['bo_mobile_subject'] : $board['bo_subject']);
|
||||
|
||||
// wr_id 값이 있으면 글읽기
|
||||
if (isset($wr_id) && $wr_id) {
|
||||
if ((isset($wr_id) && $wr_id) || (isset($wr_seo_title) && $wr_seo_title)) {
|
||||
// 글이 없을 경우 해당 게시판 목록으로 이동
|
||||
if (!$write['wr_id']) {
|
||||
$msg = '글이 존재하지 않습니다.\\n\\n글이 삭제되었거나 이동된 경우입니다.';
|
||||
alert($msg, './board.php?bo_table='.$bo_table);
|
||||
alert($msg, get_pretty_url($bo_table));
|
||||
}
|
||||
|
||||
// 그룹접근 사용
|
||||
if (isset($group['gr_use_access']) && $group['gr_use_access']) {
|
||||
if ($is_guest) {
|
||||
$msg = "비회원은 이 게시판에 접근할 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.";
|
||||
alert($msg, './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr));
|
||||
alert($msg, G5_BBS_URL.'/login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(get_pretty_url($bo_table, $wr_id, $qstr)));
|
||||
}
|
||||
|
||||
// 그룹관리자 이상이라면 통과
|
||||
@@ -51,14 +51,14 @@ if (isset($wr_id) && $wr_id) {
|
||||
if ($is_member)
|
||||
alert('글을 읽을 권한이 없습니다.', G5_URL);
|
||||
else
|
||||
alert('글을 읽을 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr));
|
||||
alert('글을 읽을 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(get_pretty_url($bo_table, $wr_id, $qstr)));
|
||||
}
|
||||
|
||||
// 본인확인을 사용한다면
|
||||
if ($config['cf_cert_use'] && !$is_admin) {
|
||||
// 인증된 회원만 가능
|
||||
if ($board['bo_use_cert'] != '' && $is_guest) {
|
||||
alert('이 게시판은 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr));
|
||||
alert('이 게시판은 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(get_pretty_url($bo_table, $wr_id, $qstr)));
|
||||
}
|
||||
|
||||
if ($board['bo_use_cert'] == 'cert' && !$member['mb_certify']) {
|
||||
@@ -108,7 +108,7 @@ if (isset($wr_id) && $wr_id) {
|
||||
// 이 게시물이 저장된 게시물이 아니면서 관리자가 아니라면
|
||||
//if ("$bo_table|$write['wr_num']" != get_session("ss_secret"))
|
||||
if (!get_session($ss_name))
|
||||
goto_url('./password.php?w=s&bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr);
|
||||
goto_url(G5_BBS_URL.'/password.php?w=s&bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr);
|
||||
}
|
||||
|
||||
set_session($ss_name, TRUE);
|
||||
@@ -144,14 +144,14 @@ if (isset($wr_id) && $wr_id) {
|
||||
if ($member['mb_id'])
|
||||
alert('목록을 볼 권한이 없습니다.', G5_URL);
|
||||
else
|
||||
alert('목록을 볼 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?'.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.($qstr?'&':'')));
|
||||
alert('목록을 볼 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?'.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.($qstr?'&':'')));
|
||||
}
|
||||
|
||||
// 본인확인을 사용한다면
|
||||
if ($config['cf_cert_use'] && !$is_admin) {
|
||||
// 인증된 회원만 가능
|
||||
if ($board['bo_use_cert'] != '' && $is_guest) {
|
||||
alert('이 게시판은 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr));
|
||||
alert('이 게시판은 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(get_pretty_url($bo_table, $wr_id, $qstr)));
|
||||
}
|
||||
|
||||
if ($board['bo_use_cert'] == 'cert' && !$member['mb_certify']) {
|
||||
@@ -189,7 +189,7 @@ $ip = "";
|
||||
$is_ip_view = $board['bo_use_ip_view'];
|
||||
if ($is_admin) {
|
||||
$is_ip_view = true;
|
||||
if (array_key_exists('wr_ip', $write)) {
|
||||
if ($write && array_key_exists('wr_ip', $write)) {
|
||||
$ip = $write['wr_ip'];
|
||||
}
|
||||
} else {
|
||||
|
||||
+11
-5
@@ -2,9 +2,15 @@
|
||||
include_once('./_common.php');
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
$url1 = preg_replace("/[\<\>\'\"\\\'\\\"\(\)]/", "", clean_xss_tags($url1));
|
||||
$url2 = preg_replace("/[\<\>\'\"\\\'\\\"\(\)]/", "", clean_xss_tags($url2));
|
||||
$url3 = preg_replace("/[\<\>\'\"\\\'\\\"\(\)]/", "", clean_xss_tags($url3));
|
||||
$pattern1 = "/[\<\>\'\"\\\'\\\"\(\)]/";
|
||||
$pattern2 = "/\r\n|\r|\n|[^\x20-\x7e]/";
|
||||
|
||||
$url1 = preg_replace($pattern1, "", clean_xss_tags($url1, 1));
|
||||
$url1 = preg_replace($pattern2, "", $url1);
|
||||
$url2 = preg_replace($pattern1, "", clean_xss_tags($url2, 1));
|
||||
$url2 = preg_replace($pattern2, "", $url2);
|
||||
$url3 = preg_replace($pattern1, "", clean_xss_tags($url3, 1));
|
||||
$url3 = preg_replace($pattern2, "", $url3);
|
||||
|
||||
// url 체크
|
||||
check_url_host($url1);
|
||||
@@ -25,12 +31,12 @@ if (confirm(conf)) {
|
||||
<article id="confirm_check">
|
||||
<header>
|
||||
<hgroup>
|
||||
<h1><?php echo $header; ?></h1> <!-- 수행 중이던 작업 내용 -->
|
||||
<h1><?php echo get_text(strip_tags($header)); ?></h1> <!-- 수행 중이던 작업 내용 -->
|
||||
<h2>아래 내용을 확인해 주세요.</h2>
|
||||
</hgroup>
|
||||
</header>
|
||||
<p>
|
||||
<?php echo $msg; ?>
|
||||
<?php echo get_text(strip_tags($msg)); ?>
|
||||
</p>
|
||||
|
||||
<a href="<?php echo $url1; ?>">확인</a>
|
||||
|
||||
+14
-3
@@ -8,14 +8,23 @@ if( !isset($g5['content_table']) ){
|
||||
die('<meta charset="utf-8">관리자 모드에서 게시판관리->내용 관리를 먼저 확인해 주세요.');
|
||||
}
|
||||
|
||||
// 내용
|
||||
if($co_seo_title){
|
||||
$co = get_content_by_field($g5['content_table'], 'content', 'co_seo_title', generate_seo_title($co_seo_title));
|
||||
$co_id = $co['co_id'];
|
||||
} else {
|
||||
$co = get_content_db($co_id);
|
||||
}
|
||||
|
||||
if( ! (isset($co['co_seo_title']) && $co['co_seo_title']) && $co['co_id'] ){
|
||||
seo_title_update($g5['content_table'], $co['co_id'], 'content');
|
||||
}
|
||||
|
||||
if (G5_IS_MOBILE) {
|
||||
include_once(G5_MOBILE_PATH.'/content.php');
|
||||
return;
|
||||
}
|
||||
|
||||
// 내용
|
||||
$sql = " select * from {$g5['content_table']} where co_id = '$co_id' ";
|
||||
$co = sql_fetch($sql);
|
||||
if (!$co['co_id'])
|
||||
alert('등록된 내용이 없습니다.');
|
||||
|
||||
@@ -26,6 +35,8 @@ if ($co['co_include_head'] && is_include_path_check($co['co_include_head']))
|
||||
else
|
||||
include_once('./_head.php');
|
||||
|
||||
// KVE-2019-0828 취약점 내용
|
||||
$co['co_tag_filter_use'] = 1;
|
||||
$str = conv_content($co['co_content'], $co['co_html'], $co['co_tag_filter_use']);
|
||||
|
||||
// $src 를 $dst 로 변환
|
||||
|
||||
+9
-3
@@ -30,7 +30,7 @@ else if ($is_admin == 'group') { // 그룹관리자
|
||||
alert('자신의 글이 아니므로 삭제할 수 없습니다.');
|
||||
} else {
|
||||
if ($write['mb_id'])
|
||||
alert('로그인 후 삭제하세요.', './login.php?url='.urlencode('./board.php?bo_table='.$bo_table.'&wr_id='.$wr_id));
|
||||
alert('로그인 후 삭제하세요.', G5_BBS_URL.'/login.php?url='.urlencode(get_pretty_url($bo_table, $wr_id)));
|
||||
else if (!check_password($wr_password, $write['wr_password']))
|
||||
alert('비밀번호가 틀리므로 삭제할 수 없습니다.');
|
||||
}
|
||||
@@ -80,7 +80,11 @@ while ($row = sql_fetch_array($result))
|
||||
$sql2 = " select * from {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' ";
|
||||
$result2 = sql_query($sql2);
|
||||
while ($row2 = sql_fetch_array($result2)) {
|
||||
@unlink(G5_DATA_PATH.'/file/'.$bo_table.'/'.str_replace('../', '', $row2['bf_file']));
|
||||
|
||||
$delete_file = run_replace('delete_file_path', G5_DATA_PATH.'/file/'.$bo_table.'/'.str_replace('../', '', $row2['bf_file']), $row2);
|
||||
if( file_exists($delete_file) ){
|
||||
@unlink($delete_file);
|
||||
}
|
||||
// 썸네일삭제
|
||||
if(preg_match("/\.({$config['cf_image_extension']})$/i", $row2['bf_file'])) {
|
||||
delete_board_thumbnail($bo_table, $row2['bf_file']);
|
||||
@@ -134,5 +138,7 @@ if ($count_write > 0 || $count_comment > 0)
|
||||
|
||||
delete_cache_latest($bo_table);
|
||||
|
||||
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&page='.$page.$qstr);
|
||||
run_event('bbs_delete', $write, $board);
|
||||
|
||||
goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&page='.$page.$qstr));
|
||||
?>
|
||||
|
||||
+7
-2
@@ -98,7 +98,10 @@ for ($i=$chk_count-1; $i>=0; $i--)
|
||||
$result2 = sql_query($sql2);
|
||||
while ($row2 = sql_fetch_array($result2)) {
|
||||
// 파일삭제
|
||||
@unlink(G5_DATA_PATH.'/file/'.$bo_table.'/'.str_replace('../', '',$row2['bf_file']));
|
||||
$delete_file = run_replace('delete_file_path', G5_DATA_PATH.'/file/'.$bo_table.'/'.str_replace('../', '',$row2['bf_file']), $row2);
|
||||
if( file_exists($delete_file) ){
|
||||
@unlink($delete_file);
|
||||
}
|
||||
|
||||
// 썸네일삭제
|
||||
if(preg_match("/\.({$config['cf_image_extension']})$/i", $row2['bf_file'])) {
|
||||
@@ -156,5 +159,7 @@ if ($count_write > 0 || $count_comment > 0)
|
||||
|
||||
delete_cache_latest($bo_table);
|
||||
|
||||
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&page='.$page.$qstr);
|
||||
run_event('bbs_delete_all', $tmp_array, $board);
|
||||
|
||||
goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&page='.$page.$qstr));
|
||||
?>
|
||||
|
||||
@@ -53,8 +53,8 @@ $comment_reply = substr($write['wr_comment_reply'], 0, $len);
|
||||
$sql = " select count(*) as cnt from {$write_table}
|
||||
where wr_comment_reply like '{$comment_reply}%'
|
||||
and wr_id <> '{$comment_id}'
|
||||
and wr_parent = '{$write[wr_parent]}'
|
||||
and wr_comment = '{$write[wr_comment]}'
|
||||
and wr_parent = '{$write['wr_parent']}'
|
||||
and wr_comment = '{$write['wr_comment']}'
|
||||
and wr_is_comment = 1 ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['cnt'] && !$is_admin)
|
||||
@@ -86,5 +86,7 @@ sql_query(" delete from {$g5['board_new_table']} where bo_table = '{$bo_table}'
|
||||
|
||||
delete_cache_latest($bo_table);
|
||||
|
||||
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$write['wr_parent'].'&page='.$page. $qstr);
|
||||
run_event('bbs_delete_comment', $comment_id, $board);
|
||||
|
||||
goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$write['wr_parent'].'&page='.$page. $qstr));
|
||||
?>
|
||||
|
||||
+19
-5
@@ -15,9 +15,9 @@ if (!get_session('ss_view_'.$bo_table.'_'.$wr_id))
|
||||
|
||||
// 다운로드 차감일 때 비회원은 다운로드 불가
|
||||
if($board['bo_download_point'] < 0 && $is_guest)
|
||||
alert('다운로드 권한이 없습니다.\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?wr_id='.$wr_id.'&'.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id));
|
||||
alert('다운로드 권한이 없습니다.\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?wr_id='.$wr_id.'&'.$qstr.'&url='.urlencode(get_pretty_url($bo_table, $wr_id)));
|
||||
|
||||
$sql = " select bf_source, bf_file from {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_no = '$no' ";
|
||||
$sql = " select * from {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_no = '$no' ";
|
||||
$file = sql_fetch($sql);
|
||||
if (!$file['bf_file'])
|
||||
alert_close('파일 정보가 존재하지 않습니다.');
|
||||
@@ -25,8 +25,12 @@ if (!$file['bf_file'])
|
||||
// JavaScript 불가일 때
|
||||
if($js != 'on' && $board['bo_download_point'] < 0) {
|
||||
$msg = $file['bf_source'].' 파일을 다운로드 하시면 포인트가 차감('.number_format($board['bo_download_point']).'점)됩니다.\\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\\n그래도 다운로드 하시겠습니까?';
|
||||
$url1 = G5_BBS_URL.'/download.php?'.clean_query_string($_SERVER['QUERY_STRING']).'&js=on';
|
||||
$url1 = G5_BBS_URL.'/download.php?'.clean_query_string($_SERVER['QUERY_STRING'], false).'&js=on';
|
||||
$url2 = clean_xss_tags($_SERVER['HTTP_REFERER']);
|
||||
|
||||
if( $url2 && stripos($url2, $_SERVER['REQUEST_URI']) !== false ){
|
||||
$url2 = G5_BBS_URL.'/board.php?'.clean_query_string($_SERVER['QUERY_STRING'], false);
|
||||
}
|
||||
|
||||
//$url1 = 확인link, $url2=취소link
|
||||
// 특정주소로 이동시키려면 $url3 이용
|
||||
@@ -38,13 +42,16 @@ if ($member['mb_level'] < $board['bo_download_level']) {
|
||||
if ($member['mb_id'])
|
||||
alert($alert_msg);
|
||||
else
|
||||
alert($alert_msg.'\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?wr_id='.$wr_id.'&'.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id));
|
||||
alert($alert_msg.'\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?wr_id='.$wr_id.'&'.$qstr.'&url='.urlencode(get_pretty_url($bo_table, $wr_id)));
|
||||
}
|
||||
|
||||
$filepath = G5_DATA_PATH.'/file/'.$bo_table.'/'.$file['bf_file'];
|
||||
$filepath = addslashes($filepath);
|
||||
if (!is_file($filepath) || !file_exists($filepath))
|
||||
$file_exist_check = (!is_file($filepath) || !file_exists($filepath)) ? false : true;
|
||||
|
||||
if ( false === run_replace('download_file_exist_check', $file_exist_check, $file) ){
|
||||
alert('파일이 존재하지 않습니다.');
|
||||
}
|
||||
|
||||
// 사용자 코드 실행
|
||||
@include_once($board_skin_path.'/download.skin.php');
|
||||
@@ -84,14 +91,21 @@ if (!get_session($ss_name))
|
||||
$g5['title'] = '다운로드 > '.conv_subject($write['wr_subject'], 255);
|
||||
|
||||
//파일명에 한글이 있는 경우
|
||||
/*
|
||||
if(preg_match("/[\xA1-\xFE][\xA1-\xFE]/", $file['bf_source'])){
|
||||
// 2015.09.02 날짜의 파이어폭스에서 인코딩된 문자 그대로 출력되는 문제가 발생됨, 2018.12.11 날짜의 파이어폭스에서는 해당 현상이 없으므로 해당 코드를 사용 안합니다.
|
||||
$original = iconv('utf-8', 'euc-kr', $file['bf_source']); // SIR 잉끼님 제안코드
|
||||
} else {
|
||||
$original = urlencode($file['bf_source']);
|
||||
}
|
||||
*/
|
||||
|
||||
$original = urlencode($file['bf_source']);
|
||||
|
||||
@include_once($board_skin_path.'/download.tail.skin.php');
|
||||
|
||||
run_event('download_file_header', $file, $file_exist_check);
|
||||
|
||||
if(preg_match("/msie/i", $_SERVER['HTTP_USER_AGENT']) && preg_match("/5\.5/", $_SERVER['HTTP_USER_AGENT'])) {
|
||||
header("content-type: doesn/matter");
|
||||
header("content-length: ".filesize("$filepath"));
|
||||
|
||||
@@ -8,6 +8,8 @@ if (!$config['cf_email_use'])
|
||||
if (!$is_member && $config['cf_formmail_is_member'])
|
||||
alert_close('회원만 이용하실 수 있습니다.');
|
||||
|
||||
$mb_id = isset($mb_id) ? get_search_string($mb_id) : '';
|
||||
|
||||
if ($is_member && !$member['mb_open'] && $is_admin != "super" && $member['mb_id'] != $mb_id)
|
||||
alert_close('자신의 정보를 공개하지 않으면 다른분에게 메일을 보낼 수 없습니다.\\n\\n정보공개 설정은 회원정보수정에서 하실 수 있습니다.');
|
||||
|
||||
|
||||
+11
-3
@@ -1,10 +1,12 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
run_event('bbs_good_before', $bo_table, $wr_id, $good);
|
||||
|
||||
@include_once($board_skin_path.'/good.head.skin.php');
|
||||
|
||||
// 자바스크립트 사용가능할 때
|
||||
if($_POST['js'] == "on") {
|
||||
if(isset($_POST['js']) && $_POST['js'] === "on") {
|
||||
$error = $count = "";
|
||||
|
||||
function print_result($error, $count)
|
||||
@@ -81,6 +83,8 @@ if($_POST['js'] == "on") {
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$count = $row['count'];
|
||||
|
||||
run_event('bbs_increase_good_json', $bo_table, $wr_id, $good);
|
||||
|
||||
print_result($error, $count);
|
||||
}
|
||||
@@ -90,7 +94,7 @@ if($_POST['js'] == "on") {
|
||||
|
||||
if (!$is_member)
|
||||
{
|
||||
$href = './login.php?'.$qstr.'&url='.urlencode('./board.php?bo_table='.$bo_table.'&wr_id='.$wr_id);
|
||||
$href = G5_BBS_URL.'/login.php?'.$qstr.'&url='.urlencode(get_pretty_url($bo_table, $wr_id));
|
||||
|
||||
alert('회원만 가능합니다.', $href);
|
||||
}
|
||||
@@ -144,12 +148,16 @@ if($_POST['js'] == "on") {
|
||||
else
|
||||
$status = '비추천';
|
||||
|
||||
$href = './board.php?bo_table='.$bo_table.'&wr_id='.$wr_id;
|
||||
$href = get_pretty_url($bo_table, $wr_id);
|
||||
|
||||
run_event('bbs_increase_good_html', $bo_table, $wr_id, $good, $href);
|
||||
|
||||
alert("이 글을 $status 하셨습니다.", '', false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
run_event('bbs_good_after', $bo_table, $wr_id, $good);
|
||||
|
||||
@include_once($board_skin_path.'/good.tail.skin.php');
|
||||
?>
|
||||
+19
-12
@@ -6,7 +6,7 @@ $is_category = false;
|
||||
$category_option = '';
|
||||
if ($board['bo_use_category']) {
|
||||
$is_category = true;
|
||||
$category_href = G5_BBS_URL.'/board.php?bo_table='.$bo_table;
|
||||
$category_href = get_pretty_url($bo_table);
|
||||
|
||||
$category_option .= '<li><a href="'.$category_href.'"';
|
||||
if ($sca=='')
|
||||
@@ -17,7 +17,7 @@ if ($board['bo_use_category']) {
|
||||
for ($i=0; $i<count($categories); $i++) {
|
||||
$category = trim($categories[$i]);
|
||||
if ($category=='') continue;
|
||||
$category_option .= '<li><a href="'.($category_href."&sca=".urlencode($category)).'"';
|
||||
$category_option .= '<li><a href="'.(get_pretty_url($bo_table,'','sca='.urlencode($category))).'"';
|
||||
$category_msg = '';
|
||||
if ($category==$sca) { // 현재 선택된 카테고리라면
|
||||
$category_option .= ' id="bo_cate_on"';
|
||||
@@ -153,10 +153,15 @@ if (!$sst) {
|
||||
$sod = "";
|
||||
}
|
||||
} else {
|
||||
// 게시물 리스트의 정렬 대상 필드가 아니라면 공백으로 (nasca 님 09.06.16)
|
||||
// 리스트에서 다른 필드로 정렬을 하려면 아래의 코드에 해당 필드를 추가하세요.
|
||||
// $sst = preg_match("/^(wr_subject|wr_datetime|wr_hit|wr_good|wr_nogood)$/i", $sst) ? $sst : "";
|
||||
$sst = preg_match("/^(wr_datetime|wr_hit|wr_good|wr_nogood)$/i", $sst) ? $sst : "";
|
||||
$board_sort_fields = get_board_sort_fields($board, 1);
|
||||
if (!$sod && array_key_exists($sst, $board_sort_fields)) {
|
||||
$sst = $board_sort_fields[$sst];
|
||||
} else {
|
||||
// 게시물 리스트의 정렬 대상 필드가 아니라면 공백으로 (nasca 님 09.06.16)
|
||||
// 리스트에서 다른 필드로 정렬을 하려면 아래의 코드에 해당 필드를 추가하세요.
|
||||
// $sst = preg_match("/^(wr_subject|wr_datetime|wr_hit|wr_good|wr_nogood)$/i", $sst) ? $sst : "";
|
||||
$sst = preg_match("/^(wr_datetime|wr_hit|wr_good|wr_nogood)$/i", $sst) ? $sst : "";
|
||||
}
|
||||
}
|
||||
|
||||
if(!$sst)
|
||||
@@ -200,13 +205,15 @@ if($page_rows > 0) {
|
||||
}
|
||||
}
|
||||
|
||||
$write_pages = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, './board.php?bo_table='.$bo_table.$qstr.'&page=');
|
||||
g5_latest_cache_data($board['bo_table'], $list);
|
||||
|
||||
$write_pages = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, get_pretty_url($bo_table, '', $qstr.'&page='));
|
||||
|
||||
$list_href = '';
|
||||
$prev_part_href = '';
|
||||
$next_part_href = '';
|
||||
if ($is_search_bbs) {
|
||||
$list_href = './board.php?bo_table='.$bo_table;
|
||||
$list_href = get_pretty_url($bo_table);
|
||||
|
||||
$patterns = array('#&page=[0-9]*#', '#&spt=[0-9\-]*#');
|
||||
|
||||
@@ -214,14 +221,14 @@ if ($is_search_bbs) {
|
||||
$prev_spt = $spt - $config['cf_search_part'];
|
||||
if (isset($min_spt) && $prev_spt >= $min_spt) {
|
||||
$qstr1 = preg_replace($patterns, '', $qstr);
|
||||
$prev_part_href = './board.php?bo_table='.$bo_table.$qstr1.'&spt='.$prev_spt.'&page=1';
|
||||
$prev_part_href = get_pretty_url($bo_table,0,$qstr1.'&spt='.$prev_spt.'&page=1');
|
||||
$write_pages = page_insertbefore($write_pages, '<a href="'.$prev_part_href.'" class="pg_page pg_prev">이전검색</a>');
|
||||
}
|
||||
|
||||
$next_spt = $spt + $config['cf_search_part'];
|
||||
if ($next_spt < 0) {
|
||||
$qstr1 = preg_replace($patterns, '', $qstr);
|
||||
$next_part_href = './board.php?bo_table='.$bo_table.$qstr1.'&spt='.$next_spt.'&page=1';
|
||||
$next_part_href = get_pretty_url($bo_table,0,$qstr1.'&spt='.$next_spt.'&page=1');
|
||||
$write_pages = page_insertafter($write_pages, '<a href="'.$next_part_href.'" class="pg_page pg_end">다음검색</a>');
|
||||
}
|
||||
}
|
||||
@@ -229,7 +236,7 @@ if ($is_search_bbs) {
|
||||
|
||||
$write_href = '';
|
||||
if ($member['mb_level'] >= $board['bo_write_level']) {
|
||||
$write_href = './write.php?bo_table='.$bo_table;
|
||||
$write_href = short_url_clean(G5_BBS_URL.'/write.php?bo_table='.$bo_table);
|
||||
}
|
||||
|
||||
$nobr_begin = $nobr_end = "";
|
||||
@@ -241,7 +248,7 @@ if (preg_match("/gecko|firefox/i", $_SERVER['HTTP_USER_AGENT'])) {
|
||||
// RSS 보기 사용에 체크가 되어 있어야 RSS 보기 가능 061106
|
||||
$rss_href = '';
|
||||
if ($board['bo_use_rss_view']) {
|
||||
$rss_href = './rss.php?bo_table='.$bo_table;
|
||||
$rss_href = G5_BBS_URL.'/rss.php?bo_table='.$bo_table;
|
||||
}
|
||||
|
||||
$stx = get_text(stripslashes($stx));
|
||||
|
||||
+3
-1
@@ -8,7 +8,7 @@ if( function_exists('social_check_login_before') ){
|
||||
$g5['title'] = '로그인';
|
||||
include_once('./_head.sub.php');
|
||||
|
||||
$url = $_GET['url'];
|
||||
$url = strip_tags($_GET['url']);
|
||||
|
||||
// url 체크
|
||||
check_url_host($url);
|
||||
@@ -31,5 +31,7 @@ if (!file_exists($login_file))
|
||||
|
||||
include_once($member_skin_path.'/login.skin.php');
|
||||
|
||||
run_event('member_login_tail', $login_url, $login_action_url, $member_skin_path, $url);
|
||||
|
||||
include_once('./_tail.sub.php');
|
||||
?>
|
||||
|
||||
+10
-1
@@ -29,7 +29,10 @@ if(function_exists('social_is_login_check')){
|
||||
// 가입된 회원이 아니다. 비밀번호가 틀리다. 라는 메세지를 따로 보여주지 않는 이유는
|
||||
// 회원아이디를 입력해 보고 맞으면 또 비밀번호를 입력해보는 경우를 방지하기 위해서입니다.
|
||||
// 불법사용자의 경우 회원아이디가 틀린지, 비밀번호가 틀린지를 알기까지는 많은 시간이 소요되기 때문입니다.
|
||||
if (!$is_social_password_check && (!$mb['mb_id'] || !check_password($mb_password, $mb['mb_password'])) ) {
|
||||
if (!$is_social_password_check && (!$mb['mb_id'] || !login_password_check($mb, $mb_password, $mb['mb_password'])) ) {
|
||||
|
||||
run_event('password_is_wrong', 'login', $mb);
|
||||
|
||||
alert('가입된 회원아이디가 아니거나 비밀번호가 틀립니다.\\n비밀번호는 대소문자를 구분합니다.');
|
||||
}
|
||||
|
||||
@@ -51,6 +54,8 @@ if ( is_use_email_certify() && !preg_match("/[1-9]/", $mb['mb_email_certify']))
|
||||
confirm("{$mb['mb_email']} 메일로 메일인증을 받으셔야 로그인 가능합니다. 다른 메일주소로 변경하여 인증하시려면 취소를 클릭하시기 바랍니다.", G5_URL, G5_BBS_URL.'/register_email.php?mb_id='.$mb_id.'&ckey='.$ckey);
|
||||
}
|
||||
|
||||
run_event('login_session_before', $mb, $is_social_login);
|
||||
|
||||
@include_once($member_skin_path.'/login_check.skin.php');
|
||||
|
||||
// 회원아이디 세션 생성
|
||||
@@ -100,6 +105,8 @@ if ($url) {
|
||||
$post_check_keys[] = 'provider';
|
||||
}
|
||||
|
||||
$post_check_keys = run_replace('login_check_post_check_keys', $post_check_keys, $link, $is_social_login);
|
||||
|
||||
foreach($_POST as $key=>$value) {
|
||||
if ($key && !in_array($key, $post_check_keys)) {
|
||||
$link .= "$split$key=$value";
|
||||
@@ -118,5 +125,7 @@ if(function_exists('social_login_success_after')){
|
||||
social_login_session_clear(1);
|
||||
}
|
||||
|
||||
run_event('member_login_check', $mb, $link, $is_social_login);
|
||||
|
||||
goto_url($link);
|
||||
?>
|
||||
|
||||
+3
-1
@@ -29,10 +29,12 @@ if ($url) {
|
||||
|
||||
$link = $url;
|
||||
} else if ($bo_table) {
|
||||
$link = G5_BBS_URL.'/board.php?bo_table='.$bo_table;
|
||||
$link = get_pretty_url($bo_table);
|
||||
} else {
|
||||
$link = G5_URL;
|
||||
}
|
||||
|
||||
run_event('member_logout', $link);
|
||||
|
||||
goto_url($link);
|
||||
?>
|
||||
|
||||
@@ -14,7 +14,7 @@ else
|
||||
$url = clean_xss_tags($_GET['url']);
|
||||
|
||||
//소셜 로그인 한 경우
|
||||
if( function_exists('social_member_comfirm_redirect') && (! $url || $url === 'register_form.php') ){
|
||||
if( function_exists('social_member_comfirm_redirect') && (! $url || $url === 'register_form.php' || (function_exists('social_is_edit_page') && social_is_edit_page($url) ) ) ){
|
||||
social_member_comfirm_redirect();
|
||||
}
|
||||
|
||||
|
||||
+8
-3
@@ -18,12 +18,15 @@ else if ($kind == 'send')
|
||||
else
|
||||
alert(''.$kind .'값을 넘겨주세요.');
|
||||
|
||||
$sql = " select count(*) as cnt from {$g5['memo_table']} where me_{$kind}_mb_id = '{$member['mb_id']}' ";
|
||||
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
|
||||
run_event('memo_list', $kind, $unkind, $page);
|
||||
|
||||
$sql = " select count(*) as cnt from {$g5['memo_table']} where me_{$kind}_mb_id = '{$member['mb_id']}' and me_type = '$kind' ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$total_page = ceil($total_count / $config['cf_page_rows']); // 전체 페이지 계산
|
||||
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ((int) $page - 1) * $config['cf_page_rows']; // 시작 열을 구함
|
||||
|
||||
if ($kind == 'recv')
|
||||
@@ -44,8 +47,9 @@ $list = array();
|
||||
$sql = " select a.*, b.mb_id, b.mb_nick, b.mb_email, b.mb_homepage
|
||||
from {$g5['memo_table']} a
|
||||
left join {$g5['member_table']} b on (a.me_{$unkind}_mb_id = b.mb_id)
|
||||
where a.me_{$kind}_mb_id = '{$member['mb_id']}'
|
||||
where a.me_{$kind}_mb_id = '{$member['mb_id']}' and a.me_type = '$kind'
|
||||
order by a.me_id desc limit $from_record, {$config['cf_page_rows']} ";
|
||||
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
@@ -67,6 +71,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
|
||||
$send_datetime = substr($row['me_send_datetime'],2,14);
|
||||
|
||||
$list[$i]['mb_id'] = $mb_id;
|
||||
$list[$i]['name'] = $name;
|
||||
$list[$i]['send_datetime'] = $send_datetime;
|
||||
$list[$i]['read_datetime'] = $read_datetime;
|
||||
|
||||
+9
-4
@@ -15,6 +15,11 @@ $me_id = (int)$_REQUEST['me_id'];
|
||||
$sql = " select * from {$g5['memo_table']} where me_id = '{$me_id}' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$sql = " delete from {$g5['memo_table']}
|
||||
where me_id = '{$me_id}'
|
||||
and (me_recv_mb_id = '{$member['mb_id']}' or me_send_mb_id = '{$member['mb_id']}') ";
|
||||
sql_query($sql);
|
||||
|
||||
if (!$row['me_read_datetime'][0]) // 메모 받기전이면
|
||||
{
|
||||
$sql = " update {$g5['member_table']}
|
||||
@@ -22,12 +27,12 @@ if (!$row['me_read_datetime'][0]) // 메모 받기전이면
|
||||
where mb_id = '{$row['me_recv_mb_id']}'
|
||||
and mb_memo_call = '{$row['me_send_mb_id']}' ";
|
||||
sql_query($sql);
|
||||
|
||||
$sql = " update `{$g5['member_table']}` set mb_memo_cnt = '".get_memo_not_read($member['mb_id'])."' where mb_id = '{$member['mb_id']}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
$sql = " delete from {$g5['memo_table']}
|
||||
where me_id = '{$me_id}'
|
||||
and (me_recv_mb_id = '{$member['mb_id']}' or me_send_mb_id = '{$member['mb_id']}') ";
|
||||
sql_query($sql);
|
||||
run_event('memo_delete', $me_id, $row);
|
||||
|
||||
goto_url('./memo.php?kind='.$kind);
|
||||
?>
|
||||
|
||||
@@ -13,7 +13,10 @@ $recv_list = explode(',', trim($_POST['me_recv_mb_id']));
|
||||
$str_nick_list = '';
|
||||
$msg = '';
|
||||
$error_list = array();
|
||||
$member_list = array();
|
||||
$member_list = array('id'=>array(), 'nick'=>array());
|
||||
|
||||
run_event('memo_form_update_before', $recv_list);
|
||||
|
||||
for ($i=0; $i<count($recv_list); $i++) {
|
||||
$row = sql_fetch(" select mb_id, mb_nick, mb_open, mb_leave_date, mb_intercept_date from {$g5['member_table']} where mb_id = '{$recv_list[$i]}' ");
|
||||
if ($row) {
|
||||
@@ -41,6 +44,10 @@ $error_msg = implode(",", $error_list);
|
||||
if ($error_msg && !$is_admin)
|
||||
alert("회원아이디 '{$error_msg}' 은(는) 존재(또는 정보공개)하지 않는 회원아이디 이거나 탈퇴, 접근차단된 회원아이디 입니다.\\n쪽지를 발송하지 않았습니다.");
|
||||
|
||||
if (! count($member_list['id'])){
|
||||
alert('해당 회원이 존재하지 않습니다.');
|
||||
}
|
||||
|
||||
if (!$is_admin) {
|
||||
if (count($member_list['id'])) {
|
||||
$point = (int)$config['cf_memo_send_point'] * count($member_list['id']);
|
||||
@@ -59,12 +66,22 @@ for ($i=0; $i<count($member_list['id']); $i++) {
|
||||
$recv_mb_id = $member_list['id'][$i];
|
||||
$recv_mb_nick = get_text($member_list['nick'][$i]);
|
||||
|
||||
// 쪽지 INSERT
|
||||
$sql = " insert into {$g5['memo_table']} ( me_id, me_recv_mb_id, me_send_mb_id, me_send_datetime, me_memo ) values ( '$me_id', '$recv_mb_id', '{$member['mb_id']}', '".G5_TIME_YMDHIS."', '{$_POST['me_memo']}' ) ";
|
||||
// 받는 회원 쪽지 INSERT
|
||||
$sql = " insert into {$g5['memo_table']} ( me_recv_mb_id, me_send_mb_id, me_send_datetime, me_memo, me_read_datetime, me_type, me_send_ip ) values ( '$recv_mb_id', '{$member['mb_id']}', '".G5_TIME_YMDHIS."', '{$_POST['me_memo']}', '0000-00-00 00:00:00' , 'recv', '{$_SERVER['REMOTE_ADDR']}' ) ";
|
||||
|
||||
sql_query($sql);
|
||||
|
||||
if( $me_id = sql_insert_id() ){
|
||||
|
||||
// 보내는 회원 쪽지 INSERT
|
||||
$sql = " insert into {$g5['memo_table']} ( me_recv_mb_id, me_send_mb_id, me_send_datetime, me_memo, me_read_datetime, me_send_id, me_type , me_send_ip ) values ( '$recv_mb_id', '{$member['mb_id']}', '".G5_TIME_YMDHIS."', '{$_POST['me_memo']}', '0000-00-00 00:00:00', '$me_id', 'send', '{$_SERVER['REMOTE_ADDR']}' ) ";
|
||||
sql_query($sql);
|
||||
|
||||
$member_list['me_id'][$i] = $me_id;
|
||||
}
|
||||
|
||||
// 실시간 쪽지 알림 기능
|
||||
$sql = " update {$g5['member_table']} set mb_memo_call = '{$member['mb_id']}' where mb_id = '$recv_mb_id' ";
|
||||
$sql = " update {$g5['member_table']} set mb_memo_call = '{$member['mb_id']}', mb_memo_cnt = '".get_memo_not_read($recv_mb_id)."' where mb_id = '$recv_mb_id' ";
|
||||
sql_query($sql);
|
||||
|
||||
if (!$is_admin) {
|
||||
@@ -73,9 +90,19 @@ for ($i=0; $i<count($member_list['id']); $i++) {
|
||||
}
|
||||
|
||||
if ($member_list) {
|
||||
|
||||
$redirect_url = G5_HTTP_BBS_URL."/memo.php?kind=send";
|
||||
$str_nick_list = implode(',', $member_list['nick']);
|
||||
alert($str_nick_list." 님께 쪽지를 전달하였습니다.", G5_HTTP_BBS_URL."/memo.php?kind=send", false);
|
||||
|
||||
run_event('memo_form_update_after', $member_list, $str_nick_list, $redirect_url, $_POST['me_memo']);
|
||||
|
||||
alert($str_nick_list." 님께 쪽지를 전달하였습니다.", $redirect_url, false);
|
||||
} else {
|
||||
alert("회원아이디 오류 같습니다.", G5_HTTP_BBS_URL."/memo_form.php", false);
|
||||
|
||||
$redirect_url = G5_HTTP_BBS_URL."/memo_form.php";
|
||||
|
||||
run_event('memo_form_update_failed', $member_list, $redirect_url, $_POST['me_memo']);
|
||||
|
||||
alert("회원아이디 오류 같습니다.", $redirect_url, false);
|
||||
}
|
||||
?>
|
||||
+27
-24
@@ -13,10 +13,13 @@ if ($kind == 'recv')
|
||||
|
||||
$sql = " update {$g5['memo_table']}
|
||||
set me_read_datetime = '".G5_TIME_YMDHIS."'
|
||||
where me_id = '$me_id'
|
||||
where (me_id = '$me_id' or me_send_id = '$me_id' )
|
||||
and me_recv_mb_id = '{$member['mb_id']}'
|
||||
and me_read_datetime = '0000-00-00 00:00:00' ";
|
||||
sql_query($sql);
|
||||
|
||||
$sql = " update `{$g5['member_table']}` set mb_memo_cnt = '".get_memo_not_read($member['mb_id'])."' where mb_id = '{$member['mb_id']}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
else if ($kind == 'send')
|
||||
{
|
||||
@@ -28,40 +31,40 @@ else
|
||||
alert($kind.' 값을 넘겨주세요.');
|
||||
}
|
||||
|
||||
$g5['title'] = $t.' 쪽지 보기';
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
$sql = " select * from {$g5['memo_table']}
|
||||
where me_id = '$me_id'
|
||||
and me_{$kind}_mb_id = '{$member['mb_id']}' ";
|
||||
$memo = sql_fetch($sql);
|
||||
|
||||
// 이전 쪽지
|
||||
$sql = " select * from {$g5['memo_table']}
|
||||
where me_id > '{$me_id}'
|
||||
and me_{$kind}_mb_id = '{$member['mb_id']}'
|
||||
order by me_id asc
|
||||
limit 1 ";
|
||||
$prev = sql_fetch($sql);
|
||||
if ($prev['me_id'])
|
||||
$prev_link = './memo_view.php?kind='.$kind.'&me_id='.$prev['me_id'];
|
||||
else
|
||||
//$prev_link = 'javascript:alert(\'쪽지의 처음입니다.\');';
|
||||
$prev_link = '';
|
||||
set_session('ss_memo_delete_token', $token = uniqid(time()));
|
||||
$del_link = 'memo_delete.php?me_id='.$memo['me_id'].'&token='.$token.'&kind='.$kind;
|
||||
|
||||
$g5['title'] = $t.' 쪽지 보기';
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
// 이전 쪽지
|
||||
$sql = " select me.*, a.rownum from `{$g5['memo_table']}` as me inner join ( select me_id , (@rownum:=@rownum+1) as rownum from `{$g5['memo_table']}` as memo, (select @rownum:=0) tmp where me_{$kind}_mb_id = '{$member['mb_id']}' and memo.me_type = '$kind' order by me_id desc ) as a on a.me_id = me.me_id where me.me_id < '$me_id' and me.me_{$kind}_mb_id = '{$member['mb_id']}' and me.me_type = '$kind' order by me.me_id desc limit 1 ";
|
||||
|
||||
$prev = sql_fetch($sql);
|
||||
if ($prev['me_id']) {
|
||||
$prev_link = './memo_view.php?kind='.$kind.'&me_id='.$prev['me_id'];
|
||||
$prev['page'] = ceil( (int)$prev['rownum'] / $config['cf_page_rows']); // 이동할 페이지 계산
|
||||
if( (int)$prev['page'] > 0 ) $prev_link .= "&page=".$prev['page'];
|
||||
} else {
|
||||
$prev_link = '';
|
||||
}
|
||||
|
||||
// 다음 쪽지
|
||||
$sql = " select * from {$g5[memo_table]}
|
||||
where me_id < '{$me_id}'
|
||||
and me_{$kind}_mb_id = '{$member[mb_id]}'
|
||||
order by me_id desc
|
||||
limit 1 ";
|
||||
$sql = " select me.*, a.rownum from `{$g5['memo_table']}` as me inner join ( select me_id , (@rownum:=@rownum+1) as rownum from `{$g5['memo_table']}` as memo, (select @rownum:=0) tmp where me_{$kind}_mb_id = '{$member['mb_id']}' and memo.me_type = '$kind' order by me_id asc ) as a on a.me_id = me.me_id where me.me_id > '$me_id' and me.me_{$kind}_mb_id = '{$member['mb_id']}' and me.me_type = '$kind' order by me.me_id asc limit 1 ";
|
||||
|
||||
$next = sql_fetch($sql);
|
||||
if ($next['me_id'])
|
||||
if ($next['me_id']) {
|
||||
$next_link = './memo_view.php?kind='.$kind.'&me_id='.$next['me_id'];
|
||||
else
|
||||
//$next_link = 'javascript:alert(\'쪽지의 마지막입니다.\');';
|
||||
$next['page'] = ceil( (int)$next['rownum'] / $config['cf_page_rows']); // 이동할 페이지 계산
|
||||
if( (int)$next['page'] > 0 ) $next_link .= "&page=".$next['page'];
|
||||
} else {
|
||||
$next_link = '';
|
||||
}
|
||||
|
||||
$mb = get_member($memo['me_'.$unkind.'_mb_id']);
|
||||
|
||||
|
||||
@@ -156,5 +156,6 @@ function fboardmoveall_submit(f)
|
||||
</script>
|
||||
|
||||
<?php
|
||||
run_event('move_html_footer');
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
?>
|
||||
|
||||
+27
-5
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
$act = isset($act) ? strip_tags($act) : '';
|
||||
|
||||
// 게시판 관리자 이상 복사, 이동 가능
|
||||
if ($is_admin != 'board' && $is_admin != 'group' && $is_admin != 'super')
|
||||
alert_close('게시판 관리자 이상 접근이 가능합니다.');
|
||||
@@ -124,8 +126,13 @@ while ($row = sql_fetch_array($result))
|
||||
// 원본파일을 복사하고 퍼미션을 변경
|
||||
// 제이프로님 코드제안 적용
|
||||
$copy_file_name = ($bo_table !== $move_bo_table) ? $row3['bf_file'] : $row2['wr_id'].'_copy_'.$insert_id.'_'.$row3['bf_file'];
|
||||
@copy($src_dir.'/'.$row3['bf_file'], $dst_dir.'/'.$copy_file_name);
|
||||
@chmod($dst_dir/$row3['bf_file'], G5_FILE_PERMISSION);
|
||||
$is_exist_file = is_file($src_dir.'/'.$row3['bf_file']) && file_exists($src_dir.'/'.$row3['bf_file']);
|
||||
if( $is_exist_file ){
|
||||
@copy($src_dir.'/'.$row3['bf_file'], $dst_dir.'/'.$copy_file_name);
|
||||
@chmod($dst_dir.'/'.$row3['bf_file'], G5_FILE_PERMISSION);
|
||||
}
|
||||
|
||||
$row3 = run_replace('bbs_move_update_file', $row3, $copy_file_name, $bo_table, $move_bo_table, $insert_id);
|
||||
}
|
||||
|
||||
$sql = " insert into {$g5['board_file_table']}
|
||||
@@ -136,6 +143,9 @@ while ($row = sql_fetch_array($result))
|
||||
bf_file = '$copy_file_name',
|
||||
bf_download = '{$row3['bf_download']}',
|
||||
bf_content = '".addslashes($row3['bf_content'])."',
|
||||
bf_fileurl = '".addslashes($row3['bf_fileurl'])."',
|
||||
bf_thumburl = '".addslashes($row3['bf_thumburl'])."',
|
||||
bf_storage = '".addslashes($row3['bf_storage'])."',
|
||||
bf_filesize = '{$row3['bf_filesize']}',
|
||||
bf_width = '{$row3['bf_width']}',
|
||||
bf_height = '{$row3['bf_height']}',
|
||||
@@ -196,8 +206,18 @@ if ($sw == 'move')
|
||||
{
|
||||
for ($i=0; $i<count($save); $i++)
|
||||
{
|
||||
for ($k=0; $k<count($save[$i]['bf_file']); $k++)
|
||||
@unlink($save[$i]['bf_file'][$k]);
|
||||
if( isset($save[$i]['bf_file']) && $save[$i]['bf_file'] ){
|
||||
for ($k=0; $k<count($save[$i]['bf_file']); $k++) {
|
||||
$del_file = $save[$i]['bf_file'][$k];
|
||||
|
||||
if ( is_file($del_file) && file_exists($del_file) ){
|
||||
@unlink($del_file);
|
||||
}
|
||||
|
||||
// 썸네일 파일 삭제, 먼지손 님 코드 제안
|
||||
delete_board_thumbnail($bo_table, basename($save[$i]['bf_file'][$k]));
|
||||
}
|
||||
}
|
||||
|
||||
sql_query(" delete from $write_table where wr_parent = '{$save[$i]['wr_id']}' ");
|
||||
sql_query(" delete from {$g5['board_new_table']} where bo_table = '$bo_table' and wr_id = '{$save[$i]['wr_id']}' ");
|
||||
@@ -207,9 +227,11 @@ if ($sw == 'move')
|
||||
}
|
||||
|
||||
$msg = '해당 게시물을 선택한 게시판으로 '.$act.' 하였습니다.';
|
||||
$opener_href = './board.php?bo_table='.$bo_table.'&page='.$page.'&'.$qstr;
|
||||
$opener_href = get_pretty_url($bo_table,'','&page='.$page.'&'.$qstr);
|
||||
$opener_href1 = str_replace('&', '&', $opener_href);
|
||||
|
||||
run_event('bbs_move_update', $bo_table, $chk_bo_table, $wr_id_list, $opener_href);
|
||||
|
||||
echo <<<HEREDOC
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<script>
|
||||
|
||||
+2
-2
@@ -99,7 +99,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$list[$i]['bo_table'] = $row['bo_table'];
|
||||
$list[$i]['name'] = $name;
|
||||
$list[$i]['comment'] = $comment;
|
||||
$list[$i]['href'] = './board.php?bo_table='.$row['bo_table'].'&wr_id='.$row2['wr_id'].$comment_link;
|
||||
$list[$i]['href'] = get_pretty_url($row['bo_table'], $row2['wr_id'], $comment_link);
|
||||
$list[$i]['datetime'] = $datetime;
|
||||
$list[$i]['datetime2'] = $datetime2;
|
||||
|
||||
@@ -113,4 +113,4 @@ $write_pages = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['c
|
||||
include_once($new_skin_path.'/new.skin.php');
|
||||
|
||||
include_once('./_tail.php');
|
||||
?>
|
||||
?>
|
||||
+10
-8
@@ -8,24 +8,25 @@ if ($is_admin != 'super')
|
||||
|
||||
$board = array();
|
||||
$save_bo_table = array();
|
||||
$save_wr_id = array();
|
||||
|
||||
for($i=0;$i<count($_POST['chk_bn_id']);$i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk_bn_id'][$i];
|
||||
|
||||
$bo_table = $_POST['bo_table'][$k];
|
||||
$wr_id = $_POST['wr_id'][$k];
|
||||
$bo_table = isset($_POST['bo_table'][$k]) ? preg_replace('/[^a-z0-9_]/i', '', $_POST['bo_table'][$k]) : '';
|
||||
$wr_id = isset($_POST['wr_id'][$k]) ? preg_replace('/[^0-9]/i', '', $_POST['wr_id'][$k]) : 0;
|
||||
|
||||
$save_bo_table[] = $bo_table;
|
||||
$save_bo_table[$i] = $bo_table;
|
||||
$save_wr_id[$i] = $wr_id;
|
||||
|
||||
$write_table = $g5['write_prefix'].$bo_table;
|
||||
|
||||
if ($board['bo_table'] != $bo_table)
|
||||
$board = sql_fetch(" select bo_subject, bo_write_point, bo_comment_point, bo_notice from {$g5['board_table']} where bo_table = '$bo_table' ");
|
||||
|
||||
$sql = " select * from $write_table where wr_id = '$wr_id' ";
|
||||
$write = sql_fetch($sql);
|
||||
$write = get_write($write_table, $wr_id);
|
||||
if (!$write) continue;
|
||||
|
||||
// 원글 삭제
|
||||
@@ -87,7 +88,7 @@ for($i=0;$i<count($_POST['chk_bn_id']);$i++)
|
||||
$lf = '';
|
||||
for ($k=0; $k<count($notice_array); $k++) {
|
||||
if ((int)$write['wr_id'] != (int)$notice_array[$k])
|
||||
$bo_notice .= $nl.$notice_array[$k];
|
||||
$bo_notice .= $lf.$notice_array[$k];
|
||||
|
||||
if($bo_notice)
|
||||
$lf = ',';
|
||||
@@ -117,7 +118,7 @@ for($i=0;$i<count($_POST['chk_bn_id']);$i++)
|
||||
|
||||
// 코멘트 삭제
|
||||
if (!delete_point($write['mb_id'], $bo_table, $comment_id, '코멘트')) {
|
||||
insert_point($write['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write[wr_parent]}-{$comment_id} 코멘트삭제");
|
||||
insert_point($write['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write['wr_parent']}-{$comment_id} 코멘트삭제");
|
||||
}
|
||||
|
||||
// 코멘트 삭제
|
||||
@@ -138,10 +139,11 @@ for($i=0;$i<count($_POST['chk_bn_id']);$i++)
|
||||
}
|
||||
}
|
||||
|
||||
$save_bo_table = array_unique($save_bo_table);
|
||||
foreach ($save_bo_table as $key=>$value) {
|
||||
delete_cache_latest($value);
|
||||
}
|
||||
|
||||
run_event('bbs_new_delete', $chk_bn_id, $save_bo_table, $save_wr_id);
|
||||
|
||||
goto_url("new.php?sfl=$sfl&stx=$stx&page=$page");
|
||||
?>
|
||||
+7
-7
@@ -6,35 +6,35 @@ $g5['title'] = '비밀번호 입력';
|
||||
switch ($w) {
|
||||
case 'u' :
|
||||
$action = G5_HTTP_BBS_URL.'/write.php';
|
||||
$return_url = G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id;
|
||||
$return_url = short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id);
|
||||
break;
|
||||
case 'd' :
|
||||
set_session('ss_delete_token', $token = uniqid(time()));
|
||||
$action = https_url(G5_BBS_DIR).'/delete.php?token='.$token;
|
||||
$return_url = G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id;
|
||||
$return_url = short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id);
|
||||
break;
|
||||
case 'x' :
|
||||
set_session('ss_delete_comment_'.$comment_id.'_token', $token = uniqid(time()));
|
||||
$action = https_url(G5_BBS_DIR).'/delete_comment.php?token='.$token;
|
||||
$row = sql_fetch(" select wr_parent from $write_table where wr_id = '$comment_id' ");
|
||||
$return_url = G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$row['wr_parent'];
|
||||
$return_url = short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$row['wr_parent']);
|
||||
break;
|
||||
case 's' :
|
||||
// 비밀번호 창에서 로그인 하는 경우 관리자 또는 자신의 글이면 바로 글보기로 감
|
||||
if ($is_admin || ($member['mb_id'] == $write['mb_id'] && $write['mb_id']))
|
||||
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id);
|
||||
goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id));
|
||||
else {
|
||||
$action = https_url(G5_BBS_DIR).'/password_check.php';
|
||||
$return_url = G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table;
|
||||
$return_url = short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table);
|
||||
}
|
||||
break;
|
||||
case 'sc' :
|
||||
// 비밀번호 창에서 로그인 하는 경우 관리자 또는 자신의 글이면 바로 글보기로 감
|
||||
if ($is_admin || ($member['mb_id'] == $write['mb_id'] && $write['mb_id']))
|
||||
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id);
|
||||
goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id));
|
||||
else {
|
||||
$action = https_url(G5_BBS_DIR).'/password_check.php';
|
||||
$return_url = G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id;
|
||||
$return_url = short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id);
|
||||
}
|
||||
break;
|
||||
default :
|
||||
|
||||
+19
-3
@@ -6,8 +6,16 @@ if ($w == 's') {
|
||||
|
||||
$wr = get_write($write_table, $wr_id);
|
||||
|
||||
if (!check_password($wr_password, $wr['wr_password']))
|
||||
if( !$wr['wr_password'] && $wr['mb_id'] ){
|
||||
if ( $mb = get_member($wr['mb_id']) ){
|
||||
$wr['wr_password'] = $mb['mb_password'];
|
||||
}
|
||||
}
|
||||
|
||||
if (!check_password($wr_password, $wr['wr_password'])) {
|
||||
run_event('password_is_wrong', 'bbs', $wr, $qstr);
|
||||
alert('비밀번호가 틀립니다.');
|
||||
}
|
||||
|
||||
// 세션에 아래 정보를 저장. 하위번호는 비밀번호없이 보아야 하기 때문임.
|
||||
//$ss_name = 'ss_secret.'_'.$bo_table.'_'.$wr_id';
|
||||
@@ -20,8 +28,16 @@ if ($w == 's') {
|
||||
|
||||
$wr = get_write($write_table, $wr_id);
|
||||
|
||||
if (!check_password($wr_password, $wr['wr_password']))
|
||||
if( !$wr['wr_password'] && $wr['mb_id'] ){
|
||||
if ( $mb = get_member($wr['mb_id']) ){
|
||||
$wr['wr_password'] = $mb['mb_password'];
|
||||
}
|
||||
}
|
||||
|
||||
if (!check_password($wr_password, $wr['wr_password'])){
|
||||
run_event('password_is_wrong', 'bbs', $wr, $qstr);
|
||||
alert('비밀번호가 틀립니다.');
|
||||
}
|
||||
|
||||
// 세션에 아래 정보를 저장. 하위번호는 비밀번호없이 보아야 하기 때문임.
|
||||
$ss_name = 'ss_secret_comment_'.$bo_table.'_'.$wr['wr_id'];
|
||||
@@ -31,5 +47,5 @@ if ($w == 's') {
|
||||
} else
|
||||
alert('w 값이 제대로 넘어오지 않았습니다.');
|
||||
|
||||
goto_url(G5_HTTP_BBS_URL.'/board.php?'.$qstr);
|
||||
goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?'.$qstr));
|
||||
?>
|
||||
|
||||
@@ -11,7 +11,7 @@ if (!chk_captcha()) {
|
||||
alert('자동등록방지 숫자가 틀렸습니다.');
|
||||
}
|
||||
|
||||
$email = trim($_POST['mb_email']);
|
||||
$email = get_email_address(trim($_POST['mb_email']));
|
||||
|
||||
if (!$email)
|
||||
alert_close('메일주소 오류입니다.');
|
||||
@@ -21,9 +21,9 @@ $row = sql_fetch($sql);
|
||||
if ($row['cnt'] > 1)
|
||||
alert('동일한 메일주소가 2개 이상 존재합니다.\\n\\n관리자에게 문의하여 주십시오.');
|
||||
|
||||
$sql = " select mb_no, mb_id, mb_name, mb_nick, mb_email, mb_datetime from {$g5['member_table']} where mb_email = '$email' ";
|
||||
$sql = " select mb_no, mb_id, mb_name, mb_nick, mb_email, mb_datetime, mb_leave_date from {$g5['member_table']} where mb_email = '$email' ";
|
||||
$mb = sql_fetch($sql);
|
||||
if (!$mb['mb_id'])
|
||||
if (!$mb['mb_id'] || $mb['mb_leave_date'])
|
||||
alert('존재하지 않는 회원입니다.');
|
||||
else if (is_admin($mb['mb_id']))
|
||||
alert('관리자 아이디는 접근 불가합니다.');
|
||||
@@ -71,5 +71,7 @@ $content .= '</div>';
|
||||
|
||||
mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $mb['mb_email'], $subject, $content, 1);
|
||||
|
||||
run_event('password_lost2_after', $mb, $mb_nonce, $mb_lost_certify);
|
||||
|
||||
alert_close($email.' 메일로 회원아이디와 비밀번호를 인증할 수 있는 메일이 발송 되었습니다.\\n\\n메일을 확인하여 주십시오.');
|
||||
?>
|
||||
|
||||
@@ -4,9 +4,11 @@ include_once('./_common.php');
|
||||
// 봇의 메일 링크 크롤링을 방지합니다.
|
||||
if(function_exists('check_mail_bot')){ check_mail_bot($_SERVER['REMOTE_ADDR']); }
|
||||
|
||||
run_event('password_lost_certify_before');
|
||||
|
||||
// 오류시 공히 Error 라고 처리하는 것은 회원정보가 있는지? 비밀번호가 틀린지? 를 알아보려는 해킹에 대비한것
|
||||
|
||||
$mb_no = trim($_GET['mb_no']);
|
||||
$mb_no = preg_replace('#[^0-9]#', '', trim($_GET['mb_no']));
|
||||
$mb_nonce = trim($_GET['mb_nonce']);
|
||||
|
||||
// 회원아이디가 아닌 회원고유번호로 회원정보를 구한다.
|
||||
@@ -22,6 +24,9 @@ sql_query(" update {$g5['member_table']} set mb_lost_certify = '' where mb_no =
|
||||
if ($mb_nonce === substr($mb['mb_lost_certify'], 0, 32)) {
|
||||
$new_password_hash = substr($mb['mb_lost_certify'], 33);
|
||||
sql_query(" update {$g5['member_table']} set mb_password = '$new_password_hash' where mb_no = '$mb_no' ");
|
||||
|
||||
run_event('password_lost_certify_after', $mb, $mb_nonce);
|
||||
|
||||
alert('비밀번호가 변경됐습니다.\\n\\n회원아이디와 변경된 비밀번호로 로그인 하시기 바랍니다.', G5_BBS_URL.'/login.php');
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -7,7 +7,10 @@ if (!$member['mb_id'])
|
||||
if (!$member['mb_open'] && $is_admin != 'super' && $member['mb_id'] != $mb_id)
|
||||
alert_close('자신의 정보를 공개하지 않으면 다른분의 정보를 조회할 수 없습니다.\\n\\n정보공개 설정은 회원정보수정에서 하실 수 있습니다.');
|
||||
|
||||
$mb_id = isset($mb_id) ? $mb_id : '';
|
||||
|
||||
$mb = get_member($mb_id);
|
||||
|
||||
if (!$mb['mb_id'])
|
||||
alert_close('회원정보가 존재하지 않습니다.\\n\\n탈퇴하였을 수 있습니다.');
|
||||
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ if(is_file($skin_file)) {
|
||||
|
||||
$content = '';
|
||||
if ($w == '') {
|
||||
$content = $qaconfig['qa_insert_content'];
|
||||
$content = html_purifier($qaconfig['qa_insert_content']);
|
||||
} else if($w == 'r') {
|
||||
if($is_dhtml_editor)
|
||||
$content = '<div><br><br><br>====== 이전 답변내용 =======<br></div>';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user