1 2 3 4

11.24

哈哈哈哈!又是一个新的系统要求,怎么说呢?咋就这么多题呢?不管咋的,都得做。所幸在课堂上就几乎全部完成了。

接下来几天就是更新这一个  图书管理系统  的代码。

图书管理系统登录界面

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>

<div id="library" align="center">
<form action="libraryservlet" method="post">               
                <tr>
                <h1>石家庄铁道大学图书管理系统 </h1>
                </tr>
<table align="center"> 
<tr>
    <td>身份:    
    <select name="profession"> 
     <option value="1">管理员</option> 
     <option value="2">读者</option>      
     </select> 
    </td>
</tr>

         <tr><td>
             用户名:<input pattern="[a-zA-Z0-9]{6,12}" name="username"></td></tr>
        
         <tr><td>
             密码:<input pattern="[a-zA-Z0-9]{6,12}" type="password" name="password"></td> </tr>
        
            <tr>
                      <td colspan="2"><div align="center">
                        <input type="submit" value="登录"></div></td> </tr>
</table>
</form>
</div>

              
</body>
</html>

管理员界面代码

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>

<div id="addSubjectForm" align="center">
                <form action="SubjectAddServlet" method="post">
                <tr>
                <h1>管理员系统</h1> 
                <ul>
                <li><a href="stuadd.jsp">添加读者信息 </a></li>
                <li><a href="bookadd.jsp">添加图书信息 </a></li>
                <li><a href="libraryaddservlet?method=bookreturnshow">打印催还书目信息 </a></li>
                <li><a href="library.jsp">退出登录 </a></li>
                </ul>
                </form>
</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>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
        String stuID=(String)request.getSession().getAttribute("ID");
            //String teacherID=(String)request.getAttribute("ID");
        session.setAttribute("stuID", stuID);
        request.setAttribute("stuID", stuID);
        System.out.println(stuID);
                      
                  %>
                      <%
                      List<School> list=(List<School>)request.getAttribute("list");
                      if(list!=null&&list.size()>=1){
                          for(School school:list){

                  %>
 
                          <%String stuname=school.getStuname(); 
                          session.setAttribute("stuname", stuname);
                        request.setAttribute("stuname",stuname );%>

                          <%String stusex=school.getStusex(); 
                          session.setAttribute("stusex", stusex);
                        request.setAttribute("stusex",stusex);%>
                        
                          <%String college=school.getCollege(); 
                          session.setAttribute("college", college);
                        request.setAttribute("college",college );%>
                                
                          
                  <%}
                          
                          
                }
                  %>
<div id="addSubjectForm" align="center">
                <form action="SubjectAddServlet" method="post">
                <tr>
                <h1>读者系统</h1> 
                <ul>
                <li><a href="Stuservlet?method=show">浏览图书信息 </a></li>
                <li><a href="select.jsp">查询图书信息 </a></li>
                <li><a href="select1.jsp">借阅图书 </a></li>
                <li><a href="Stuservlet?method=bookreturnshow">浏览催还书目</a></li>
                <li><a href="Stuservlet?method=showbook1">归还图书 </a></li>
                
                <li><a href="library.jsp">退出登录 </a></li>
                </ul>
                </form>
                </div>
</body>
</html>

这是三个主要的主页界面,接下来继续更新各个界面代码以及后台servlet和dao层的代码

posted @ 2020-11-24 22:39  小陈的太阳  阅读(66)  评论(0编辑  收藏  举报