그룹메뉴 목록 보이기 권한 질문 합니다. > 그누4 질문답변

그누4 질문답변

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

그룹메뉴 목록 보이기 권한 질문 합니다. 정보

그룹메뉴 목록 보이기 권한 질문 합니다.

본문

현재 목록을 볼 수 있는 권한만 게시판이 노출 되는데

목록볼수 있는 권한이 없더라도 노출되고 클릭시 권한이 없다는 메시지를

뛰우고 싶은데 목록을 볼 수 없는 레벨이라도 그룹메뉴에 게시판링크가 보였으면 좋겠습니다.


소스 첨부할게요 확인부탁드립니다. ㅠㅠ



<?php
/**
 * JS DTD Builder for Gnuboard4
 *
 * Copyright (c) 2009 Sung Joo-Hoon <www.apachezone.com , www.jsbuilder.net>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  *** 개인정보보호를 위한 전화번호 노출방지 ***  USA
 */

// 보드그룹 배열 생성
$g4_group = array();
$g4_group_select = "gr_id, gr_subject, gr_admin, gr_use_access, gr_1, gr_2, gr_3, gr_4, gr_5, gr_6, gr_7, gr_8, gr_9, gr_10";
if($config[cf_home_ex_main_use] == 1) $home_ex_main = $config[cf_home_ex_main];
else $home_ex_main = "''";
$excgra = "(".$home_ex_main.")";
$g4_group_where = "AS a LEFT JOIN $g4[group_member_table] AS b ON a.gr_id = b.gr_id WHERE (b.mb_id = '$member[mb_id]' AND a.gr_use_access = '1' ) OR a.gr_use_access = '0'";
$g4_group_sql = " SELECT a.gr_id, a.gr_subject, a.gr_use_access, a.gr_5, a.gr_6, a.gr_7, a.gr_9, a.gr_10, b.mb_id FROM $g4[group_table] $g4_group_where and a.gr_id not in " . $excgra . " ORDER BY a.gr_1 ";
$g4_group_result = mysql_query($g4_group_sql);
for($i=0; $g4_group_row = mysql_fetch_array($g4_group_result); $i++)
$g4_group[$i] = $g4_group_row;
$g4_group_id[$i] = $g4_group_row[gr_id];

for ($i=0; $i<count($g4_group); $i++){
$group_menu[$i] = ($g4_group[$i]['gr_id'] == $gr_id)?"<span style='".$g4_group[$i]['gr_9']."'>".$g4_group[$i][gr_subject]."</span>":"<span style='".$g4_group[$i]['gr_10']."'>".$g4_group[$i][gr_subject]."</span>";
$group_menu_l[$i] = (!empty($g4_group[$i]['gr_7']))?$g4_group[$i]['gr_7']:"$g4[bbs_path]/group.php?gr_id={$g4_group[$i][gr_id]}";
$group_menu_t[$i] = (!empty($g4_group[$i]['gr_6']))?$g4_group[$i]['gr_6']:"_self";
$group_id[$i] = $g4_group[$i][gr_id];

$group_bo[$i] = 0;
}

$gm = $i;
$gm_ex = $i-1;

$g4_board = array();
//게시판의 설정값을 가져와 미리 저장한다.(이때 게시판리스트를 볼수있는 레벨이 회원레벨보다 높은다면 불러오지 않는다.)
$g4_board_select = "*";
if($config[cf_home_ex_board_use] == 1) $home_ex_board = $config[cf_home_ex_board];
else $home_ex_board = "''";
$excgrb = "(".$home_ex_board.")";
//if($member[mb_level] < 10) // 관리자 로그인후 상단에 모든 메뉴 출력
$g4_board_where = "WHERE bo_list_level <= '$member[mb_level]' AND bo_table not in " . $excgrb ;
$g4_board_sql = " SELECT $g4_board_select FROM $g4[board_table] $g4_board_where ORDER BY bo_order_search, gr_id, bo_table, bo_1, bo_2, bo_3, bo_4, bo_5, bo_6, bo_7, bo_8, bo_9, bo_10 ";
$g4_board_result = mysql_query($g4_board_sql);
for($i=0; $g4_board_row = mysql_fetch_array($g4_board_result); $i++){
$g4_board[$i] = $g4_board_row;
}

for ($i=0; $i<count($g4_board); $i++) {
for($k=0; $k<$gm; $k++){
if($g4_board[$i][gr_id] == $group_id[$k]){
$sub_menu_l[$k][$group_bo[$k]] = (!empty($g4_board[$i]['bo_7']))?$g4_board[$i]['bo_7']:"$g4[bbs_path]/board.php?bo_table={$g4_board[$i][bo_table]}";
$sub_menu_t[$k][$group_bo[$k]] = (!empty($g4_board[$i]['bo_6']))?$g4_board[$i]['bo_6']:'_self';
$sub_menu[$k][$group_bo[$k]] = (!empty($g4_board[$i]['bo_5']))?$g4_board[$i]['bo_5']:$g4_board[$i][bo_subject];

$group_bo[$k]++;
}
}
}

$sm = count($g4_board);

if($bo_table){
for($j=0; $j<$sm; $j++){
if($bo_table == $g4_board[$j]){
$gr_id = $g4_board[$j][gr_id];
break;
}
}
}
?>

댓글 전체

$g4_board_where = "WHERE bo_list_level <= '$member[mb_level]' AND bo_table not in " . $excgrb ;
이부분에서
$g4_board_where = "WHERE bo_table not in " . $excgrb ;
하시면 보일듯한데요
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

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