📄 topiclist.jsp
字号:
<%@page contentType="text/html; charset=GBK"%>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<html:html>
<head>
<title>论坛</title>
<script language="JavaScript" type="text/javascript" >
function doDifferent(obj)
{
document.forumForm.event.value= obj;
forumForm.type.value='topic';
document.forumForm.submit();
}
</script></head>
<body bgcolor="#ffffff">
<%
String username = (String) request.getSession().getAttribute("username");
if (username == null)
username = "";
%>
<html:form action="forumAction.do" method="post">
<html:hidden name="forumForm" property="event"/>
<html:hidden name="forumForm" property="type"/>
<div>
<a href="forumAction.do?event=add&type=reply&id=<bean:write name="forumForm" property="topicVO.topicId"/>">
<b>回复</b>
</a>
<a href="forumAction.do?">
<b>返回</b>
</a>
</div>
<table width="100%" border="0" align="center">
<tr>
<td bgcolor="#EEEEEE">
<div align="center">
<table border="0" align="left">
<tr>
<td bgcolor="blue" width="100"><font color="ffffff">主题:</font></td>
<td>
<bean:write property="topicVO.title" name="forumForm"/>
</td>
</tr>
<tr>
<td bgcolor="blue"><font color="ffffff">作者:</font></td>
<td>
<bean:write property="topicVO.username" name="forumForm"/>
</td>
</tr>
<tr>
<td bgcolor="blue"><font color="ffffff">发表时间:</font></td>
<td>
<bean:write property="topicVO.pubDate" name="forumForm"/>
</td>
</tr>
<tr align="left">
<td bgcolor="blue"><font color="ffffff">内容:</font></td>
<td>
<bean:write property="topicVO.content" name="forumForm"/>
</td>
</tr>
<tr>
<td colspan=2>
<div align="center">
<logic:equal name="forumForm" property="topicVO.username" value="<%=username%>">
<a href="forumAction.do?event=edit&type=topic&id=<bean:write name="forumForm" property="topicVO.topicId" />">修改</a>
<a href="forumAction.do?event=delete&type=topic&id=<bean:write name="forumForm" property="topicVO.topicId" />">删除</a>
</logic:equal>
</div>
</td>
</tr>
<tr><td align="center" bgcolor="black" colspan="2"></td></tr>
<logic:iterate id="item" name="forumForm" property="replyList">
<tr>
<td bgcolor="blue"><font color="ffffff">主题:</font></td>
<td>
<bean:write property="title" name="item"/>
</td>
</tr>
<tr>
<td bgcolor="blue"><font color="ffffff">作者:</font></td>
<td>
<bean:write property="username" name="item"/>
</td>
</tr>
<tr>
<td bgcolor="blue"><font color="ffffff">发表时间:</font></td>
<td>
<bean:write property="pubDate" name="item"/>
</td>
</tr>
<tr align="left">
<td bgcolor="blue"><font color="ffffff">内容:</font></td>
<td>
<bean:write property="content" name="item"/>
</td>
</tr>
<tr>
<td colspan=2>
<div align="center">
<logic:equal name="item" property="username" value="<%=username%>">
<a href="forumAction.do?event=edit&type=reply&id=<bean:write name="item" property="topicId" />">修改</a>
<a href="forumAction.do?event=delete&type=reply&id=<bean:write name="item" property="topicId" />">删除</a>
</logic:equal>
</div>
</td>
</tr>
<tr><td align="center" bgcolor="black" colspan="2"></td></tr>
</logic:iterate>
</table>
</div>
</td>
</tr>
</table>
</html:form>
</body>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -