Compare commits

...
109 Commits
Author SHA1 Message Date
thisgun 8c9490b4c9 Merge branch 'master' of github.com:gnuboard/g5 2020-01-31 13:40:20 +09:00
thisgun 37023e8ef0 버전 5.4.1.6 수정 2020-01-31 13:34:45 +09:00
thisgun 025710fbd1 크롬 브라우저 80버전 samesite 이슈 대응 코드 2020-01-31 13:32:58 +09:00
thisgun e6eab2d040 [KVE-2019-1517] 그누보드 5_Cross Site Scripting(XSS) 취약점 수정 2020-01-23 10:58:18 +09:00
thisgun 2ad151c0dd 짧은 URL 변환 체크코드 및 스킨 내 코드 오타 수정 2020-01-23 10:57:07 +09:00
thisgun 4c17f79783 5.4 버전 쪽지보내기 스킨 오타 수정 2020-01-14 16:47:06 +09:00
thisgun e329192586 관리자 토큰생성시 button submit 추가 2020-01-14 16:40:58 +09:00
thisgun f96c3558e8 5.4 버전에서 잘못되거나 누락된 코드 수정 2020-01-13 16:31:53 +09:00
thisgun f2a1af5f46 Merge branch 'master' of github.com:gnuboard/g5 2020-01-07 16:34:04 +09:00
thisgun aec86e4360 버전 5.4.1.4 수정 2020-01-07 14:47:58 +09:00
thisgun 6a934c7a36 5.4 버전 모바일 게시판 스킨 내 오타 수정 2020-01-07 14:37:19 +09:00
thisgun ccfe419bbd 54버전 잘못된 hook 이벤트 수정 2020-01-07 14:34:50 +09:00
thisgun 4b0969d244 Merge branch 'master' of github.com:gnuboard/g5 2019-12-27 16:05:56 +09:00
thisgun a5e5531471 php 문법 each deprecated 에 대한 코드 수정 2019-12-27 16:05:04 +09:00
thisgun 5a3c2b628d 잘못된 오타 수정 2019-12-27 09:54:41 +09:00
thisgun b5152b62e8 Merge branch 'master' of github.com:gnuboard/g5 2019-12-23 10:12:10 +09:00
thisgun de59f07a66 버전 5.4.1.3 수정 2019-12-23 10:02:59 +09:00
thisgun 32e024f52e css js 버전 코드 수정 2019-12-23 10:01:29 +09:00
thisgun ffc43056b4 관리자 디비업그레이드시 체크 과정 추가 2019-12-23 09:59:05 +09:00
thisgun 6016db4a95 [KVE-2019-1508]XSS 취약점 수정 2019-12-20 11:18:16 +09:00
thisgun 30f6f09372 theme 설정 hook 이벤트 추가 2019-12-20 11:17:17 +09:00
thisgun d10a1667c7 html_process 변수에 method가 존재하는지 체크과정 추가 2019-12-18 19:55:34 +09:00
thisgun d560892a80 kcaptcha 페이지 오타 수정 2019-12-17 17:15:47 +09:00
thisgun 4e11c1fc1f iframe 허용 조건에 www.google.com 추가 2019-12-16 16:30:25 +09:00
thisgun 54c69dcf35 회원 사이드 뷰 사용시 최신글에서 사용되는 코드 수정 2019-12-10 17:04:28 +09:00
thisgun 7ccf17b479 Merge branch 'master' of github.com:gnuboard/g5 2019-12-09 14:59:18 +09:00
thisgun 0e2dbb6145 버전 5.4.1.2 수정 2019-12-09 14:53:43 +09:00
thisgun 83b85b5d66 회원 쪽지 페이징 코드 css 및 스킨코드 수정 2019-12-09 14:52:25 +09:00
thisgun f68ba794ec 그룹 링크에 잘못된 짧은 주소가 적용된 오류 수정 2019-12-09 14:42:05 +09:00
thisgun 76c1bde119 hook 이벤트 추가 및 php 7.2 버전에 일어나는 최신글 count 오류 수정 2019-12-04 19:55:17 +09:00
thisgun 312fc5daf3 Merge branch 'master' of github.com:gnuboard/g5 2019-12-02 17:01:34 +09:00
thisgun 080370323a 5.4.1.1 버전 수정 2019-12-02 16:34:45 +09:00
thisgun c419e2751f short_url_clean 함수에서 빠진 run_replace 코드 적용 2019-12-02 16:32:57 +09:00
thisgun 6977e9d4b5 내용관리 모바일 이미지 리사이즈css 적용 2019-12-02 16:11:36 +09:00
thisgun e3ed8a1af3 Merge branch 'master' of github.com:gnuboard/g5 2019-12-02 11:11:03 +09:00
thisgun 22aad37bfb 5.4 버전 내용 적용 2019-12-02 10:22:12 +09:00
thisgun f230dc3522 Merge branch 'master' of github.com:gnuboard/g5 2019-10-31 12:18:19 +09:00
thisgun b60daff8f0 특정환경에서 chroot 경로를 치환하지 못하는 오류 수정 2019-10-31 12:17:41 +09:00
thisgun 2fe40edfc5 설치 파일 코드중 문자열을 상수로 수정 2019-09-30 17:35:36 +09:00
thisgun 58878593dc Merge branch 'master' of github.com:gnuboard/g5 2019-09-16 16:04:23 +09:00
thisgun d72a3b5a73 버전 5.3.3.3 수정 2019-09-16 11:39:25 +09:00
thisgun 47bee3d294 탈퇴한 회원이 비밀번호를 찾기 할수 있는 오류 수정 2019-09-16 11:15:18 +09:00
thisgun 8182cac90d XSS 취약점 수정 2019-09-16 10:36:10 +09:00
thisgun b4604fca67 [KVE-2019-1318] SQL Injection 취약점 수정 2019-09-09 12:27:14 +09:00
thisgun 7ad199ccd5 소셜 로그인 가입시 닉네임 중복 체크 코드 수정 2019-09-09 11:30:44 +09:00
thisgun f0e176033f 카카오 링크 v2 버전 코드 수정 2019-09-06 17:48:35 +09:00
thisgun d33753014c [KVE-2019-1162]임의 명령어 실행 취약점 수정 2019-09-06 12:28:27 +09:00
thisgun 3c55c4d60d 그누보드 Stored XSS 취약점(KVE-2019-1198) 수정 2019-08-29 14:44:47 +09:00
thisgun c2922aaa13 그누보드 XSS 취약점(KVE-2019-1235,1236,1238) 2019-08-29 12:23:29 +09:00
thisgun 120d42c431 카카오 소셜 로그인 설정 표시문 수정 2019-08-26 18:03:57 +09:00
thisgun 863f6011ac Merge branch 'master' of github.com:gnuboard/g5 2019-08-12 10:37:25 +09:00
thisgun 067bcd2046 버전 5.3.3.2 수정 2019-08-12 10:22:09 +09:00
thisgun a1633aec96 잘못된 php 코드 수정 2019-07-29 11:42:07 +09:00
thisgun f675c38441 관리자 회원메일발송 페이지 xss 취약점 수정 2019-07-19 19:58:12 +09:00
thisgun cee88a0f6f Merge branch 'master' of github.com:gnuboard/g5 2019-07-15 18:40:40 +09:00
thisgun cbde9c91d7 버전 5.3.3.1 으로 변경 2019-07-15 18:19:15 +09:00
thisgun c17fef6778 파이어폭스 68 버전에서 스마트에디터 오류 나는 부분을 예외처리 2019-07-15 18:18:24 +09:00
thisgun 73478d5961 KVE-2019-1142 LFI & Command Injection 취약점 수정 2019-07-09 14:11:48 +09:00
thisgun 846285549a 새글 삭제시 공지글이 풀리는 오류 수정 2019-07-08 16:05:14 +09:00
thisgun 27b1a5d8f8 Merge branch 'master' of github.com:gnuboard/g5 2019-06-18 17:57:28 +09:00
thisgun 2199ffd44d 5.3.3 버전으로 수정 2019-06-18 17:55:43 +09:00
thisgun 86fb983eac 글 복사 이동시 첨부파일 권한 변경 코드 수정 2019-06-18 17:20:41 +09:00
thisgun 7d494115b3 Merge branch 'master' of github.com:gnuboard/g5 2019-06-14 09:44:03 +09:00
thisgun 17238808b5 잘못된 코드 수정 2019-06-13 16:33:02 +09:00
thisgun a6d851e174 KVE-2019-1045 그누보드 XSS, RCE 취약점 수정 2019-06-13 14:55:25 +09:00
thisgun a1dbe22063 KVE-0994,0995,1014 취약점 수정 2019-06-12 17:14:23 +09:00
thisgun e6a3270936 XSS 취약점 수정 2019-06-12 15:28:41 +09:00
thisgun 0954beced9 Merge branch 'master' of github.com:gnuboard/g5 2019-05-30 11:01:48 +09:00
thisgun 9e14e803e5 5.3.2.9.1 버전 수정 2019-05-30 11:01:04 +09:00
thisgun 250c9fc660 잘못된 패치 내용 수정 2019-05-30 11:00:18 +09:00
thisgun 2534921446 Merge branch 'master' of github.com:gnuboard/g5 2019-05-29 14:41:19 +09:00
thisgun 2ec7390cd6 5.3.2.9 버전 수정 2019-05-29 12:07:34 +09:00
thisgun 630e39de16 KVE-2019-0789, 0821, 0860 취약점 수정 2019-05-29 12:01:25 +09:00
thisgun b1ac49a738 취약점 수정 Some security vulnerabilities #43 2019-05-29 09:58:04 +09:00
thisgun 166727879a 제보받은 작은 문제들 수정 2019-05-28 18:22:08 +09:00
thisgun 9773c13d5d KVE-2019-0724 취약점 수정 2019-05-28 11:57:58 +09:00
thisgun 764cb34957 KVE-2019-0828 그누보드 XSS 취약점 수정 2019-05-27 09:39:13 +09:00
thisgun 18d4a60e03 [KVE-2019-0688,0689,0691,0694,0708,0709,0750,0762,0791,0802,0846] 그누보드,영카트 다중 취약점 수정 2019-05-24 10:44:48 +09:00
thisgun e234b990ec PHP문법에 맞지 않는 코드 수정 2019-05-16 15:36:24 +09:00
thisgun 1655e76d04 갤러리스킨에서 빠진 코드 수정 2019-05-03 10:24:18 +09:00
thisgun 77ea93d50f 다운로드 권한이 없을시 나오는 메시지 출력 오류 수정 2019-05-03 09:59:53 +09:00
thisgun 83d7e1a586 회원정보 관리자에서 회원 추가시 아이콘 이미지가 저장 안되는 오류 수정 2019-04-12 10:53:43 +09:00
thisgun 6e89aff24f 잘못된 코드 수정 2019-04-01 11:15:51 +09:00
thisgun 32924003b9 관리자 환경설정 여분필드 style 수정 2019-03-19 12:29:24 +09:00
thisgun 831219e2c2 Merge branch 'master' of github.com:gnuboard/g5 2019-03-19 11:45:30 +09:00
thisgun e4a7c1b21d 5.3.2.8 버전으로 수정 2019-03-19 11:22:07 +09:00
thisgun 896444ce1a 게시판 복사, 이동 코드 수정 2019-03-13 09:40:47 +09:00
thisgun a844347c4c KVE-2019-0556, 0566 취약점 수정 2019-03-12 12:06:45 +09:00
thisgun a870fe3777 최신글 css 오타 수정 2019-03-08 17:37:10 +09:00
thisgun 05f1e718e1 게시물에서 페이스북 영상 전체화면이 가능하도록 수정 2019-03-07 16:20:06 +09:00
thisgun e97b91cb88 kcb 본인확인 오타 수정 2019-03-07 11:35:46 +09:00
thisgun 4227356108 [KVE-2019-0335, 0344 다중 취약점] 수정 2019-03-06 18:00:32 +09:00
thisgun ae729f1525 Merge branch 'master' of github.com:gnuboard/g5 2019-03-04 13:59:42 +09:00
thisgun 2c61975b49 5.3.2.7 버전 수정 2019-03-04 12:29:45 +09:00
thisgun eb8bcb0a24 회원 삭제시 프로필이미지도 삭제 2019-03-04 12:26:39 +09:00
thisgun 3574a09902 불필요한 코드 제거 2019-03-04 12:25:58 +09:00
thisgun 4d4064c40d Merge branch 'master' of github.com:gnuboard/g5 2019-02-14 10:32:18 +09:00
thisgun 92ded4b17a 5.3.2.6 버전 수정 2019-02-14 10:10:33 +09:00
thisgun 04f55c8b95 게시판 관리 페이지 여분필드 style 수정 2019-02-14 10:09:45 +09:00
thisgun 9c03cd85b6 취약점 보안 및 코드 개선 2019-02-14 09:59:35 +09:00
thisgun d0eb0601ad 잘못된 코드 수정 2019-02-07 16:47:54 +09:00
thisgun e8abeb47e8 Merge branch 'master' of github.com:gnuboard/g5 2019-01-28 11:18:46 +09:00
thisgun 40508b05d0 KVE-2018-2451, 2452, 2453, 2019-0208 그누보드 다중 취약점 수정 2019-01-28 11:11:49 +09:00
thisgun 31bf6e94ad KVE-2019-0001, 0002, 0042, 0050 그누보드 다중 취약점 수정 2019-01-28 10:07:29 +09:00
thisgun f1a69ff7a4 버전 5.3.2.5 수정 2019-01-18 16:57:24 +09:00
thisgun 6b67183ec5 쪽지 저장 코드 수정 2019-01-18 11:58:56 +09:00
thisgun ab5fb4815d KVE-2018-1968 취약점 수정 2019-01-18 11:34:31 +09:00
thisgun 2ce07e5ec9 잘못된 오타 코드 수정 2019-01-16 14:46:39 +09:00
thisgun 826a497e84 환경설정페이지 코드 수정 2019-01-10 20:58:58 +09:00
585 changed files with 25203 additions and 18097 deletions
+2
View File
@@ -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');
?>
+120
View File
@@ -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
View File
@@ -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
View File
@@ -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();
+38 -2
View File
@@ -477,7 +477,7 @@ function admin_check_xss_params($params){
if( is_array($value) ){
admin_check_xss_params($value);
} else if ( preg_match('/<\s?[^\>]*\/?\s?>/i', $value) && (preg_match('/script.*?\/script/ius', $value) || preg_match('/onload=.*/ius', $value)) ){
} else if ( preg_match('/<\s?[^\>]*\/?\s?>/i', $value) && (preg_match('/script.*?\/script/ius', $value) || preg_match('/[onload|onerror]=.*/ius', $value)) ){
alert('요청 쿼리에 잘못된 스크립트문장이 있습니다.\\nXSS 공격일수도 있습니다.');
die();
}
@@ -486,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')
{
@@ -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;
+13
View File
@@ -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;
+14
View File
@@ -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복사할 테이블명으로 사용할 수 없습니다.');
@@ -160,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 ";
@@ -181,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']}',
@@ -189,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
View File
@@ -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'].'&amp;'.$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"); ?>
+19 -7
View File
@@ -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']);
$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}&amp;{$qstr}");
?>
+1 -1
View File
@@ -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
View File
@@ -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($_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);
?>
+8 -7
View File
@@ -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($_POST['gr_subject'][$k]) : '';
$gr_admin = is_array($_POST['gr_admin']) ? strip_tags($_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' ");
+1 -1
View File
@@ -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
View File
@@ -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('최고관리자만 접근 가능합니다.');
+1 -1
View File
@@ -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('최고관리자만 접근 가능합니다.');
+7
View File
@@ -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;
?>
+47 -8
View File
@@ -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>
@@ -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;
}
}
}
+17
View File
@@ -28,6 +28,14 @@ $cf_social_servicelist = !empty($_POST['cf_social_servicelist']) ? implode(',',
$_POST['cf_title'] = strip_tags($_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']}',
cf_admin = '{$_POST['cf_admin']}',
@@ -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
View File
@@ -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>
+6
View File
@@ -24,6 +24,7 @@ $co_id = preg_replace('/[^a-z0-9_]/i', '', $co_id);
$co_subject = strip_tags($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
View File
@@ -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&amp;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&amp;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
View File
@@ -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}
/* 메일 테스트 */
+105
View File
@@ -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
View File
@@ -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>
+4 -4
View File
@@ -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>
+3 -3
View File
@@ -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'] ?>&amp;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'].'&amp;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>';
}
?>
+3 -1
View File
@@ -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);
@@ -44,7 +46,7 @@ include_once('./admin.head.php');
</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
View File
@@ -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($_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
View File
@@ -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
View File
@@ -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.'&amp;w=u&amp;mb_id='.$mb_id, false);
?>
+6 -2
View File
@@ -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);
?>
+2 -2
View File
@@ -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
View File
@@ -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
View File
@@ -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($_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($_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
View File
@@ -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>
+1 -1
View File
@@ -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'].'&amp;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>';
}
+7 -5
View File
@@ -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);
}
+5 -5
View File
@@ -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++) { ?>
+6
View File
@@ -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($_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));
+1
View File
@@ -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);
+8 -5
View File
@@ -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) );
?>
+1 -1
View File
@@ -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);
+3 -3
View File
@@ -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 -4
View File
@@ -11,15 +11,15 @@ $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
$sql_search = "";
if( isset($st) && !in_array($st, array('hs_name', 'hs_hp', 'bk_no')) ){
$st = '';
}
$total_res = sql_fetch("select count(*) as cnt from {$g5['sms5_history_table']} where 1 $sql_search");
$total_count = $total_res['cnt'];
+9 -5
View File
@@ -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 = "";
@@ -131,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?>&amp;st=<?php echo $st?>&amp;sv=<?php echo $sv?>&amp;wr_no=<?php echo $res['wr_no']?>&amp;wr_renum=<?php echo $res['wr_renum']?>" class="btn btn_03">수정</a>
<!-- <a href="./history_del.php?page=<?php echo $page?>&amp;st=<?php echo $st?>&amp;sv=<?php echo $sv?>&amp;wr_no=<?php echo $res[wr_no]?>&amp;wr_renum=<?php echo $res[wr_renum]?>">삭제</a> -->
<!-- <a href="./history_del.php?page=<?php echo $page?>&amp;st=<?php echo $st?>&amp;sv=<?php echo $sv?>&amp;wr_no=<?php echo $res['wr_no']?>&amp;wr_renum=<?php echo $res['wr_renum']?>">삭제</a> -->
</td>
</tr>
<?php } ?>
</tbody>
</table>
<?php } ?>
</div>
<?php } ?>
<?php
if( $write['wr_memo'] ){
+4 -3
View File
@@ -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}' ";
+1 -1
View File
@@ -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>
+2
View File
@@ -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;
+3 -3
View File
@@ -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));
+2
View File
@@ -68,5 +68,7 @@ if($_POST['set_default_skin'] == 1) {
}
}
run_event('adm_theme_update', $theme, $_POST['set_default_skin']);
die('');
?>
+28
View File
@@ -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
View File
@@ -73,7 +73,7 @@ $result = sql_query($sql);
}
$title = str_replace(array('<', '>', '&'), array("&lt;", "&gt;", "&amp;"), $referer);
$link = '<a href="'.$row['vi_referer'].'" target="_blank">';
$link = '<a href="'.get_text($row['vi_referer']).'" target="_blank">';
$link = str_replace('&', "&amp;", $link);
$link2 = '</a>';
}
+1 -1
View File
@@ -92,7 +92,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'">처음</a>'; //페이지 처
}
$title = str_replace(array("<", ">"), array("&lt;", "&gt;"), $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
View File
@@ -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),
+4 -5
View File
@@ -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('&amp;', '&', $url); ?>");
<?php } else { ?>
//alert('history.back();');
history.back();
<?php } ?>
</script>
@@ -68,7 +67,7 @@ history.back();
<?php
foreach($_POST as $key => $value) {
$key = clean_xss_tags($url);
$key = clean_xss_tags($key);
$value = clean_xss_tags($value);
if(strlen($value) < 1)
+10 -10
View File
@@ -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.'&amp;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.'&amp;url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr));
alert($msg, G5_BBS_URL.'/login.php?wr_id='.$wr_id.$qstr.'&amp;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.'&amp;url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr));
alert('글을 읽을 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?wr_id='.$wr_id.$qstr.'&amp;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.'&amp;url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr));
alert('이 게시판은 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?wr_id='.$wr_id.$qstr.'&amp;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&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr);
goto_url(G5_BBS_URL.'/password.php?w=s&amp;bo_table='.$bo_table.'&amp;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?'&amp;':'')));
alert('목록을 볼 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?'.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.($qstr?'&amp;':'')));
}
// 본인확인을 사용한다면
if ($config['cf_cert_use'] && !$is_admin) {
// 인증된 회원만 가능
if ($board['bo_use_cert'] != '' && $is_guest) {
alert('이 게시판은 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&amp;url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr));
alert('이 게시판은 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?wr_id='.$wr_id.$qstr.'&amp;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
View File
@@ -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
View File
@@ -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
View File
@@ -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.'&amp;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.'&amp;page='.$page.$qstr);
run_event('bbs_delete', $write, $board);
goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;page='.$page.$qstr));
?>
+7 -2
View File
@@ -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.'&amp;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.'&amp;page='.$page.$qstr));
?>
+5 -3
View File
@@ -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.'&amp;wr_id='.$write['wr_parent'].'&amp;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.'&amp;wr_id='.$write['wr_parent'].'&amp;page='.$page. $qstr));
?>
+14 -5
View File
@@ -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.'&amp;'.$qstr.'&amp;url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id));
alert('다운로드 권한이 없습니다.\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?wr_id='.$wr_id.'&amp;'.$qstr.'&amp;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']).'&amp;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.'&amp;'.$qstr.'&amp;url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id));
alert($alert_msg.'\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?wr_id='.$wr_id.'&amp;'.$qstr.'&amp;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');
@@ -97,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"));
+2
View File
@@ -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
View File
@@ -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.'&amp;url='.urlencode('./board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id);
$href = G5_BBS_URL.'/login.php?'.$qstr.'&amp;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.'&amp;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
View File
@@ -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."&amp;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.'&amp;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.'&amp;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('#&amp;page=[0-9]*#', '#&amp;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.'&amp;spt='.$prev_spt.'&amp;page=1';
$prev_part_href = get_pretty_url($bo_table,0,$qstr1.'&amp;spt='.$prev_spt.'&amp;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.'&amp;spt='.$next_spt.'&amp;page=1';
$next_part_href = get_pretty_url($bo_table,0,$qstr1.'&amp;spt='.$next_spt.'&amp;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
View File
@@ -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
View File
@@ -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
View File
@@ -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);
?>
+8 -3
View File
@@ -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
View File
@@ -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);
?>
+33 -6
View File
@@ -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);
}
?>
+20 -20
View File
@@ -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')
{
@@ -37,31 +40,28 @@ $sql = " select * from {$g5['memo_table']}
$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.'&amp;me_id='.$prev['me_id'];
else
//$prev_link = 'javascript:alert(\'쪽지의 처음입니다.\');';
$prev_link = '';
$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.'&amp;me_id='.$prev['me_id'];
$prev['page'] = ceil( (int)$prev['rownum'] / $config['cf_page_rows']); // 이동할 페이지 계산
if( (int)$prev['page'] > 0 ) $prev_link .= "&amp;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.'&amp;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 .= "&amp;page=".$next['page'];
} else {
$next_link = '';
}
$mb = get_member($memo['me_'.$unkind.'_mb_id']);
+1
View File
@@ -156,5 +156,6 @@ function fboardmoveall_submit(f)
</script>
<?php
run_event('move_html_footer');
include_once(G5_PATH.'/tail.sub.php');
?>
+27 -5
View File
@@ -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.'&amp;page='.$page.'&amp;'.$qstr;
$opener_href = get_pretty_url($bo_table,'','&amp;page='.$page.'&amp;'.$qstr);
$opener_href1 = str_replace('&amp;', '&', $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
View File
@@ -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'].'&amp;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
View File
@@ -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
View File
@@ -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.'&amp;wr_id='.$wr_id;
$return_url = short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;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.'&amp;wr_id='.$wr_id;
$return_url = short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;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.'&amp;wr_id='.$row['wr_parent'];
$return_url = short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;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.'&amp;wr_id='.$wr_id);
goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;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.'&amp;wr_id='.$wr_id);
goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;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.'&amp;wr_id='.$wr_id;
$return_url = short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id);
}
break;
default :
+19 -3
View File
@@ -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));
?>
+5 -3
View File
@@ -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메일을 확인하여 주십시오.');
?>
+6 -1
View File
@@ -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 {
+3
View File
@@ -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
View File
@@ -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>';
+3
View File
@@ -14,6 +14,7 @@ $msg = array();
// 1:1문의 설정값
$qaconfig = get_qa_config();
$qa_id = isset($qa_id) ? (int) $qa_id : 0;
if(trim($qaconfig['qa_category'])) {
if($w != 'a') {
@@ -317,6 +318,8 @@ if($w == '' || $w == 'a' || $w == 'r') {
sql_query($sql);
}
run_event('qawrite_update', $qa_id, $write, $w, $qaconfig);
// SMS 알림
if($config['cf_sms_use'] == 'icode' && $qaconfig['qa_use_sms']) {
if($config['cf_sms_type'] == 'LMS') {
+15 -8
View File
@@ -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);
@@ -76,12 +78,14 @@ if ($w == "") {
if ($_POST['mb_password']) {
// 수정된 정보를 업데이트후 되돌아 온것이라면 비밀번호가 암호화 된채로 넘어온것임
if ($_POST['is_update'])
if ($_POST['is_update']) {
$tmp_password = $_POST['mb_password'];
else
$tmp_password = get_encrypt_string($_POST['mb_password']);
$pass_check = ($member['mb_password'] === $tmp_password);
} else {
$pass_check = check_password($_POST['mb_password'], $member['mb_password']);
}
if ($member['mb_password'] != $tmp_password)
if (!$pass_check)
alert('비밀번호가 틀립니다.');
}
@@ -117,12 +121,12 @@ if ($w == "") {
include_once('./_head.php');
// 회원아이콘 경로
$mb_icon_path = G5_DATA_PATH.'/member/'.substr($member['mb_id'],0,2).'/'.$member['mb_id'].'.gif';
$mb_icon_url = G5_DATA_URL.'/member/'.substr($member['mb_id'],0,2).'/'.$member['mb_id'].'.gif';
$mb_icon_path = G5_DATA_PATH.'/member/'.substr($member['mb_id'],0,2).'/'.get_mb_icon_name($member['mb_id']).'.gif';
$mb_icon_url = G5_DATA_URL.'/member/'.substr($member['mb_id'],0,2).'/'.get_mb_icon_name($member['mb_id']).'.gif';
// 회원이미지 경로
$mb_img_path = G5_DATA_PATH.'/member_image/'.substr($member['mb_id'],0,2).'/'.$member['mb_id'].'.gif';
$mb_img_url = G5_DATA_URL.'/member_image/'.substr($member['mb_id'],0,2).'/'.$member['mb_id'].'.gif';
$mb_img_path = G5_DATA_PATH.'/member_image/'.substr($member['mb_id'],0,2).'/'.get_mb_icon_name($member['mb_id']).'.gif';
$mb_img_url = G5_DATA_URL.'/member_image/'.substr($member['mb_id'],0,2).'/'.get_mb_icon_name($member['mb_id']).'.gif';
$register_action_url = G5_HTTPS_BBS_URL.'/register_form_update.php';
$req_nick = !isset($member['mb_nick_date']) || (isset($member['mb_nick_date']) && $member['mb_nick_date'] <= date("Y-m-d", G5_SERVER_TIME - ($config['cf_nick_modify'] * 86400)));
@@ -137,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');
?>
+21 -3
View File
@@ -74,6 +74,8 @@ $mb_addr2 = clean_xss_tags($mb_addr2);
$mb_addr3 = clean_xss_tags($mb_addr3);
$mb_addr_jibeon = preg_match("/^(N|R)$/", $mb_addr_jibeon) ? $mb_addr_jibeon : '';
run_event('register_form_update_before', $mb_id, $w);
if ($w == '' || $w == 'u') {
if ($msg = empty_mb_id($mb_id)) alert($msg, "", true, true); // alert($msg, $url, $error, $post);
@@ -146,6 +148,8 @@ if ($w == '' || $w == 'u') {
$old_email = $member['mb_email'];
}
run_event('register_form_update_valid', $w, $mb_id, $mb_nick, $mb_email);
if ($msg = exist_mb_nick($mb_nick, $mb_id)) alert($msg, "", true, true);
if ($msg = exist_mb_email($mb_email, $mb_id)) alert($msg, "", true, true);
}
@@ -265,9 +269,13 @@ if ($w == '') {
include_once ('./register_form_update_mail1.php');
$content = ob_get_contents();
ob_end_clean();
$content = run_replace('register_form_update_mail_mb_content', $content, $mb_id);
mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $mb_email, $subject, $content, 1);
run_event('register_form_update_send_mb_mail', $config['cf_admin_email_name'], $config['cf_admin_email'], $mb_email, $subject, $content);
// 메일인증을 사용하는 경우 가입메일에 인증 url이 있으므로 인증메일을 다시 발송되지 않도록 함
if($config['cf_use_email_certify'])
$old_email = $mb_email;
@@ -275,14 +283,18 @@ if ($w == '') {
// 최고관리자님께 메일 발송
if ($config['cf_email_mb_super_admin']) {
$subject = '['.$config['cf_title'].'] '.$mb_nick .' 님께서 회원으로 가입하셨습니다.';
$subject = run_replace('register_form_update_mail_admin_subject', '['.$config['cf_title'].'] '.$mb_nick .' 님께서 회원으로 가입하셨습니다.', $mb_id, $mb_nick);
ob_start();
include_once ('./register_form_update_mail2.php');
$content = ob_get_contents();
ob_end_clean();
$content = run_replace('register_form_update_mail_admin_content', $content, $mb_id);
mailer($mb_nick, $mb_email, $config['cf_admin_email'], $subject, $content, 1);
run_event('register_form_update_send_admin_mail', $mb_nick, $mb_email, $config['cf_admin_email'], $subject, $content);
}
// 메일인증 사용하지 않는 경우에만 로그인
@@ -356,7 +368,7 @@ $mb_dir = G5_DATA_PATH.'/member/'.substr($mb_id,0,2);
// 아이콘 삭제
if (isset($_POST['del_mb_icon'])) {
@unlink($mb_dir.'/'.$mb_id.'.gif');
@unlink($mb_dir.'/'.get_mb_icon_name($mb_id).'.gif');
}
$msg = "";
@@ -364,7 +376,7 @@ $msg = "";
// 아이콘 업로드
$mb_icon = '';
$image_regex = "/(\.(gif|jpe?g|png))$/i";
$mb_icon_img = $mb_id.'.gif';
$mb_icon_img = get_mb_icon_name($mb_id).'.gif';
if (isset($_FILES['mb_icon']) && is_uploaded_file($_FILES['mb_icon']['tmp_name'])) {
if (preg_match($image_regex, $_FILES['mb_icon']['name'])) {
@@ -484,8 +496,12 @@ if ($config['cf_use_email_certify'] && $old_email != $mb_email) {
include_once ('./register_form_update_mail3.php');
$content = ob_get_contents();
ob_end_clean();
$content = run_replace('register_form_update_mail_certify_content', $content, $mb_id);
mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $mb_email, $subject, $content, 1);
run_event('register_form_update_send_certify_mail', $config['cf_admin_email_name'], $config['cf_admin_email'], $mb_email, $subject, $content);
}
@@ -501,6 +517,8 @@ unset($_SESSION['ss_cert_adult']);
if ($msg)
echo '<script>alert(\''.$msg.'\');</script>';
run_event('register_form_update_after', $mb_id, $w);
if ($w == '') {
goto_url(G5_HTTP_BBS_URL.'/register_result.php');
} else if ($w == 'u') {
+4 -4
View File
@@ -47,8 +47,8 @@ echo '<?xml version="1.0" encoding="utf-8" ?>'."\n";
?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title><?php echo specialchars_replace($config['cf_title'].' &gt; '.$subj1.' &gt; '.$subj2) ?></title>
<link><?php echo specialchars_replace(G5_BBS_URL.'/board.php?bo_table='.$bo_table) ?></link>
<title><?php echo specialchars_replace($config['cf_title'].' &gt; '.$subj1.' &gt; '.$subj2); ?></title>
<link><?php echo specialchars_replace(get_pretty_url($bo_table)); ?></link>
<description>테스트 버전 0.2 (2004-04-26)</description>
<language>ko</language>
@@ -69,8 +69,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
?>
<item>
<title><?php echo specialchars_replace($row['wr_subject']) ?></title>
<link><?php echo specialchars_replace(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$row['wr_id']) ?></link>
<title><?php echo specialchars_replace($row['wr_subject']); ?></title>
<link><?php echo specialchars_replace(get_pretty_url($bo_table, $wr_id)); ?></link>
<description><![CDATA[<?php echo $file ?><?php echo conv_content($row['wr_content'], $html) ?>]]></description>
<dc:creator><?php echo specialchars_replace($row['wr_name']) ?></dc:creator>
<?php
+2 -2
View File
@@ -47,8 +47,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
$row3['wr_subject'] = '[글 없음]';
$list[$i]['num'] = $num;
$list[$i]['opener_href'] = './board.php?bo_table='.$row['bo_table'];
$list[$i]['opener_href_wr_id'] = './board.php?bo_table='.$row['bo_table'].'&amp;wr_id='.$row['wr_id'];
$list[$i]['opener_href'] = get_pretty_url($row['bo_table']);
$list[$i]['opener_href_wr_id'] = get_pretty_url($row['bo_table'], $row['wr_id']);
$list[$i]['bo_subject'] = $row2['bo_subject'];
$list[$i]['subject'] = $subject;
$list[$i]['del_href'] = './scrap_delete.php?ms_id='.$row['ms_id'].'&amp;page='.$page;
+3
View File
@@ -7,5 +7,8 @@ if (!$is_member)
$sql = " delete from {$g5['scrap_table']} where mb_id = '{$member['mb_id']}' and ms_id = '$ms_id' ";
sql_query($sql);
$sql = " update `{$g5['member_table']}` set mb_scrap_cnt = '".get_scrap_totals($member['mb_id'])."' where mb_id = '{$member['mb_id']}' ";
sql_query($sql);
goto_url('./scrap.php?page='.$page);
?>
+5 -2
View File
@@ -4,7 +4,7 @@ include_once('./_common.php');
include_once(G5_PATH.'/head.sub.php');
if ($is_guest) {
$href = './login.php?'.$qstr.'&amp;url='.urlencode('./board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id);
$href = './login.php?'.$qstr.'&amp;url='.urlencode(get_pretty_url($bo_table, $wr_id));
$href2 = str_replace('&amp;', '&', $href);
echo <<<HEREDOC
<script>
@@ -38,6 +38,9 @@ $sql = " select count(*) as cnt from {$g5['scrap_table']}
and wr_id = '$wr_id' ";
$row = sql_fetch($sql);
if ($row['cnt']) {
$back_url = get_pretty_url($bo_table, $wr_id);
echo <<<HEREDOC
<script>
if (confirm('이미 스크랩하신 글 입니다.\\n\\n지금 스크랩을 확인하시겠습니까?'))
@@ -48,7 +51,7 @@ if ($row['cnt']) {
<noscript>
<p>이미 스크랩하신 글 입니다.</p>
<a href="./scrap.php">스크랩 확인하기</a>
<a href="./board.php?bo_table={$bo_table}&amp;wr_id=$wr_id">돌아가기</a>
<a href="{$back_url}">돌아가기</a>
</noscript>
HEREDOC;
exit;
+5 -2
View File
@@ -5,7 +5,7 @@ include_once(G5_PATH.'/head.sub.php');
if (!$is_member)
{
$href = './login.php?'.$qstr.'&amp;url='.urlencode('./board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id);
$href = './login.php?'.$qstr.'&amp;url='.urlencode(get_pretty_url($bo_table, $wr_id));
echo '<script> alert(\'회원만 접근 가능합니다.\'); top.location.href = \''.str_replace('&amp;', '&', $href).'\'; </script>';
exit;
}
@@ -31,7 +31,7 @@ if ($row['cnt'])
<noscript>
<p>이미 스크랩하신 글 입니다.</p>
<a href="./scrap.php">스크랩 확인하기</a>
<a href="./board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'">돌아가기</a>
<a href="'.get_pretty_url($bo_table, $wr_id).'">돌아가기</a>
</noscript>';
exit;
}
@@ -101,6 +101,9 @@ if ($wr_content && ($member['mb_level'] >= $board['bo_comment_level']))
$sql = " insert into {$g5['scrap_table']} ( mb_id, bo_table, wr_id, ms_datetime ) values ( '{$member['mb_id']}', '$bo_table', '$wr_id', '".G5_TIME_YMDHIS."' ) ";
sql_query($sql);
$sql = " update `{$g5['member_table']}` set mb_scrap_cnt = '".get_scrap_totals($member['mb_id'])."' where mb_id = '{$member['mb_id']}' ";
sql_query($sql);
delete_cache_latest($bo_table);
echo <<<HEREDOC
+1 -1
View File
@@ -172,7 +172,7 @@ if ($stx) {
for ($i=0; $row=sql_fetch_array($result); $i++) {
// 검색어까지 링크되면 게시판 부하가 일어남
$list[$idx][$i] = $row;
$list[$idx][$i]['href'] = './board.php?bo_table='.$search_table[$idx].'&amp;wr_id='.$row['wr_parent'];
$list[$idx][$i]['href'] = get_pretty_url($search_table[$idx], $row['wr_parent']);
if ($row['wr_is_comment'])
{
+20 -18
View File
@@ -13,11 +13,11 @@ $sql_search = "";
if ($sca || $stx || $stx === '0') {
// where 문을 얻음
$sql_search = get_sql_search($sca, $sfl, $stx, $sop);
$search_href = './board.php?bo_table='.$bo_table.'&amp;page='.$page.$qstr;
$list_href = './board.php?bo_table='.$bo_table;
$search_href = get_pretty_url($bo_table,'','&amp;page='.$page.$qstr);
$list_href = get_pretty_url($bo_table);
} else {
$search_href = '';
$list_href = './board.php?bo_table='.$bo_table.'&amp;page='.$page;
$list_href = get_pretty_url($bo_table,'',$qstr);
}
if (!$board['bo_use_list_view']) {
@@ -47,7 +47,7 @@ if (!$board['bo_use_list_view']) {
$prev_href = '';
if (isset($prev['wr_id']) && $prev['wr_id']) {
$prev_wr_subject = get_text(cut_str($prev['wr_subject'], 255));
$prev_href = './board.php?bo_table='.$bo_table.'&amp;wr_id='.$prev['wr_id'].$qstr;
$prev_href = get_pretty_url($bo_table, $prev['wr_id'], $qstr);
$prev_wr_date = $prev['wr_datetime'];
}
@@ -55,38 +55,40 @@ if (isset($prev['wr_id']) && $prev['wr_id']) {
$next_href = '';
if (isset($next['wr_id']) && $next['wr_id']) {
$next_wr_subject = get_text(cut_str($next['wr_subject'], 255));
$next_href = './board.php?bo_table='.$bo_table.'&amp;wr_id='.$next['wr_id'].$qstr;
$next_href = get_pretty_url($bo_table, $next['wr_id'], $qstr);
$next_wr_date = $next['wr_datetime'];
}
// 쓰기 링크
$write_href = '';
if ($member['mb_level'] >= $board['bo_write_level'])
$write_href = './write.php?bo_table='.$bo_table;
if ($member['mb_level'] >= $board['bo_write_level']) {
$write_href = short_url_clean(G5_BBS_URL.'/write.php?bo_table='.$bo_table);
}
// 답변 링크
$reply_href = '';
if ($member['mb_level'] >= $board['bo_reply_level'])
$reply_href = './write.php?w=r&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr;
if ($member['mb_level'] >= $board['bo_reply_level']) {
$reply_href = short_url_clean(G5_BBS_URL.'/write.php?w=r&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr);
}
// 수정, 삭제 링크
$update_href = $delete_href = '';
// 로그인중이고 자신의 글이라면 또는 관리자라면 비밀번호를 묻지 않고 바로 수정, 삭제 가능
if (($member['mb_id'] && ($member['mb_id'] === $write['mb_id'])) || $is_admin) {
$update_href = './write.php?w=u&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr;
$update_href = short_url_clean(G5_BBS_URL.'/write.php?w=u&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr);
set_session('ss_delete_token', $token = uniqid(time()));
$delete_href ='./delete.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;token='.$token.'&amp;page='.$page.urldecode($qstr);
$delete_href = G5_BBS_URL.'/delete.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;token='.$token.'&amp;page='.$page.urldecode($qstr);
}
else if (!$write['mb_id']) { // 회원이 쓴 글이 아니라면
$update_href = './password.php?w=u&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr;
$delete_href = './password.php?w=d&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr;
$update_href = G5_BBS_URL.'/password.php?w=u&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr;
$delete_href = G5_BBS_URL.'/password.php?w=d&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr;
}
// 최고, 그룹관리자라면 글 복사, 이동 가능
$copy_href = $move_href = '';
if ($write['wr_reply'] == '' && ($is_admin == 'super' || $is_admin == 'group')) {
$copy_href = './move.php?sw=copy&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr;
$move_href = './move.php?sw=move&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr;
$copy_href = G5_BBS_URL.'/move.php?sw=copy&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr;
$move_href = G5_BBS_URL.'/move.php?sw=move&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr;
}
$scrap_href = '';
@@ -94,15 +96,15 @@ $good_href = '';
$nogood_href = '';
if ($is_member) {
// 스크랩 링크
$scrap_href = './scrap_popin.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id;
$scrap_href = G5_BBS_URL.'/scrap_popin.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id;
// 추천 링크
if ($board['bo_use_good'])
$good_href = './good.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;good=good';
$good_href = G5_BBS_URL.'/good.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;good=good';
// 비추천 링크
if ($board['bo_use_nogood'])
$nogood_href = './good.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;good=nogood';
$nogood_href = G5_BBS_URL.'/good.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;good=nogood';
}
$view = get_view($write, $board, $board_skin_path);
+4 -3
View File
@@ -48,7 +48,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$ss_name = 'ss_secret_comment_'.$bo_table.'_'.$list[$i]['wr_id'];
if(!get_session($ss_name))
$list[$i]['content'] = '<a href="./password.php?w=sc&amp;bo_table='.$bo_table.'&amp;wr_id='.$list[$i]['wr_id'].$qstr.'" class="s_cmt">댓글내용 확인</a>';
$list[$i]['content'] = '<a href="'.G5_BBS_URL.'/password.php?w=sc&amp;bo_table='.$bo_table.'&amp;wr_id='.$list[$i]['wr_id'].$qstr.'" class="s_cmt">댓글내용 확인</a>';
else {
$list[$i]['content'] = conv_content($row['wr_content'], 0, 'wr_content');
$list[$i]['content'] = search_font($stx, $list[$i]['content']);
@@ -74,7 +74,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
if ($row['mb_id'] === $member['mb_id'] || $is_admin)
{
set_session('ss_delete_comment_'.$row['wr_id'].'_token', $token = uniqid(time()));
$list[$i]['del_link'] = './delete_comment.php?bo_table='.$bo_table.'&amp;comment_id='.$row['wr_id'].'&amp;token='.$token.'&amp;page='.$page.$qstr;
$list[$i]['del_link'] = G5_BBS_URL.'/delete_comment.php?bo_table='.$bo_table.'&amp;comment_id='.$row['wr_id'].'&amp;token='.$token.'&amp;page='.$page.$qstr;
$list[$i]['is_edit'] = true;
$list[$i]['is_del'] = true;
}
@@ -82,7 +82,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
else
{
if (!$row['mb_id']) {
$list[$i]['del_link'] = './password.php?w=x&amp;bo_table='.$bo_table.'&amp;comment_id='.$row['wr_id'].'&amp;page='.$page.$qstr;
$list[$i]['del_link'] = G5_BBS_URL.'/password.php?w=x&amp;bo_table='.$bo_table.'&amp;comment_id='.$row['wr_id'].'&amp;page='.$page.$qstr;
$list[$i]['is_del'] = true;
}
}
@@ -119,6 +119,7 @@ else
}
$comment_action_url = https_url(G5_BBS_DIR)."/write_comment_update.php";
$comment_common_url = short_url_clean(G5_BBS_URL.'/board.php?'.clean_query_string($_SERVER['QUERY_STRING']));
include_once($board_skin_path.'/view_comment.skin.php');
+63 -33
View File
@@ -12,10 +12,10 @@ if ( ! preg_match('/(jpg|jpeg|png|gif|bmp)$/i', $extension) ){
alert_close('이미지 확장자가 아닙니다.');
}
if(strpos($filename, 'data/editor')) {
if(strpos($filename, G5_DATA_DIR.'/editor')) {
$editor_file = strstr($filename, 'editor');
$filepath = G5_DATA_PATH.'/'.$editor_file;
} else if(strpos($filename, 'data/qa')) {
} else if(strpos($filename, G5_DATA_DIR.'/qa')) {
$editor_file = strstr($filename, 'qa');
$filepath = G5_DATA_PATH.'/'.$editor_file;
} else {
@@ -23,57 +23,87 @@ if(strpos($filename, 'data/editor')) {
$filepath = G5_DATA_PATH.'/file/'.$bo_table.'/'.$filename;
}
if(is_file($filepath)) {
$size = @getimagesize($filepath);
$file_exists = (is_file($filepath) && file_exists($filepath)) ? 1 : 0;
if($file_exists = run_replace('exists_view_image', $file_exists, $filepath, $editor_file)) {
$size = $file_exists ? run_replace('get_view_imagesize', @getimagesize($filepath), $filepath, $editor_file) : array();
if(empty($size))
alert_close('이미지 파일이 아닙니다.');
$width = $size[0];
$height = $size[1];
$width = (isset($size[0]) && $size[0]) ? (int) $size[0] : 0;
$height = (isset($size[1]) && $size[1]) ? (int) $size[1] : 0;
if($editor_file)
$fileurl = G5_DATA_URL.'/'.$editor_file;
$fileurl = run_replace('get_editor_content_url', G5_DATA_URL.'/'.$editor_file);
else
$fileurl = G5_DATA_URL.'/file/'.$bo_table.'/'.$filename;
$fileurl = run_replace('get_file_board_url', G5_DATA_URL.'/file/'.$bo_table.'/'.$filename, $bo_table);
$img = '<img src="'.$fileurl.'" alt="" width="'.$width.'" height="'.$height.'" class="draggable" style="position:relative;top:0;left:0;cursor:move;">';
$img_attr = ($width && $height) ? 'width="'.$width.'" height="'.$height.'"' : '';
$img = '<img src="'.$fileurl.'" alt="" '.$img_attr.' class="draggable" style="position:relative;top:0;left:0;cursor:move;">';
} else {
alert_close('파일이 존재하지 않습니다.');
}
?>
<div><?php echo $img ?></div>
<div class="bbs-view-image"><?php echo $img ?></div>
<script>
var win_w = <?php echo $width ?>;
var win_h = <?php echo $height ?> + 70;
var win_l = (screen.width - win_w) / 2;
var win_t = (screen.height - win_h) / 2;
if(win_w > screen.width) {
win_l = 0;
win_w = screen.width - 20;
jQuery(function($){
if(win_h > screen.height) {
win_t = 0;
win_h = screen.height - 40;
}
}
$.fn.imgLoad = function(callback) {
return this.each(function() {
if (callback) {
if (this.complete || /*for IE 10-*/ $(this).height() > 0) {
callback.apply(this);
}
else {
$(this).on('load', function(){
callback.apply(this);
});
}
}
});
};
if(win_h > screen.height) {
win_t = 0;
win_h = screen.height - 40;
$(".bbs-view-image img").imgLoad(function(){
if(win_w > screen.width) {
win_w = screen.width - 20;
win_l = 0;
}
}
var win_w = <?php echo $width ?>;
var win_h = <?php echo $height ?> + 70;
window.moveTo(win_l, win_t);
window.resizeTo(win_w, win_h);
if( !win_w || !win_h ){
win_w = $(this).width();
win_h = $(this).height();
}
var win_l = (screen.width - win_w) / 2;
var win_t = (screen.height - win_h) / 2;
if(win_w > screen.width) {
win_l = 0;
win_w = screen.width - 20;
if(win_h > screen.height) {
win_t = 0;
win_h = screen.height - 40;
}
}
if(win_h > screen.height) {
win_t = 0;
win_h = screen.height - 40;
if(win_w > screen.width) {
win_w = screen.width - 20;
win_l = 0;
}
}
window.moveTo(win_l, win_t);
window.resizeTo(win_w, win_h);
});
$(function() {
var is_draggable = false;
var x = y = 0;
var pos_x = pos_y = 0;
+2 -2
View File
@@ -13,8 +13,8 @@ if (get_cookie('ck_visit_ip') != $_SERVER['REMOTE_ADDR'])
$remote_addr = escape_trim($_SERVER['REMOTE_ADDR']);
$referer = "";
if (isset($_SERVER['HTTP_REFERER']))
$referer = escape_trim(clean_xss_tags($_SERVER['HTTP_REFERER']));
$user_agent = escape_trim(clean_xss_tags($_SERVER['HTTP_USER_AGENT']));
$referer = escape_trim(clean_xss_tags(strip_tags($_SERVER['HTTP_REFERER'])));
$user_agent = escape_trim(clean_xss_tags(strip_tags($_SERVER['HTTP_USER_AGENT'])));
$vi_browser = '';
$vi_os = '';
$vi_device = '';
+8 -5
View File
@@ -31,6 +31,8 @@ if ($w == 'u' || $w == 'r') {
}
}
run_event('bbs_write', $board, $wr_id, $w);
if ($w == '') {
if ($wr_id) {
alert('글쓰기에는 \$wr_id 값을 사용하지 않습니다.', G5_BBS_URL.'/board.php?bo_table='.$bo_table);
@@ -40,7 +42,7 @@ if ($w == '') {
if ($member['mb_id']) {
alert('글을 쓸 권한이 없습니다.');
} else {
alert("글을 쓸 권한이 없습니다.\\n회원이시라면 로그인 후 이용해 보십시오.", './login.php?'.$qstr.'&amp;url='.urlencode($_SERVER['SCRIPT_NAME'].'?bo_table='.$bo_table));
alert("글을 쓸 권한이 없습니다.\\n회원이시라면 로그인 후 이용해 보십시오.", G5_BBS_URL.'/login.php?'.$qstr.'&amp;url='.urlencode($_SERVER['SCRIPT_NAME'].'?bo_table='.$bo_table));
}
}
@@ -62,7 +64,7 @@ if ($w == '') {
if ($member['mb_id']) {
alert('글을 수정할 권한이 없습니다.');
} else {
alert('글을 수정할 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?'.$qstr.'&amp;url='.urlencode($_SERVER['SCRIPT_NAME'].'?bo_table='.$bo_table));
alert('글을 수정할 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?'.$qstr.'&amp;url='.urlencode($_SERVER['SCRIPT_NAME'].'?bo_table='.$bo_table));
}
}
@@ -95,7 +97,7 @@ if ($w == '') {
if ($member['mb_id'])
alert('글을 답변할 권한이 없습니다.');
else
alert('답변글을 작성할 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?'.$qstr.'&amp;url='.urlencode($_SERVER['SCRIPT_NAME'].'?bo_table='.$bo_table));
alert('답변글을 작성할 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?'.$qstr.'&amp;url='.urlencode($_SERVER['SCRIPT_NAME'].'?bo_table='.$bo_table));
}
$tmp_point = isset($member['mb_point']) ? $member['mb_point'] : 0;
@@ -310,7 +312,8 @@ if ($w == '') {
if (!$is_admin) {
if (!($is_member && $member['mb_id'] === $write['mb_id'])) {
if (!check_password($wr_password, $write['wr_password'])) {
alert('비밀번호가 틀립니다.');
$is_wrong = run_replace('invalid_password', false, 'write', $write);
if(!$is_wrong) alert('비밀번호가 틀립니다.');
}
}
}
@@ -362,7 +365,7 @@ if (isset($write['wr_subject'])) {
$content = '';
if ($w == '') {
$content = $board['bo_insert_content'];
$content = html_purifier($board['bo_insert_content']);
} else if ($w == 'r') {
if (!strstr($write['wr_option'], 'html')) {
$content = "\n\n\n &gt; "
+13 -7
View File
@@ -20,6 +20,8 @@ if (substr_count($wr_content, "&#") > 50) {
$w = $_POST["w"];
$wr_name = trim($_POST['wr_name']);
$wr_email = '';
$reply_array = array();
if (!empty($_POST['wr_email']))
$wr_email = get_email_address(trim($_POST['wr_email']));
@@ -54,18 +56,20 @@ if (empty($wr['wr_id']))
// 이 옵션을 사용 안 함으로 설정할 경우 어떤 스크립트도 실행 되지 않습니다.
//if (!trim($_POST["wr_content"])) die ("내용을 입력하여 주십시오.");
$post_wr_password = '';
if ($is_member)
{
$mb_id = $member['mb_id'];
// 4.00.13 - 실명 사용일때 댓글에 닉네임으로 입력되던 오류를 수정
$wr_name = addslashes(clean_xss_tags($board['bo_use_name'] ? $member['mb_name'] : $member['mb_nick']));
$wr_password = $member['mb_password'];
$wr_password = '';
$wr_email = addslashes($member['mb_email']);
$wr_homepage = addslashes(clean_xss_tags($member['mb_homepage']));
}
else
{
$mb_id = '';
$post_wr_password = $wr_password;
$wr_password = get_encrypt_string($wr_password);
}
@@ -83,9 +87,7 @@ if ($w == 'c') // 댓글 입력
// 댓글 답변
if ($comment_id)
{
$sql = " select wr_id, wr_parent, wr_comment, wr_comment_reply from $write_table
where wr_id = '$comment_id' ";
$reply_array = sql_fetch($sql);
$reply_array = get_write($write_table, $comment_id, true);
if (!$reply_array['wr_id'])
alert('답변할 댓글이 없습니다.\\n\\n답변하는 동안 댓글이 삭제되었을 수 있습니다.');
@@ -205,7 +207,7 @@ if ($w == 'c') // 댓글 입력
$subject = '['.$config['cf_title'].'] '.$board['bo_subject'].' 게시판에 '.$str.'글이 올라왔습니다.';
// 4.00.15 - 메일로 보내는 댓글의 바로가기 링크 수정
$link_url = G5_BBS_URL."/board.php?bo_table=".$bo_table."&amp;wr_id=".$wr_id."&amp;".$qstr."#c_".$comment_id;
$link_url = get_pretty_url($bo_table, $wr_id, $qstr."#c_".$comment_id);
include_once(G5_LIB_PATH.'/mailer.lib.php');
@@ -289,7 +291,7 @@ else if ($w == 'cu') // 댓글 수정
if ($member['mb_id'] !== $comment['mb_id'])
alert('자신의 글이 아니므로 수정할 수 없습니다.');
} else {
if($comment['wr_password'] != $wr_password)
if( !($comment['mb_id'] === '' && $comment['wr_password'] && check_password($post_wr_password, $comment['wr_password'])) )
alert('댓글을 수정할 권한이 없습니다.');
}
@@ -337,5 +339,9 @@ else if ($w == 'cu') // 댓글 수정
delete_cache_latest($bo_table);
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr['wr_parent'].'&amp;'.$qstr.'&amp;#c_'.$comment_id);
$redirect_url = short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr['wr_parent'].'&amp;'.$qstr.'&amp;#c_'.$comment_id);
run_event('comment_update_after', $board, $wr_id, $w, $qstr, $redirect_url, $comment_id, $reply_array);
goto_url($redirect_url);
?>
+2 -2
View File
@@ -22,7 +22,7 @@ if ($_POST['facebook_checked']) {
if ($user) {
try {
$link = G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr['wr_parent'].'&#c_'.$comment_id;
$link = get_pretty_url($bo_table, $wr['wr_parent'], '&#c_'.$comment_id);
$attachment = array(
'message' => stripslashes($wr_content),
'name' => $wr_subject,
@@ -53,7 +53,7 @@ if ($_POST['twitter_checked']) {
include_once(G5_SNS_PATH."/twitter/twitterconfig.php");
if ( !(empty($_SESSION['access_token']) || empty($_SESSION['access_token']['oauth_token']) || empty($_SESSION['access_token']['oauth_token_secret'])) ) {
$comment_url = G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr['wr_parent'].'&#c_'.$comment_id;
$comment_url = get_pretty_url($bo_table, $wr['wr_parent'], '&#c_'.$comment_id);
$post = googl_short_url($comment_url).' '.$wr_content;
$post = utf8_strcut($post, 140);
+48 -12
View File
@@ -127,6 +127,8 @@ for ($i=1; $i<=10; $i++) {
@include_once($board_skin_path.'/write_update.head.skin.php');
run_event('write_update_before', $board, $wr_id, $w, $qstr);
if ($w == '' || $w == 'u') {
// 외부에서 글을 등록할 수 있는 버그가 존재하므로 공지는 관리자만 등록이 가능해야 함
@@ -211,12 +213,14 @@ if ($w == '' || $w == 'r') {
if (!isset($_POST['wr_subject']) || !trim($_POST['wr_subject']))
alert('제목을 입력하여 주십시오.');
$wr_seo_title = exist_seo_title_recursive('bbs', generate_seo_title($wr_subject), $write_table, $wr_id);
if ($w == '' || $w == 'r') {
if ($member['mb_id']) {
$mb_id = $member['mb_id'];
$wr_name = addslashes(clean_xss_tags($board['bo_use_name'] ? $member['mb_name'] : $member['mb_nick']));
$wr_password = $member['mb_password'];
$wr_password = '';
$wr_email = addslashes($member['mb_email']);
$wr_homepage = addslashes(clean_xss_tags($member['mb_homepage']));
} else {
@@ -251,6 +255,7 @@ if ($w == '' || $w == 'r') {
wr_option = '$html,$secret,$mail',
wr_subject = '$wr_subject',
wr_content = '$wr_content',
wr_seo_title = '$wr_seo_title',
wr_link1 = '$wr_link1',
wr_link2 = '$wr_link2',
wr_link1_hit = 0,
@@ -304,10 +309,10 @@ if ($w == '' || $w == 'r') {
}
} else if ($w == 'u') {
if (get_session('ss_bo_table') != $_POST['bo_table'] || get_session('ss_wr_id') != $_POST['wr_id']) {
alert('올바른 방법으로 수정하여 주십시오.', G5_BBS_URL.'/board.php?bo_table='.$bo_table);
alert('올바른 방법으로 수정하여 주십시오.', get_pretty_url($bo_table));
}
$return_url = './board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id;
$return_url = get_pretty_url($bo_table, $wr_id);
if ($is_admin == 'super') // 최고관리자 통과
;
@@ -328,7 +333,7 @@ if ($w == '' || $w == 'r') {
alert('자신의 글이 아니므로 수정할 수 없습니다.', $return_url);
} else {
if ($write['mb_id'])
alert('로그인 후 수정하세요.', './login.php?url='.urlencode($return_url));
alert('로그인 후 수정하세요.', G5_BBS_URL.'/login.php?url='.urlencode($return_url));
}
if ($member['mb_id']) {
@@ -372,6 +377,7 @@ if ($w == '' || $w == 'r') {
wr_option = '{$html},{$secret},{$mail}',
wr_subject = '{$wr_subject}',
wr_content = '{$wr_content}',
wr_seo_title = '$wr_seo_title',
wr_link1 = '{$wr_link1}',
wr_link2 = '{$wr_link2}',
mb_id = '{$mb_id}',
@@ -418,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);
}
// 게시판그룹접근사용을 하지 않아야 하고 비회원 글읽기가 가능해야 하며 비밀글이 아니어야 합니다.
@@ -460,13 +469,20 @@ for ($i=0; $i<count($_FILES['bf_file']['name']); $i++) {
$upload[$i]['image'][0] = '';
$upload[$i]['image'][1] = '';
$upload[$i]['image'][2] = '';
$upload[$i]['fileurl'] = '';
$upload[$i]['thumburl'] = '';
$upload[$i]['storage'] = '';
// 삭제에 체크가 되어있다면 파일을 삭제합니다.
if (isset($_POST['bf_file_del'][$i]) && $_POST['bf_file_del'][$i]) {
$upload[$i]['del_check'] = true;
$row = sql_fetch(" select bf_file from {$g5['board_file_table']} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and bf_no = '{$i}' ");
@unlink(G5_DATA_PATH.'/file/'.$bo_table.'/'.$row['bf_file']);
$row = sql_fetch(" select * from {$g5['board_file_table']} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and bf_no = '{$i}' ");
$delete_file = run_replace('delete_file_path', G5_DATA_PATH.'/file/'.$bo_table.'/'.str_replace('../', '', $row['bf_file']), $row);
if( file_exists($delete_file) ){
@unlink($delete_file);
}
// 썸네일삭제
if(preg_match("/\.({$config['cf_image_extension']})$/i", $row['bf_file'])) {
delete_board_thumbnail($bo_table, $row['bf_file']);
@@ -518,8 +534,12 @@ for ($i=0; $i<count($_FILES['bf_file']['name']); $i++) {
// 4.00.11 - 글답변에서 파일 업로드시 원글의 파일이 삭제되는 오류를 수정
if ($w == 'u') {
// 존재하는 파일이 있다면 삭제합니다.
$row = sql_fetch(" select bf_file from {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_no = '$i' ");
@unlink(G5_DATA_PATH.'/file/'.$bo_table.'/'.$row['bf_file']);
$row = sql_fetch(" select * from {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_no = '$i' ");
$delete_file = run_replace('delete_file_path', G5_DATA_PATH.'/file/'.$bo_table.'/'.str_replace('../', '', $row['bf_file']), $row);
if( file_exists($delete_file) ){
@unlink(G5_DATA_PATH.'/file/'.$bo_table.'/'.$row['bf_file']);
}
// 이미지파일이면 썸네일삭제
if(preg_match("/\.({$config['cf_image_extension']})$/i", $row['bf_file'])) {
delete_board_thumbnail($bo_table, $row['bf_file']);
@@ -546,6 +566,9 @@ for ($i=0; $i<count($_FILES['bf_file']['name']); $i++) {
// 올라간 파일의 퍼미션을 변경합니다.
chmod($dest_file, G5_FILE_PERMISSION);
$dest_file = run_replace('write_update_upload_file', $dest_file, $board, $wr_id, $w);
$upload[$i] = run_replace('write_update_upload_array', $upload[$i], $dest_file, $board, $wr_id, $w);
}
}
@@ -567,6 +590,9 @@ for ($i=0; $i<count($upload); $i++)
set bf_source = '{$upload[$i]['source']}',
bf_file = '{$upload[$i]['file']}',
bf_content = '{$bf_content[$i]}',
bf_fileurl = '{$upload[$i]['fileurl']}',
bf_thumburl = '{$upload[$i]['thumburl']}',
bf_storage = '{$upload[$i]['storage']}',
bf_filesize = '{$upload[$i]['filesize']}',
bf_width = '{$upload[$i]['image']['0']}',
bf_height = '{$upload[$i]['image']['1']}',
@@ -596,6 +622,9 @@ for ($i=0; $i<count($upload); $i++)
bf_source = '{$upload[$i]['source']}',
bf_file = '{$upload[$i]['file']}',
bf_content = '{$bf_content[$i]}',
bf_fileurl = '{$upload[$i]['fileurl']}',
bf_thumburl = '{$upload[$i]['thumburl']}',
bf_storage = '{$upload[$i]['storage']}',
bf_download = 0,
bf_filesize = '{$upload[$i]['filesize']}',
bf_width = '{$upload[$i]['image']['0']}',
@@ -603,6 +632,8 @@ for ($i=0; $i<count($upload); $i++)
bf_type = '{$upload[$i]['image']['2']}',
bf_datetime = '".G5_TIME_YMDHIS."' ";
sql_query($sql);
run_event('write_update_file_insert', $bo_table, $wr_id, $upload[$i], $w);
}
}
@@ -655,7 +686,7 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
$subject = '['.$config['cf_title'].'] '.$board['bo_subject'].' 게시판에 '.$str.'글이 올라왔습니다.';
$link_url = G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;'.$qstr;
$link_url = get_pretty_url($bo_table, $wr_id, $qstr);
include_once(G5_LIB_PATH.'/mailer.lib.php');
@@ -686,7 +717,8 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
// 중복된 메일 주소는 제거
$unique_email = array_unique($array_email);
$unique_email = array_values($unique_email);
$unique_email = run_replace('write_update_mail_list', array_values($unique_email), $board, $wr_id);
for ($i=0; $i<count($unique_email); $i++) {
mailer($wr_name, $wr_email, $unique_email[$i], $subject, $content, 1);
}
@@ -698,8 +730,12 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
delete_cache_latest($bo_table);
$redirect_url = run_replace('write_update_move_url', short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr), $board, $wr_id, $w, $qstr, $file_upload_msg);
run_event('write_update_after', $board, $wr_id, $w, $qstr, $redirect_url);
if ($file_upload_msg)
alert($file_upload_msg, G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr);
alert($file_upload_msg, $redirect_url);
else
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr);
goto_url($redirect_url);
?>
+75 -26
View File
@@ -10,6 +10,9 @@ header('P3P: CP="ALL CURa ADMa DEVa TAIa OUR BUS IND PHY ONL UNI PUR FIN COM NAV
if (!defined('G5_SET_TIME_LIMIT')) define('G5_SET_TIME_LIMIT', 0);
@set_time_limit(G5_SET_TIME_LIMIT);
if( version_compare( PHP_VERSION, '5.2.17' , '<' ) ){
die(sprintf('PHP 5.2.17 or higher required. Your PHP version is %s', PHP_VERSION));
}
//==========================================================================================================================
// extract($_GET); 명령으로 인해 page.php?_POST[var1]=data1&_POST[var2]=data2 와 같은 코드가 _POST 변수로 사용되는 것을 막음
@@ -29,20 +32,22 @@ for ($i=0; $i<$ext_cnt; $i++) {
function g5_path()
{
$chroot = substr($_SERVER['SCRIPT_FILENAME'], 0, strpos($_SERVER['SCRIPT_FILENAME'], dirname(__FILE__)));
$result['path'] = str_replace('\\', '/', $chroot.dirname(__FILE__));
$tilde_remove = preg_replace('/^\/\~[^\/]+(.*)$/', '$1', $_SERVER['SCRIPT_NAME']);
$document_root = str_replace($tilde_remove, '', $_SERVER['SCRIPT_FILENAME']);
$pattern = '/' . preg_quote($document_root, '/') . '/i';
$root = preg_replace($pattern, '', $result['path']);
$port = ($_SERVER['SERVER_PORT'] == 80 || $_SERVER['SERVER_PORT'] == 443) ? '' : ':'.$_SERVER['SERVER_PORT'];
$http = 'http' . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') ? 's' : '') . '://';
$user = str_replace(preg_replace($pattern, '', $_SERVER['SCRIPT_FILENAME']), '', $_SERVER['SCRIPT_NAME']);
$host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];
if(isset($_SERVER['HTTP_HOST']) && preg_match('/:[0-9]+$/', $host))
$host = preg_replace('/:[0-9]+$/', '', $host);
$host = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\/\^\*]/", '', $host);
$result['url'] = $http.$host.$port.$user.$root;
$chroot = substr($_SERVER['SCRIPT_FILENAME'], 0, strpos($_SERVER['SCRIPT_FILENAME'], dirname(__FILE__)));
$result['path'] = str_replace('\\', '/', $chroot.dirname(__FILE__));
$server_script_name = preg_replace('/\/+/', '/', str_replace('\\', '/', $_SERVER['SCRIPT_NAME']));
$server_script_filename = preg_replace('/\/+/', '/', str_replace('\\', '/', $_SERVER['SCRIPT_FILENAME']));
$tilde_remove = preg_replace('/^\/\~[^\/]+(.*)$/', '$1', $server_script_name);
$document_root = str_replace($tilde_remove, '', $server_script_filename);
$pattern = '/.*?' . preg_quote($document_root, '/') . '/i';
$root = preg_replace($pattern, '', $result['path']);
$port = ($_SERVER['SERVER_PORT'] == 80 || $_SERVER['SERVER_PORT'] == 443) ? '' : ':'.$_SERVER['SERVER_PORT'];
$http = 'http' . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') ? 's' : '') . '://';
$user = str_replace(preg_replace($pattern, '', $server_script_filename), '', $server_script_name);
$host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];
if(isset($_SERVER['HTTP_HOST']) && preg_match('/:[0-9]+$/', $host))
$host = preg_replace('/:[0-9]+$/', '', $host);
$host = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\/\^\*]/", '', $host);
$result['url'] = $http.$host.$port.$user.$root;
return $result;
}
@@ -122,7 +127,15 @@ $member = array();
$board = array();
$group = array();
$g5 = array();
$qaconfig = array();
$g5_debug = array('php'=>array(),'sql'=>array());
include_once(G5_LIB_PATH.'/hook.lib.php'); // hook 함수 파일
include_once(G5_LIB_PATH.'/get_data.lib.php'); // 데이타 가져오는 함수 모음
include_once(G5_LIB_PATH.'/cache.lib.php'); // cache 함수 및 object cache class 모음
include_once(G5_LIB_PATH.'/uri.lib.php'); // URL 함수 파일
$g5_object = new G5_object_cache();
//==============================================================================
// 공통
@@ -138,7 +151,7 @@ if (file_exists($dbconfig_file)) {
// mysql connect resource $g5 배열에 저장 - 명랑폐인님 제안
$g5['connect_db'] = $connect_db;
sql_set_charset('utf8', $connect_db);
sql_set_charset(G5_DB_CHARSET, $connect_db);
if(defined('G5_MYSQL_SET_MODE') && G5_MYSQL_SET_MODE) sql_query("SET SESSION sql_mode = ''");
if (defined('G5_TIMEZONE')) sql_query(" set time_zone = '".G5_TIMEZONE."'");
} else {
@@ -203,16 +216,44 @@ ini_set("session.gc_divisor", 100); // session.gc_divisor는 session.gc_probabil
session_set_cookie_params(0, '/');
ini_set("session.cookie_domain", G5_COOKIE_DOMAIN);
@session_start();
//==============================================================================
//==============================================================================
// 공용 변수
//------------------------------------------------------------------------------
// 기본환경설정
// 기본적으로 사용하는 필드만 얻은 후 상황에 따라 필드를 추가로 얻음
$config = sql_fetch(" select * from {$g5['config_table']} ");
$config = get_config();
// 본인인증 또는 쇼핑몰 사용시에만 secure; SameSite=None 로 설정합니다.
if( $config['cf_cert_use'] || (defined('G5_YOUNGCART_VER') && G5_YOUNGCART_VER) ) {
// Chrome 80 버전부터 아래 이슈 대응
// https://developers-kr.googleblog.com/2020/01/developers-get-ready-for-new.html?fbclid=IwAR0wnJFGd6Fg9_WIbQPK3_FxSSpFLqDCr9bjicXdzy--CCLJhJgC9pJe5ss
if(!function_exists('session_start_samesite')) {
function session_start_samesite($options = array())
{
$res = @session_start($options);
// IE 브라우저 또는 엣지브라우저 일때는 secure; SameSite=None 을 설정하지 않습니다.
if( preg_match('/Edge/i', $_SERVER['HTTP_USER_AGENT']) || preg_match('/MSIE/i', $_SERVER['HTTP_USER_AGENT']) ){
return $res;
}
$headers = headers_list();
krsort($headers);
foreach ($headers as $header) {
if (!preg_match('~^Set-Cookie: PHPSESSID=~', $header)) continue;
$header = preg_replace('~; secure(; HttpOnly)?$~', '', $header) . '; secure; SameSite=None';
header($header, false);
break;
}
return $res;
}
}
session_start_samesite();
} else {
@session_start();
}
//==============================================================================
define('G5_HTTP_BBS_URL', https_url(G5_BBS_DIR, false));
define('G5_HTTPS_BBS_URL', https_url(G5_BBS_DIR, true));
@@ -402,19 +443,25 @@ if ($_SESSION['ss_mb_id']) { // 로그인중이라면
$write = array();
$write_table = "";
if ($bo_table) {
$board = sql_fetch(" select * from {$g5['board_table']} where bo_table = '$bo_table' ");
$board = get_board_db($bo_table);
if ($board['bo_table']) {
set_cookie("ck_bo_table", $board['bo_table'], 86400 * 1);
$gr_id = $board['gr_id'];
$write_table = $g5['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
//$comment_table = $g5['write_prefix'] . $bo_table . $g5['comment_suffix']; // 코멘트 테이블 전체이름
if (isset($wr_id) && $wr_id)
$write = sql_fetch(" select * from $write_table where wr_id = '$wr_id' ");
if (isset($wr_id) && $wr_id) {
$write = get_write($write_table, $wr_id);
} else if (isset($wr_seo_title) && $wr_seo_title) {
$write = get_content_by_field($write_table, 'bbs', 'wr_seo_title', generate_seo_title($wr_seo_title));
if( isset($write['wr_id']) ){
$wr_id = $write['wr_id'];
}
}
}
}
if ($gr_id) {
$group = sql_fetch(" select * from {$g5['group_table']} where gr_id = '$gr_id' ");
$group = get_group($gr_id);
}
@@ -637,5 +684,7 @@ header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1
header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
header('Pragma: no-cache'); // HTTP/1.0
run_event('common_header');
$html_process = new html_process();
?>
?>

Some files were not shown because too many files have changed in this diff Show More