메뉴보이기 및 출력순서 적용

This commit is contained in:
gnuboard
2013-02-25 17:20:56 +09:00
parent 1fc4856f71
commit 72aec2598a
14 changed files with 93 additions and 26 deletions

View File

@ -127,13 +127,24 @@ if ($config['cf_include_head']) {
<script>$('#gnb').addClass('gnb_js');</script>
<h2>홈페이지 메인메뉴</h2>
<ul>
<?
$sql = " select * from {$g4['group_table']} where gr_show_menu order by gr_order ";
$result = sql_query($sql);
for ($gi=0; $row=sql_fetch_array($result); $gi++) { // gi 는 group index
?>
<li class="gnb_1depth">
<a href="<?=$g4['url']?>/bbs/board.php?bo_table=sirgle">분류1</a>
<a href="<?=G4_BBS_URL?>/group.php?gr_id=<?=$row['gr_id']?>"><?=$row['gr_subject']?></a>
<ul>
<li class="gnb_2depth"><a href="#">게시판1</a></li>
<li class="gnb_2depth"><a href="#">게시판2</a></li>
<?
$sql2 = " select * from {$g4['board_table']} where gr_id = '{$row['gr_id']}' order by bo_order ";
$result2 = sql_query($sql2);
for ($bi=0; $row2=sql_fetch_array($result2); $bi++) { // bi 는 board index
?>
<li class="gnb_2depth"><a href="<?=G4_BBS_URL?>/board.php?bo_table=<?=$row2['bo_table']?>"><?=$row2['bo_subject']?></a></li>
<?}?>
</ul>
</li>
<?}?>
</ul>
</nav>