checkuserlendinfo.jsp

来自「JSP实现图书管理系统简单功能的具体设计与实现」· JSP 代码 · 共 74 行

JSP
74
字号
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@include file="sql2005_book.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.STYLE1 {
	font-size: xx-large;
	color: #99CC99;
	font-weight: bold;
	font-family: "方正胖头鱼简体";
}
body {
	background-color: #FFFFCC;
}
-->
</style>
</head>

<body>
<%
request.setCharacterEncoding("gb2312");
String name = (String)session.getValue("Uname");
if(name == null){
%>
<jsp:forward page = "mainframe.htm"/>
<%}
String sql = "{call UserLendInfo(?)}";
cstmt=conn.prepareCall(sql);
cstmt.setString(1,name);
rs = cstmt.executeQuery();
%>
<div align="center"><span class="STYLE1">用户已借阅书籍信息
  </span><br />
  <br />
</div>
<table width="706" height="35" border="1" align="center">
  <tr>
    <td width="140">图书名称</td>
    <td width="104">书籍编号</td>
    <td width="145">出版社</td>
    <td width="69">作者</td>
    <td width="133">应还日期</td>
    <td width="75">续借</td>
  </tr>
  <%
  String Bookname,id,press,author,return_time;
  while(rs.next()){
  Bookname = rs.getString("Bname").trim();
  id = rs.getString("Bid");
  press = rs.getString("Pname").trim();
  author = rs.getString("Bauthor").trim();
  return_time = rs.getString("Qreturn_time").trim();
  out.println("<tr>");
  out.println("<td>"+Bookname+"</td>");
  out.println("<td>"+id+"</td>");
  out.println("<td>"+press+"</td>");
  out.println("<td>"+author+"</td>");
  out.println("<td>"+return_time+"</td>");
  out.println("<td><a href = 'continueLend.html'>续借</a></td>");
  out.println("</tr>");
  }
  rs.close();
  cstmt.close();
  conn.close();
  %>
</table>
</body>

</html>

⌨️ 快捷键说明

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