게시판 분류 오류 해결 및 분류 선택시 li 선택되도록 수정

This commit is contained in:
gnuboard
2013-02-05 11:32:40 +09:00
parent 36760ab8b0
commit bdaab4d429
2 changed files with 19 additions and 16 deletions

View File

@ -6,12 +6,21 @@ $is_category = false;
$category_option = '';
if ($board['bo_use_category']) {
$is_category = true;
$category_location = './board.php?bo_table='.$bo_table.'&sca=';
$category_href = G4_BBS_URL.'/board.php?bo_table='.$bo_table;
$category_option .= '<li><a href="'.$category_href.'"';
if ($sca=='')
$category_option .= ' id="bo_cate_on"';
$category_option .= '>전체</a></li>';
$categories = explode('|', $board['bo_category_list']); // 구분자가 , 로 되어 있음
for ($i=0; $i<count($categories); $i++) {
if (trim($categories[$i]))
$category_option .= '<li><a href="#">'.$categories[$i].'</a></li>';
$category = trim($categories[$i]);
if ($category=='') continue;
$category_option .= '<li><a href="'.($category_href."&amp;sca=".urlencode($category)).'"';
if ($category==$sca)
$category_option .= ' id="bo_cate_on"';
$category_option .= '>'.$category.'</a></li>';
}
}