자동메뉴 서브메뉴없이 깔끔하게 만들기??? > 질문답변

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

질문답변

서버정보나 계정정보는 보안유지를 위해 관리자쪽지나 메일로 발송해 주시거나 제작의뢰 게시판을 이용해 주시면 감사하겠습니다..

자동메뉴 서브메뉴없이 깔끔하게 만들기???

페이지 정보

본문

자동메뉴  사용중입니다.
서브메뉴 없이 사용하려는데. 정확하게 어디를 지워야할지 모르겠습니다.
몇군데만 지우니깐 계속 오류나서요,
좀 도와주십시요,
감사합니다.
 
 
아래 소스입니다.
 
 
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
/////////////////////////////////////////////////////////////////////
// FF,msie호환 그룹 및 게시판 자동메뉴 - 플록
// CSS로 구현 그룹 및 게시판의 수직,수평 배열의 융통성 확보
//global start
echo "<div id='global'>\n";
    //접근가능그룹 여분필드 1 순서로 추출
    $sql = " SELECT a.gr_id, a.gr_subject, a.gr_use_access, b.mb_id FROM $g4[group_table] 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'  ORDER BY a.gr_1";
   
    // 제외그룹설정 root님
    // html , banner , guest 라는 그룹은 제외시킴
    $sql = " select * from $g4[group_table] where gr_id not in ('html', 'banner', 'z7') order by gr_1";
 
    $result = sql_query($sql);
    for ($i=0; $row=sql_fetch_array($result); $i++){
    //group
    echo "<div id='group'>\n";
    if ($row[gr_id] == $gr_id) {// 해당 그룹 스타일 및 링크
        echo "<span class='group_subject' onmouseover=\"show('$row[gr_id]')\" onmouseout=\"hide('$row[gr_id]')\"><a href='$g4[bbs_path]/board.php?bo_table=$row[gr_id]_1' class='on' >$row[gr_subject]</a></span>\n";
    } else { // 그외 그룹 스타일 및 링크
        echo "<span class='group_subject' onmouseover=\"show('$row[gr_id]')\" onmouseout=\"hide('$row[gr_id]')\"><a href='$g4[bbs_path]/board.php?bo_table=$row[gr_id]_1' class='off' >$row[gr_subject]</a></span>\n";
    }
    //board
    echo "<div id='$row[gr_id]' class='board' onmouseover=\"show('$row[gr_id]')\" onmouseout=\"hide('$row[gr_id]')\">\n";
    //게시판 권한 설정 적용, 전체 검색사용에 체크된 게시판만 검색순서에 따라 추출
    $sql1 = " select bo_subject, bo_table from $g4[board_table] where (bo_list_level <= $member[mb_level]) and (gr_id = '$row[gr_id]') and bo_use_search = '1' order by bo_order_search";
    $result1 = sql_query($sql1);
    for ($i1=0; $row1=sql_fetch_array($result1); $i1++) {
        //해당 게시판일때 스타일 적용
        if ($row1[bo_table] == $bo_table){
            echo "<span class='board_subject'><a href='$g4[bbs_path]/board.php?bo_table=$row1[bo_table]' class='on'><img src='$g4[path]/include/mainmenu/img/mmenu_icon.gif' border=0> $row1[bo_subject]</a></span>\n";
        }else{ //나머지 게시판의 스타일
            echo "<span class='board_subject'><a href='$g4[bbs_path]/board.php?bo_table=$row1[bo_table]' class='block'><img src='$g4[path]/include/mainmenu/img/mmenu_icon.gif' border=0> $row1[bo_subject]</a></span>\n";
        }
    }
    echo "</div>\n"; //board end
    echo "</div>\n"; //group end
}
echo "</div>\n"; // global menu end
echo "<div style='clear: both;'></div>"; // 메뉴끝 줄 바꿈, 겹치기 방지
?>
<script language="JavaScript">
function getObject(objectId) {
// checkW3C DOM, then MSIE 4, then NN 4. pearly님 공개 소스코드
    if(document.getElementById && document.getElementById(objectId)) {
    return document.getElementById(objectId);
    }
    else if (document.all && document.all(objectId)) {
    return document.all(objectId);
    }
    else if (document.layers && document.layers[objectId]) {
    return document.layers[objectId];
    } else {
    return false;
    }
}
function show(id) {
getObject([id]).style.visibility="visible";
}
function hide(id) {
getObject([id]).style.visibility="hidden";
}
</script>
 
<style>
/*여기서부터 시각적인 부분에 대한 수정을 해봅니다.
아래 소스에서 float, width 처럼 파란색으로 보여지는 속성을 키워드로
CSS 도움말 파일(팁&강좌에 있음)에서 검색해보면서 해당속성에 대한 옵션을 익힙니다.*/
#global { /*전체메뉴 가장자리를 감싸는 영역*/
float:center;/*왼쪽정렬*/
width:100%;/*너비 필요시 300px 혹은 300 처럼 픽셀로 지정가능*/
height:35px;/*메뉴 전체높이*/
margin:0 0 0 0; /*외부여유 - 시계방향 top, right, bottom, left 공통*/
padding:0 0 0 0;/*내부여유*/
border-width:0 0 0 0;/*테두리 두께*/
border-style:solid;/*테두리 스타일 dotted등 여러 스타일을 줄수있음*/
border-color:transparent/*테두리 색상 #000000처럼 주어도 무방*/;
background-color:transparent/*배경 색상 마찬가지*/;
position:relative;/*absolute; top:22; left:0; 상대,절대위치 설정 - 이곳 메뉴에서는 그대로 두고 메뉴를 불러오는 문서에서 전체 위치를 잡
아주면 됩니다*/
}
#group { /*그룹메뉴 영역- 그룹제목에 테두리를 주고싶다면 border-width:1 1 1 1; */
float:left;
width:100; overflow:visible;/*그룹메뉴 너비, overflow:visible; 내용이 넘칠경우 영역을 밀어내며 표시됨 - 그외 여러옵션이 있음*/
height:35px;
padding:0 0 0 0;
border-width:0 0 0 0;
border-style:solid;
border-color:transparent;
background-color:transparent; /*배경투명*/
position:relative; top:0; left:0;
}
.group_subject { /*그룹제목 스타일*/
padding-top:0px;
color:silver;
font-weight:bold;
height:35px;
text-align:center;
cursor:pointer;
display:block;
}
.board { /*게시판 레이어 영역 z-index 상위 호출문서 에서 지정*/
border-width:1 1 1 1; /*서브메뉴 테두리두께*/
border-style:solid;
border-color:#999999; /*서브메뉴 테두리 칼라*/
background-color:#ffffff;
padding:0 0 3 0;
visibility:hidden;
position:absolute; top:17; left:5;
}
.board_subject { /*게시판 제목 스타일*/
height:15px;
width:150px;
padding:6 0 2 10;
border-bottom-width:1;
border-bottom-color:#dddddd; /*서브메뉴 구분선*/
border-bottom-style:dotted;
display:block; /*포인터 영역 확대*/
}
a.block { /*게시판 제목 링크 스타일*/
width:100%; /*block 설정시 너비 빼먹으면 msie에서 안먹힘*/
height:100%;
display:block; /*포인터 영역 확대*/
}
a.on:link, a.on:visited, a.on:active { /*해당 그룹 강조*/
color:#e8ae11;
}
a.on:hover { /*마우스를 올렸을때 폰트 및 배경색상*/
color:#e8ae11;
background-color:transparent;
padding:0 0 0 0;
}
a.off:link, a.off:visited, a.off:active { /*일반 그룹*/
color:#ffffff;
}
a.off:hover { /*마우스를 올렸을때 폰트 및 배경색상*/
color:#e8ae11;
background-color:transparent;
padding:0 0 0 0;
}
</style>
추천0

댓글목록

profile_image

연후아빠님의 댓글

연후아빠쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 작성일

확인해보지 못했습니다..

    //board
    echo "<div id='$row[gr_id]' class='board' onmouseover=\"show('$row[gr_id]')\" onmouseout=\"hide('$row[gr_id]')\">\n";
    //게시판 권한 설정 적용, 전체 검색사용에 체크된 게시판만 검색순서에 따라 추출
    $sql1 = " select bo_subject, bo_table from $g4[board_table] where (bo_list_level <= $member[mb_level]) and (gr_id = '$row[gr_id]') and bo_use_search = '1' order by bo_order_search";
    $result1 = sql_query($sql1);
    for ($i1=0; $row1=sql_fetch_array($result1); $i1++) {
        //해당 게시판일때 스타일 적용
        if ($row1[bo_table] == $bo_table){
            echo "<span class='board_subject'><a href='$g4[bbs_path]/board.php?bo_table=$row1[bo_table]' class='on'><img src='$g4[path]/include/mainmenu/img/mmenu_icon.gif' border=0> $row1[bo_subject]</a></span>\n";
        }else{ //나머지 게시판의 스타일
            echo "<span class='board_subject'><a href='$g4[bbs_path]/board.php?bo_table=$row1[bo_table]' class='block'><img src='$g4[path]/include/mainmenu/img/mmenu_icon.gif' border=0> $row1[bo_subject]</a></span>\n";
        }
    }
    echo "</div>\n"; //board end

게시판을 관할하는 부분입니다~!

profile_image

Gmasta님의 댓글

Gmasta쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 작성일

네 가능한데요,
"페이지에 오류가있습니다" 가 계속 나타나서요,
답변 감사합니다.

profile_image

연후아빠님의 댓글

연후아빠쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 작성일

<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<?
$sql = " SELECT a.gr_id, a.gr_subject, a.gr_use_access, b.mb_id FROM $g4[group_table] 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'  ORDER BY a.gr_1";
$sql = " select * from $g4[group_table] where gr_id not in ('html', 'banner', 'guest') order by gr_1";
//$sql = " select  gr_id, gr_subject from $g4[group_table] where gr_id not in ($except) order by gr_subject desc ";
$rst1 = sql_query($sql);

while ($row=sql_fetch_array($rst1)) {

if($cells%6==0)
echo "</tr><tr>";

echo "<td valign='top' align='center'>";
echo "<table width='80' cellpadding='0' cellspacing='0' border='0'>";
echo "<tr><td align='center' height='30'><strong><a href='$g4[bbs_path]/group.php?gr_id=$row[gr_id]'><font color=#ffffff>$row[gr_subject]</font></a></strong></td></tr>"; // 그룹명 출력

$sql2 = " select * from $g4[board_table] where gr_id = '$row[gr_id]' order by bo_order_search ";
$rst2 = sql_query($sql2);
$cells++;

echo "</table>";
echo "</td>";
}
?>
</tr>
</table>

이걸로 사용해 보세요~

profile_image

성젬님의 댓글

성젬쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 작성일

<div id='zbase'>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<?
//접근가능그룹 여분필드 1 순서로 추출

$sql = " SELECT a.gr_id, a.gr_subject, a.gr_use_access, b.mb_id FROM $g4[group_table] 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'  ORDER BY a.gr_1";
$sql = " select * from $g4[group_table] where gr_id not in ('html', 'banner', 'guest') order by gr_1";
//$sql = " select  gr_id, gr_subject from $g4[group_table] where gr_id not in ($except) order by gr_subject desc ";
$rst1 = sql_query($sql);

while ($row=sql_fetch_array($rst1)) {

if($cells%6==0)
echo "</tr><tr>";

echo "<td valign='top' align='center'>";
echo "<table width='80' cellpadding='0' cellspacing='0' border='0'>";
echo "<tr><td align='center' height='30'><strong><a href='$g4[bbs_path]/group.php?gr_id=$row[gr_id]'><font color=#ffffff>$row[gr_subject]</font></a></strong></td></tr>"; // 그룹명 출력

$sql2 = " select * from $g4[board_table] where gr_id = '$row[gr_id]' order by bo_order_search ";
$rst2 = sql_query($sql2);
$cells++;

echo "</table>";
echo "</td>";
}
?>
</tr>
</table>
</div>

이렇게 하니 잘됩니다

profile_image

힘쓰님의 댓글

힘쓰쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 작성일

저도 이것저것들을 하다보니 어느날..
작업를 맞쳤으나 페이지에 오류가 있습니다.라고
상태표시줄에 메세지가 보이네요??

그러면서 서브메뉴 레이어가 안되네요..

이곳에 언급된것은
subzmain_menu.php 페이지를 수정하는건가요?

Total 1,640건 17 페이지
  • RSS
질문답변 목록
번호 제목 글쓴이 조회 추천 날짜
1240 다소미쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7072 0 08-26
1239 아보병빠쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 7079 0 09-01
1238 이다올쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7090 0 05-20
1237 유후훌쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 7101 0 04-21
1236 u2쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7105 0 10-22
1235 로보트vv쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 7108 0 04-18
1234 포인트쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7114 0 11-07
1233 독신쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7114 0 07-31
1232 노블레스쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7118 1 02-13
1231 소피쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7123 0 09-26
1230 알럽투데이쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7126 0 09-27
1229 디란도쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7127 0 09-12
1228 아바타쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7138 0 07-24
1227 부업타운쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7142 1 06-15
1226 미녀와야식쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7150 1 10-03
1225 로앵글쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7161 0 10-30
1224 진진쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7175 0 12-19
1223 부업타운쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7185 0 06-24
1222 진진쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7197 0 12-21
1221 알럽투데이쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7198 0 10-01
1220
제나보드 댓글1
로즈쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7202 0 02-23
1219 소금쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 7204 0 02-05
1218 쎄엠쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 7214 0 10-05
1217 유투사랑쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 7231 0 03-04
1216 부업타운쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7233 1 06-28

검색

회원로그인

회원가입

사이트 정보

株式会社YHPLUS / 대표 : ZERO
〒140-0011 東京都品川区東大井2-5-9-203
050-5539-7787
오픈카카오톡 (YHPLUS) :
https://open.kakao.com/o/slfDj15d

접속자집계

오늘
6,822
어제
7,395
최대
8,371
전체
1,670,142
Copyright (c) 株式会社YHPLUS. All rights reserved.