utf8 카테고리 페이징 처리 오류 ㅠㅠ 포인트 다드립니다... 정보
utf8 카테고리 페이징 처리 오류 ㅠㅠ 포인트 다드립니다...
본문
보안상 URL 알려드릴 수 없는점 대단히 죄송합니다..ㅜㅜ
알려주신분께 포인트 올인합니다.(11000점 있는데 많은건지 모르겠지만 ㅠㅠ)
문제 : 갤러리 게시판에 카테고리를 쓰고 있습니다. 카테고리는 한글로 쓰고 있으며
리스트에 각 한글로된 카테고리가 나오며 카테고리를 클릭하면 리스트 쫙~ 나옵니다.
근데 페이징처리가 안됩니다. 전체보기 카테고리는 페이징 처리가 되는데
카테리고로 들어가서 리스트하단에 1 ㅣ 2 ㅣ 3 ㅣ 4 ㅣ 5 ....등 나오면
이 페이지들이 안나옵니다.
카테고리는 가로형(목진철님 스킨에서 추출)을 인크루드해서 쓰고 있습니다.
관련부분 소스
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_comment >= 0 ";
$row1 = sql_fetch($sql1);
$str .= "<td height=20><img src='{$board_skin_path}/img/ico_folder.gif' width='13' height='11'>
<a class='cate' href=$g4[bbs_path]/board.php?bo_table=$bo_table&page=1&mode=&sca=".rawurlencode($arr[$i]).">$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=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'> <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>
<!-- 분류 셀렉트 박스 끝 -->
<? } ?>
------------------------------------------------------------------------------------
list.php(페이징 부분)
<!-- 페이지 -->
<div style="text-align:center; line-height:30px; clear:both; margin:5px 0 10px 0; padding:5px 0; font-family:gulim;">
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/page_search_prev.gif' border=0 align=absmiddle title='이전검색'></a>"; } ?>
<?
// 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
//echo $write_pages;
$write_pages = str_replace("처음", "<img src='$board_skin_path/img/page_begin.gif' border='0' align='absmiddle' title='처음'>", $write_pages);
$write_pages = str_replace("이전", "<img src='$board_skin_path/img/page_prev.gif' border='0' align='absmiddle' title='이전'>", $write_pages);
$write_pages = str_replace("다음", "<img src='$board_skin_path/img/page_next.gif' border='0' align='absmiddle' title='다음'>", $write_pages);
$write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/page_end.gif' border='0' align='absmiddle' title='맨끝'>", $write_pages);
$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<b><span style=\"color:#B3B3B3; font-size:12px;\">$1</span></b>", $write_pages);
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><span style=\"color:#4D6185; font-size:12px; text-decoration:underline;\">$1</span></b>", $write_pages);
?>
<?=$write_pages?>
<? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/page_search_next.gif' border=0 align=absmiddle title='다음검색'></a>"; } ?>
</div>
알려주신분께 포인트 올인합니다.(11000점 있는데 많은건지 모르겠지만 ㅠㅠ)
문제 : 갤러리 게시판에 카테고리를 쓰고 있습니다. 카테고리는 한글로 쓰고 있으며
리스트에 각 한글로된 카테고리가 나오며 카테고리를 클릭하면 리스트 쫙~ 나옵니다.
근데 페이징처리가 안됩니다. 전체보기 카테고리는 페이징 처리가 되는데
카테리고로 들어가서 리스트하단에 1 ㅣ 2 ㅣ 3 ㅣ 4 ㅣ 5 ....등 나오면
이 페이지들이 안나옵니다.
카테고리는 가로형(목진철님 스킨에서 추출)을 인크루드해서 쓰고 있습니다.
관련부분 소스
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_comment >= 0 ";
$row1 = sql_fetch($sql1);
$str .= "<td height=20><img src='{$board_skin_path}/img/ico_folder.gif' width='13' height='11'>
<a class='cate' href=$g4[bbs_path]/board.php?bo_table=$bo_table&page=1&mode=&sca=".rawurlencode($arr[$i]).">$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=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'> <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>
<!-- 분류 셀렉트 박스 끝 -->
<? } ?>
------------------------------------------------------------------------------------
list.php(페이징 부분)
<!-- 페이지 -->
<div style="text-align:center; line-height:30px; clear:both; margin:5px 0 10px 0; padding:5px 0; font-family:gulim;">
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/page_search_prev.gif' border=0 align=absmiddle title='이전검색'></a>"; } ?>
<?
// 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
//echo $write_pages;
$write_pages = str_replace("처음", "<img src='$board_skin_path/img/page_begin.gif' border='0' align='absmiddle' title='처음'>", $write_pages);
$write_pages = str_replace("이전", "<img src='$board_skin_path/img/page_prev.gif' border='0' align='absmiddle' title='이전'>", $write_pages);
$write_pages = str_replace("다음", "<img src='$board_skin_path/img/page_next.gif' border='0' align='absmiddle' title='다음'>", $write_pages);
$write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/page_end.gif' border='0' align='absmiddle' title='맨끝'>", $write_pages);
$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<b><span style=\"color:#B3B3B3; font-size:12px;\">$1</span></b>", $write_pages);
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><span style=\"color:#4D6185; font-size:12px; text-decoration:underline;\">$1</span></b>", $write_pages);
?>
<?=$write_pages?>
<? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/page_search_next.gif' border=0 align=absmiddle title='다음검색'></a>"; } ?>
</div>
댓글 전체