📄 admin_returnbook_post.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%"> </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 %> </td>
<td align="left"><%=bookname %> </td>
<td align="left"><%=bookid %> </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"> </td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -