<%@ 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="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<div id="divPrintArea">
	<jsp:useBean id="toDay" class="java.util.Date" />
	<div id ="divPrintTitle" style="display: none;margin: 10px 0 10px 0;">치안대상 현황 출력(출력일자 : <fmt:formatDate value="${toDay}" pattern="yyyy-MM-dd" />)</div>
	<table width="100%">
		<caption>외사취약지 현황</caption>
		<thead>
			<tr>
				<c:forEach var="item" items="${statsPerPlace}" varStatus="status">
					<th align="center"><c:out value="${item['CODENM_YAK']}" /></th>
				</c:forEach>
			</tr>
		</thead>
		<tbody>
			<tr>
				<c:forEach var="item" items="${statsPerPlace}" varStatus="status">
					<td align="center" class="listtd"><c:out value="${item['CNT']}" /></td>
				</c:forEach>
			</tr>
		</tbody>
	</table>

	<form:form commandName="weakPlaceList" name="listForm" method="get">
		<input type="hidden" name="idx" />
		<!-- List -->
		<div id="table">
			<table width="100%" border="0" cellpadding="0" cellspacing="0"
				summary="게시판 목록을 확인 할 수 있습니다.">
				<caption>치안대상 통계현황</caption>
				<colgroup>
					<col width="?">
					<col width="45">
					<col width="45">
					<col width="45">
					<col width="45">
					<col width="45">
					<col width="45">
					<col width="45">
					<col width="45">
					<col width="45">
					<col width="45">
					<col width="45">
					<col width="45">
					<col width="45">
					<col width="45">
					<col width="45">
					<col width="45">
				</colgroup>
				<thead>
					<tr>
						<th align="center"><spring:message code="equip.name" /></th>
						<th align="center"><spring:message code="equip.total" /></th>
						<th align="center"><spring:message code="equip.PS01" /></th>
						<th align="center"><spring:message code="equip.PS02" /></th>
						<th align="center"><spring:message code="equip.PS03" /></th>
						<th align="center"><spring:message code="equip.PS04" /></th>
						<th align="center"><spring:message code="equip.PS05" /></th>
						<th align="center"><spring:message code="equip.PS06" /></th>
						<th align="center"><spring:message code="equip.PS07" /></th>
						<th align="center"><spring:message code="equip.PS08" /></th>
						<th align="center"><spring:message code="equip.PS09" /></th>
						<th align="center"><spring:message code="equip.PS10" /></th>
						<th align="center"><spring:message code="equip.PS11" /></th>
						<th align="center"><spring:message code="equip.PS12" /></th>
						<th align="center"><spring:message code="equip.PS13" /></th>
						<th align="center"><spring:message code="equip.PS14" /></th>
						<th align="center"><spring:message code="equip.PS17" /></th>
					</tr>
				</thead>
				<tbody>
				<c:forEach var="item" items="${stats}" varStatus="status">
					<tr>
						<td align="center">
							<a href="<c:url value="/target/corp/list.do">
										<c:param name="orgId" value="${item.ORG_ID}" />
										<c:param name="grpNo" value="${item.GRP_NO}" />
									 </c:url>">
								<c:out value="${item.ORG_NM}" />
							</a>
						</td>
						<td align="center" class="listtd"><c:out value="${item.TOT_CNT}" /></td>
						<td align="center" class="listtd"><c:out value="${item.PS01_CNT}" /></td>
						<td align="center" class="listtd"><c:out value="${item.PS02_CNT}" /></td>
						<td align="center" class="listtd"><c:out value="${item.PS03_CNT}" /></td>
						<td align="center" class="listtd"><c:out value="${item.PS04_CNT}" /></td>
						<td align="center" class="listtd"><c:out value="${item.PS05_CNT}" /></td>
						<td align="center" class="listtd"><c:out value="${item.PS06_CNT}" /></td>
						<td align="center" class="listtd"><c:out value="${item.PS07_CNT}" /></td>
						<td align="center" class="listtd"><c:out value="${item.PS08_CNT}" /></td>
						<td align="center" class="listtd"><c:out value="${item.PS09_CNT}" /></td>
						<td align="center" class="listtd"><c:out value="${item.PS10_CNT}" /></td>
						<td align="center" class="listtd"><c:out value="${item.PS11_CNT}" /></td>
						<td align="center" class="listtd"><c:out value="${item.PS12_CNT}" /></td>
						<td align="center" class="listtd"><c:out value="${item.PS13_CNT}" /></td>
						<td align="center" class="listtd"><c:out value="${item.PS14_CNT}" /></td>
						<td align="center" class="listtd"><c:out value="${item.PS17_CNT}" /></td>
					</tr>
				</c:forEach>
				</tbody>
			</table>
		</div>
		<!-- /List -->
	</form:form>
</div>
<!-- /PrintArea -->
<form:form name="menuForm" method="get">
	<div id="sysbtn">
		<ul>
			<li><span class="btn_blue_l"> 
					<a href="javascript:fn_print();"><spring:message code="button.print" /></a>
					<img src="<c:url value='/images/rte/btn_bg_r.gif'/>" style="margin-left: 6px;" alt="<spring:message code="button.print" />" />
				</span>
			</li>
			<li>
        		<span class="btn_blue_l">
              		<a href="<c:url value="/target/corp/statstoexcel.do"/>" target="_blank"><spring:message code="button.excel" /></a>
              		<img src="<c:url value='/images/rte/btn_bg_r.gif'/>" style="margin-left:6px;" alt="<spring:message code="button.excel" />"/>
        		</span>
   			</li>
		</ul>
	</div>
</form:form>

<script type="text/javaScript" defer="defer">
<!--
	/* 출력 */
	function fn_print(){
		var divPrintTitle = document.getElementById("divPrintTitle");
		divPrintTitle.style.display = "inline";
		printDiv($("#divPrintArea").html());
		divPrintTitle.style.display = "none";
	}
//-->
</script>