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

📄 admin_returnbook_post.jsp

📁 用Jsp实现的图书管理系统代码
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ include file="../ch.jsp" %>
<%@ include file="checkadmin.jsp"%>
<jsp:useBean id="returnbook" class="conndb.DbConnBean" scope="request" />
<% 
String borrowid=request.getParameter("borrowid");
if(borrowid==null||borrowid.equals(""))
{
%>
<script language="javascript">history.back();</script> 
<%
}else{
String sql="select * from borrowBook where borrowID='"+borrowid+"'";
int temp=-2;
temp=returnbook.select(sql);
%>
<!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">
<!--
body,td,th {
	font-size: 13px;
}
-->
</style></head>
<body><table width="82%"  border="2" align="center" cellpadding="4" cellspacing="0" bordercolor="#CCCCFF">
  <tr bordercolor="#009900" bgcolor="#CCFFCC">
    <td width="7%" align="center"><strong>序号</strong></td>
    <td width="31%" align="center"><strong>图书名称</strong></td>
    <td width="13%" align="center"><strong>图书编号</strong></td>
    <td width="17%" align="center"><strong>借书时间</strong></td>
    <td width="18%"><strong>还书截止日期</strong></td>
    <td width="14%">&nbsp;</td>
  </tr>
<% if(temp==0){%>
<script language="javascript">alert("错误!没有此借书证用户!");history.back();</script>
<%
}else{
String sqll="select book.title,borrowBook.bookID,borrowBook.begintime,borrowBook.endtime,borrowBook.borrowID from borrowBook inner join book on book.bookid=borrowbook.bookid where borrowid='"+borrowid+"'";
Connection conn=returnbook.getConn();
Statement stmt=conn.createStatement();
ResultSet rs=stmt.executeQuery(sqll);
int id=0;
while(rs.next()){
id++;
String bookname=rs.getString(1);
String bookid=rs.getString(2);
String begintime=rs.getString(3).substring(0,10);
String returntime=rs.getString(4).substring(0,10);
String borrowids=rs.getString(5);
%>
  <tr>
    <td align="center"><%=id  %>&nbsp;</td>
    <td align="left"><%=bookname  %>&nbsp;</td>
    <td align="left"><%=bookid  %>&nbsp;</td>
    <td align="left"><%=begintime  %></td>
    <td><%=returntime  %></td>
    <td><a href="admin_returnbook_post_post.jsp?bookid=<%=bookid%>&borrowid=<%=borrowids%>">归还此书</a></td>
  </tr><%}}} %>
  <tr>
    <td colspan="6">&nbsp;</td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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