系统一共分为3个角色分别是:学生,教师,管理员
管理员
1、登录
2、公告管理
3、用户管理(学生,教师)
4、浴室场地管理
5、场地预约管理
6、规章制度管理
7、器材管理
8、设备信息管理
9、设备维修管理
10、历史记录管理
学生、教师
1、登录注册
2、查看公告
3、个人信息管理
4、设备信息查看
5、浴室场地预约
6、查看规章制度
-
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
- <%@include file="/common/taglibs.jsp" %>
- <%
- String path = request.getContextPath();
- String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
- %>
-
- html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-
- <link href="<%=basePath%>/bootstrap/boot/bootstrap.min.css" rel="stylesheet">
- <link href="<%=basePath%>/bootstrap/boot/materialdesignicons.min.css" rel="stylesheet">
- <link href="<%=basePath%>/bootstrap/boot/style.min.css" rel="stylesheet">
- <link href="<%=basePath%>/bootstrap/boot/login.css" rel="stylesheet">
-
- <link href="${ctx}/resource/assets/css/bootstrap.min.css" rel="stylesheet"/>
- <link rel="stylesheet" href="${ctx}/resource/assets/css/font-awesome.min.css"/>
-
- <link rel="stylesheet" href="${ctx}/resource/assets/css/ace.min.css"/>
- <link rel="stylesheet" href="${ctx}/resource/assets/css/ace-rtl.min.css"/>
- <link rel="stylesheet" href="${ctx}/resource/assets/css/ace-skins.min.css"/>
- <link rel="stylesheet" href="${ctx}/resource/css/style.css"/>
-
- <script src="${ctx}/resource/assets/js/ace-extra.min.js">script>
-
- <script src="${ctx}/resource/js/jquery-1.9.1.min.js">script>
- <script src="${ctx}/resource/assets/layer/layer.js" type="text/javascript">script>
-
- <title>登陆title>
- head>
-
- <body style="
- background-image:url(<%=basePath%>/bootstrap/img/2.jpg);
- background-repeat:no-repeat;background-size:cover;">
- <%-- style="
- background-image:url(<%=basePath%>/images/bg.jpg);
- background-repeat:no-repeat;background-size:cover;" --%>
-
- <div class="row lyear-wrapper">
- <div class="lyear-login">
- <div class="login-center">
- <div class="login-header text-center">
- <a href=""> <h4 style="color: #15c377;">高校浴池管理系统h4>a>
- div>
-
-
-
-
- <FORM name="myForm" action="login_index.do" class="form-signin" method="post" id="login">
- <div class="form-group has-feedback feedback-left">
- <input type="text" placeholder="请输入账号" class="form-control" name="user.name" id="用户名"/>
-
- <span class="mdi mdi-account form-control-feedback" aria-hidden="true"> span>
- <span id="msg" style="color:red;">span>
- div>
-
- <div class="form-group has-feedback feedback-left">
- <input type="password" placeholder="请输入密码" class="form-control" id="密码" name="user.pass" />
-
- <span class="mdi mdi-lock form-control-feedback" aria-hidden="true">span>
- <span id="msg2" style="color:red;">span>
- div>
-
- <font color="red">${message}font>
- <br/>
- <div class="form-group">
- <button class="btn btn-block btn-primary" type="button" id="login_btn" onclick="checkForm()" value="登录" >立即登录button>
-
-
- div>
- <div class="form-group">
- <button class="btn btn-block btn-primary" type="button" onclick="add()" >注册button>
-
-
- div>
-
- form>
-
- <footer class="col-sm-12 text-center">
- footer>
- div>
- div>
- div>
-
-
- body>
- html>
- <script>
- $('#login_btn').on('click', function () {
- var num = 0;
- var str = "";
- $("input[type$='text'],input[type$='password']").each(function (n) {
- if ($(this).val() == "") {
-
- layer.alert(str += "" + $(this).attr("id") + "不能为空!\r\n", {
- title: '提示框',
- icon: 0,
- });
- num++;
- return false;
- }
- });
- if (num > 0) {
- return false;
- } else {
- $.ajax({
- cache: false,
- type: "post",
- url: "login_index.do",
- data: $('#login').serialize(),// 你的formid
- async: false,
- success: function (data) {
- if (data.flag == 1) {
- layer.msg('登陆成功', {
- icon: 1,
- time: 2000 //2秒关闭(如果不配置,默认是3秒)
- }, function () {
- window.location.href = data.url;
- });
- }
- if (data.flag == 2) {
- layer.msg('帐号未审核', {
- icon: 0,
- time: 2000 //2秒关闭(如果不配置,默认是3秒)
- }, function () {
- });
- }
- if (data.flag == 3) {
- layer.msg('用户名或密码错误', {
- icon: 0,
- time: 2000 //2秒关闭(如果不配置,默认是3秒)
- }, function () {
- });
- }
-
- }
- });
- }
- });
-
- function add() {
- layer.open({
- type: 2,
- area: ['700px', '600px'],
- content: 'user_add.do' //这里content是一个URL,如果你不想让iframe出现滚动条,你还可以content: ['http://sentsin.com', 'no']
- });
-
- }
-
- $(document).ready(function () {
- $("input[type='text'],input[type='password']").blur(function () {
- var $el = $(this);
- var $parent = $el.parent();
- $parent.attr('class', 'frame_style').removeClass(' form_error');
- if ($el.val() == '') {
- $parent.attr('class', 'frame_style').addClass(' form_error');
- }
- });
- $("input[type='text'],input[type='password']").focus(function () {
- var $el = $(this);
- var $parent = $el.parent();
- $parent.attr('class', 'frame_style').removeClass(' form_errors');
- if ($el.val() == '') {
- $parent.attr('class', 'frame_style').addClass(' form_errors');
- } else {
- $parent.attr('class', 'frame_style').removeClass(' form_errors');
- }
- });
- })
-
- script>
-
- /**
- * 用户登陆
- * @return
- */
- public void index() throws IOException {
- User user1 = userService.getUser(user);
- if (user1 != null){
- if (user1.getIsSh() == 1){
- if (user1.getRole().getEnName().equals("admin")){
- ActionContext.getContext().getSession().put("user", user1);
- }
- if (user1.getRole().getEnName().equals("js")){
- ActionContext.getContext().getSession().put("user1", user1);
- }
- if (user1.getRole().getEnName().equals("xs")){
- ActionContext.getContext().getSession().put("user2", user1);
- }
- map.put("flag", 1);
- map.put("url", "login_indexs.do");
- map.put("id", user1.getId());
- JsonUtils.toJson(map);
- } else {
- map.put("flag", 2);
- JsonUtils.toJson(map);
- }
- } else {
- map.put("flag", 3);
- JsonUtils.toJson(map);
- }
- }