%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.biz_nis.cmn.CommonMethod" %>
<%@ page import="com.biz_nis.cmn.OrellyUpload" %>
<%@ page import="com.biz_nis.fndtInfoMgt.entpMgt.EntpMgtDAO" %>
<%@ page import="com.biz_nis.fndtInfoMgt.entpMgt.EntpMgtDTO" %>
<%@ page import="org.apache.log4j.Logger" %>
<%@ page import="java.io.File" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.HashMap" %>
<%
Logger l_oLogger = Logger.getLogger( "entp_mgt_proc.jsp" );
request.setCharacterEncoding("UTF-8");
//변수 선언부
EntpMgtDAO l_oEntpMgtDAO = null;
EntpMgtDTO l_oEntpMgtDTO = null;
boolean l_bSuccess = false;
String l_sUploadPath = "";
int l_nLimitSize = 0;
try {
l_oEntpMgtDAO = new EntpMgtDAO();
l_oEntpMgtDTO = new EntpMgtDTO();
//첨부파일 저장 경로, 파일사이즈
l_sUploadPath = CommonMethod.getMessage("globals_config","ENTP_LOG_UPLOAD_DIR");
l_nLimitSize = Integer.parseInt(CommonMethod.getMessage("globals_config","ENTP_LOG_FILE_SIZE")) * 1024 * 1024 ;
String l_sSavePath = l_sUploadPath+"/";
File dir = new File(l_sSavePath);
if(!dir.exists()) dir.mkdirs();
//MultipartRequest request 받음
OrellyUpload multi = new OrellyUpload(request, l_sSavePath, l_nLimitSize, "UTF-8");
String p_sFlag = CommonMethod.nullChk( multi.getParameter("flag") );
String p_sEntp_idstry = CommonMethod.nullChk( multi.getParameter("entp_idstry") );
String p_sEntp_dstic = CommonMethod.nullChk( multi.getParameter("entp_dstic") );
String p_sEntp_nm = CommonMethod.nullChk( multi.getParameter("entp_nm") );
int p_nCurPage = CommonMethod.intNullChk(multi.getParameter("cur_page"));
int p_nListSize = CommonMethod.intNullChk(multi.getParameter("list_size"));
String p_sSlct_flag = CommonMethod.nullChk(multi.getParameter("slct_flag"));
String p_sSrch_text = CommonMethod.nullChk(multi.getParameter("srch_text"));
String p_sSlct_entp_idstry = CommonMethod.nullChk(multi.getParameter("slct_entp_idstry"));
String p_sSlct_entp_dstic = CommonMethod.nullChk(multi.getParameter("slct_entp_dstic"));
String p_sEntp_seq = CommonMethod.nullChk(multi.getParameter("entp_seq"));
l_oEntpMgtDTO.setEntp_seq( p_sEntp_seq );
l_oEntpMgtDTO.setEntp_idstry( p_sEntp_idstry );
l_oEntpMgtDTO.setEntp_dstic( p_sEntp_dstic );
l_oEntpMgtDTO.setEntp_nm( p_sEntp_nm );
boolean fileTypeResult = multi.limitExtension();
if(!fileTypeResult){
ArrayList fileHashList = multi.upLoadFile();
int fileHashListCount = fileHashList.size();
for(int i=0; i
<%
} else {
%>
<%
}
}
// update
else if (("U").equals(p_sFlag)) {
l_bSuccess = l_oEntpMgtDAO.update( l_oEntpMgtDTO );
if (l_bSuccess) {
%>
<%
} else {
%>
<%
}
}
} catch( Exception e ) {
l_oLogger.debug( e.getStackTrace() );
} finally {}
%>