📄 displayfile.jsp
字号:
<%@ page contentType="text/html;charset=GBK"%>
<%@ page import="java.sql.*"%>
<%@ page import="to.model.*"%>
<%@ page import="java.util.*"%>
<%@ page import="to.model.Login.*"%>
<%@ page import="to.model.File.*"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>文件中心浏览</title>
<style type="text/css">
table{font-size:13px}
<!--
a:link { text-decoration: none;color: black}
a:active { text-decoration:blink;}
a:hover {text-decoration: underline;position: relative; top: 3px; left: 3px; color: red}
a:visited { text-decoration:none;color: black}
-->
</style>
</head>
<body>
<form>
<table cellspacing="1" cellpadding="1" border="0" width="500" align="center">
<%
loginItem li=(loginItem)session.getAttribute("user");
if(li==null)
{
response.sendRedirect("OfficeLogin.jsp");
}
%>
<tr>
<td colspan="4" height="1"><hr/></td>
</tr>
<tr>
<th colspan="4" align="center">已有文件列表</th>
</tr>
<tr bgcolor="#006699">
<th width="125" align="center"><font color="White">文件名称</font></th>
<th width="125" align="center"><font color="White">文件扩展名</font></th>
<th width="125" align="center"><font color="White">文件长度</font></th>
<th width="125" align="center"><font color="White">下载</font></th>
</tr>
<%
try
{
request.setCharacterEncoding("gb2312");
//response.setContentType("gb2312");
FileBean fb=new FileBean();
Collection cl=(Collection)fb.getFile();
Iterator it=cl.iterator();
while(it.hasNext())
{
fileItem fi=(fileItem)it.next();
%>
<tr bgcolor="#ddddee">
<td width="125" align="center"><%=fi.getWName()%></td>
<td width="125" align="center"><%=fi.getWExt()%></td>
<td width="125" align="center"><%=fi.getWSize()%></td>
<td width="125" align="center"><img src="image/arr.gif"/><a href="down.jsp?filepath=<%=fi.getWAddr()%>">下载</a></td>
</tr>
<%
}
}
catch(Exception e)
{
e.printStackTrace();
}
%>
<tr>
<td colspan="5" height="1"><hr/></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -