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

📄 showcontent.jsp

📁 一个用jsp+servlet编写的小论坛。直接编译就可以生成可部署的项目。
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<title>查看帖子信息</title>
</head>
<body onLoad="clockon(bgclock);">
<jsp:include page="top.jsp" flush="true"/>
<jsp:include page="top1.jsp" flush="true"/>
<jsp:include page="top2.jsp" flush="true"/>
<jsp:include page="top3.jsp" flush="true"/>
<jsp:useBean id="connection" scope="request" class="com.JDBConnection"/>
<%
String right=(String)session.getAttribute("right");
if(right==null){
right="";
}
String sqlSend="select * from tb_forumSend where id='"+request.getParameter("id")+"'";
ResultSet rsSend=connection.executeQuery(sqlSend);
String title="";
String account="MrFriend";
String content="";
String ip="";
String creatime="";
String sex="";
try{
while(rsSend.next()){
title=rsSend.getString("title");
content=rsSend.getString("content");
account=rsSend.getString("account");
ip=rsSend.getString("ip");
creatime=rsSend.getString("creatime");
String sqlUser="select * from tb_forumUser where account='"+account+"'";
ResultSet rsUser=connection.executeQuery(sqlUser);
while(rsUser.next()){
sex=rsUser.getString("sex");
}
%>
<table width="777" height="33" border="0" align="center" cellpadding="0" cellspacing="0" background="image/navigation3.jpg">
  <tr>
    <td>&nbsp;&nbsp;&nbsp;&nbsp;<font color="#FFFFFF"><img src="image/topic.gif"> 原主题:『<%=title%>』</font></td>
  </tr>
</table>

<table width="777" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#9EA5D1" >
  <tr>
    <td width="162" rowspan="2" align="center" valign="top"><br><br>
      <%=account%><br><br>
      <%if(sex.equals("男")){%><img src="image/boy.gif" alt=""><%}else{%><img src="image/girl.gif" alt=""><%}%><br><br>
	我是:<%=sex%>生<br><br>


    </td>
    <td width="609" height="30"><table width="598" border="0" align="left">
      <tr>
        <td width="174" height="20"><img src="image/time.gif" alt="">发布时间:<%=creatime%></td>
        <td align="right">
          <%if(right.equals("0")){%>
<a href="delTit.jsp?id=<%=request.getParameter("id")%>">删除主题</a>
<%}%>&nbsp;&nbsp;&nbsp;
<a href="showInformation.jsp">返回主题</a>&nbsp;&nbsp;<img src="image/reply.gif" alt="">
	      <%if(session.getAttribute("account")==null){%>
          <a href="javascript:Myopen(User,form_U)" onClick="alert('对不起!您没有注册或登录不能回复信息\n请先注册或登录!'); ">回复</a>
	      <%}else{%>
          <a href="backInformation.jsp?id=<%=request.getParameter("id")%>">回复</a>
          <%}%>		</td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td><br><%=content%><br><br></td>
  </tr>
</table>
<%}}catch(Exception e){}%>
<br>
<%
String reSign="";
String reTitle="";
String reContent="";
String reAccount="";
String recreatime="";
String reSex="";
String sqlReyle="select tb_forumBack.*,tb_forumUser.sex from tb_forumBack inner join tb_forumUser on tb_forumBack.account= tb_forumUser.account where tb_forumBack.id='"+request.getParameter("id")+"'";
ResultSet rsReyle=connection.executeQuery(sqlReyle);
try{
while(rsReyle.next()){
reSign=rsReyle.getString("sign");
reTitle=rsReyle.getString("title");
reContent=rsReyle.getString("content");
reAccount=rsReyle.getString("account");
recreatime=rsReyle.getString("creatime");
reSex=rsReyle.getString("sex");
%>



<table width="777" border="1" align="center" cellpadding="0" cellspacing="0"  bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#9EA5D1" >
  <tr >
    <td height="22" colspan="2" background="image/bg_login.gif">&nbsp;回复:<%=reTitle%></td>
  </tr>
  <tr>
    <td width="158" rowspan="2" align="center">
	<br><br>
	<%=reAccount%><br><br>
      <%if(reSex.equals("男")){%><img src="image/boy.gif" alt=""><%}else{%><img src="image/girl.gif" alt=""><%}%><br><br>
	 我是:<%=sex%>生<br><br>

	</td>
    <td width="613" height="30"><table width="588" border="0">
      <tr>
        <td width="435">&nbsp;<img src="image/time.gif" alt="">回复时间:<%=recreatime%></td>
        <td width="143" align="right">&nbsp;
	<%if(right.equals("0")){%>

		<a href="delRel.jsp?sign=<%=reSign%>&id=<%=request.getParameter("id")%>">删除回复</a>
<%}%>
		</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="87"><%=reContent%></td>
  </tr>
</table>
<%}}catch(Exception e){}%>
<jsp:include page="low.jsp" flush="true"/>
</body>
</html>

⌨️ 快捷键说明

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