JSP单页面网站文件管理器(5)

2008-02-23 07:56:02来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折


<form name="dataFormFold<%=i%>" method="post" action="<%=request.getRequestURI()%>?path=<%=strDealPath%>&fold=<%=fileArr[i].getName()%>&act=delFoldDo"><td align=center><TT><a href="javascript:if(confirm('确实要删除该文件夹,所有的内容将不能继续使用?')){window.dataFormFold<%=i%>.submit();}">删除</a></TT></td></form>
</tr>
<% }
} %>
<tr align="center">
<td bgcolor=#cccccc colspan=4><TT>[ <a href="<%=request.getRequestURI()%>?path=<%=strDealPath%>&act=createF">新建文件夹</a> ]</TT></td>
</tr>
</tbody>
</table>
<table width="90%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td><font size= 2><strong>文件列表:</strong></font></td>
</tr>
</table>
<TABLE align=center cellPadding=5 cellSpacing=0 width="90%">
<TBODY>
<TR bgColor=#cccccc>
<TD align=left><FONT size= 1><STRONG><font size="-1">名称</font></STRONG></FONT><TT>(单击编辑相应文件)</TT></TD>
<TD align=center><FONT size= 1><strong><font size="-1">大小</font></strong></FONT></TD>
<TD align=center><FONT size= 1><STRONG><font size="-1">修改时间</font></STRONG></FONT></TD>
<TD align=center><b><font size="-1">重命名</font></b></TD>
<TD align=center><b><font size="-1">删除</font></b></TD>
</TR>
<%
bgColor="#eeeeee";
if(fileArr.length!=0){
for(int i=0 ; i<fileArr.length ; i ){
//如果是文件则显示
if(fileArr[i].isFile()){
bgColor=bgColor.equals("#eeeeee") ? "" : "#eeeeee";
%>
<TR bgColor=<%=bgColor%>>
<TD align=left >&nbsp;&nbsp; <TT><FONT color=#000066 face=WingDings
size=4>3</FONT><a title="单击编辑相应文件" href="<%=request.getRequestURI()%>?path=<%=strDealPath%>&file=<%=fileArr[i].getName()%>&act=edit"><%=fileArr[i].getName()%></a></TT></TD>
<TD align=center><TT><%=fileArr[i].length()%></TT></TD>
<TD align=center><TT><%=(new Date(fileArr[i].lastModified()))%></TT></TD>
<TD align=center><TT><a href="<%=request.getRequestURI()%>?path=<%=strDealPath%>&file=<%=fileArr[i].getName()%>&act=renameFile">重命名</a></TT></TD>
<form name="dataFormFile<%=i%>" method="post" action="<%=request.getRequestURI()%>?path=<%=strDealPath%>&file=<%=fileArr[i].getName()%>&act=delFileDo"><TD align=center><TT><a href="javascript:if(confirm('确实要删除该文件,内容将不能继续使用?')){window.dataFormFile<%=i%>.submit();}">删除</a></TT></TD></form>
</TR>
<% }
}
}else {%>
<TR>
<TD align=left >&nbsp;&nbsp; <TT>没有文件</TT></TD>
<TD align=right>&nbsp;</TD>
<TD align=right>&nbsp;</TD>
<TD align=center>&nbsp;</TD>
<TD align=center>&nbsp;</TD>
</TR>
<%}%>
<TR align="center">
<TD bgColor=#cccccc colSpan=5><TT>[ <a href="<%=request.getRequestURI()%>?path=<%=strDealPath%>&act=uploadFile">上传文件</a> ]</TT></TD>
</TR>
</TBODY>
</TABLE>
<%
//正常显示状态结束
}else if(strStat.equals("edit")){
//文件编辑状态
BufferedReader bufReadIn=new BufferedReader(new FileReader(UnicodeToChinese(request.getParameter("path")) UnicodeToChinese(request.getParameter("file"))));
String strContext="";
String strReadLine="";
%>
<table width="90%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td><font size= 2><strong>编辑文件:</strong></font></td>
</tr>
</table>
<table align=center cellpadding=5 cellspacing=0 width="90%">
<form name=dataForm action="<%=request.getRequestURI()%>?path=<%=UnicodeToChinese(request.getParameter("path"))%>&file=<%=UnicodeToChinese(request.getParameter("file"))%>&act=editDo" method="post">
<tbody>
<tr bgcolor=#cccccc>
<td align=left><font size= 1><strong><font size="-1">文件名称</font></strong></font><tt><font color=#000066 face=WingDings size=4>3</font><%=(UnicodeToChinese(request.getParameter("path")) UnicodeToChinese(request.getParameter("file")))%></tt></td>

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:动态网页学习:JSP学习笔记全记录

下一篇:Java Servlet和数据库连接池的同时部署