From a1633aec96bf04383bcd511bef6d53654ae533b8 Mon Sep 17 00:00:00 2001 From: thisgun Date: Mon, 29 Jul 2019 11:42:07 +0900 Subject: [PATCH 01/23] =?UTF-8?q?=EC=9E=98=EB=AA=BB=EB=90=9C=20php=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/memo_view.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bbs/memo_view.php b/bbs/memo_view.php index 9b5f72a12..edfa4e53b 100644 --- a/bbs/memo_view.php +++ b/bbs/memo_view.php @@ -51,9 +51,9 @@ else // 다음 쪽지 -$sql = " select * from {$g5[memo_table]} +$sql = " select * from {$g5['memo_table']} where me_id < '{$me_id}' - and me_{$kind}_mb_id = '{$member[mb_id]}' + and me_{$kind}_mb_id = '{$member['mb_id']}' order by me_id desc limit 1 "; $next = sql_fetch($sql); From a0b9cd39cb67b6efbe48edfc6043302a348aee95 Mon Sep 17 00:00:00 2001 From: thisgun Date: Fri, 9 Aug 2019 09:24:08 +0900 Subject: [PATCH 02/23] =?UTF-8?q?hook=20=EC=B6=94=EA=B0=80=20=EB=B0=8F=20?= =?UTF-8?q?=EC=97=AC=EB=9F=AC=20=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/board_copy_update.php | 9 +++++++ adm/board_list_update.php | 6 +++++ adm/dbupgrade.php | 14 ++++++++++ bbs/delete.php | 6 ++++- bbs/delete_all.php | 5 +++- bbs/download.php | 9 +++++-- bbs/move_update.php | 18 ++++++++++--- bbs/write_update.php | 26 ++++++++++++++++--- install/gnuboard5.sql | 3 +++ lib/common.lib.php | 3 +++ lib/thumbnail.lib.php | 22 +++++++++++++++- mobile/skin/board/basic/view.skin.php | 5 +--- mobile/skin/board/gallery/view.skin.php | 5 +--- .../editor/cheditor5/imageUpload/delete.php | 4 +++ .../editor/cheditor5/imageUpload/upload.php | 11 +++++--- .../popup/php/UploadHandler.php | 9 +++++++ skin/board/basic/view.skin.php | 5 +--- skin/board/gallery/view.skin.php | 5 +--- skin/latest/pic_list/latest.skin.php | 4 +-- .../mobile/skin/board/basic/view.skin.php | 5 +--- .../mobile/skin/board/gallery/view.skin.php | 5 +--- theme/basic/skin/board/basic/view.skin.php | 5 +--- theme/basic/skin/board/gallery/view.skin.php | 5 +--- .../skin/latest/pic_list/latest.skin.php | 4 +-- 24 files changed, 142 insertions(+), 51 deletions(-) diff --git a/adm/board_copy_update.php b/adm/board_copy_update.php index f94af52a8..772758484 100644 --- a/adm/board_copy_update.php +++ b/adm/board_copy_update.php @@ -160,6 +160,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 "; @@ -181,6 +183,9 @@ if ($copy_case == 'schema_data_both') { if (count($file_copy)) { for ($i=0; $i diff --git a/adm/dbupgrade.php b/adm/dbupgrade.php index 771d3214e..f10bf1b43 100644 --- a/adm/dbupgrade.php +++ b/adm/dbupgrade.php @@ -147,6 +147,20 @@ if(!isset($member['mb_memo_cnt'])) { $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 업그레이드가 완료되었습니다.' : '더 이상 업그레이드 할 내용이 없습니다.
현재 DB 업그레이드가 완료된 상태입니다.'; diff --git a/bbs/delete.php b/bbs/delete.php index 81690c3c2..1c28e9fcd 100644 --- a/bbs/delete.php +++ b/bbs/delete.php @@ -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']); diff --git a/bbs/delete_all.php b/bbs/delete_all.php index 5fa17c855..178cca355 100644 --- a/bbs/delete_all.php +++ b/bbs/delete_all.php @@ -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'])) { diff --git a/bbs/download.php b/bbs/download.php index 1d9d7676c..e4f7fa3fe 100644 --- a/bbs/download.php +++ b/bbs/download.php @@ -17,7 +17,7 @@ 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(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('파일 정보가 존재하지 않습니다.'); @@ -47,8 +47,11 @@ if ($member['mb_level'] < $board['bo_download_level']) { $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'); @@ -101,6 +104,8 @@ $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")); diff --git a/bbs/move_update.php b/bbs/move_update.php index 667698455..b3c28f09c 100644 --- a/bbs/move_update.php +++ b/bbs/move_update.php @@ -126,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.'/'.$copy_file_name, 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']} @@ -138,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']}', @@ -200,7 +208,11 @@ if ($sw == 'move') { if( isset($save[$i]['bf_file']) && $save[$i]['bf_file'] ){ for ($k=0; $k$bo_table, 'wr_id'=>$wr_id, 'data_path'=>$data_path, 'edt'=>$edt, 'filename'=>$filename, 'filepath'=>$filepath, 'thumb_width'=>$thumb_width, 'thumb_height'=>$thumb_height, 'is_create'=>$is_create, 'is_crop'=>$is_crop, 'crop_mode'=>$crop_mode, 'is_sharpen'=>$is_sharpen, 'um_value'=>$um_value)) ){ + return $thumbnail_info; + } + $tname = thumbnail($filename, $filepath, $filepath, $thumb_width, $thumb_height, $is_create, $is_crop, $crop_mode, $is_sharpen, $um_value); if($tname) { @@ -73,6 +79,20 @@ function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_ return $thumb; } +// 게시글보기 파일 썸네일 리턴 +function get_file_thumbnail($file){ + + if( ! is_array($file) ) return ''; + + if( $contents = run_replace('get_file_thumbnail_tags', '', $file) ){ + return $contents; + } else if ($file['view']) { + return get_view_thumbnail($file['view']); + } + + return $file['view']; +} + // 게시글보기 썸네일 생성 function get_view_thumbnail($contents, $thumb_width=0) { diff --git a/mobile/skin/board/basic/view.skin.php b/mobile/skin/board/basic/view.skin.php index a5664f176..78c0a067d 100644 --- a/mobile/skin/board/basic/view.skin.php +++ b/mobile/skin/board/basic/view.skin.php @@ -84,10 +84,7 @@ jQuery(function($){ echo "
\n"; for ($i=0; $i<=count($view['file']); $i++) { - if ($view['file'][$i]['view']) { - //echo $view['file'][$i]['view']; - echo get_view_thumbnail($view['file'][$i]['view']); - } + echo get_file_thumbnail($view['file'][$i]); } echo "
\n"; } diff --git a/mobile/skin/board/gallery/view.skin.php b/mobile/skin/board/gallery/view.skin.php index 5a4f06801..1141e1d12 100644 --- a/mobile/skin/board/gallery/view.skin.php +++ b/mobile/skin/board/gallery/view.skin.php @@ -86,10 +86,7 @@ jQuery(function($){ echo "
\n"; for ($i=0; $i<=count($view['file']); $i++) { - if ($view['file'][$i]['view']) { - //echo $view['file'][$i]['view']; - echo get_view_thumbnail($view['file'][$i]['view']); - } + echo get_file_thumbnail($view['file'][$i]); } echo "
\n"; } diff --git a/plugin/editor/cheditor5/imageUpload/delete.php b/plugin/editor/cheditor5/imageUpload/delete.php index 35c6928de..82e65bedb 100644 --- a/plugin/editor/cheditor5/imageUpload/delete.php +++ b/plugin/editor/cheditor5/imageUpload/delete.php @@ -34,6 +34,10 @@ if( $file_arr[1] !== che_get_file_passname() ){ $filepath = SAVE_DIR . '/' . $filesrc; $r = false; +if( function_exists('run_event') ){ + run_event('delete_editor_file', $filepath, $r); +} + if (file_exists($filepath)) { $r = unlink($filepath); if ($r) { diff --git a/plugin/editor/cheditor5/imageUpload/upload.php b/plugin/editor/cheditor5/imageUpload/upload.php index 73e3700a2..96d7d51ab 100644 --- a/plugin/editor/cheditor5/imageUpload/upload.php +++ b/plugin/editor/cheditor5/imageUpload/upload.php @@ -117,9 +117,14 @@ try { } catch (Exception $e) { } -$rdata = sprintf('{"fileUrl": "%s/%s", "filePath": "%s", "fileName": "%s", "fileSize": "%d" }', - SAVE_URL, - $filename, +$file_url = SAVE_URL.'/'.$filename; + +if( function_exists('run_replace') ){ + $file_url = run_replace('get_editor_upload_url', $file_url, $savefile, array()); +} + +$rdata = sprintf('{"fileUrl": "%s", "filePath": "%s", "fileName": "%s", "fileSize": "%d" }', + $file_url, $savefile, $filename, $filesize ); diff --git a/plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php b/plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php index 6ae20946f..7e72ebafd 100644 --- a/plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php +++ b/plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php @@ -1176,6 +1176,10 @@ class UploadHandler $image_width_height = $this->get_image_size($file_path); $file->width = $image_width_height[0]; $file->height = $image_width_height[1]; + + if( function_exists('run_replace') ){ + $file->url = run_replace('get_editor_upload_url', $file->url, $file_path, $file); + } } else { //로빈아빠님이 알려주심, 이미지 업로드 체크 unlink($file_path); $file->error = $this->get_error_message('accept_file_types'); @@ -1441,6 +1445,11 @@ class UploadHandler if( substr($file_name, 0 , 32) != $this->get_file_passname() ) continue; //session_id() 와 비교하여 틀리면 지우지 않음 $file_path = $this->get_upload_path($file_name); $success = is_file($file_path) && $file_name[0] !== '.' && unlink($file_path); + + if( function_exists('run_event') ){ + run_event('delete_editor_file', $file_path, $success); + } + if ($success) { foreach($this->options['image_versions'] as $version => $options) { if (!empty($version)) { diff --git a/skin/board/basic/view.skin.php b/skin/board/basic/view.skin.php index 7e9bab2a3..789b7b211 100644 --- a/skin/board/basic/view.skin.php +++ b/skin/board/basic/view.skin.php @@ -94,10 +94,7 @@ add_stylesheet('', 0 echo "
\n"; for ($i=0; $i<=count($view['file']); $i++) { - if ($view['file'][$i]['view']) { - //echo $view['file'][$i]['view']; - echo get_view_thumbnail($view['file'][$i]['view']); - } + echo get_file_thumbnail($view['file'][$i]); } echo "
\n"; diff --git a/skin/board/gallery/view.skin.php b/skin/board/gallery/view.skin.php index 4532af836..b7200e762 100644 --- a/skin/board/gallery/view.skin.php +++ b/skin/board/gallery/view.skin.php @@ -94,10 +94,7 @@ add_stylesheet('', 0 echo "
\n"; for ($i=0; $i<=count($view['file']); $i++) { - if ($view['file'][$i]['view']) { - //echo $view['file'][$i]['view']; - echo get_view_thumbnail($view['file'][$i]['view']); - } + echo get_file_thumbnail($view['file'][$i]); } echo "
\n"; diff --git a/skin/latest/pic_list/latest.skin.php b/skin/latest/pic_list/latest.skin.php index e95445430..71b48d042 100644 --- a/skin/latest/pic_list/latest.skin.php +++ b/skin/latest/pic_list/latest.skin.php @@ -4,8 +4,8 @@ include_once(G5_LIB_PATH.'/thumbnail.lib.php'); // add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨 add_stylesheet('', 0); -$thumb_width = 210; -$thumb_height = 150; +$thumb_width = 297; +$thumb_height = 212; ?>
diff --git a/theme/basic/mobile/skin/board/basic/view.skin.php b/theme/basic/mobile/skin/board/basic/view.skin.php index a5664f176..78c0a067d 100644 --- a/theme/basic/mobile/skin/board/basic/view.skin.php +++ b/theme/basic/mobile/skin/board/basic/view.skin.php @@ -84,10 +84,7 @@ jQuery(function($){ echo "
\n"; for ($i=0; $i<=count($view['file']); $i++) { - if ($view['file'][$i]['view']) { - //echo $view['file'][$i]['view']; - echo get_view_thumbnail($view['file'][$i]['view']); - } + echo get_file_thumbnail($view['file'][$i]); } echo "
\n"; } diff --git a/theme/basic/mobile/skin/board/gallery/view.skin.php b/theme/basic/mobile/skin/board/gallery/view.skin.php index 5a4f06801..1141e1d12 100644 --- a/theme/basic/mobile/skin/board/gallery/view.skin.php +++ b/theme/basic/mobile/skin/board/gallery/view.skin.php @@ -86,10 +86,7 @@ jQuery(function($){ echo "
\n"; for ($i=0; $i<=count($view['file']); $i++) { - if ($view['file'][$i]['view']) { - //echo $view['file'][$i]['view']; - echo get_view_thumbnail($view['file'][$i]['view']); - } + echo get_file_thumbnail($view['file'][$i]); } echo "
\n"; } diff --git a/theme/basic/skin/board/basic/view.skin.php b/theme/basic/skin/board/basic/view.skin.php index 7e9bab2a3..789b7b211 100644 --- a/theme/basic/skin/board/basic/view.skin.php +++ b/theme/basic/skin/board/basic/view.skin.php @@ -94,10 +94,7 @@ add_stylesheet('', 0 echo "
\n"; for ($i=0; $i<=count($view['file']); $i++) { - if ($view['file'][$i]['view']) { - //echo $view['file'][$i]['view']; - echo get_view_thumbnail($view['file'][$i]['view']); - } + echo get_file_thumbnail($view['file'][$i]); } echo "
\n"; diff --git a/theme/basic/skin/board/gallery/view.skin.php b/theme/basic/skin/board/gallery/view.skin.php index 4532af836..b7200e762 100644 --- a/theme/basic/skin/board/gallery/view.skin.php +++ b/theme/basic/skin/board/gallery/view.skin.php @@ -94,10 +94,7 @@ add_stylesheet('', 0 echo "
\n"; for ($i=0; $i<=count($view['file']); $i++) { - if ($view['file'][$i]['view']) { - //echo $view['file'][$i]['view']; - echo get_view_thumbnail($view['file'][$i]['view']); - } + echo get_file_thumbnail($view['file'][$i]); } echo "
\n"; diff --git a/theme/basic/skin/latest/pic_list/latest.skin.php b/theme/basic/skin/latest/pic_list/latest.skin.php index e95445430..71b48d042 100644 --- a/theme/basic/skin/latest/pic_list/latest.skin.php +++ b/theme/basic/skin/latest/pic_list/latest.skin.php @@ -4,8 +4,8 @@ include_once(G5_LIB_PATH.'/thumbnail.lib.php'); // add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨 add_stylesheet('', 0); -$thumb_width = 210; -$thumb_height = 150; +$thumb_width = 297; +$thumb_height = 212; ?>
From 067bcd2046b00055b93133162999bbc50a66554f Mon Sep 17 00:00:00 2001 From: thisgun Date: Mon, 12 Aug 2019 10:22:09 +0900 Subject: [PATCH 03/23] =?UTF-8?q?=EB=B2=84=EC=A0=84=205.3.3.2=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.php b/config.php index 7a5a4b80b..51854fc9e 100644 --- a/config.php +++ b/config.php @@ -5,7 +5,7 @@ ********************/ define('G5_VERSION', '그누보드5'); -define('G5_GNUBOARD_VER', '5.3.3.1'); +define('G5_GNUBOARD_VER', '5.3.3.2'); // 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음 define('_GNUBOARD_', true); From 120d42c43188dbd2b44285cff902669e6a2d4f61 Mon Sep 17 00:00:00 2001 From: thisgun Date: Mon, 26 Aug 2019 18:03:57 +0900 Subject: [PATCH 04/23] =?UTF-8?q?=EC=B9=B4=EC=B9=B4=EC=98=A4=20=EC=86=8C?= =?UTF-8?q?=EC=85=9C=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=ED=91=9C=EC=8B=9C=EB=AC=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/config_form.php | 2 +- plugin/social/includes/functions.php | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/adm/config_form.php b/adm/config_form.php index 738e0cdea..716485c85 100644 --- a/adm/config_form.php +++ b/adm/config_form.php @@ -1067,7 +1067,7 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) { >
-

카카오 웹 Redirect Path

+

카카오 로그인 Redirect URI

diff --git a/plugin/social/includes/functions.php b/plugin/social/includes/functions.php index fab949a88..50fb6af81 100644 --- a/plugin/social/includes/functions.php +++ b/plugin/social/includes/functions.php @@ -48,10 +48,6 @@ function get_social_callbackurl($provider, $no_domain=false){ $base_url = G5_SOCIAL_LOGIN_BASE_URL; - if( $provider === 'kakao' && $no_domain ){ - $base_url = '/'.ltrim(parse_url($base_url, PHP_URL_PATH), '/'); - } - if ( $provider === 'twitter' ){ return $base_url; } From c2922aaa13fe5d9ffabd5370d67125209d5bb5a8 Mon Sep 17 00:00:00 2001 From: thisgun Date: Thu, 29 Aug 2019 12:23:29 +0900 Subject: [PATCH 05/23] =?UTF-8?q?=EA=B7=B8=EB=88=84=EB=B3=B4=EB=93=9C=20XS?= =?UTF-8?q?S=20=EC=B7=A8=EC=95=BD=EC=A0=90(KVE-2019-1235,1236,1238)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/qa_config.php | 2 +- bbs/qawrite.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/adm/qa_config.php b/adm/qa_config.php index 92e9a4632..b73062251 100644 --- a/adm/qa_config.php +++ b/adm/qa_config.php @@ -306,7 +306,7 @@ if(!isset($qaconfig['qa_include_head'])) { - + diff --git a/bbs/qawrite.php b/bbs/qawrite.php index 5a7a47345..484f271b5 100644 --- a/bbs/qawrite.php +++ b/bbs/qawrite.php @@ -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 = '



====== 이전 답변내용 =======
'; From 3c55c4d60d6dcb5ead47d283dd06fe57aac7e73e Mon Sep 17 00:00:00 2001 From: thisgun Date: Thu, 29 Aug 2019 14:44:47 +0900 Subject: [PATCH 06/23] =?UTF-8?q?=EA=B7=B8=EB=88=84=EB=B3=B4=EB=93=9C=20St?= =?UTF-8?q?ored=20XSS=20=EC=B7=A8=EC=95=BD=EC=A0=90(KVE-2019-1198)=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/qa_config_update.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/adm/qa_config_update.php b/adm/qa_config_update.php index 1072b765f..a269c45ee 100644 --- a/adm/qa_config_update.php +++ b/adm/qa_config_update.php @@ -50,6 +50,8 @@ if( $qa_include_tail && ! is_include_path_check($qa_include_tail, 1) ){ $error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.'; } +$_POST['qa_title'] = strip_tags($_POST['qa_title']); + $sql = " update {$g5['qa_config_table']} set qa_title = '{$_POST['qa_title']}', qa_category = '{$_POST['qa_category']}', From d33753014c91f8a1916656952c8294128fca3462 Mon Sep 17 00:00:00 2001 From: thisgun Date: Fri, 6 Sep 2019 12:28:27 +0900 Subject: [PATCH 07/23] =?UTF-8?q?[KVE-2019-1162]=EC=9E=84=EC=9D=98=20?= =?UTF-8?q?=EB=AA=85=EB=A0=B9=EC=96=B4=20=EC=8B=A4=ED=96=89=20=EC=B7=A8?= =?UTF-8?q?=EC=95=BD=EC=A0=90=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common.lib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/common.lib.php b/lib/common.lib.php index 6f9d0e906..3546358ef 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -3561,12 +3561,15 @@ function is_include_path_check($path='', $is_input='') if( preg_match('/\/data\/(file|editor|qa|cache|member|member_image|session|tmp)\/[A-Za-z0-9_]{1,20}\//i', $replace_path) ){ return false; } - if( (preg_match('/\.\.\//i', $replace_path) || preg_match('/^\/.*/i', $replace_path)) && preg_match('/plugin\//i', $replace_path) && preg_match('/okname\//i', $replace_path) ){ + if( preg_match('/'.G5_PLUGIN_DIR.'\//i', $replace_path) && (preg_match('/'.G5_OKNAME_DIR.'\//i', $replace_path) || preg_match('/'.G5_KCPCERT_DIR.'\//i', $replace_path) || preg_match('/'.G5_LGXPAY_DIR.'\//i', $replace_path)) ){ return false; } if( substr_count($replace_path, './') > 5 ){ return false; } + if( defined('G5_SHOP_DIR') && preg_match('/'.G5_SHOP_DIR.'\//i', $replace_path) && preg_match('/kcp\//i', $replace_path) ){ + return false; + } } $extension = pathinfo($path, PATHINFO_EXTENSION); From f0e176033fc5b781ac9bf83de3ac9ccbef393a11 Mon Sep 17 00:00:00 2001 From: thisgun Date: Fri, 6 Sep 2019 17:48:35 +0900 Subject: [PATCH 08/23] =?UTF-8?q?=EC=B9=B4=EC=B9=B4=EC=98=A4=20=EB=A7=81?= =?UTF-8?q?=ED=81=AC=20v2=20=EB=B2=84=EC=A0=84=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/sns/view.sns.skin.php | 39 ++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/plugin/sns/view.sns.skin.php b/plugin/sns/view.sns.skin.php index 5a45b6392..97bb0523b 100644 --- a/plugin/sns/view.sns.skin.php +++ b/plugin/sns/view.sns.skin.php @@ -24,11 +24,38 @@ $bo_v_sns_class = $config['cf_kakao_js_apikey'] ? 'show_kakao' : ''; ?> - - - + +
@@ -39,7 +66,7 @@ $bo_v_sns_class = $config['cf_kakao_js_apikey'] ? 'show_kakao' : '';
  • 페이스북으로 보내기
  • 구글플러스로 보내기
  • -
  • 카카오톡으로 보내기
  • +
  • 카카오톡으로 보내기
  • From 7ad199ccd557f0f2736f3e52a5b9a5eb51454175 Mon Sep 17 00:00:00 2001 From: thisgun Date: Mon, 9 Sep 2019 11:30:44 +0900 Subject: [PATCH 09/23] =?UTF-8?q?=EC=86=8C=EC=85=9C=20=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=EC=9D=B8=20=EA=B0=80=EC=9E=85=EC=8B=9C=20=EB=8B=89=EB=84=A4?= =?UTF-8?q?=EC=9E=84=20=EC=A4=91=EB=B3=B5=20=EC=B2=B4=ED=81=AC=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/social/register_member_update.php | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/social/register_member_update.php b/plugin/social/register_member_update.php index 2fbec2f98..748a82281 100644 --- a/plugin/social/register_member_update.php +++ b/plugin/social/register_member_update.php @@ -44,6 +44,7 @@ if( ! $mb_nick || ! $mb_name ){ $tmp = explode('@', $mb_email); $mb_nick = $mb_nick ? $mb_nick : $tmp[0]; $mb_name = $mb_name ? $mb_name : $tmp[0]; + $mb_nick = exist_mb_nick_recursive($mb_nick, ''); } if( ! isset($mb_password) || ! $mb_password ){ From b4604fca6781e8302e240d5f4c6e2ae3f455909a Mon Sep 17 00:00:00 2001 From: thisgun Date: Mon, 9 Sep 2019 12:27:14 +0900 Subject: [PATCH 10/23] =?UTF-8?q?[KVE-2019-1318]=20SQL=20Injection=20?= =?UTF-8?q?=EC=B7=A8=EC=95=BD=EC=A0=90=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/sms_admin/history_view.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/adm/sms_admin/history_view.php b/adm/sms_admin/history_view.php index 43e144fa4..a62558385 100644 --- a/adm/sms_admin/history_view.php +++ b/adm/sms_admin/history_view.php @@ -12,6 +12,10 @@ 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'] = "문자전송 상세내역"; @@ -22,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 = ""; From 545d081f2da765f198213a35519f20ec1c67a883 Mon Sep 17 00:00:00 2001 From: thisgun Date: Tue, 10 Sep 2019 10:54:34 +0900 Subject: [PATCH 11/23] =?UTF-8?q?=EC=9E=98=EB=AA=BB=EB=90=9C=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/thumbnail.lib.php | 4 ++-- skin/latest/basic/latest.skin.php | 2 +- skin/latest/basic/style.css | 2 +- skin/latest/pic_block/latest.skin.php | 2 +- skin/latest/pic_block/style.css | 3 ++- skin/latest/pic_list/latest.skin.php | 24 ++++++++++++------- skin/latest/pic_list/style.css | 3 ++- theme/basic/skin/latest/basic/latest.skin.php | 2 +- theme/basic/skin/latest/basic/style.css | 2 +- .../skin/latest/pic_block/latest.skin.php | 2 +- theme/basic/skin/latest/pic_block/style.css | 3 ++- .../skin/latest/pic_list/latest.skin.php | 24 ++++++++++++------- theme/basic/skin/latest/pic_list/style.css | 3 ++- 13 files changed, 46 insertions(+), 30 deletions(-) diff --git a/lib/thumbnail.lib.php b/lib/thumbnail.lib.php index 961c594df..ce53dda2b 100644 --- a/lib/thumbnail.lib.php +++ b/lib/thumbnail.lib.php @@ -83,8 +83,8 @@ function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_ function get_file_thumbnail($file){ if( ! is_array($file) ) return ''; - - if( $contents = run_replace('get_file_thumbnail_tags', '', $file) ){ + + if( preg_match('/(\.jpg|\.jpeg|\.gif|\.png|\.bmp)$/i', $file['file']) && $contents = run_replace('get_file_thumbnail_tags', '', $file) ){ return $contents; } else if ($file['view']) { return get_view_thumbnail($file['view']); diff --git a/skin/latest/basic/latest.skin.php b/skin/latest/basic/latest.skin.php index ca775c519..eb2b00e1e 100644 --- a/skin/latest/basic/latest.skin.php +++ b/skin/latest/basic/latest.skin.php @@ -9,7 +9,7 @@ add_stylesheet('',

      -
    • +
    • 비밀글 "; diff --git a/skin/latest/basic/style.css b/skin/latest/basic/style.css index dc2b0f8d3..bfc67ef81 100644 --- a/skin/latest/basic/style.css +++ b/skin/latest/basic/style.css @@ -1,7 +1,7 @@ @charset "utf-8"; /* 새글 스킨 (latest) */ -.lat {position:relative;margin-bottom:20px;overflow:hidden;background:#fff} +.lat {position:relative;margin-bottom:20px;background:#fff} .lat .lat_title {display:block;line-height:45px;font-size:1.2em;color:#253dbe} .lat .lat_title a {position:relative;color:#000;display:inline-block} diff --git a/skin/latest/pic_block/latest.skin.php b/skin/latest/pic_block/latest.skin.php index fe40496d4..c19ef5c08 100644 --- a/skin/latest/pic_block/latest.skin.php +++ b/skin/latest/pic_block/latest.skin.php @@ -23,7 +23,7 @@ $thumb_height = 150; } $img_content = ''.$thumb['alt'].''; ?> -
    • +
    • 비밀글 "; diff --git a/skin/latest/pic_block/style.css b/skin/latest/pic_block/style.css index b73646209..607259fce 100644 --- a/skin/latest/pic_block/style.css +++ b/skin/latest/pic_block/style.css @@ -1,7 +1,7 @@ @charset "utf-8"; /* 새글 스킨 (latest) */ -.pic_lt {position:relative;margin-bottom:20px;overflow:hidden;background:#fff} +.pic_lt {position:relative;margin-bottom:20px;background:#fff} .pic_lt .lat_title {display:block;line-height:45px;font-size:1.2em;color:#253dbe} .pic_lt .lat_title a {color:#000;display:inline-block;position:relative} @@ -10,6 +10,7 @@ .pic_lt ul:after {display:block;visibility:hidden;clear:both;content:""} .pic_lt ul {margin: 0 -10px} .pic_lt li {float:left;width:25%;padding:0 10px} +.pic_lt li.galley_li:nth-child(4n+1) {clear: both!important} .pic_lt li .lt_img {margin:5px 0;display:block} .pic_lt li .lt_img img {width:100%;height:auto} .pic_lt li a:hover {color:#a22121} diff --git a/skin/latest/pic_list/latest.skin.php b/skin/latest/pic_list/latest.skin.php index 71b48d042..57dcec5bb 100644 --- a/skin/latest/pic_list/latest.skin.php +++ b/skin/latest/pic_list/latest.skin.php @@ -13,18 +13,24 @@ $thumb_height = 212;
        '; + if($thumb['src']) { + $img = $thumb['src']; + } else { + $img = G5_IMG_URL.'/no_img.png'; + $thumb['alt'] = '이미지가 없습니다.'; + } + $img_content = ''.$thumb['alt'].''; + $img_link_html = ''.$img_content.''; + } ?>
      • - + 비밀글 "; diff --git a/skin/latest/pic_list/style.css b/skin/latest/pic_list/style.css index 8dce78f26..e57392a2c 100644 --- a/skin/latest/pic_list/style.css +++ b/skin/latest/pic_list/style.css @@ -1,9 +1,10 @@ @charset "utf-8"; /* 새글 스킨 (latest) */ -.pic_li_lt {position:relative;width:33.3333%;float:left;padding:0 10px;overflow:hidden;background:#fff} +.pic_li_lt {position:relative;width:33.3333%;float:left;padding:0 10px;background:#fff} .pic_li_lt .lat_title {display:block;line-height:45px;font-size:1.2em;color:#253dbe} .pic_li_lt .lat_title a {color:#000;display:inline-block;position:relative} +.latest_top_wr .pic_li_lt:nth-child(3n+1) {clear: both!important} .pic_li_lt .lt_more {position:absolute;top:11px;right:10px;display:block;width:25px;line-height:25px;color:#aaa;border-radius:3px;text-align:center} .pic_li_lt .lt_more:hover {color:#777} diff --git a/theme/basic/skin/latest/basic/latest.skin.php b/theme/basic/skin/latest/basic/latest.skin.php index ca775c519..eb2b00e1e 100644 --- a/theme/basic/skin/latest/basic/latest.skin.php +++ b/theme/basic/skin/latest/basic/latest.skin.php @@ -9,7 +9,7 @@ add_stylesheet('',

          -
        • +
        • 비밀글 "; diff --git a/theme/basic/skin/latest/basic/style.css b/theme/basic/skin/latest/basic/style.css index dc2b0f8d3..bfc67ef81 100644 --- a/theme/basic/skin/latest/basic/style.css +++ b/theme/basic/skin/latest/basic/style.css @@ -1,7 +1,7 @@ @charset "utf-8"; /* 새글 스킨 (latest) */ -.lat {position:relative;margin-bottom:20px;overflow:hidden;background:#fff} +.lat {position:relative;margin-bottom:20px;background:#fff} .lat .lat_title {display:block;line-height:45px;font-size:1.2em;color:#253dbe} .lat .lat_title a {position:relative;color:#000;display:inline-block} diff --git a/theme/basic/skin/latest/pic_block/latest.skin.php b/theme/basic/skin/latest/pic_block/latest.skin.php index fe40496d4..c19ef5c08 100644 --- a/theme/basic/skin/latest/pic_block/latest.skin.php +++ b/theme/basic/skin/latest/pic_block/latest.skin.php @@ -23,7 +23,7 @@ $thumb_height = 150; } $img_content = ''.$thumb['alt'].''; ?> -
        • +
        • 비밀글 "; diff --git a/theme/basic/skin/latest/pic_block/style.css b/theme/basic/skin/latest/pic_block/style.css index b73646209..607259fce 100644 --- a/theme/basic/skin/latest/pic_block/style.css +++ b/theme/basic/skin/latest/pic_block/style.css @@ -1,7 +1,7 @@ @charset "utf-8"; /* 새글 스킨 (latest) */ -.pic_lt {position:relative;margin-bottom:20px;overflow:hidden;background:#fff} +.pic_lt {position:relative;margin-bottom:20px;background:#fff} .pic_lt .lat_title {display:block;line-height:45px;font-size:1.2em;color:#253dbe} .pic_lt .lat_title a {color:#000;display:inline-block;position:relative} @@ -10,6 +10,7 @@ .pic_lt ul:after {display:block;visibility:hidden;clear:both;content:""} .pic_lt ul {margin: 0 -10px} .pic_lt li {float:left;width:25%;padding:0 10px} +.pic_lt li.galley_li:nth-child(4n+1) {clear: both!important} .pic_lt li .lt_img {margin:5px 0;display:block} .pic_lt li .lt_img img {width:100%;height:auto} .pic_lt li a:hover {color:#a22121} diff --git a/theme/basic/skin/latest/pic_list/latest.skin.php b/theme/basic/skin/latest/pic_list/latest.skin.php index 71b48d042..57dcec5bb 100644 --- a/theme/basic/skin/latest/pic_list/latest.skin.php +++ b/theme/basic/skin/latest/pic_list/latest.skin.php @@ -13,18 +13,24 @@ $thumb_height = 212;
            '; + if($thumb['src']) { + $img = $thumb['src']; + } else { + $img = G5_IMG_URL.'/no_img.png'; + $thumb['alt'] = '이미지가 없습니다.'; + } + $img_content = ''.$thumb['alt'].''; + $img_link_html = ''.$img_content.''; + } ?>
          • - + 비밀글 "; diff --git a/theme/basic/skin/latest/pic_list/style.css b/theme/basic/skin/latest/pic_list/style.css index 8dce78f26..e57392a2c 100644 --- a/theme/basic/skin/latest/pic_list/style.css +++ b/theme/basic/skin/latest/pic_list/style.css @@ -1,9 +1,10 @@ @charset "utf-8"; /* 새글 스킨 (latest) */ -.pic_li_lt {position:relative;width:33.3333%;float:left;padding:0 10px;overflow:hidden;background:#fff} +.pic_li_lt {position:relative;width:33.3333%;float:left;padding:0 10px;background:#fff} .pic_li_lt .lat_title {display:block;line-height:45px;font-size:1.2em;color:#253dbe} .pic_li_lt .lat_title a {color:#000;display:inline-block;position:relative} +.latest_top_wr .pic_li_lt:nth-child(3n+1) {clear: both!important} .pic_li_lt .lt_more {position:absolute;top:11px;right:10px;display:block;width:25px;line-height:25px;color:#aaa;border-radius:3px;text-align:center} .pic_li_lt .lt_more:hover {color:#777} From 8182cac90d2ee2f9da06469ecba759170e782ee3 Mon Sep 17 00:00:00 2001 From: thisgun Date: Mon, 16 Sep 2019 10:36:10 +0900 Subject: [PATCH 12/23] =?UTF-8?q?XSS=20=EC=B7=A8=EC=95=BD=EC=A0=90=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/sms_admin/ajax.sms_write_form.php | 13 ++++++++----- plugin/sms5/ajax.sms_emoticon.php | 15 ++++++++++----- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/adm/sms_admin/ajax.sms_write_form.php b/adm/sms_admin/ajax.sms_write_form.php index e82a01cef..82a02b22a 100644 --- a/adm/sms_admin/ajax.sms_write_form.php +++ b/adm/sms_admin/ajax.sms_write_form.php @@ -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) ); ?> \ No newline at end of file diff --git a/plugin/sms5/ajax.sms_emoticon.php b/plugin/sms5/ajax.sms_emoticon.php index 7299bc157..12d6431e8 100644 --- a/plugin/sms5/ajax.sms_emoticon.php +++ b/plugin/sms5/ajax.sms_emoticon.php @@ -18,6 +18,8 @@ if (is_numeric($fg_no)) else $sql_group = ""; +$sv = isset($sv) ? get_search_string($sv) : ''; + if ($st == 'all') { $sql_search = "and (fo_name like '%{$sv}%' or fo_content like '%{$sv}%')"; } else if ($st == 'name') { @@ -61,10 +63,13 @@ for($k=0;$res = sql_fetch_array($qry);$k++) $list_text[$k]['fo_name'] = cut_str($res['fo_name'],20); } -$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) ); ?> \ No newline at end of file From 47bee3d294929505bb0ef23003aabd52ab10f664 Mon Sep 17 00:00:00 2001 From: thisgun Date: Mon, 16 Sep 2019 11:15:18 +0900 Subject: [PATCH 13/23] =?UTF-8?q?=ED=83=88=ED=87=B4=ED=95=9C=20=ED=9A=8C?= =?UTF-8?q?=EC=9B=90=EC=9D=B4=20=EB=B9=84=EB=B0=80=EB=B2=88=ED=98=B8?= =?UTF-8?q?=EB=A5=BC=20=EC=B0=BE=EA=B8=B0=20=ED=95=A0=EC=88=98=20=EC=9E=88?= =?UTF-8?q?=EB=8A=94=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/password_lost2.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bbs/password_lost2.php b/bbs/password_lost2.php index fade9a22f..9e7bfd437 100644 --- a/bbs/password_lost2.php +++ b/bbs/password_lost2.php @@ -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('관리자 아이디는 접근 불가합니다.'); From d72a3b5a73f097511f24941a2ec6dac42338ff29 Mon Sep 17 00:00:00 2001 From: thisgun Date: Mon, 16 Sep 2019 11:39:25 +0900 Subject: [PATCH 14/23] =?UTF-8?q?=EB=B2=84=EC=A0=84=205.3.3.3=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.php b/config.php index 51854fc9e..c228aa5d1 100644 --- a/config.php +++ b/config.php @@ -5,7 +5,7 @@ ********************/ define('G5_VERSION', '그누보드5'); -define('G5_GNUBOARD_VER', '5.3.3.2'); +define('G5_GNUBOARD_VER', '5.3.3.3'); // 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음 define('_GNUBOARD_', true); From 9a68f86230959cdc324f8040f808a96b79f054d3 Mon Sep 17 00:00:00 2001 From: thisgun Date: Tue, 17 Sep 2019 19:08:26 +0900 Subject: [PATCH 15/23] =?UTF-8?q?=EA=B2=8C=EC=8B=9C=EA=B8=80=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=EC=8B=9C=20=EA=B8=80=20=EC=A0=9C=EB=AA=A9=EC=9D=84=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=ED=96=88=EC=9D=84=EB=95=8C=20=EB=82=98?= =?UTF-8?q?=ED=83=80=EB=82=98=EB=8A=94=20=EC=98=A4=EB=A5=98=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/write_update.php | 3 +++ lib/common.lib.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bbs/write_update.php b/bbs/write_update.php index dcfd59dba..cf7d0299b 100644 --- a/bbs/write_update.php +++ b/bbs/write_update.php @@ -424,6 +424,9 @@ if ($w == '' || $w == 'r') { $bo_notice = board_notice($board['bo_notice'], $wr_id, $notice); sql_query(" update {$g5['board_table']} set bo_notice = '{$bo_notice}' where bo_table = '{$bo_table}' "); + + // 글을 수정한 경우에는 제목이 달라질수도 있으니 static variable 를 새로고침합니다. + $write = get_write( $write_table, $wr['wr_id'], false); } // 게시판그룹접근사용을 하지 않아야 하고 비회원 글읽기가 가능해야 하며 비밀글이 아니어야 합니다. diff --git a/lib/common.lib.php b/lib/common.lib.php index bf4ea5be4..eeeb05ec7 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -707,7 +707,7 @@ function get_write($write_table, $wr_id, $is_cache=false) $write = $g5_object->get('bbs', $wr_id, $wr_bo_table); - if( !$write ){ + if( !$write || $is_cache == false ){ $sql = " select * from {$write_table} where wr_id = '{$wr_id}' "; $write = sql_fetch($sql); From 0bc4ca7b4780116c0f7a4586c494907f505b90dc Mon Sep 17 00:00:00 2001 From: thisgun Date: Wed, 18 Sep 2019 15:50:59 +0900 Subject: [PATCH 16/23] =?UTF-8?q?=EC=9D=BC=EB=B6=80=20=ED=9B=84=ED=82=B9?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/good.php | 6 +++++- head.sub.php | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bbs/good.php b/bbs/good.php index 2c4d2365f..8a8ae1a74 100644 --- a/bbs/good.php +++ b/bbs/good.php @@ -1,10 +1,12 @@ \ No newline at end of file diff --git a/head.sub.php b/head.sub.php index e1e0cf9a9..9ff601018 100644 --- a/head.sub.php +++ b/head.sub.php @@ -2,6 +2,8 @@ // 이 파일은 새로운 파일 생성시 반드시 포함되어야 함 if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 +run_event('head_sub'); + // 테마 head.sub.php 파일 if(!defined('G5_IS_ADMIN') && defined('G5_THEME_PATH') && is_file(G5_THEME_PATH.'/head.sub.php')) { require_once(G5_THEME_PATH.'/head.sub.php'); From 91df653dfb9807ebadf4fc16f7a97a8acd820255 Mon Sep 17 00:00:00 2001 From: thisgun Date: Fri, 20 Sep 2019 11:03:48 +0900 Subject: [PATCH 17/23] =?UTF-8?q?hook=20=EC=BD=94=EB=93=9C=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/_common.php | 2 ++ adm/cache_file_delete.php | 7 +++++++ head.sub.php | 21 +++++++++++---------- theme/basic/head.sub.php | 19 ++++++++++--------- 4 files changed, 30 insertions(+), 19 deletions(-) diff --git a/adm/_common.php b/adm/_common.php index 074ed3b51..316c629c3 100644 --- a/adm/_common.php +++ b/adm/_common.php @@ -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'); ?> \ No newline at end of file diff --git a/adm/cache_file_delete.php b/adm/cache_file_delete.php index 91435809d..544fad52b 100644 --- a/adm/cache_file_delete.php +++ b/adm/cache_file_delete.php @@ -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 '
              '.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 '
            • 완료됨
            '.PHP_EOL; echo '

            최신글 캐시파일 '.$cnt.'건 삭제 완료됐습니다.
            프로그램의 실행을 끝마치셔도 좋습니다.

            '.PHP_EOL; ?> diff --git a/head.sub.php b/head.sub.php index 9ff601018..32a3d0ccc 100644 --- a/head.sub.php +++ b/head.sub.php @@ -60,9 +60,9 @@ if($config['cf_add_meta']) '.PHP_EOL; + echo ''.PHP_EOL; } else { - echo ''.PHP_EOL; + echo ''.PHP_EOL; } ?> @@ -65,16 +65,17 @@ var g5_sca = ""; var g5_editor = ""; var g5_cookie_domain = ""; - - - - - - - ', 1); +add_javascript('', 1); +add_javascript('', 1); +add_javascript('', 1); +add_javascript('', 1); +add_javascript('', 1); +add_stylesheet('', 1); + if(G5_IS_MOBILE) { - echo ''.PHP_EOL; // overflow scroll 감지 + add_javascript('', 2); // overflow scroll 감지 } if(!defined('G5_IS_ADMIN')) echo $config['cf_add_script']; From 6157fe8b3bb6b8f1a4d80ff870945d434e8ec8d4 Mon Sep 17 00:00:00 2001 From: thisgun Date: Mon, 30 Sep 2019 11:01:24 +0900 Subject: [PATCH 18/23] =?UTF-8?q?hook=20=EA=B5=AC=EB=AC=B8=EC=9D=84=20?= =?UTF-8?q?=EB=8D=94=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/member_form.php | 5 ++++- bbs/login_check.php | 6 +++++- bbs/password_lost2.php | 2 ++ bbs/password_lost_certify.php | 7 ++++++- bbs/register_form.php | 5 +++++ lib/outlogin.lib.php | 5 +++-- mobile/skin/member/basic/login.skin.php | 7 +++++-- skin/member/basic/login.skin.php | 7 +++++-- skin/outlogin/basic/outlogin.skin.1.php | 20 +++++++++++-------- .../mobile/skin/member/basic/login.skin.php | 7 +++++-- theme/basic/skin/member/basic/login.skin.php | 7 +++++-- .../skin/outlogin/basic/outlogin.skin.1.php | 20 +++++++++++-------- 12 files changed, 69 insertions(+), 29 deletions(-) diff --git a/adm/member_form.php b/adm/member_form.php index 696584c37..2b95e6581 100644 --- a/adm/member_form.php +++ b/adm/member_form.php @@ -441,6 +441,8 @@ this.form.mb_intercept_date.value=this.form.mb_intercept_date.defaultValue; }"> @@ -476,7 +478,8 @@ function fmember_submit(f) return true; } - diff --git a/bbs/login_check.php b/bbs/login_check.php index 614732d32..983b25020 100644 --- a/bbs/login_check.php +++ b/bbs/login_check.php @@ -54,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'); // 회원아이디 세션 생성 @@ -103,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"; @@ -121,7 +125,7 @@ if(function_exists('social_login_success_after')){ social_login_session_clear(1); } -run_event('member_login_check', $mb, $link); +run_event('member_login_check', $mb, $link, $is_social_login); goto_url($link); ?> diff --git a/bbs/password_lost2.php b/bbs/password_lost2.php index 9e7bfd437..96f57c7f9 100644 --- a/bbs/password_lost2.php +++ b/bbs/password_lost2.php @@ -71,5 +71,7 @@ $content .= '
    '; 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메일을 확인하여 주십시오.'); ?> diff --git a/bbs/password_lost_certify.php b/bbs/password_lost_certify.php index 71c0116b1..b71cfc5d7 100644 --- a/bbs/password_lost_certify.php +++ b/bbs/password_lost_certify.php @@ -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 { diff --git a/bbs/register_form.php b/bbs/register_form.php index 97216aba6..2d38f0d1b 100644 --- a/bbs/register_form.php +++ b/bbs/register_form.php @@ -3,6 +3,8 @@ include_once('./_common.php'); include_once(G5_CAPTCHA_PATH.'/captcha.lib.php'); include_once(G5_LIB_PATH.'/register.lib.php'); +run_event('register_form_before'); + // 불법접근을 막도록 토큰생성 $token = md5(uniqid(rand(), true)); set_session("ss_token", $token); @@ -139,5 +141,8 @@ if ($config['cf_use_addr']) add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js include_once($member_skin_path.'/register_form.skin.php'); + +run_event('register_form_after', $w, $agree, $agree2); + include_once('./_tail.php'); ?> \ No newline at end of file diff --git a/lib/outlogin.lib.php b/lib/outlogin.lib.php index bd032cffc..73aa028b3 100644 --- a/lib/outlogin.lib.php +++ b/lib/outlogin.lib.php @@ -5,6 +5,8 @@ if (!defined('_GNUBOARD_')) exit; function outlogin($skin_dir='basic') { global $config, $member, $g5, $urlencode, $is_admin, $is_member; + + $is_auth = false; if (array_key_exists('mb_nick', $member)) { $nick = get_text(cut_str($member['mb_nick'], $config['cf_cut_name'])); @@ -43,7 +45,6 @@ function outlogin($skin_dir='basic') } $mb_scrap_cnt = isset($member['mb_scrap_cnt']) ? (int) $member['mb_scrap_cnt'] : ''; - $is_auth = false; $sql = " select count(*) as cnt from {$g5['auth_table']} where mb_id = '{$member['mb_id']}' "; $row = sql_fetch($sql); if ($row['cnt']) @@ -61,6 +62,6 @@ function outlogin($skin_dir='basic') $content = ob_get_contents(); ob_end_clean(); - return $content; + return run_replace('outlogin_content', $content, $is_auth, $outlogin_url, $outlogin_action_url); } ?> \ No newline at end of file diff --git a/mobile/skin/member/basic/login.skin.php b/mobile/skin/member/basic/login.skin.php index 6d44e6a92..7efdb31f4 100644 --- a/mobile/skin/member/basic/login.skin.php +++ b/mobile/skin/member/basic/login.skin.php @@ -40,7 +40,7 @@ add_stylesheet('', diff --git a/skin/member/basic/login.skin.php b/skin/member/basic/login.skin.php index 4610959d4..f8d368697 100644 --- a/skin/member/basic/login.skin.php +++ b/skin/member/basic/login.skin.php @@ -40,7 +40,7 @@ add_stylesheet('', diff --git a/skin/outlogin/basic/outlogin.skin.1.php b/skin/outlogin/basic/outlogin.skin.1.php index cabfbaccc..5735d3326 100644 --- a/skin/outlogin/basic/outlogin.skin.1.php +++ b/skin/outlogin/basic/outlogin.skin.1.php @@ -40,14 +40,15 @@ add_stylesheet('' diff --git a/theme/basic/mobile/skin/member/basic/login.skin.php b/theme/basic/mobile/skin/member/basic/login.skin.php index 6d44e6a92..7efdb31f4 100644 --- a/theme/basic/mobile/skin/member/basic/login.skin.php +++ b/theme/basic/mobile/skin/member/basic/login.skin.php @@ -40,7 +40,7 @@ add_stylesheet('', diff --git a/theme/basic/skin/member/basic/login.skin.php b/theme/basic/skin/member/basic/login.skin.php index 4610959d4..f8d368697 100644 --- a/theme/basic/skin/member/basic/login.skin.php +++ b/theme/basic/skin/member/basic/login.skin.php @@ -40,7 +40,7 @@ add_stylesheet('', diff --git a/theme/basic/skin/outlogin/basic/outlogin.skin.1.php b/theme/basic/skin/outlogin/basic/outlogin.skin.1.php index cabfbaccc..5735d3326 100644 --- a/theme/basic/skin/outlogin/basic/outlogin.skin.1.php +++ b/theme/basic/skin/outlogin/basic/outlogin.skin.1.php @@ -40,14 +40,15 @@ add_stylesheet('' From 5b25e110c412171a33ddf63163c5066b97ad8a17 Mon Sep 17 00:00:00 2001 From: thisgun Date: Mon, 30 Sep 2019 15:52:19 +0900 Subject: [PATCH 19/23] =?UTF-8?q?=EC=9D=BC=EB=B6=80=20=ED=9B=85=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/admin.lib.php | 36 ++++++++++++++++++++++++++++++++++++ adm/view.php | 20 ++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 adm/view.php diff --git a/adm/admin.lib.php b/adm/admin.lib.php index 91524913d..31f765e45 100644 --- a/adm/admin.lib.php +++ b/adm/admin.lib.php @@ -486,6 +486,37 @@ 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']) { @@ -541,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; diff --git a/adm/view.php b/adm/view.php new file mode 100644 index 000000000..717a7888f --- /dev/null +++ b/adm/view.php @@ -0,0 +1,20 @@ + \ No newline at end of file From 2fe40edfc5ccec83e8fe68a95a17240e38aa2091 Mon Sep 17 00:00:00 2001 From: thisgun Date: Mon, 30 Sep 2019 17:35:36 +0900 Subject: [PATCH 20/23] =?UTF-8?q?=EC=84=A4=EC=B9=98=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=20=EC=BD=94=EB=93=9C=EC=A4=91=20=EB=AC=B8=EC=9E=90=EC=97=B4?= =?UTF-8?q?=EC=9D=84=20=EC=83=81=EC=88=98=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install/install_db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/install_db.php b/install/install_db.php index 71e21fa95..21b70baa6 100644 --- a/install/install_db.php +++ b/install/install_db.php @@ -282,7 +282,7 @@ for ($i=0; $i Date: Tue, 1 Oct 2019 12:03:09 +0900 Subject: [PATCH 21/23] =?UTF-8?q?=EC=9D=BC=EB=B6=80=20css=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mobile/skin/latest/basic/style.css | 4 +++- skin/board/basic/style.css | 2 ++ skin/board/gallery/style.css | 2 ++ theme/basic/mobile/skin/latest/basic/style.css | 4 +++- theme/basic/skin/board/basic/style.css | 2 ++ theme/basic/skin/board/gallery/style.css | 2 ++ 6 files changed, 14 insertions(+), 2 deletions(-) diff --git a/mobile/skin/latest/basic/style.css b/mobile/skin/latest/basic/style.css index 9f7247806..bfd2320f4 100644 --- a/mobile/skin/latest/basic/style.css +++ b/mobile/skin/latest/basic/style.css @@ -7,7 +7,7 @@ .lt ul li {padding:15px 0;border-bottom:1px solid #e5ecee} .lt ul li:last-child {border-bottom:0} .lt ul li:after {display:block;visibility:hidden;clear:both;content:""} -.lt ul li:hover a {color:#3a8afd} +.lt ul li:hover a.lt_tit {color:#3a8afd} .lt .lt_thumb {display:inline-block;float:left;margin-right:10px} .lt .lt_thumb img {width:138px;height:auto;overflow:hidden} .lt .lt_tit {display:block;font-size:1.2em;font-weight:bold;max-height:60px;overflow:hidden;padding-bottom:10px} @@ -30,6 +30,8 @@ .lt .comment_icon {background:url('./img/icon_comment.png') no-repeat 50% 50%;display:inline-block;width:20px;height:28px;text-indent:-999px;overflow:hidden;vertical-align:top;background-size:70%;margin:0 0px 0 5px} .lt .empty_li {text-align:center;padding:40px 0;color:#777} +.lt .owl-carousel .owl-item .profile_img img{width:auto} + .lt_page {background:#fff;text-align:center;padding:10px 15px;line-height:25px;border-bottom:1px solid #e5ecee} .lt_page button {display:inline-block;background:#fff;width:25px;height:25px;border:1px solid #dbdee6;text-align:center;color:#cdcdce} .lt_page span {color:#6e6e6e} diff --git a/skin/board/basic/style.css b/skin/board/basic/style.css index 72223bca8..c374ddab1 100644 --- a/skin/board/basic/style.css +++ b/skin/board/basic/style.css @@ -122,6 +122,8 @@ box-shadow:inset 0 2px 5px rgb(33, 135, 202)} .chk_box input[type="checkbox"] + label {position:relative;color:#676e70} .chk_box input[type="checkbox"] + label:hover {color:#2172f8} .chk_box input[type="checkbox"] + label span {float:left;width:15px;height:15px;display:block;background:#fff;border:1px solid #d0d4df;border-radius:3px} +.write_div .chk_box input[type="checkbox"] + label, .bo_vc_w .chk_box input[type="checkbox"] + label {padding-left:20px} +.write_div .chk_box input[type="checkbox"] + label span, .bo_vc_w .chk_box input[type="checkbox"] + label span {position:absolute;top:2px;left:0;width:15px;height:15px;display:block;margin:0;background:#fff;border:1px solid #d0d4df;border-radius:3px} .chk_box input[type="checkbox"]:checked + label {color:#000} .chk_box input[type="checkbox"]:checked + label span {background:url(./img/chk.png) no-repeat 50% 50% #3a8afd;border-color:#1471f6;border-radius:3px} diff --git a/skin/board/gallery/style.css b/skin/board/gallery/style.css index 85d515bb4..f36a5a26e 100644 --- a/skin/board/gallery/style.css +++ b/skin/board/gallery/style.css @@ -91,6 +91,8 @@ box-shadow:inset 0 2px 5px rgb(33, 135, 202)} .chk_box input[type="checkbox"] + label {position:relative;padding-left:20px;color:#676e70;vertical-align:baseline} .chk_box input[type="checkbox"] + label:hover{color:#2172f8} .chk_box input[type="checkbox"] + label span {position:absolute;top:10px;left:10px;width:15px;height:15px;display:block;background:#fff;border:1px solid #d0d4df;border-radius:3px} +.write_div .chk_box input[type="checkbox"] + label, .bo_vc_w .chk_box input[type="checkbox"] + label {padding-left:20px} +.write_div .chk_box input[type="checkbox"] + label span, .bo_vc_w .chk_box input[type="checkbox"] + label span {position:absolute;top:2px;left:0;width:15px;height:15px;display:block;margin:0;background:#fff;border:1px solid #d0d4df;border-radius:3px} .chk_box input[type="checkbox"]:checked + label {color:#000} .chk_box input[type="checkbox"]:checked + label span {background:url(./img/chk.png) no-repeat 50% 50% #3a8afd;border-color:#1471f6;border-radius:3px} .all_chk.chk_box input[type="checkbox"] + label span {top:0;left:0} diff --git a/theme/basic/mobile/skin/latest/basic/style.css b/theme/basic/mobile/skin/latest/basic/style.css index 9f7247806..bfd2320f4 100644 --- a/theme/basic/mobile/skin/latest/basic/style.css +++ b/theme/basic/mobile/skin/latest/basic/style.css @@ -7,7 +7,7 @@ .lt ul li {padding:15px 0;border-bottom:1px solid #e5ecee} .lt ul li:last-child {border-bottom:0} .lt ul li:after {display:block;visibility:hidden;clear:both;content:""} -.lt ul li:hover a {color:#3a8afd} +.lt ul li:hover a.lt_tit {color:#3a8afd} .lt .lt_thumb {display:inline-block;float:left;margin-right:10px} .lt .lt_thumb img {width:138px;height:auto;overflow:hidden} .lt .lt_tit {display:block;font-size:1.2em;font-weight:bold;max-height:60px;overflow:hidden;padding-bottom:10px} @@ -30,6 +30,8 @@ .lt .comment_icon {background:url('./img/icon_comment.png') no-repeat 50% 50%;display:inline-block;width:20px;height:28px;text-indent:-999px;overflow:hidden;vertical-align:top;background-size:70%;margin:0 0px 0 5px} .lt .empty_li {text-align:center;padding:40px 0;color:#777} +.lt .owl-carousel .owl-item .profile_img img{width:auto} + .lt_page {background:#fff;text-align:center;padding:10px 15px;line-height:25px;border-bottom:1px solid #e5ecee} .lt_page button {display:inline-block;background:#fff;width:25px;height:25px;border:1px solid #dbdee6;text-align:center;color:#cdcdce} .lt_page span {color:#6e6e6e} diff --git a/theme/basic/skin/board/basic/style.css b/theme/basic/skin/board/basic/style.css index 72223bca8..c374ddab1 100644 --- a/theme/basic/skin/board/basic/style.css +++ b/theme/basic/skin/board/basic/style.css @@ -122,6 +122,8 @@ box-shadow:inset 0 2px 5px rgb(33, 135, 202)} .chk_box input[type="checkbox"] + label {position:relative;color:#676e70} .chk_box input[type="checkbox"] + label:hover {color:#2172f8} .chk_box input[type="checkbox"] + label span {float:left;width:15px;height:15px;display:block;background:#fff;border:1px solid #d0d4df;border-radius:3px} +.write_div .chk_box input[type="checkbox"] + label, .bo_vc_w .chk_box input[type="checkbox"] + label {padding-left:20px} +.write_div .chk_box input[type="checkbox"] + label span, .bo_vc_w .chk_box input[type="checkbox"] + label span {position:absolute;top:2px;left:0;width:15px;height:15px;display:block;margin:0;background:#fff;border:1px solid #d0d4df;border-radius:3px} .chk_box input[type="checkbox"]:checked + label {color:#000} .chk_box input[type="checkbox"]:checked + label span {background:url(./img/chk.png) no-repeat 50% 50% #3a8afd;border-color:#1471f6;border-radius:3px} diff --git a/theme/basic/skin/board/gallery/style.css b/theme/basic/skin/board/gallery/style.css index 85d515bb4..f36a5a26e 100644 --- a/theme/basic/skin/board/gallery/style.css +++ b/theme/basic/skin/board/gallery/style.css @@ -91,6 +91,8 @@ box-shadow:inset 0 2px 5px rgb(33, 135, 202)} .chk_box input[type="checkbox"] + label {position:relative;padding-left:20px;color:#676e70;vertical-align:baseline} .chk_box input[type="checkbox"] + label:hover{color:#2172f8} .chk_box input[type="checkbox"] + label span {position:absolute;top:10px;left:10px;width:15px;height:15px;display:block;background:#fff;border:1px solid #d0d4df;border-radius:3px} +.write_div .chk_box input[type="checkbox"] + label, .bo_vc_w .chk_box input[type="checkbox"] + label {padding-left:20px} +.write_div .chk_box input[type="checkbox"] + label span, .bo_vc_w .chk_box input[type="checkbox"] + label span {position:absolute;top:2px;left:0;width:15px;height:15px;display:block;margin:0;background:#fff;border:1px solid #d0d4df;border-radius:3px} .chk_box input[type="checkbox"]:checked + label {color:#000} .chk_box input[type="checkbox"]:checked + label span {background:url(./img/chk.png) no-repeat 50% 50% #3a8afd;border-color:#1471f6;border-radius:3px} .all_chk.chk_box input[type="checkbox"] + label span {top:0;left:0} From 3979ac6dbb86a8f43160fc41889aca3505be92b8 Mon Sep 17 00:00:00 2001 From: thisgun Date: Tue, 1 Oct 2019 16:04:37 +0900 Subject: [PATCH 22/23] =?UTF-8?q?=EA=B2=8C=EC=8B=9C=ED=8C=90=20order=20by?= =?UTF-8?q?=20=EC=A7=80=EC=A0=95=EC=8B=9C=20=EC=98=A4=EB=A5=98=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/board_form.php | 36 +++++++++++++++++------------------- bbs/list.php | 13 +++++++++---- lib/get_data.lib.php | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 23 deletions(-) diff --git a/adm/board_form.php b/adm/board_form.php index 3614116b1..272a25a09 100644 --- a/adm/board_form.php +++ b/adm/board_form.php @@ -1114,25 +1114,23 @@ $pg_anchor = '
      diff --git a/bbs/list.php b/bbs/list.php index 06bebb9dc..58961c364 100644 --- a/bbs/list.php +++ b/bbs/list.php @@ -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) diff --git a/lib/get_data.lib.php b/lib/get_data.lib.php index eb1c934a1..daf65e7f4 100644 --- a/lib/get_data.lib.php +++ b/lib/get_data.lib.php @@ -351,6 +351,42 @@ function get_bo_table_banned_word(){ return run_replace('get_bo_table_banned_word', $folders); } +function get_board_sort_fields($board=array(), $make_key_return=''){ + $bo_sort_fields = run_replace('get_board_sort_fields', array( + array('wr_num, wr_reply', '기본'), + array('wr_datetime asc', '날짜 이전것 부터'), + array('wr_datetime desc', '날짜 최근것 부터'), + array('wr_hit asc, wr_num, wr_reply', '조회수 낮은것 부터'), + array('wr_hit desc, wr_num, wr_reply', '조회수 높은것 부터'), + array('wr_last asc', '최근글 이전것 부터'), + array('wr_last desc', '최근글 최근것 부터'), + array('wr_comment asc, wr_num, wr_reply', '댓글수 낮은것 부터'), + array('wr_comment desc, wr_num, wr_reply', '댓글수 높은것 부터'), + array('wr_good asc, wr_num, wr_reply', '추천수 낮은것 부터'), + array('wr_good desc, wr_num, wr_reply', '추천수 높은것 부터'), + array('wr_nogood asc, wr_num, wr_reply', '비추천수 낮은것 부터'), + array('wr_nogood desc, wr_num, wr_reply', '비추천수 높은것 부터'), + array('wr_subject asc, wr_num, wr_reply', '제목 오름차순'), + array('wr_subject desc, wr_num, wr_reply', '제목 내림차순'), + array('wr_name asc, wr_num, wr_reply', '글쓴이 오름차순'), + array('wr_name desc, wr_num, wr_reply', '글쓴이 내림차순'), + array('ca_name asc, wr_num, wr_reply', '분류명 오름차순'), + array('ca_name desc, wr_num, wr_reply', '분류명 내림차순'), + ), $board, $make_key_return); + + if( $make_key_return ){ + + $returns = array(); + foreach( $bo_sort_fields as $v ){ + $key = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\/\^\*\s]/", "", $v[0]); + $returns[$key] = $v[0]; + } + + return $returns; + } + return $bo_sort_fields; +} + function get_board_sfl_select_options($sfl){ global $is_admin; From 355ddc5c57d2afd44bc01a4442227c36414444ed Mon Sep 17 00:00:00 2001 From: thisgun Date: Tue, 1 Oct 2019 16:16:04 +0900 Subject: [PATCH 23/23] =?UTF-8?q?5.4.0.2=20=EB=B2=84=EC=A0=84=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.php b/config.php index 2f2af33d8..f259b78a4 100644 --- a/config.php +++ b/config.php @@ -5,7 +5,7 @@ ********************/ define('G5_VERSION', '그누보드5'); -define('G5_GNUBOARD_VER', '5.4.0.1'); +define('G5_GNUBOARD_VER', '5.4.0.2'); // 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음 define('_GNUBOARD_', true);