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

<link rel="stylesheet" href="<?php echo $outlogin_skin_url; ?>/outlogin.css">

<?php if($action == 'login') { 

	$memo_msg = ($memo_not_read > 0) ? "새쪽지<span class='ol_new_memo'>({$memo_not_read})</span>" : "쪽지함";
	$response_msg = ($my_response > 0) ? "새반응<span class='ol_new_response'>({$my_response})</span>" : "내글반응";

	if(!AMINA) echo '<script src="'.$outlogin_skin_url.'/js/login.js"></script>'."\n";
?>
	<div id="ol_login">
		<span class="mb-photo"><?php echo mb_photo($member['mb_id'], $member['mb_id'], 50, 50); ?></span>
		<p>
			<strong><?php echo $info['name']; ?></strong>
			<?php echo $info['grade']; ?>
		</p>
		<?php if ($is_admin == 'super' || $is_auth) { ?>
			<div class="ol_btn_a"><a href="<?php echo G5_ADMIN_URL; ?>"><b>관리자 모드</b></a></div>
		<?php } ?>

		<ul>
		<li class="ol_xp_level left">
			<strong>Lv <?php echo $info['level']; ?></strong>
		</li>
		<li class="ol_xp_level right">
			<strong>XP <?php echo number_format($info['xp']); ?> (<?php echo $info['per']; ?>%)</strong>
		</li>
		<li class="ol_xp_bar" title="다음 레벨까지 <?php echo number_format($info['up']); ?>점(<?php echo (100 - $info['per']); ?>%) 남았습니다.">
			<div id="ol_xp_per" style="width:<?php echo round($info['per']); ?>%;"></div>
		</li>
		<li class="ol_btn_l left">
			<a href="<?php echo AMINA_URL; ?>/point.php?action=mp" target="_blank" class="popup_point">
				<b>MP</b>
				<strong><?php echo number_format($info['mp']); ?></strong>
			</a>		
		</li>
		<li class="ol_btn_l right">
			<a href="<?php echo AMINA_URL; ?>/point.php?action=ap" target="_blank" class="popup_point">
				<b>AP</b>
				<strong><?php echo number_format($info['ap']); ?></strong>
			</a>		
		</li>
		<li class="ol_btn_s left">
			<a href="<?php echo G5_BBS_URL; ?>/memo.php" target="_blank" class="win_memo">
				<b><?php echo $memo_msg; ?></b>
			</a>
		</li>
		<li class="ol_btn_s right">
			<a href="<?php echo G5_BBS_URL; ?>/scrap.php" target="_blank" class="win_scrap">
				<b>스크랩</b>
			</a>
		</li>
		<li class="ol_btn_s left">
			<a href="<?php echo AMINA_URL; ?>/response.php">
				<b><?php echo $response_msg; ?></b>
			</a>
		</li>
		<li class="ol_btn_s right">
			<a href="<?php echo G5_BBS_URL; ?>/member_confirm.php?url=register_form.php">
				<b>정보수정</b>
			</a>
		</li>
		</ul>

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

		<div class="ol_logout">
			<a href="<?php echo G5_BBS_URL; ?>/logout.php">
				<b>로그아웃</b>
			</a>
		</div>
	</div>
<?php } else if($action == 'logout') { ?>
	<script src="<?php echo $outlogin_skin_url; ?>/js/logout.js"></script>
	<div id="ol_logout">
		<form name="outlogin" method="post" action="<?php echo $outlogin_action_url; ?>" onsubmit="return outlogin_submit(this);" autocomplete="off">
		<input type="hidden" name="url" value="<?php echo $outlogin_url; ?>">
		<ul>
			<li>
				<label for="ol_mb_id" class="none">아이디</label><input type="text" name="mb_id" id="ol_mb_id" class="id_none" itemname="아이디" value="" tabindex="1">
			</li>
			<li>
				<label for="ol_mb_pw" class="none">비밀번호</label><input type="password" name="mb_password" id="ol_mb_pw" class="pw_none" itemname="비밀번호" value="" tabindex="2">
			</li>
			<li class="left"><input type="checkbox" name="auto_login" value="1" id="auto_login"> <label for="auto_login">자동로그인</label></li>
			<li class="right"><input type="submit" class="login_submit" value="로그인" tabindex="3"></li>
			<li class="join"><a href="<?php echo G5_BBS_URL; ?>/register.php"><b>회원가입</b></a> &nbsp; &nbsp; <a href="<?php echo G5_BBS_URL; ?>/password_lost.php" class="w_password_lost">아이디/비번 찾기</a></li>
		</ul>
		</form>
	</div>
<?php } ?>
