⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 smartfile.java

📁 上传文件的Java类
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
                    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('&nbsp;');");
        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>');");
            ResponseWriteLn("ftarget.write('</td>');");
            ResponseWriteLn("ftarget.write('<td align=center width=" + s5 + " bgcolor=" + colors.getString("TOOLBAR_BG") + ">');");
            ResponseWriteLn("ftarget.write('<a href=\"javascript:parent.FPARAM.newFile();\">');");
            if(m_showToolbarText)
                ResponseWriteLn("ftarget.write('<img src=\"" + getImages("newFileActive") + "\" WIDTH=32 HEIGHT=18  alt=\"" + labels.getString("5009") + "\" border=0><font size=1 face=helv,helvetica><br>" + labels.getString("5000") + "</font>');");
            else
                ResponseWriteLn("ftarget.write('<img src=\"" + getImages("newFileActive") + "\" WIDTH=32 HEIGHT=32  alt=\"" + labels.getString("5009") + "\" border=0>');");
            ResponseWriteLn("ftarget.write('</a>');");
            ResponseWriteLn("ftarget.write('</td>');");
            ResponseWriteLn("ftarget.write('<td align=center width=" + s5 + " bgcolor=" + colors.getString("TOOLBAR_BG") + ">');");
            ResponseWriteLn("ftarget.write('<a href=\"javascript:parent.FPARAM.newFolder();\">');");
            if(m_showToolbarText)
                ResponseWriteLn("ftarget.write('<img src=\"" + getImages("newFolderActive") + "\" WIDTH=32 HEIGHT=18  alt=\"" + labels.getString("5010") + "\" border=0><font size=1 face=helv,helvetica><br>" + labels.getString("5001") + "</font></a>');");
            else
                ResponseWriteLn("ftarget.write('<img src=\"" + getImages("newFolderActive") + "\" WIDTH=32 HEIGHT=32  alt=\"" + labels.getString("5010") + "\" border=0></a>');");
            ResponseWriteLn("ftarget.write('</td>');");
            if(m_showToolbarText)
            {
                ResponseWriteLn("ftarget.write('<td align=center width=" + s5 + " bgcolor=" + colors.getString("TOOLBAR_BG") + ">');");
                ResponseWriteLn("if (treatment == 'SAVEFOLDER')  {");
                ResponseWriteLn("   ftarget.write('<a href=\"javascript:parent.FPARAM.saveFolder();\">');");
                ResponseWriteLn("   ftarget.write('<img src=\"" + getImages("saveFolderActive") + "\"  WIDTH=32 HEIGHT=18 alt=\"" + labels.getString("5012") + "\" border=0><font size=1 face=helv,helvetica><br>" + labels.getString("5002") + "</font>');");
                ResponseWriteLn("   ftarget.write('</a>');");
                ResponseWriteLn("}else {");
                ResponseWriteLn("   if (treatment == 'RENAME') {");
                ResponseWriteLn("       ftarget.write('<a href=\"javascript:parent.FPARAM.Rename();\">');");
                ResponseWriteLn("       ftarget.write('<img src=\"" + getImages("saveActive") + "\"  WIDTH=32 HEIGHT=18 alt=\"" + labels.getString("5013") + "\" border=0><font size=1 face=helv,helvetica><br>" + labels.getString("5002") + "</font>');");
                ResponseWriteLn("       ftarget.write('</a>');");
                ResponseWriteLn("   } else {");
                ResponseWriteLn("       if (treatment == 'SAVEFILE') {");
                ResponseWriteLn("           ftarget.write('<a href=\"javascript:parent.FPARAM.saveFile();\">');");
                ResponseWriteLn("           ftarget.write('<img src=\"" + getImages("saveFileActive") + "\"  WIDTH=32 HEIGHT=18 alt=\"" + labels.getString("5011") + "\" border=0><font size=1 face=helv,helvetica><br>" + labels.getString("5003") + "</font>');");
                ResponseWriteLn("           ftarget.write('</a>');");
                ResponseWriteLn("       }else{");
                ResponseWriteLn("           ftarget.write('<img src=\"" + getImages("saveDesactive") + "\"  WIDTH=32 HEIGHT=18 alt=\"" + labels.getString("5002") + "\" border=0><font color=" + colors.getString("TOOLBAR_LINK_DISABLE") + " size=1 face=helv,helvetica><br>" + labels.getString("5002") + "</font>');");
                ResponseWriteLn("           ftarget.write('</a>');");
                ResponseWriteLn("       }");
                ResponseWriteLn("   }");
                ResponseWriteLn("}");
                ResponseWriteLn("ftarget.write('</td>');");
            } else
            {
                ResponseWriteLn("ftarget.write('<td align=center width=" + s5 + " bgcolor=" + colors.getString("TOOLBAR_BG") + ">');");
                ResponseWriteLn("if (treatment == 'SAVEFOLDER')  {");

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -