블로그형 스킨에서 카테고리 제목별 출력 > 그누보드&그샵

본문 바로가기
사이트 내 전체검색

그누보드&그샵

팁텍 블로그형 스킨에서 카테고리 제목별 출력

페이지 정보

본문

side.php에 다음 소스 적용


=================================== 변경전 소스 =======================

<!-- 카테고리 부분 -->
<? if ($is_category) { ?>
      <TABLE cellSpacing=0 cellPadding=0 width=100% align=center border=0>
        <TBODY>
        <TR align=middle>
          <TD bgColor=#cccccc>
            <TABLE cellSpacing=1 width=100% border=0>
              <TBODY>
              <TR align=middle bgColor=#ffffff>
                <TD height=22>
                  <TABLE height=22 cellSpacing=0 cellPadding=0 width=95% border=0>
                    <TBODY>
                    <TR><TD vAlign=center align=middle height=3>카테고리</td></tr>
</tbody>
  </table>
</td>
  </tr>
              <TR align=middle bgColor=#e0e0e0>
                <TD height=22>

<table width=100%>
<tr>
<form name=fcategory method=get action='<?="./"?>'>
<input type=hidden name=doc value='<?=$doc?>'>
<td width=50% align=center>

<select name=ca_id onchange="location='<?=$category_location?>'+this.value;" class=select style='width:98%'>
<option value=''>전체(<?=nf($total_count)?>)</option>
<?=$category_option?>
</select>
</td>
</form>
</tr>
</table>
</td>
  </tr>
  </tbody>
</table>
  </td>
</tr>
</tbody>
  </table>
 
  <BR>
  <BR>
<? } ?>
  <!-- 카테고리 끝 -->

====================================================================


=================================== 변경후 소스 =======================

<?
if (defined(__FILE__)) return;
define(__FILE__, TRUE);


function get_category($bo_table)
{
global $cfg, $stext, $board_skin, $doc, $is_image;

$ca_sql = " select * from {$cfg[write_table_prefix]}{$bo_table}_cat order by ca_id ";
$ca_result = sql_query($ca_sql);

$loc = "./?doc=bbs/gnuboard.php&bo_table=$bo_table&sselect=ca_id&stext=";

// 카테고리가 텍스트 일때
if(!$stext){
$str = "<table cellspacing=0 cellpadding=0 width=100% align=center border=0><tr><td align=left width=100% height=20><b> :: <a href=$loc>전체보기</a></b></td></tr>< /table>\n";
} else {
$str = "<table cellspacing=0 cellpadding=0 width=100% align=center border=0><tr><td align=left width=100% height=20><b> :: <a href=$loc>전체보기</a></b></td></tr>< /table>\n";
}

while ($row = mysql_fetch_array($ca_result)) {
if($stext == $row[ca_id]) $str .= "<b>";
$str .= "<table cellspacing=0 cellpadding=0 width=100% align=center border=0><tr><td height=20 width=100%>  <a href=$loc$row[ca_id]>".get_category_name("{$cfg[write_table_prefix]}{$bo_table}",$row[ca_id])."</a></td></tr></table>";
if($stext == $row[ca_id]) $str .= "</b>";
$str .= "<table width=100%><tr><td height=1 background='$board_skin/dot.gif'></td></tr></table>\n";
}


mysql_free_result($ca_result);

return $str;
}

?>

<!-- 카테고리 부분 -->
<? if ($is_category) { ?>
<? echo get_category($bo_table); ?>
 <br>
 <br>
<? } ?>
 <!-- 카테고리 끝 -->


====================================================================

[이 게시물은 까만도둑님에 의해 2004-06-06 22:33:24 자료실(으)로 부터 이동됨]

댓글목록

등록된 댓글이 없습니다.

Total 167건 9 페이지
  • RSS
그누보드&그샵 목록
번호 제목 글쓴이 조회 날짜
47 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1590 06-25
46 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 2174 06-23
45 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1262 06-23
44 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1528 06-24
43 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1860 06-22
42 그샵 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1492 06-13
열람중 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1401 05-16
40 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1437 04-06
39 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1394 02-25
38 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1650 02-25
37 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1544 02-23
36 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1883 02-21
35 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1624 02-21
34 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1435 02-21
33 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1461 02-06

검색

회원로그인

회원가입

사이트 정보

회사명 : 회사명 / 대표 : 대표자명
주소 : OO도 OO시 OO구 OO동 123-45
사업자 등록번호 : 123-45-67890
전화 : 02-123-4567 팩스 : 02-123-4568
통신판매업신고번호 : 제 OO구 - 123호
개인정보관리책임자 : 정보책임자명

  • 게시물이 없습니다.

접속자집계

오늘
256
어제
371
최대
385
전체
38,091
Copyright © 소유하신 도메인. All rights reserved.