diff --git a/bbs/list.php b/bbs/list.php index 9bef37188..6fbf33a1b 100644 --- a/bbs/list.php +++ b/bbs/list.php @@ -132,14 +132,19 @@ if ($sca || $stx) { //if ($prev_spt >= $min_spt) $prev_spt = $spt - $config['cf_search_part']; - if (isset($min_spt) && $prev_spt >= $min_spt) + if (isset($min_spt) && $prev_spt >= $min_spt) { $prev_part_href = './board.php?bo_table='.$bo_table.$qstr.'&spt='.$prev_spt.'&page=1'; + $write_pages = page_insertbefore($write_pages, '이전검색'); + } $next_spt = $spt + $config['cf_search_part']; - if ($next_spt < 0) + if ($next_spt < 0) { $next_part_href = './board.php?bo_table='.$bo_table.$qstr.'&spt='.$next_spt.'&page=1'; + $write_pages = page_insertafter($write_pages, '다음검색'); + } } + $write_href = ''; if ($member['mb_level'] >= $board['bo_write_level']) { $write_href = './write.php?bo_table='.$bo_table; diff --git a/lib/common.lib.php b/lib/common.lib.php index e07c5e768..13cc891c6 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -51,6 +51,21 @@ function get_paging($write_pages, $cur_page, $total_page, $url, $add="") return ""; } +// 페이징 코드의
태그 다음에 코드를 삽입 +function page_insertbefore($paging_html, $insert_html) +{ + if ($paging_html) { + return preg_replace("/^(]+>]+>)/", '$1'.$insert_html, $paging_html); + } +} + +// 페이징 코드의
태그 이전에 코드를 삽입 +function page_insertafter($paging_html, $insert_html) +{ + if ($paging_html) { + return preg_replace("/(<\/span><\/div>)$/", $insert_html.'$1', $paging_html); + } +} // 변수 또는 배열의 이름과 값을 얻어냄. print_r() 함수의 변형 function print_r2($var) diff --git a/skin/board/neo/list.skin.php b/skin/board/neo/list.skin.php index ade4b2337..b4a95d349 100644 --- a/skin/board/neo/list.skin.php +++ b/skin/board/neo/list.skin.php @@ -156,9 +156,7 @@ if ($is_nogood) $colspan++; -이전검색'; } ?> - -다음검색'; } ?> +