Merge branch 'board_headtail'
This commit is contained in:
@ -7,10 +7,13 @@ if (G5_IS_MOBILE) {
|
||||
include_once(G5_BBS_PATH.'/_head.php');
|
||||
echo html_purifier(stripslashes($board['bo_mobile_content_head']));
|
||||
} else {
|
||||
if($board['bo_include_head'] && is_include_path_check($board['bo_include_head'])) { //파일경로 체크
|
||||
@include ($board['bo_include_head']);
|
||||
} else { //파일경로가 올바르지 않으면 기본파일을 가져옴
|
||||
include_once(G5_BBS_PATH.'/_head.php');
|
||||
// 상단 파일 경로를 입력하지 않았다면 기본 상단 파일도 include 하지 않음
|
||||
if (trim($board['bo_include_head'])) {
|
||||
if (is_include_path_check($board['bo_include_head'])) { //파일경로 체크
|
||||
@include ($board['bo_include_head']);
|
||||
} else { //파일경로가 올바르지 않으면 기본파일을 가져옴
|
||||
include_once(G5_BBS_PATH.'/_head.php');
|
||||
}
|
||||
}
|
||||
echo html_purifier(stripslashes($board['bo_content_head']));
|
||||
}
|
||||
@ -8,9 +8,12 @@ if (G5_IS_MOBILE) {
|
||||
include_once(G5_BBS_PATH.'/_tail.php');
|
||||
} else {
|
||||
echo html_purifier(stripslashes($board['bo_content_tail']));
|
||||
if($board['bo_include_tail'] && is_include_path_check($board['bo_include_tail'])) { //파일경로 체크
|
||||
@include ($board['bo_include_tail']);
|
||||
} else { //파일경로가 올바르지 않으면 기본파일을 가져옴
|
||||
include_once(G5_BBS_PATH.'/_tail.php');
|
||||
// 하단 파일 경로를 입력하지 않았다면 기본 하단 파일도 include 하지 않음
|
||||
if (trim($board['bo_include_tail'])) {
|
||||
if (is_include_path_check($board['bo_include_tail'])) { //파일경로 체크
|
||||
@include ($board['bo_include_tail']);
|
||||
} else { //파일경로가 올바르지 않으면 기본파일을 가져옴
|
||||
include_once(G5_BBS_PATH.'/_tail.php');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -96,7 +96,7 @@ if (!$is_search_bbs) {
|
||||
|
||||
$row = sql_fetch(" select * from {$write_table} where wr_id = '{$arr_notice[$k]}' ");
|
||||
|
||||
if (!$row['wr_id']) continue;
|
||||
if (!isset($row['wr_id']) || !$row['wr_id']) continue;
|
||||
|
||||
$notice_array[] = $row['wr_id'];
|
||||
|
||||
|
||||
@ -247,7 +247,24 @@ if ($sw == 'move')
|
||||
sql_query(" delete from {$g5['board_new_table']} where bo_table = '$bo_table' and wr_id = '{$save[$i]['wr_id']}' ");
|
||||
sql_query(" delete from {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$save[$i]['wr_id']}' ");
|
||||
}
|
||||
sql_query(" update {$g5['board_table']} set bo_count_write = bo_count_write - '$save_count_write', bo_count_comment = bo_count_comment - '$save_count_comment' where bo_table = '$bo_table' ");
|
||||
|
||||
// 공지사항이 이동되는 경우의 처리 begin
|
||||
$arr = array();
|
||||
$sql = " select bo_notice from {$g5['board_table']} where bo_table = '{$bo_table}' ";
|
||||
$row = sql_fetch($sql);
|
||||
$arr_notice = explode(',', $row['bo_notice']);
|
||||
for ($i=0; $i<count($arr_notice); $i++) {
|
||||
$move_id = (int)$arr_notice[$i];
|
||||
// 게시판에 wr_id 가 있다면 이동한게 아니므로 bo_notice 에 다시 넣음
|
||||
$row2 = sql_fetch(" select count(*) as cnt from $write_table where wr_id = '{$move_id}' ");
|
||||
if ($row2['cnt']) {
|
||||
$arr[] = $move_id;
|
||||
}
|
||||
$bo_notice = implode(',', $arr);
|
||||
}
|
||||
// 공지사항이 이동되는 경우의 처리 end
|
||||
|
||||
sql_query(" update {$g5['board_table']} set bo_notice = '{$bo_notice}', bo_count_write = bo_count_write - '$save_count_write', bo_count_comment = bo_count_comment - '$save_count_comment' where bo_table = '$bo_table' ");
|
||||
}
|
||||
|
||||
$msg = '해당 게시물을 선택한 게시판으로 '.$act.' 하였습니다.';
|
||||
|
||||
Reference in New Issue
Block a user