분류를 select>option 에서 ul>li 로 변경

This commit is contained in:
gnuboard
2013-02-01 16:16:46 +09:00
parent 811f56b3df
commit 3fca0aa38c
2 changed files with 10 additions and 4 deletions

View File

@ -3,10 +3,16 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// 분류 사용 여부 // 분류 사용 여부
$is_category = false; $is_category = false;
$category_option = '';
if ($board['bo_use_category']) { if ($board['bo_use_category']) {
$is_category = true; $is_category = true;
$category_location = './board.php?bo_table='.$bo_table.'&sca='; $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<count($categorys); $i++) {
if (trim($categorys[$i]))
$category_option .= '<li>'.$categorys[$i].'</li>';
}
} }
$sop = strtolower($sop); $sop = strtolower($sop);

View File

@ -15,10 +15,10 @@ if ($is_nogood) $colspan++;
<div id="bo_cate"> <div id="bo_cate">
<? if ($is_category) { ?> <? if ($is_category) { ?>
<form id="fcategory" name="fcategory" method="get"> <form id="fcategory" name="fcategory" method="get">
<select name="sca" onchange="location='<?=$category_location?>'+<?=strtolower($g4['charset'])=='utf-8' ? "encodeURIComponent(this.value)" : "this.value"?>;"> <ul>
<option value=''>전체</option> <li>전체</li>
<?=$category_option?> <?=$category_option?>
</select> </ul>
</form> </form>
<? } ?> <? } ?>
</div> </div>