📄 showgood.jsp
字号:
<html>
<head>
<title>BBS</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../bbs.css">
</head>
<body bgcolor="#FFF9F0">
<%@ page language="java" import="java.sql.*" %>
<jsp:useBean id="BoardBean" scope="page" class="database.OPDB" />
<%
BoardBean.connection();
Connection conn = BoardBean.getConn();
String id = request.getParameter("id");
String boardid = request.getParameter("boardid");
String sql = "select lasttime,topic,name,face,text,linktopic,linkurl,email,photo from t_bbs where id = " + id;
ResultSet rs = BoardBean.select(conn,sql);
rs.next();
String lasttime = rs.getString("lasttime");
String topic = BoardBean.GBK(rs.getString("topic").trim());
if (topic.length() >= 60) {
topic = topic.substring(0,59) + "......";
}
String name = BoardBean.GBK(rs.getString("name"));
String face = rs.getString("face");
String text = BoardBean.GBK(rs.getString("text"));
String linktopic = BoardBean.GBK(rs.getString("linktopic"));
String linkurl = rs.getString("linkurl");
String email = rs.getString("email");
if (photoName != null) {
photoName = "/upimage/bbs/"+photoName;
}
rs.close();
%>
<font size="3"><b>第<font color="#CC0000"><%= id %></font>帖--<%= topic %></b></font>
<hr size="1">
精华区公告:<font color="0000cc"><b><%= name %></b></font> <%= lasttime %> 这样 <img src = "images/mod<%= face %>.gif">
写到: 斑竹管理: <a href="../delete.jsp?boardid=<%= boardid %>&id=<%= id %>&writename=<%= name %>">删除帖子</a>
<p>
<table width="100%" border="1" align="center" bordercolor="#FF9900" cellspacing="3" cellpadding="3">
<tr bgcolor="#ffffff">
<td bordercolor="ffffff"><p><% if (text != null) out.print(text); %></p>
<% if (photoName != null) {
out.print("<p align=center><img src="+photoName+"></p>");
}
out.print("<p>");
if (linktopic != null) {
if (linkurl != null) {
out.print("<a href='"+linkurl+"'><font color=black>"+linktopic+"</font></a>");
}
else {
out.print(topic);
}
}
out.print("<br>");
if (email != null) {
out.print("email:<a href='mailto:"+email+"'><font color=black>"+email+"</font></a>");
}
%>
</p>
</td>
</tr>
</table>
<p>
<div align=center><hr size=1>
<p align="center"> <a href="../list.jsp?boardid=<%= boardid %>" target="boardList">返
回 普 通 区</a></p>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -