테스트 사이트 - 개발 중인 베타 버전입니다

서브메뉴에서 특정게시판을 제외하려고 합니다. 채택완료

8년 전 조회 3,273

서브메뉴에 특장게시판(B01, B02)를 제외하려고 하는데요.

 

$sql.= "  where me_link like 'bo_table' and me_link not like 'B01' and me_link not like 'B102'"; $no_bo_table="'B01','B02'";//출력 하지않을 게시판 아이디 나열

검색해보니 이런게 있어서 넣어보니 안되는거 같은데 어떻게 해야 특정게시판이 제외되나요? 

 

groupmenu.skin 

</p><p><?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

?>

<!-- 메뉴 시작 { -->
<link rel="stylesheet" href="<?php echo $groupmenu_skin_url ?>/style.css">

<div id="sir_lnb">
  <aside id="lnb_cate">
    <h2><?php echo $group['gr_subject'] ?></h2>
      <div class="sir_ddl sir_ddl_pc" id="cate_2d">
      <button class="ddl_btn" type="button"><?php echo $group['gr_subject'] ?></button>
      </div>
   <ul>
        <?php for ($i=0; $i<count($groupmenu); $i++) {  ?>


        <li<?php if($bo_table==$groupmenu[$i]['bo_table']) { echo " class=\"lnb_cate_on\""; } ?>><a href="<?php echo $groupmenu[$i]['href'] ?>">    


                        <!--제목 아이콘 -->
                <span class="m">
                <img src="../skin/groupmenu/mysubmenu_sub/img/Message-24-2.png" style="opacity:1.0" 
        onmouseover="this.style.opacity='1.0'" onmouseout="this.style.opacity='1.0'" width='20' height='19' border='0'>
                </span>

    
        <?php echo $groupmenu[$i]['subject'] ?>
        <?php if($groupmenu[$i]['cnt']) { ?>
        <strong><?php echo $groupmenu[$i]['cnt'] ?></strong>
        <?php } ?>
        <?php if($groupmenu[$i]['total_cnt']) { ?>
        <span><?php echo $groupmenu[$i]['total_cnt'] ?></span>
        <?php } ?>
        </a>
        </li>
        <?php }  ?>
    </ul>    
 </aside>
</div><!-- #sir_lnb -->
<!-- } 메뉴 끝 --></p><p>

 

 

 

groupmenu.lib 

 

[code]

'mobile' and gr_id = '{$group['gr_id']}' order by gr_order ";     $result = sql_query($sql);     for ($gi=0; $row=sql_fetch_array($result); $gi++) { // gi 는 group index     $sql2 = " select * from {$g5['board_table']} where gr_id = '{$row['gr_id']}' and bo_device <> 'mobile' order by bo_order ";         $result2 = sql_query($sql2);         for ($bi=0; $row2=sql_fetch_array($result2); $bi++) { // bi 는 board index                $board_table = $g5['write_prefix'] . $row2['bo_table'];             $latest_count =  sql_fetch(" select count(*) as cnt from {$board_table} where wr_datetime > '".date('Y-m-d H:i:s', time() - (3600 * $new_time))."'");             $total_count =  sql_fetch(" select count(*) as cnt from {$board_table} ");             $groupmenu[$bi]['bo_table'] = $row2['bo_table'];             $groupmenu[$bi]['href'] = G5_BBS_URL.'/board.php?bo_table='.$row2['bo_table'];             $groupmenu[$bi]['subject'] = $row2['bo_subject'];             $groupmenu[$bi]['cnt'] = $latest_count['cnt'];             $groupmenu[$bi]['total_cnt'] = $total_count['cnt'];         }     }        $groupmenu_skin_path = G5_SKIN_PATH.'/groupmenu/'.$skin_dir;     $groupmenu_skin_url  = G5_SKIN_URL.'/groupmenu/'.$skin_dir;     ob_start();           include_once ($groupmenu_skin_path.'/groupmenu.skin.php');     $content = ob_get_contents();     ob_end_clean();     return $content; } ?>

[code] 

 

 

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

채택된 답변
+20 포인트

$sql2 = " select * from {$g5['board_table']} where gr_id = '{$row['gr_id']}' and bo_device <> 'mobile' order by bo_order ";

 

=> 아래와 같이 하시면 해당 게시판이 제외될거 같습니다. 

 

$sql2 = " select * from {$g5['board_table']} where gr_id = '{$row['gr_id']}' and bo_device <> 'mobile' and bo_table != 'B01' and bo_table != 'B02' order by bo_order ";

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

감사합니다 ^^ 잘되네여

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인

전체 질문 목록

🐛 버그신고