가로 카테고리 전체 갯수가 2자리수 한줄로 나타나게 할려면....... > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

가로 카테고리 전체 갯수가 2자리수 한줄로 나타나게 할려면....... 정보

가로 카테고리 전체 갯수가 2자리수 한줄로 나타나게 할려면.......

본문

그림과 같이 전체수가가 두자리 수면 두줄로 돼는데 한줄로 나타나게 할려면......
( )한자리 수면 한줄로 나타나는데요 (  )자리 수가 돼니까 2줄로 나타나내요 ...  플리즈~~~

====== category.php =====
<style type='text/css'>
/*-- 카테고리명 --*/
.cate  {font-family:Tahoma,굴림,arial; color:#666666; font-size:12px;}
a.cate:link, a.b_ca:visited, a.b_ca:active {font-family:Tahoma,굴림,arial; color:#666666; font-size:12px;}
a.cate:hover {font-family:Tahoma,굴림, arial; color:#FF6600; font-size:12px; text-decoration:underline;}
</style>

<? $cnt_bo_1 =  4; // 한줄당 분류 갯수 ?>

<? 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_is_comment = 0 ";
    $row1 = sql_fetch($sql1);       
            $str .= "<td><img src='{$board_skin_path}/img/ico_folder.gif' width='13' height='11'>&nbsp;<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_is_comment = 0 ";
    $row2 = sql_fetch($sql2);
    $total_count = $row2[cCount]
?>

<table width=100% cellspacing=1 cellpadding=4 border=0 style=table-layout:fixed>
<col width=75></col>
<col width=20></col>
<col width=></col>

<tr bgcolor=white>
<td width='' align='center'>
<img src='<?=$board_skin_path?>/img/ico_folder.gif' width='13' height='11'>&nbsp;<a class='cate' href='./board.php?bo_table=<?=$bo_table?>&sca=<?=$arr[$i]?>&sop=&sst=wr_1&sod=desc&sfl=&stx=&page=1'><b>전체&nbsp;(<?=number_format($total_count)?>)</b></a>
</td>
<td nowrap>&nbsp;</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>
<!-- 분류 셀렉트 박스 끝 -->
<? } ?>
  • 복사

댓글 전체

© SIRSOFT
현재 페이지 제일 처음으로