게시판 리스트에서...
본문
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $board['bo_subject'] ?> 목록</caption>
<thead>
<tr>
<th scope="col">번호</th>
<?php if ($is_checkbox) { ?>
<th scope="col">
<label for="chkall" class="sound_only">현재 페이지 게시물 전체</label>
<input type="checkbox" id="chkall" onclick="if (this.checked) all_checked(true); else all_checked(false);">
</th>
<?php } ?>
<th scope="col">사진</th>
<th scope="col">제목</th>
<th scope="col">글쓴이</th>
<th scope="col"><?php echo subject_sort_link('wr_datetime', $qstr2, 1) ?>날짜</a></th>
<th scope="col"><?php echo subject_sort_link('wr_hit', $qstr2, 1) ?>조회</a></th>
<?php if ($is_good) { ?><th scope="col"><?php echo subject_sort_link('wr_good', $qstr2, 1) ?>추천</a></th><?php } ?>
<?php if ($is_nogood) { ?><th scope="col"><?php echo subject_sort_link('wr_nogood', $qstr2, 1) ?>비추천</a></th><?php } ?>
</tr>
</thead>
<tbody>
<?php
for ($i=0; $i<count($list); $i++) {
?>
<tr class="<?php if ($list[$i]['is_notice']) echo "bo_notice"; ?>">
<td class="td_num">
<?php
if ($list[$i]['is_notice']) // 공지사항
echo '<strong>공지</strong>';
else if ($wr_id == $list[$i]['wr_id'])
echo "<span class=\"bo_current\">열람중</span>";
else
echo $list[$i]['num'];
?>
</td>
<?php if ($is_checkbox) { ?>
<td class="td_chk">
<label for="chk_wr_id_<?php echo $i ?>" class="sound_only"><?php echo $list[$i]['subject'] ?></label>
<input type="checkbox" name="chk_wr_id[]" value="<?php echo $list[$i]['wr_id'] ?>" id="chk_wr_id_<?php echo $i ?>">
</td>
<?php } ?>
<td class="td_img">
<a href="<?php echo $list[$i]['href'] ?>">
<?php
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], 50, 50);
if($thumb['src']) {
$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="50" height="50">';
} else {
$img_content = '<div style="width:50px;height:40px;padding-top:20px;text-align:center;border:1px solid #dcdcdc;">*******</div>';
}
//} else {
// $img_content = '<img src='.$board_skin_url.'/img/no_img.gif width="'.$imgwidth.'" height="'.$imgheight.'">';
// }
echo $img_content;
?>
</a>
</td>
<td class="td_subject">
<?php
echo $list[$i]['icon_reply'];
if ($is_category && $list[$i]['ca_name']) {
?>
<a href="<?php echo $list[$i]['ca_name_href'] ?>" class="bo_cate_link"><?php echo $list[$i]['ca_name'] ?></a>
<?php } ?>
******* 부분에 제목이 나오게 하고싶은데....어떡해야하는지 알려주시면 감사하겠습니다...
답변 2
$list[$i]['subject']를 넣으시거나
$img_content = '<div style="width:50px;height:40px;padding-top:20px;text-align:center;border:1px solid #dcdcdc;">'.$list[$i]['subject'].'</div>';
'.$list[$i]['subject'].'