-
+
+
+
@@ -81,15 +100,48 @@
diff --git a/WebContent/admin/bookborrowlist.jsp b/WebContent/admin/bookborrowlist.jsp
new file mode 100644
index 0000000..6c35f24
--- /dev/null
+++ b/WebContent/admin/bookborrowlist.jsp
@@ -0,0 +1,83 @@
+<%@page import="javabean.Util"%>
+<%@page import="javabean.Base"%>
+<%@page import="java.sql.ResultSet"%>
+<%@page import="java.sql.PreparedStatement"%>
+<%@page import="com.mysql.jdbc.Connection"%>
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+
+
+
+
+
书籍借阅历史
+
+
+
+
+
+<%
+ String id = request.getParameter("id");
+ String name = request.getParameter("name");
+ Connection connection = null;
+ PreparedStatement pstmt = null;
+ ResultSet resultSet = null;
+ String sql = "select * from borrow_books,borrow_card where book_id=? and card_id=borrow_card.id order by borrow_books.id desc";
+ connection = (Connection)Base.getConnection();
+ pstmt = connection.prepareStatement(sql);
+ pstmt.setString(1,id);
+ resultSet = pstmt.executeQuery();
+/* while(resultSet.next()){
+ out.print(resultSet.getString("id"));
+ }*/
+%>
+
+
+
\ No newline at end of file
diff --git a/WebContent/admin/bookedit.jsp b/WebContent/admin/bookedit.jsp
index 4cd9cba..d37a8a7 100644
--- a/WebContent/admin/bookedit.jsp
+++ b/WebContent/admin/bookedit.jsp
@@ -7,7 +7,7 @@
-
bookadd
+
bookedit
@@ -15,7 +15,6 @@
@@ -31,6 +30,7 @@
resultSet = db.executeQuery(sql);
resultSet.next();
String name = resultSet.getString("name");
+ String author = resultSet.getString("author");
int library_id = resultSet.getInt("library_id");
int sort_id = resultSet.getInt("sort_id");
String position = resultSet.getString("position");
@@ -49,13 +49,25 @@
bookSortSet = db3.executeQuery( bookSortSql );
%>
+
-
+ <%
+
+ JDBCBean libraryDb = new JDBCBean();
+ JDBCBean bookSortDb = new JDBCBean();
+ ResultSet librarySet = null;
+ ResultSet bookSortSet = null;
+ // 准备sql
+ String librarySql = "select * from library";
+ String bookSortSql = "select * from book_sort";
+ // 进行查询
+ librarySet = libraryDb.executeQuery( librarySql );
+ bookSortSet = bookSortDb.executeQuery( bookSortSql );
+ // 准备json
+ JSONObject libraryJson = new JSONObject();
+ JSONObject bookSortJson = new JSONObject();
+
+ // 遍历set
+ // 获取图书馆json
+ while( librarySet.next() ){
+ libraryJson.put(librarySet.getString("id") , librarySet.getString("name"));
+ }
+ // 获取分类json
+ while( bookSortSet.next() ){
+ bookSortJson.put(bookSortSet.getString("id") , bookSortSet.getString("name"));
+ }
+ librarySet.close();
+ libraryDb.close();
+
+ %>
@@ -45,12 +80,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebContent/admin/cardadd.jsp b/WebContent/admin/cardadd.jsp
new file mode 100644
index 0000000..2d3ff0a
--- /dev/null
+++ b/WebContent/admin/cardadd.jsp
@@ -0,0 +1,117 @@
+<%@page import="javabean.Base"%>
+<%@page import="java.sql.ResultSet"%>
+<%@page import="java.sql.PreparedStatement"%>
+<%@page import="com.mysql.jdbc.Connection"%>
+<%@page import="net.sf.json.JSONObject"%>
+<%@page import="net.sf.json.JSONArray"%>
+<%@page import="javabean.Admin"%>
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+
+
+
+
+
图书证修改
+
+
+
+
+
+<%
+ Connection connection = null;
+ PreparedStatement pstmt = null;
+ ResultSet ruleSet = null;
+ String sql = "select * from rules";
+ String result = "";
+ connection = (Connection)Base.getConnection();
+ pstmt = connection.prepareStatement(sql);
+ ruleSet = pstmt.executeQuery();
+%>
+
+
+
+
+
\ No newline at end of file
diff --git a/WebContent/admin/cardborrow.jsp b/WebContent/admin/cardborrow.jsp
new file mode 100644
index 0000000..ca00f39
--- /dev/null
+++ b/WebContent/admin/cardborrow.jsp
@@ -0,0 +1,83 @@
+<%@page import="javabean.Util"%>
+<%@page import="java.sql.PreparedStatement"%>
+<%@page import="com.mysql.jdbc.Connection"%>
+<%@page import="javabean.Base"%>
+<%@page import="java.sql.ResultSet"%>
+<%@page import="javabean.JDBCBean"%>
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+
+
+
+
+
借阅证借阅记录
+
+
+
+
+
+<%
+ String id = request.getParameter("id");
+ Connection connection = (Connection)Base.getConnection();
+ String sql = "select * from borrow_books,books where card_id=? and borrow_books.book_id = books.id";
+ PreparedStatement pstmt = connection.prepareStatement(sql);
+ pstmt.setString(1, id);
+ ResultSet resultSet = null;
+ resultSet = pstmt.executeQuery();
+
+%>
+
+
+
\ No newline at end of file
diff --git a/WebContent/admin/cardedit.jsp b/WebContent/admin/cardedit.jsp
new file mode 100644
index 0000000..57c9e5c
--- /dev/null
+++ b/WebContent/admin/cardedit.jsp
@@ -0,0 +1,157 @@
+<%@page import="javabean.Base"%>
+<%@page import="java.sql.ResultSet"%>
+<%@page import="java.sql.PreparedStatement"%>
+<%@page import="com.mysql.jdbc.Connection"%>
+<%@page import="net.sf.json.JSONObject"%>
+<%@page import="net.sf.json.JSONArray"%>
+<%@page import="javabean.Admin"%>
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+
+
+
+
+
图书证修改
+
+
+
+
+
+<%
+ // 获取借阅证信息
+ String id = request.getParameter("id");
+
+
+ // 获取rule
+ Connection connection = null;
+ PreparedStatement pstmt = null;
+ PreparedStatement infoPstmt = null;
+ ResultSet ruleSet = null;
+ ResultSet infoSet = null;
+ String sql = "select * from rules";
+ String infoSql = "select * from borrow_card where id=?";
+ String result = "";
+ // 公用连接
+ connection = (Connection)Base.getConnection();
+ pstmt = connection.prepareStatement(sql);
+ infoPstmt = connection.prepareStatement(infoSql);
+ infoPstmt.setString(1,id);
+ infoSet = infoPstmt.executeQuery();
+ infoSet.next();
+ ruleSet = pstmt.executeQuery();
+%>
+
+
+
+
+<%
+ Base.closeResource(connection, pstmt, ruleSet);
+%>
+
+
\ No newline at end of file
diff --git a/WebContent/admin/cardlist.jsp b/WebContent/admin/cardlist.jsp
index b8639f2..2d17ed2 100644
--- a/WebContent/admin/cardlist.jsp
+++ b/WebContent/admin/cardlist.jsp
@@ -4,9 +4,179 @@
-
卡
+
借阅卡
+
+
+
- card
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebContent/admin/data.json b/WebContent/admin/data.json
index 845c588..32c65ee 100644
--- a/WebContent/admin/data.json
+++ b/WebContent/admin/data.json
@@ -1 +1 @@
-{"code":0,"msg":"","count":10,"data":[{"id":10000,"name":"夏洛特的烦恼","library_name":"南图","sort_id":"言情","position_id":"sdf","state":"借出","descript":"好看","operate":"234"},{"id":10000,"name":"夏洛特的烦恼","library_name":"南图","sort_id":"言情","position_id":"sdf","state":"借出","descript":"好看","operate":"234"},{"id":10000,"name":"夏洛特的烦恼","library_name":"南图","sort_id":"言情","position_id":"sdf","state":"借出","descript":"好看","operate":"234"},{"id":10010,"name":"夏洛特的烦恼","library_name":"南图","sort_id":"言情","position_id":"sdf","state":"借出","descript":"好看","operate":"234"}]}
\ No newline at end of file
+{"code":0,"msg":"","data":[{"id":10020,"username":"user-20","sex":"男","city":"城市-20","sign":"签名-20","experience":770,"logins":24,"wealth":92420248,"classify":"诗人","score":87},{"id":10021,"username":"user-21","sex":"男","city":"城市-21","sign":"签名-21","experience":184,"logins":131,"wealth":71566045,"classify":"词人","score":99},{"id":10022,"username":"user-22","sex":"男","city":"城市-22","sign":"签名-22","experience":739,"logins":152,"wealth":60907929,"classify":"作家","score":18},{"id":10023,"username":"user-23","sex":"女","city":"城市-23","sign":"签名-23","experience":127,"logins":82,"wealth":14765943,"classify":"作家","score":30},{"id":10024,"username":"user-24","sex":"女","city":"城市-24","sign":"签名-24","experience":212,"logins":133,"wealth":59011052,"classify":"词人","score":76},{"id":10025,"username":"user-25","sex":"女","city":"城市-25","sign":"签名-25","experience":938,"logins":182,"wealth":91183097,"classify":"作家","score":69},{"id":10026,"username":"user-26","sex":"男","city":"城市-26","sign":"签名-26","experience":978,"logins":7,"wealth":48008413,"classify":"作家","score":65},{"id":10027,"username":"user-27","sex":"女","city":"城市-27","sign":"签名-27","experience":371,"logins":44,"wealth":64419691,"classify":"诗人","score":60},{"id":10028,"username":"user-28","sex":"女","city":"城市-28","sign":"签名-28","experience":977,"logins":21,"wealth":75935022,"classify":"作家","score":37},{"id":10029,"username":"user-29","sex":"男","city":"城市-29","sign":"签名-29","experience":647,"logins":107,"wealth":97450636,"classify":"酱油","score":27},{"id":10029,"username":"user-29","sex":"男","city":"城市-29","sign":"签名-29","experience":647,"logins":107,"wealth":97450636,"classify":"酱油","score":27},{"id":10029,"username":"user-29","sex":"男","city":"城市-29","sign":"签名-29","experience":647,"logins":107,"wealth":97450636,"classify":"酱油","score":27},{"id":10029,"username":"user-29","sex":"男","city":"城市-29","sign":"签名-29","experience":647,"logins":107,"wealth":97450636,"classify":"酱油","score":27},{"id":10029,"username":"user-29","sex":"男","city":"城市-29","sign":"签名-29","experience":647,"logins":107,"wealth":97450636,"classify":"酱油","score":27},{"id":10029,"username":"user-29","sex":"男","city":"城市-29","sign":"签名-29","experience":647,"logins":107,"wealth":97450636,"classify":"酱油","score":27},{"id":10029,"username":"user-29","sex":"男","city":"城市-29","sign":"签名-29","experience":647,"logins":107,"wealth":97450636,"classify":"酱油","score":27},{"id":10029,"username":"user-29","sex":"男","city":"城市-29","sign":"签名-29","experience":647,"logins":107,"wealth":97450636,"classify":"酱油","score":27}]}
\ No newline at end of file
diff --git a/WebContent/admin/index.jsp b/WebContent/admin/index.jsp
index 277fc56..90d4c88 100644
--- a/WebContent/admin/index.jsp
+++ b/WebContent/admin/index.jsp
@@ -15,15 +15,12 @@
系统管理员
@@ -50,10 +47,11 @@
书籍管理
- 读书证管理
+ 借阅证管理
+
借阅信息查询
借阅规则管理
-
图书管理员管理
+
图书管理员管理
系统管理
diff --git a/WebContent/admin/managelist.jsp b/WebContent/admin/managelist.jsp
deleted file mode 100644
index ba7f881..0000000
--- a/WebContent/admin/managelist.jsp
+++ /dev/null
@@ -1,3 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=UTF-8"
- pageEncoding="UTF-8"%>
-managelist.html
\ No newline at end of file
diff --git a/WebContent/admin/manageradd.jsp b/WebContent/admin/manageradd.jsp
new file mode 100644
index 0000000..9f190c3
--- /dev/null
+++ b/WebContent/admin/manageradd.jsp
@@ -0,0 +1,90 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+
+
+
+