<%@ page language="java" pageEncoding="UTF-8" %> <%@ page import="java.io.File" %> <%@ page import="kr.comsquare.soonsu.define.AdminMessage" %> <% request.setCharacterEncoding("UTF-8"); %> TrustForm Soonsu <% String strLanguage = AdminMessage.LANGUAGE; String strFontFamily = "Dotum, arial"; if ("jp".equals(strLanguage)) { strFontFamily = "MS Gothic, arial"; } else if ("us".equals(strLanguage)) { strFontFamily = "arial"; } AdminMessage objAdminMessage = new AdminMessage(); String strLogin = (String)session.getAttribute("login"); if (strLogin == null || !strLogin.equals("Success")) { %> <% return; } String strPathType = request.getParameter("inputFolderPathType"); String strPathNum = request.getParameter("inputFolderPathNum"); String strCurrentPath = request.getParameter("inputFolderValue") == null ? "" : request.getParameter("inputFolderValue"); String strTargetPath = request.getParameter("inputTargetValue") == null ? "" : request.getParameter("inputTargetValue"); String strFileSep = strPathType.equals("inputXrwPath") ? File.separator : "/"; if (strTargetPath.equals("..")) { if (strCurrentPath.substring(strCurrentPath.length()-1).equals(strFileSep)) strCurrentPath = strCurrentPath.substring(0, strCurrentPath.length()-1); if (strCurrentPath.lastIndexOf(strFileSep) < 0) { strCurrentPath = ""; } else { strCurrentPath = strCurrentPath.substring(0, strCurrentPath.lastIndexOf(strFileSep)) + strFileSep; } } else { if (strCurrentPath.equals("")) { if (strPathType.equals("inputHtmlPath")) strCurrentPath = "/"; } else if (!strCurrentPath.substring(strCurrentPath.length()-1).equals(strFileSep)) { strCurrentPath += strFileSep; } if (!strTargetPath.equals("")) { if (strTargetPath.substring(strTargetPath.length()-1).equals(strFileSep)) strTargetPath = strTargetPath.substring(0, strTargetPath.length()-1); strCurrentPath = strCurrentPath + strTargetPath + strFileSep; } } String strContextPath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath(); String strCurrentRealPath = strPathType.equals("inputXrwPath") ? strCurrentPath : application.getRealPath("") + strCurrentPath; strCurrentRealPath = strCurrentRealPath.replace("/", File.separator); %> onload="adjustHtmlPath();"<% } %>>
<% if (strPathType.equals("inputXrwPath")) { %> "/> <% } else if (strPathType.equals("inputHtmlPath")) { %> <%=strContextPath%> "/> <% } %>
<% File objFolderList = new File(strCurrentRealPath); String strTrTemp = ""; int nPrintRows = 0; if (strCurrentRealPath.equals("")) { File [] arFolderList = File.listRoots(); for (int i = 0; i < arFolderList.length; i++) { strTrTemp = strTrTemp.equals("") ? "":""; out.println(strTrTemp); out.println(" "); out.println(""); nPrintRows = nPrintRows + 1; } } else if (strPathType.equals("inputXrwPath") && (objFolderList == null || !objFolderList.exists())) { out.println(""); out.println(" "); out.println(""); out.println(""); out.println(" "); out.println(""); nPrintRows = nPrintRows + 2; } else { if (strPathType.equals("inputXrwPath") || (strPathType.equals("inputHtmlPath") && !strCurrentPath.equals("/"))) { out.println(""); out.println(" "); out.println(""); strTrTemp = ""; nPrintRows = nPrintRows + 1; } if (objFolderList.exists()) { File [] arFolderList = objFolderList.listFiles(); for (int i = 0; i < arFolderList.length; i++) { if (arFolderList[i].isDirectory() && !arFolderList[i].isHidden()) { strTrTemp = strTrTemp.equals("") ? "":""; out.println(strTrTemp); out.println(" "); out.println(""); nPrintRows = nPrintRows + 1; } } } } if (nPrintRows < 5) { while (nPrintRows < 5) { strTrTemp = strTrTemp.equals("") ? "":""; out.println(strTrTemp); out.println(" "); out.println(""); nPrintRows = nPrintRows + 1; } } %>
"); out.println("   "+arFolderList[i].getPath()); out.println("
"); out.println("
"); out.println(" "+objAdminMessage.getTip("folderlist01")); out.println("
"); out.println("   .."); out.println("
"); out.println("
  "+arFolderList[i].getName()+""); out.println("
<% if (strPathType.equals("inputHtmlPath") || (strPathType.equals("inputXrwPath") && objFolderList.exists())) { out.println("\""+objAdminMessage.getTip("modal01")+"\"/ "); } %> " alt="<%=objAdminMessage.getTip("modal03")%>"/>