forked from maxliaops/Java_Web_Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbbs_detail.jsp
More file actions
74 lines (74 loc) · 2.71 KB
/
bbs_detail.jsp
File metadata and controls
74 lines (74 loc) · 2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<jsp:useBean id="chStr" scope="page" class="com.tools.ChStr"/>
<jsp:useBean id="conn" scope="page" class="com.tools.ConnDB"/>
<%
int ID=-1;
ID=Integer.parseInt(request.getParameter("ID"));
if(ID>0){
ResultSet rs=conn.executeQuery("select * from tb_bbs where ID="+ID);
String title="";
String content="";
String intime="";
if(rs.next()){
title=rs.getString(2);
content=rs.getString(3);
intime=rs.getString(4);
}
%>
<html>
<head>
<title>MR网络购物中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="CSS/style.css" rel="stylesheet">
</head>
<body>
<jsp:include page="navigation.jsp"/>
<jsp:include page="login_u.jsp"/>
<jsp:include page="ad.jsp"/>
<table width="788" height="236" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="193" height="182" valign="top" bgcolor="#FFFFFF">
<jsp:include page="search.jsp"/>
<jsp:include page="goodsType.jsp"/> </td>
<td valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="45" valign="top" background="images/sub_bbsDetail.gif"> </td>
</tr>
<tr>
<td height="10" valign="top"> </td>
</tr>
<tr valign="top">
<td height="134" align="center"><table width="98%" height="79" border="0" cellpadding="0" cellspacing="0" class="noborder">
<tr>
<td width="2%" height="12" align="center"> </td>
<td width="95%" height="40" class="word_orange">· <b><%=title%></b></td>
<td width="3%"> </td>
</tr>
<tr>
<td width="2%" height="12" align="center"> </td>
<td height="27"> <%=chStr.convertStr(content)%></td>
<td> </td>
</tr>
<tr>
<td width="2%" height="24" align="center"> </td>
<td height="30" valign="bottom"> 发布日期:<%=intime%></td>
<td> </td>
</tr>
<tr>
<td width="2%" height="47" align="center"> </td>
<td align="center">
<input name="Submit4" type="submit" class="btn_bg_short" onClick="history.back(-1);" value="返回"></td>
<td></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<jsp:include page="copyright.jsp"/>
</body>
</html>
<%conn.close();
}else{
out.println("<script lanage='javascript'>alert('您的操作有误');window.location.href='index.jsp';");
}%>