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

📄 forumrecontent.jsp

📁 实现简单论坛的功能
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312" %>
<% String Loginmessage = (String) session.getValue("login");
   if(Loginmessage==null){
%>
<script language=javascript>
    window.location="refuse.jsp"
</script>
<% }     
%>
<html>
<head>
<title>显示讨论内容并回复</title>
</head>
<body bgcolor="Teal">
<%@ include file="top.htm" %>
<center>
<%@ page language="java" import="java.sql.*" %>
<jsp:useBean id="workM" scope="page" class="sql.forum" />
<%
int serial=Integer.parseInt(request.getParameter("serial"));

ResultSet RS = workM.executeQuery("SELECT * from article where serial_no=" + serial);
String speaker;
String title;
String content;
Date providedate;
out.print("<table width='80%' border='2' style='color:white' >");
out.print("<tr><td>");
if (RS.next()) {
  out.print("<tr><td>");
  speaker = RS.getString("speaker");
  providedate=RS.getDate("provide_time");
  out.print(speaker + "于" + providedate  + "发表文章内容如下:");
  out.print("<br><br>");
  title=RS.getString("title");
  out.print("主题: " + title);
  out.print("<br><br>内容如下:<br><hr>");
  content=RS.getString("content");
  //content=utilBean.addBr(content);
  //content=utilBean.RemoveComment(content);
  out.print(content);
}
out.print("</p><hr></td></tr></table>");
RS.close();

//增加点击数量
 String strSQL="update article set click_num=click_num+1  where serial_no=" + serial ; 
 workM.executeUpdate(strSQL);
%>

<p align="center"><a href="javascript:history.back()">返回</a>
<a href="login/show.html">登录</a>
<a href="login/reg1.html">注册</a>
</p>

</center>
<%@ include file="bottom.htm" %>
</body>
</html>

⌨️ 快捷键说明

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