<%@page import="kcg.faics.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 id="table">
	<table class="tbl_add" width="100%" border="0" cellpadding="0" cellspacing="0" style="margin-top:50px;">
		<colgroup>
   			<col width="100"/>
   			<col width="230">
   			<col width="100"/>
   			<col width="230">
   			<col width="100"/>
   			<col width="">
	    </colgroup>	   		
		<tbody>
			<tr>
				<td rowspan="3" class="user_img"><img height=130 alt="<c:out value="${memberVO.name}"/>" src="<spring:message code="Member.imgStoreUrl" /><c:if test="${memberVO.userimg eq null}">noImage.png</c:if><c:out value="${memberVO.userimg}"/>"></td>
				<th>성 명</th>
				<td colspan="2">
					<c:out value="${memberVO.name}"/>
					<c:if test="${memberVO.chnname eq null or memberVO.chnname ne ' '}">(<c:out value="${memberVO.chnname}"/>)</c:if>
				</td>
				<th>아이디</th>
				<td><c:out value="${memberVO.userid}"/></td>
			</tr>
			<tr>
				<th>주 소</th>
				<td colspan="4"><c:out value="${memberVO.address}"/></td>
			</tr>
			<tr>
				<th>e-mail</th>
				<td colspan="4"><c:out value="${memberVO.email}"/></td>
			</tr>
			<tr>
				<th>가족사항</th>
				<td><c:out value="${memberVO.family}"/></td>
				<th>담당업무</th>
				<td colspan="3"><c:out value="${memberVO.charge}"/></td>		
			</tr>
			<tr>	
				<th>경비전화</th>
				<td><c:out value="${memberVO.ophone}"/></td>
				<th>일반전화</th>
				<td><c:out value="${memberVO.hphone}"/></td>
				<th>휴대전화</th>
				<td><c:out value="${memberVO.cphone}"/></td>
			</tr>
			<tr>
				<th>경찰임용일</th>
				<td><c:out value="${memberVO.sdate}"/></td>
				<th>현계급임용일</th>
				<td><c:out value="${memberVO.pdate}"/></td>
				<th>현부서배치일</th>
				<td><c:out value="${memberVO.adate}"/></td>
			</tr>
			<tr>
				<th>소속</th>
				<td><c:out value="${memberVO.place1Str}"/></td>
				<th>소속2</th>
				<td><c:out value="${memberVO.place2Str}"/></td>
				<th>세부소속</th>
				<td><c:out value="${memberVO.place3Str}"/></td>
			</tr>
			<tr>
				<th>직위</th>
				<td><c:out value="${memberVO.dutiesStr}"/></td>			
				<th>직별</th>
				<td><c:out value="${memberVO.jobtypeStr}"/></td>
				<th>근무형태</th>
				<td>
					<c:if test="${memberVO.inout == 'i'}">내근</c:if>
					<c:if test="${memberVO.inout == 'o'}">외근</c:if>
					<c:if test="${memberVO.inout == 'd'}">국제항만분실</c:if>
				</td>
			</tr>
			<tr>
				<th>계급</th>
				<td><c:out value="${memberVO.positionStr}"/></td>
				<th>최종학력</th>
				<td><c:out value="${memberVO.scholarshipStr}"/></td>
				<th>전근무부서</th>
				<td><c:out value="${memberVO.explace}"/></td>
			</tr>
			<tr>
				<th>총 외사경력</th>
				<td><c:out value="${memberVO.getTotExcareerTermStr()}" /></td>				
				<th>과거외사경력</th>
				<td><c:out value="${fn:split(memberVO.excareer, '-')[0]}"/>년 <c:out value="${fn:split(memberVO.excareer, '-')[1]}"/>개월</td>
				<th>수사경력</th>
				<td><c:out value="${fn:split(memberVO.excareer1, '-')[0]}"/>년 <c:out value="${fn:split(memberVO.excareer1, '-')[1]}"/>개월</td>
			</tr>
			<tr>
				<th>정보경력</th>
				<td><c:out value="${fn:split(memberVO.excareer2, '-')[0]}"/>년 <c:out value="${fn:split(memberVO.excareer2, '-')[1]}"/>개월</td>
				<th>보안경력</th>
				<td colspan="3"><c:out value="${fn:split(memberVO.excareer3, '-')[0]}"/>년 <c:out value="${fn:split(memberVO.excareer3, '-')[1]}"/>개월</td>
			</tr>
			<tr>
				<th>비고</th>
				<td colspan="7"><c:out value="${memberVO.comment_}"/></td>
			</tr>
		</tbody>
	</table>
</div>
<% 
	LoginUserVO userVO = (LoginUserVO) session.getAttribute("userVO");
%>
<form name="menuForm" id="menuForm" method="post">
	<input type="hidden" name="userid" value="${memberVO.userid}"/>
	<div class="boardviewinfo">
		<ul class="right btn-style">
			<c:if test='${isSysAdmin or (isAdmin and userVO.place1 eq memberVO.place1) or userVO.userid eq memberVO.userid}'>
				<li>
	 				<a href="javascript:fn_modify();"><spring:message code="button.modify" /></a>
	            </li>
			</c:if>
 			<li>
 				<a href="javascript:fn_goPrint();"><spring:message code="button.print" /></a>
            </li>
 			<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/faMemberCmmnList.do'/>";
    }
	
    /* 화면 출력 function */
    function fn_goPrint() {
    	var printThis = document.getElementById("table").innerHTML;
    	printDiv(printThis);
    }
    
    /* 수정 */
    function fn_modify() {
    	document.menuForm.action = '<c:out value="/admin/cmmnMemberUpdateView.do"/>';
    	document.menuForm.submit();
    }
	//-->
</script>