게시판 리스트에서 카테고리를 선택을 하면 선택한 카테고리 내용의 리스트만 보여주게 되는데요.
공지사항은 특정한 카테고리를 선택하더라도 항상 리스트 상단에 보여주게 하고 싶습니다.
예) 공지사항 글을 작성할 때 카테고리에서 "공지" 선택 및 공지 체크
-> 리스트 상단에 공지글 보임.
-> 특정한 카테고리를 선택한 이후에도 공지로 리스트 상단에 보임.
공지사항은 특정한 카테고리를 선택하더라도 항상 리스트 상단에 보여주게 하고 싶습니다.
예) 공지사항 글을 작성할 때 카테고리에서 "공지" 선택 및 공지 체크
-> 리스트 상단에 공지글 보임.
-> 특정한 카테고리를 선택한 이후에도 공지로 리스트 상단에 보임.
댓글 4개
bbs/list.php
// 년도 2자리
$today2 = $g4[time_ymd];
$list = array();
$i = 0;
if (!$sca && !$stx)
{
$arr_notice = explode("\n", trim($board[bo_notice]));
for ($k=0; $k<count($arr_notice); $k++)
{
if (trim($arr_notice[$k])=='') continue;
$row = sql_fetch(" select * from $write_table where wr_id = '$arr_notice[$k]' ");
if (!$row[wr_id]) continue;
$list[$i] = get_list($row, $board, $board_skin_path, $board[bo_subject_len]);
$list[$i][is_notice] = true;
$i++;
}
}
else if ($sca && !$stx) { // 해당분류 공지출력 위한 추가 start ★★
$arr_notice = split("\n", trim($board[bo_notice]));
for ($k=0; $k<count($arr_notice); $k++)
{
if (trim($arr_notice[$k])=='') continue;
$row = sql_fetch(" select * from $write_table where wr_id = '$arr_notice[$k]' and ca_name = '$sca' ");
if (!$row[wr_id]) continue;
$list[$i] = get_list($row, $board, $board_skin_path, $board[bo_subject_len]);
$list[$i][is_notice] = true;
$i++;
}
} // 해당분류 공지출력 위한 추가 end ★★
$k = 0;
// 년도 2자리
$today2 = $g4[time_ymd];
$list = array();
$i = 0;
if (!$sca && !$stx)
{
$arr_notice = explode("\n", trim($board[bo_notice]));
for ($k=0; $k<count($arr_notice); $k++)
{
if (trim($arr_notice[$k])=='') continue;
$row = sql_fetch(" select * from $write_table where wr_id = '$arr_notice[$k]' ");
if (!$row[wr_id]) continue;
$list[$i] = get_list($row, $board, $board_skin_path, $board[bo_subject_len]);
$list[$i][is_notice] = true;
$i++;
}
}
else if ($sca && !$stx) { // 해당분류 공지출력 위한 추가 start ★★
$arr_notice = split("\n", trim($board[bo_notice]));
for ($k=0; $k<count($arr_notice); $k++)
{
if (trim($arr_notice[$k])=='') continue;
$row = sql_fetch(" select * from $write_table where wr_id = '$arr_notice[$k]' and ca_name = '$sca' ");
if (!$row[wr_id]) continue;
$list[$i] = get_list($row, $board, $board_skin_path, $board[bo_subject_len]);
$list[$i][is_notice] = true;
$i++;
}
} // 해당분류 공지출력 위한 추가 end ★★
$k = 0;
게시글 목록
| 번호 | 제목 |
|---|---|
| 284438 | |
| 284437 | |
| 284435 | |
| 284430 | |
| 284420 | |
| 284417 | |
| 284409 | |
| 284401 | |
| 284399 | |
| 284397 | |
| 284380 | |
| 284378 | |
| 284371 | |
| 284370 | |
| 284366 | |
| 284364 | |
| 284360 | |
| 284357 | |
| 284355 | |
| 284354 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기