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

📄 guestbook_show.jsp

📁 用Jsp实现的图书管理系统代码
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ include file="/ch.jsp" %>
<jsp:useBean id="showguest" class="dbconnBean.Conndb" scope="page" />
<% String sql="select * from guestbook order by id desc";
   ResultSet rs=showguest.query(sql);
   String color="#99CC99";
 %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>查看留言</title>
<style type="text/css">
<!--
.text {font-size: 10px}
.guest {font-size: 12px}
body {
	background-color: #99CCCC;
}
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
-->
</style>
</head>
<body>

<table width="72%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td><center>
<img src="../images/b3.gif" width="770" height="100">
</center>
<% while(rs.next()){
if(color.equals("#99CC99")){color="#CCFFCC";}
else{color="#99CC99";}
String name=rs.getString(2);
String content=rs.getString(3);
String time=rs.getString(4).substring(2,10);
String reply=rs.getString(5);
%>
<table width="100%" border="0" bgcolor="<%=color%>" >
  <tr>
    <td width="18%" align="left" valign="top"><span class="guest"><strong>留言者</strong>:<%= name %></span></td>
    <td width="82%" rowspan="2" align="left" valign="top" class="guest"><div align="left"><strong>留言内容</strong>:<%= content %></div></td>
  </tr>
  <tr>
    <td align="left" valign="top" class="guest"><strong>时&nbsp;&nbsp;间</strong>:<%= time %></td>
    </tr>
  <tr align="left">
    <td colspan="2" valign="left" class="guest"><div align="left"></div>
      <div align="left">
          <% if(session.getAttribute("username")==null){ %>
          <strong>管理员回复</strong>:<%= reply %>
          <% }else{ %>
          <%= reply %><a href=admin_guestbook_reply.jsp<%=rs.getString("id") %>>回复此留言</a>
          <% } %>
      </div></td>
    </tr>
</table>

<div align="right">
    <%}%> 
    <a href="guestbook_index.jsp" target="_blank">我要留言
    </a>
</div>
<center>
</center>
</td></tr></table>
<p align="center" class="style1">重庆信息学院-2006</p>
</body>
</html>

⌨️ 快捷键说明

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