정말 죄송한 질문... 겸... 부탁... (카테고리 가로표현) 정보
정말 죄송한 질문... 겸... 부탁... (카테고리 가로표현)본문
<? $cnt_bo_1 = 5; // 한줄당 분류 갯수 ?>
<? if (!$wr_id) { ?>
<!-- 분류 셀렉트 박스 시작 -->
<?
$cnt = 1;
$sql = " SELECT bo_category_list FROM $g4[board_table] WHERE bo_table = '$bo_table' ";
$row = sql_fetch($sql);
$arr = explode("|", $row[bo_category_list]); // 구분자가 , 로 되어 있음
$str = "";
$str .= "<tr>";
for ($i=0; $i<count($arr); $i++)
if (trim($arr[$i])) {
$sql1 = " SELECT count(*) as cCount FROM $write_table WHERE ca_name = '$arr[$i]' and wr_comment >= 0 ";
$row1 = sql_fetch($sql1);
$str .= "<td><img src='{$board_skin_path}/img/a02.gif' width='25' height='25' align='absmiddle'> <a class='cate' href='./board.php?bo_table=$bo_table&sca=$arr[$i]&sop=&sst=wr_1&sod=desc&sfl=&stx=&page=1'>$arr[$i] ($row1[cCount])</a></td>";
if ($cnt == $cnt_bo_1) { $cnt = 0; $str .= "</tr><tr>"; }
$cnt++;
}
$sql2 = " SELECT count(*) as cCount FROM $write_table WHERE wr_comment >= 0 ";
$row2 = sql_fetch($sql2);
$Total_Cat = $row2[cCount]
?>
<table width=100% cellspacing=0 cellpadding=4 border=0 style="border:1 solid #dddddd;table-layout:fixed">
<col width=75></col>
<col width=20></col>
<col width=></col>
<tr>
<td width='' align='center'>
<img src='<?=$board_skin_path?>/img/ico_folder.gif' width='13' height='11'> <a class='cate' href='./board.php?bo_table=<?=$bo_table?>&sca=<?=$arr[$i]?>&sop=&sst=wr_1&sod=desc&sfl=&stx=&page=1'><b>전체 (<?=number_format($total_count)?>)</b></a>
</td>
<td nowrap> </td>
<td width='' style='word-break:break-all;'>
<table border=0 cellspacing=0 cellpadding=0 width=100%>
<span class="cate"><?=$str?></span>
</table>
</td>
</tr>
</table>
<!-- 분류 셀렉트 박스 끝 -->
<? } ?>
--------------------------------------------------------------------------------------
어느 분의 스킨중에서 카테고리를 가로로 표현하는 category.php 입니다.
프로그램이라곤 하나도 모르고 오로지 <table>만 아는지라
주석좀 달아주셨으면... ㅜ.ㅜ
목록에서 카테고리명(게시물갯수) ... 이렇게 표시가 되는데요...
게시물에 코멘트를 달면 케시물갯수에 플러스가 되버립니다...
예를 들면 게시물은 한개인데 그 게시물에 코멘트를 두대 달면
카테고리명(3) <---- 이렇게 되거든요...
<? if (!$wr_id) { ?>
<!-- 분류 셀렉트 박스 시작 -->
<?
$cnt = 1;
$sql = " SELECT bo_category_list FROM $g4[board_table] WHERE bo_table = '$bo_table' ";
$row = sql_fetch($sql);
$arr = explode("|", $row[bo_category_list]); // 구분자가 , 로 되어 있음
$str = "";
$str .= "<tr>";
for ($i=0; $i<count($arr); $i++)
if (trim($arr[$i])) {
$sql1 = " SELECT count(*) as cCount FROM $write_table WHERE ca_name = '$arr[$i]' and wr_comment >= 0 ";
$row1 = sql_fetch($sql1);
$str .= "<td><img src='{$board_skin_path}/img/a02.gif' width='25' height='25' align='absmiddle'> <a class='cate' href='./board.php?bo_table=$bo_table&sca=$arr[$i]&sop=&sst=wr_1&sod=desc&sfl=&stx=&page=1'>$arr[$i] ($row1[cCount])</a></td>";
if ($cnt == $cnt_bo_1) { $cnt = 0; $str .= "</tr><tr>"; }
$cnt++;
}
$sql2 = " SELECT count(*) as cCount FROM $write_table WHERE wr_comment >= 0 ";
$row2 = sql_fetch($sql2);
$Total_Cat = $row2[cCount]
?>
<table width=100% cellspacing=0 cellpadding=4 border=0 style="border:1 solid #dddddd;table-layout:fixed">
<col width=75></col>
<col width=20></col>
<col width=></col>
<tr>
<td width='' align='center'>
<img src='<?=$board_skin_path?>/img/ico_folder.gif' width='13' height='11'> <a class='cate' href='./board.php?bo_table=<?=$bo_table?>&sca=<?=$arr[$i]?>&sop=&sst=wr_1&sod=desc&sfl=&stx=&page=1'><b>전체 (<?=number_format($total_count)?>)</b></a>
</td>
<td nowrap> </td>
<td width='' style='word-break:break-all;'>
<table border=0 cellspacing=0 cellpadding=0 width=100%>
<span class="cate"><?=$str?></span>
</table>
</td>
</tr>
</table>
<!-- 분류 셀렉트 박스 끝 -->
<? } ?>
--------------------------------------------------------------------------------------
어느 분의 스킨중에서 카테고리를 가로로 표현하는 category.php 입니다.
프로그램이라곤 하나도 모르고 오로지 <table>만 아는지라
주석좀 달아주셨으면... ㅜ.ㅜ
목록에서 카테고리명(게시물갯수) ... 이렇게 표시가 되는데요...
게시물에 코멘트를 달면 케시물갯수에 플러스가 되버립니다...
예를 들면 게시물은 한개인데 그 게시물에 코멘트를 두대 달면
카테고리명(3) <---- 이렇게 되거든요...
댓글 전체
그래도 않되는군요... ㅠ.ㅠ