diff --git a/bbs/list.php b/bbs/list.php index 5fd3973bb..c8d3add00 100644 --- a/bbs/list.php +++ b/bbs/list.php @@ -3,10 +3,16 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 // 분류 사용 여부 $is_category = false; +$category_option = ''; if ($board['bo_use_category']) { $is_category = true; $category_location = './board.php?bo_table='.$bo_table.'&sca='; - $category_option = get_category_option($bo_table); // SELECT OPTION 태그로 넘겨받음 + + $categorys = explode('|', $board['bo_category_list']); // 구분자가 , 로 되어 있음 + for ($i=0; $i'; + } } $sop = strtolower($sop); diff --git a/bbs/view.php b/bbs/view.php index e5cf92346..6cf09d121 100644 --- a/bbs/view.php +++ b/bbs/view.php @@ -47,14 +47,14 @@ if (!$board['bo_use_list_view']) { $prev_href = ''; if (isset($prev['wr_id']) && $prev['wr_id']) { $prev_wr_subject = get_text(cut_str($prev['wr_subject'], 255)); - $prev_href = './board.php?bo_table='.$bo_table.'&wr_id='.$prev['wr_id'].'&page='.$page.$qstr; + $prev_href = './board.php?bo_table='.$bo_table.'&wr_id='.$prev['wr_id'].$qstr; } // 다음글 링크 $next_href = ''; if (isset($next['wr_id']) && $next['wr_id']) { $next_wr_subject = get_text(cut_str($next['wr_subject'], 255)); - $next_href = './board.php?bo_table='.$bo_table.'&wr_id='.$next['wr_id'].'&page='.$page.$qstr; + $next_href = './board.php?bo_table='.$bo_table.'&wr_id='.$next['wr_id'].$qstr; } // 쓰기 링크 diff --git a/lib/common.lib.php b/lib/common.lib.php index fb359ac74..01b161511 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -18,6 +18,8 @@ function get_microtime() // 현재페이지, 총페이지수, 한페이지에 보여줄 행, URL function get_paging($write_pages, $cur_page, $total_page, $url, $add="") { + $url = preg_replace('#(&|&)?page\=[0-9]+#', '', $url); + $str = ''; if ($cur_page > 1) { $str .= '처음'.PHP_EOL; @@ -801,7 +803,7 @@ function get_category_option($bo_table='', $ca_name='') $category = trim($arr[$i]); if (!$category) continue; - $str .= "