图书管理系统;
登录界面:
<%@ page language="java" contentType="text/ html; charset=UTF-8" pageEncoding="UTF-8" import = "java.util.*"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> </head> <body> <form action="Lsevlet?method=login" method="post" onsubmit="return chech(this)"> <td align="center" colspan="2"> <h2>图书馆借书管理系统</h2> <hr> </td> <tr> <td align="right">用户:</td> <td> <input type="radio" name="user" value="管理员" checked="checked">管理员 <input type="radio" name="user" value="读者">读者 </td> </tr> <br> <tr> <td align="right">工号/学号:</td> <td><input type="text" name="num"/></td> </tr> <br> <tr> <td align="right">密码:</td> <td><input type="text" name="password"/></td> </tr> </tr> <br> <tr> <td align="center" colspan="2"> <input type="submit" value="登录"> </td> </tr> <td><a href="user.jsp">注销</a></td> <td><a href="loginR.jsp">返回上一级</a></td> </form> </body> </html>
登录界面:管理员
<%@ page language="java" contentType="text/ html; charset=UTF-8" pageEncoding="UTF-8" import = "java.util.*"%> <%@page import="bean.book"%> <!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Insert title here</title> </head> <body> <pre> <% List<book> Pastbook=(List<book>)request.getAttribute("Pastbook"); session.setAttribute("Pastbook",Pastbook); %> <table align="center" width="450"> <tr> <h2>石家庄铁道大学选课管理系统(管理员)</h2> <hr> <tr align="center"><a href="addR.jsp"><h3>添加读者信息</h3></a></tr> <br> <tr align="center"><a href="addB.jsp"><h3>添加图书信息</h3></a></tr> <br> <tr align="center"><a href="list.jsp"><h3>打印催还数目</h3></a></tr> <br> <tr align="center"><a href="user.jsp">注销</a></tr> <br> </table> </pre> </body> </html>
登录界面:读者
<%@ page language="java" contentType="text/ html; charset=UTF-8" pageEncoding="UTF-8" import = "java.util.*"%> <%@page import="bean.reader"%> <%@page import="bean.book"%> <!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Insert title here</title> </head> <body> <table align="center" width="450"> <% reader Areader=(reader)request.getAttribute("Areader"); List<book> Abook=(List<book>)request.getAttribute("Abook"); List<book> Pbook=(List<book>)request.getAttribute("Pbook"); List<book> Mbook=(List<book>)request.getAttribute("Mbook"); if(Abook==null) { Abook=(List<book>)session.getAttribute("Abook"); } if(Pbook==null) { Pbook=(List<book>)session.getAttribute("Pbook"); } session.setAttribute("Abook",Abook); session.setAttribute("Mbook",Mbook); session.setAttribute("Pbook",Pbook); request.setAttribute("Areader",Areader); session.setAttribute("Areader",Areader); %> <tr> <h2>石家庄铁道大学选课管理系统(学生)</h2> <hr> <tr align="center"><a href="look.jsp"><h3>浏览图书</h3></a></tr> <br> <tr align="center"><a href="seach.jsp"><h3>查询图书</h3></a></tr> <br> <tr align="center"><a href="borrow.jsp"><h3>借阅图书</h3></a></tr> <br> <tr align="center"><a href="lookpast.jsp"><h3>浏览催还图书</h3></a></tr> <br> <tr align="center"><a href="huan.jsp"><h3>归还图书</h3></a></tr> <br> <tr align="center"><a href="user.jsp">注销</a></tr> <br> </table> </body> </html>