📄 smartfile.java
字号:
{
m_isVirtual = true;
flag = true;
}
}
if(!flag)
ResponseWriteLn(labels.getString("1500"));
} else
{
m_isVirtual = false;
if(m_denyPhysicalPath)
{
ResponseWriteLn(labels.getString("1500"));
} else
{
File file1 = new File(s);
if(!file1.exists())
ResponseWriteLn(labels.getString("1501"));
else
flag = true;
}
}
if(flag)
{
m_fileSeparator = System.getProperty("file.separator");
if(m_fileSeparator.equals("\\"))
m_fileSeparator = "\\\\";
m_rootPath = s;
String s2 = getQueryString("QUERY");
if(s2 == null)
s2 = m_request.getParameter("QUERY");
if(s2 == null)
{
fileAdmFrame();
} else
{
if(s2.equals("FILEADM_PARAM"))
fileAdmParam();
if(s2.equals("FILEADM_LIST"))
fileAdmList();
if(s2.equals("FILEADM_SELECTTREE"))
fileAdmSelectTree();
if(s2.equals("FILEADM_PROP"))
fileAdmProperties();
if(s2.equals("FILEADM_NEWFOLDER"))
fileAdmNewFolder();
if(s2.equals("FILEADM_DELETE"))
fileAdmDelete();
if(s2.equals("FILEADM_NEWFILE"))
fileAdmNewFile();
if(s2.equals("FILEADM_RENAME"))
fileAdmRename();
if(s2.equals("FILEADM_PASTE"))
fileAdmPaste();
if(s2.equals("FILEADM_DOWNLOAD"))
fileAdmDownLoad();
}
}
}
private void fileAdmFrame()
throws IOException
{
if(m_authentication && !auth())
return;
String s = new String();
String s1 = new String();
String s2 = new String();
byte byte0 = 6;
byte byte1 = 2;
byte byte2 = 45;
byte byte3 = 29;
byte byte4 = 24;
int i = m_fileListPercentSize;
int j = 100 - i;
s = m_request.getParameter("RELATIVEPATH");
s1 = m_request.getHeader("User-Agent");
s2 = m_request.getRequestURI();
if(s1.indexOf("Win") > 0)
if(s1.indexOf("MSIE") > 0)
{
byte0 = 6;
byte1 = 2;
byte2 = 45;
byte3 = 29;
byte4 = 24;
} else
{
byte0 = 3;
byte1 = 2;
byte2 = 50;
byte3 = 34;
byte4 = 27;
}
if(s1.indexOf("Mac") > 0)
if(s1.indexOf("MSIE") > 0)
{
byte0 = 6;
byte1 = 2;
byte2 = 45;
byte3 = 29;
byte4 = 24;
} else
{
byte0 = 3;
byte1 = 2;
byte2 = 48;
byte3 = 34;
byte4 = 20;
}
if(s1.indexOf("Linux") > 0)
{
byte0 = 0;
byte1 = 0;
byte2 = 48;
byte3 = 38;
byte4 = 20;
}
if(m_readOnly)
byte2 = 0;
if(!m_showPathSelect)
byte3 = 0;
ResponseWriteLn("<HTML>");
ResponseWriteLn("<HEAD>");
ResponseWriteLn("<TITLE>");
ResponseWriteLn(m_title);
ResponseWriteLn("</TITLE>");
ResponseWriteLn("</HEAD>");
ResponseWriteLn("<FRAMESET ROWS='*," + byte0 + "' FRAMESPACING=0 FRAMEBORDER=NO BORDER=0>");
ResponseWriteLn("<FRAMESET COLS='" + byte0 + ",*," + byte0 + "' FRAMESPACING=0 FRAMEBORDER=NO BORDER=0>");
ResponseWriteLn("<FRAME NAME='RBORDER' SRC='" + getImages("imageNull") + "' MARGINHEIGHT=0 MARGINWIDTH=0 NORESIZE SCROLLING=NO>");
ResponseWriteLn("<FRAMESET ROWS='" + byte1 + "," + byte2 + "," + byte3 + "," + byte4 + ", " + i + "%, " + byte0 + ", " + j + "%' FRAMESPACING=0 FRAMEBORDER=NO BORDER=0>");
ResponseWriteLn("<FRAME NAME='FPARAM' SRC='" + s2 + "?QUERY=FILEADM_PARAM&RELATIVEPATH=' MARGINHEIGHT=0 MARGINWIDTH=0 NORESIZE SCROLLING=NO>");
ResponseWriteLn("<FRAME NAME='FTOOLBAR' SRC='" + getImages("imageNull") + "' MARGINHEIGHT=0 MARGINWIDTH=0 NORESIZE SCROLLING=NO>");
ResponseWriteLn("<FRAME NAME='FPATH' SRC='" + getImages("imageNull") + "' MARGINHEIGHT=0 MARGINWIDTH=0 NORESIZE SCROLLING=NO>");
ResponseWriteLn("<FRAME NAME='FCOLUMNS' SRC='" + getImages("imageNull") + "' MARGINHEIGHT=0 MARGINWIDTH=0 NORESIZE SCROLLING=NO>");
ResponseWriteLn("<FRAME NAME='FLIST' SRC='" + getImages("imageNull") + "' MARGINHEIGHT=0 MARGINWIDTH=0 NORESIZE>");
ResponseWriteLn("<FRAME NAME='MBORDER' SRC='" + getImages("imageNull") + "' MARGINHEIGHT=0 MARGINWIDTH=0 NORESIZE SCROLLING=NO>");
ResponseWriteLn("<FRAME NAME='FPROP' SRC='" + getImages("imageNull") + "' MARGINHEIGHT=0 MARGINWIDTH=0 NORESIZE>");
ResponseWriteLn("</FRAMESET>");
ResponseWriteLn("<FRAME NAME='LBORDER' SRC='" + getImages("imageNull") + "' SCROLLING=NO MARGINHEIGHT=0 MARGINWIDTH=0 NORESIZE FRAMEBORDER=NO>");
ResponseWriteLn("</FRAMESET>");
ResponseWriteLn("<FRAME NAME='BBORDER' SRC='" + getImages("imageNull") + "' SCROLLING=NO MARGINHEIGHT=0 MARGINWIDTH=0 NORESIZE FRAMEBORDER=NO>");
ResponseWriteLn("</FRAMESET>");
ResponseWriteLn("</HTML>");
}
private void fileAdmParam()
throws IOException
{
if(m_authentication && !auth())
return;
String s = new String();
String s1 = new String();
String s2 = new String();
String s3 = new String();
String s4 = new String();
String s6 = new String();
s1 = m_request.getParameter("RELATIVEPATH");
s3 = m_request.getParameter("STATE");
s = m_request.getRequestURI();
ResponseWriteLn("<HTML>");
ResponseWriteLn("<HEAD>");
ResponseWriteLn("<SCRIPT>");
ResponseWriteLn("function refreshToolbar(strMode) { ");
ResponseWriteLn(" if((parent.FPARAM.document.Info.CONTROL.value=='CUT')||(parent.FPARAM.document.Info.CONTROL.value=='COPY')){");
ResponseWriteLn(" parent.FPARAM.displayToolbar(strMode);");
ResponseWriteLn(" }");
ResponseWriteLn(" if(parent.FPARAM.document.Info.STATE.value!=strMode){");
ResponseWriteLn(" parent.FPARAM.document.Info.STATE.value = strMode;");
ResponseWriteLn(" parent.FPARAM.displayToolbar(strMode);");
ResponseWriteLn(" }");
ResponseWriteLn("}");
ResponseWriteLn("function newFile() {");
ResponseWriteLn(" parent.FTOOLBAR.document.NEW_FILE.RELATIVEPATH.value = parent.FLIST.document.SHOW_LIST.RELATIVEPATH.value;");
ResponseWriteLn(" parent.FTOOLBAR.document.NEW_FILE.submit();");
ResponseWriteLn("}");
ResponseWriteLn("function newFolder() {");
ResponseWriteLn(" parent.FTOOLBAR.document.TOOLBAR.QUERY.value = 'FILEADM_NEWFOLDER';");
ResponseWriteLn(" parent.FTOOLBAR.document.TOOLBAR.SORT.value = parent.FLIST.document.SHOW_LIST.SORT.value;");
ResponseWriteLn(" parent.FTOOLBAR.document.TOOLBAR.SORTORDER.value = parent.FLIST.document.SHOW_LIST.SORTORDER.value;");
ResponseWriteLn(" parent.FTOOLBAR.document.TOOLBAR.submit();");
ResponseWriteLn("}");
ResponseWriteLn("function saveFile()");
ResponseWriteLn("{");
ResponseWriteLn(" if (parent.FPROP.CheckInput()) {");
ResponseWriteLn(" parent.FPROP.ShowWaitPost();");
ResponseWriteLn(" parent.FPROP.document.UPLOADFILE.PATH.value = parent.FLIST.document.SHOW_LIST.RELATIVEPATH.value;");
ResponseWriteLn(" parent.FPROP.document.UPLOADFILE.submit();");
ResponseWriteLn(" }");
ResponseWriteLn("}");
ResponseWriteLn("function saveFolder() {");
ResponseWriteLn(" if (parent.FPROP.checkValues()) {");
ResponseWriteLn(" parent.FPROP.document.FOLDER_FORM.submit();");
ResponseWriteLn(" }");
ResponseWriteLn("}");
ResponseWriteLn("function Cut() {");
ResponseWriteLn(" parent.FPARAM.document.PASTE.CONTROL.value = 'CUT';");
ResponseWriteLn(" parent.FPARAM.document.PASTE.RELATIVEPATH.value = parent.FLIST.document.SHOW_LIST.RELATIVEPATH.value;");
ResponseWriteLn(" parent.FPARAM.document.PASTE.NAME.value = parent.FLIST.document.SHOW_FICHE.NAME.value;");
ResponseWriteLn(" parent.FPARAM.displayToolbar('CUT');");
ResponseWriteLn("}");
ResponseWriteLn("function Copy() {");
ResponseWriteLn(" parent.FPARAM.document.PASTE.CONTROL.value = 'COPY';");
ResponseWriteLn(" parent.FPARAM.document.PASTE.RELATIVEPATH.value = parent.FLIST.document.SHOW_LIST.RELATIVEPATH.value;");
ResponseWriteLn(" parent.FPARAM.document.PASTE.NAME.value = parent.FLIST.document.SHOW_FICHE.NAME.value;");
ResponseWriteLn(" parent.FPARAM.displayToolbar('COPY');");
ResponseWriteLn("}");
ResponseWriteLn("function Paste() {");
ResponseWriteLn(" parent.FPARAM.document.PASTE.NEWPATH.value=parent.FLIST.document.SHOW_LIST.RELATIVEPATH.value;");
ResponseWriteLn(" parent.FPARAM.document.PASTE.submit();");
ResponseWriteLn("}");
ResponseWriteLn("function Supprimer() {");
ResponseWriteLn(" if (parent.FLIST.document.SHOW_FICHE.RELATIVEPATH.value.length==0) {");
ResponseWriteLn(" alert('" + labels.getString("9001") + "');");
ResponseWriteLn(" return;");
ResponseWriteLn(" }");
ResponseWriteLn(" if (confirm('" + labels.getString("9002") + "')) {");
ResponseWriteLn(" parent.FLIST.document.SHOW_FICHE.QUERY.value = 'FILEADM_DELETE';");
ResponseWriteLn(" parent.FLIST.document.SHOW_FICHE.submit();");
ResponseWriteLn(" }");
ResponseWriteLn("}");
ResponseWriteLn("function callRename() {");
ResponseWriteLn(" parent.FLIST.document.SHOW_FICHE.QUERY.value = 'FILEADM_RENAME';");
ResponseWriteLn(" parent.FLIST.document.SHOW_FICHE.submit();");
ResponseWriteLn("}");
ResponseWriteLn("function Rename() {");
ResponseWriteLn(" if (parent.FPROP.CheckInput()) {");
ResponseWriteLn(" parent.FPROP.document.FOLDER_FORM.submit();");
ResponseWriteLn(" }");
ResponseWriteLn("}");
ResponseWriteLn("function displayToolbar(treatment) {");
ResponseWriteLn("ftarget=parent.FTOOLBAR.document;");
ResponseWriteLn("ftarget.open();");
ResponseWriteLn("ftarget.write('<html>');");
ResponseWriteLn("ftarget.write('<head>');");
ResponseWriteLn("ftarget.write('<STYLE>');");
ResponseWriteLn("ftarget.write('<!-- A:link {color : " + colors.getString("TOOLBAR_LINK_ENABLE") + "; text-decoration : none} -->');");
ResponseWriteLn("ftarget.write('<!-- A:visited {color : " + colors.getString("TOOLBAR_LINK_VISITED") + "; text-decoration : none} -->');");
ResponseWriteLn("ftarget.write('<!-- A:hover {color : " + colors.getString("TOOLBAR_LINK_HOVER") + "; text-decoration : underline} -->');");
ResponseWriteLn("ftarget.write('<!-- A:active {color : " + colors.getString("TOOLBAR_LINK_ACTIVE") + "; text-decoration : underline} -->');");
ResponseWriteLn("ftarget.write('</STYLE>');");
ResponseWriteLn("ftarget.write('</head>');");
ResponseWriteLn("document.Info.CONTROL.value=treatment;");
ResponseWriteLn("if (treatment=='') {");
ResponseWriteLn(" ft=parent.FPROP.document;");
ResponseWriteLn(" ft.open();");
ResponseWriteLn(" ft.write('<html>');");
ResponseWriteLn(" ft.write('<head>');");
ResponseWriteLn(" ft.write('</head>');");
if(!m_showProperties)
ResponseWriteLn(" ft.write('<body bgcolor=" + colors.getString("FRAME_BORDER") + " >');");
else
ResponseWriteLn(" ft.write('<body bgcolor=" + colors.getString("PROP_BG") + " >');");
ResponseWriteLn(" ft.write(' ');");
ResponseWriteLn(" ft.write('</body>');");
ResponseWriteLn(" ft.write('</html>');");
ResponseWriteLn(" ft.close();");
ResponseWriteLn("}");
if(m_readOnly)
ResponseWriteLn(" ftarget.write('<body bgcolor=" + colors.getString("FRAME_BORDER") + " vlink=" + colors.getString("COLHEADER_CAPTION_FONT") + " link=" + colors.getString("COLHEADER_CAPTION_FONT") + ">');");
else
ResponseWriteLn(" ftarget.write('<body bgcolor=" + colors.getString("TOOLBAR_BG") + " link=" + colors.getString("TOOLBAR_LINK_ENABLE") + " vlink=" + colors.getString("TOOLBAR_LINK_ENABLE") + ">');");
if(!m_readOnly)
{
ResponseWriteLn("ftarget.write('<table border=0 cellpadding=1 cellspacing=0 WIDTH=\"100%\">');");
ResponseWriteLn("ftarget.write('<tr>');");
ResponseWriteLn("ftarget.write('<td>');");
ResponseWriteLn("ftarget.write('<img src=\"" + getImages("separatorHz") + "\" WIDTH=\"100%\" HEIGHT=3 border=0></td></tr>');");
ResponseWriteLn("ftarget.write('<tr>');");
ResponseWriteLn("ftarget.write('<td valign=top>');");
ResponseWriteLn("ftarget.write('<table border=0 cellpadding=0 cellspacing=0>');");
ResponseWriteLn("ftarget.write('<tr>');");
String s5 = "65";
ResponseWriteLn("ftarget.write('<td align=center width=3 bgcolor=" + colors.getString("TOOLBAR_BG") + ">');");
ResponseWriteLn("ftarget.write('<img src=\"" + getImages("separatorShort") + "\" WIDTH=3 HEIGHT=30 border=0>');");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -