⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 listmessages.jsp

📁 An open-source WWW discussion Forum based on JSP/Servlets which uses JDBC to store and retrieve mess
💻 JSP
字号:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<%@page import = "commZone.beans.*"%>
<%@page import = "commZone.bd.*"%>
<body bgcolor="#FFFFFF">
<p>-- F&oacute;runs Communication Zone -- </p>
<p><%
  CzTopic topic = (CzTopic)request.getAttribute("topic");
  CzMessage[] msgs = topic.getMessages();

  if(topic != null) {%> </p>
<p>F&oacute;rum: <a href=cz.htm?acao=read&forum=<%=topic.getForum().getCodigo()%>><%=topic.getForum().getNome()%></a></p>
<p> -- T&oacute;pico: <%=topic.getNome()%></p>
<p>Listagem de mensagens do T&oacute;pico</p>
<%
  }

  if(msgs != null) {
%>
<table width="80%" border="1" cellpadding="0">
<% for(int i = 0; i < msgs.length; i++) { %>
  <tr bgcolor="#999999"> 
    <td><font color="#FFFFFF"><b><a href=cz.htm?acao=read&forum=<%=topic.getForum().getCodigo()%>&topic=<%=topic.getCodigo()%>&message=<%=msgs[i].getCodigo()%> ><%=msgs[i].getTitulo()%></a></b></font></td>
    <td><font color="#FFFFFF">Enviada por <a href=mailto:<%=msgs[i].getEmissor().getEmail()%> target="_blank"><%=msgs[i].getEmissor().getNome()%></a>
      em <%=msgs[i].getDataFormatada()%></font></td>
    <td><font color="#FFFFFF"><% if(msgs[i].getInReplyTo().getCodigo() != -1) { %> 
      Em resposta a <a href=cz.htm?acao=read&forum=<%=topic.getForum()%>&topic=<%=msgs[i].getInReplyTo().getTopico()%>&message=<%=msgs[i].getInReplyTo().getCodigo()%> ><%=msgs[i].getInReplyTo().getTitulo()%> <% } %></a></font></td>
  </tr>
  <tr> 
    <td colspan="3"><%=msgs[i].getMensagemFormatada()%>
      <p>&nbsp;</p>
      <p><a href="cz.htm?acao=create&forum=<%=topic.getForum().getCodigo()%>&topic=<%=topic.getCodigo()%>&message=new&replyof=<%=msgs[i].getCodigo()%>">responder</a> 
        editar <a href="cz.htm?acao=delete&amp;forum=<%=topic.getForum().getCodigo()%>&amp;topic=<%=topic.getCodigo()%>&amp;message=<%=msgs[i].getCodigo()%>">apagar</a></p>
    </td>
  </tr>
<% } %>
</table>
<p>&nbsp;</p>
<p><%
  } else

	out.print("NENHUMA MENSAGEM");
%> <a href="cz.htm?acao=create&forum=<%=topic.getForum().getCodigo()%>&topic=<%=topic.getCodigo()%>&message=new">escrever 
  nova mensagem neste T&oacute;pico</a></p>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -