분류 이미지 따로 나타내기 > 그누4 질문답변

그누4 질문답변

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

분류 이미지 따로 나타내기 정보

분류 이미지 따로 나타내기

본문

아래는 카테고리(분류)를 출력하는 소스 입니다.
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> &nbsp; ";
      $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> &nbsp; ";
    }else if($row[ca_id] == "p2020"){    $str .= "<a href='./list.php?ca_id=$row[ca_id]'>{$span}<img src="img/2.jpg"></span></a> &nbsp; ";    }else{
      $str .= "<a href='./list.php?ca_id=$row[ca_id]'>{$span}$row[ca_name]</span></a> &nbsp; ";
    }
      $exists = true;
  }
  $str .= "</td></tr></table></td><td width=11 background='$g4[shop_img_path]/ca_bg03.gif'></td>";
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT