From a618c65321714c3b17a9d9c3941e067c96d1c654 Mon Sep 17 00:00:00 2001 From: gnuboard Date: Wed, 9 Jan 2013 18:12:31 +0900 Subject: [PATCH] =?UTF-8?q?notice=20=EC=98=A4=EB=A5=98=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/board_form.php | 23 +---------------------- adm/boardgroup_form.php | 3 --- adm/boardgroup_form_update.php | 24 +++++++++++++----------- adm/boardgroup_list.php | 6 +----- adm/boardgroup_list_update.php | 8 +++----- adm/popular_list.php | 6 +++--- adm/popular_rank.php | 6 ++++-- bbs/write.php | 28 ++++++++-------------------- common.php | 1 - extend/.gitignore | 0 extend/captcha.extend.php | 12 ++++++++---- head.sub.php | 8 +++----- tail.sub.php | 2 +- 13 files changed, 45 insertions(+), 82 deletions(-) delete mode 100644 extend/.gitignore diff --git a/adm/board_form.php b/adm/board_form.php index b34d22937..dd0115ef9 100644 --- a/adm/board_form.php +++ b/adm/board_form.php @@ -1,9 +1,8 @@ lib)) include_once($editor->lib); - auth_check($auth[$sub_menu], 'w'); function b_draw($pos, $color='red') { @@ -818,31 +817,11 @@ function set_point(f) { } } -function chk_bo_image(fld) -{ - if (fld.value) { - if (!fld.value.toLowerCase().match(/.(gif|jpg|png)$/i)) { - return "이미지가 gif, jpg, png 파일이 아닙니다."; - } - } - return ""; -} - function fboardform_submit(f) { - if (msg = chk_bo_image(f.bo_image_head)) { - alert("상단 "+msg); - return false; - } - - if (msg = chk_bo_image(f.bo_image_tail)) { - alert("하단 "+msg); - return false; - } - if (parseInt(f.bo_count_modify.value) < 1) { alert("원글 수정 불가 댓글수는 1 이상 입력하셔야 합니다."); f.bo_count_modify.focus(); diff --git a/adm/boardgroup_form.php b/adm/boardgroup_form.php index 157139ba3..799cc78c5 100644 --- a/adm/boardgroup_form.php +++ b/adm/boardgroup_form.php @@ -4,8 +4,6 @@ include_once('./_common.php'); auth_check($auth[$sub_menu], 'w'); -$token = get_token(); - if ($is_admin != 'super' && $w == '') alert('최고관리자만 접근 가능합니다.'); $html_title = '게시판그룹'; @@ -35,7 +33,6 @@ include_once('./admin.head.php'); - diff --git a/adm/boardgroup_form_update.php b/adm/boardgroup_form_update.php index 832f5a693..555538b14 100644 --- a/adm/boardgroup_form_update.php +++ b/adm/boardgroup_form_update.php @@ -14,11 +14,8 @@ if (!preg_match("/^([A-Za-z0-9_]{1,10})$/", $gr_id)) if (!$gr_subject) alert('그룹 제목을 입력하세요.'); -check_token(); - $sql_common = " gr_subject = '{$_POST['gr_subject']}', - gr_admin = '{$_POST['gr_admin']}', - gr_use_access = '{$_POST['gr_use_access']}', + gr_admin = '{$_POST['gr_admin']}', gr_1_subj = '{$_POST['gr_1_subj']}', gr_2_subj = '{$_POST['gr_2_subj']}', gr_3_subj = '{$_POST['gr_3_subj']}', @@ -39,9 +36,13 @@ $sql_common = " gr_subject = '{$_POST['gr_subject']}', gr_8 = '{$_POST['gr_8']}', gr_9 = '{$_POST['gr_9']}', gr_10 = '{$_POST['gr_10']}' "; +if (isset($_POST['gr_use_access'])) + $sql_common .= ", gr_use_access = '{$_POST['gr_use_access']}' "; +else + $sql_common .= ", gr_use_access = '' "; + +if ($w == '') { -if ($w == '') -{ $sql = " select count(*) as cnt from {$g4['group_table']} where gr_id = '{$_POST['gr_id']}' "; $row = sql_fetch($sql); if ($row['cnt']) @@ -51,16 +52,17 @@ if ($w == '') set gr_id = '{$_POST['gr_id']}', {$sql_common} "; sql_query($sql); -} -else if ($w == "u") -{ + +} else if ($w == "u") { + $sql = " update {$g4['group_table']} set {$sql_common} where gr_id = '{$_POST['gr_id']}' "; sql_query($sql); -} -else + +} else { alert('제대로 된 값이 넘어오지 않았습니다.'); +} goto_url('./boardgroup_form.php?w=u&gr_id='.$gr_id.'&'.$qstr); ?> diff --git a/adm/boardgroup_list.php b/adm/boardgroup_list.php index 94b910f28..74bafae5e 100644 --- a/adm/boardgroup_list.php +++ b/adm/boardgroup_list.php @@ -4,15 +4,13 @@ include_once('./_common.php'); auth_check($auth[$sub_menu], 'r'); -$token = get_token(); - $sql_common = " from {$g4['group_table']} "; $sql_search = " where (1) "; if ($is_admin != 'super') $sql_search .= " and (gr_admin = '{$member['mb_id']}') "; -if (isset($stx)) { +if ($stx) { $sql_search .= " and ( "; switch ($sfl) { case "gr_id" : @@ -95,7 +93,6 @@ var list_update_php = "./boardgroup_list_update.php"; -
그룹 설정
게시판그룹 목록 @@ -131,7 +128,6 @@ for ($i=0; $row=sql_fetch_array($result); $i++) $s_upd = '수정'; $s_del = ''; if ($is_admin == 'super') { - //$s_del = '삭제'; $s_del = '삭제'; } ?> diff --git a/adm/boardgroup_list_update.php b/adm/boardgroup_list_update.php index b0837fcb6..f591eb401 100644 --- a/adm/boardgroup_list_update.php +++ b/adm/boardgroup_list_update.php @@ -6,17 +6,15 @@ check_demo(); auth_check($auth[$sub_menu], 'w'); -check_token(); - -for ($i=0; $i
diff --git a/adm/popular_rank.php b/adm/popular_rank.php index 0829e9ea5..848c9417b 100644 --- a/adm/popular_rank.php +++ b/adm/popular_rank.php @@ -34,7 +34,9 @@ $sql = " select pp_word, count(*) as cnt limit {$from_record}, {$rows} "; $result = sql_query($sql); -if ($_GET['fr_date'] || $_GET['to_date']) $listall = '전체목록'; +$listall = ''; +if (!empty($_GET['fr_date']) || !empty($_GET['to_date'])) + $listall = '전체목록'; $g4['title'] = '인기검색어순위'; include_once('./admin.head.php'); @@ -95,7 +97,7 @@ if ($i == 0)
diff --git a/bbs/write.php b/bbs/write.php index 805243f3e..9b96575f6 100644 --- a/bbs/write.php +++ b/bbs/write.php @@ -1,9 +1,6 @@ lib)) include_once($editor->lib); -if (isset($captcha->lib)) include_once($captcha->lib); - set_session('ss_bo_table', $bo_table); set_session('ss_wr_id', $wr_id); @@ -26,7 +23,7 @@ if (!($w == '' || $w == 'u' || $w == 'r')) { } if (($w == 'u' || $w == 'r') && !$write['wr_id']) { - alert('글이 존재하지 않습니다.'.PHP_EOL.PHP_EOL.'삭제되었거나 이동된 경우입니다.', $g4['path']); + alert("글이 존재하지 않습니다.\\n삭제되었거나 이동된 경우입니다.", $g4['path']); } if ($w == '') { @@ -38,7 +35,7 @@ if ($w == '') { if ($member['mb_id']) { alert('글을 쓸 권한이 없습니다.'); } else { - alert('글을 쓸 권한이 없습니다.'.PHP_EOL.PHP_EOL.'회원이시라면 로그인 후 이용해 보십시오.', './login.php?'.$qstr.'&url='.urlencode($_SERVER['PHP_SELF'].'?bo_table='.$bo_table)); + alert("글을 쓸 권한이 없습니다.\\n회원이시라면 로그인 후 이용해 보십시오.", './login.php?'.$qstr.'&url='.urlencode($_SERVER['PHP_SELF'].'?bo_table='.$bo_table)); } } @@ -159,9 +156,9 @@ if ($w == '') { } // 그룹접근 가능 -if ($group['gr_use_access']) { +if (!empty($group['gr_use_access'])) { if ($is_guest) { - alert('접근 권한이 없습니다.'.PHP_EOL.PHP_EOL.'회원이시라면 로그인 후 이용해 보십시오.', 'login.php?'.$qstr.'&url='.urlencode($_SERVER['PHP_SELF'].'?bo_table='.$bo_table)); + alert("접근 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.", 'login.php?'.$qstr.'&url='.urlencode($_SERVER['PHP_SELF'].'?bo_table='.$bo_table)); } if ($is_admin == 'super' || $group['gr_admin'] == $member['mb_id'] || $board['bo_admin'] == $member['mb_id']) { @@ -200,10 +197,12 @@ if ($member['mb_level'] >= $board['bo_html_level']) $is_secret = $board['bo_use_secret']; -if ($board['bo_use_dhtml_editor'] && $member['mb_level'] >= $board['bo_html_level']) +if ($board['bo_use_dhtml_editor'] && $member['mb_level'] >= $board['bo_html_level']) { + define('_EDITOR_', true); $is_dhtml_editor = true; -else +} else { $is_dhtml_editor = false; +} $is_mail = false; if ($config['cf_email_use'] && $board['bo_use_email']) @@ -348,17 +347,6 @@ if ($is_admin) { $write_max = (int)$board['bo_write_max']; } -if ($is_dhtml_editor && isset($editor->js)) { - $g4['js_file'][] = $editor->js; - if (isset($editor->config_js)) { - $g4['js_file'][] = $editor->config_js; - } -} - -if (isset($captcha->js)) { - $g4['js_file'][] = $captcha->js; -} - include_once($g4['path'].'/head.sub.php'); include_once('./board_head.php'); diff --git a/common.php b/common.php index 8f1f8e708..c26713cdb 100644 --- a/common.php +++ b/common.php @@ -2,7 +2,6 @@ /******************************************************************************* ** 공통 변수, 상수, 코드 *******************************************************************************/ -//error_reporting(E_ALL); //error_reporting(E_ALL ^ E_NOTICE); // 보안설정이나 프레임이 달라도 쿠키가 통하도록 설정 diff --git a/extend/.gitignore b/extend/.gitignore deleted file mode 100644 index e69de29bb..000000000 diff --git a/extend/captcha.extend.php b/extend/captcha.extend.php index b304c8796..b4e5cdf66 100644 --- a/extend/captcha.extend.php +++ b/extend/captcha.extend.php @@ -1,8 +1,12 @@ $g4['path']."/plugin/captcha/captcha.lib.php", - 'js' => $g4['path']."/plugin/captcha/captcha.js" -); +if (defined('_CAPTCHA_')) { + $captcha = (object)array( + 'lib' => $g4['path']."/plugin/captcha/captcha.lib.php", + 'js' => $g4['path']."/plugin/captcha/captcha.js" + ); + + include_once($captcha->lib); +} ?> \ No newline at end of file diff --git a/head.sub.php b/head.sub.php index 3b19fd6a3..143df8691 100644 --- a/head.sub.php +++ b/head.sub.php @@ -74,13 +74,11 @@ var g4_is_ie = navigator.userAgent.toLowerCase().indexOf("msie") != -1; js)) { +if (defined('_EDITOR_')) { $g4['js_file'][] = $editor->js; - if (isset($editor->config_js)) { - $g4['js_file'][] = $editor->config_js; - } + $g4['js_file'][] = $editor->config_js; } -if (isset($captcha->js)) { +if (defined('_CAPTCHA_')) { $g4['js_file'][] = $captcha->js; } ?> diff --git a/tail.sub.php b/tail.sub.php index 1ceae9051..73fd14172 100644 --- a/tail.sub.php +++ b/tail.sub.php @@ -2,7 +2,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 ?> - +