11.27
图书信息管理系统
今天发一下所有读者功能的界面代码,这个就比之前的有些多。
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="dao.SchoolDaoImpl" %> <%@page import= "java.util.*" %> <%@page import="entity.*" %> <!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=UTF-8"> <title>Insert title here</title> </head> <body> <div id="selectshow" align="center"><!--显示试题--> <% List<School> list=(List<School>)request.getAttribute("list"); if(list==null||list.size()<1){ response.setHeader("refresh", "5;URL=student.jsp"); %> <font color="red" size="5"> 查询信息时出现错误,未能读出课程的信息<br> 五秒后将跳转到主页面 <br> 如果没有跳转,请点击 <a href="student.jsp">这里</a>!!! <br> </font> <% } else{%> <table border="0" cellspacing="10" cellpadding="0"> <tr> <td align="center" colspan="5"> <h1>当前图书信息</h1> </td> </tr> <tr align="center"> <td><b>图书编号</b></td> <td><b>图书名称</b></td> <td><b>图书作者</b></td> <td><b>出版社名称</b></td> <td><b>图书当前借阅数量</b></td> <td><b>图书可借阅总数量</b></td> </tr> <% for(School school:list){ %> <tr align="center"> <td><%=school.getBookID()%></td> <td><%=school.getBookname()%></td> <td><%=school.getAuthor()%></td> <td><%=school.getBanname() %></td> <td><%=school.getBooknow()%></td> <td><%=school.getBooknum()%></td> </tr> <%} %> <%} %> <tr align="center"> <ul> <li><a href="student.jsp">回到主页 </a></li> </ul> </tr> </table> </div> </body> </html>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="dao.SchoolDaoImpl" %> <%@page import= "java.util.*" %> <%@page import="entity.*" %> <!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=UTF-8"> <title>Insert title here</title> </head> <body> <div id="selectshow" align="center"><!--显示试题--> <form action="Stuservlet?method=jieyue" method="post" > <% List<School> list=(List<School>)request.getAttribute("list"); if(list==null||list.size()<1){ response.setHeader("refresh", "5;URL=select1.jsp"); %> <font color="red" size="5"> 查询信息时出现错误,未能读出课程的信息<br> 五秒后将跳转到主页面 <br> 如果没有跳转,请点击 <a href="select1.jsp">这里</a>!!! <br> </font> <% } else{%> <table border="0" cellspacing="10" cellpadding="0"> <tr> <td align="center" colspan="5"> <h1>当前课程信息</h1> </td> </tr> <tr align="center"> <td><b>图书编号</b></td> <td><b>图书名称</b></td> <td><b>图书作者</b></td> <td><b>出版社名称</b></td> <td><b>图书当前借阅数量</b></td> <td><b>图书可借阅总数量</b></td> </tr> <% for(School school:list){ %> <tr align="center"> <td><%=school.getBookID()%></td> <% String bookID=school.getBookID(); session.setAttribute("bookID", bookID); request.setAttribute("bookID",bookID );%> <td><%=school.getBookname()%></td> <% String bookname=school.getBookname(); session.setAttribute("bookname", bookname); request.setAttribute("bookname",bookname);%> <td><%=school.getAuthor()%></td> <% String author=school.getAuthor(); session.setAttribute("author", author); request.setAttribute("author",author );%> <td><%=school.getBanname() %></td> <% String banname=school.getBanname(); session.setAttribute("banname", banname); request.setAttribute("banname",banname );%> <td><%=school.getBooknow()%></td> <% int booknow=school.getBooknow(); session.setAttribute("booknow", booknow); request.setAttribute("booknow",booknow );%> <td><%=school.getBooknum()%></td> <% String booknum=school.getBooknum(); session.setAttribute("booknum", booknum); request.setAttribute("booknum",booknum);%> </tr> <%} %> <tr> <td colspan="2"><div align="center"> <input type="submit" value="借阅图书"> </tr> <%} %> <tr align="center"> <ul> <li><a href="select1.jsp">回到查询页面 </a></li> </ul> </tr> </from> </table> </div> </body> </html>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="dao.SchoolDaoImpl" %> <%@page import= "java.util.*" %> <%@page import="entity.*" %> <!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=UTF-8"> <title>Insert title here</title> </head> <body> <div id="selectshow" align="center"><!--显示试题--> <% List<School> list=(List<School>)request.getAttribute("list"); if(list==null||list.size()<1){ response.setHeader("refresh", "5;URL=student.jsp"); %> <font color="red" size="5"> 查询信息时出现错误,未能读出课程的信息<br> 五秒后将跳转到主页面 <br> 如果没有跳转,请点击 <a href="student.jsp">这里</a>!!! <br> </font> <% } else{%> <table border="0" cellspacing="10" cellpadding="0"> <tr> <td align="center" colspan="5"> <h1>请点击图书ID进行归还操作</h1> </td> </tr> <tr align="center"> <td><b>图书编号</b></td> <td><b>图书名称</b></td> <td><b>图书作者</b></td> <td><b>出版社名称</b></td> </tr> <% for(School school:list){ %> <tr align="center"> <td><a href="Stuservlet?method=guihuan&bookID=<%=school.getBookID()%>"><%=school.getBookID()%></td> <td><%=school.getBookname()%></td> <td><%=school.getAuthor()%></td> <td><%=school.getBanname() %></td> </tr> <%} %> <%} %> <tr align="center"> <ul> <li><a href="student.jsp">回到主页面 </a></li> </ul> </tr> </table> </div> </body> </html>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="dao.SchoolDaoImpl" %> <%@page import= "java.util.*" %> <%@page import="entity.*" %> <!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=UTF-8"> <title>Insert title here</title> </head> <body> <div id="selectshow" align="center"><!--显示试题--> <% List<School> list=(List<School>)request.getAttribute("list"); if(list==null||list.size()<1){ response.setHeader("refresh", "5;URL=student.jsp"); %> <font color="red" size="5"> 没有催还图书<br> 五秒后将跳转到主页面 <br> 如果没有跳转,请点击 <a href="student.jsp">这里</a>!!! <br> </font> <% } else{%> <table border="0" cellspacing="10" cellpadding="0"> <tr> <td align="center" colspan="5"> <h1>催还图书信息</h1> </td> </tr> <tr align="center"> <td><b>图书编号</b></td> <td><b>图书名称</b></td> <td><b>图书作者</b></td> <td><b>出版社名称</b></td> </tr> <% for(School school:list){ %> <tr align="center"> <td><%=school.getBookID()%></td> <td><%=school.getBookname()%></td> <td><%=school.getAuthor()%></td> <td><%=school.getBanname() %></td> </tr> <%} %> <%} %> <tr align="center"> <ul> <li><a href="student.jsp">回到主页 </a></li> </ul> </tr> </table> </div> </body> </html>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!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=UTF-8"> <title>Insert title here</title> </head> <body> <div id="addSubjectForm" align="center"> <form action="Stuservlet?method=selectbook" method="post"> <tr> <td>请选择您要查询的方式: <select name="fangshi"> <option value="1">按照书名</option> <option value="2">按照作者名</option> </select> </td> <td>请输入: <input type="text" name="xinxi"> </td> <tr> <td colspan="2"><div align="center"> <input type="submit" value="查询信息"> </div> </td> </tr> <li><a href="student.jsp">回到主页面 </a></li> </ul> </tr> </form> </div> </body> </html>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!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=UTF-8"> <title>Insert title here</title> </head> <body> <div id="addSubjectForm" align="center"> <form action="Stuservlet?method=showselectbook" method="post"> <tr> <td>请选择查询方式:</td> <td> <input type="radio" name="fangshi" value="1">按书名查询 <input type="radio" name="fangshi" value="3">按作者名查询 </td> </tr> <tr> <td>请输入: <input type="text" name="xinxi"> </td> </tr> <tr> <td colspan="2"><div align="center"> <input type="submit" value="查询信息"> </div> </td> </tr> <li><a href="student.jsp">回到主页面 </a></li> </tr> </form> </div> </body> </html>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="dao.SchoolDaoImpl" %> <%@page import= "java.util.*" %> <%@page import="entity.*" %> <!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=UTF-8"> <title>Insert title here</title> </head> <body> <div id="selectshow" align="center"><!--显示试题--> <% List<School> list=(List<School>)request.getAttribute("list"); if(list==null||list.size()<1){ response.setHeader("refresh", "5;URL=select.jsp"); %> <font color="red" size="5"> 查询信息时出现错误,未能读出课程的信息<br> 五秒后将跳转到查询页面 <br> 如果没有跳转,请点击 <a href="select.jsp">这里</a>!!! <br> </font> <% } else{%> <table border="0" cellspacing="10" cellpadding="0"> <tr> <td align="center" colspan="5"> <h1>当前课程信息</h1> </td> </tr> <tr align="center"> <td><b>图书编号</b></td> <td><b>图书名称</b></td> <td><b>图书作者</b></td> <td><b>出版社名称</b></td> <td><b>图书可借阅数量</b></td> </tr> <% for(School school:list){ %> <tr align="center"> <td><%=school.getBookID()%></td> <td><%=school.getBookname()%></td> <td><%=school.getAuthor()%></td> <td><%=school.getBanname() %></td> <td><%=school.getBooknum()%></td> </tr> <%} %> <%} %> <tr align="center"> <ul> <li><a href="select.jsp">回到查询页面 </a></li> </ul> </tr> </table> </div> </body> </html>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!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=UTF-8"> <title>Insert title here</title> </head> <body> <% String time=(String) request.getSession().getAttribute("time"); %> <tr> <h2>归还时间为:<%=time %></h2> </tr> <ul> <li><a href="select1.jsp">回到借书页面 </a></li> </ul> </body> </html>