📄 topicmain.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %>
<%@page import = "java.util.*"%>
<%@page import = "model.bbs.hibernate.*"%>
<%
request.setCharacterEncoding("gb2312");
Topic topic = (Topic)session.getAttribute("topic");
List articleList = (List)session.getAttribute("articlelist");
List responseCountList = (List)session.getAttribute("responsecountlist");
List topicList = (List)session.getAttribute("topiclist");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>BBS SYSTEM</title>
<Link href="file:///F|/asp实例/BBS/Images/font.css" rel=stylesheet>
</head>
<body topmargin="0" leftmargin="0">
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="25" align="right"><div align="left">
<p> </p>
<p>当前主题:<%=topic.getName()%></p>
<p> <a href="bbs/articleinsert.jsp">我要发贴</a></p>
<p> </p>
</div></td>
</tr>
<tr>
<td><table width="86%" border="0" cellpadding="0" cellspacing="1" bgcolor="#44608A">
<tr align="center">
<td width="10%" background="image/bgcolor.jpg" bgcolor="#60BFFF"> </td>
<td width="53%" height="25" background="image/bgcolor.jpg" bgcolor="#60BFFF"><b>帖 子 主 题</b></td>
<td width="20%" background="image/bgcolor.jpg" bgcolor="#60BFFF"><b>作 者</b></td>
<td width="17%" background="image/bgcolor.jpg" bgcolor="#60BFFF"><strong>回 贴 数</strong></td>
</tr>
<%
for (int i=0; i<articleList.size(); i++) {
Article article = (Article)articleList.get(i);
String name = article.getName();
String id = String.valueOf(article.getId());
int count = ((Integer)responseCountList.get(i)).intValue();
String author = article.getEmployee().getName();
%>
<tr>
<td bgcolor="#FFFFFF"><div align="center"><img src="bbs/image/article.gif" width="40" height="39"></div></td>
<td height="25" bgcolor="#FFFFFF"><a href="articlemain.do?id=<%=id%>" target="_blank"> <%=name%></a></td>
<td align="center" bgcolor="#FFFFFF"><div align="left"><%=author%></div></td>
<td align="center" bgcolor="#FFFFFF"><%=count%></td>
</tr>
<%
}
%>
<tr bgcolor="#EFEFEF">
<td height="30" colspan="4"><div align="right">
<a href="topicmain.do?id=<%=topic.getId()%>&page=first" target="_self">
第一页
</a>
<a href="topicmain.do?id=<%=topic.getId()%>&page=next" target="_self">
下一页
</a>
<a href="topicmain.do?id=<%=topic.getId()%>&page=previous" target="_self">
上一页
</a>
<a href="topicmain.do?id=<%=topic.getId()%>&page=last" target="_self">
最后一页
</a></p></div></td>
</tr>
</table></td>
</tr>
<tr>
<td>
<table width="106" border="1">
<tr>
<td width="96">
<select name="topicId" id="topicId" onChange="location.replace(this.value)">
<option value="--请选择 主题--" selected>--请选择 主题--</option>
<%
for (int i=0; i<topicList.size(); i++) {
Topic tp = (Topic)topicList.get(i);
%>
<option value="topicmain.do?id=<%=tp.getId()%>&page=first"><%=tp.getName()%></option>
<%
}
%>
</select>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -