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

<script type="text/javascript" src="<?php echo THEMA_URL; ?>/skin/js/jqueryslidemenu.js"></script>

<div id="at-logo">
	<a href="<?php echo $site_url; ?>"><?php echo $site_logo; ?></a>
</div>
<div id="at-menu">
	<div id="myslidemenu" class="jqueryslidemenu">

		<ul id="at-menu-icon">
			<li title="홈으로"><a href="<?php echo $site_url; ?>"><i class="fa fa-home"></i><span class="sound_only"> 홈으로</span></a></li>
			<li title="메뉴보기"><a class="fbox" href="#at-menu-list"><i class="fa fa-th"></i><span class="sound_only"> 메뉴보기</span></a></li>
			<li title="내글반응"><a href="<?php echo AMINA_URL; ?>/response.php"><i class="fa fa-comments"></i><?php echo $response_cnt;?><span class="sound_only"> 내글반응</span></a></li>
			<li title="새글모음"><a href="<?php echo G5_BBS_URL; ?>/new.php"><i class="fa fa-refresh"></i><span class="sound_only"> 새글모음</span></a></li>
			<li title="전체검색"><a href="<?php echo G5_BBS_URL; ?>/search.php"><i class="fa fa-search"></i><span class="sound_only"> 전체검색</span></a></li>
			<li title="현재접속자"><a href="<?php echo G5_BBS_URL; ?>/current_connect.php"><i class="fa fa-link"></i><span class="sound_only"> 현재접속자</span></a></li>
			<li title="RSS 구독하기"><a href="<?php echo G5_URL; ?>/rss" target="_blank"><i class="fa fa-rss"></i><span class="sound_only"> RSS 구독하기</span></a></li>
			<?php if($is_member) { ?>
				<?php if($is_admin) {?>
					<li title="관리자모드"><a href="<?php echo G5_URL; ?>/adm"><i class="fa fa-cog"></i><span class="sound_only"> 관리자모드</span></a></li>
				<?php } ?>
				<li title="내정보"><a class="fbox" href="#at-outlogin-box"><i class="fa fa-user"></i><span class="sound_only"> 내정보</span></a></li>
				<li title="로그아웃"><a href="<?php echo G5_BBS_URL; ?>/logout.php"><i class="fa fa-power-off"></i><span class="sound_only"> 로그아웃</span></a></li>
			<?php } else { ?>
				<li title="로그인/찾기"><a class="fbox" href="#at-outlogin-box"><i class="fa fa-power-off"></i><span class="sound_only"> 로그인</span></a></li>
				<li title="회원가입"><a href="<?php echo G5_BBS_URL; ?>/register.php"><i class="fa fa-sign-in"></i><span class="sound_only"> 회원가입</span></a></li>
			<?php } ?>
		</ul>

		<ul id="at-menu-wide">
			<li><a href="<?php echo $site_url; ?>" <?php echo sel_menu('','index'); ?>><span class="old"><i class="fa fa-home fa-lg"></i> HOME</span></a></li>
			<?php  for ($i=1; $i < count($menu); $i++) { //메뉴출력 - 배열 0번은 전체통계이므로 1번부터 출력함 ?>
				<li>
					<a href="<?php echo $menu[$i]['gr_href']; ?>" class="<?php echo $menu[$i]['gr_on']; ?>">
						<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']; ?>">
								<span class="<?php echo $menu[$i]['board'][$k]['bo_new']; ?>"><?php echo $menu[$i]['board'][$k]['bo_subject']; ?></span>
							</a>
						</li>
						<?php } ?>
						</ul>
					<?php } ?>
				</li>
			<?php } ?>
			<?php if(!$is_member) { ?>
				<li><a class="fbox" href="#at-outlogin-box"><i class="fa fa-power-off fa-lg"></i> 로그인</a></li>
				<li><a href="<?php echo G5_BBS_URL; ?>/register.php"><i class="fa fa-sign-in fa-lg"></i> 회원가입</a></li>
			<?php } ?>
			<li title="내글반응"><a href="<?php echo AMINA_URL; ?>/response.php"><i class="fa fa-comments fa-lg"></i><?php echo $response_cnt;?><span class="sound_only"> 내글반응</span></a></li>
			<li title="새글모음"><a href="<?php echo G5_BBS_URL; ?>/new.php"><i class="fa fa-refresh fa-lg"></i><span class="sound_only"> 새글모음</span></a></li>
			<li title="전체검색"><a href="<?php echo G5_BBS_URL; ?>/search.php"><i class="fa fa-search fa-lg"></i><span class="sound_only"> 전체검색</span></a></li>
			<li title="현재접속자(<?php echo $now_connect; ?>명)"><a href="<?php echo G5_BBS_URL; ?>/current_connect.php"><i class="fa fa-link fa-lg"></i><span class="sound_only"> 현재접속자</span></a></li>
			<li title="RSS 구독하기"><a href="<?php echo G5_URL; ?>/rss" target="_blank"><i class="fa fa-rss fa-lg"></i><span class="sound_only"> RSS 구독하기</span></a></li>
			<?php if($is_member) { ?>
				<?php if($is_admin) {?>
					<li title="관리자모드"><a href="<?php echo G5_URL; ?>/adm"><i class="fa fa-cog fa-lg"></i><span class="sound_only"> 관리자모드</span></a></li>
				<?php } ?>
				<li title="내정보"><a class="fbox" href="#at-outlogin-box"><i class="fa fa-user fa-lg"></i><span class="sound_only"> 내정보</span></a></li>
				<li title="로그아웃"><a href="<?php echo G5_BBS_URL; ?>/logout.php"><i class="fa fa-power-off fa-lg"><span class="sound_only"> 로그아웃</span></i></a></li>
			<?php } ?>
		</ul>					    
	</div>
</div>

<div class="clear"></div>

<div id="at-menu-list" style="display:none;">
	<ul>
	<?php  for ($i=1; $i < count($menu); $i++) { //메뉴출력 - 배열 0번은 전체통계이므로 1번부터 출력함 ?>
		<li>
			<a href="<?php echo $menu[$i]['gr_href']; ?>" class="<?php echo $menu[$i]['gr_on']; ?>">
				<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']; ?>">
						<span class="<?php echo $menu[$i]['board'][$k]['bo_new']; ?>"><?php echo $menu[$i]['board'][$k]['bo_subject']; ?></span>
					</a>
				</li>
				<?php } ?>
				</ul>
			<?php } ?>
		</li>
	<?php } ?>
	</ul>
</div>

<!-- Login & Logout -->
<div id="at-outlogin-box" style="width:220px;display:none;">
	<?php echo outlogin('amina'); ?>
</div>
