diff --git a/.gitignore b/.gitignore index 8b781d5d7..df481935e 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ test.php *.key *.sh cheditor5/ +ckeditor43/ diff --git a/bbs/list.php b/bbs/list.php index 90c946368..c0301b410 100644 --- a/bbs/list.php +++ b/bbs/list.php @@ -61,10 +61,47 @@ if(G5_IS_MOBILE) { $page_rows = $board['bo_page_rows']; } +if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) + +// 년도 2자리 +$today2 = G5_TIME_YMD; + +$list = array(); +$i = 0; +$notice_count = 0; +$notice_array = array(); + +// 공지 처리 +if (!$sca && !$stx) { + $arr_notice = explode(',', trim($board['bo_notice'])); + for ($k=0; $k 1 && $notice_count) + $from_record -= $notice_count; + +if($page == 1 && $notice_count) + $page_rows -= $notice_count; + // 관리자라면 CheckBox 보임 $is_checkbox = false; if ($is_member && ($is_admin == 'super' || $group['gr_admin'] == $member['mb_id'] || $board['bo_admin'] == $member['mb_id'])) @@ -85,7 +122,7 @@ if (!$sst) { $sst = $board['bo_sort_field']; } else { $sst = "wr_num, wr_reply"; - $sod = ""; + $sod = ""; } } else { // 게시물 리스트의 정렬 대상 필드가 아니라면 공백으로 (nasca 님 09.06.16) @@ -101,39 +138,17 @@ if ($sst) { if ($sca || $stx) { $sql = " select distinct wr_parent from {$write_table} where {$sql_search} {$sql_order} limit {$from_record}, $page_rows "; } else { - $sql = " select * from {$write_table} where wr_is_comment = 0 {$sql_order} limit {$from_record}, $page_rows "; + $sql = " select * from {$write_table} where wr_is_comment = 0 "; + if($notice_count && !empty($notice_array)) + $sql .= " and wr_id not in (".implode(', ', $notice_array).") "; + $sql .= " {$sql_order} limit {$from_record}, $page_rows "; } $result = sql_query($sql); -// 년도 2자리 -$today2 = G5_TIME_YMD; - -$list = array(); -$i = 0; - -if (!$sca && !$stx) { - $arr_notice = explode(',', trim($board['bo_notice'])); - for ($k=0; $k',