<%--
  Class Name : FmsFileModify.jsp
  Description : 첨부파일 수정 페이지
  Modification Information

      수정일         수정자                   수정내용
    -------    --------    ---------------------------
     2009.09.16    장동한          최초 생성

    author   : 공통서비스 개발팀 장동한
    since    : 2009.09.16

    Copyright (C) 2009 by MOPAS  All right reserved.
--%>
<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%   
	response.setHeader("Cache-Control","no-store");   
	response.setHeader("Pragma","no-cache");   
	response.setDateHeader("Expires",0);   
	if (request.getProtocol().equals("HTTP/1.1")) response.setHeader("Cache-Control", "no-cache"); 
%> 
<c:set var="ImgUrl" value="${pageContext.request.contextPath}/images/egovframework/com/cmm/" />
<c:set var="CssUrl" value="${pageContext.request.contextPath}/css/egovframework/com/" />
<c:set var="JsUrl"  value="${pageContext.request.contextPath}/js/egovframework/com/uss/ion/pwm/"/>
<!DOCTYPE html>
<html lang="ko">
<head>
<title>팝업창관리 관리</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="<c:url value='/js/EgovMultiFile.js'/>"></script>
<script type="text/javaScript" language="javascript">
/* pagination 페이지 링크 function */
function fn_mainzone_link_page(){
   	document.searchForm.submit();
}

/* 파일등록 function */
function fn_favicon_insert() {
	if(!confirm("웹 아이콘을 등록하시겠습니까?")) {
		return false;
	}
	frm = document.writeForm;
	var logParam = ""==$('form[name=writeForm] input[name=del]').val() ?  "favicon_I" :  "favicon_U" ;
	frm.action = "<c:url value='/sym/site/faviconFileInsert.do'/>?logParam="+logParam;
	<c:if test="${empty faviconFileVO.faviconFileId }">
		if(frm.file_1.value==""){
			alert("웹 아이콘을 추가해 주십시오");
			return false;
		}
	</c:if>
	frm.submit();
}

/* 배너 삭제 function */
function fn_favicon_delete() {
	var msg;
	msg = "웹 아이콘을  삭제하시겠습니까?";
	if (confirm(msg)) {
		frm = document.writeForm;
		frm.action = "<c:url value='/sym/site/faviconFileDelete.do'/>";
	    frm.submit();
	}
}

</script>
</head>
<body>
<form name="writeForm" enctype="multipart/form-data" method="post">
	<input type="hidden" name="siteId" value="${faviconFileVO.siteId}">
	<input type="hidden" name="del" value="${faviconFileVO.faviconFileId}" />
	<div class="contWrap">
		<div class="pageTitle">
			<div class="pageIcon"><img src="/pb/img/pageTitIcon4.png" alt=""></div>
			<h2 class="titType1 c_222222 fwBold">웹 아이콘관리 수정/등록</h2>
			<p class="tType6 c_999999">현재 사용중인 게시판의 이용 현황을 파악할 수 있으며, 게시판을 추가 및 설정, 삭제할 수 있습니다.</p>
		</div>
		<div class="pageCont">
			<div class="listTop resisterList">
				<p class="right block fwMd"><span class="tType4 c_e40000 fwBold">*</span>는 필수입력 항목입니다.</p>
			</div>
			<table class="tbType2">
				<colgroup>
					<col style="width: 20%">
					<col style="width: 80%">
				</colgroup>
				<tr>
					<th><span class="reqArea">사이트</span></th>
					<td>
						<c:forEach var="resultList" items="${siteManageList}" varStatus="status">
		                	<c:if test="${faviconFileVO.siteId eq resultList.siteId}" >  
		                		<c:out value="${resultList.siteNm}"/>
		                	</c:if>
				        </c:forEach>
					</td>
				</tr>
				<tr>
					<th><span class="reqArea">웹 아이콘 파일</span></th>
					<td colspan="3" class="td_txt_exist">
				        <c:import url="/cmm/fms/selectFileInfsForUpdate.do" charEncoding="utf-8">
							<c:param name="param_atchFileId" value="${faviconFileVO.faviconFileId}" />
							<c:param name="img_view" value="Y" />
				        	<c:param name="img_view_w" value="200" />
				        	<c:param name="img_view_h" value="200" />
				        	<c:param name="updateFlag" value="N" />
							<c:param name="img_change_view" value="Y" />
						</c:import>
					</td>
				</tr>
			</table>
		<div class="btnWrap">
			<input type="button" class="btnType1 bg_888888" value="목 록" onclick="fn_mainzone_link_page(); return false;">
			<c:if test="${!empty faviconFileVO.faviconFileId}">
				<input type="button" class="btnType1 bg_ed4545" value="삭 제 " onclick="fn_favicon_delete(); return false;">
				<input type="button" class="btnType1" value="수 정 " onclick="fn_favicon_insert(); return false;">
			</c:if>
			<c:if test="${empty faviconFileVO.faviconFileId }">
				<input type="button" class="btnType1" value="등 록"  onclick="fn_favicon_insert(); return false;">
			</c:if>
		</div>					
 	</div>
	</div>
</form>
<form name="searchForm" id="searchForm" method="get" action="<c:url value='/sym/site/faviconList.do'/>" ></form>
</body>
</html>
