Web开发大作业(图书管理系统)

发布一下前段代码不需要可以自己写

 

1.base界面

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>
        {% block title %}

        {% endblock %}
    </title>
    {% block css %}

    {% endblock %}
</head>
<body>
    <div class="topbar-wrap white">
    <div class="topbar-inner clearfix">
        <div class="top-info-wrap">
            <ul class="top-info-list clearfix">
                <li><a href="#"><span>[超级管理员]</span>></a></li>
				<li class="dropDown dropDown_hover">
					<a href="#" class="dropDown_A">#<i class="Hui-iconfont">&#xe6d5;</i></a>
					<ul class="dropDown-menu menu radius box-shadow">
                        <li><a href="#" >个人信息</a></li>
						<li><a href="#">修改密码</a></li>
                        <li><a href="#">注销</a></li>
				    </ul>
			    </li>
            </ul>
        </div>
    </div>
</div>









    {% block body %}

    {% endblock %}
</body>
</html>

2.添加界面

{% extends 'admin/base.html' %}
<html>
<head>
    <meta charset="UTF-8">
    <title>
        {% block title %}
        系统主页-图书管理
    {% endblock %}
    </title>
    {% block css %}
    <link rel="stylesheet" type="text/css" href="../static/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="../static/css/main.css"/>
    <link rel="stylesheet" type="text/css" href="assets/css/pagination.css">
    {% endblock %}
</head>
<body>
{% block body %}

<div class="container clearfix">
    <div class="sidebar-wrap">
        <div class="sidebar-title">
            <h1>菜单</h1>
        </div>
        <div class="sidebar-content">
            <ul class="sidebar-list">
                <li>
                    <ul class="sub-menu">
                       <li><a href="addbook">图书添加</a></li>
                        <li><a href="deletebook">图书删除</a></li>
                        <li><a href="changebook">图书修改</a></li>
                        <li><a href="querybook">图书查询</a></li>
                        <li><a href="borrowrecord">借阅记录</a></li>
                        <li><a href="readerinfor">读者信息</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
    <!--/sidebar-->
    <div class="main-wrap">

        <!--add  form-->
        <div class="result-wrap">
            <div class="result-content">
                <form  id="add-book"  action="/admin/addbook" method="POST">
                    <input type="hidden" value="add" name="type">

                    <table class="insert-tab" width="100%">
                        <tbody>
                            <tr>
                                <th width="120">
                                    <i class="require-red">*</i>id:</th>
                                <td>
                                    <input value="{{ number }}" class="common-text required" id="number" name="number" size="50" value="" type="text">
                                </td>
                            </tr>
                             <tr>
                                <th>
                                    <i class="require-red">*</i>书名:</th>
                                <td>
                                    <input  value="{{ name }}" class="common-text required" id="bookname" name="bookname" size="50" value="" type="text">
                                </td>
                            </tr>
                            <tr>
                                <th>作者:</th>
                                <td>
                                    <input value="{{ author }}" id ="author" class="common-text" name="author" size="50"  type="text">
                                </td>
                            </tr>
                            <tr>
                                <th>出版日期:</th>
                                <td>
                                    <input value="{{ publicationdate }}" type="date" name="pdate" id="pdate" min="1900-01-01" class="common-text">
                                </td>
                            </tr>
                            <tr>
                               <th>
                                    <i class="require-red">*</i>位置:</th>
                                <td>
                                    <input value="{{ location }}" class="common-text" id="address" name="address" size="50" type="text">
                                </td>
                            </tr>
                            <tr>
                                <th>描述:</th>
                                <td>
                                    <input  value="{{ remark }}" class="common-text" id="remark" name="description" size="50"  type="text">
                                </td>
                            </tr>
                        </tbody>
                    </table>
{#                     <h5  style="color:red ">{{ get_flashed_messages()[0] }} </h5>#}
                     <div style="text-align: left">
                         <input type="submit"value="提交" >
                     </div>
                </form>
            </div>
        </div>
        <!--/add form-->
    </div>
</div>
{% endblock %}
</body>
</html>

3.借阅界面

{% extends 'admin/base.html' %}
<html>
<head>
    <meta charset="UTF-8">
    <title>
        {% block title %}
        系统主页-图书管理
    {% endblock %}
    </title>
    {% block css %}
    <link rel="stylesheet" type="text/css" href="../static/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="../static/css/main.css"/>
    <link rel="stylesheet" type="text/css" href="assets/css/pagination.css">
    {% endblock %}
</head>
<body>
{% block body %}

<div class="container clearfix">
     <div class="sidebar-wrap">
        <div class="sidebar-title">
            <h1>菜单</h1>
        </div>
        <div class="sidebar-content">
            <ul class="sidebar-list">
                <li>
                    <ul class="sub-menu">
                        <li><a href="addbook">图书添加</a></li>
                        <li><a href="deletebook">图书删除</a></li>
                        <li><a href="changebook">图书修改</a></li>
                        <li><a href="querybook">图书查询</a></li>
                        <li><a href="borrowrecord">借阅记录</a></li>
                        <li><a href="readerinfor">读者信息</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
    <!--/sidebar-->
  <div class="main-wrap">
        <div class="result-wrap">
            <form name="myform"action="{{ url_for('admin.borrowrecord') }}" id="myform" method="post">
                <div class="result-content">
                    <table class="result-tab" width="100%">
                         <tr id="col-title">
                            <th>ID</th>
                            <th>书名</th>
                            <th>位置</th>
                            <th>借阅人姓名</th>
                            <th>借阅时间</th>
                             <th>归还时间</th>
                        </tr>
                        {% for record in records %}
                          <tr>
                            <td>{{ record.rcd_id }}</td>
                            <td>{{ record.booknumber }}</td>
                            <td>{{ record.location }}</td>
                            <td>{{ record.readername }}</td>
                            <td>{{ record.borrowdate }}</td>
                            <td>{{ record.returndate }}</td>
                          </tr>
                          {% endfor %}
                    </table>
                </div>
            </form>
        </div>
    </div>
    <!--/main-->
</div>
{% endblock %}


</body>
</html>


4.删除界面

{% extends 'admin/base.html' %}
<html>
<head>
    <meta charset="UTF-8">
    <title>
        {% block title %}
        系统主页-图书管理
    {% endblock %}
    </title>
    {% block css %}
    <link rel="stylesheet" type="text/css" href="../static/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="../static/css/main.css"/>
    <link rel="stylesheet" type="text/css" href="assets/css/pagination.css">
    {% endblock %}
</head>
<body>
{% block body %}
<div class="container clearfix">
    <div class="sidebar-wrap">
        <div class="sidebar-title">
            <h1>菜单</h1>
        </div>
        <div class="sidebar-content">
            <ul class="sidebar-list">
                <li>
                    <ul class="sub-menu">
                        <li><a href="http://127.0.0.1:5000/addbook">图书添加</a></li>
                        <li><a href="http://127.0.0.1:5000/deletebook">图书删除</a></li>
                        <li><a href="http://127.0.0.1:5000/changebook">图书修改</a></li>
                        <li><a href="http://127.0.0.1:5000/querybook">图书查询</a></li>
                         <li><a href="http://127.0.0.1:5000/borrowrecord">借阅记录</a></li>
                        <li><a href="http://127.0.0.1:5000/readerinfor">读者信息</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
    <!--/sidebar-->
    <div class="main-wrap">

            <div class="search-wrap">
            <!--用于查询得表单-->
            <div class="search-content">
                <form method="POST" action="/admin/deletebook" id="searchForm">
                    <input type="hidden" name="type" value="search">
                    <div style="text-align: center">
                        <h2>输入书名,进行删除</h2>
                    </div>
                    <table class="search-tab">
                        <tr>
                            <th width="70">书名:</th>
                            <td><input  name="bookname"  id="bookname" value="{{ name }}"></td>
                        </tr>
                    </table>
                     <INPUT  style="margin-left: 80px " TYPE=submit VALUE="删除">
                </form>
            </div>
        </div>

        <div class="result-wrap">
            <form name="myform" id="myform" method="post">
                <div class="result-content">
                    <table class="result-tab" width="100%">
                         <tr id="col-title">
                            <th>ID</th>
                            <th>书名</th>
                            <th>作者</th>
                            <th>出版时间</th>
                            <th>位置</th>
                            <th>描述</th>
                            <th>操作</th>
                        </tr>
                        {% if books %}
                            {% for book in books %}
                          <tr>
                            <td>{{ book.Number }}</td>
                            <td>{{ book.Name }}</td>
                            <td>{{ book.Author }}</td>
                            <td>{{ book.Publicationdate }}</td>
                            <td>{{ book.Location }}</td>
                            <td>{{ book.Remark }}</td>
                          </tr>
                          {% endfor %}
                        {% endif %}
                    </table>
                </div>
            </form>
        </div>
    </div>
    <!--/main-->
</div>

{% endblock %}

</body>
</html>


<!--删除的js脚本-->
<script>
    function delete_book(bookid,bookname, obj) {
        var r=confirm("确认删除书名为:"+bookname+"  的书籍吗?删除后不可恢复哦");
        if (r===true){

            window.location.href="deletebook2/"+bookid;
{#           {{ url_for('deletebook2',booid='b015') }}#}

        }else {
        {#    取消删除操作#}
              alert("取消删除成功")
        }
    }
</script>

5.查询界面

{% extends 'admin/base.html' %}
<html>
<head>
    <meta charset="UTF-8">
    <title>
        {% block title %}
        系统主页-图书管理
    {% endblock %}
    </title>
    {% block css %}
    <link rel="stylesheet" type="text/css" href="../static/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="../static/css/main.css"/>
    <link rel="stylesheet" type="text/css" href="assets/css/pagination.css">
    {% endblock %}
</head>
<body>

{% block body %}
<div class="container clearfix">
    <div class="sidebar-wrap">
        <div class="sidebar-title">
            <h1>菜单</h1>
        </div>
        <div class="sidebar-content">
            <ul class="sidebar-list">
                <li>
                    <ul class="sub-menu">
                       <li><a href="addbook">图书添加</a></li>
                        <li><a href="deletebook">图书删除</a></li>
                        <li><a href="changebook">图书修改</a></li>
                        <li><a href="querybook">图书查询</a></li>
                         <li><a href="borrowrecord">借阅记录</a></li>
                        <li><a href="readerinfor">读者信息</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
    <!--/sidebar-->

    <div class="main-wrap">

        <div class="search-wrap">
            <!--用于查询得表单-->
            <div class="search-content">
                <form method="POST" action="/admin/querybook" id="searchForm">
                    <input type="hidden" name="type" value="search">
                    <table class="search-tab">
                        <tr>
                            <th width="70">书名:</th>
                            <td><input  name="bookname"  id="bookname" value="{{ name }}"></td>
                        </tr>
                    </table>
                     <INPUT  style="margin-left: 80px " TYPE=submit VALUE="查询书籍">
                </form>
            </div>
        </div>


        <div class="result-wrap">
            <form name="myform" id="myform" method="post">
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr id="col-title">
                            <th>ID</th>
                            <th>书名</th>
                            <th>作者</th>
                            <th>出版时间</th>
                            <th>位置</th>
                            <th>描述</th>
                        </tr>
                        {% if books %}
                            {% for book in books %}
                          <tr>
                            <td>{{ book.Number }}</td>
                            <td>{{ book.Name }}</td>
                            <td>{{ book.Author }}</td>
                            <td>{{ book.Publicationdate }}</td>
                            <td>{{ book.Location }}</td>
                            <td>{{ book.Remark }}</td>
                          </tr>
                          {% endfor %}
                        {% endif %}
                    </table>
                </div>
            </form>
        </div>
    </div>
    <!--/main-->
</div>
{% endblock %}

</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="../../static/front/css/login.css">
    <title>登录</title>
    <script>
    function ajax1() {
        var xhr = new XMLHttpRequest();
        xhr.open('GET', '{{ url_for('admin.get_code') }}', true);
        xhr.onreadystatechange = function () {
            if(xhr.readyState == 4){
{#                console.log(xhr.responseText);#}
                $('#code').attr('src', '{{ url_for('admin.get_code') }}?'+Math.random())
            }
        };
        xhr.send();
    }
	</script>
</head>

<body>
    <div class="box">
        <form action="" method="post">
            <h4>管理员注册中心</h4>
            <div class="acc">
                <input id=“username” name="username" type="text" placeholder="请输入用户名">
                <input id=“password” name="password" type="password" placeholder="请输入密码">
                <input id=“password2” name="password2" type="password" placeholder="请再次输入密码">
                <input id=“email” name="email" type="text" placeholder="请输入邮箱">
            </div>
            <div class="login">
                <button class="btn btn-primary" type="submit">提交</button>

            </div>
            <div class="login">
                <button class="btn btn-danger" data-dismiss="modal" type="reset">取消</button>
            </div>
            <div>
                {% if message %}
                <p class="lll">{{ message }}</p>
                {% endif %}
            </div>
        </form>

    </div>

</body>

</html>












7.登录界面

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="../../static/front/css/login.css">
    <title>登录</title>
</head>

<body>
    <div class="box">
        <form action="">
            <h4>用户登录中心</h4>
            <div class="acc">
                <input type="text" placeholder="请输入用户名">
                <input type="password" placeholder="请输入密码">
            </div>
            <a href="javascript:;" class="btn fff">点击验证</a>
            <div class="fn">
                <label for="check"><input id="check" type="checkbox"><span><span></span></span>记住我</label>
                <a href="javascript:;" class="ccc">忘记密码</a>
            </div>
            <div class="login">
                <input type="submit" value="登录" class="fff">
                <span>或</span>
                <a href="javascript:;" class="fff">使用其他登录</a>
            </div>
            <div class="reg">
                <p>还没有账号?
                    <a href="javascript:;" class="ccc">立即注册</a>
                </p>
            </div>
        </form>
    </div>
</body>

</html>












未完待续,感谢支持QAQ

  • 3
    点赞
  • 28
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值