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

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

질문답변

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

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

페이지 정보

본문

자동메뉴  사용중입니다.
서브메뉴 없이 사용하려는데. 정확하게 어디를 지워야할지 모르겠습니다.
몇군데만 지우니깐 계속 오류나서요,
좀 도와주십시요,
감사합니다.
 
 
아래 소스입니다.
 
 
<?
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건 11 페이지
  • RSS
질문답변 목록
번호 제목 글쓴이 조회 추천 날짜
1390 jpsang쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 107 0 01-17
1389 쿠하하쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 108 0 02-02
1388 푸른하늘이다쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 108 0 05-20
1387 첫만남의감격쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 115 0 08-10
1386 김성수쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 124 0 03-01
1385 WEBPD쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 125 0 11-05
1384
입금완료 댓글1
붕어쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 130 0 02-15
1383 매지숀쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4671 0 01-08
1382 채군쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4844 0 02-13
1381
잠시 댓글1
쿠하하쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 4918 0 10-18
1380 백작쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5134 0 10-26
1379 재다이얼쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5216 0 11-13
1378 aspnet쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 5225 0 02-14
1377
속도문제 댓글1
황금연못쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5319 0 02-22
1376 세분쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5346 1 01-02
1375 라울쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5405 0 07-30
1374 천공귀제쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5431 0 08-09
1373 재다이얼쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5438 0 11-15
1372 기쁨충만쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5485 0 12-14
1371 뽀독뽀독쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5491 0 10-18
1370 가온누리쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5525 0 11-03
1369 디란도쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5531 0 09-14
1368 레인보우1492쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5540 0 10-12
1367 메빅맨쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5586 0 09-01
1366 디란도쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5601 0 09-13

검색

회원로그인

회원가입

사이트 정보

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

접속자집계

오늘
5,191
어제
7,853
최대
8,233
전체
1,599,467
Copyright (c) 株式会社YHPLUS. All rights reserved.