diff --git a/_common.php b/_common.php
index 2ed94c3fb..e29eb0bc1 100644
--- a/_common.php
+++ b/_common.php
@@ -1,3 +1,2 @@
\ No newline at end of file
+include_once('./common.php');
\ No newline at end of file
diff --git a/_head.php b/_head.php
index 79e267fb7..2a12509c5 100644
--- a/_head.php
+++ b/_head.php
@@ -1,5 +1,4 @@
\ No newline at end of file
+include_once(G5_PATH.'/head.php');
\ No newline at end of file
diff --git a/_tail.php b/_tail.php
index ae47c3b51..d4b52cfec 100644
--- a/_tail.php
+++ b/_tail.php
@@ -1,5 +1,4 @@
\ No newline at end of file
+include_once(G5_PATH.'/tail.php');
\ No newline at end of file
diff --git a/adm/_common.php b/adm/_common.php
index 316c629c3..a61a0623a 100644
--- a/adm/_common.php
+++ b/adm/_common.php
@@ -7,5 +7,4 @@ if( isset($token) ){
$token = @htmlspecialchars(strip_tags($token), ENT_QUOTES);
}
-run_event('admin_common');
-?>
\ No newline at end of file
+run_event('admin_common');
\ No newline at end of file
diff --git a/adm/admin.head.php b/adm/admin.head.php
index 53adc6e39..13d1251de 100644
--- a/adm/admin.head.php
+++ b/adm/admin.head.php
@@ -32,17 +32,23 @@ function print_menu2($key, $no='')
{
global $menu, $auth_menu, $is_admin, $auth, $g5, $sub_menu;
- $str .= "
";
+ $str = "
";
for($i=1; $i
\ No newline at end of file
+//$config['cf_add_script'] = '';
\ No newline at end of file
diff --git a/adm/admin.menu100.php b/adm/admin.menu100.php
index 6658e18c5..3f1455db5 100644
--- a/adm/admin.menu100.php
+++ b/adm/admin.menu100.php
@@ -20,5 +20,4 @@ if(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') &&
}
$menu['menu100'][] = array('100410', 'DB업그레이드', G5_ADMIN_URL.'/dbupgrade.php', 'db_upgrade');
-$menu['menu100'][] = array('100400', '부가서비스', G5_ADMIN_URL.'/service.php', 'cf_service');
-?>
\ No newline at end of file
+$menu['menu100'][] = array('100400', '부가서비스', G5_ADMIN_URL.'/service.php', 'cf_service');
\ No newline at end of file
diff --git a/adm/admin.menu200.php b/adm/admin.menu200.php
index 1e41855db..eec9564e7 100644
--- a/adm/admin.menu200.php
+++ b/adm/admin.menu200.php
@@ -8,5 +8,4 @@ $menu['menu200'] = array (
array('200820', '접속자로그삭제', G5_ADMIN_URL.'/visit_delete.php', 'mb_delete', 1),
array('200200', '포인트관리', G5_ADMIN_URL.'/point_list.php', 'mb_point'),
array('200900', '투표관리', G5_ADMIN_URL.'/poll_list.php', 'mb_poll')
-);
-?>
\ No newline at end of file
+);
\ No newline at end of file
diff --git a/adm/admin.menu300.php b/adm/admin.menu300.php
index 65f848587..4af1e15ba 100644
--- a/adm/admin.menu300.php
+++ b/adm/admin.menu300.php
@@ -9,5 +9,4 @@ $menu['menu300'] = array (
array('300600', '내용관리', G5_ADMIN_URL.'/contentlist.php', 'scf_contents', 1),
array('300700', 'FAQ관리', G5_ADMIN_URL.'/faqmasterlist.php', 'scf_faq', 1),
array('300820', '글,댓글 현황', G5_ADMIN_URL.'/write_count.php', 'scf_write_count'),
-);
-?>
\ No newline at end of file
+);
\ No newline at end of file
diff --git a/adm/admin.menu900.php b/adm/admin.menu900.php
index f8d4fb063..0d911ce1a 100644
--- a/adm/admin.menu900.php
+++ b/adm/admin.menu900.php
@@ -11,5 +11,4 @@ $menu["menu900"] = array (
array('900700', '휴대폰번호 그룹', ''.G5_SMS5_ADMIN_URL.'/num_group.php' , 'hp_group', 1),
array('900800', '휴대폰번호 관리', ''.G5_SMS5_ADMIN_URL.'/num_book.php', 'hp_manage', 1),
array('900900', '휴대폰번호 파일', ''.G5_SMS5_ADMIN_URL.'/num_book_file.php' , 'hp_file', 1)
-);
-?>
\ No newline at end of file
+);
\ No newline at end of file
diff --git a/adm/admin.tail.php b/adm/admin.tail.php
index 1033fd2f5..3e4944a84 100644
--- a/adm/admin.tail.php
+++ b/adm/admin.tail.php
@@ -150,5 +150,4 @@ function menu_rearrange(el)
\ No newline at end of file
+include_once(G5_PATH.'/tail.sub.php');
\ No newline at end of file
diff --git a/adm/ajax.token.php b/adm/ajax.token.php
index f6a100a1f..74744f5e0 100644
--- a/adm/ajax.token.php
+++ b/adm/ajax.token.php
@@ -10,5 +10,4 @@ if($error)
$token = get_admin_token();
-die(json_encode(array('error'=>'', 'token'=>$token, 'url'=>'')));
-?>
\ No newline at end of file
+die(json_encode(array('error'=>'', 'token'=>$token, 'url'=>'')));
\ No newline at end of file
diff --git a/adm/ajax.use_captcha.php b/adm/ajax.use_captcha.php
index 8f7de32b1..750f4af07 100644
--- a/adm/ajax.use_captcha.php
+++ b/adm/ajax.use_captcha.php
@@ -3,5 +3,4 @@ include_once('./_common.php');
if( isset($_POST['admin_use_captcha']) ){
set_session('ss_admin_use_captcha', true);
-}
-?>
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/adm/auth_list.php b/adm/auth_list.php
index fea4626e8..8391432ef 100644
--- a/adm/auth_list.php
+++ b/adm/auth_list.php
@@ -266,5 +266,4 @@ function fauthlist_submit(f)
+include_once ('./admin.tail.php');
\ No newline at end of file
diff --git a/adm/auth_list_delete.php b/adm/auth_list_delete.php
index c378d75ec..8bce63d36 100644
--- a/adm/auth_list_delete.php
+++ b/adm/auth_list_delete.php
@@ -10,6 +10,7 @@ if ($is_admin != 'super')
check_admin_token();
$count = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
+$post_act_button = isset($_POST['act_button']) ? clean_xss_tags($_POST['act_button'], 1, 1) : '';
if (!$count)
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
@@ -21,10 +22,10 @@ if ( (isset($_POST['mb_id']) && ! is_array($_POST['mb_id'])) || (isset($_POST['a
for ($i=0; $i<$count; $i++)
{
// 실제 번호를 넘김
- $k = $chk[$i];
+ $k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
- $mb_id = preg_replace('/[^a-zA-Z0-9_]/', '', $_POST['mb_id'][$k]);
- $au_menu = preg_replace('/[^a-zA-Z0-9_]/', '', $_POST['au_menu'][$k]);
+ $mb_id = isset($_POST['mb_id'][$k]) ? preg_replace('/[^a-zA-Z0-9_]/', '', $_POST['mb_id'][$k]) : '';
+ $au_menu = isset($_POST['au_menu'][$k]) ? preg_replace('/[^a-zA-Z0-9_]/', '', $_POST['au_menu'][$k]) : '';
$sql = " delete from {$g5['auth_table']} where mb_id = '".$mb_id."' and au_menu = '".$au_menu."' ";
sql_query($sql);
@@ -32,5 +33,4 @@ for ($i=0; $i<$count; $i++)
run_event('adm_auth_delete_member', $mb_id, $au_menu);
}
-goto_url('./auth_list.php?'.$qstr);
-?>
+goto_url('./auth_list.php?'.$qstr);
\ No newline at end of file
diff --git a/adm/auth_update.php b/adm/auth_update.php
index 4b0a58fef..5f90a056a 100644
--- a/adm/auth_update.php
+++ b/adm/auth_update.php
@@ -3,6 +3,11 @@ $sub_menu = "100200";
include_once('./_common.php');
include_once(G5_LIB_PATH.'/mailer.lib.php');
+$au_menu = isset($_POST['au_menu']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['au_menu']) : '';
+$post_r = isset($_POST['r']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['r']) : '';
+$post_w = isset($_POST['w']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['w']) : '';
+$post_d = isset($_POST['d']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['d']) : '';
+
if ($is_admin != 'super')
alert('최고관리자만 접근 가능합니다.');
@@ -19,15 +24,15 @@ if (!chk_captcha()) {
}
$sql = " insert into {$g5['auth_table']}
- set mb_id = '{$_POST['mb_id']}',
- au_menu = '{$_POST['au_menu']}',
- au_auth = '{$_POST['r']},{$_POST['w']},{$_POST['d']}' ";
+ set mb_id = '$mb_id',
+ au_menu = '$au_menu',
+ au_auth = '{$post_r},{$post_w},{$post_d}' ";
$result = sql_query($sql, FALSE);
if (!$result) {
$sql = " update {$g5['auth_table']}
- set au_auth = '{$_POST['r']},{$_POST['w']},{$_POST['d']}'
- where mb_id = '{$_POST['mb_id']}'
- and au_menu = '{$_POST['au_menu']}' ";
+ set au_auth = '{$post_r},{$post_w},{$post_d}'
+ where mb_id = '$mb_id'
+ and au_menu = '$au_menu' ";
sql_query($sql);
}
@@ -45,5 +50,4 @@ if( str_replace('-', '', G5_TIME_YMD) !== get_session('adm_auth_update') ){
run_event('adm_auth_update', $mb);
-goto_url('./auth_list.php?'.$qstr);
-?>
+goto_url('./auth_list.php?'.$qstr);
\ No newline at end of file
diff --git a/adm/board_copy.php b/adm/board_copy.php
index fb889174a..f0588585a 100644
--- a/adm/board_copy.php
+++ b/adm/board_copy.php
@@ -2,7 +2,7 @@
$sub_menu = "300100";
include_once("./_common.php");
-auth_check($auth[$sub_menu], 'w');
+auth_check_menu($auth, $sub_menu, 'w');
$g5['title'] = '게시판 복사';
include_once(G5_PATH.'/head.sub.php');
@@ -82,5 +82,4 @@ function fboardcopy_check(f)
+include_once(G5_PATH.'/tail.sub.php');
\ No newline at end of file
diff --git a/adm/board_copy_update.php b/adm/board_copy_update.php
index 7a44a9c48..a0452345f 100644
--- a/adm/board_copy_update.php
+++ b/adm/board_copy_update.php
@@ -4,12 +4,12 @@ include_once('./_common.php');
check_demo();
-auth_check($auth[$sub_menu], 'w');
+auth_check_menu($auth, $sub_menu, 'w');
check_admin_token();
-$target_table = trim($_POST['target_table']);
-$target_subject = trim($_POST['target_subject']);
+$target_table = isset($_POST['target_table']) ? trim($_POST['target_table']) : '';
+$target_subject = isset($_POST['target_subject']) ? trim($_POST['target_subject']) : '';
$target_subject = strip_tags(clean_xss_attributes($target_subject));
@@ -74,6 +74,7 @@ $sql = " insert into {$g5['board_table']}
bo_use_ip_view = '{$board['bo_use_ip_view']}',
bo_use_list_view = '{$board['bo_use_list_view']}',
bo_use_list_content = '{$board['bo_use_list_content']}',
+ bo_use_list_file = '{$board['bo_use_list_file']}',
bo_table_width = '{$board['bo_table_width']}',
bo_subject_len = '{$board['bo_subject_len']}',
bo_mobile_subject_len = '{$board['bo_mobile_subject_len']}',
@@ -220,4 +221,3 @@ delete_cache_latest($target_table);
echo "";
alert("복사에 성공 했습니다.", './board_copy.php?bo_table='.$bo_table.'&'.$qstr);
-?>
\ No newline at end of file
diff --git a/adm/board_delete.inc.php b/adm/board_delete.inc.php
index e043d3555..4e1490520 100644
--- a/adm/board_delete.inc.php
+++ b/adm/board_delete.inc.php
@@ -32,5 +32,4 @@ sql_query(" delete from {$g5['board_good_table']} where bo_table = '{$tmp_bo_tab
delete_cache_latest($tmp_bo_table);
// 게시판 폴더 전체 삭제
-rm_rf(G5_DATA_PATH.'/file/'.$tmp_bo_table);
-?>
\ No newline at end of file
+rm_rf(G5_DATA_PATH.'/file/'.$tmp_bo_table);
\ No newline at end of file
diff --git a/adm/board_form.php b/adm/board_form.php
index ec8676883..b82ad4eb9 100644
--- a/adm/board_form.php
+++ b/adm/board_form.php
@@ -3,7 +3,7 @@ $sub_menu = "300100";
include_once('./_common.php');
include_once(G5_EDITOR_LIB);
-auth_check($auth[$sub_menu], 'w');
+auth_check_menu($auth, $sub_menu, 'w');
$sql = " select count(*) as cnt from {$g5['group_table']} ";
$row = sql_fetch($sql);
@@ -11,6 +11,8 @@ if (!$row['cnt'])
alert('게시판그룹이 한개 이상 생성되어야 합니다.', './boardgroup_form.php');
$html_title = '게시판';
+$reaonly = '';
+$required_valid = '';
if (!isset($board['bo_device'])) {
// 게시판 사용 필드 추가
@@ -84,6 +86,57 @@ if (!isset($board['bo_select_editor'])) {
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_select_editor` VARCHAR(50) NOT NULL DEFAULT '' AFTER `bo_use_dhtml_editor` ", false);
}
+$board_default = array(
+'bo_mobile_subject'=>'',
+'bo_device'=>'',
+'bo_use_category'=>0,
+'bo_category_list'=>'',
+'bo_admin'=>'',
+'bo_list_level'=>0,
+'bo_read_level'=>0,
+'bo_write_level'=>0,
+'bo_reply_level'=>0,
+'bo_comment_level'=>0,
+'bo_link_level'=>0,
+'bo_upload_level'=>0,
+'bo_download_level'=>0,
+'bo_html_level'=>0,
+'bo_use_sideview'=>0,
+'bo_select_editor'=>'',
+'bo_use_rss_view'=>0,
+'bo_use_good'=>0,
+'bo_use_nogood'=>0,
+'bo_use_name'=>0,
+'bo_use_signature'=>0,
+'bo_use_ip_view'=>0,
+'bo_use_list_content'=>0,
+'bo_use_list_file'=>0,
+'bo_use_list_view'=>0,
+'bo_use_email'=>0,
+'bo_use_file_content'=>0,
+'bo_use_cert'=>'',
+'bo_write_min'=>0,
+'bo_write_max'=>0,
+'bo_comment_min'=>0,
+'bo_comment_max'=>0,
+'bo_use_sns'=>0,
+'bo_order'=>0,
+'bo_use_captcha'=>0,
+'bo_content_head'=>'',
+'bo_content_tail'=>'',
+'bo_mobile_content_head'=>'',
+'bo_mobile_content_tail'=>'',
+'bo_insert_content'=>'',
+'bo_sort_field'=>'',
+);
+
+for($i=0;$i<=10;$i++){
+ $board_default['bo_'.$i.'_subj'] = '';
+ $board_default['bo_'.$i] = '';
+}
+
+$board = array_merge($board_default, $board);
+
run_event('adm_board_form_before', $board, $w);
$required = "";
@@ -188,7 +241,7 @@ $pg_anchor = '