최근게시물에서 게시판 제목출력방법이 궁금합니다. 정보
최근게시물에서 게시판 제목출력방법이 궁금합니다.본문
<div class="<?=$style_name?>">
<div style="border:0px solid #fff">
<div class="subject" style="border-bottom:1px dotted #b1b1b1">
<div class="bo_table"><span class="title_s">최신글</span> <span class="title_o">new</span></div>
</div>
<? for ($a=0; $a<$rows/5; $a++) {?>
<? if ($a > 0) echo "<div class='line'></div>"; ?>
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<? if ($is_img && $file[0]) { ?>
<td width=120 align=center class=file>
<a href="<?=$file[0][href]?>"><div><img src="<?=$file[0][path]?>" class="file-img"></div> <div class="file-subject"><?=$file[0][subject]?></div></a>
</td>
<? } ?>
<td valign=top>
<ul>
<?
$s = $a*5;
$e = ($a+1)*5;
$r = rand($s, $e-1);
for ($i=$s; $i<$e; $i++) {
if ($r == $i) $list[$i][subject] = "<strong>".$list[$i][subject]."</strong>";
if ($list[$i][icon_secret]) $list[$i][subject] .= " " . $list[$i][icon_secret];
if ($list[$i][icon_file]) $list[$i][subject] .= " " . $list[$i][icon_file];
if ($list[$i][icon_new]) $list[$i][subject] .= " " . $list[$i][icon_new];
//if ($list[$i][icon_hot]) $list[$i][subject] .= " " . $list[$i][icon_hot];
$list[$i][subject] = mw_builder_reg_str($list[$i][subject]);
?>
<li><a href="<?=$list[$i][href]?>"><span class="Num_stitle">[<?=$list[$i][bo_subject]?>] /</span> <?=$list[$i][subject]?></a></li>
<? } ?>
</ul>
</td>
</tr>
</table>
위와 같은 소스를 사용중이며 .. 출력되는 부분에 게시판 제목을 넣기위해서
[<?=$list[$i][bo_subject]?>] 이렇게 넣었지만 출력이 되질 않습니다.
어떤 방법이 있을까요?
<div style="border:0px solid #fff">
<div class="subject" style="border-bottom:1px dotted #b1b1b1">
<div class="bo_table"><span class="title_s">최신글</span> <span class="title_o">new</span></div>
</div>
<? for ($a=0; $a<$rows/5; $a++) {?>
<? if ($a > 0) echo "<div class='line'></div>"; ?>
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<? if ($is_img && $file[0]) { ?>
<td width=120 align=center class=file>
<a href="<?=$file[0][href]?>"><div><img src="<?=$file[0][path]?>" class="file-img"></div> <div class="file-subject"><?=$file[0][subject]?></div></a>
</td>
<? } ?>
<td valign=top>
<ul>
<?
$s = $a*5;
$e = ($a+1)*5;
$r = rand($s, $e-1);
for ($i=$s; $i<$e; $i++) {
if ($r == $i) $list[$i][subject] = "<strong>".$list[$i][subject]."</strong>";
if ($list[$i][icon_secret]) $list[$i][subject] .= " " . $list[$i][icon_secret];
if ($list[$i][icon_file]) $list[$i][subject] .= " " . $list[$i][icon_file];
if ($list[$i][icon_new]) $list[$i][subject] .= " " . $list[$i][icon_new];
//if ($list[$i][icon_hot]) $list[$i][subject] .= " " . $list[$i][icon_hot];
$list[$i][subject] = mw_builder_reg_str($list[$i][subject]);
?>
<li><a href="<?=$list[$i][href]?>"><span class="Num_stitle">[<?=$list[$i][bo_subject]?>] /</span> <?=$list[$i][subject]?></a></li>
<? } ?>
</ul>
</td>
</tr>
</table>
위와 같은 소스를 사용중이며 .. 출력되는 부분에 게시판 제목을 넣기위해서
[<?=$list[$i][bo_subject]?>] 이렇게 넣었지만 출력이 되질 않습니다.
어떤 방법이 있을까요?
댓글 전체

latest 함수를 사용 하시는 거라면
$board['bo_subject'] 가 존재 할텐데요?^^
아니라면 $board 변수를 쿼리로 불러오는 수 밖에 없겠네요.
$sql = " select * from {$g4['board_table']} where bo_table = '$bo_table'";
$board = sql_fetch($sql);
$board['bo_subject'] 가 존재 할텐데요?^^
아니라면 $board 변수를 쿼리로 불러오는 수 밖에 없겠네요.
$sql = " select * from {$g4['board_table']} where bo_table = '$bo_table'";
$board = sql_fetch($sql);
제가 초보라 잘 모릅니다 .. 그래서 $board['bo_subject']이함수로
<li><a href="<?=$list[$i][href]?>"><span class="Num_stitle">[<?= $board['bo_subject']?>] /</span> <?=$list[$i][subject]?></a></li>
이렇게 집어넣었더니 최근게시물을 불러오는 부분에서
게시판 제목이 한개만 출력되네요.
글 종류별로 게시판제목이 다르게 나와야하는데 ...
<li><a href="<?=$list[$i][href]?>"><span class="Num_stitle">[<?= $board['bo_subject']?>] /</span> <?=$list[$i][subject]?></a></li>
이렇게 집어넣었더니 최근게시물을 불러오는 부분에서
게시판 제목이 한개만 출력되네요.
글 종류별로 게시판제목이 다르게 나와야하는데 ...