공지사항 카운트 관련 문의
관련링크
본문
아래 사진 보시면, 공지사항에 번호가 카운터 되지 않습니다. 뭐가 문제 일까요?
어떤 소스를 넣어야 읽혀 질지 알려주시면 고맙겠습니다. ㅠㅠ
<!-- 제목 -->
<form name="fboardlist" method="post">
<input type='hidden' name='bo_table' value='<?=$bo_table?>'>
<input type='hidden' name='sfl' value='<?=$sfl?>'>
<input type='hidden' name='stx' value='<?=$stx?>'>
<input type='hidden' name='spt' value='<?=$spt?>'>
<input type='hidden' name='page' value='<?=$page?>'>
<input type='hidden' name='sw' value=''>
<table cellspacing="0" cellpadding="0" class="board_list">
<col width="50" />
<? if ($is_checkbox) { ?><col width="40" /><? } ?>
<col />
<col width="110" />
<col width="40" />
<col width="50" />
<? if ($is_good) { ?><col width="40" /><? } ?>
<? if ($is_nogood) { ?><col width="40" /><? } ?>
<tr>
<th>Number</th>
<? if ($is_checkbox) { ?><th><input onclick="if (this.checked) all_checked(true); else all_checked(false);" type="checkbox"></th><?}?>
<th>Title</th>
<th>Wirter</th>
<th><?=subject_sort_link('wr_datetime', $qstr2, 1)?>Date</a></th>
<th><?=subject_sort_link('wr_hit', $qstr2, 1)?>Views</a></th>
<? if ($is_good) { ?><th><?=subject_sort_link('wr_good', $qstr2, 1)?>Recommendation</a></th><?}?>
<? if ($is_nogood) { ?><th><?=subject_sort_link('wr_nogood', $qstr2, 1)?>Non-recommendation</a></th><?}?>
</tr>
<?
for ($i=0; $i<count($list); $i++) {
$bg = $i%2 ? 0 : 1;
?>
<tr class="bg<?=$bg?>">
<td class="num">
<?
if ($list[$i][is_notice]) // 공지사항
echo "<b>Annoncement</b>";
else if ($wr_id == $list[$i][wr_id]) // 현재위치
echo "<span class='current'>{$list[$i][num]}</span>";
else
echo $list[$i][num];
?>
</td>
<? if ($is_checkbox) { ?>
<td class="checkbox"><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"></td><? } ?>
<td class="subject" valign="top" style="padding:15 0 15 0;">
<?
//사진 가져오기
$pic_width= 150; //사진의 보여질 가로
$pic_height = 110; //사진의 보여질 세로
$pic = "";
$check = @getimagesize($g4[path]."/data/file/$bo_table/".$list[$i][file][0][file]);
if($list[$i][file][0][file] and $check[0] >0){
$pic = makeThumbs($g4[path]."/data/file/$bo_table", $list[$i][file][0][file], $pic_width, $pic_height, $list[$i][subject]);
}else{
$img_tags = explode("src=",$list[$i][wr_content]);
$img_tag = explode(" ",$img_tags[1]);
$img_url = explode(">",$img_tag[0]);
$real_img_url = $img_url[0];
$clear_img_url = str_replace('"','',$real_img_url);
if($clear_img_url){
$pic = "<img src=$clear_img_url width=$pic_width height=$pic_height border=0>";
}
}
if($pic == ""){$pic = "";}
답변 2
<? if ($is_checkbox) { ?><col width="40" /><? } ?>
<col />
<col width="110" />
상단 부분을 아래와 같이 수정해 보세요.
<? if ($is_checkbox) { ?><col width="40" /><? } ?>
<col width="50" />
<col width="110" />
답변 채택해 주셔서 감사드립니다. (_ _)