<?
include_once("./_common.php");
// 1차 카테고리 출력
$str = "";
$exists = false;
$depth2_ca_id = substr($ca_id, 0, 2);
$sql = " select ca_id, ca_name from $g4[yc4_category_table] where ca_id like '${depth2_ca_id}%' and length(ca_id) = 4 and ca_use = '1' order by ca_id ";
$result = sql_query($sql);
$list_mod = 5; ///////////////////////////////////////////////////// 가로 갯수
for ($i=0; $row=sql_fetch_array($result); $i++) {
if ($i > 0 && $i % $list_mod == 0) {
$str .= "\n";
}
$str .= "<li><a href='./list.php?ca_id=$row[ca_id]'>";
if (preg_match("/^$row[ca_id]/", $ca_id))
$font = "<font style='color:ff6600;font-size:11;font-weight:bold;'>";
else
$font = "<font style='font-size:11;'>";
$str .= "{$font}$row[ca_name]</font>";
$exists = true;
$str .= "</a> </li>";
}
if ($exists) {
echo "
<ul>
$str
</ul>";
}
// 2차 카테고리 출력 (1차 분류에 속한 것만)
$str2 = "";
$exists2 = false;
$depth2_ca_id = substr($ca_id, 0, 4);
$sql2 = " select ca_id, ca_name from $g4[yc4_category_table] where ca_id like '${depth2_ca_id}%' and length(ca_id) = 6 and ca_use = '1' order by ca_id ";
$result2 = sql_query($sql2);
//$str2 .= "<td style='border-width:1; border-color:#dddddd; border-style:solid;'><table width=100% border=0><tr>";
$list_mod2 = 5; ///////////////////////////////////////////////////// 가로 갯수
for ($j=0; $row=sql_fetch_array($result2); $i++) {
if ($j > 0 && $j % $list_mod2 == 0) {
$str2 .= "\n";
}
$str2 .= "<li><a href='./list.php?ca_id=$row[ca_id]'>";
if (preg_match("/^$row[ca_id]/", $ca_id))
$font = "<font style='color:0099ff;font-size:11;font-weight:bold;'>";
else
$font = "<font style='font-size:11;'>";
$str2 .= "{$font}$row[ca_name]</font>";
$exists2 = true;
$str2 .= "</a> </li>";
}
if (substr($ca_id,2,6)){
if ($exists2) {
echo "
<ul>
$str2
</ul>";
} }
// 3차 카테고리 출력 (2차 분류에 속한것만)
$str3 = "";
$exists3 = false;
$depth2_ca_id = substr($ca_id, 0, 6);
$sql3 = " select ca_id, ca_name from $g4[yc4_category_table] where ca_id like '${depth2_ca_id}%' and length(ca_id) = 8 and ca_use = '1' order by ca_id ";
$result3 = sql_query($sql3);
$list_mod3 = 5; ///////////////////////////////////////////////////// 가로 갯수
for ($l=0; $row=sql_fetch_array($result3); $i++) {
if ($l > 0 && $l % $list_mod3 == 0) {
$str3 .= "\n";
}
$str3 .= "<li><a href='./list.php?ca_id=$row[ca_id]'>";
if (preg_match("/^$row[ca_id]/", $ca_id))
$font = "<font style='color:000000;font-size:11;font-weight:bold;'>";
else
$font = "<font style='font-size:11;'>";
$str3 .= "{$font}$row[ca_name]</font>";
$exists3 = true;
$str3 .= "</a> </li>";
}
if (substr($ca_id,4,4)){
if ($exists3) {
echo "
<ul>
$str3
</ul>";
} }
?>
댓글 2개
게시글 목록
| 번호 | 제목 |
|---|---|
| 1214 | |
| 1208 | |
| 1205 | |
| 1198 | |
| 1196 | |
| 1195 | |
| 1187 | |
| 1181 | |
| 1179 | |
| 1178 | |
| 1174 | |
| 1162 | |
| 1152 | |
| 1149 | |
| 1145 | |
| 1124 | |
| 1123 | |
| 1116 | |
| 1507 | |
| 1114 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기