latest.lib.php 최신글이 아닌 공지글만 모두 가져오기
// 공지로 체크된 글만 가져오기
function latest_notice($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options="")
{
global $g4;
if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/basic";
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/basic";
$list = array();
$sql = " select * from $g4[board_table] where bo_table = '$bo_table'";
$board = sql_fetch($sql);
$tmp_write_table = $g4['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
$data = split("\n", $board[bo_notice]);
$sqlwhere = "";
for ($i=0;$i < COUNT($data);$i++) {
//echo "[" . $i . "]<br>";
if ($data[$i]) {
if ($sqlwhere) $sqlwhere .= " or ";
$sqlwhere .= " wr_id = '" . $data[$i] . "' ";
}
}
if (COUNT($data) < 1) { // 공지사항으로 체크된 것이 없을때
$sqlwhere = " 1 ";
}
// 공지시로 체크된 것 모두 가져오기
$sql = " select * from $tmp_write_table where wr_is_comment = 0
and ( $sqlwhere )
order by wr_num";
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++)
$list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
$sqlwhere = "";
for ($i=0;$i < COUNT($data);$i++) {
//echo "[" . $i . "]<br>";
if ($data[$i]) {
if ($sqlwhere) $sqlwhere .= " or ";
$sqlwhere .= " wr_id = '" . $data[$i] . "' ";
}
}
if (COUNT($data) < 1) { // 공지사항으로 체크된 것이 없을때
$sqlwhere = " 1 ";
}
// 공지시로 체크된 것 모두 가져오기
$sql = " select * from $tmp_write_table where wr_is_comment = 0
and ( $sqlwhere )
order by wr_num";
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++)
$list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
}
게시판 목록
그누4 팁자료실
그누보드4와 관련된 팁을 여러분들과 함께 공유하세요.
나누면 즐거움이 커집니다.
나누면 즐거움이 커집니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 3289 | 9년 전 | 4819 | ||
| 3288 | 9년 전 | 5803 | ||
| 3287 |
|
9년 전 | 3508 | |
| 3286 |
또치하우스
|
9년 전 | 12303 | |
| 3285 | 9년 전 | 11506 | ||
| 3284 |
다람쥐7마리
|
10년 전 | 4685 | |
| 3283 |
블랙초콜렛더블샷
|
10년 전 | 5974 | |
| 3282 |
또치하우스
|
10년 전 | 10272 | |
| 3281 | 10년 전 | 9789 | ||
| 3280 | 10년 전 | 4994 | ||
| 3279 | 10년 전 | 4275 | ||
| 3278 | 10년 전 | 5359 | ||
| 3277 |
|
10년 전 | 5268 | |
| 3276 | 10년 전 | 5781 | ||
| 3275 | 10년 전 | 4352 | ||
| 3274 | 10년 전 | 5595 | ||
| 3273 | 10년 전 | 6910 | ||
| 3272 | 10년 전 | 7223 | ||
| 3271 | 10년 전 | 4937 | ||
| 3270 |
|
10년 전 | 5406 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기