<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="ckeditor" uri="http://ckeditor.com" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<div id ="divPrintTitle" style="display: none;margin: 10px 0 10px 0;">
	<spring:message code="report.title" />
</div>

<fmt:parseNumber var="num1" type="number" value="${reportVO.inStateCode.charAt(0)}" />
<fmt:parseNumber var="num2" type="number" value="${reportVO.inStateCode.charAt(1)}" />

<form:form commandName="reportVO" name="formReprotModify" enctype="multipart/form-data" method="post">
	<form:hidden path="inSeq"/>
	<form:hidden path="inFsseq"/>
	<form:hidden path="inStateCode"/>
	
	<form:hidden path="inType" value="${reportVO.inType}"/>
	<form:hidden path="inAgencyCode" value="${reportVO.inAgencyCode}"/>
	<form:hidden path="inPlaceCode" value="${reportVO.inPlaceCode}"/>
	<form:hidden path="inPlaceName" value="${reportVO.inPlaceName}"/>
	<form:hidden path="inPlaceNum" value="${reportVO.inPlaceNum}"/>
	
	<div id="table">		
		<c:if test="${reportVO.inType eq '1'}"><spring:message code="member.type.fa" var="userType"/></c:if>
		<c:if test="${reportVO.inType eq '2'}"><spring:message code="member.type.nofa" var="userType"/></c:if>		
		<div class="doc_no hidden">
			<c:if test="${reportVO.inStateCode eq '99'}"><spring:message code="report.view.saveDocNo" /></c:if>
			<c:if test="${reportVO.inStateCode ne '99'}"><spring:message code="report.view.num" arguments="${reportVO.inPlaceName},${reportVO.inPlaceNum}"/></c:if>
		</div>
		<div class="pageinfo">
			<ul class="right btn-style">
				<li>
					<a class="btn_print" href="<c:url value="/report/print.do"><c:param name="inSeq" value="${reportVO.inSeq}" /></c:url>" target="_blank">
						<spring:message code="button.goPrint" />
					</a>
				</li>
			</ul>
		</div>
		<table class="tbl_add">
			<colgroup>
	   			<col width="100"/>
	   			<col width="150"/>
	   			<col width="100"/>
	   			<col width="150"/>	   			
	   			<col width="100"/>
	   			<col width="150"/>	   			
	   			<col width="100"/>
	   			<col width=""/>
	   		</colgroup>
	   		<tr>
	   			<th><spring:message code="report.list.num"/></th>
   				<td colspan="3"><spring:message code="report.view.num" arguments="${reportVO.inPlaceName},${reportVO.inPlaceNum}"/></td>
	   			<th><spring:message code="report.view.name" /></th>
	   			<td align="left" colspan="3">
					<c:out value="${userType} ${reportVO.inPosition} ${reportVO.inName}"/>
				</td>
	   		</tr>
	   		
	   		
  			<c:choose>
  			
  			
			<c:when test="${viewDoc eq true}">
				<th><spring:message code="report.view.category1" /></th>
				<td align="left"><c:out value="${reportVO.inCategory1Str}" /></td>
				<th><spring:message code="report.view.category2" /></th>
				<td align="left"><c:out value="${reportVO.inCategory2Str}" /></td>				
				<th><spring:message code="report.view.category3" /></th>
				<td align="left"><c:out value="${reportVO.inCategory3Str}" /></td>
				<th><spring:message code="report.view.category4" /></th>
				<td align="left"><c:out value="${reportVO.inCategory4Str}" /></td>
			</c:when>
			
			
			<c:otherwise>
			<tr>			
				<th><spring:message code="report.view.category1" /></th>
				<td class="form_select">
					<c:choose>
						<c:when test="${inUseCategory1 eq 'Y' }">
							<form:select path="inCategory1">
								<c:forEach var="cate" items="${category1}">
									<form:option value="${cate.key}" label="${cate.value}" />
								</c:forEach>
							</form:select>
						</c:when>
						
						<c:when test="${inUseCategory1 eq 'N' }">
							<form:select path="inCategory1">
									<form:option value="" label="" />
								<c:forEach var="cate" items="${category1}">
									<form:option value="${cate.key}" label="${cate.value}" />
								</c:forEach>
							</form:select>
						</c:when>
					</c:choose>
				</td>
				<th><spring:message code="report.view.category2" /></th>
				<td class="form_select">
					<c:choose>
						<c:when test="${inUseCategory2 eq 'Y' }">
							<form:select path="inCategory2">
								<c:forEach var="cate" items="${category2}">
									<form:option value="${cate.key}" label="${cate.value}" />
								</c:forEach>
							</form:select>
						</c:when>
						
						<c:when test="${inUseCategory2 eq 'N' }">
							<form:select path="inCategory2">
									<form:option value="" label="" />
								<c:forEach var="cate" items="${category2}">
									<form:option value="${cate.key}" label="${cate.value}" />
								</c:forEach>
							</form:select>
						</c:when>
					</c:choose>
				</td>				
				<th><spring:message code="report.view.category3" /></th>
				<td class="form_select">
					<c:choose>
						<c:when test="${inUseCategory3 eq 'Y' }">
							<form:select path="inCategory3">
								<c:forEach var="cate" items="${category3}">
									<form:option value="${cate.key}" label="${cate.value}" />
								</c:forEach>
							</form:select>
						</c:when>
						
						<c:when test="${inUseCategory3 eq 'N' }">
							<form:select path="inCategory3">
									<form:option value="" label="" />
								<c:forEach var="cate" items="${category3}">
									<form:option value="${cate.key}" label="${cate.value}" />
								</c:forEach>
							</form:select>
						</c:when>
					</c:choose>
				</td>
				<th><spring:message code="report.view.category4" /></th>	
				<td class="form_select">
					<c:choose>
						<c:when test="${inUseCategory4 eq 'Y' }">
							<form:select path="inCategory4">
								<c:forEach var="cate" items="${category4}">
									<form:option value="${cate.key}" label="${cate.value}" />
								</c:forEach>
							</form:select>
						</c:when>
						
						<c:when test="${inUseCategory4 eq 'N' }">
							<form:select path="inCategory4">
									<form:option value="" label="" />
								<c:forEach var="cate" items="${category4}">
									<form:option value="${cate.key}" label="${cate.value}" />
								</c:forEach>
							</form:select>
						</c:when>
					</c:choose>
				</td>	
			</tr>							
			</c:otherwise>
			</c:choose>
			<tr>
				<th><spring:message code="report.view.memo" /></th>
				<td colspan="7">
					<c:if test="${viewDoc eq true}"><c:out value="${reportVO.inMemo}"/></c:if>
					<c:if test="${viewDoc eq false}"><form:input path="inMemo"/></c:if>
				</td>
			</tr>
			<tr>
				<th><spring:message code="board.header.title"/></th>
				<td colspan="5">					
					<c:if test="${viewDoc eq true}"><c:out value="${reportVO.inSubject}"/></c:if>
					<c:if test="${viewDoc eq false}">
						<form:input id="title" path="inSubject" maxlength="150" cssClass="txt"/>						
					</c:if>					
				</td>
				<th><spring:message code="report.view.isAutoRemove"/></th>
				<td>
					<c:if test="${reportVO.inAutoRemove eq 1}">
						<c:if test="${viewDoc eq true}">예</c:if>
						<c:if test="${viewDoc eq false}">
							<input type="checkbox" name="inAutoRemove" id="chkInAutoRemove" value="1" checked="checked">
							<label for="inAutoRemove"><spring:message code="report.view.autoRemove"/> (<spring:message code="report.view.autoRemoveTerm"/>)</label>
						</c:if>
					</c:if>
					<c:if test="${reportVO.inAutoRemove ne 1}">
						<c:if test="${viewDoc eq true}">아니오</c:if>
						<c:if test="${viewDoc eq false}">
							<input type="checkbox" name="inAutoRemove" id="chkInAutoRemove" value="1">
							<label for="inAutoRemove"><spring:message code="report.view.autoRemove"/> (<spring:message code="report.view.autoRemoveTerm"/>)</label>
						</c:if>
					</c:if>
				</td>
			</tr>
			<tr>
	   			<th>
	   				<spring:message code="board.view.content" />
	   			</th>
	   			<td colspan="7">
	            	<c:if test="${viewDoc eq true}">
	            		<c:out value="${reportVO.inContent}" escapeXml="false"/>
	            	</c:if>
	            	<c:if test="${viewDoc eq false}">
			            <form:textarea path="inContent" rows="5" cols="58" htmlEscape="false"/>&nbsp;<form:errors path="inContent" />
	   					<ckeditor:replace replace="inContent" basePath="${pageContext.request.contextPath}/ckeditor/" />
	   					<span><spring:message code="etc.editor.descript"/></span>
		   			</c:if>
	            </td>
	   		</tr>
			<tr>
	   			<th>
	   				<spring:message code="board.view.attach" />1
	   			</th>
	            <td colspan="7">
					<c:if test="${not empty fn:trim(reportVO.inFile1)}">
						<p>
							<a href="/report/download.do?seq=<c:out value="${reportVO.inSeq}"/>&no=1" target="_blank">
					       		<c:out value="${reportVO.inFile1}"/>
					       	</a>
					       	<c:if test="${viewDoc eq false}">
								<input type="checkbox" name="deleteFile" value="1"/>삭제
								<c:set var="existOrder" value="${true}"/>
							</c:if>
						</p>
					</c:if>
					<c:if test="${viewDoc eq false}">
						<p><input type="file" name="fileObj1" class="input_file" size="60" /></p>
					</c:if>
	            </td>
			</tr>
			<tr>
	   			<th>
	   				<spring:message code="board.view.attach" />2
	   			</th>
	            <td colspan="7"> 
					<c:if test="${not empty fn:trim(reportVO.inFile2)}">
						<p>
							<a href="/report/download.do?seq=<c:out value="${reportVO.inSeq}"/>&no=2" target="_blank">
					       		<c:out value="${reportVO.inFile2}"/>
					       	</a>
					       	<c:if test="${viewDoc eq false}">
								<input type="checkbox" name="deleteFile" value="2"/>삭제
								<c:set var="existOrder" value="${true}"/>
							</c:if>
						</p>
					</c:if>
					<c:if test="${viewDoc eq false}">
						<p><input type="file" name="fileObj2" class="input_file" size="60" /></p>
					</c:if>
				</td>
			</tr>
			<tr>
	   			<th>
	   				<spring:message code="board.view.attach" />3
	   			</th>
	            <td colspan="7">
					<c:if test="${not empty fn:trim(reportVO.inFile3)}">
						<p>
							<a href="/report/download.do?seq=<c:out value="${reportVO.inSeq}"/>&no=3" target="_blank">
					       		<c:out value="${reportVO.inFile3}"/>
					       	</a>
					       	<c:if test="${viewDoc eq false}">
								<input type="checkbox" name="deleteFile" value="3"/>삭제
								<c:set var="existOrder" value="${true}"/>
							</c:if>
						</p>
					</c:if>
					<c:if test="${viewDoc eq false}">
						<input type="file" name="fileObj3" class="input_file" size="60" />
					</c:if>
				</td>
			</tr>
			<tr>
	   			<th>
	   				<spring:message code="board.view.attach" />4
	   			</th>
	            <td colspan="7">
					<c:if test="${not empty fn:trim(reportVO.inFile4)}">
						<p>
							<a href="/report/download.do?seq=<c:out value="${reportVO.inSeq}"/>&no=4" target="_blank">
					       		<c:out value="${reportVO.inFile4}"/>
					       	</a>
					       	<c:if test="${viewDoc eq false}">
								<input type="checkbox" name="deleteFile" value="4"/>삭제
								<c:set var="existOrder" value="${true}"/>
							</c:if>
						</p>
					</c:if>
					<c:if test="${viewDoc eq false}">
						<p><input type="file" name="fileObj4" class="input_file" size="60" /></p>
					</c:if>
	            </td>
			</tr>
			<tr>
	   			<th>
	   				<spring:message code="board.view.attach" />5
	   			</th>
	            <td colspan="7">
					<c:if test="${not empty fn:trim(reportVO.inFile5)}">
						<p>
							<a href="/report/download.do?seq=<c:out value="${reportVO.inSeq}"/>&no=5" target="_blank">
					       		<c:out value="${reportVO.inFile5}"/>
					       	</a>
					       	<c:if test="${viewDoc eq false}">
								<input type="checkbox" name="deleteFile" value="5"/>삭제
								<c:set var="existOrder" value="${true}"/>
							</c:if>
						</p>
					</c:if>
					<c:if test="${viewDoc eq false}">
						<p><input type="file" name="fileObj5" class="input_file" size="60" /></p>
					</c:if>
	            </td>
			</tr>
			<tr>
				<th>
					<spring:message code="report.view.infodate" />
				</th>
				<td colspan="7">
					<c:if test="${viewDoc eq true}">
						<c:out value="${reportVO.inInfodate}"/>
					</c:if>
					<c:if test="${viewDoc eq false}">
		   				<form:input path="strInfodate" cssClass="txt" readonly="true" value="${reportVO.inInfodate}" />
					</c:if>
				</td>
			</tr>
			<tr>
				<th>
					<spring:message code="report.view.state"/>
				</th>
				<td colspan="7">
					<span class="save"><c:out value="${reportVO.stateCodeName}" /></span>
					<span style="color:#c8c8c8;">(<c:out value="${reportVO.inStateCode}"/>)</span>
				</td>
			</tr>
			<c:if test="${reportVO.inOfflineType ne '0' and reportVO.inOfflineType ne '' and reportVO.inOfflineType ne null}">
				<tr>
					<th>
						<spring:message code="menu.report.manage.offline_write"/>
					</th>
					<td colspan="7">
						<c:if test="${reportVO.inOfflineType eq '1'}"><spring:message code="member.type.fa" /> </c:if>
						<c:if test="${reportVO.inOfflineType eq '2'}"><spring:message code="member.type.nofa" /> </c:if>
						<c:out value="${offUser.place1Str} " />
						<c:out value="${offUser.positionStr} " />
						<c:out value="${offUser.name}" />(<c:out value="${offUser.userid}" />)
						<c:if test="${offUser.duties ne '없음'}"><c:out value="${offUser.duties}" /></c:if>
					</td>
				</tr>
			</c:if>			
		</table>
		
		<c:if test="${reportVO.stateCodeName eq '결재 완료'}">
			<table class="tbl_add">
				<colgroup>
					<col width="200" />
					<col width="200" />	
					<col width="200" />	
					<col width="200" />	
					<col width="200" />	
					<col width="200" />	
					<col width="200" />	
					<col width="200" />					
				</colgroup>
				<tr class="th-bg">
					<th style="text-align:center;"><spring:message code="report.type.newsflash" /></th>
					<th style="text-align:center;"><spring:message code="report.type.judge" /></th>
					<th style="text-align:center;"><spring:message code="report.type.middle" /></th>
					<th style="text-align:center;"><spring:message code="report.type.notice" /></th>
					<th style="text-align:center;"><spring:message code="report.type.record" /></th>
					<th style="text-align:center;"><spring:message code="report.type.survey" /></th>
					<th style="text-align:center;"><spring:message code="report.type.reference" /></th>
					<th style="text-align:center;"><spring:message code="report.type.fullReport" /></th>
				</tr>
				<tr>
					<td align="center"><c:if test="${reportVO.inJudge eq 1}">○</c:if></td>
					<td align="center"><c:if test="${reportVO.inJudge eq 2}">○</c:if></td>
					<td align="center"><c:if test="${reportVO.inJudge eq 3}">○</c:if></td>
					<td align="center"><c:if test="${reportVO.inJudge eq 4}">○</c:if></td>
					<td align="center"><c:if test="${reportVO.inJudge eq 5}">○</c:if></td>
					<td align="center"><c:if test="${reportVO.inJudge eq 6}">○</c:if></td>
					<td align="center"><c:if test="${reportVO.inJudge eq 7}">○</c:if></td>
					<td align="center"><c:if test="${reportVO.inReport eq 1}">○</c:if></td>
				</tr>
			</table>
		</c:if>
		 
		<c:if test="${reportVO.inStateCode ne '99'}">
				
			<%-- 안전서 --%>
			<c:if test="${(num1 > 1 || (num1 eq 1 && num2 >= 2)) && docGroupCode eq 1}">
				<table class="tbl_add">
					<colgroup>
						<col width="150" />
						<col width="40" />
						<col width="40" />
						<col width="40" />
						<col width="40" />
						<col width="40" />
						<col width="40" />
						<col width="40" />
						<col width="40" />
					</colgroup>
					<tr class="th-bg">
						<th>해양경찰서</th>
						<th style="text-align:center;"><spring:message code="report.type.newsflash"/></th>
						<th style="text-align:center;"><spring:message code="report.type.judge"/></th>
						<th style="text-align:center;"><spring:message code="report.type.middle"/></th>
						<th style="text-align:center;"><spring:message code="report.type.notice"/></th>
						<th style="text-align:center;"><spring:message code="report.type.record"/></th>
						<th style="text-align:center;"><spring:message code="report.type.survey"/></th>
						<th style="text-align:center;"><spring:message code="report.type.reference"/></th>
						<th style="text-align:center;"><spring:message code="report.type.fullReport"/></th>
					</tr>
					<tr>
						<td>
							<c:choose>
								<c:when test="${fn:trim(ju1section.juPlace1) ne ''}"><c:out value="${ju1section.juPlace1}" /></c:when>
								<c:when test="${fn:trim(ju1head.juPlace1) ne ''}"><c:out value="${ju1head.juPlace1}" /></c:when>
								<c:when test="${docGroupCode eq 1}"><c:out value="${reportVO.inPlace1}" /></c:when>
								<c:otherwise><spring:message code="msg.noInfo"/></c:otherwise>
							</c:choose>
						</td>						
						<c:if test="${loginUser.isSysAdmin eq true}">
							<td align="center"><form:radiobutton path="inJudge1" value="1" /></td>
							<td align="center"><form:radiobutton path="inJudge1" value="2" /></td>
							<td align="center"><form:radiobutton path="inJudge1" value="3" /></td>
							<td align="center"><form:radiobutton path="inJudge1" value="4" /></td>
							<td align="center"><form:radiobutton path="inJudge1" value="5" /></td>
							<td align="center"><form:radiobutton path="inJudge1" value="6" /></td>
							<td align="center"><form:radiobutton path="inJudge1" value="7" /></td>
						</c:if>
						<c:if test="${loginUser.isSysAdmin eq false}">
							<td align="center"><c:if test="${reportVO.inJudge1 eq 1}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge1 eq 2}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge1 eq 3}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge1 eq 4}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge1 eq 5}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge1 eq 6}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge1 eq 7}">○</c:if></td>
						</c:if>
						<td align="center"><c:if test="${reportVO.inReport1 > 0}">○</c:if></td>
					</tr>
					<c:if test="${myDutiesCode eq '2' or myDutiesCode eq '3'}">
						<tr>
							<td><spring:message code="report.state.chiefApproval"/></td>
							<td align="center"><c:if test="${reportVO.inJudge5 eq 1}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge5 eq 2}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge5 eq 3}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge5 eq 4}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge5 eq 5}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge5 eq 6}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge5 eq 7}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inReport5 > 0}">○</c:if></td>
						</tr>
					</c:if>
					<c:if test="${!empty ju1section}">
						<tr>
							<th><spring:message code="report.view.appraiser" /></th>
							<td colspan="8">
								<c:out value="${ju1section.juPosition}"/>
								<c:out value="${ju1section.juName}" />
								<c:if test="${ju1section.juDutiesCode eq '2'}"><spring:message code="member.view.rptPermission.section" /></c:if>
								<c:if test="${ju1section.juDutiesCode eq '3'}"><spring:message code="member.view.rptPermission.head" /></c:if>
							</td>
						</tr>
						<tr>
							<th><spring:message code="report.view.opinion" /></th>
							<td colspan="8"><c:out value="${ju1section.juMessage}" /></td>
						</tr>
						<tr>
							<th><spring:message code="report.view.reportDate" /></th>
							<td colspan="8"><c:out value="${ju1section.juChkdate}" /></td>
						</tr>
					</c:if>
					<c:if test="${!empty ju1head}">
						<tr>
							<th><spring:message code="report.view.appraiser" /></th>
							<td colspan="8">
								<c:out value="${ju1head.juPosition }"/>
								<c:out value="${ju1head.juName}" />
								<c:if test="${ju1head.juDutiesCode eq '2'}"><spring:message code="member.view.rptPermission.section" /></c:if>
								<c:if test="${ju1head.juDutiesCode eq '3'}"><spring:message code="member.view.rptPermission.head" /></c:if>
							</td>
						</tr>
						<tr>
							<th><spring:message code="report.view.opinion" /></th>
							<td colspan="8"><c:out value="${ju1head.juMessage}" /></td>
						</tr>
						<tr>
							<th><spring:message code="report.view.reportDate" /></th>
							<td colspan="8"><c:out value="${ju1head.juChkdate}" /></td>
						</tr>
					</c:if>
				</table>
			</c:if>
			
			<%-- 지방청 --%>
			<c:if test="${(num1 > 2 || (num1 eq 2 && num2 >= 2)) && docGroupCode <= 2}">
				<table class="tbl_add">
					<colgroup>
						<col width="150" />
						<col width="40" />
						<col width="40" />
						<col width="40" />
						<col width="40" />
						<col width="40" />
						<col width="40" />
						<col width="40" />
						<col width="40" />
					</colgroup>
					<tr>
						<th>지방해양경찰청</th>
						<th style="text-align:center;"><spring:message code="report.type.newsflash"/></th>
						<th style="text-align:center;"><spring:message code="report.type.judge"/></th>
						<th style="text-align:center;"><spring:message code="report.type.middle"/></th>
						<th style="text-align:center;"><spring:message code="report.type.notice"/></th>
						<th style="text-align:center;"><spring:message code="report.type.record"/></th>
						<th style="text-align:center;"><spring:message code="report.type.survey"/></th>
						<th style="text-align:center;"><spring:message code="report.type.reference"/></th>
						<th style="text-align:center;"><spring:message code="report.type.fullReport"/></th>
					</tr>
					<tr>
						<td>
							<c:choose>
								<c:when test="${fn:trim(ju2section.juPlace1) ne ''}"><c:out value="${ju2section.juPlace1}" /></c:when>
								<c:when test="${fn:trim(ju2head.juPlace1) ne ''}"><c:out value="${ju2head.juPlace1}" /></c:when>
								<c:when test="${docGroupCode eq 1}"><c:out value="${reportVO.inPlace1}" /></c:when>
								<c:otherwise><spring:message code="msg.noInfo"/></c:otherwise>
							</c:choose>
						</td>
						<c:if test="${loginUser.isSysAdmin eq true}">
							<td align="center"><form:radiobutton path="inJudge2" value="1" /></td>
							<td align="center"><form:radiobutton path="inJudge2" value="2" /></td>
							<td align="center"><form:radiobutton path="inJudge2" value="3" /></td>
							<td align="center"><form:radiobutton path="inJudge2" value="4" /></td>
							<td align="center"><form:radiobutton path="inJudge2" value="5" /></td>
							<td align="center"><form:radiobutton path="inJudge2" value="6" /></td>
							<td align="center"><form:radiobutton path="inJudge2" value="7" /></td>
						</c:if>
						<c:if test="${loginUser.isSysAdmin eq false}">
							<td align="center"><c:if test="${reportVO.inJudge2 eq 1}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge2 eq 2}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge2 eq 3}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge2 eq 4}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge2 eq 5}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge2 eq 6}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge2 eq 7}">○</c:if></td>
						</c:if>
						<td align="center"><c:if test="${reportVO.inReport2 > 0}">○</c:if></td>
					</tr>
					<c:if test="${myDutiesCode eq '2' or myDutiesCode eq '3'}">
						<tr>
							<td><spring:message code="report.state.chiefApproval"/></td>
							<td align="center"><c:if test="${reportVO.inJudge6 eq 1}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge6 eq 2}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge6 eq 3}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge6 eq 4}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge6 eq 5}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge6 eq 6}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge6 eq 7}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inReport6 > 0}">○</c:if></td>
						</tr>
					</c:if>
					<c:if test="${!empty ju2section}">
						<tr>
							<th><spring:message code="report.view.appraiser" /></th>
							<td colspan="8">
								<c:out value="${ju2section.juPosition}"/>
								<c:out value="${ju2section.juName}" />
								<c:if test="${ju2section.juDutiesCode eq '2'}"><spring:message code="member.view.rptPermission.section" /></c:if>
								<c:if test="${ju2section.juDutiesCode eq '3'}"><spring:message code="member.view.rptPermission.head" /></c:if>
							</td>
						</tr>
						<tr>
							<th><spring:message code="report.view.opinion" /></th>
							<td colspan="8"><c:out value="${ju2section.juMessage}" /></td>
						</tr>
						<tr>
							<th><spring:message code="report.view.reportDate" /></th>
							<td colspan="8"><c:out value="${ju2section.juChkdate}" /></td>
						</tr>
					</c:if>
					<c:if test="${!empty ju2head}">
						<tr>
							<th><spring:message code="report.view.appraiser" /></th>
							<td colspan="8">
								<c:out value="${ju2head.juPosition}"/>
								<c:out value="${ju2head.juName}" />
								<c:if test="${ju2head.juDutiesCode eq '2'}"><spring:message code="member.view.rptPermission.section" /></c:if>
								<c:if test="${ju2head.juDutiesCode eq '3'}"><spring:message code="member.view.rptPermission.head" /></c:if>
							</td>
						</tr>
						<tr>
							<th><spring:message code="report.view.opinion" /></th>
							<td colspan="8"><c:out value="${ju2head.juMessage}" /></td>
						</tr>
						<tr>
							<th><spring:message code="report.view.reportDate" /></th>
							<td colspan="8"><c:out value="${ju2head.juChkdate}" /></td>
						</tr>
					</c:if>
				</table>
			</c:if>
			
			<%-- 본청 --%>
			<c:if test="${num1 eq 3 && num2 >= 2 && docGroupCode <= 3}">
				<table class="tbl_add">
					<colgroup>
						<col width="125">
						<col width="125">
						<col width="125">
						<col width="125">
						<col width="125">
						<col width="125">
						<col width="125">
						<col width="125">						
					</colgroup>
					<tr class="th-bg">
						<th>본청</th>
						<th style="text-align:center;"><spring:message code="report.type.newsflash"/></th>
						<th style="text-align:center;"><spring:message code="report.type.judge"/></th>
						<th style="text-align:center;"><spring:message code="report.type.middle"/></th>
						<th style="text-align:center;"><spring:message code="report.type.notice"/></th>
						<th style="text-align:center;"><spring:message code="report.type.record"/></th>
						<th style="text-align:center;"><spring:message code="report.type.survey"/></th>
						<th style="text-align:center;"><spring:message code="report.type.reference"/></th>
						<th style="text-align:center;"><spring:message code="report.type.fullReport"/></th>
					</tr>
					<tr>
						<td>
							<c:choose>
								<c:when test="${fn:trim(ju3section.juPlace1) ne ''}"><c:out value="${ju3section.juPlace1}" /></c:when>
								<c:when test="${fn:trim(ju3head.juPlace1) ne ''}"><c:out value="${ju3head.juPlace1}" /></c:when>
								<c:when test="${docGroupCode eq 1}"><c:out value="${reportVO.inPlace1}" /></c:when>
								<c:otherwise><spring:message code="msg.noInfo"/></c:otherwise>
							</c:choose>
						</td>						
						<c:if test="${loginUser.isSysAdmin eq true}">
							<td align="center"><form:radiobutton path="inJudge3" value="1" /></td>
							<td align="center"><form:radiobutton path="inJudge3" value="2" /></td>
							<td align="center"><form:radiobutton path="inJudge3" value="3" /></td>
							<td align="center"><form:radiobutton path="inJudge3" value="4" /></td>
							<td align="center"><form:radiobutton path="inJudge3" value="5" /></td>
							<td align="center"><form:radiobutton path="inJudge3" value="6" /></td>
							<td align="center"><form:radiobutton path="inJudge3" value="7" /></td>
						</c:if>
						<c:if test="${loginUser.isSysAdmin eq false}">
							<td align="center"><c:if test="${reportVO.inJudge3 eq 1}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge3 eq 2}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge3 eq 3}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge3 eq 4}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge3 eq 5}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge3 eq 6}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge3 eq 7}">○</c:if></td>
						</c:if>
						<td align="center"><c:if test="${reportVO.inReport3 > 0}">○</c:if></td>
					</tr>
					<c:if test="${myDutiesCode eq '2' or myDutiesCode eq '3'}">
						<tr>
							<td><spring:message code="report.state.chiefApproval"/></td>
							<td align="center"><c:if test="${reportVO.inJudge4 eq 1}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge4 eq 2}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge4 eq 3}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge4 eq 4}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge4 eq 5}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge4 eq 6}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inJudge4 eq 7}">○</c:if></td>
							<td align="center"><c:if test="${reportVO.inReport4 > 0}">○</c:if></td>
						</tr>
					</c:if>
					<c:if test="${!empty ju3section}">
						<tr>
							<th><spring:message code="report.view.appraiser" /></th>
							<td colspan="8">
								<c:out value="${ju3section.juPosition}" />
								<c:out value="${ju3section.juName}" />
								<c:if test="${ju3section.juDutiesCode eq '2'}"><spring:message code="member.view.rptPermission.section" /></c:if>
								<c:if test="${ju3section.juDutiesCode eq '3'}"><spring:message code="member.view.rptPermission.head" /></c:if>
							</td>
						</tr>
						<tr>
							<th><spring:message code="report.view.opinion" /></th>
							<td colspan="8"><c:out value="${ju3section.juMessage}" /></td>
						</tr>
						<tr>
							<th><spring:message code="report.view.reportDate" /></th>
							<td colspan="8"><c:out value="${ju3section.juChkdate}" /></td>
						</tr>
					</c:if>
					<c:if test="${!empty ju3head}">
						<tr>
							<th><spring:message code="report.view.appraiser" /></th>
							<td colspan="8">
								<c:out value="${ju3head.juPosition}" />
								<c:out value="${ju3head.juName}" />
								<c:if test="${ju3head.juDutiesCode eq '2'}"><spring:message code="member.view.rptPermission.section" /></c:if>
								<c:if test="${ju3head.juDutiesCode eq '3'}"><spring:message code="member.view.rptPermission.head" /></c:if>
							</td>
						</tr>
						<tr>
							<th><spring:message code="report.view.opinion" /></th>
							<td colspan="8"><c:out value="${ju3head.juMessage}" /></td>
						</tr>
						<tr>
							<th><spring:message code="report.view.reportDate" /></th>
							<td colspan="8"><c:out value="${ju3head.juChkdate}" /></td>
						</tr>
					</c:if>
				</table>
			</c:if>
		</c:if>
	</div>

	<div class="boardviewinfo">
		<ul class="right btn-style mb-checkbox">
			<c:if test="${viewDoc eq false}">
				<c:if test="${reportVO.inStateCode eq '99'}">
					<li>
						<a href="javascript:fn_report();"><spring:message code="button.goReport" /></a>
					</li>
					<li>
						<a href="javascript:fn_save();"><spring:message code="button.goSaveTemp" /></a>
					</li>
				</c:if>
				<c:if test="${reportVO.inStateCode ne '99'}">
					<c:if test="${num1 < 3 && num2 eq 4}">
						<input type="checkbox" name="inReport" id="checkReport" value="1"/><label for="checkReport"><spring:message code="report.type.fullReport" /></label>
					</c:if>
					<li>
						<a href="javascript:fn_update();"><spring:message code="button.goModify" /></a>
					</li>
					<li>
						<input type="hidden" name="seletedSeq" value="${reportVO.inSeq}"/>
						<a href="javascript:fn_delete();"><spring:message code="button.goDelete" /></a>
					</li>
				</c:if>
			</c:if>
			<li>
				<a href="javascript:history.back();"><spring:message code="button.goBack" /></a>
			</li>
		</ul>
	</div>
	
</form:form>

<script type="text/javascript" src="<c:url value='/validator.do'/>"></script>
<validator:javascript formName="reportVO" staticJavascript="false" xhtml="true" cdata="false"/>
<script type="text/javaScript" defer="defer">
<!--
	$(function(){
		$('#strInfodate').datepicker({dateFormat: 'yy-mm-dd'});
		
		var result = "<c:out value="${submitResultMsg}"/>";
		if (result != "") {
			alert(result);
		}
	});

	function fn_report() {
		if (confirm("보고하시겠습니까?")){
			frm = document.formReprotModify;
			var stateCode = "<c:out value="${inStateCode}"/>";
			if (stateCode == "" || stateCode == "99")
				frm.inStateCode.value = "${myGroupCode}" + "1";
			frm.inContent.value = encodeURIComponent(CKEDITOR.instances.inContent.getData());
			
			if(!validateReportVO(frm)){
		        return;
		    }else{
		    	frm.action = "<c:out value='/report/updateReport.do'/>";
		       	frm.submit();
		    }
		}
	}
	function fn_update() {
		frm = document.formReprotModify;
		frm.inContent.value = encodeURIComponent(CKEDITOR.instances.inContent.getData());
		if(!validateReportVO(frm)){
	        return;
	    }else{
	    	frm.action = "<c:out value='/report/update.do'/>";
	       	frm.submit();
	    }
	}
	function fn_save() {
		frm = document.formReprotModify;
	
		frm.inContent.value = encodeURIComponent(CKEDITOR.instances.inContent.getData());
		
		if(!validateReportVO(frm)){
	        return;
	    }else{
	    	frm.action = "<c:out value='/report/update.do'/>";
	       	frm.submit();
	    }
	}
	function fn_delete() {
		if (confirm("<spring:message code="confirm.msg.askDel" />")){
			document.formReprotModify.action = "<c:out value='/report/deleteAndSaveList.do' />";
			document.formReprotModify.submit();
		}
	}
-->
</script>