최신글 추출할때 특정게시판제외?

최신글 추출할때 특정게시판제외?

QA

최신글 추출할때 특정게시판제외?

본문

작업사이트는

designgmall.com/index2.php 입니다

보시면 확인할 수 있는데요...


메인페이지에 여러게시판에서 최신글들만 올라오게 되어 있습니다.

최신글들은 이미지상품들이 올라와 있습니다.


그러다 Notice 게시판에 공지사항을 테스트하는중에.. 이 글도 같이 메인에 올라오는걸 확인했어요!

Notice 게시물은 메인에 올라오면 안되거든요.. ㅜㅜ

당연한 결과임에도 불구하고 해결방법이 잘 나오지 않아 이렇게 글을 써 봅니다.


코드에서 뭘 수정하면 가능할지.... ㅜㅜ 여기에서 수정이 될까요? ㅜㅜ



<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
$imgwidth = 200; //표시할 이미지의 가로사이즈
$imgheight = 140; //표시할 이미지의 세로사이즈
$img_quality = 100;
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
?>

<div id="oneshot">
 <ul>
 <?php for ($i=0; $i<count($list); $i++) { ?> 
  <li>
  <div class="img_border">
  <div class="img_set">
   <div class="img">
    <a href="<?php echo $list[$i]['href'] ?>">
     <?php                
     $botable = sql_fetch(" select * from g5_board where bo_subject = '{$list[$i]['bo_subject']}' ");
                $thumb = get_list_thumbnail($botable['bo_table'], $list[$i]['wr_id'], $imgwidth, $imgheight);                   
     if($thumb['src']) {
     $img_content = '<img class="img_left" src="'.$thumb['src'].'" alt="'.$list[$i]['subject'].'" width="'.$imgwidth.'" height="'.$imgheight.'">';
     } else {
     $img_content = 'NO IMAGE';
     }                
     echo $img_content;                           
     ?>
    </a>
   </div>
   </div>
   <div class="subject_set2">
    <div class="sub_title2">

    <a href="<?php echo $list[$i]['href'] ?>">
    <font color="#696969">
    <?php echo cut_str($list[$i]['subject'], 13, "..") ?></font>
    </a></div>
    <div class="sub_content">
    Sold by : <?=$list[$i][wr_name]?>
        <?//=cut_str(strip_tags($list[$i]['wr_content']), 30, '..')?>
    <!--게임 간략설명
     <?=cut_str(strip_tags($list[$i][wr_4]),128,"..")?>--></div>

<div class="view">
<span style="margin-right:2px; font-family:Dotum,Verdana,Arial; font-size:12px;"><font color="#737373"><img src="./img/icon_hit_13.png"></font></span>
<span style="font-family:Dotum,Verdana,Arial; font-size:13px;"><font color="#CC6018"><b><?=$list[$i][wr_hit]?></b>
</font></span>
<font style="font-family:Dotum,Verdana,Arial; font-size:11px;" color="#D3D3D3"> | </font>
<span style="margin-right:2px; font-family:Dotum,Verdana,Arial; font-size:12px;"><font color="#737373"><img src="./img/icon_c_13.png"></font></span>
<span style="font-family:Dotum,Verdana,Arial; font-size:13px;"><font color="#CC6018"><b><?=$list[$i][wr_comment]?></b> 
</font>
<font style="font-family:Dotum,Verdana,Arial; font-size:11px;" color="#D3D3D3"> | </font>
<span style="margin-right:2px; font-family:Dotum,Verdana,Arial; font-size:12px;"><font color="#737373"><img src="./img/icon_g_13.png"></font></span>
<span style="font-family:Dotum,Verdana,Arial; font-size:13px;"><font color="#A9A9A9"><b><?=$list[$i][wr_good]?></b></font></span>
<font style="font-family:Dotum,Verdana,Arial; font-size:11px;" color="#D3D3D3"> | </font>
<span style="margin-right:2px; font-family:Dotum,Verdana,Arial; font-size:12px;"><font color="#737373"><img src="./img/point2.png"></font></span>
<span style="font-family:Dotum,Verdana,Arial; font-size:13px;"><font color="#b6253d"><b><?=$list[$i][wr_1]?></b></font></span>
 </div>
    <?$arrtag = explode(",", $list[$i][tags]);?>
<?if( $list[$i][tags] ){?>
<div class="comp_tags comp_tags_view">  
 <?php foreach( $arrtag as $key => $val ){ $val = trim($val);?>
<a href="<?php echo G5_BBS_URL?>/board.php?bo_table=<?php echo $botable['bo_table']?>&sfl=tags&stx=<?php echo $val?>"><?php echo $val?></a>
<?php }?>
<?php }?>
</div>
   </div>
  </li>
 <?php } ?>
 </ul>
</div>
<div style="clear:both;"></div>
</div>
<div style="padding-bottom:10px"></div>

이 질문에 댓글 쓰기 :

답변 1

g5_board  테이블에  필드 하나 추가해서 그것이 있는 것만 검색되도록 해보세요

답변을 작성하시기 전에 로그인 해주세요.
전체 123,131 | RSS
QA 내용 검색

회원로그인

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