zoukankan      html  css  js  c++  java
  • 2020 11 28

    图书管理系统:

    还书界面1:

    <%@ 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>
    <%
    reader Areader=(reader)session.getAttribute("Areader");
    List<book> Abook=(List<book>)session.getAttribute("Abook");
    List<book> Mbook=(List<book>)session.getAttribute("Mbook");
    List<book> Pbook=(List<book>)session.getAttribute("Pbook");
    session.setAttribute("Abook",Abook);
    session.setAttribute("Mbook",Mbook);
    session.setAttribute("Pbook",Pbook);
    session.setAttribute("Areader",Areader);
    request.setAttribute("Areader",Areader);
    request.setAttribute("Abook",Abook);
    %>
    <form action="Saddc1.jsp" method="post" onsubmit="return chech(this)">
        <table align="center" width="450" border="1">
        <tr>
            <td align="center" colspan="5">
                <h2>浏览图书</h2>
                </td>
        </tr>
        <tr aligh="center">
            <td>图书编号</td>
            <td>图书名称</td>
        </tr>
        <%
            for(book p:Mbook){
        %>
        <tr aligh="center">
            <td><%=p.getID() %></td>
            <td><%=p.getName() %></td>
            <td><a href="huan2.jsp?ID=<%=p.getID()%>">查看详细信息</a></b></td>
            <br>
            </tr>
            <%        
            }
            %>
            <td><a href="user.jsp">注销</a></td>
            <td><a href="loginS.jsp">返回上一级</a></td>
        </table>
        </form>
    </body>
    </html>

    还书界面 2:

    <%@ 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>
    <%
    reader Areader=(reader)session.getAttribute("Areader");
    String ID = request.getParameter("ID");
    List<book> Abook=(List<book>)session.getAttribute("Abook");
    List<book> Mbook=(List<book>)session.getAttribute("Mbook");
    session.setAttribute("Abook",Abook);
    session.setAttribute("Mbook",Mbook);
    session.setAttribute("Areader",Areader);
    session.setAttribute("ID",ID);
    request.setAttribute("Areader",Areader);
    %>
    <form action="Lsevlet?method=huan" method="post" onsubmit="return chech(this)">
        <table align="center" width="450" border="1">
        <tr>
            <td align="center" colspan="5">
                <h2>浏览图书</h2>
                </td>
        </tr>
        <tr aligh="center">
            <td>图书编号</td>
            <td>图书名称</td>
            <td>作者</td>
            <td>出版社</td>
            <td>可借阅人数</td>
        </tr>
        <%
            for(book p:Abook){
                if(p.getID().equals(ID))
                {
        %>
        <tr aligh="center">
            <td><%=p.getID() %></td>
            <td><%=p.getName() %></td>
            <td><%=p.getWritter() %></td>
            <td><%=p.getHome() %></td>
            <td><%=p.getNum() %></td>
            <td align="center" colspan="2">
                <input type="submit" value="还书">
            </td>
            </tr>
            <%        }
            }
            %>
            <td><a href="user.jsp">注销</a></td>
            <td><a href="loginS.jsp">返回上一级</a></td>
        </table>
        </form>
    </body>
    </html>
  • 相关阅读:
    事务传播机制,搞懂。
    洛谷 P1553 数字反转(升级版) 题解
    洛谷 P1200 [USACO1.1]你的飞碟在这儿Your Ride Is Here 题解
    洛谷 P1055 ISBN号码 题解
    洛谷 P2141 珠心算测验 题解
    洛谷 P1047 校门外的树 题解
    洛谷 P1980 计数问题 题解
    洛谷 P1008 三连击 题解
    HDU 1013 题解
    HDU 1012 题解
  • 原文地址:https://www.cnblogs.com/fuxw4971/p/14212400.html
Copyright © 2011-2022 走看看