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
-$pagelist = get_paging($config['cf_write_pages'], $page, $total_page, "$_SERVER['PHP_SELF']?$qstr&page=");
+$pagelist = get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page=");
?>
=$pagelist?>
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)
-$pagelist = get_paging($config['cf_write_pages'], $page, $total_page, "$_SERVER['PHP_SELF']?$qstr&page=");
+$pagelist = get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page=");
?>
=$pagelist?>
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 @@
include_once('./_common.php');
-if (isset($editor->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 @@
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
-$captcha = (object)array(
- 'lib' => $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/extend/ckeditor.extend.php b/extend/ckeditor.extend.php
index c752f5610..cad9fa117 100644
--- a/extend/ckeditor.extend.php
+++ b/extend/ckeditor.extend.php
@@ -7,4 +7,6 @@ $editor = (object)array(
'config_js' => $g4['path']."/plugin/ckeditor/config.js",
'data' => "data/editor"
);
+
+include_once($editor->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;
-if (isset($editor->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/plugin/ckeditor/ckeditor.lib.php b/plugin/ckeditor/ckeditor.lib.php
index 2f2609403..74d9e214b 100644
--- a/plugin/ckeditor/ckeditor.lib.php
+++ b/plugin/ckeditor/ckeditor.lib.php
@@ -4,19 +4,27 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
function editor_textarea($id, $content="", $class="")
{
global $g4;
- $upload_url = $g4['path']."/plugin/ckeditor/upload.php?type=Images";
+ //$upload_url = $g4['path']."/plugin/ckeditor/upload.php?type=Images";
$str = "\n";
//$str .= "\n";
return $str;
}
+// textarea 로 값을 넘김
function editor_getdata($id)
{
- return "var {$id}_data = CKEDITOR.instances.{$id}.getData();\n";
+ if (defined('_EDITOR_'))
+ return "var {$id}_data = CKEDITOR.instances.{$id}.getData();\n";
+ else
+ return "";
}
+// textarea 의 값이 비어 있는지 검사
function editor_empty($id, $textarea_name="내용을")
{
- return "if (!{$id}_data) { alert(\"$textarea_name 입력해 주십시오.\"); return false; }\n";
+ if (defined('_EDITOR_'))
+ return "if (!{$id}_data) { alert(\"$textarea_name 입력해 주십시오.\"); return false; }\n";
+ else
+ return "";
}
?>
\ No newline at end of file
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; // 개별 페이지 접근 불가
?>
- if ($is_admin == 'super') { ?> } ?>
+ if ($is_admin == 'super') { ?> } ?>