utf8 형식 분류문제 정보
utf8 형식 분류문제본문
안녕하세요 제가 글을작성하는 게시판이 있습니다
완료사항에 대해서는 셀렉트문을 사용하여 자동으로 입력이 되도록 사용하고 있구요
-입력부분 소스 -
<td style=" border: 1px solid #404040;" bgcolor="#FFFFFF" >
<select name=ca_name required itemname="분류" style="border:0px; word-break:break-all; font-size:10pt; Width:100%;" required>
<option value='' <? if($row['ca_name'] == '') echo 'selected'; ?>>선택</option>
<option value='진행중' <? if($row['ca_name'] == '진행중') echo 'selected'; ?>>진행중</option>
<option value='완료' <? if($row['ca_name'] == '완료') echo 'selected'; ?>>완료</option>
<option value='보류' <? if($row['ca_name'] == '보류') echo 'selected'; ?>>보류</option>
</select>
</td>
그런데 익스플로러 7이상에서는 리스트 화면에서 선택시 분류가 제대로 나오는데요
익스플로러 6에서는 분류선택시 글이 없다고 나옵니다 신기한건 보류는 제대로 나오고요 앞에
두개 진행중 완료를 선택하면 글이없다고 나오네요
여기 검색해서 unicode 적용해야 한다해서 확인해보니 그누보드에서는 다 적용되어 있구요
- 분류에 대한 소스 -
<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 = 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_is_comment = 0 ";
$row1 = sql_fetch($sql1);
$str .= "<td><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'>$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_Cat = $row2[cCount]
?>
<table width=100% cellspacing=1 cellpadding=4 border=0 style=table-layout:fixed>
<tr bgcolor=white>
<td colspan=3><img src='<?=$board_skin_path?>/img/ico_folder.gif' width='13' height='11'> <b><?=$board[bo_subject]?></b> <FONT COLOR="#408080">부서별 등록 </FONT><a class='cate' href='./board.php?bo_table=<?=$bo_table?>&sca=<?=$arr[$i]?>&sop=&sst=wr_1&sod=desc&sfl=&stx=&page=1'>총 <?=number_format($total_count)?>건 등록</a></td>
</tr>
<col width=50></col>
<col width=></col>
<col width=40></col>
<tr bgcolor=white>
<td align='center'></td>
<td width='' style='word-break:break-all;'nowrap>
<table border=0 cellspacing=0 cellpadding=0 width=100%>
<span class="cate"><?=$str?></span>
</table></td>
<td></td>
</tr>
</table>
<!-- 분류 셀렉트 박스 끝 -->
<? } ?>
사용하는 사람들 모두 익스플로러를 업데이트 하라고 할수는 없는거고
해결방법은 없을까요?
완료사항에 대해서는 셀렉트문을 사용하여 자동으로 입력이 되도록 사용하고 있구요
-입력부분 소스 -
<td style=" border: 1px solid #404040;" bgcolor="#FFFFFF" >
<select name=ca_name required itemname="분류" style="border:0px; word-break:break-all; font-size:10pt; Width:100%;" required>
<option value='' <? if($row['ca_name'] == '') echo 'selected'; ?>>선택</option>
<option value='진행중' <? if($row['ca_name'] == '진행중') echo 'selected'; ?>>진행중</option>
<option value='완료' <? if($row['ca_name'] == '완료') echo 'selected'; ?>>완료</option>
<option value='보류' <? if($row['ca_name'] == '보류') echo 'selected'; ?>>보류</option>
</select>
</td>
그런데 익스플로러 7이상에서는 리스트 화면에서 선택시 분류가 제대로 나오는데요
익스플로러 6에서는 분류선택시 글이 없다고 나옵니다 신기한건 보류는 제대로 나오고요 앞에
두개 진행중 완료를 선택하면 글이없다고 나오네요
여기 검색해서 unicode 적용해야 한다해서 확인해보니 그누보드에서는 다 적용되어 있구요
- 분류에 대한 소스 -
<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 = 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_is_comment = 0 ";
$row1 = sql_fetch($sql1);
$str .= "<td><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'>$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_Cat = $row2[cCount]
?>
<table width=100% cellspacing=1 cellpadding=4 border=0 style=table-layout:fixed>
<tr bgcolor=white>
<td colspan=3><img src='<?=$board_skin_path?>/img/ico_folder.gif' width='13' height='11'> <b><?=$board[bo_subject]?></b> <FONT COLOR="#408080">부서별 등록 </FONT><a class='cate' href='./board.php?bo_table=<?=$bo_table?>&sca=<?=$arr[$i]?>&sop=&sst=wr_1&sod=desc&sfl=&stx=&page=1'>총 <?=number_format($total_count)?>건 등록</a></td>
</tr>
<col width=50></col>
<col width=></col>
<col width=40></col>
<tr bgcolor=white>
<td align='center'></td>
<td width='' style='word-break:break-all;'nowrap>
<table border=0 cellspacing=0 cellpadding=0 width=100%>
<span class="cate"><?=$str?></span>
</table></td>
<td></td>
</tr>
</table>
<!-- 분류 셀렉트 박스 끝 -->
<? } ?>
사용하는 사람들 모두 익스플로러를 업데이트 하라고 할수는 없는거고
해결방법은 없을까요?
댓글 전체
unicode 적용해야 한다해서 확인해보니 그누보드에서는 다 적용되어 있구요 <-- 이게 무슨 얘긴가요?
common.php 의 $qstr .= '&sca=' . urlencode($sca); 이것을 말하는 것인가요?
이 코드는 아래 링크 코드와 아무 상관도 없습니다
아래 코드에 urlencode를 적용시켜야죠
$sca_str=urlencode($arr[$i]);
$str .= "<td><img src='{$board_skin_path}/img/ico_folder.gif' width='13' height='11'> <a class='cate' href='./board.php?bo_table=$bo_table&sca=$sca_str&sop=&sst=wr_1&sod=desc&sfl=&stx=&page=1'>$arr[$i] ($row1[cCount])</a></td>";
common.php 의 $qstr .= '&sca=' . urlencode($sca); 이것을 말하는 것인가요?
이 코드는 아래 링크 코드와 아무 상관도 없습니다
아래 코드에 urlencode를 적용시켜야죠
$sca_str=urlencode($arr[$i]);
$str .= "<td><img src='{$board_skin_path}/img/ico_folder.gif' width='13' height='11'> <a class='cate' href='./board.php?bo_table=$bo_table&sca=$sca_str&sop=&sst=wr_1&sod=desc&sfl=&stx=&page=1'>$arr[$i] ($row1[cCount])</a></td>";
아~ 드디어 해결했네요 감사합니다 균이님 ^^