<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>

<div id="at-menu-box">
	<ul class="at-menu-item">
	<!--
	<li>
		<a href="<?php echo G5_URL; ?>">
			<?php //if($menu[0]['count_write'] > 0) echo '<span class="at-menu-cnt">'.number_format($menu[0]['count_write']).'#'.number_format($menu[0]['count_comment']).'</span>'; ?>
			<span class="old"><i class="fa fa-leaf"></i> 전체보기</span>	
		</a>
	</li>
	-->
	<?php for ($i=1; $i < count($menu); $i++) { //메뉴출력  - 배열 0번은 전체통계이므로 1번부터 출력함 ?>
	<li>
		<a href="<?php echo $menu[$i]['gr_href']; ?>">
			<?php //if($menu[$i]['gr_count_write'] > 0) echo '<span class="at-menu-cnt">'.number_format($menu[$i]['gr_count_write']).'#'.number_format($menu[$i]['gr_count_comment']).'</span>'; ?>
			<span class="<?php echo $menu[$i]['gr_new']; ?>">
				<?php echo $menu[$i]['gr_subject']; ?>
			</span>	
		</a>
		<?php if($menu[$i]['gr_cnt'] > 1) { //게시판이 1개 이상이면 서브메뉴 출력 ?>
			<ul>
			<?php for($k=0; $k < count($menu[$i]['board']); $k++) { ?>
			<li>
				<a href="<?php echo $menu[$i]['board'][$k]['bo_href']; ?>">
					<?php //if($menu[$i]['board'][$k]['bo_count_write']) echo '<span class="at-menu-cnt">'.number_format($menu[$i]['board'][$k]['bo_count_write']).'#'.number_format($menu[$i]['board'][$k]['bo_count_comment']).'</span>'; ?>
					<span class="<?php echo $menu[$i]['board'][$k]['bo_on'].' '.$menu[$i]['board'][$k]['bo_new']; ?>">
						<?php echo $menu[$i]['board'][$k]['bo_subject']; ?>
					</span>
				</a>
			</li>
			<?php } ?>
			</ul>
		<?php } ?>
	</li>
	<?php } ?>
	</ul>
	<div class="clear"></div>
</div>
