<%@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"%>
	
<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">
	    </colgroup>	   		
		<tbody>
			<tr>
				<th><spring:message code="member.info.id"/></th>
				<td colspan="3"><c:out value="${memberVO.userid}"/></td>
			</tr>
			<tr>
				<th><spring:message code="member.info.name"/></th>
				<td><c:out value="${memberVO.name}"/></td>
				<th><spring:message code="member.info.position"/></th>
				<td><c:out value="${memberVO.positionStr}"/></td>
			</tr>
			<tr>
				<th><spring:message code="member.info.place"/></th>
				<td colspan="3">
					<c:out value="${memberVO.place1Str}"/> / <c:out value="${memberVO.place2Str}"/>
				</td>
			</tr>
			<tr>
				<th><spring:message code="member.info.joinYear"/></th>
				<td colspan="3">
					<fmt:parseDate var="cdate" value="${memberVO.cdate}" pattern="yyyyMMdd" scope="page" />
	   				<fmt:formatDate var="cdate" value="${cdate}" pattern="yyyy년 MM월 dd일" />
	   				<c:out value="${cdate}" />
				</td>
			</tr>
		</tbody>
	</table>
</div>

<form name="menuForm" id="menuForm" method="post">
	<input type="hidden" name="userid" value="${memberVO.userid}"/>
	<div class="boardviewinfo">
		<ul class="right btn-style">
			<li>
					<a href="javascript:fn_modify();"><spring:message code="button.modify" /></a>
	           </li>
				<li>
	 				<a href="javascript:fn_remove();"><spring:message code="button.memberRemove" /></a>
	           </li>
		</ul>	
	</div>
</form>

<script type="text/javaScript" defer="defer">
	<!--

	/* 수정 */
	function fn_modify() {
		document.menuForm.action = "<c:out value='/member/cmmnUpdateView.do'/>";
		document.menuForm.submit();
	}
	
	/* 회원탈퇴 */
	function fn_remove(userid) {
		if (confirm('탈퇴하시겠습니까?\n탈퇴하시면 회원데이터가 삭제됩니다.')){
			$.ajax({
				url : '/member/deleteCmmn.json',
				type : 'post',
				data : { 'userid' : userid },
				dataType : 'json',
				success : function(data) {
					if (data && data.result == 1){
						alert('<spring:message code="member.deleteSuccess.msg"/>');
						location.reload();
					} else {
						alert('<spring:message code="msg.failproc"/>');
					}
				}
			});
		}
	}
	
	-->
</script>