게시판 부분 문의드립니다~~
본문
작업하다 막히네요^^;;
메인페이지에는 왼쪽메뉴에 게시판 전체가 다 나오게 되어 있는데
서브페이지로 이동하면 해당 카테고리의 게시판만 나옵니다
이걸 메인 페이지에서 전체리스트 보이는 것 처럼 서브페이지도 전부 보이게 할순 없니요ㅜㅜ
어디를 수정 해야되는지 모르겠네요 ㅜㅜㅜㅜ
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G5_PATH.'/head.sub.php');
include_once(G5_LIB_PATH.'/latest.lib.php');
include_once(G5_LIB_PATH.'/outlogin.lib.php');
include_once(G5_LIB_PATH.'/poll.lib.php');
include_once(G5_LIB_PATH.'/visit.lib.php');
include_once(G5_LIB_PATH.'/connect.lib.php');
include_once(G5_LIB_PATH.'/popular.lib.php');
// 상단 파일 경로 지정 : 이 코드는 가능한 삭제하지 마십시오.
if ($config['cf_include_head']) {
if (http://www.ssaguncafe.com/"><img src="<?php echo $theme_url?>/img/main.gif"></a></div>
</div>
<script>
$(document).ready(function () {
$(".mw-index-menu-item").mouseenter(function () {
$(".mw-drop-menu").hide();
menu1 = $(this).attr("menu1");
t = $(this).offset().top;
l = $(this).offset().left;
$("#mw-drop-menu-"+menu1).css("top", t+30);
$("#mw-drop-menu-"+menu1).css("left", l);
$("#mw-drop-menu-"+menu1).show();
});
$(".mw-index-menu-bar").mouseleave(function () {
$(".mw-drop-menu").hide();
});
});
</script>
</div><!-- head -->
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top" width="180">
<div class="outlogin"><?php echo outlogin("mw_lite")?></div>
<div id="sm">
<div class="sm_border">
<div class="sm_margin">
<?php
$sql_menu = null;
if ($menu['me_code'])
$sql_menu = " and substring(me_code, 1, 2) = '".substr($menu['me_code'], 0, 2)."' ";
$sql = " select *
from {$g5['menu_table']}
where me_use = '1'
and length(me_code) = '2' {$sql_menu}
order by me_order, me_id ";
$qry = sql_query($sql);
for ($i=0; $row=sql_fetch_array($qry); $i++) {
?>
<div class="sm_item">
<div class="sm_title"><a href="<?php echo $row['me_link']?>" target="_<?php echo $row['me_target']?>"><?php echo $row['me_name']?></a></div>
<?php
$sql2 = " select *
from {$g5['menu_table']}
where me_use = '1'
and length(me_code) = '4'
and substring(me_code, 1, 2) = '{$row['me_code']}'
order by me_order, me_id ";
$qry2 = sql_query($sql2);
for ($j=0; $row2=sql_fetch_array($qry2); $j++) {
if ($menu['me_code'] == $row2['me_code'])
$class = "sm_sub selected";
else
$class = "sm_sub";
?>
<div class="<?php echo $class?>"><a href="<?php echo $row2['me_link']?>" target="_<?php echo $row2['me_target']?>"><?php echo $row2['me_name']?></a></div>
<?php } ?>
</div> <!-- sm_item -->
<?php } ?>
</div> <!-- sm_margin -->
</div> <!-- sm_border -->
</div> <!-- sm -->
<div class="poll"><?php echo poll("mw.poll")?></div>
</td>
<td width="10"></td>
<td valign="top">
답변 1
아마 아래 2줄 주석처리하면 될 듯 합니다.
// if ($menu['me_code'])
// $sql_menu = " and substring(me_code, 1, 2) = '".substr($menu['me_code'], 0, 2)."' ";