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

📄 detiles.jsp

📁 仿校内网站
💻 JSP
字号:
<%@page contentType="text/html"%>
<%@page pageEncoding="utf-8"%>
<%@ page import="java.sql.*" %>
<%--
The taglib directive below imports the JSTL library. If you uncomment it,
you must also add the JSTL library to the project. The Add Library... action
on Libraries node in Projects view can be used to add the JSTL 1.1 library.
--%>
<%--
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
--%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<jsp:useBean id="db" class="ArticleSharing.DBTools" scope="session"/>
<html>
    <head>
        <style>a{TEXT-DECORATION:none}</style>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title></title>
    <style type="text/css">
<!--
body {
	background-image: url(photoes/bg.gif);
}
.STYLE1 {font-size: 36px}
-->
    </style></head>
    <body>
        <div style="background-color: #ffffff;height:auto;width:850px;margin-left:65px;margin-right:auto;" id="container">
	<p>
	  <%
	String id = request.getParameter("id");
	ResultSet rs = db.excuteQuery("select post_title, poster_name, post_date, post_content from posts where post_id='" + id + "'");
	String content = null;
	String author = null;
	Date date = null;
	String title = null;
	if (rs.next()) {
		title = rs.getString("post_title");
		author = rs.getString("poster_name");
		date = rs.getDate("post_date");
		content = rs.getString("post_content");
		
	%>
    </p>
	<div id="head" align="center">
        <div style="float:left;background-color: #000000;height:100px;">
            <td><img src="photoes/logo.gif"></td>
        </div>
        <div style="float:right;height:100px;width:595px;background-color: #000000;">
            <div style="margin-top:20px;margin-right:20px;font-size:30px;font-family: fantasy;color: #ffffff;">ALL--ST@R&nbsp;&nbsp;&nbsp; . FOURM</div>
        </div>
        
    </div>
    <div id="a"><hr width="850px;"></div>
    <div>
      <div style="margin-left:20px;float:left;"><a href="articlelist.jsp"><img border="0" src="tubiao6.jpg" width="52" height="52"></a>&nbsp;</div>
      <div><a href="newArticle.jsp"><img border="0" src="tubiao2.jpg" width="52" height="52"></a>&nbsp;</div>
  </div>
  <hr>
  <div style="margin-left:20px;">
	<div>
            <div><h2><%=title%></h2></div>
            <div><div style="width:200px;float:left;">作者:<%=author%></div><div>发表日期:<%=date%></div></div>
            <div style="margin-right:20px;margin-top:20px;margin-bottom:30px; border-top-style: dotted;
  border-bottom-style: dotted;
  border-left-style: dotted;
  border-right-style: dotted;
  border-top-width: 2px;
  border-bottom-width: 2px;
  border-left-width: 2px;
  border-right-width: 2px;
  border-top-color: #000000;
  border-bottom-color: #000000;
  border-left-color: #000000;
  border-right-color: #000000;">
      <div style="margin-top:10px;margin-bottom:40px;margin-left:10px;">
      <%=content%>
  </div>
      </div>
        
	  <%
	  }
	  %>
      </div>
</div>
<div><hr></div>
<div style="width:850px; margin-top:20px;">
    <form name="form1" method="post" action="CommentServlet">
	<input type="hidden" name="command" value="insert"/>
	<input type="hidden" name="article_id" value="<%=request.getParameter("id")%>"/>
      <div>
          <div>
          <div style="width:100px;bgcolor:#99FF66;float:left;text-align:right;">评论者:</div>
          <div style="width:400px;bgcolor:#99FF66;"><label>
              <%
              String comment_author = (String)session.getAttribute("user_name");
              if (comment_author == null || comment_author == "") {
                  comment_author = "匿名网友";
              }    
              %>
            <input name="comment_author" type="text" id="comment_author" value="<%=comment_author%>">
</label></div></div>
            <div>
                <div style="width:100px;float:left;bgcolor:#99FF66;text-align:right;">评论内容:</div><div style="width:300px;"><textarea name="comment" cols="60" rows="10" id="comment"></textarea></div>
            </div>
    
            <div style="margin-left:30px; margin-top:10px;">
            <input type="submit" name="Submit" value="提交">
            <input type="reset" name="Reset" value="重置">
        </div>
  
       
    </div>
    </form>
</div> 
    
</div>
<div id="footer" style="height:65px;width:850px;margin-left:65px; text-align:center;background-image: url(photoes/footer.gif);">
                <div style="margin-top:20px;">
                    版权所有:钱宣统&nbsp;&nbsp;&nbsp;邮箱&nbsp;&nbsp;<a href="#">qxt@126.com</a>
                </div>
            </div>
    </body>
</html>

⌨️ 快捷键说明

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