[팁] 출력하고 싶은 최신글만 출력하자...^^ 정보
[팁] 출력하고 싶은 최신글만 출력하자...^^
첨부파일
본문
3개의 파일을 클럽에 업로드하세요...
cb_latest.inc.php ===> 은 include폴더
아래의 두파일을 club폴더 club.lib.php파일이 있는 곳에 올리세요
cm_menulevel.php
cm_menulevel.update.php
cb_latest.inc.php ===> 은 include폴더
아래의 두파일을 club폴더 club.lib.php파일이 있는 곳에 올리세요
cm_menulevel.php
cm_menulevel.update.php
추천
0
0
댓글 전체

cb_latest.inc.php 파일을 수정요...^^
<?
$col_width = 100 / $cb[cb_latest_cols]. "%";
$board = sql_fetch(" select * from $g4[board_table] where bo_table = '$cb[cb_id]' ");
$cn_list = explode("|", $board[bo_category_list]);
?>
<table width="100%" border="0">
<?
$ja = 0;
for ($j=0; $j<count($cn_list); $j++) {
$sql = " select *
from $nc[tbl_menu]
where cb_id = '$cb[cb_id]'
and cn_1 = 'Y'
and cn_name = '$cn_list[$j]'
order by cn_id";
$result = sql_fetch($sql);
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++) {
if (!$cn_list[$j]) { continue; }
if ($ja != 0 && $ja%$cb[cb_latest_cols] == 0) { echo "</tr><tr>"; }
echo "<td width='$col_width' height='150' valign='top'>". cb_latest($cb[cb_latest_skin], $cb[cb_id], $row[cn_name], $cb[cb_latest_rows], $cb[cb_latest_len]). "</td>\n";
$ja++;
}
}
?>
</table>
<?
$col_width = 100 / $cb[cb_latest_cols]. "%";
$board = sql_fetch(" select * from $g4[board_table] where bo_table = '$cb[cb_id]' ");
$cn_list = explode("|", $board[bo_category_list]);
?>
<table width="100%" border="0">
<?
$ja = 0;
for ($j=0; $j<count($cn_list); $j++) {
$sql = " select *
from $nc[tbl_menu]
where cb_id = '$cb[cb_id]'
and cn_1 = 'Y'
and cn_name = '$cn_list[$j]'
order by cn_id";
$result = sql_fetch($sql);
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++) {
if (!$cn_list[$j]) { continue; }
if ($ja != 0 && $ja%$cb[cb_latest_cols] == 0) { echo "</tr><tr>"; }
echo "<td width='$col_width' height='150' valign='top'>". cb_latest($cb[cb_latest_skin], $cb[cb_id], $row[cn_name], $cb[cb_latest_rows], $cb[cb_latest_len]). "</td>\n";
$ja++;
}
}
?>
</table>

굿~~~
넘좋아요~~
넘좋아요~~
정말 유용한 팁입니다.