notice 오류 해결중

This commit is contained in:
gnuboard
2012-12-28 11:10:46 +09:00
parent 35e2a0e572
commit 7da12747e5
5 changed files with 29 additions and 22 deletions

View File

@ -728,15 +728,22 @@ function is_admin($mb_id)
// 분류 옵션을 얻음
// 4.00 에서는 카테고리 테이블을 없애고 보드테이블에 있는 내용으로 대체
function get_category_option($bo_table='')
function get_category_option($bo_table='', $ca_name='')
{
global $g4, $board;
$arr = explode("|", $board['bo_category_list']); // 구분자가 , 로 되어 있음
$str = "";
for ($i=0; $i<count($arr); $i++)
if (trim($arr[$i]))
$str .= "<option value='$arr[$i]'>$arr[$i]</option>\n";
for ($i=0; $i<count($arr); $i++) {
$category = trim($arr[$i]);
if (!$category) continue;
$str .= "<option value=\"$arr[$i]\"";
if ($category == $ca_name) {
$str .= ' selected="selected"';
}
$str .= ">$arr[$i]</option>\n";
}
return $str;
}