<%--
  Class Name : EgovBoardMngInfsPop.jsp
  Description : 게시판 관리자 목록 조회 팝업화면
  Modification Information
 
      수정일         수정자                   수정내용
    -------    --------    ---------------------------
     2018.07.06   ITEN              최초 생성
 
    author   : ITEN
    since    : 2018.07.06
--%>
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<c:set var="ImgUrl" value="/images/egovframework/cop/com/" />
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="content-language" content="ko">
<link href="<c:url value='/'/>css/post.css" rel="stylesheet">
<script type="text/javascript" src="<c:url value='/js/showModalDialogCallee.js'/>"></script>
<script type="text/javascript">
    function press(event) {
        if (event.keyCode==13) {
            fn_egov_select_BBSMngInfo('1');
        }
    }
    function fn_egov_select_BBSMngInfo(pageNo){
        document.frm.pageIndex.value = pageNo;
        document.frm.action = "<c:url value='/cop/bbs/selectBBSMngInfsPop.do'/>";
        document.frm.submit();  
    }
    
    function fn_egov_returnBBSMngInfo(bbsMngId){
        var retVal = bbsMngId;
        
		//setReturnValue(retVal);
		//window.returnValue = retVal;
		
		window.opener.parent.fn_add_BBSMngId(retVal);
		
		window.close();

        /* parent.fn_egov_returnValue(retVal); */
    }

</script>
<title>게시판 관리자 목록</title>
</head>
<body>
	<center>
	<form name="frm" action="<c:url value='/uss/umt/user/EgovUserManage.do'/>" method="post">
	<input name="pageIndex" type="hidden" value="<c:out value='${userSearchVO.pageIndex}'/>" />
		<!-- <input type="hidden" name="tmplatId" value="" />
    <input type="submit" id="invisible" class="invisible"/> -->

		<div class="pop_wrapper">
			<!-- 검색 필드 박스 시작 -->
			<div class="pop_div1">
				<p>게시판 관리자 목록</p>
			</div>
			<div class="pop_div2">
				<table>
					<colgroup>
						<col style="width:10%"/>
						<col style="width:62%"/>
						<col />
					</colgroup>
					<tr>
						<td>
							<select name="searchCondition" class="select" title="검색조건 선택">
								<option value="0" <c:if test="${userSearchVO.searchCondition == '0'}">selected="selected"</c:if>>ID</option>
								<option value="1" <c:if test="${userSearchVO.searchCondition == '1'}">selected="selected"</c:if>>성명</option>
							</select>
						</td>
						<td>
							<input name="searchKeyword" type="text" size="15" value='<c:out value="${userSearchVO.searchKeyword}"/>' maxlength="35" onkeypress="press(event);" title="검색어 입력">
						</td>
						<td>
							<button onclick="javascript:fn_egov_select_BBSMngInfo('1'); return false;"><img src="/img/post/board_search.png"> 조회</button>
							<%-- <a href="<c:url value='/cop/com/selectTemplateInfsPop.do'/>" onclick="javascript:fn_egov_select_BBSMngInfo('1'); return false;"><img src="<c:url value='/images/img_search.gif'/>" alt="search" />조회 </a> --%>
						</td>
					</tr>
				</table>
			</div>
			<!-- //검색 필드 박스 끝 -->

			<!-- table add start -->
			<div class="pop_div3">
				<table>
					<tr>
						<th>번호</th>
						<th>ID</th>
						<th>성명</th>
						<th>선택</th>
					</tr>
					<c:forEach var="result" items="${resultList}" varStatus="status">
						<tr>
							<td>
								<strong><c:out value="${(userSearchVO.pageIndex-1) * userSearchVO.pageSize + status.count}" /></strong>
							</td>
							<td>
								<c:out value="${result.userId}" />
							</td>
							<td>
								<c:out value="${result.userNm}" />
							</td>
							<td>
								<input type="button" name="selectTmplat" value="선택" onClick="javascript:fn_egov_returnBBSMngInfo('<c:out value="${result.userId}"/>')" />
							</td>
						</tr>
					</c:forEach>
					<c:if test="${fn:length(resultList) == 0}">
						<tr>
							<td nowrap colspan="10">
								<spring:message code="common.nodata.msg" />
							</td>
						</tr>
					</c:if>
				</table>
			</div>
	
			<!-- 페이지 네비게이션 시작 -->
			<div class="pop_div4">
				<ul>
					<ui:pagination paginationInfo="${paginationInfo}" type="image" jsFunction="fn_egov_select_BBSMngInfo" />
				</ul>
				<div class="clear"></div>
				<button class="pop_close_btn" onclick= "javascript:parent.close()">닫기</button>
			</div>
			<!-- //페이지 네비게이션 끝 -->
		</div>
	</form>
	</center>
</body>
</html>