diff --git a/src/main/java/seed/com/gtm/seedfile/SeedFileController.java b/src/main/java/seed/com/gtm/seedfile/SeedFileController.java new file mode 100644 index 00000000..6486c761 --- /dev/null +++ b/src/main/java/seed/com/gtm/seedfile/SeedFileController.java @@ -0,0 +1,433 @@ +package seed.com.gtm.seedfile; + +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Random; +import java.util.regex.Pattern; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.apache.ibatis.logging.Log; +import org.apache.ibatis.logging.LogFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; + +import seed.com.gtm.util.CommonsCompress; +import seed.com.gtm.util.JSPUtil; + +import egovframework.rte.psl.dataaccess.util.EgovMap; + +import seed.utils.SeedDateUtil; +import seed.utils.SeedProperties; +import seed.utils.SeedUtils; + +@Controller +public class SeedFileController { + + @Autowired + private SeedFileService service; + + protected Log log = LogFactory.getLog(this.getClass()); + + @RequestMapping(value="/seed/extra/temp/file.do", method=RequestMethod.POST) + public @ResponseBody HashMap tempFileUpload(HttpSession session, HttpServletRequest req, MultipartHttpServletRequest mreq){ + String siteIdx = SeedUtils.setReplaceNull(session.getAttribute("siteIdx")); + if(siteIdx.equals("")){ + siteIdx = SeedUtils.setReplaceNull(req.getParameter("siteIdx")); + } + + // 파일 멀티로 받음 + //MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) req; + Iterator fileNames = mreq.getFileNames(); + + String funcType = req.getParameter("fileFuncType"); + String copyContractYn = SeedUtils.setReplaceNull(req.getParameter("copyContractYn")); + + String fileName = ""; + String reFileName = ""; + String fileType = ""; + Long fileSize = 0L; + + boolean success = false; + + SeedProperties seedProperties = new SeedProperties(); + String tempPath = ""; + if(funcType.equals("trublchargermng")){ + tempPath = seedProperties.getConfigValue("root.path"); + }else{ + tempPath = seedProperties.getConfigValue("file.temp.path"); + } + + //SeedUtils.setSeedMkDirs(rootPath + "/" + siteIdx + "/upload/tempFiles/"+funcType); + + + /*MultipartFile uploadFile = null; + if(copyContractYn.equals("Y")){ + uploadFile = mreq.getFile("upFile"); + }else if(copyContractYn.equals("N")){ + uploadFile = mreq.getFile("upFile2"); + }else{ + uploadFile = mreq.getFile("upFile"); + } + System.out.println("2222");*/ + + while(fileNames.hasNext()) + { + String fileNm = fileNames.next(); + MultipartFile mFile = mreq.getFile(fileNm); + SeedDateUtil seedDateUtil = new SeedDateUtil(); + + + //File Null Check + if(mFile.getSize()!=0){ + fileName = mFile.getOriginalFilename(); + reFileName = funcType+"_" + seedDateUtil.getSimpleDateFormat(new Date(), "yyyyMMddHHmmss") + "_" + SeedUtils.getSeedMD5Code(String.valueOf(SeedUtils.getRandom(999,1))); + fileType = mFile.getOriginalFilename().substring(mFile.getOriginalFilename().lastIndexOf(".")+1); + if (!Pattern.matches("(?i)^[\\d\\D]*\\.(txt|jpeg|jpg|png|gif|bmp|mp3|mp4|hwp|doc|docx|xls|xlsx|ppt|pptx|pdf|zip|alz)$","."+fileType)) { + success = false; + session.setAttribute("sSiteIdx", siteIdx); + session.setAttribute("message", "(message)해당 파일은 업로드 하실수 없습니다."); + session.setAttribute("self", "history"); + session.setAttribute("url", ""); + }else{ + reFileName = reFileName+"."+fileType; + File makeFile = null; + + if(funcType.equals("trublchargermng")){ + //위원회 사지파일만 site 밑으로 저장 + makeFile = new File(tempPath+"/"+siteIdx+"/upload/tempFiles/"+funcType+"/"+reFileName); + }else{ + makeFile = new File(tempPath+"/"+siteIdx+"/"+funcType+"/"+reFileName); + } + + log.warn(tempPath+"/"+siteIdx+"/"+funcType+"/"+reFileName); + //경로상에 파일이 존재하지 않을 경우 + if(! makeFile.exists()){ + //경로에 해당하는 디렉토리들을 생성 + if(makeFile.getParentFile().mkdirs()){ + try { + makeFile.createNewFile(); //이후 파일 생성 + } catch (IOException e) { + // TODO Auto-generated catch block + log.warn("SeedFileController 템프파일 업로드 에러1"); + } + } + } + try { + mFile.transferTo(makeFile); //임시로 저장된 multipartFile을 실제 파일로 전송 + } catch (IllegalStateException e) { + log.warn("SeedFileController 템프파일 업로드 에러2"); + } catch (IOException e) { + log.warn("SeedFileController 템프파일 업로드 에러3"); + } + fileSize = mFile.getSize(); + + success = true; + } + } + + + /*if(uploadFile!=null && !uploadFile.isEmpty()){ + SeedDateUtil seedDateUtil = new SeedDateUtil(); + + fileName = uploadFile.getOriginalFilename(); + reFileName = funcType+"_" + seedDateUtil.getSimpleDateFormat(new Date(), "yyyyMMddHHmmss") + "_" + SeedUtils.getSeedMD5Code(String.valueOf(SeedUtils.getRandom(999,1))); + fileType = uploadFile.getOriginalFilename().substring(uploadFile.getOriginalFilename().lastIndexOf(".")+1); + + if (!Pattern.matches("(?i)^[\\d\\D]*\\.(txt|jpeg|jpg|png|gif|bmp|mp3|mp4|hwp|doc|docx|xls|xlsx|ppt|pptx|pdf|zip|alz)$","."+fileType)) { + success = false; + + session.setAttribute("sSiteIdx", siteIdx); + session.setAttribute("message", "(message)해당 파일은 업로드 하실수 없습니다."); + session.setAttribute("self", "history"); + session.setAttribute("url", ""); + + }else{ + reFileName = reFileName+"."+fileType; + File makeFile = new File(rootPath+"/"+siteIdx+"/upload/tempFiles/"+funcType+"/"+reFileName); + System.out.println(rootPath+"/"+siteIdx+"/upload/tempFiles/"+funcType+"/"+reFileName); + try { + uploadFile.transferTo(makeFile); + } catch (IllegalStateException e) { + System.out.println("SeedFileController 템프파일 업로드 에러"); + } catch (IOException e) { + System.out.println("SeedFileController 템프파일 업로드 에러"); + } + + fileSize = uploadFile.getSize(); + + success = true; + } + }*/ + } + + //JSON 변환을 위한 맵 + HashMap fileInfo = new HashMap(); + fileInfo.put("fileName",fileName); + fileInfo.put("reFileName",reFileName); + fileInfo.put("fileSize",fileSize); + fileInfo.put("fileType",fileType); + fileInfo.put("funcType",funcType); + fileInfo.put("copyContractYn",copyContractYn); + + return fileInfo; + } + + @RequestMapping("/seed/extra/down/file.do") + public ModelAndView fileDown(ModelMap map, HttpSession session ,HttpServletResponse response,HttpServletRequest request,@RequestParam Map paramMap){ + + SeedProperties seedProperties = new SeedProperties(); + String rootPath = seedProperties.getConfigValue("file.real.path"); + + String dataIdx = SeedUtils.setReplaceNull(paramMap.get("dataIdx")); + String pathKey1 = SeedUtils.setReplaceNull(paramMap.get("pathKey1")); + String pathKey2 = SeedUtils.setReplaceNull(paramMap.get("pathKey2")); + String funcType = SeedUtils.setReplaceNull(paramMap.get("funcType")); + + if(funcType.equals("trublchargermng")){ + rootPath = seedProperties.getConfigValue("root.path"); + } + + String path = SeedUtils.setReplaceNull(paramMap.get("filePath")); + + pathKey1 = SeedUtils.setFilePathReplaceAll(pathKey1); + pathKey2 = SeedUtils.setFilePathReplaceAll(pathKey2); + funcType = SeedUtils.setFilePathReplaceAll(funcType); + + + String fileReName = ""; + String fileName = ""; + String filePath = rootPath + "/" + pathKey1 + "/"+funcType; + + if(!"".equals(dataIdx) && !"".equals(funcType)){ + + //funcType이 download일 경우 download폴더 하위의 일반 파일 및 특정 파일을 다운로드 하는 로직으로 동작 하게 됩니다. + if("download".equals(funcType)){ + fileReName = dataIdx; + fileName = dataIdx; + filePath = rootPath + "/" + pathKey1 + "/"+funcType; + }else if("mediation".equals(funcType) || "trublreqstmng".equals(funcType) || "trublcfrncmng".equals(funcType)){ + Map fileList = service.caseFileOne(paramMap); + fileReName = SeedUtils.setReplaceNull(fileList.get("FILE_ORGNAME")); + fileName = SeedUtils.setReplaceNull(fileList.get("FILE_NAME")); + + + if(SeedUtils.setReplaceNull(paramMap.get("downUserl")).equals("user")){ + + //본인인증 시간 체크 + if(SeedUtils.setReplaceNull(session.getAttribute("isGubun")).equals("")){ + return new ModelAndView("redirect:/user/mediation/case/01/155/checkMediationStep01.do"); + } + + + if(!SeedUtils.setReplaceNull(session.getAttribute("hpName")).equals("")){ + paramMap.put("fileNo", SeedUtils.setReplaceNull(fileList.get("FILE_NO"))); + paramMap.put("seqNo", SeedUtils.setReplaceNull(fileList.get("SEQ_NO"))); + paramMap.put("hpName", SeedUtils.setReplaceNull(session.getAttribute("hpName"))); + paramMap.put("isGubun", SeedUtils.setReplaceNull(session.getAttribute("isGubun"))); + service.hisInsert(paramMap); + } + + } + + + if(funcType.equals("trublchargermng")){ + filePath = rootPath + "/" + pathKey1 + "/upload/uploadFiles/"+funcType+"/"+pathKey2; + }else{ + filePath = rootPath + "/" + pathKey1 + "/"+funcType+"/"+pathKey2; + } + }else{ + Map fileList = service.fileOne(paramMap); + fileReName = SeedUtils.setReplaceNull(fileList.get("EXTRA_FILE_RENAME")); + fileName = SeedUtils.setReplaceNull(fileList.get("EXTRA_FILE_NAME")); + if(funcType.equals("trublchargermng")){ + filePath = rootPath + "/" + pathKey1 + "/upload/uploadFiles/"+funcType+"/"+pathKey2; + }else{ + filePath = rootPath + "/" + pathKey1 + "/"+funcType+"/"+pathKey2; + } + } + } + + ModelAndView mv = new ModelAndView("filedownLoad"); + mv.addObject("fileReName", fileReName); + mv.addObject("fileName", fileName); + mv.addObject("filePath", filePath); + + return mv; + } + + + @RequestMapping("/seed/extra/down/filedown.do") + public ModelAndView fileDown(HttpServletResponse response, HttpSession session, HttpServletRequest request)throws Exception{ + EgovMap params; + params = JSPUtil.makeRequestParams(request, session, true); + log.warn(">>>>>>>>params<<<<<<<<<"+params); + SeedProperties seedProperties = new SeedProperties(); + + String fileOrgname = SeedUtils.setReplaceNull(params.get("fileOrgname")); + String fileName = SeedUtils.setReplaceNull(params.get("fileName")); + String filePath = SeedUtils.setReplaceNull(params.get("filePath")); + + ModelAndView mv = new ModelAndView("filedownLoad"); + mv.addObject("fileReName", fileOrgname); + mv.addObject("fileName", fileName); + mv.addObject("filePath", filePath); + + return mv; + } + + @RequestMapping("/seed/extra/down/zipfile.do") + public ModelAndView zipfileDown(HttpServletResponse response, HttpSession session, HttpServletRequest request)throws Exception{ + EgovMap params; + params = JSPUtil.makeRequestParams(request, session, true); + log.warn(">>>>>>>>params<<<<<<<<<"+params); + + SeedProperties seedProperties = new SeedProperties(); + SeedDateUtil seedDateUtil = new SeedDateUtil(); + String rootPath = seedProperties.getConfigValue("file.real.path"); + String pathKey = SeedUtils.setReplaceNull(params.get("pathKey")); + String filePath = rootPath + "/" + pathKey + "/zipDown/" + params.get("memberId").toString()+"/"+seedDateUtil.getSimpleDateFormat(new Date(), "yyyyMMdd"); + String fileCopyPath = rootPath + "/" + pathKey + "/zipDown/" + + params.get("memberId").toString()+"/"+seedDateUtil.getSimpleDateFormat(new Date(), "yyyyMMdd") + +"/"+params.get("rceptNo").toString(); + System.out.println("filePath:" + filePath); + System.out.println("fileCopyPath: "+fileCopyPath); + List filelist = new ArrayList(); + List fileList = service.caseFileListEgov(params); + String fileGubunNm = ""; + File orgFile = new File(filePath); + File copyFile = new File(fileCopyPath); + + if(!orgFile.exists()){ + //경로에 해당하는 디렉토리들을 생성 + orgFile.mkdirs(); + } + if(!copyFile.exists()){ + //경로에 해당하는 디렉토리들을 생성 + copyFile.mkdirs(); + } + if(orgFile.exists() && copyFile.exists()){ + for(int i = 0; i < fileList.size(); i++){ + //System.out.println(i); + EgovMap emap = new EgovMap(); + emap.putAll((EgovMap) fileList.get(i)); + + + FileInputStream fis = null; + FileOutputStream fos = null; + BufferedInputStream bufferedInputStream = null; + BufferedOutputStream bufferedOutputStream = null; + + //파일복사 + try { + //FileInputStream fis = new FileInputStream(emap.get("filePath").toString()+emap.get("fileOrgname").toString()); + + if(emap.get("fileFunc").toString().equals("mediation")){ + if(emap.get("filePath").toString().indexOf(".") <= -1){ + fis = new FileInputStream(emap.get("filePath").toString() + "/" + emap.get("fileOrgname").toString()); + }else{ + fis = new FileInputStream(emap.get("filePath").toString()); + } + }else{ + fis = new FileInputStream(emap.get("filePath").toString() + "/" + emap.get("fileOrgname").toString()); + } + + fos = new FileOutputStream(fileCopyPath+"/"+emap.get("fileName").toString()); + + bufferedInputStream = new BufferedInputStream(fis); + bufferedOutputStream = new BufferedOutputStream(fos); + + byte[] readBuffer = new byte[1024]; + + int data = 0; + //System.out.println("111111111"); + while(bufferedInputStream.read(readBuffer, 0, readBuffer.length) != -1) { + //fos.write(data); + //System.out.println("aaaaaa"); + bufferedOutputStream.write(readBuffer); + //System.out.println("bbbbbbb"); + + } + //System.out.println("22222222222"); + } catch (IOException e) { + // TODO Auto-generated catch block + //여기서 에러남? + e.printStackTrace(); + }finally{ + try + { + // 파일 닫기. 여기에도 try/catch가 필요하다. + // 보조스트림을 닫으면 원스트림도 닫힌다. + if(bufferedInputStream != null){ + bufferedInputStream.close(); + } + if(bufferedOutputStream != null){ + bufferedOutputStream.close(); + } + if(fis != null){ + fis.close(); + } + if(fos != null){ + fos.close(); + } + + } + catch (Exception e) + { + System.out.println("close failed!!!" + e); + } + + } + + filelist.add(new File(fileCopyPath+"/"+emap.get("fileName").toString())); + fileGubunNm = emap.get("fileGubunNm").toString(); + } + } + Random generator = new Random(); + String zipNm = params.get("rceptNo").toString()+"("+fileGubunNm+")_"+ seedDateUtil.getSimpleDateFormat(new Date(), "yyyyMMddHHmmss") + ".zip"; + File zippedFile = new File (filePath); + //File zippedFile = new File (filePath, zipNm); + + if(!zippedFile.exists()){ + //경로에 해당하는 디렉토리들을 생성 + zippedFile.mkdirs(); + } + if(zippedFile.exists()){ + zippedFile = new File (filePath+"/"+zipNm); + try { + //이후 파일 생성 + CommonsCompress commonscompress = new CommonsCompress(); + commonscompress.zip(filelist, new BufferedOutputStream(new FileOutputStream(zippedFile)) ); + } catch (IOException e) { + // TODO Auto-generated catch block + log.warn("SeedFileController error1"); + } + } + ModelAndView mv = new ModelAndView("filedownLoad"); + mv.addObject("fileReName", zipNm); + mv.addObject("fileName", zipNm); + mv.addObject("filePath", filePath); + + return mv; + } +} diff --git a/src/main/java/seed/com/gtm/util/CommonsCompress.java b/src/main/java/seed/com/gtm/util/CommonsCompress.java new file mode 100644 index 00000000..e708d7df --- /dev/null +++ b/src/main/java/seed/com/gtm/util/CommonsCompress.java @@ -0,0 +1,55 @@ +package seed.com.gtm.util; + +import java.io.BufferedInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.nio.charset.Charset; +import java.util.List; + +import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; +import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream; + +public class CommonsCompress { + // 리스트로 파일을 받아 zip로 압축 + public void zip(List src, OutputStream os) throws IOException { + ZipArchiveOutputStream zos = new ZipArchiveOutputStream(os); + //20190916 org + //zos.setEncoding(Charset.defaultCharset().name()); + zos.setEncoding("UTF-8"); + FileInputStream fis = null; + BufferedInputStream bis = null; + + + int size = 8*1024; + int length; + ZipArchiveEntry ze; + byte[] buf = new byte[size]; + try{ + if (src.size() > 0) { + for (int i = 0; i < src.size(); i++) { + //System.out.println("name: " + src.get(i).getName()); + ze = new ZipArchiveEntry(src.get(i).getName()); + zos.putArchiveEntry(ze); + fis = new FileInputStream(src.get(i)); + bis = new BufferedInputStream(fis, size); + while ((length = bis.read(buf, 0, buf.length)) >= 0) { + zos.write(buf, 0, length); + } + } + + bis.close(); + fis.close(); + zos.closeArchiveEntry(); + } + }catch(IOException e){ + System.out.println("@@ CommonsCompress IOException @@"); + e.printStackTrace(); + }finally{ + if(zos != null){ + zos.close(); + } + } + } +} diff --git a/src/main/java/seed/com/gtm/util/JSPUtil.java b/src/main/java/seed/com/gtm/util/JSPUtil.java new file mode 100644 index 00000000..ffaf6d8b --- /dev/null +++ b/src/main/java/seed/com/gtm/util/JSPUtil.java @@ -0,0 +1,374 @@ +package seed.com.gtm.util; + +import java.io.UnsupportedEncodingException; +import java.lang.Character.UnicodeBlock; +import java.net.URLEncoder; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; + +import org.json.JSONObject; +import org.json.XML; + +import egovframework.rte.psl.dataaccess.util.EgovMap; + +@SuppressWarnings("rawtypes") +public class JSPUtil { + private JSPUtil() { + } + + public static EgovMap makeRequestParams(HttpServletRequest request, HttpSession session, boolean ishan) { + EgovMap params = new EgovMap(); + Enumeration e = request.getParameterNames(); + while (e.hasMoreElements()) { + String key = (String) e.nextElement(); + String[] Values = request.getParameterValues(key); + + /*if (!(key.startsWith("content") || key.endsWith("Content"))) { + for (int i = 0; i < Values.length; i++) { + //한글깨짐문제로 주석처리 + //if(ishan) Values[i] = convUTF8(Values[i]); + Values[i] = SQLInjection(Values[i]); + } + }*/ + + if (key.startsWith("encodingFilter.")) + continue; + if (key.startsWith("openSessionInViewFilter.")) + continue; + if (key.startsWith("multipartFilter.")) + continue; + if (key.startsWith("org.")) + continue; + if (key.startsWith("javax.")) + continue; + + // 배열 + if (Values.length > 1) { + params.put(key, Values); + } else { + params.put(key, Values[0]); + } + } + + Enumeration ee = request.getAttributeNames(); + while (ee.hasMoreElements()) { + String key = (String) ee.nextElement(); + if (key.startsWith("encodingFilter.")) + continue; + if (key.startsWith("openSessionInViewFilter.")) + continue; + if (key.startsWith("multipartFilter.")) + continue; + if (key.startsWith("org.")) + continue; + if (key.startsWith("javax.")) + continue; + params.put(key, request.getAttribute(key)); + } + + Enumeration eee = session.getAttributeNames(); + while (eee.hasMoreElements()) { + String key = (String) eee.nextElement(); + if (key.startsWith("encodingFilter.")) + continue; + if (key.startsWith("openSessionInViewFilter.")) + continue; + if (key.startsWith("multipartFilter.")) + continue; + if (key.startsWith("org.")) + continue; + if (key.startsWith("javax.")) + continue; + params.put(key, session.getAttribute(key)); + } + return params; + } + + public static EgovMap makeRequestClipParams(HttpServletRequest request, HttpSession session, boolean ishan) { + EgovMap params = new EgovMap(); + Enumeration e = request.getParameterNames(); + while (e.hasMoreElements()) { + String key = (String) e.nextElement(); + String[] Values = request.getParameterValues(key); + + if (!(key.startsWith("content") || key.endsWith("Content"))) { + for (int i = 0; i < Values.length; i++) { + //한글깨짐문제로 주석처리 + //if(ishan) Values[i] = convUTF8(Values[i]); + Values[i] = SQLInjection(Values[i]); + } + } + if (!key.startsWith("CLIP")) + continue; + + // 배열 + if (Values.length > 1) { + params.put(key, Values); + } else { + params.put(key, Values[0]); + } + } + + Enumeration ee = request.getAttributeNames(); + while (ee.hasMoreElements()) { + String key = (String) ee.nextElement(); + if (!key.startsWith("CLIP")) + continue; + params.put(key, request.getAttribute(key)); + } + + Enumeration eee = session.getAttributeNames(); + while (eee.hasMoreElements()) { + String key = (String) eee.nextElement(); + if (key.startsWith("encodingFilter.")) + continue; + if (key.startsWith("openSessionInViewFilter.")) + continue; + if (key.startsWith("multipartFilter.")) + continue; + if (key.startsWith("org.")) + continue; + if (key.startsWith("javax.")) + continue; + params.put(key, session.getAttribute(key)); + } + return params; + } + + public static EgovMap makeRequestParams1(HttpServletRequest request, HttpSession session, boolean ishan) { + EgovMap params = new EgovMap(); + Enumeration e = request.getParameterNames(); + while (e.hasMoreElements()) { + String key = (String) e.nextElement(); + String[] Values = request.getParameterValues(key); + + if (!(key.startsWith("content") || key.endsWith("Content"))) { + for (int i = 0; i < Values.length; i++) { + //한글깨짐문제로 주석처리 + //if(ishan) Values[i] = convUTF8(Values[i]); + Values[i] = Values[i]; + } + } + if (key.startsWith("encodingFilter.")) + continue; + if (key.startsWith("openSessionInViewFilter.")) + continue; + if (key.startsWith("multipartFilter.")) + continue; + if (key.startsWith("org.")) + continue; + if (key.startsWith("javax.")) + continue; + + // 배열 + if (Values.length > 1) { + params.put(key, Values); + } else { + params.put(key, Values[0]); + } + } + + Enumeration ee = request.getAttributeNames(); + while (ee.hasMoreElements()) { + String key = (String) ee.nextElement(); + if (key.startsWith("encodingFilter.")) + continue; + if (key.startsWith("openSessionInViewFilter.")) + continue; + if (key.startsWith("multipartFilter.")) + continue; + if (key.startsWith("org.")) + continue; + if (key.startsWith("javax.")) + continue; + params.put(key, request.getAttribute(key)); + } + + Enumeration eee = session.getAttributeNames(); + while (eee.hasMoreElements()) { + String key = (String) eee.nextElement(); + if (key.startsWith("encodingFilter.")) + continue; + if (key.startsWith("openSessionInViewFilter.")) + continue; + if (key.startsWith("multipartFilter.")) + continue; + if (key.startsWith("org.")) + continue; + if (key.startsWith("javax.")) + continue; + params.put(key, session.getAttribute(key)); + } + return params; + } + + + + public static EgovMap makeRequestParams(HttpServletRequest request, boolean ishan) { + EgovMap params = new EgovMap(); + Enumeration e = request.getParameterNames(); + while (e.hasMoreElements()) { + String key = (String) e.nextElement(); + String[] Values = request.getParameterValues(key); + + if (!(key.startsWith("content") || key.endsWith("Content"))) { + for (int i = 0; i < Values.length; i++) { + //한글깨짐문제로 주석처리 + //if(ishan) Values[i] = convUTF8(Values[i]); + Values[i] = SQLInjection(Values[i]); + } + } + if (key.startsWith("encodingFilter.")) + continue; + if (key.startsWith("openSessionInViewFilter.")) + continue; + if (key.startsWith("multipartFilter.")) + continue; + if (key.startsWith("org.")) + continue; + if (key.startsWith("javax.")) + continue; + + // 배열 + if (Values.length > 1) { + params.put(key, Values); + } else { + params.put(key, Values[0]); + } + } + + Enumeration ee = request.getAttributeNames(); + while (ee.hasMoreElements()) { + String key = (String) ee.nextElement(); + if (key.startsWith("encodingFilter.")) + continue; + if (key.startsWith("openSessionInViewFilter.")) + continue; + if (key.startsWith("multipartFilter.")) + continue; + if (key.startsWith("org.")) + continue; + if (key.startsWith("javax.")) + continue; + params.put(key, request.getAttribute(key)); + } + + return params; + } + + + @SuppressWarnings("deprecation") + public static String SQLInjection(String str) { + String rStr = ""; + for (int i = 0; i < str.length(); i++) { + if (JSPUtil.isSpecial(str.charAt(i))) { + rStr += URLEncoder.encode(String.valueOf(str.charAt(i))); + } else { + rStr += String.valueOf(str.charAt(i)); + } + } + return rStr; + } + + private static String convUTF8(String str) { + String rStr = ""; + try { + rStr = new String(str.getBytes("8859_1"),"UTF-8"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + rStr = str; + } + return rStr; + } + + private static boolean isSpecial(char ch) { + char[] badChars = { '\'', '"', '%', '*', '<', '>', '&', ';', '\\', '=', '+', '^' }; + for (int i = 0; i < badChars.length; i++) { + if (badChars[i] == ch) + return true; + } + return false; + } + + public static boolean isHangule(String str) { + for(int i = 0 ; i < str.length() ; i++) + { + char ch = str.charAt(i); + Character.UnicodeBlock unicodeBlock = Character.UnicodeBlock.of(ch); + if(UnicodeBlock.HANGUL_SYLLABLES.equals(unicodeBlock) || + UnicodeBlock.HANGUL_COMPATIBILITY_JAMO.equals(unicodeBlock) || + UnicodeBlock.HANGUL_JAMO.equals(unicodeBlock)) + return true; + } + return false; + } + + + public static String tagReplaceAll(String src) { + if (src == null) + src = ""; + else { + src = src.trim(); + src = src.replaceAll("&", "&"); + src = src.replaceAll("<", "<"); + src = src.replaceAll(">", ">"); + src = src.replaceAll("script", ""); + src = src.replace(""", "\""); + } + return src; + } + + + public static Object fixNull(Object obj) { + if (obj == null) + return null; + else + return obj; + } + + public static EgovMap fixNull(EgovMap map) { + if (map == null) + return map; + + for (int i = 0; i < map.size(); i++) { + if (map.getValue(i) == null){ + map.setValue(i, ""); + }else{ + //tag modify add 2016.07.02 최병기 + map.setValue(i, tagReplaceAll(map.getValue(i).toString())); + } + } + return map; + } + + public static List fixNull(List list) { + if (list == null) + return list; + + for (int i = 0; i < list.size(); i++) { + fixNull((EgovMap) list.get(i)); + } + return list; + } + + public static void fixNull(EgovMap map, String key, Object value) { + if (map.get(key) == null) + map.put(key, value); + } + + public static String addZero(int param, int size) { + + String ret = Integer.toString(param); + int length = ret.length(); + + for (int i = 0; i < size - length; i++) { + ret = "0" + ret; + } + + return ret; + } +} diff --git a/src/main/webapp/WEB-INF/jsp/_extra/gtm/board/write.jsp b/src/main/webapp/WEB-INF/jsp/_extra/gtm/board/write.jsp index 90d9d47d..f722ca94 100644 --- a/src/main/webapp/WEB-INF/jsp/_extra/gtm/board/write.jsp +++ b/src/main/webapp/WEB-INF/jsp/_extra/gtm/board/write.jsp @@ -152,7 +152,7 @@ $("#paramFrm").submit(); } - - + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/layout/seedAdminLayout.jsp b/src/main/webapp/WEB-INF/jsp/layout/seedAdminLayout.jsp index c0f71422..8f443666 100644 --- a/src/main/webapp/WEB-INF/jsp/layout/seedAdminLayout.jsp +++ b/src/main/webapp/WEB-INF/jsp/layout/seedAdminLayout.jsp @@ -17,36 +17,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -59,27 +29,85 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/editor/emoticon/Ambivalent.png b/src/main/webapp/editor/emoticon/Ambivalent.png new file mode 100644 index 00000000..f9575f35 Binary files /dev/null and b/src/main/webapp/editor/emoticon/Ambivalent.png differ diff --git a/src/main/webapp/editor/emoticon/Angel.png b/src/main/webapp/editor/emoticon/Angel.png new file mode 100644 index 00000000..f8b2e701 Binary files /dev/null and b/src/main/webapp/editor/emoticon/Angel.png differ diff --git a/src/main/webapp/editor/emoticon/Angry.png b/src/main/webapp/editor/emoticon/Angry.png new file mode 100644 index 00000000..bc6e8c1e Binary files /dev/null and b/src/main/webapp/editor/emoticon/Angry.png differ diff --git a/src/main/webapp/editor/emoticon/Blush.png b/src/main/webapp/editor/emoticon/Blush.png new file mode 100644 index 00000000..906815b6 Binary files /dev/null and b/src/main/webapp/editor/emoticon/Blush.png differ diff --git a/src/main/webapp/editor/emoticon/Confused.png b/src/main/webapp/editor/emoticon/Confused.png new file mode 100644 index 00000000..7ac53b67 Binary files /dev/null and b/src/main/webapp/editor/emoticon/Confused.png differ diff --git a/src/main/webapp/editor/emoticon/Crazy.png b/src/main/webapp/editor/emoticon/Crazy.png new file mode 100644 index 00000000..5bba90c8 Binary files /dev/null and b/src/main/webapp/editor/emoticon/Crazy.png differ diff --git a/src/main/webapp/editor/emoticon/Crying.png b/src/main/webapp/editor/emoticon/Crying.png new file mode 100644 index 00000000..6ac79b7d Binary files /dev/null and b/src/main/webapp/editor/emoticon/Crying.png differ diff --git a/src/main/webapp/editor/emoticon/Frown.png b/src/main/webapp/editor/emoticon/Frown.png new file mode 100644 index 00000000..513637b9 Binary files /dev/null and b/src/main/webapp/editor/emoticon/Frown.png differ diff --git a/src/main/webapp/editor/emoticon/Gasp.png b/src/main/webapp/editor/emoticon/Gasp.png new file mode 100644 index 00000000..a099613b Binary files /dev/null and b/src/main/webapp/editor/emoticon/Gasp.png differ diff --git a/src/main/webapp/editor/emoticon/Grin.png b/src/main/webapp/editor/emoticon/Grin.png new file mode 100644 index 00000000..cf7a694e Binary files /dev/null and b/src/main/webapp/editor/emoticon/Grin.png differ diff --git a/src/main/webapp/editor/emoticon/Heart.png b/src/main/webapp/editor/emoticon/Heart.png new file mode 100644 index 00000000..9103b13b Binary files /dev/null and b/src/main/webapp/editor/emoticon/Heart.png differ diff --git a/src/main/webapp/editor/emoticon/Hot.png b/src/main/webapp/editor/emoticon/Hot.png new file mode 100644 index 00000000..d9aa62f5 Binary files /dev/null and b/src/main/webapp/editor/emoticon/Hot.png differ diff --git a/src/main/webapp/editor/emoticon/Innoncent.png b/src/main/webapp/editor/emoticon/Innoncent.png new file mode 100644 index 00000000..533aaab7 Binary files /dev/null and b/src/main/webapp/editor/emoticon/Innoncent.png differ diff --git a/src/main/webapp/editor/emoticon/Kiss.png b/src/main/webapp/editor/emoticon/Kiss.png new file mode 100644 index 00000000..c52823e1 Binary files /dev/null and b/src/main/webapp/editor/emoticon/Kiss.png differ diff --git a/src/main/webapp/editor/emoticon/LargeGasp.png b/src/main/webapp/editor/emoticon/LargeGasp.png new file mode 100644 index 00000000..bbc83eaa Binary files /dev/null and b/src/main/webapp/editor/emoticon/LargeGasp.png differ diff --git a/src/main/webapp/editor/emoticon/Laugh.png b/src/main/webapp/editor/emoticon/Laugh.png new file mode 100644 index 00000000..3a811007 Binary files /dev/null and b/src/main/webapp/editor/emoticon/Laugh.png differ diff --git a/src/main/webapp/editor/emoticon/Money-mouth.png b/src/main/webapp/editor/emoticon/Money-mouth.png new file mode 100644 index 00000000..2069e356 Binary files /dev/null and b/src/main/webapp/editor/emoticon/Money-mouth.png differ diff --git a/src/main/webapp/editor/emoticon/Naughty.png b/src/main/webapp/editor/emoticon/Naughty.png new file mode 100644 index 00000000..56aa7fea Binary files /dev/null and b/src/main/webapp/editor/emoticon/Naughty.png differ diff --git a/src/main/webapp/editor/emoticon/Nerd.png b/src/main/webapp/editor/emoticon/Nerd.png new file mode 100644 index 00000000..01addcb0 Binary files /dev/null and b/src/main/webapp/editor/emoticon/Nerd.png differ diff --git a/src/main/webapp/editor/emoticon/Pirate.png b/src/main/webapp/editor/emoticon/Pirate.png new file mode 100644 index 00000000..5c95dd11 Binary files /dev/null and b/src/main/webapp/editor/emoticon/Pirate.png differ diff --git a/src/main/webapp/editor/emoticon/Sarcastic.png b/src/main/webapp/editor/emoticon/Sarcastic.png new file mode 100644 index 00000000..92a6a7ce Binary files /dev/null and b/src/main/webapp/editor/emoticon/Sarcastic.png differ diff --git a/src/main/webapp/editor/emoticon/Sealed.png b/src/main/webapp/editor/emoticon/Sealed.png new file mode 100644 index 00000000..8c15f67e Binary files /dev/null and b/src/main/webapp/editor/emoticon/Sealed.png differ diff --git a/src/main/webapp/editor/emoticon/Sick.png b/src/main/webapp/editor/emoticon/Sick.png new file mode 100644 index 00000000..93df44f9 Binary files /dev/null and b/src/main/webapp/editor/emoticon/Sick.png differ diff --git a/src/main/webapp/editor/emoticon/Smile.png b/src/main/webapp/editor/emoticon/Smile.png new file mode 100644 index 00000000..43231053 Binary files /dev/null and b/src/main/webapp/editor/emoticon/Smile.png differ diff --git a/src/main/webapp/editor/emoticon/Sweat.png b/src/main/webapp/editor/emoticon/Sweat.png new file mode 100644 index 00000000..13c2de01 Binary files /dev/null and b/src/main/webapp/editor/emoticon/Sweat.png differ diff --git a/src/main/webapp/editor/emoticon/ThumbsDown.png b/src/main/webapp/editor/emoticon/ThumbsDown.png new file mode 100644 index 00000000..c368bd86 Binary files /dev/null and b/src/main/webapp/editor/emoticon/ThumbsDown.png differ diff --git a/src/main/webapp/editor/emoticon/ThumbsUp.png b/src/main/webapp/editor/emoticon/ThumbsUp.png new file mode 100644 index 00000000..9c369436 Binary files /dev/null and b/src/main/webapp/editor/emoticon/ThumbsUp.png differ diff --git a/src/main/webapp/editor/emoticon/Tongue.png b/src/main/webapp/editor/emoticon/Tongue.png new file mode 100644 index 00000000..c62a1dd1 Binary files /dev/null and b/src/main/webapp/editor/emoticon/Tongue.png differ diff --git a/src/main/webapp/editor/emoticon/Undecided.png b/src/main/webapp/editor/emoticon/Undecided.png new file mode 100644 index 00000000..e82bd4fe Binary files /dev/null and b/src/main/webapp/editor/emoticon/Undecided.png differ diff --git a/src/main/webapp/editor/emoticon/VeryAngry.png b/src/main/webapp/editor/emoticon/VeryAngry.png new file mode 100644 index 00000000..204ebfe9 Binary files /dev/null and b/src/main/webapp/editor/emoticon/VeryAngry.png differ diff --git a/src/main/webapp/editor/emoticon/Wink.png b/src/main/webapp/editor/emoticon/Wink.png new file mode 100644 index 00000000..b79ac9fa Binary files /dev/null and b/src/main/webapp/editor/emoticon/Wink.png differ diff --git a/src/main/webapp/editor/emoticon/Yum.png b/src/main/webapp/editor/emoticon/Yum.png new file mode 100644 index 00000000..e012f0a9 Binary files /dev/null and b/src/main/webapp/editor/emoticon/Yum.png differ diff --git a/src/main/webapp/editor/emoticon/ohnoes.png b/src/main/webapp/editor/emoticon/ohnoes.png new file mode 100644 index 00000000..6d49a94f Binary files /dev/null and b/src/main/webapp/editor/emoticon/ohnoes.png differ diff --git a/src/main/webapp/editor/icon/add.png b/src/main/webapp/editor/icon/add.png new file mode 100644 index 00000000..6332fefe Binary files /dev/null and b/src/main/webapp/editor/icon/add.png differ diff --git a/src/main/webapp/editor/icon/arrow_refresh.png b/src/main/webapp/editor/icon/arrow_refresh.png new file mode 100644 index 00000000..0de26566 Binary files /dev/null and b/src/main/webapp/editor/icon/arrow_refresh.png differ diff --git a/src/main/webapp/editor/icon/arrow_updown.png b/src/main/webapp/editor/icon/arrow_updown.png new file mode 100644 index 00000000..b10aff2d Binary files /dev/null and b/src/main/webapp/editor/icon/arrow_updown.png differ diff --git a/src/main/webapp/editor/icon/attach.png b/src/main/webapp/editor/icon/attach.png new file mode 100644 index 00000000..ea897cc9 Binary files /dev/null and b/src/main/webapp/editor/icon/attach.png differ diff --git a/src/main/webapp/editor/icon/backcolor.png b/src/main/webapp/editor/icon/backcolor.png new file mode 100644 index 00000000..809fb00e Binary files /dev/null and b/src/main/webapp/editor/icon/backcolor.png differ diff --git a/src/main/webapp/editor/icon/bold.png b/src/main/webapp/editor/icon/bold.png new file mode 100644 index 00000000..889ae80e Binary files /dev/null and b/src/main/webapp/editor/icon/bold.png differ diff --git a/src/main/webapp/editor/icon/brick.png b/src/main/webapp/editor/icon/brick.png new file mode 100644 index 00000000..7851cf34 Binary files /dev/null and b/src/main/webapp/editor/icon/brick.png differ diff --git a/src/main/webapp/editor/icon/bricks.png b/src/main/webapp/editor/icon/bricks.png new file mode 100644 index 00000000..0905f933 Binary files /dev/null and b/src/main/webapp/editor/icon/bricks.png differ diff --git a/src/main/webapp/editor/icon/btn_apply_img_property.png b/src/main/webapp/editor/icon/btn_apply_img_property.png new file mode 100644 index 00000000..e1ad8baf Binary files /dev/null and b/src/main/webapp/editor/icon/btn_apply_img_property.png differ diff --git a/src/main/webapp/editor/icon/btn_close.png b/src/main/webapp/editor/icon/btn_close.png new file mode 100644 index 00000000..9923f537 Binary files /dev/null and b/src/main/webapp/editor/icon/btn_close.png differ diff --git a/src/main/webapp/editor/icon/btn_close2.png b/src/main/webapp/editor/icon/btn_close2.png new file mode 100644 index 00000000..3cefa46f Binary files /dev/null and b/src/main/webapp/editor/icon/btn_close2.png differ diff --git a/src/main/webapp/editor/icon/btn_createlink.png b/src/main/webapp/editor/icon/btn_createlink.png new file mode 100644 index 00000000..443985f4 Binary files /dev/null and b/src/main/webapp/editor/icon/btn_createlink.png differ diff --git a/src/main/webapp/editor/icon/btn_delete.png b/src/main/webapp/editor/icon/btn_delete.png new file mode 100644 index 00000000..4f4682e1 Binary files /dev/null and b/src/main/webapp/editor/icon/btn_delete.png differ diff --git a/src/main/webapp/editor/icon/btn_down.gif b/src/main/webapp/editor/icon/btn_down.gif new file mode 100644 index 00000000..58e31914 Binary files /dev/null and b/src/main/webapp/editor/icon/btn_down.gif differ diff --git a/src/main/webapp/editor/icon/btn_insertimages.png b/src/main/webapp/editor/icon/btn_insertimages.png new file mode 100644 index 00000000..27f4aee7 Binary files /dev/null and b/src/main/webapp/editor/icon/btn_insertimages.png differ diff --git a/src/main/webapp/editor/icon/btn_up.gif b/src/main/webapp/editor/icon/btn_up.gif new file mode 100644 index 00000000..3dfaee26 Binary files /dev/null and b/src/main/webapp/editor/icon/btn_up.gif differ diff --git a/src/main/webapp/editor/icon/btn_upload.png b/src/main/webapp/editor/icon/btn_upload.png new file mode 100644 index 00000000..6ff83e57 Binary files /dev/null and b/src/main/webapp/editor/icon/btn_upload.png differ diff --git a/src/main/webapp/editor/icon/btn_upload_down.png b/src/main/webapp/editor/icon/btn_upload_down.png new file mode 100644 index 00000000..15cad1eb Binary files /dev/null and b/src/main/webapp/editor/icon/btn_upload_down.png differ diff --git a/src/main/webapp/editor/icon/btn_upload_up.png b/src/main/webapp/editor/icon/btn_upload_up.png new file mode 100644 index 00000000..8bf725b0 Binary files /dev/null and b/src/main/webapp/editor/icon/btn_upload_up.png differ diff --git a/src/main/webapp/editor/icon/cell_property.png b/src/main/webapp/editor/icon/cell_property.png new file mode 100644 index 00000000..ab3100b5 Binary files /dev/null and b/src/main/webapp/editor/icon/cell_property.png differ diff --git a/src/main/webapp/editor/icon/closeX.gif b/src/main/webapp/editor/icon/closeX.gif new file mode 100644 index 00000000..ed0731ba Binary files /dev/null and b/src/main/webapp/editor/icon/closeX.gif differ diff --git a/src/main/webapp/editor/icon/color_selector.gif b/src/main/webapp/editor/icon/color_selector.gif new file mode 100644 index 00000000..a8f85319 Binary files /dev/null and b/src/main/webapp/editor/icon/color_selector.gif differ diff --git a/src/main/webapp/editor/icon/color_selector.png b/src/main/webapp/editor/icon/color_selector.png new file mode 100644 index 00000000..40c69f5d Binary files /dev/null and b/src/main/webapp/editor/icon/color_selector.png differ diff --git a/src/main/webapp/editor/icon/context_menu.png b/src/main/webapp/editor/icon/context_menu.png new file mode 100644 index 00000000..6a93cdaa Binary files /dev/null and b/src/main/webapp/editor/icon/context_menu.png differ diff --git a/src/main/webapp/editor/icon/createlink.png b/src/main/webapp/editor/icon/createlink.png new file mode 100644 index 00000000..25eacb7c Binary files /dev/null and b/src/main/webapp/editor/icon/createlink.png differ diff --git a/src/main/webapp/editor/icon/decrease.png b/src/main/webapp/editor/icon/decrease.png new file mode 100644 index 00000000..28e41ea2 Binary files /dev/null and b/src/main/webapp/editor/icon/decrease.png differ diff --git a/src/main/webapp/editor/icon/delete.png b/src/main/webapp/editor/icon/delete.png new file mode 100644 index 00000000..08f24936 Binary files /dev/null and b/src/main/webapp/editor/icon/delete.png differ diff --git a/src/main/webapp/editor/icon/design.png b/src/main/webapp/editor/icon/design.png new file mode 100644 index 00000000..71cec924 Binary files /dev/null and b/src/main/webapp/editor/icon/design.png differ diff --git a/src/main/webapp/editor/icon/disk.png b/src/main/webapp/editor/icon/disk.png new file mode 100644 index 00000000..99d532e8 Binary files /dev/null and b/src/main/webapp/editor/icon/disk.png differ diff --git a/src/main/webapp/editor/icon/email.png b/src/main/webapp/editor/icon/email.png new file mode 100644 index 00000000..7348aed7 Binary files /dev/null and b/src/main/webapp/editor/icon/email.png differ diff --git a/src/main/webapp/editor/icon/emoticon.png b/src/main/webapp/editor/icon/emoticon.png new file mode 100644 index 00000000..cf7a694e Binary files /dev/null and b/src/main/webapp/editor/icon/emoticon.png differ diff --git a/src/main/webapp/editor/icon/emoticon2.png b/src/main/webapp/editor/icon/emoticon2.png new file mode 100644 index 00000000..23d9e4e7 Binary files /dev/null and b/src/main/webapp/editor/icon/emoticon2.png differ diff --git a/src/main/webapp/editor/icon/file_tree.png b/src/main/webapp/editor/icon/file_tree.png new file mode 100644 index 00000000..031ca663 Binary files /dev/null and b/src/main/webapp/editor/icon/file_tree.png differ diff --git a/src/main/webapp/editor/icon/folder.png b/src/main/webapp/editor/icon/folder.png new file mode 100644 index 00000000..784e8fa4 Binary files /dev/null and b/src/main/webapp/editor/icon/folder.png differ diff --git a/src/main/webapp/editor/icon/folder_add.png b/src/main/webapp/editor/icon/folder_add.png new file mode 100644 index 00000000..529fe8fe Binary files /dev/null and b/src/main/webapp/editor/icon/folder_add.png differ diff --git a/src/main/webapp/editor/icon/folder_delete.png b/src/main/webapp/editor/icon/folder_delete.png new file mode 100644 index 00000000..112b0163 Binary files /dev/null and b/src/main/webapp/editor/icon/folder_delete.png differ diff --git a/src/main/webapp/editor/icon/folder_magnify.png b/src/main/webapp/editor/icon/folder_magnify.png new file mode 100644 index 00000000..0a3e7985 Binary files /dev/null and b/src/main/webapp/editor/icon/folder_magnify.png differ diff --git a/src/main/webapp/editor/icon/font.png b/src/main/webapp/editor/icon/font.png new file mode 100644 index 00000000..b7960db9 Binary files /dev/null and b/src/main/webapp/editor/icon/font.png differ diff --git a/src/main/webapp/editor/icon/fontbgdolor.png b/src/main/webapp/editor/icon/fontbgdolor.png new file mode 100644 index 00000000..188a4304 Binary files /dev/null and b/src/main/webapp/editor/icon/fontbgdolor.png differ diff --git a/src/main/webapp/editor/icon/fontsize.png b/src/main/webapp/editor/icon/fontsize.png new file mode 100644 index 00000000..5b98a6e1 Binary files /dev/null and b/src/main/webapp/editor/icon/fontsize.png differ diff --git a/src/main/webapp/editor/icon/forecolor.png b/src/main/webapp/editor/icon/forecolor.png new file mode 100644 index 00000000..6e6e8521 Binary files /dev/null and b/src/main/webapp/editor/icon/forecolor.png differ diff --git a/src/main/webapp/editor/icon/ftv2folderclosed.gif b/src/main/webapp/editor/icon/ftv2folderclosed.gif new file mode 100644 index 00000000..b7a203ec Binary files /dev/null and b/src/main/webapp/editor/icon/ftv2folderclosed.gif differ diff --git a/src/main/webapp/editor/icon/ftv2folderopen.gif b/src/main/webapp/editor/icon/ftv2folderopen.gif new file mode 100644 index 00000000..8fbd12ef Binary files /dev/null and b/src/main/webapp/editor/icon/ftv2folderopen.gif differ diff --git a/src/main/webapp/editor/icon/ftv2lastnode.gif b/src/main/webapp/editor/icon/ftv2lastnode.gif new file mode 100644 index 00000000..d9909643 Binary files /dev/null and b/src/main/webapp/editor/icon/ftv2lastnode.gif differ diff --git a/src/main/webapp/editor/icon/ftv2node.gif b/src/main/webapp/editor/icon/ftv2node.gif new file mode 100644 index 00000000..f2fddcee Binary files /dev/null and b/src/main/webapp/editor/icon/ftv2node.gif differ diff --git a/src/main/webapp/editor/icon/fullscreen.png b/src/main/webapp/editor/icon/fullscreen.png new file mode 100644 index 00000000..2e9bc42b Binary files /dev/null and b/src/main/webapp/editor/icon/fullscreen.png differ diff --git a/src/main/webapp/editor/icon/hr.png b/src/main/webapp/editor/icon/hr.png new file mode 100644 index 00000000..a91c78a5 Binary files /dev/null and b/src/main/webapp/editor/icon/hr.png differ diff --git a/src/main/webapp/editor/icon/image.png b/src/main/webapp/editor/icon/image.png new file mode 100644 index 00000000..4a158fef Binary files /dev/null and b/src/main/webapp/editor/icon/image.png differ diff --git a/src/main/webapp/editor/icon/image_.png b/src/main/webapp/editor/icon/image_.png new file mode 100644 index 00000000..fc3c393c Binary files /dev/null and b/src/main/webapp/editor/icon/image_.png differ diff --git a/src/main/webapp/editor/icon/image_add.png b/src/main/webapp/editor/icon/image_add.png new file mode 100644 index 00000000..fc5d6139 Binary files /dev/null and b/src/main/webapp/editor/icon/image_add.png differ diff --git a/src/main/webapp/editor/icon/image_edit.png b/src/main/webapp/editor/icon/image_edit.png new file mode 100644 index 00000000..0aa4cc65 Binary files /dev/null and b/src/main/webapp/editor/icon/image_edit.png differ diff --git a/src/main/webapp/editor/icon/image_link.png b/src/main/webapp/editor/icon/image_link.png new file mode 100644 index 00000000..42dca744 Binary files /dev/null and b/src/main/webapp/editor/icon/image_link.png differ diff --git a/src/main/webapp/editor/icon/image_property.png b/src/main/webapp/editor/icon/image_property.png new file mode 100644 index 00000000..0aa4cc65 Binary files /dev/null and b/src/main/webapp/editor/icon/image_property.png differ diff --git a/src/main/webapp/editor/icon/image_search.png b/src/main/webapp/editor/icon/image_search.png new file mode 100644 index 00000000..b8edc126 Binary files /dev/null and b/src/main/webapp/editor/icon/image_search.png differ diff --git a/src/main/webapp/editor/icon/image_upload.png b/src/main/webapp/editor/icon/image_upload.png new file mode 100644 index 00000000..777fb5d2 Binary files /dev/null and b/src/main/webapp/editor/icon/image_upload.png differ diff --git a/src/main/webapp/editor/icon/imagecenter.png b/src/main/webapp/editor/icon/imagecenter.png new file mode 100644 index 00000000..d9591c13 Binary files /dev/null and b/src/main/webapp/editor/icon/imagecenter.png differ diff --git a/src/main/webapp/editor/icon/images.png b/src/main/webapp/editor/icon/images.png new file mode 100644 index 00000000..184860d1 Binary files /dev/null and b/src/main/webapp/editor/icon/images.png differ diff --git a/src/main/webapp/editor/icon/increase.png b/src/main/webapp/editor/icon/increase.png new file mode 100644 index 00000000..c30cf598 Binary files /dev/null and b/src/main/webapp/editor/icon/increase.png differ diff --git a/src/main/webapp/editor/icon/indent.png b/src/main/webapp/editor/icon/indent.png new file mode 100644 index 00000000..93645323 Binary files /dev/null and b/src/main/webapp/editor/icon/indent.png differ diff --git a/src/main/webapp/editor/icon/insert_html.png b/src/main/webapp/editor/icon/insert_html.png new file mode 100644 index 00000000..7b3bb5ef Binary files /dev/null and b/src/main/webapp/editor/icon/insert_html.png differ diff --git a/src/main/webapp/editor/icon/insertfirstparagraph.png b/src/main/webapp/editor/icon/insertfirstparagraph.png new file mode 100644 index 00000000..c5c45b2d Binary files /dev/null and b/src/main/webapp/editor/icon/insertfirstparagraph.png differ diff --git a/src/main/webapp/editor/icon/insertlastparagraph.png b/src/main/webapp/editor/icon/insertlastparagraph.png new file mode 100644 index 00000000..4880c43a Binary files /dev/null and b/src/main/webapp/editor/icon/insertlastparagraph.png differ diff --git a/src/main/webapp/editor/icon/insertorderedlist.png b/src/main/webapp/editor/icon/insertorderedlist.png new file mode 100644 index 00000000..33b0b8df Binary files /dev/null and b/src/main/webapp/editor/icon/insertorderedlist.png differ diff --git a/src/main/webapp/editor/icon/insertunorderedlist.png b/src/main/webapp/editor/icon/insertunorderedlist.png new file mode 100644 index 00000000..4a8672bd Binary files /dev/null and b/src/main/webapp/editor/icon/insertunorderedlist.png differ diff --git a/src/main/webapp/editor/icon/italic.png b/src/main/webapp/editor/icon/italic.png new file mode 100644 index 00000000..8482ac8c Binary files /dev/null and b/src/main/webapp/editor/icon/italic.png differ diff --git a/src/main/webapp/editor/icon/justifycenter.png b/src/main/webapp/editor/icon/justifycenter.png new file mode 100644 index 00000000..57beb381 Binary files /dev/null and b/src/main/webapp/editor/icon/justifycenter.png differ diff --git a/src/main/webapp/editor/icon/justifyleft.png b/src/main/webapp/editor/icon/justifyleft.png new file mode 100644 index 00000000..6c8fcc11 Binary files /dev/null and b/src/main/webapp/editor/icon/justifyleft.png differ diff --git a/src/main/webapp/editor/icon/justifyright.png b/src/main/webapp/editor/icon/justifyright.png new file mode 100644 index 00000000..a1502571 Binary files /dev/null and b/src/main/webapp/editor/icon/justifyright.png differ diff --git a/src/main/webapp/editor/icon/lineheight.png b/src/main/webapp/editor/icon/lineheight.png new file mode 100644 index 00000000..1a91cbdd Binary files /dev/null and b/src/main/webapp/editor/icon/lineheight.png differ diff --git a/src/main/webapp/editor/icon/loading.gif b/src/main/webapp/editor/icon/loading.gif new file mode 100644 index 00000000..0f2bc83c Binary files /dev/null and b/src/main/webapp/editor/icon/loading.gif differ diff --git a/src/main/webapp/editor/icon/new.png b/src/main/webapp/editor/icon/new.png new file mode 100644 index 00000000..6a9bf037 Binary files /dev/null and b/src/main/webapp/editor/icon/new.png differ diff --git a/src/main/webapp/editor/icon/normalscreen.png b/src/main/webapp/editor/icon/normalscreen.png new file mode 100644 index 00000000..745c6513 Binary files /dev/null and b/src/main/webapp/editor/icon/normalscreen.png differ diff --git a/src/main/webapp/editor/icon/note.png b/src/main/webapp/editor/icon/note.png new file mode 100644 index 00000000..779ad58e Binary files /dev/null and b/src/main/webapp/editor/icon/note.png differ diff --git a/src/main/webapp/editor/icon/outdent.png b/src/main/webapp/editor/icon/outdent.png new file mode 100644 index 00000000..1651b074 Binary files /dev/null and b/src/main/webapp/editor/icon/outdent.png differ diff --git a/src/main/webapp/editor/icon/pageadd.png b/src/main/webapp/editor/icon/pageadd.png new file mode 100644 index 00000000..d5bfa071 Binary files /dev/null and b/src/main/webapp/editor/icon/pageadd.png differ diff --git a/src/main/webapp/editor/icon/picture_add.png b/src/main/webapp/editor/icon/picture_add.png new file mode 100644 index 00000000..d6d3f856 Binary files /dev/null and b/src/main/webapp/editor/icon/picture_add.png differ diff --git a/src/main/webapp/editor/icon/preview_result.png b/src/main/webapp/editor/icon/preview_result.png new file mode 100644 index 00000000..9eae42e6 Binary files /dev/null and b/src/main/webapp/editor/icon/preview_result.png differ diff --git a/src/main/webapp/editor/icon/resizing_area.png b/src/main/webapp/editor/icon/resizing_area.png new file mode 100644 index 00000000..07c3d5ff Binary files /dev/null and b/src/main/webapp/editor/icon/resizing_area.png differ diff --git a/src/main/webapp/editor/icon/seperator.png b/src/main/webapp/editor/icon/seperator.png new file mode 100644 index 00000000..8fec544d Binary files /dev/null and b/src/main/webapp/editor/icon/seperator.png differ diff --git a/src/main/webapp/editor/icon/smiech.gif b/src/main/webapp/editor/icon/smiech.gif new file mode 100644 index 00000000..ca99b1b2 Binary files /dev/null and b/src/main/webapp/editor/icon/smiech.gif differ diff --git a/src/main/webapp/editor/icon/source.png b/src/main/webapp/editor/icon/source.png new file mode 100644 index 00000000..55d1072e Binary files /dev/null and b/src/main/webapp/editor/icon/source.png differ diff --git a/src/main/webapp/editor/icon/sourcebox.png b/src/main/webapp/editor/icon/sourcebox.png new file mode 100644 index 00000000..63fe6cef Binary files /dev/null and b/src/main/webapp/editor/icon/sourcebox.png differ diff --git a/src/main/webapp/editor/icon/special_chars.png b/src/main/webapp/editor/icon/special_chars.png new file mode 100644 index 00000000..1ebebde5 Binary files /dev/null and b/src/main/webapp/editor/icon/special_chars.png differ diff --git a/src/main/webapp/editor/icon/strikethrough.png b/src/main/webapp/editor/icon/strikethrough.png new file mode 100644 index 00000000..612058a7 Binary files /dev/null and b/src/main/webapp/editor/icon/strikethrough.png differ diff --git a/src/main/webapp/editor/icon/style_delete.png b/src/main/webapp/editor/icon/style_delete.png new file mode 100644 index 00000000..640f187e Binary files /dev/null and b/src/main/webapp/editor/icon/style_delete.png differ diff --git a/src/main/webapp/editor/icon/subscript.png b/src/main/webapp/editor/icon/subscript.png new file mode 100644 index 00000000..1a2b0101 Binary files /dev/null and b/src/main/webapp/editor/icon/subscript.png differ diff --git a/src/main/webapp/editor/icon/superscript.png b/src/main/webapp/editor/icon/superscript.png new file mode 100644 index 00000000..2fb2a7c7 Binary files /dev/null and b/src/main/webapp/editor/icon/superscript.png differ diff --git a/src/main/webapp/editor/icon/table.png b/src/main/webapp/editor/icon/table.png new file mode 100644 index 00000000..abcd9368 Binary files /dev/null and b/src/main/webapp/editor/icon/table.png differ diff --git a/src/main/webapp/editor/icon/table_cancel_merge.png b/src/main/webapp/editor/icon/table_cancel_merge.png new file mode 100644 index 00000000..fffc4631 Binary files /dev/null and b/src/main/webapp/editor/icon/table_cancel_merge.png differ diff --git a/src/main/webapp/editor/icon/table_col_delete.png b/src/main/webapp/editor/icon/table_col_delete.png new file mode 100644 index 00000000..3bf8254d Binary files /dev/null and b/src/main/webapp/editor/icon/table_col_delete.png differ diff --git a/src/main/webapp/editor/icon/table_col_insert_left.png b/src/main/webapp/editor/icon/table_col_insert_left.png new file mode 100644 index 00000000..7e37f3a1 Binary files /dev/null and b/src/main/webapp/editor/icon/table_col_insert_left.png differ diff --git a/src/main/webapp/editor/icon/table_col_insert_right.png b/src/main/webapp/editor/icon/table_col_insert_right.png new file mode 100644 index 00000000..a5c932b8 Binary files /dev/null and b/src/main/webapp/editor/icon/table_col_insert_right.png differ diff --git a/src/main/webapp/editor/icon/table_col_merge.png b/src/main/webapp/editor/icon/table_col_merge.png new file mode 100644 index 00000000..7fa1caf8 Binary files /dev/null and b/src/main/webapp/editor/icon/table_col_merge.png differ diff --git a/src/main/webapp/editor/icon/table_property.png b/src/main/webapp/editor/icon/table_property.png new file mode 100644 index 00000000..cfc2702a Binary files /dev/null and b/src/main/webapp/editor/icon/table_property.png differ diff --git a/src/main/webapp/editor/icon/table_row_delete.png b/src/main/webapp/editor/icon/table_row_delete.png new file mode 100644 index 00000000..9d9c6923 Binary files /dev/null and b/src/main/webapp/editor/icon/table_row_delete.png differ diff --git a/src/main/webapp/editor/icon/table_row_insert_down.png b/src/main/webapp/editor/icon/table_row_insert_down.png new file mode 100644 index 00000000..28c7177b Binary files /dev/null and b/src/main/webapp/editor/icon/table_row_insert_down.png differ diff --git a/src/main/webapp/editor/icon/table_row_insert_up.png b/src/main/webapp/editor/icon/table_row_insert_up.png new file mode 100644 index 00000000..586587d2 Binary files /dev/null and b/src/main/webapp/editor/icon/table_row_insert_up.png differ diff --git a/src/main/webapp/editor/icon/table_row_merge.png b/src/main/webapp/editor/icon/table_row_merge.png new file mode 100644 index 00000000..89b51ffe Binary files /dev/null and b/src/main/webapp/editor/icon/table_row_merge.png differ diff --git a/src/main/webapp/editor/icon/textbox.png b/src/main/webapp/editor/icon/textbox.png new file mode 100644 index 00000000..204de723 Binary files /dev/null and b/src/main/webapp/editor/icon/textbox.png differ diff --git a/src/main/webapp/editor/icon/tree_blank.gif b/src/main/webapp/editor/icon/tree_blank.gif new file mode 100644 index 00000000..d7ae4067 Binary files /dev/null and b/src/main/webapp/editor/icon/tree_blank.gif differ diff --git a/src/main/webapp/editor/icon/tree_folder_closed.gif b/src/main/webapp/editor/icon/tree_folder_closed.gif new file mode 100644 index 00000000..2999fa25 Binary files /dev/null and b/src/main/webapp/editor/icon/tree_folder_closed.gif differ diff --git a/src/main/webapp/editor/icon/tree_folder_open.gif b/src/main/webapp/editor/icon/tree_folder_open.gif new file mode 100644 index 00000000..de75e8ec Binary files /dev/null and b/src/main/webapp/editor/icon/tree_folder_open.gif differ diff --git a/src/main/webapp/editor/icon/tree_icon_close.gif b/src/main/webapp/editor/icon/tree_icon_close.gif new file mode 100644 index 00000000..56774de7 Binary files /dev/null and b/src/main/webapp/editor/icon/tree_icon_close.gif differ diff --git a/src/main/webapp/editor/icon/tree_icon_open.gif b/src/main/webapp/editor/icon/tree_icon_open.gif new file mode 100644 index 00000000..3106d5ff Binary files /dev/null and b/src/main/webapp/editor/icon/tree_icon_open.gif differ diff --git a/src/main/webapp/editor/icon/tree_minus.gif b/src/main/webapp/editor/icon/tree_minus.gif new file mode 100644 index 00000000..96e78d62 Binary files /dev/null and b/src/main/webapp/editor/icon/tree_minus.gif differ diff --git a/src/main/webapp/editor/icon/tree_plus.gif b/src/main/webapp/editor/icon/tree_plus.gif new file mode 100644 index 00000000..c7ba80e6 Binary files /dev/null and b/src/main/webapp/editor/icon/tree_plus.gif differ diff --git a/src/main/webapp/editor/icon/underline.png b/src/main/webapp/editor/icon/underline.png new file mode 100644 index 00000000..90d0df28 Binary files /dev/null and b/src/main/webapp/editor/icon/underline.png differ diff --git a/src/main/webapp/editor/icon/unlink.png b/src/main/webapp/editor/icon/unlink.png new file mode 100644 index 00000000..52357530 Binary files /dev/null and b/src/main/webapp/editor/icon/unlink.png differ diff --git a/src/main/webapp/editor/icon/usmiech.gif b/src/main/webapp/editor/icon/usmiech.gif new file mode 100644 index 00000000..82a767d5 Binary files /dev/null and b/src/main/webapp/editor/icon/usmiech.gif differ diff --git a/src/main/webapp/editor/icon/webnote.png b/src/main/webapp/editor/icon/webnote.png new file mode 100644 index 00000000..c61a6d84 Binary files /dev/null and b/src/main/webapp/editor/icon/webnote.png differ diff --git a/src/main/webapp/editor/icon/whats.png b/src/main/webapp/editor/icon/whats.png new file mode 100644 index 00000000..5c870176 Binary files /dev/null and b/src/main/webapp/editor/icon/whats.png differ diff --git a/src/main/webapp/editor/icon/world.png b/src/main/webapp/editor/icon/world.png new file mode 100644 index 00000000..68f21d30 Binary files /dev/null and b/src/main/webapp/editor/icon/world.png differ diff --git a/src/main/webapp/editor/lang/en.txt b/src/main/webapp/editor/lang/en.txt new file mode 100644 index 00000000..6d88b2c1 --- /dev/null +++ b/src/main/webapp/editor/lang/en.txt @@ -0,0 +1,163 @@ +//WebNoteLanguageSet +{ + "source": "Html Source View", + "design": "Design View", + "font": "Font", + "fontsize": "Font Size", + "lineheight": "Line Height", + "bold": "Bold", + "italic": "Italic", + "underline": "Underline", + "strikethrough": "Strike Through", + "superscript": "Super Script", + "subscript": "Sub Script", + "forecolor": "Font Color", + "backcolor": "Font Back Color", + "justifyleft": "Justify Left", + "justifycenter": "Justify Center", + "justifyright": "Justify Right", + "indent": "Indent", + "outdent": "Outdent", + "insertunorderedlist": "Unordered List", + "insertorderedlist": "Ordered List", + "insertfirstparagraph": "Insert First Paragraph", + "insertlastparagraph": "Insert Last Paragraph", + "createlink": "Create Hyper Link", + "unlink": "Remove Hyper Link", + "hr": "Horizontal Line", + "image_link": "Insert WebLink Image", + "image_upload": "Upload Image", + "images": "Image Center(Server Storage)", + "imagecenter": "Image Center", + "image_search": "Insert Web Search Image", + "pageadd": "Add Html Source", + "textbox": "Text Box", + "note": "Note Box", + "table": "Table", + "sourcebox": "Source Box", + "emoticon": "Emoticon", + "special_chars": "Special Character", + "increase": "Increase Height(+100px)", + "decrease": "Decrease Height(-100px)", + "fullscreen": "Full Screen", + "normalscreen": "Normal Screen", + "whats": "About WebNote", + + "btn_apply": "Apply", + "btn_ok": "Ok", + "btn_insert": "Insert", + "btn_close": "Close", + "btn_mkdir": "Make Folder", + "btn_rmdir": "Delete Folder", + "btn_image_upload": "Upload Image", + "btn_select_all": "Select All", + "btn_select_insert": "Insert", + "btn_select_delete": "Delete", + + "label_auto": "Auto", + "msg_click": "Click!", + "msg_inc_unit": "Inc Unit", + "msg_left": "Left", + "msg_right": "Right", + "msg_center": "Center", + "msg_top": "Top", + "msg_bottom": "Bottom", + "msg_color": "Color", + "msg_rows": "Row", + "msg_cols": "Col", + "msg_align": "Align", + "msg_context_popup": "Menu", + "msg_file_attach_thumb": "Double Click:Insert To Contents, Right Click:View Menu", + "msg_no_subfolder": "No Sub-Folder", + "msg_get_filelist": "Get File List", + "msg_get_subfolderlist": "Get Sub-Folder List", + "msg_refresh_wic_tree": "Refresh All Tree", + + "font_input_form_text": "Input Font Name", + "fontsize_input_form_text": "Input Font Size Value(include unit)", + "lineheight_input_form_text": "Input Line Height Value(include unit)", + "fontcolor_form_title": "Input Color Code", + + "createlink_alert": "Select Contents(Drag)", + "createlink_target_menu": "Target", + "createlink_target_form_title": "Select Link Target", + "createlink_url_menu": "URL", + "createlink_url_form_title": "Input Link URL", + + "insertimagelink_url_menu": "Image Url", + "insertimagelink_url_form_title": "Input Image Url", + "insertimagelink_width_menu": "Width", + "insertimagelink_height_menu": "Height", + "insertimagelink_alt_menu": "Alt", + "insertimagelink_alt_form_title": "Image Alt Text", + "insertimagelink_title_menu": "Title", + "insertimagelink_title_form_title": "Image Title Text", + "insertimagelink_hyperlink_menu": "HyperLink", + + "insertimageupload_file_menu": "File", + "insertimageupload_btn_upload": "Upload", + + "image_context_property": "Property", + + "textbox_borderstyle_menu": "Border", + "textbox_borderstyle_form_solid": "Solid", + "textbox_borderstyle_form_dotted": "Dotted", + "textbox_borderstyle_form_dashed": "Dashed", + "textbox_borderstyle_form_none": "None", + "textbox_borderwidth_menu": "Border", + "textbox_bordercolor_menu": "Border", + "textbox_bgcolor_menu": "Background", + "textbox_textcolor_menu": "Text", + "textbox_width_menu": "Width", + "textbox_textalign_menu": "TextAlign", + "textbox_padding_menu": "Padding", + "textbox_margin_menu": "Margin", + "textbox_preview_text": "Preview Text", + + "table_cellpadding": "Cell Padding", + "table_cellspacing": "Cell Spacing", + "table_border": "Border", + "table_bgcolor": "Table BG", + "table_cell_bgcolor": "Cell BG", + + "table_context_table_propery": "Table Property", + "table_context_cell_propery": "Cell Property", + "table_context_insert_row_above": "Insert Above", + "table_context_insert_row_below": "Insert Below", + "table_context_insert_col_left": "Insert Left", + "table_context_insert_col_right": "Insert Right", + "table_context_delete_row_this": "Delete Row", + "table_context_delete_col_this": "Delete Col", + "table_context_merge_cell_right": "Merge Right", + "table_context_merge_cell_below": "Merge Below", + "table_context_cancel_merge": "Cancel Merge", + + "file_attach_thumb_context_insert": "Insert To Contents", + "file_attach_thumb_context_delete": "Delete From Server", + + "alert_only_design_mode": "Use Design View!", + "alert_delete_image_s_c": "Delete Select Images From Server", + "alert_delete_image_s_c_force": "Have failed to delete the server files, the server does not have the file. Are you sure you want to delete the inserted image information in the editor?", + "alert_no_resize_editor": "Do Not Resizing In Full Screen", + "alert_no_command": "Command Not Found", + "alert_input_url": "Please Input Url", + "alert_timeout": "Time Out! Please Retry!", + + "alert_tbl_norightcell": "There is no cell right", + "alert_tbl_nobelowcell": "There is no cell below", + "alert_tbl_sametypecell": "Only the cells of the same type can be", + + "alert_no_dragndrop": "your browser is not supply drag & drop upload", + + "alert_select_image": "Select Image", + "alert_input_foldername": "Input Folder Name", + "alert_no_special_characters": "Special characters can not be used", + "alert_no_image": "No Images!", + + "confirm_del_path": "Delete Folder Path", + "confirm_del_alert": "The folder's sub-folders, all files are deleted. Are you sure you want to delete?", + "confirm_select_del": "Are you sure you want to delete the selected image to the server?" + + + +} \ No newline at end of file diff --git a/src/main/webapp/editor/lang/ko.txt b/src/main/webapp/editor/lang/ko.txt new file mode 100644 index 00000000..7ae4789c --- /dev/null +++ b/src/main/webapp/editor/lang/ko.txt @@ -0,0 +1,164 @@ +//WebNoteLanguageSet +{ + "source": "HTML소스보기", + "design": "디자인보기", + "font": "글자모양", + "fontsize": "글자크기", + "lineheight": "줄간격", + "bold": "진하게", + "italic": "이탤릭", + "underline": "밑줄", + "strikethrough": "취소선", + "superscript": "윗첨자", + "subscript": "아랫첨자", + "forecolor": "글자색", + "backcolor": "글자배경색", + "justifyleft": "왼쪽정렬", + "justifycenter": "가운데정렬", + "justifyright": "오른쪽정렬", + "indent": "들여쓰기", + "outdent": "내어쓰기", + "insertunorderedlist": "기본리스트", + "insertorderedlist": "숫자리스트", + "insertfirstparagraph": "문서 시작지점에 빈문단삽입", + "insertlastparagraph": "문서 끝지점에 빈문단삽입", + "createlink": "하이퍼링크설정", + "unlink": "하이퍼링크제거", + "hr": "수평선삽입", + "image_link": "이미지 링크 삽입", + "image_upload": "이미지 업로드 삽입", + "images": "이미지센터(서버저장소)", + "imagecenter": "이미지센터", + "image_search": "웹에서 이미지 검색/삽입", + "pageadd": "HTML소스로 삽입", + "textbox": "글상자", + "note": "노트상자", + "table": "표", + "sourcebox": "소스노트", + "emoticon": "이모티콘", + "special_chars": "특수문자", + "increase": "에디터높이증가(+100px)", + "decrease": "에디터높이감소(-100px)", + "fullscreen": "전체화면", + "normalscreen": "기본화면", + "whats": "웹노트", + + "btn_apply": "적용", + "btn_ok": "확인", + "btn_insert": "삽입하기", + "btn_close": "닫기", + "btn_mkdir": "새폴더 생성", + "btn_rmdir": "폴더 삭제", + "btn_image_upload": "이미지 업로드", + "btn_select_all": "전체선택", + "btn_select_insert": "선택삽입", + "btn_select_delete": "선택삭제", + + "label_auto": "자동", + "msg_click": "클릭하세요!", + "msg_inc_unit": "단위포함", + "msg_left": "왼쪽", + "msg_right": "오른쪽", + "msg_center": "가운데", + "msg_top": "위", + "msg_bottom": "아래", + "msg_color": "색상", + "msg_rows": "행", + "msg_cols": "열", + "msg_align": "정렬", + "msg_context_popup": "설정", + "msg_file_attach_thumb": "더블클릭:본문삽입, 우클릭:메뉴보기", + "msg_no_subfolder": "하위폴더가 없습니다.", + "msg_get_filelist": "파일목록 가져오기", + "msg_get_subfolderlist": "하위폴더 가져오기", + "msg_refresh_wic_tree": "트리 전체 새로고침", + + "font_input_form_text": "직접 폰트명을 입력할 수 있습니다.", + "fontsize_input_form_text": "직접 크기 값을 입력할 수 있습니다(단위포함)", + "lineheight_input_form_text": "직접 줄간격 값을 입력할 수 있습니다(단위포함)", + "fontcolor_form_title": "색상코드를 입력해주세요", + + "createlink_alert": "링크를 만들 대상을 먼저 드래그해서 선택해주세요", + "createlink_target_menu": "링크대상", + "createlink_target_form_title": "링크가 열릴 창 대상을 선택합니다.", + "createlink_url_menu": "링크주소", + "createlink_url_form_title": "링크 주소를 입력합니다.", + + "insertimagelink_url_menu": "웹주소", + "insertimagelink_url_form_title": "이미지 웹주소를 입력합니다.", + "insertimagelink_width_menu": "가로길이", + "insertimagelink_height_menu": "세로길이", + "insertimagelink_alt_menu": "안내(Alt)", + "insertimagelink_alt_form_title": "이미지를 출력할 수 없을때 대체해서 보여줄 내용", + "insertimagelink_title_menu": "안내(Title)", + "insertimagelink_title_form_title": "이미지위에 마우스를 올렸을때 보여줄 내용", + "insertimagelink_hyperlink_menu": "하이퍼링크", + + "insertimageupload_file_menu": "파일", + "insertimageupload_btn_upload": "올리기", + + "image_context_property": "이미지속성", + + "textbox_borderstyle_menu": "선 모양", + "textbox_borderstyle_form_solid": "실선", + "textbox_borderstyle_form_dotted": "가는점선", + "textbox_borderstyle_form_dashed": "굵은점선", + "textbox_borderstyle_form_none": "선 없음", + "textbox_borderwidth_menu": "선 두께", + "textbox_bordercolor_menu": "선 색상", + "textbox_bgcolor_menu": "배경색", + "textbox_textcolor_menu": "글자색", + "textbox_width_menu": "가로길이", + "textbox_textalign_menu": "글자정렬", + "textbox_padding_menu": "안쪽여백", + "textbox_margin_menu": "바깥여백", + "textbox_preview_text": "미리보기 내용", + + "table_cellpadding": "셀 안쪽여백", + "table_cellspacing": "셀 간격", + "table_border": "선 두께", + "table_bgcolor": "표 배경색", + "table_cell_bgcolor": "셀 배경색", + + "table_context_table_propery": "표속성", + "table_context_cell_propery": "셀속성", + "table_context_insert_row_above": "위에 행삽입", + "table_context_insert_row_below": "아래 행삽입", + "table_context_insert_col_left": "왼쪽에 열삽입", + "table_context_insert_col_right": "오른쪽에 열삽입", + "table_context_delete_row_this": "현재행 삭제", + "table_context_delete_col_this": "현재열 삭제", + "table_context_merge_cell_right": "오른쪽 셀과 병합", + "table_context_merge_cell_below": "아래쪽 셀과 병합", + "table_context_cancel_merge": "셀병합 취소", + + "file_attach_thumb_context_insert": "본문에 삽입", + "file_attach_thumb_context_delete": "서버에서 파일 삭제", + + "alert_only_design_mode": "디자인보기에서 사용해 주세요", + "alert_delete_image_s_c": "서버에서 해당 이미지를 삭제하고, 본문에서도 모두 제거하시겠습니까?", + "alert_delete_image_s_c_force": "서버파일 삭제에 실패했거나, 서버에 해당 파일이 없습니다. 에디터에 삽입된 이미지정보를 삭제 하시겠습니까?", + "alert_no_resize_editor": "전체화면 모드에서는 사이즈를 조절할 수 없습니다.", + "alert_no_command": "없는 기능입니다.", + "alert_input_url": "URL을 입력해 주세요", + "alert_timeout": "대기 시간이 길어져 중단 합니다. 잠시 후 다시 시도해 주세요", + + "alert_tbl_norightcell": "우측에 셀이 없습니다.", + "alert_tbl_nobelowcell": "아래에 셀이 없습니다.", + "alert_tbl_sametypecell": "동일한 유형의 셀만 가능합니다.", + + "alert_no_dragndrop": "드래그&드롭을 통한 업로드를 지원하지 않는 브라우저 입니다.", + + "alert_select_image": "이미지를 선택해 주세요", + "alert_input_foldername": "폴더명을 입력해주세요.", + "alert_no_special_characters": "특수문자는 폴더이름에 사용할 수 없습니다.", + "alert_no_image": "이미지가 없습니다!", + + "confirm_del_path": "삭제폴더경로", + "confirm_del_alert": "해당 폴더의 하위의 폴더, 파일들이 모두 함께 삭제됩니다. 정말 삭제하시겠습니까?", + "confirm_select_del": "선택된 이미지를 서버에서 삭제하시겠습니까?" + + + + +} \ No newline at end of file diff --git a/src/main/webapp/img/seed/favicon.ico b/src/main/webapp/img/seed/favicon.ico new file mode 100644 index 00000000..5bbcf725 Binary files /dev/null and b/src/main/webapp/img/seed/favicon.ico differ diff --git a/src/main/webapp/js/seed/commonFileUtil.js b/src/main/webapp/js/seed/commonFileUtil.js new file mode 100644 index 00000000..c27589fa --- /dev/null +++ b/src/main/webapp/js/seed/commonFileUtil.js @@ -0,0 +1,186 @@ + +/*$("#upFile").click(function(){ + var url = $(this).attr("href"); + window.open(url,"popFileUpload","width=430, height=630, menubar=no, status=no, resizable=no"); + return false; +});*/ +function fileTempUp(upFile, fileGubun){ + var i = upFile.id.split('_')[1]; + if($(upFile).val() == ""){ + alert("파일을 선택해 주세요"); + $(upFile).focus(); + return false; + } + var val = $(upFile).val().split("\\"); + var fileName = val[val.length-1]; //마지막 화일명 + var fileType = fileName.substring(fileName.lastIndexOf("."));//확장자빼오기 + + var extArray = new Array("txt","jpeg","jpg","png","gif","bmp","mp3","mp4","hwp","doc","docx","xls","xlsx","ppt","pptx","pdf","zip","alz"); + + var extChk = false; + + for(var f=0; f  잠시만 기다려주세요.' }); + + $('#fileTempUpFrm'+i).ajaxForm({ + //보내기전 validation check가 필요할경우 + beforeSubmit: function (data, form, option) { + //alert("전송전!!"); + //return false; + }, + //submit이후의 처리 + success: function(response, status){ + $.unblockUI(); + jf_upload_set(response.fileName, response.reFileName, response.fileSize, response.fileType, response.copyContractYn, i, fileGubun); + //alert("after"); + }, + //ajax error + error: function(){ + $.unblockUI(); + alert("작업이 실패 했습니다."); + } + }).submit(); + +} + +var fileCountFix = 0; +var totFileSize = 0; +function jf_upload_set(fileName, reFileName, fileSize, fileType, copyContractYn, objNo, fileGubun){ + /*alert("fileName:" + fileName); + alert("reFileName:" + reFileName); + alert("fileSize:" + fileSize); + alert("fileType:" + fileType); + alert("copyContractYn:" + copyContractYn);*/ + var sizeData = parseInt(fileSize); + sizeData = sizeData/1024/1024; + totFileSize = sizeData; + sizeData = sizeData.toFixed(2); + + if(totFileSize > 100){ + alert("첨부파일 크기가 100Mbyte를 넘었습니다."); + return; + } + + var upFileLiLength = parseInt($("#uploadFileCntId").val()); + + if(upFileLiLength != "" && upFileLiLength != undefined){ + if(fileCountFix==0){ + fileCountFix = upFileLiLength+1; + } + } + + + //홈페이지에서 등록하는 파일은 메모 박스가 없게... + var isFileMemo = true; + if(reFileName != null && reFileName !="" && reFileName != undefined){ + var arrReName = reFileName.split("_"); + if(arrReName.length > 0){ + if(arrReName[0] == 'mediation'){ + isFileMemo = false; + } + } + } + + var fileHtml = "
"; + fileHtml += "\"gif\"  "; + fileHtml += fileName+"  ("+sizeData+")"; + fileHtml += " "; + fileHtml += "\"삭제\""; + if(isFileMemo){ + fileHtml += ""; + } + fileHtml += ""; + fileHtml += ""; + fileHtml += ""; + fileHtml += ""; + fileHtml += ""; + fileHtml += "
"; + + fileCountFix = fileCountFix+1; + $("#upFileHtml"+objNo).append(fileHtml); +} + +function jf_delete_file(deleteNum, sizeData, copyContractYn, objNo){ + + var idName = ""; + + idName = "upFileHtml"+objNo; + + var fileIdx = $("#"+idName+" > #fileUploadP"+deleteNum).children(".fileIdxClass").val(); + + if(fileIdx != ""){ + var deleteFileData = $("#deleteFileDataId").val(); + if(deleteFileData != ""){ + deleteFileData = deleteFileData+","+fileIdx; + }else{ + deleteFileData = fileIdx; + } + + $("#deleteFileDataId").val(deleteFileData); + + } + + $("#"+idName+" > #fileUploadP"+deleteNum).remove(); + + totFileSize = totFileSize-sizeData; + + if(totFileSize < 0){ + totFileSize = 0; + } +} + +function jf_delete_file2(deleteNum, sizeData, copyContractYn, objNo, fileSeqNo){ + + var idName = ""; + + idName = "upFileHtml"+objNo; + + var fileIdx = $("#"+idName+" > #fileUploadP"+deleteNum).children(".fileIdxClass").val(); + + if(fileIdx != ""){ + var deleteFileData = $("#deleteFileDataId").val(); + if(deleteFileData != ""){ + deleteFileData = deleteFileData+","+fileIdx; + }else{ + deleteFileData = fileIdx; + } + + $("#deleteFileDataId").val(deleteFileData); + + } + + $("#"+idName+" > #fileUploadP"+deleteNum).remove(); + + totFileSize = totFileSize-sizeData; + + if(totFileSize < 0){ + totFileSize = 0; + } + + fileDelt(fileSeqNo); +} + +//기존 등록된 파일삭제 +function fileDelt(fileSeqNo){ + $("#fileSeqNo").val(fileSeqNo); + var url = ""; + $("#type").val("U"); + var param = jQuery('#frm').serialize(); + url = "/user/case/trublcfrncmng/ajax/CasefileDel.do"; + XHR(url, param, function(r){ + alert("파일이 삭제되었습니다."); + }); +} + diff --git a/src/main/webapp/js/seed/jquery.form.js b/src/main/webapp/js/seed/jquery.form.js new file mode 100644 index 00000000..e3126caf --- /dev/null +++ b/src/main/webapp/js/seed/jquery.form.js @@ -0,0 +1,1190 @@ +/*! + * jQuery Form Plugin + * version: 3.35.0-2013.05.23 + * @requires jQuery v1.5 or later + * Copyright (c) 2013 M. Alsup + * Examples and documentation at: http://malsup.com/jquery/form/ + * Project repository: https://github.com/malsup/form + * Dual licensed under the MIT and GPL licenses. + * https://github.com/malsup/form#copyright-and-license + */ +/*global ActiveXObject */ +;(function($) { +"use strict"; + +/* + Usage Note: + ----------- + Do not use both ajaxSubmit and ajaxForm on the same form. These + functions are mutually exclusive. Use ajaxSubmit if you want + to bind your own submit handler to the form. For example, + + $(document).ready(function() { + $('#myForm').on('submit', function(e) { + e.preventDefault(); // <-- important + $(this).ajaxSubmit({ + target: '#output' + }); + }); + }); + + Use ajaxForm when you want the plugin to manage all the event binding + for you. For example, + + $(document).ready(function() { + $('#myForm').ajaxForm({ + target: '#output' + }); + }); + + You can also use ajaxForm with delegation (requires jQuery v1.7+), so the + form does not have to exist when you invoke ajaxForm: + + $('#myForm').ajaxForm({ + delegation: true, + target: '#output' + }); + + When using ajaxForm, the ajaxSubmit function will be invoked for you + at the appropriate time. +*/ + +/** + * Feature detection + */ +var feature = {}; +feature.fileapi = $("").get(0).files !== undefined; +feature.formdata = window.FormData !== undefined; + +var hasProp = !!$.fn.prop; + +// attr2 uses prop when it can but checks the return type for +// an expected string. this accounts for the case where a form +// contains inputs with names like "action" or "method"; in those +// cases "prop" returns the element +$.fn.attr2 = function() { + if ( ! hasProp ) + return this.attr.apply(this, arguments); + var val = this.prop.apply(this, arguments); + if ( ( val && val.jquery ) || typeof val === 'string' ) + return val; + return this.attr.apply(this, arguments); +}; + +/** + * ajaxSubmit() provides a mechanism for immediately submitting + * an HTML form using AJAX. + */ +$.fn.ajaxSubmit = function(options) { + /*jshint scripturl:true */ + + // fast fail if nothing selected (http://dev.jquery.com/ticket/2752) + if (!this.length) { + log('ajaxSubmit: skipping submit process - no element selected'); + return this; + } + + var method, action, url, $form = this; + + if (typeof options == 'function') { + options = { success: options }; + } + + method = options.type || this.attr2('method'); + action = options.url || this.attr2('action'); + + url = (typeof action === 'string') ? $.trim(action) : ''; + url = url || window.location.href || ''; + if (url) { + // clean url (don't include hash vaue) + url = (url.match(/^([^#]+)/)||[])[1]; + } + + options = $.extend(true, { + url: url, + success: $.ajaxSettings.success, + type: method || 'GET', + iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank' + }, options); + + // hook for manipulating the form data before it is extracted; + // convenient for use with rich editors like tinyMCE or FCKEditor + var veto = {}; + this.trigger('form-pre-serialize', [this, options, veto]); + if (veto.veto) { + log('ajaxSubmit: submit vetoed via form-pre-serialize trigger'); + return this; + } + + // provide opportunity to alter form data before it is serialized + if (options.beforeSerialize && options.beforeSerialize(this, options) === false) { + log('ajaxSubmit: submit aborted via beforeSerialize callback'); + return this; + } + + var traditional = options.traditional; + if ( traditional === undefined ) { + traditional = $.ajaxSettings.traditional; + } + + var elements = []; + var qx, a = this.formToArray(options.semantic, elements); + if (options.data) { + options.extraData = options.data; + qx = $.param(options.data, traditional); + } + + // give pre-submit callback an opportunity to abort the submit + if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) { + log('ajaxSubmit: submit aborted via beforeSubmit callback'); + return this; + } + + // fire vetoable 'validate' event + this.trigger('form-submit-validate', [a, this, options, veto]); + if (veto.veto) { + log('ajaxSubmit: submit vetoed via form-submit-validate trigger'); + return this; + } + + var q = $.param(a, traditional); + if (qx) { + q = ( q ? (q + '&' + qx) : qx ); + } + if (options.type.toUpperCase() == 'GET') { + options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q; + options.data = null; // data is null for 'get' + } + else { + options.data = q; // data is the query string for 'post' + } + + var callbacks = []; + if (options.resetForm) { + callbacks.push(function() { $form.resetForm(); }); + } + if (options.clearForm) { + callbacks.push(function() { $form.clearForm(options.includeHidden); }); + } + + // perform a load on the target only if dataType is not provided + if (!options.dataType && options.target) { + var oldSuccess = options.success || function(){}; + callbacks.push(function(data) { + var fn = options.replaceTarget ? 'replaceWith' : 'html'; + $(options.target)[fn](data).each(oldSuccess, arguments); + }); + } + else if (options.success) { + callbacks.push(options.success); + } + + options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg + var context = options.context || this ; // jQuery 1.4+ supports scope context + for (var i=0, max=callbacks.length; i < max; i++) { + callbacks[i].apply(context, [data, status, xhr || $form, $form]); + } + }; + + if (options.error) { + var oldError = options.error; + options.error = function(xhr, status, error) { + var context = options.context || this; + oldError.apply(context, [xhr, status, error, $form]); + }; + } + + if (options.complete) { + var oldComplete = options.complete; + options.complete = function(xhr, status) { + var context = options.context || this; + oldComplete.apply(context, [xhr, status, $form]); + }; + } + + // are there files to upload? + + // [value] (issue #113), also see comment: + // https://github.com/malsup/form/commit/588306aedba1de01388032d5f42a60159eea9228#commitcomment-2180219 + var fileInputs = $('input[type=file]:enabled[value!=""]', this); + + var hasFileInputs = fileInputs.length > 0; + var mp = 'multipart/form-data'; + var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp); + + var fileAPI = feature.fileapi && feature.formdata; + log("fileAPI :" + fileAPI); + var shouldUseFrame = (hasFileInputs || multipart) && !fileAPI; + + var jqxhr; + + // options.iframe allows user to force iframe mode + // 06-NOV-09: now defaulting to iframe mode if file input is detected + if (options.iframe !== false && (options.iframe || shouldUseFrame)) { + // hack to fix Safari hang (thanks to Tim Molendijk for this) + // see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d + if (options.closeKeepAlive) { + $.get(options.closeKeepAlive, function() { + jqxhr = fileUploadIframe(a); + }); + } + else { + jqxhr = fileUploadIframe(a); + } + } + else if ((hasFileInputs || multipart) && fileAPI) { + jqxhr = fileUploadXhr(a); + } + else { + jqxhr = $.ajax(options); + } + + $form.removeData('jqxhr').data('jqxhr', jqxhr); + + // clear element array + for (var k=0; k < elements.length; k++) + elements[k] = null; + + // fire 'notify' event + this.trigger('form-submit-notify', [this, options]); + return this; + + // utility fn for deep serialization + function deepSerialize(extraData){ + var serialized = $.param(extraData, options.traditional).split('&'); + var len = serialized.length; + var result = []; + var i, part; + for (i=0; i < len; i++) { + // #252; undo param space replacement + serialized[i] = serialized[i].replace(/\+/g,' '); + part = serialized[i].split('='); + // #278; use array instead of object storage, favoring array serializations + result.push([decodeURIComponent(part[0]), decodeURIComponent(part[1])]); + } + return result; + } + + // XMLHttpRequest Level 2 file uploads (big hat tip to francois2metz) + function fileUploadXhr(a) { + var formdata = new FormData(); + + for (var i=0; i < a.length; i++) { + formdata.append(a[i].name, a[i].value); + } + + if (options.extraData) { + var serializedData = deepSerialize(options.extraData); + for (i=0; i < serializedData.length; i++) + if (serializedData[i]) + formdata.append(serializedData[i][0], serializedData[i][1]); + } + + options.data = null; + + var s = $.extend(true, {}, $.ajaxSettings, options, { + contentType: false, + processData: false, + cache: false, + type: method || 'POST' + }); + + if (options.uploadProgress) { + // workaround because jqXHR does not expose upload property + s.xhr = function() { + var xhr = jQuery.ajaxSettings.xhr(); + if (xhr.upload) { + xhr.upload.addEventListener('progress', function(event) { + var percent = 0; + var position = event.loaded || event.position; /*event.position is deprecated*/ + var total = event.total; + if (event.lengthComputable) { + percent = Math.ceil(position / total * 100); + } + options.uploadProgress(event, position, total, percent); + }, false); + } + return xhr; + }; + } + + s.data = null; + var beforeSend = s.beforeSend; + s.beforeSend = function(xhr, o) { + o.data = formdata; + if(beforeSend) + beforeSend.call(this, xhr, o); + }; + return $.ajax(s); + } + + // private function for handling file uploads (hat tip to YAHOO!) + function fileUploadIframe(a) { + var form = $form[0], el, i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle; + var deferred = $.Deferred(); + + if (a) { + // ensure that every serialized input is still enabled + for (i=0; i < elements.length; i++) { + el = $(elements[i]); + if ( hasProp ) + el.prop('disabled', false); + else + el.removeAttr('disabled'); + } + } + + s = $.extend(true, {}, $.ajaxSettings, options); + s.context = s.context || s; + id = 'jqFormIO' + (new Date().getTime()); + if (s.iframeTarget) { + $io = $(s.iframeTarget); + n = $io.attr2('name'); + if (!n) + $io.attr2('name', id); + else + id = n; + } + else { + $io = $('