<%@page import="kcg.imis.sec.LoginUserVO"%>
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<script type="text/javaScript" defer="defer">
	if('${isEmpty}' == 'true'){
		location.href = '/';
	}
</script>

<div class="memberAdd" id="table">
	<table class="tbl_add" width="100%" border="0" cellpadding="0" cellspacing="0"">
		<colgroup>
   			<col width="140"/>
   			<col width="">
   			<col width="140"/>
   			<col width="">
   			<col width="140"/>
   			<col width="">
	    </colgroup>	   		
		<tbody>
			<tr>				
				<th>성 명</th>
				<td colspan="3">
					<c:out value="${memberVO.name}"/>
				</td>
			</tr>
			<tr>
				<th>아이디</th>
				<td colspan="3">
					<c:out value="${memberVO.userid}"/>
				</td>
			</tr>
			<tr>
				<th>소속</th>
				<td>
					<c:out value="${memberVO.place1Str}"/>
				</td>
				<th>소속2</th>
				<td>
					<c:out value="${memberVO.place2Str}"/>
				</td>
			</tr>
			<tr>
				<th>계급</th>
				<td colspan="3">
					<c:out value="${memberVO.dutyStr}"/>
				</td>
			</tr>
			<tr>
				<th>사용자등급</th>
				<td colspan="3">
					<c:choose>
						<c:when test="${memberVO.usegrade eq '1'}">관리자</c:when>
						<c:when test="${memberVO.usegrade eq '2'}">중간관리자</c:when>
						<c:when test="${memberVO.usegrade eq '3'}">국제협력관</c:when>
						<c:when test="${memberVO.usegrade eq '4'}">국제법규팀장</c:when>
						<c:when test="${memberVO.usegrade eq '6'}">사용자(쓰기)</c:when>
						<c:when test="${memberVO.usegrade eq '8'}">사용중지</c:when>
					</c:choose>
				</td>
			</tr>
			
		</tbody>
	</table>
</div>
<% 
	LoginUserVO userVO = (LoginUserVO) session.getAttribute("userVO");
%>
<form name="menuForm" method="post">
	<input type="hidden" name="userid" value="${memberVO.userid}"/>
		<div class="boardviewinfo">
		<ul class="right btn-style">
			<c:if test='${(isAdmin and userVO.place1 eq memberVO.place1) or userVO.userid eq memberVO.userid or isSysAdmin}'>
				<li>
	 				<a href="javascript:fn_modify();"><spring:message code="button.modify" /></a>
	            </li>
			</c:if>
 			<li>
 			 	<a href="javascript:fn_selectList();"><spring:message code="button.list" /></a>
            </li>            
		</ul>	
	</div>
</form>
<script type="text/javaScript" defer="defer">
	
	/* 글 목록 화면 function */
    function fn_selectList() {
       	location.href = "<c:url value='/admin/memberList.do'/>";
    }
	
    /* 수정 */
    function fn_modify() {
    	document.menuForm.action = '<c:out value="/admin/memberUpdateView.do"/>';
    	document.menuForm.submit();
    }
	
</script>