게시판 번호 등록 관련
본문
번호가 카운터가 안되네요.
잘못된 부분이 있는건가요?
있다면 어떤 부분을 어떻게 수정해야 카운터 될까요?
<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td colspan="6">
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
<div class="board_top">
<div style="float:left;">
<form name="fcategory" method="get" style="margin:0px;">
<? if ($is_category) { ?>
<select name=sca onchange="location='<?=$category_location?>'+<?=strtolower($g4[charset])=='euc-kr' ? "encodeURIComponent(this.value)" : "this.value"?>;">
<option value=''>전체</option>
<?=$category_option?>
</select>
</form>
</div>
<div style="float:right;">
<img src="<?=$board_skin_path?>/img/icon_total.gif" align="absmiddle" border='0'>
<span style="color:#888888; font-weight:bold;">Total <?=number_format($total_count)?></span>
<? if ($rss_href) { ?><a href='<?=$rss_href?>'><img src='<?=$board_skin_path?>/img/btn_rss.gif' border='0' align="absmiddle"></a><?}?>
<a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/btn_admin.gif" border='0' title="관리자" align="absmiddle"></a>
</div>
</div>
<? } ?>
<!-- 제목 -->
<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>번호</th>
<? if ($is_checkbox) { ?><th><input onclick="if (this.checked) all_checked(true); else all_checked(false);" type="checkbox"></th><?}?>
<th>제 목</th>
<th>글쓴이</th>
<th><?=subject_sort_link('wr_datetime', $qstr2, 1)?>날짜</a></th>
<th><?=subject_sort_link('wr_hit', $qstr2, 1)?>조회</a></th>
<? if ($is_good) { ?><th><?=subject_sort_link('wr_good', $qstr2, 1)?>추천</a></th><?}?>
<? if ($is_nogood) { ?><th><?=subject_sort_link('wr_nogood', $qstr2, 1)?>비추천</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>공지</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 = "";}
//사진과 제목 테이블
echo "
<Table width=100% height=100% border=0 cellspacing=0 cellpadding=0 class=board_list2>
<tr>
<td width=$pic_width height=$pic_height style=padding-right:30;><a href='{$list[$i][href]}'>$pic</a></td>
<td valign=top style=padding-right:20;>";
//제목 테이블
echo "
<Table width=100% border=0 cellspacing=0 cellpadding=0 valign=top>
<tr>
<td valign=top>";
echo $nobr_begin;
echo $list[$i][reply];
echo $list[$i][icon_reply];
if ($is_category && $list[$i][ca_name]) {
echo "<span class=small><font color=gray>[<a href='{$list[$i][ca_name_href]}'>{$list[$i][ca_name]}</a>]</font></span> ";
}
if ($list[$i][is_notice])
echo "<a href='{$list[$i][href]}'><span class=web_font12><b>{$list[$i][subject]}</b></span></a>";
else
echo "<a href='{$list[$i][href]}' class=btn12><span class=web_font14 style=color:#2b7bd6;><b>{$list[$i][subject]}</b></span></a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span class='comment'>{$list[$i][comment_cnt]}</span></a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
echo " " . $list[$i][icon_new];
echo " " . $list[$i][icon_file];
echo " " . $list[$i][icon_link];
echo " " . $list[$i][icon_hot];
echo " " . $list[$i][icon_secret];
echo $nobr_end;
$wr_content = cut_str(strip_tags($list[$i][wr_content]),300);
echo "
</td>
</tr>
<tr>
<td style=line-height:160%; style=padding-top:10px;><span><a href='{$list[$i][href]}'>".$wr_content."</a></span></td>
</tr>
</table>";
//제목 테이블 끝
echo "
</td>
</tr>
</table>
";
//사진과 제목 테이블 끝
?>
</td>
<td class="name"><?=$list[$i][name]?></td>
<td class="datetime"><?=$list[$i][datetime2]?></td>
<td class="hit"><?=$list[$i][wr_hit]?></td>
<? if ($is_good) { ?><td class="good"><?=$list[$i][wr_good]?></td><? } ?>
<? if ($is_nogood) { ?><td class="nogood"><?=$list[$i][wr_nogood]?></td><? } ?>
</tr>
<? } // end for ?>
<? if (count($list) == 0) { echo "<tr><td colspan='$colspan' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
</table>
</form>
<div class="board_button">
<div style="float:left;">
<? if ($list_href) { ?>
<a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/btn_list.gif" align="absmiddle" border='0'></a>
<? } ?>
<? if ($is_checkbox) { ?>
<a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/btn_select_delete.gif" align="absmiddle" border='0'></a>
<a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/btn_select_copy.gif" align="absmiddle" border='0'></a>
<a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/btn_select_move.gif" align="absmiddle" border='0'></a>
<? } ?>
</div>
<div style="float:right;">
<? if ($write_href) { ?><a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/btn_write.gif" border='0'></a><? } ?>
</div>
</div>