<%--
  - FileName   : SuppSearchId.jsp
  - Author(s)  : 이성민
  -
  - Description: 계정 찾기
  --%>
  
<%@ page contentType="text/html; charset=utf-8" %>
<%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
<%@ page import="com.udapsoft.waf.common.ui.*" %>
<%@ page import="kr.co.hsnc.common.util.*"%>
<%@ page import="kr.co.hsnc.common.sql.*" %>
<%@page import="java.net.URLEncoder"%>
<%@ page import="kr.co.udapsoft.ebid.buyer.common.file.FileManager"%>
<%@ include file="/jsp/work/taglib.jsp" %>
<jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
<%
    ctx.init(request, response);
    HandlerStorage storage = ctx.getHandlerStorage();
    ValueObject params = storage.getParams();
    ValueObject user = storage.getUser();
    String event = storage.getEvent();
    
    RowSet autofile_list = storage.getRowSet("fileList");
    
%>
<script type="text/javascript">
$(function(){
    
    $(".icon_x").click(function(){
	    window.close();
	});
    
});

function zipFileDown(){		
	var url="/common/file/FileDownloadServlet";		
		url += "?mode=zipDown";
		url += "&fileName=계약서";
		url += "&zipAutoFile=Y";
		url += "&type=OUT";
 		url += "&subContModId=<%=autofile_list.getRow(0).get("SUB_CONT_MOD_ID")%>";
 	
		window.open(url, "_fileDown", "toolbar=no, width=400, height=100, top=500, left=400, toolbar=no,directories=no,status=no,scrollbars=yes,resize=no,menubar=no,target=new");
}
</script>

<modular:search id="form1">
	<modular:key id="fevent" />
</modular:search>
<form id="form1" name="form1" method="post" modular:type="search" action="">
<INPUT type="hidden" name="fevent" id="fevent" value="">
<input type="hidden" name="signeddata" id="signeddata" value="" />
<input type="hidden" name="ESTI_SIGNDATA" id="ESTI_SIGNDATA" value="" />
<INPUT type='hidden' name="sItemInfo" value="">
<input type="hidden" name="p_job_div_gubun" id="p_job_div_gubun" value="" />
<input type="hidden" name="p_mail" id="p_mail" value="" />
<input type="hidden" name="p_corp_id" id="p_corp_id" value="" />  
<input type="hidden" name="p_user_id" id="p_user_id" value="" />

<input type="hidden" name="p_reSizeGubun" id="p_reSizeGubun" value="N" />    

	
	<table class="form-table" style="width: 100%;">
	<colgroup>
		<col width="30%" />
		<col width="70%" />
		<col width="15%" />
		<col width="35%" />
		<col width="10%" />
	<tr>
	<th></th>	
	<td class="button" style="text-align: right;">
				<span class="btnSearch center"><a href="javascript:zipFileDown();" id="btnZipDown">모두저장(ZIP)</a></span>
	</td>
	</tr>
	<tr>
		<th>파일명</th>
		<td>
				<div id="auto_attach_file_view" class="attach_file_view">
					<ul>
					<%
						for(int i=0;i<autofile_list.size();i++){
					%>
						<li><a href="/common/file/FileDownloadServlet?mode=fpDown&filePath=/cont/<%=autofile_list.getRow(i).get("FILE_PATH")%>&fileName=<%=URLEncoder.encode(autofile_list.getRow(i).get("FILE_NAME"), "UTF-8") +"."+ autofile_list.getRow(i).get("FILE_EXT")%>&fileRealName=<%=autofile_list.getRow(i).get("UNIQUE_FILE_NAME")%>"><%=i+1%> : <%=autofile_list.getRow(i).get("FILE_NAME")%> (<%=autofile_list.getRow(i).get("FILE_SIZE").trim() %>)</a></li>
					<%
						}	
					%>
					</ul>
				</div>
		</td>
	</tr>
	</table>

</form>
