📄 box.jsp
字号:
<%@ page language="java" contentType="text/html; charset=GBK" pageEncoding="GB18030" import="java.sql.*,java.util.*,java.io.*"%>
<%@ include file="config.ini"%>
<%@ include file="readlogin.jsp"%>
<html>
<head>
<%@ include file="head.jsp"%>
</head>
<body>
<center>
<table border="0" width="768" id="table1" cellspacing="0" cellpadding="0">
<tr>
<%@ include file="top.jsp"%>
</tr>
<tr>
<td width="90" valign="top">
<%@ include file="menu.jsp"%> </td>
<td width="588" valign="top">
<table border="0" width="100%" id="table3" cellspacing="0" cellpadding="0">
<tr>
<td>
<table border="1" width="100%" id="table4" bordercolorlight="#0A9EE4" cellspacing="0" cellpadding="5" bordercolordark="#0A9EE4" height=300>
<tr>
<td valign="top">
<table border="0" width="100%" id="table5" cellspacing="0" cellpadding="0">
<tr>
<td>
<table border="0" width="100%" id="table6" cellspacing="0" cellpadding="0">
<tr>
<td valign="bottom" width="50%">
<a href="box_upload.jsp" target="_top">
<img src="images/box-upload.jpg" align="left" style="border-style: solid; border-width: 0"></a></td>
<td width="50%">
<img src="images/n-box.jpg" align="right"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><hr noshade color="#0A9EE4" size="1"></td>
</tr>
<tr>
<td>
<table border="0" width="100%" id="table7" cellspacing="0" cellpadding="0">
<%
//设置转义字符
String iCanroot=dirPath.replace('\\','/');
long userBoxSize=0;
//设置储藏箱的根目录
File userBox=new File(iCanroot+"box/"+iCan);
//获得根目录下的所有文件
File userBoxfile[]=userBox.listFiles();
//循环遍历储藏箱中的文件,并将文件的信息显示在页面中
if(userBoxfile.length>0)
{
for(int i=0;i<userBoxfile.length;i++)
{
if(userBoxfile[i].isFile())
{
userBoxSize=userBoxSize+userBoxfile[i].length();
%>
<tr>
<td width="32" height="25"></td>
<td width="348" height="25">
<span style="font-size: 9pt"><%=userBoxfile[i].getName()%></span></td>
<td width="57" height="25">
<span style="font-size: 9pt">
<font color="#0A9EE4">[ </font> <a href="box_download.jsp?filename=<%=userBoxfile[i].getName()%>" target=_top>
<font color="#0A9EE4">下载</font></a><font color="#0A9EE4"> ]</font></span></td>
<td height="25"><span style="font-size: 9pt">
<font color="#0A9EE4">[ </font> <a href="box_del.jsp?action=confirm&filename=<%=userBoxfile[i].getName()%>" target=_top>
<font color="#0A9EE4">删除</font></a><font color="#0A9EE4"> ]</font></span></td>
</tr>
<%
}
}
%>
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td width="32"> </td>
<td width="348"><span style="font-size: 9pt">共计<%=userBoxfile.length%>个文件,占50MB中的<%=(int)(userBoxSize/1024/1024)%>MB</span></td>
<td width="57"> </td>
</tr>
<%
}
else
{
%>
<tr>
<td height="25" colspan="4"><span style="font-size: 9pt"> 你的储藏箱中还没有文件!</span></td>
</tr>
<%
}
%>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width="90"> </td>
</tr>
<tr>
<td width="90" valign="top">
</td>
<td width="588" valign="top">
<%@ include file="copyright.jsp"%>
</td>
<td width="90"> </td>
</tr>
</table>
<p>
</center>
</p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -