분류 이미지 따로 나타내기 정보
분류 이미지 따로 나타내기
본문
아래는 카테고리(분류)를 출력하는 소스 입니다.
ca_id = 분류 코드 ( 아이디 ) 입니다.
여기서 p02010 , p02020 은 아래 이미지 가 나오게 하고 싶습니다.
p2010 : img/1.jpg
p2020 : img/2.jpg
입니다.
위 경우를 제외한 카테고리 분류는 글자 그대로 나오면 되겠습니다.
부탁드립니다.
if($result){
$str .= "<tr><td width=11 background='$g4[shop_img_path]/ca_bg02.gif'></td>";
$str .= "<td><table width=100% border=0><tr><td>";
while ($row=sql_fetch_array($result)) {
if (preg_match("/^$row[ca_id]/", $ca_id))
$span = "<span style='font-weight:bold;'>";
$exists = true;
$span = "<span>";
$str .= "<a href='./list.php?ca_id=$row[ca_id]'>{$span}$row[ca_name]</span></a> ";
$exists = true;
}
$str .= "</td></tr></table></td><td width=11 background='$g4[shop_img_path]/ca_bg03.gif'></td>";
ca_id = 분류 코드 ( 아이디 ) 입니다.
여기서 p02010 , p02020 은 아래 이미지 가 나오게 하고 싶습니다.
p2010 : img/1.jpg
p2020 : img/2.jpg
입니다.
위 경우를 제외한 카테고리 분류는 글자 그대로 나오면 되겠습니다.
부탁드립니다.
if($result){
$str .= "<tr><td width=11 background='$g4[shop_img_path]/ca_bg02.gif'></td>";
$str .= "<td><table width=100% border=0><tr><td>";
while ($row=sql_fetch_array($result)) {
if (preg_match("/^$row[ca_id]/", $ca_id))
$span = "<span style='font-weight:bold;'>";
$exists = true;
$span = "<span>";
$str .= "<a href='./list.php?ca_id=$row[ca_id]'>{$span}$row[ca_name]</span></a> ";
$exists = true;
}
$str .= "</td></tr></table></td><td width=11 background='$g4[shop_img_path]/ca_bg03.gif'></td>";
댓글 전체
if($result){
$str .= "<tr><td width=11 background='$g4[shop_img_path]/ca_bg02.gif'></td>";
$str .= "<td><table width=100% border=0><tr><td>";
while ($row=sql_fetch_array($result)) {
if (preg_match("/^$row[ca_id]/", $ca_id))
$span = "<span style='font-weight:bold;'>";
$exists = true;
$span = "<span>";
if($row[ca_id] == "p2010"){ $str .= "<a href='./list.php?ca_id=$row[ca_id]'>{$span}<img src="img/1.jpg"></span></a> ";
}else if($row[ca_id] == "p2020"){ $str .= "<a href='./list.php?ca_id=$row[ca_id]'>{$span}<img src="img/2.jpg"></span></a> "; }else{
$str .= "<a href='./list.php?ca_id=$row[ca_id]'>{$span}$row[ca_name]</span></a> ";
}
$exists = true;
}
$str .= "</td></tr></table></td><td width=11 background='$g4[shop_img_path]/ca_bg03.gif'></td>";
$str .= "<tr><td width=11 background='$g4[shop_img_path]/ca_bg02.gif'></td>";
$str .= "<td><table width=100% border=0><tr><td>";
while ($row=sql_fetch_array($result)) {
if (preg_match("/^$row[ca_id]/", $ca_id))
$span = "<span style='font-weight:bold;'>";
$exists = true;
$span = "<span>";
if($row[ca_id] == "p2010"){ $str .= "<a href='./list.php?ca_id=$row[ca_id]'>{$span}<img src="img/1.jpg"></span></a> ";
}else if($row[ca_id] == "p2020"){ $str .= "<a href='./list.php?ca_id=$row[ca_id]'>{$span}<img src="img/2.jpg"></span></a> "; }else{
$str .= "<a href='./list.php?ca_id=$row[ca_id]'>{$span}$row[ca_name]</span></a> ";
}
$exists = true;
}
$str .= "</td></tr></table></td><td width=11 background='$g4[shop_img_path]/ca_bg03.gif'></td>";