finish login

pull/1/head
xicheny 5 years ago
parent a4a248b3f1
commit 8e0667ed76

@ -2,7 +2,7 @@
<html>
<head>
<meta charset="UTF-8">
<title>借阅者登录页面</title>
<title>图书管理员登录页面</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->

@ -13,7 +13,11 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<link rel="stylesheet" href="./public/css/animate.css">
<link rel="stylesheet" href="./public/css/login.css" />
<style>
button:hover{
background-color:#ffd6e7;
}
</style>
</head>
<body>
<div class="container main">
@ -24,8 +28,13 @@
<input type="password" name="psw" class="form-control my_input" placeholder="请输入密码" required="required">
<input type="submit" class="form-control" value="登录" onclick="javascript:void(0);">
</form>
</div>
</div>
<div style="position:fixed; bottom:0; right:0;">
<a href="loginManager.html" target="_blank"><img src="public/image/login.png" width="50px" height="50px"></a><br>
<a href="adminLogin.html" target="_blank"><img src="public/image/manager.png" width="50px" height="50px"></a>
</div>
<script src="./public/js/layer/layer.js"></script>
<script>
$(function(){

@ -15,6 +15,17 @@
<div class="layui-logo">图书馆管理人员页面</div>
<!-- 头部区域可配合layui已有的水平导航 -->
<ul class="layui-nav layui-layout-left">
<li class="layui-nav-item">
<a href="javascript:;">其它系统</a>
<dl class="layui-nav-child">
<dd><a href="../reader/04readerFrame.jsp" target="parent">图书馆首页</a></dd>
<dd><a href="../adminLogin.html" target="parent">系统管理员</a></dd>
</dl>
</li>
</ul>
<ul class="layui-nav layui-layout-right">
<li class="layui-nav-item">
<a href="javascript:;">

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

@ -13,9 +13,12 @@
<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery所以必须放在前边) -->
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<style>
</style>
</head>
<body>
<nav class="navbar navbar-inverse " role="navigation">
<nav class="navbar navbar-inverse" role="navigation">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
@ -34,6 +37,7 @@
<li><p style="margin-top:25%;color:grey;">借阅者页面<span class="sr-only">(current)</span></p></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="javascript:;">
<%if(session.getAttribute("reader")==null){

@ -41,21 +41,17 @@
<option value="id">图书编号</option>
<option value="name">图书名称</option>
<option value="author">作者</option>
<option value="library_id">图书馆</option>
<option value="sort_id">分类</option>
<option value="position">位置</option>
<option value="status">状态</option>
<option value="description">描述</option>
</select>
</div>
<div class="layui-inline">
<input class="layui-input" id="conditionValue" name="conditionValue" id="demoReload" autocomplete="off">
</div>
<button class="layui-btn layui-bg-blue" name="condition" data-type="reload" lay-event="search">搜索</button>
</script>
<%
%>
<script>

@ -68,11 +68,30 @@ public class Book extends HttpServlet {
pstmt.setInt(2, Integer.parseInt(limit));
resultSet = pstmt.executeQuery();
while (resultSet.next()) {
String library = resultSet.getString("library_id");
String sql1 = "select * from library where ID =" + library;
PreparedStatement pstmt1 = connection.prepareStatement(sql1);
ResultSet rs1 = pstmt1.executeQuery();
String lib = "";
while (rs1.next()) {
lib = rs1.getString("name");
}
String sortid = resultSet.getString("sort_id");
String sql2 = "select * from book_sort where ID =" + sortid;
PreparedStatement pstmt2 = connection.prepareStatement(sql2);
ResultSet rs2 = pstmt2.executeQuery();
String sort = "";
while (rs2.next()) {
sort = rs2.getString("name");
}
jsonData.put("id", resultSet.getString("id"));
jsonData.put("name", resultSet.getString("name"));
jsonData.put("author", resultSet.getString("author"));
jsonData.put("library_id", resultSet.getString("library_id"));
jsonData.put("sort_id", resultSet.getString("sort_id"));
jsonData.put("library_id", lib);
jsonData.put("sort_id", sort);
jsonData.put("position", resultSet.getString("position"));
jsonData.put("status", resultSet.getString("status"));
jsonData.put("description", resultSet.getString("description"));

Loading…
Cancel
Save