圖書館系統(8)
接圖書館系統(7)
admin_booktype.jsp:圖書分類頁面
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page
import="com.rain.bean.TypeBean,com.rain.dao.AdminDao,com.rain.dao.TypeDao,com.rain.bean.TypeBean,com.rain.dao.BookDao,com.rain.bean.AdminBean"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="zh-CN" class="ax-vertical-centered">
<head>
<meta charset="UTF-8">
<title>圖書館管理系統</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="static/css/bootstrap.min.css">
<link rel="stylesheet" href="static/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="static/css/bootstrap-admin-theme.css">
<link rel="stylesheet" href="static/css/bootstrap-admin-theme.css">
<script src="static/js/bootstrap.min.js"></script>
<script src="static/jQuery/jquery-3.1.1.min.js"></script>
<script src="static/js/bootstrap-dropdown.min.js"></script>
<script src="static/js/adminUpdateInfo.js"></script>
<script src="static/js/adminUpdatePwd.js"></script>
<style>
body {
background-image: url("A.jpg");
}
</style>
</head>
<script src="static/js/jquery.min.js"></script>
<script src="static/js/bootstrap.min.js"></script>
<body class="bootstrap-admin-with-small-navbar">
<%
AdminBean admin = new AdminBean();
String aid = (String) session.getAttribute("aid");
AdminDao admindao = new AdminDao();
admin = admindao.get_AidInfo2(aid);
%>
<nav
class="navbar navbar-inverse navbar-fixed-top bootstrap-admin-navbar bootstrap-admin-navbar-under-small"
role="navigation">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="collapse navbar-collapse main-navbar-collapse">
<a class="navbar-brand" href="admin.jsp"><strong>歡迎使用圖書館管理系統</strong></a>
</div>
</div>
</div>
</div>
</nav>
<div class="container">
<!-- left, vertical navbar & content -->
<div class="row">
<!-- left, vertical navbar -->
<div class="col-md-2 bootstrap-admin-col-left">
<ul class="nav navbar-collapse collapse bootstrap-admin-navbar-side">
<li><a href="/books/admin_book.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 圖書管理</a></li>
<li><a href="/books/admin_user.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 讀者管理</a></li>
<li><a href="/books/admin_booktype.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 圖書分類管理</a></li>
<li><a href="/books/admin_borrow.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 圖書借閱資訊</a></li>
<li><a href="/books/admin_history.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 圖書歸還資訊</a></li>
<li><a href="/books/admin_login.jsp"><i
class="glyphicon glyphicon-chevron-right"></i>管理員管理(需登入)</a></li>
</ul><br><br>
<ul class="nav navbar-collapse collapse bootstrap-admin-navbar-side">
<li><a href="/books/admin_bdtimes.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 熱門推薦</a></li>
<li><a href="/books/admin_brtimes.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 最佳讀者</a></li>
</ul><br><br>
<ul class="nav navbar-collapse collapse bootstrap-admin-navbar-side">
<li><a href="/books/admin_feedback.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 讀者反饋</a></li>
</ul>
</div>
<!-- content -->
<div class="col-md-10">
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default bootstrap-admin-no-table-panel">
<div class="panel-heading">
<div class="text-muted bootstrap-admin-box-title">圖書分類管理</div>
</div>
<div
class="bootstrap-admin-no-table-panel-content bootstrap-admin-panel-content collapse in">
<form class="form-horizontal" action="/books/selectServlet"
method="post">
<div class="col-lg-3 form-group">
<button type="button" class="btn btn-primary" id="btn_add"
data-toggle="modal" data-target="#addModal">新增分類</button>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<table id="data_list" class="table table-hover table-bordered"
cellspacing="0" width="100%">
<thead>
<tr>
<th>ID</th>
<th>圖書分類名稱</th>
<th>操作</th>
</tr>
</thead>
<!---在此插入資訊-->
<%
ArrayList<TypeBean> bookdata = new ArrayList<TypeBean>();
bookdata = (ArrayList<TypeBean>) request.getAttribute("data");
if (bookdata == null) {
TypeDao bookdao = new TypeDao();
bookdata = (ArrayList<TypeBean>) bookdao.get_ListInfo();
}
for (TypeBean bean : bookdata) {
%>
<tbody>
<td><%=bean.getTid()%></td>
<td><%=bean.getName()%></td>
<td><button type="button" class="btn btn-warning btn-xs"
data-toggle="modal" data-target="#updateModal" id="btn_update"
onclick="showInfo2('<%=bean.getTid()%>','<%=bean.getName()%>')">修改</button>
<button type="button" class="btn btn-danger btn-xs"
onclick="deletebook(<%=bean.getTid()%>)">刪除</button></td>
</tbody>
<%
}
%>
</table>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
function showInfo2(tid, name) {
document.getElementById("updatetid").value = tid;
document.getElementById("updatename").value = name;
}
function deletebook(tid) {
con = confirm("是否刪除?");
if(con == true) {
location.href = "/books/deleteTypeServlet?tid=" + tid;
}
}
</script>
<!-------------------------------------------------------------->
<!-- 修改模態框(Modal) -->
<form class="form-horizontal" method="post"
action="/books/updateBookTypeServlet">
<!--保證樣式水平不混亂-->
<div class="modal fade" id="updateModal" tabindex="-1" role="dialog"
aria-labelledby="updateModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true">×</button>
<h4 class="modal-title" id="updateModalLabel">修改圖書分類</h4>
</div>
<div class="modal-body">
<!---------------------表單-------------------->
<div class="form-group">
<label for="firstname" class="col-sm-3 control-label">圖書名稱</label>
<div class="col-sm-7">
<input type="hidden" name="tid" id="updatetid"> <input
type="text" class="form-control" id="updatename" name="name"
placeholder="請輸入圖書分類名稱"> <label class="control-label"
for="updateBookName" style="display: none;"></label>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">關閉</button>
<button type="submit" class="btn btn-primary">修改</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
</form>
<!-------------------------------------------------------------->
<!--------------------------------------新增的模糊框------------------------>
<form class="form-horizontal" method="post"
action="/books/AddBookTypeServlet">
<!--保證樣式水平不混亂-->
<!-- 模態框(Modal) -->
<div class="modal fade" id="addModal" tabindex="-1" role="dialog"
aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">新增新圖書分類</h4>
</div>
<div class="modal-body">
<!---------------------表單-------------------->
<div class="form-group">
<label for="firstname" class="col-sm-3 control-label">分類名稱</label>
<div class="col-sm-7">
<input type="text" class="form-control" id="addBookName"
required="required" name="name" placeholder="請輸入圖書分類名稱">
<label class="control-label" for="addBookName"
style="display: none;"></label>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">關閉</button>
<button type="submit" class="btn btn-primary">新增</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
</form>
admin_borrow.jsp:借閱頁面
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page
import="com.rain.bean.HistoryBean,com.rain.dao.AdminDao,com.rain.dao.TypeDao,com.rain.dao.BookDao,com.rain.bean.AdminBean"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="zh-CN" class="ax-vertical-centered">
<head>
<meta charset="UTF-8">
<title>圖書館管理系統</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="static/css/bootstrap.min.css">
<link rel="stylesheet" href="static/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="static/css/bootstrap-admin-theme.css">
<link rel="stylesheet" href="static/css/bootstrap-admin-theme.css">
<script src="static/js/bootstrap.min.js"></script>
<script src="static/jQuery/jquery-3.1.1.min.js"></script>
<script src="static/js/bootstrap-dropdown.min.js"></script>
<script src="static/js/adminUpdateInfo.js"></script>
<script src="static/js/adminUpdatePwd.js"></script>
<style>
body {
background-image: url("A.jpg");
}
</style>
</head>
<script src="static/js/jquery.min.js"></script>
<script src="static/js/bootstrap.min.js"></script>
<body class="bootstrap-admin-with-small-navbar">
<%
AdminBean admin = new AdminBean();
String aid = (String) session.getAttribute("aid");
AdminDao admindao = new AdminDao();
admin = admindao.get_AidInfo2(aid);
%>
<nav
class="navbar navbar-inverse navbar-fixed-top bootstrap-admin-navbar bootstrap-admin-navbar-under-small"
role="navigation">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="collapse navbar-collapse main-navbar-collapse">
<a class="navbar-brand" href="admin.jsp"><strong>歡迎使用圖書館管理系統</strong></a>
</div>
</div>
</div>
</div>
</nav>
<div class="container">
<!-- left, vertical navbar & content -->
<div class="row">
<!-- left, vertical navbar -->
<div class="col-md-2 bootstrap-admin-col-left">
<ul class="nav navbar-collapse collapse bootstrap-admin-navbar-side">
<li><a href="/books/admin_book.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 圖書管理</a></li>
<li><a href="/books/admin_user.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 讀者管理</a></li>
<li><a href="/books/admin_booktype.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 圖書分類管理</a></li>
<li><a href="/books/admin_borrow.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 圖書借閱資訊</a></li>
<li><a href="/books/admin_history.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 圖書歸還資訊</a></li>
<li><a href="/books/admin_login.jsp"><i
class="glyphicon glyphicon-chevron-right"></i>管理員管理(需登入)</a></li>
</ul><br><br>
<ul class="nav navbar-collapse collapse bootstrap-admin-navbar-side">
<li><a href="/books/admin_bdtimes.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 熱門推薦</a></li>
<li><a href="/books/admin_brtimes.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 最佳讀者</a></li>
</ul><br><br>
<ul class="nav navbar-collapse collapse bootstrap-admin-navbar-side">
<li><a href="/books/admin_feedback.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 讀者反饋</a></li>
</ul>
</div>
<!-- content -->
<div class="col-md-10">
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default bootstrap-admin-no-table-panel">
<div class="panel-heading">
<div class="text-muted bootstrap-admin-box-title">圖書借閱資訊</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<table id="data_list" class="table table-hover table-bordered"
cellspacing="0" width="100%">
<thead>
<tr>
<th>圖書號</th>
<th>圖書名稱</th>
<th>讀者賬號</th>
<th>讀者姓名</th>
<th>借閱日期</th>
<th>截止還書日期</th>
<th>操作</th>
</tr>
</thead>
<!---在此插入資訊-->
<%
ArrayList<HistoryBean> bookdata = new ArrayList<HistoryBean>();
bookdata = (ArrayList<HistoryBean>) request.getAttribute("data");
if (bookdata == null) {
BookDao bookdao = new BookDao();
bookdata = (ArrayList<HistoryBean>) bookdao.get_HistoryListInfo2(1);
}
for (HistoryBean bean : bookdata) {
%>
<tbody>
<td><%=bean.getCard()%></td>
<td><%=bean.getBookname()%></td>
<td><%=bean.getAdminname()%></td>
<td><%=bean.getUsername()%></td>
<td><%=bean.getBegintime()%></td>
<td><%=bean.getEndtime()%></td>
<td><button type="button" class="btn btn-warning btn-xs"
onclick="haibook(<%=bean.getHid()%>)">還書</button>
<% //hid為借閱記錄的id %>
<button type="button" class="btn btn-info btn-xs"
data-toggle="modal" data-target="#updateModal" id="btn_add"
onclick="addtime('<%=bean.getHid()%>','<%=bean.getEndtime()%>')">延期</button></td>
</tbody>
<%
}
%>
</table>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
function haibook(hid) {
con=confirm("是否還書?");
if(con==true){
location.href = "/books/borrowServlet?tip=2&show=2&hid="+hid;
}
}
function addtime(hid,endtime){
document.getElementById("updatehid").value = hid;
document.getElementById("updateendtime").value = endtime;
}
<% //彈出提示框框 %>
</script>
<!-- 修改模態框(Modal) -->
<!-------------------------------------------------------------->
<!-- 修改模態框(Modal) -->
<form class="form-horizontal" method="post"
action="/books/AddTimeServlet">
<!--保證樣式水平不混亂-->
<div class="modal fade" id="updateModal" tabindex="-1" role="dialog"
aria-labelledby="updateModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true">×</button>
<h4 class="modal-title" id="updateModalLabel">延長借閱時間</h4>
</div>
<div class="modal-body">
<!---------------------表單-------------------->
<div class="form-group">
<label for="endtime" class="col-sm-3 control-label">截至還書時間</label>
<div class="col-sm-7">
<input type="hidden" id="updatehid" name="hid">
<input type="text" class="form-control" id="updateendtime"
name="endtime" placeholder=""> <label
class="control-label" for="updateTime" style="display: none;"></label>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default"
data-dismiss="modal">關閉</button>
<button type="submit" class="btn btn-primary">修改</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
</form>
admin_feedback.jsp:反饋頁面
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page
import="com.rain.bean.AdminBean,com.rain.dao.AdminDao,com.rain.bean.ProblemBean,com.rain.dao.ProblemDao"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="zh-CN" class="ax-vertical-centered">
<head>
<meta charset="UTF-8">
<title>圖書館管理系統</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="static/css/bootstrap.min.css">
<link rel="stylesheet" href="static/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="static/css/bootstrap-admin-theme.css">
<link rel="stylesheet" href="static/css/bootstrap-admin-theme.css">
<script src="static/js/bootstrap.min.js"></script>
<script src="static/jQuery/jquery-3.1.1.min.js"></script>
<script src="static/js/bootstrap-dropdown.min.js"></script>
<script src="static/js/reader.js"></script>
<script src="static/js/readerUpdateInfo.js"></script>
<script src="static/js/readerUpdatePwd.js"></script>
<style>
body {
background-image: url("D.jpg");
}
</style>
</head>
<script src="static/js/jquery.min.js"></script>
<script src="static/js/bootstrap.min.js"></script>
<body class="bootstrap-admin-with-small-navbar">
<!-- 判斷是否已經登入 -->
<%
AdminBean admin = new AdminBean();
String aid = (String) session.getAttribute("aid");
AdminDao admindao = new AdminDao();
admin = admindao.get_AidInfo2(aid);
%>
<nav
class="navbar navbar-inverse navbar-fixed-top bootstrap-admin-navbar bootstrap-admin-navbar-under-small"
role="navigation">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="collapse navbar-collapse main-navbar-collapse">
<a class="navbar-brand" href="admin.jsp"><strong>歡迎使用圖書館管理系統</strong></a>
</li>
</ul>
</div>
</div>
</div>
</div>
</nav>
<div class="container">
<!-- left, vertical navbar & content -->
<div class="row">
<!-- left, vertical navbar -->
<div class="col-md-2 bootstrap-admin-col-left">
<ul class="nav navbar-collapse collapse bootstrap-admin-navbar-side">
<li><a href="/books/admin_book.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 圖書管理</a></li>
<li><a href="/books/admin_user.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 讀者管理</a></li>
<li><a href="/books/admin_booktype.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 圖書分類管理</a></li>
<li><a href="/books/admin_borrow.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 圖書借閱資訊</a></li>
<li><a href="/books/admin_history.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 圖書歸還資訊</a></li>
<li><a href="/books/admin_login.jsp"><i
class="glyphicon glyphicon-chevron-right"></i>管理員管理(需登入)</a></li>
</ul><br><br>
<ul class="nav navbar-collapse collapse bootstrap-admin-navbar-side">
<li><a href="/books/admin_bdtimes.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 熱門推薦</a></li>
<li><a href="/books/admin_brtimes.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 最佳讀者</a></li>
</ul><br><br>
<ul class="nav navbar-collapse collapse bootstrap-admin-navbar-side">
<li><a href="/books/admin_feedback.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 讀者反饋</a></li>
</ul>
</div>
<!-- content -->
<div class="col-md-10">
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default bootstrap-admin-no-table-panel">
<div class="panel-heading">
<div class="text-muted bootstrap-admin-box-title">讀者反饋查詢</div>
</div>
<div
class="bootstrap-admin-no-table-panel-content bootstrap-admin-panel-content collapse in">
<form class="form-horizontal" action="/books/selectProblemServlet"
method="post">
<div class="col-lg-8 form-group">
<label class="col-lg-4 control-label" for="query_bname">反饋資訊</label>
<div class="col-lg-8">
<input class="form-control" id="bookName" name="name"
type="text" value=""> <label class="control-label"
for="query_bname" style="display: none;"></label>
</div>
</div>
<div class="col-lg-4 form-group">
<button type="submit" class="btn btn-primary" id="btn_query">查詢</button>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<table id="data_list" class="table table-hover table-bordered"
cellspacing="0" width="100%">
<thead>
<tr>
<th>ID</th>
<th>讀者ID</th>
<th>標題</th>
<th>問題頁面</th>
<th>問題描述</th>
<th>聯絡電話</th>
<th>問題狀態</th>
<th>操作</th>
</tr>
</thead>
<!---在此插入資訊-->
<!---在此插入資訊-->
<%
ArrayList<ProblemBean> data2 = new ArrayList<ProblemBean>();
data2 = (ArrayList<ProblemBean>) request.getAttribute("data");
if (data2 == null) {
ProblemDao problemdao = new ProblemDao();
data2 = (ArrayList<ProblemBean>) problemdao.get_ListInfo();
}
for (ProblemBean bean : data2) {
%>
<tbody>
<td><%=bean.getPid()%></td>
<td><%=bean.getAid()%></td>
<td><%=bean.getName()%></td>
<td><%=bean.getPage()%></td>
<td><%=bean.getBody()%></td>
<td><%=bean.getPhone()%></td>
<td><%=bean.getStatus()%></td>
<td><button type="button" class="btn btn-warning btn-xs"
data-toggle="modal" data-target="#updateModal" id="btn_update"
onclick="showInfo2('<%=bean.getPid()%>','<%=bean.getStatus()%>')">修改</button>
<button type="button" class="btn btn-danger btn-xs"
onclick="deleteproblem(<%=bean.getPid()%>)">刪除</button></td>
</tbody>
<%
}
%>
</table>
</div>
</div>
<script type="text/javascript">
function showInfo2(pid,status) {
document.getElementById("updatepid").value = pid;
document.getElementById("updatestatus").value = status;
}
function deleteproblem(pid) {
con=confirm("是否刪除?");
if(con==true){
location.href = "/books/deleteProblemServlet?pid="+pid;
}
}
</script>
</div>
</div>
</div>
<!-- 修改模態框(Modal) -->
<!-------------------------------------------------------------->
<!-- 修改模態框(Modal) -->
<form class="form-horizontal" method="post"
action="/books/updateProblemServlet">
<!--保證樣式水平不混亂-->
<div class="modal fade" id="updateModal" tabindex="-1" role="dialog"
aria-labelledby="updateModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true">×</button>
<h4 class="modal-title" id="updateModalLabel">修改反饋狀態</h4>
</div>
<div class="modal-body">
<!---------------------表單-------------------->
<div class="form-group">
<label for="firstname" class="col-sm-3 control-label">狀態</label>
<div class="col-sm-7">
<input type="hidden" name="pid" id="updatepid"> <input
type="text" class="form-control" id="updatestatus"
name="status" placeholder=""> <label
class="control-label" for="updateISBN" style="display: none;"></label>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default"
data-dismiss="modal">關閉</button>
<button type="submit" class="btn btn-primary">修改</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
</form>
admin_history.jsp:歸還頁面
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page
import="com.rain.bean.HistoryBean,com.rain.dao.AdminDao,com.rain.dao.TypeDao,com.rain.dao.BookDao,com.rain.bean.AdminBean"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="zh-CN" class="ax-vertical-centered">
<head>
<meta charset="UTF-8">
<title>圖書館管理系統</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="static/css/bootstrap.min.css">
<link rel="stylesheet" href="static/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="static/css/bootstrap-admin-theme.css">
<link rel="stylesheet" href="static/css/bootstrap-admin-theme.css">
<script src="static/js/bootstrap.min.js"></script>
<script src="static/jQuery/jquery-3.1.1.min.js"></script>
<script src="static/js/bootstrap-dropdown.min.js"></script>
<script src="static/js/adminUpdateInfo.js"></script>
<script src="static/js/adminUpdatePwd.js"></script>
<style>
body {
background-image: url("A.jpg");
}
</style>
</head>
<script src="static/js/jquery.min.js"></script>
<script src="static/js/bootstrap.min.js"></script>
<body class="bootstrap-admin-with-small-navbar">
<%
AdminBean admin = new AdminBean();
String aid = (String) session.getAttribute("aid");
AdminDao admindao = new AdminDao();
admin = admindao.get_AidInfo2(aid);
%>
<nav
class="navbar navbar-inverse navbar-fixed-top bootstrap-admin-navbar bootstrap-admin-navbar-under-small"
role="navigation">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="collapse navbar-collapse main-navbar-collapse">
<a class="navbar-brand" href="admin.jsp"><strong>歡迎使用圖書館管理系統</strong></a>
</li>
</ul>
</div>
</div>
</div>
</div>
</nav>
<div class="container">
<!-- left, vertical navbar & content -->
<div class="row">
<!-- left, vertical navbar -->
<div class="col-md-2 bootstrap-admin-col-left">
<ul class="nav navbar-collapse collapse bootstrap-admin-navbar-side">
<li><a href="/books/admin_book.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 圖書管理</a></li>
<li><a href="/books/admin_user.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 讀者管理</a></li>
<li><a href="/books/admin_booktype.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 圖書分類管理</a></li>
<li><a href="/books/admin_borrow.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 圖書借閱資訊</a></li>
<li><a href="/books/admin_history.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 圖書歸還資訊</a></li>
<li><a href="/books/admin_login.jsp"><i
class="glyphicon glyphicon-chevron-right"></i>管理員管理(需登入)</a></li>
</ul><br><br>
<ul class="nav navbar-collapse collapse bootstrap-admin-navbar-side">
<li><a href="/books/admin_bdtimes.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 熱門推薦</a></li>
<li><a href="/books/admin_brtimes.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 最佳讀者</a></li>
</ul><br><br>
<ul class="nav navbar-collapse collapse bootstrap-admin-navbar-side">
<li><a href="/books/admin_feedback.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 讀者反饋</a></li></ul>
</div>
<!-- content -->
<div class="col-md-10">
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default bootstrap-admin-no-table-panel">
<div class="panel-heading">
<div class="text-muted bootstrap-admin-box-title">圖書歸還資訊</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<table id="data_list" class="table table-hover table-bordered"
cellspacing="0" width="100%">
<thead>
<tr>
<th>圖書號</th>
<th>圖書名稱</th>
<th>讀者賬號</th>
<th>讀者姓名</th>
<th>借閱日期</th>
<th>還書日期</th>
</tr>
</thead>
<!---在此插入資訊-->
<%
ArrayList<HistoryBean> bookdata = new ArrayList<HistoryBean>();
bookdata = (ArrayList<HistoryBean>) request.getAttribute("data");
if (bookdata == null) {
BookDao bookdao = new BookDao();
bookdata = (ArrayList<HistoryBean>) bookdao.get_HistoryListInfo2(0);
}
for (HistoryBean bean : bookdata) {
%>
<tbody>
<td><%=bean.getCard()%></td>
<td><%=bean.getBookname()%></td>
<td><%=bean.getAdminname()%></td>
<td><%=bean.getUsername()%></td>
<td><%=bean.getBegintime()%></td>
<td><%=bean.getEndtime()%></td>
</tbody>
<%
}
%>
</table>
</div>
</div>
</div>
</div>
</div>
admin_user.jsp:學生管理頁面
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page
import="com.rain.bean.AdminBean,com.rain.dao.AdminDao,com.rain.bean.AdminBean"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="zh-CN" class="ax-vertical-centered">
<head>
<meta charset="UTF-8">
<title>圖書館管理系統</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="static/css/bootstrap.min.css">
<link rel="stylesheet" href="static/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="static/css/bootstrap-admin-theme.css">
<link rel="stylesheet" href="static/css/bootstrap-admin-theme.css">
<script src="static/js/bootstrap.min.js"></script>
<script src="static/jQuery/jquery-3.1.1.min.js"></script>
<script src="static/js/bootstrap-dropdown.min.js"></script>
<script src="static/js/adminUpdateInfo.js"></script>
<script src="static/js/adminUpdatePwd.js"></script>
<style>
body {
background-image: url("A.jpg");
}
</style>
</head>
<script src="static/js/jquery.min.js"></script>
<script src="static/js/bootstrap.min.js"></script>
<body class="bootstrap-admin-with-small-navbar">
<%
AdminBean admin = new AdminBean();
String aid = (String) session.getAttribute("aid");
AdminDao admindao = new AdminDao();
admin = admindao.get_AidInfo2(aid);
%>
<nav
class="navbar navbar-inverse navbar-fixed-top bootstrap-admin-navbar bootstrap-admin-navbar-under-small"
role="navigation">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="collapse navbar-collapse main-navbar-collapse">
<a class="navbar-brand" href="admin.jsp"><strong>歡迎使用圖書館管理系統</strong></a>
</div>
</div>
</div>
</div>
</nav>
<div class="container">
<!-- left, vertical navbar & content -->
<div class="row">
<!-- left, vertical navbar -->
<div class="col-md-2 bootstrap-admin-col-left">
<ul class="nav navbar-collapse collapse bootstrap-admin-navbar-side">
<li><a href="/books/admin_book.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 圖書管理</a></li>
<li><a href="/books/admin_user.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 讀者管理</a></li>
<li><a href="/books/admin_booktype.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 圖書分類管理</a></li>
<li><a href="/books/admin_borrow.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 圖書借閱資訊</a></li>
<li><a href="/books/admin_history.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 圖書歸還資訊</a></li>
<li><a href="/books/admin_login.jsp"><i
class="glyphicon glyphicon-chevron-right"></i>管理員管理(需登入)</a></li>
</ul><br><br>
<ul class="nav navbar-collapse collapse bootstrap-admin-navbar-side">
<li><a href="/books/admin_bdtimes.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 熱門推薦</a></li>
<li><a href="/books/admin_brtimes.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 最佳讀者</a></li>
</ul><br><br>
<ul class="nav navbar-collapse collapse bootstrap-admin-navbar-side">
<li><a href="/books/admin_feedback.jsp"><i
class="glyphicon glyphicon-chevron-right"></i> 讀者反饋</a></li>
</ul>
</div>
<!-- content -->
<div class="col-md-10">
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default bootstrap-admin-no-table-panel">
<div class="panel-heading">
<div class="text-muted bootstrap-admin-box-title">讀者管理</div>
</div>
<div
class="bootstrap-admin-no-table-panel-content bootstrap-admin-panel-content collapse in">
<form class="form-horizontal" action="/books/selectServlet"
method="post">
<div class="col-lg-3 form-group">
<button type="button" class="btn btn-primary" id="btn_add"
data-toggle="modal" data-target="#addModal">新增讀者</button>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<table id="data_list" class="table table-hover table-bordered"
cellspacing="0" width="100%">
<thead>
<tr>
<th>ID</th>
<th>賬號</th>
<th>姓名</th>
<th>郵箱</th>
<th>手機號</th>
<th>可借閱天數</th>
<th>最大可借數</th>
<th>操作</th>
</tr>
</thead>
<!---在此插入資訊-->
<%
ArrayList<AdminBean> data2 = new ArrayList<AdminBean>();
data2 = (ArrayList<AdminBean>) request.getAttribute("data");
if (data2 == null) {
data2 = (ArrayList<AdminBean>) admindao.get_ListInfo();
}
for (AdminBean bean : data2) {
%>
<tbody>
<td><%=bean.getAid()%></td>
<td><%=bean.getUsername()%></td>
<td><%=bean.getName()%></td>
<td><%=bean.getEmail()%></td>
<td><%=bean.getPhone()%></td>
<td><%=bean.getLend_num()%></td>
<td><%=bean.getMax_num()%></td>
<td><button type="button" class="btn btn-warning btn-xs"
data-toggle="modal" data-target="#updateModal" id="btn_update"
onclick="showInfo2('<%=bean.getAid()%>','<%=bean.getUsername()%>','<%=bean.getName()%>','<%=bean.getEmail()%>',
'<%=bean.getPhone()%>','<%=bean.getPassword()%>','<%=bean.getLend_num()%>','<%=bean.getMax_num()%>')">修改</button>
<button type="button" class="btn btn-danger btn-xs"
onclick="deletebook(<%=bean.getAid()%>)">刪除</button></td>
</tbody>
<%
}
%>
</table>
</div>
</div>
</div>
</div>
<script type="text/javascript">
function showInfo2(aid,username,name,email,phone,password,lend_num,max_num) {
document.getElementById("updateaid").value = aid;
document.getElementById("updateusername").value = username;
document.getElementById("updatename").value = name;
document.getElementById("updateemail").value = email;
document.getElementById("updatephone").value = phone;
document.getElementById("updatepassword").value = password;
document.getElementById("updatelend_num").value = lend_num;
document.getElementById("updatemax_num").value = max_num;
}
function deletebook(aid) {
con=confirm("是否刪除?");
if(con==true){
location.href = "/books/deleteUserServlet?aid="+aid;
}
}
</script>
<!-- 修改模態框(Modal) -->
<!-------------------------------------------------------------->
<!-- 修改模態框(Modal) -->
<form class="form-horizontal" method="post"
action="/books/updateUserServlet">
<!--保證樣式水平不混亂-->
<div class="modal fade" id="updateModal" tabindex="-1" role="dialog"
aria-labelledby="updateModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true">×</button>
<h4 class="modal-title" id="updateModalLabel">修改讀者資訊</h4>
</div>
<div class="modal-body">
<!---------------------表單-------------------->
<div class="form-group">
<label for="firstname" class="col-sm-3 control-label">賬號</label>
<div class="col-sm-7">
<input type="hidden" id="updateaid" name="aid"> <input
type="text" class="form-control" id="updateusername"
name="username" placeholder=""> <label
class="control-label" for="updateISBN" style="display: none;"></label>
</div>
</div>
<div class="form-group">
<label for="firstname" class="col-sm-3 control-label">姓名</label>
<div class="col-sm-7">
<input type="text" class="form-control" id="updatename"
name="name" placeholder=""> <label
class="control-label" for="updateBookName"
style="display: none;"></label>
</div>
</div>
<div class="form-group">
<label for="firstname" class="col-sm-3 control-label">郵箱</label>
<div class="col-sm-7">
<input type="text" class="form-control" id="updateemail"
name="email" placeholder=""> <label
class="control-label" for="updateAutho" style="display: none;"></label>
</div>
</div>
<div class="form-group">
<label for="firstname" class="col-sm-3 control-label">手機號</label>
<div class="col-sm-7">
<input type="text" class="form-control" id="updatephone"
name="phone" placeholder=""> <label
class="control-label" for="updatePress" style="display: none;"></label>
</div>
</div>
<div class="form-group">
<label for="firstname" class="col-sm-3 control-label">密碼</label>
<div class="col-sm-7">
<input type="text" class="form-control" id="updatepassword"
name="password" placeholder=""> <label
class="control-label" for="updatePress" style="display: none;"></label>
</div>
</div>
<div class="form-group">
<label for="firstname" class="col-sm-3 control-label">可借閱天數</label>
<div class="col-sm-7">
<input type="text" class="form-control" id="updatelend_num"
name="lend_num" placeholder=""> <label
class="control-label" for="updatePress" style="display: none;"></label>
</div>
</div>
<div class="form-group">
<label for="firstname" class="col-sm-3 control-label">最大借閱數</label>
<div class="col-sm-7">
<input type="text" class="form-control" id="updatemax_num"
name="max_num" placeholder=""> <label
class="control-label" for="updatePress" style="display: none;"></label>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default"
data-dismiss="modal">關閉</button>
<button type="submit" class="btn btn-primary">修改</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
</form>
<!-------------------------------------------------------------->
<!--------------------------------------新增的模糊框------------------------>
<form class="form-horizontal" method="post"
action="/books/AddUserServlet">
<!--保證樣式水平不混亂-->
<!-- 模態框(Modal) -->
<div class="modal fade" id="addModal" tabindex="-1" role="dialog"
aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">新增新讀者</h4>
</div>
<div class="modal-body">
<!---------------------表單-------------------->
<div class="form-group">
<label for="firstname" class="col-sm-3 control-label">賬號</label>
<div class="col-sm-7">
<input type="text" class="form-control" name="username"
id="addISBN" required="required" placeholder="請輸入賬號">
<label class="control-label" for="addISBN"
style="display: none;"></label>
</div>
</div>
<div class="form-group">
<label for="firstname" class="col-sm-3 control-label">姓名</label>
<div class="col-sm-7">
<input type="text" class="form-control" name="name"
id="addBookName" required="required" placeholder="請輸入姓名">
<label class="control-label" for="addBookName"
style="display: none;"></label>
</div>
</div>
<div class="form-group">
<label for="firstname" class="col-sm-3 control-label">郵箱</label>
<div class="col-sm-7">
<input type="text" class="form-control" name="email"
id="addAutho" required="required" placeholder="請輸入郵箱">
<label class="control-label" for="addAutho"
style="display: none;"></label>
</div>
</div>
<div class="form-group">
<label for="firstname" class="col-sm-3 control-label">手機號</label>
<div class="col-sm-7">
<input type="text" class="form-control" name="phone"
id="addPress" required="required" placeholder="請輸入手機號">
<label class="control-label" for="addPress"
style="display: none;"></label> </div>
</div>
<div class="form-group">
<label for="firstname" class="col-sm-3 control-label">密碼</label>
<div class="col-sm-7">
<input type="text" class="form-control" name="password"
id="addPress" required="required" placeholder="請輸入密碼">
<label class="control-label" for="addPress"
style="display: none;"></label>
</div>
</div>
<div class="form-group">
<label for="firstname" class="col-sm-3 control-label">可借閱天數</label>
<div class="col-sm-7">
<input type="text" class="form-control" name="lend_num"
id="updatelend_num" required="required" placeholder="請輸入可借閱天數">
<label class="control-label" for="addNum"
style="display: none;"></label>
</div>
</div>
<div class="form-group">
<label for="firstname" class="col-sm-3 control-label">最大可借數</label>
<div class="col-sm-7">
<input type="text" class="form-control" name="max_num"
id="updatemax_num" required="required" placeholder="請輸入最大可借數">
<label class="control-label" for="addPress"
style="display: none;"></label>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default"
data-dismiss="modal">關閉</button>
<button type="submit" class="btn btn-primary">新增</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
</form>
相關文章
- C++圖書館管理系統 [STL實現]C++
- Evergreen 3.2.4 和 3.1.10 釋出,開源圖書館管理系統
- c語言圖書館管理系統----學會使用結構體C語言結構體
- 圖書系統
- 3.18 去中心化圖書館中心化
- 智慧圖書館:構建高效影片智慧管理方案,提升圖書館個性化服務
- 四川省圖書館暨全省公共圖書館2021年閱讀報告
- 圖書管理系統2
- 物聯網路卡助力智慧圖書館
- 圖書管理系統(小程式)
- 17、flask-圖書簡單館專案Flask
- 校園圖書管理系統開發-中小學智慧圖書管理系統開發
- Python—簡單圖書管理系統Python
- 從頭做一個基於B/S的 ASP.NET圖書館管理系統課設(開篇)ASP.NET
- 學舟圖書閱讀管理系統
- 小型線上圖書系統需求分析
- Django教程 —— 初步完善圖書管理系統Django
- Django入門案例:圖書管理系統Django
- 圖書管理系統-專案介紹
- 搭建個人圖書館!一個簡單的線上個人書庫
- L1-083 誰能進圖書館 分數 10
- 圖書館網路運維監控安全態勢感知運維
- 大英圖書館在2021年遷移到了Hadoop3Hadoop
- flask框架圖書管理系統客戶端Flask框架客戶端
- 實驗專案四:圖書管理系統
- 漫遊圖書館廣發招募令,讓你的閒置書“遊”起來!
- 世界最大圖書館因遭受網路攻擊而癱瘓
- 學舟圖書閱讀管理系統簡介
- flask框架圖書管理系統伺服器端Flask框架伺服器
- Django學習筆記《二》圖書管理系統Django筆記
- 解讀圖書管理系統為書店帶來的好處
- 科技愛好者週刊(第 301 期):OpenAI 的圖書館工位OpenAI
- 2021年度武漢大學圖書館閱讀報告
- 寶付受邀參加圖書館計劃十週年慶典
- 玩家的電子博物館:遊戲圖鑑系統的體驗設計探索遊戲
- 第一次作業——圖書管理系統
- 又做了一個“圖書借閱系統”小程式
- java大作業總結——圖書借閱管理系統Java