<?
$home_ex_main = "'제외그룹1','제외그룹2'";  // 제외그룹 gr_id  'gr_01','gr_02','gr_03','gr_04' 식으로 추가하시면됩니다
$home_ex_board = "'제외게시판1','제외게시판2'";  // 제외게시판 bo_table
$day="1"; // 최신글 기준일수 
$menu="mcGray"; // mcPurple, mcViolet, mcOrange, mcGreen, mcGray  메뉴색상
//$t_width="1130"; // 메뉴가로사이즈 
?>
<script type="text/javascript" src="<?=$g4[path]?>/topmenu/jquery-latest.js"></script>
<script type="text/javascript" src="<?=$g4[path]?>/topmenu/hrBar.js"></script>
<div id="menu" class="menu <?=$menu?>">
<div class="inset">
<div class="major"><!-- class="major + (m1~m12)"-->
<ul>
<?
$sql = "select gr_id, gr_subject, gr_1 from $g4[group_table] where gr_id not in ($home_ex_main) order by gr_1";
$rst1 = sql_query($sql);
for ($i=0; $row=sql_fetch_array($rst1); $i++){

$sqlp2 = "select * from $g4[board_table] where gr_id = '$row[gr_id]' and bo_table not in ($home_ex_board) order by bo_order_search asc"; 
                    $qryp2 = sql_query($sqlp2); 
                    for ($j=0; $rowp2=sql_fetch_array($qryp2); $j++) { 
$tmp_write_table = $g4['write_prefix'] . $rowp2[bo_table];
$tmp_row = sql_fetch(" select count(wr_id) as cnt from $tmp_write_table where wr_is_comment = 0 and wr_datetime > (now() - INTERVAL $day DAY) "); 
$trdwos = array ("0" => "");  
$dwos=strtr($tmp_row[cnt], $trdwos);
$n_img='<img style="position: absolute; top: -9px; display: block; right: 0px;z-index:99999;" src="'.$g4[path].'/topmenu/hot2.gif" />';
//if($dwos > 0){echo $n_img;}
}
?>
<? if ($row['gr_id'] == $gr_id) { ?>
<li class="active_hover"><a href="<?=$g4[bbs_path]?>/group.php?gr_id=<?=$row[gr_id]?>"><span><?=$row[gr_subject]?></span></a>
<? } else { ?>
<li class="m<?=$i+1?>"><a href="<?=$g4[bbs_path]?>/group.php?gr_id=<?=$row[gr_id]?>"><span><?=$row[gr_subject]?></span></a>
<? } ?>
<div class="sub"><ul>
<? 
$sql2 = "select bo_table, bo_subject, bo_category_list from $g4[board_table] where gr_id = '$row[gr_id]' and bo_table not in ($home_ex_board) order by bo_order_search "; 
$rst2 = sql_query($sql2);
for ($j=0; $row2=sql_fetch_array($rst2); $j++){
?>
<li><a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$row2[bo_table]?>"><span> <?=$row2[bo_subject]?></span></a></li>
<?}?>
</ul></div></li>
<?}?>
</ul></div>
<div class="aside">
  <ul>
      <li class="m1"><a href="<?=$g4['bbs_path']?>/new.php"><span>최근게시물</span></a></li>
	  <? if(!$member['mb_id']) { ?>
      <li class="m2"><a href="<?php echo $g4['bbs_path']?>/login.php?url=<?php echo $urlencode?>"><span>로그인</span></a>
	  <li class="m3"><a href="<?php echo $g4['bbs_path']?>/register.php"><span>회원가입</span></a></li>
	  <? } else { ?>
      <li class="m2"><a href="<?php echo $g4['bbs_path']?>/logout.php"><span>로그아웃</span></a>
	  <li class="m3"><a href="<?php echo $g4['bbs_path']?>/member_confirm.php?url=register_form.php"><span>정보수정</span></a></li>
	  <? } ?>
  </ul>
</div>
<span class="gradient"></span>
</div>
<span class="shadow"></span>
</div>
