首页 > 技术文章 > 会议预约管理信息系统(二)

rongzhang 2021-12-09 23:04 原文

首页+注册

shouye.jsp

<%--
  Created by IntelliJ IDEA.
  User: 榕宝
  Date: 2021/12/3
  Time: 14:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page import="Bean.*" %>
<%@ page import="java.util.List" %>
<%@ page import="Dao.dao" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>会议预约管理系统</title>
    <style type="text/css">
        *{font-style: "微软雅黑"}

        #table th{background-color: #fff7d5;border: 1px solid black;}
        #table td{background-color: #cfecfc;border: 1px solid black;padding: 15px;color: #000;}
        #table a{text-decoration: none;font-weight: bold;}
        #table a:hover {text-decoration: underline;}
    </style>
</head>
<body>

<form  method="get"  action="houtai.jsp"  class="form-login">
    <h2 style="text-align: center;">会议预约管理系统</h2>
    <br>
    <div style="text-align: center;">
        <tr>
            <td>身份:

                <select name="profession">
                    <option value="1">会议管理员</option>
                    <option value="2" selected>职员</option><br>
                </select>
            </td>
        </tr>
        <div style="text-align: center;">
        <tr><td>
            用户名:<input type="text" name="username"><br></tr>

        <tr><td>
            密码:<input pattern="[a-zA-Z0-9]{6,12}" type="password" name="password"></td> </tr>
    </div>

    <tr>
        <td colspan="2"><div align="center">
            <input type="submit" value="登录"></div></td> </tr>
            <input type="button" value="注册" onclick="location.href='zhuce.jsp'" />
    </div>
</form>
</div>
</body>
</html>

zhuce.jsp

<%--
  Created by IntelliJ IDEA.
  User: 榕宝
  Date: 2021/12/3
  Time: 14:38
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>职员注册</title>
</head>
<form id="1" action ="zhuce-backstage.jsp" method="get">
    <p style="text-align:center;color:black; font-size:20px">
        <br>
        姓名:
        <label>
            <input type="text" name="UserName"size="3"/>
        </label>
        <br><br>
        性别:
        <label>
            <input type="radio" name="sex" value="男" />
        </label><label>
            <input type="radio" name="sex" value="女" />
        </label><br><br>
        部门:
        <label>
            <input type="text" name="Department"size="10"/>
        </label>
        <br><br>
        手机号码:
        <label>
            <input type="text" name="Phone"size="10"/>
        </label>
        <br><br>
        家庭住址:
        <label>
            <input type="text" name="Address"size="10"/>
        </label>
        <br><br>
        密码:
        <label>
            <input type="text" name="mima"size="10"/>
        </label>
        <br><br>
        <input type="submit" value="注册"/>
        <input type="reset" value="重置"/>
    </p>
</form>
</html>

zhuce-backstage.jsp

<%@ page contentType="text/html; charset=utf-8"
         pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>处理</title>
</head>

<body>
<jsp:useBean id="util" class="Dao.dao"/>
<%
    String name= request.getParameter("UserName");
    String sex= request.getParameter("sex");
    String bumen=request.getParameter("Department");
    String sjnum= request.getParameter("Phone");
    String home= request.getParameter("Address");
    String mima= request.getParameter("mima");

    if(util.queryEmpty(name,sex,bumen,sjnum,home,mima)){
        out.print("<script language ='javaScript'> alert('输入不能为空,请完成填写');window.history.back(-1); </script>");
    }else if(util.sjhm(sjnum)){
        out.print("<script language ='javaScript'> alert('手机号码需要为11位数字');window.history.back(-1); </script>");
    }else if(util.chachong(sjnum)){
        out.print("<script language ='javaScript'> alert('录入手机号码重复');window.history.back(-1); </script>");
    }else{
        util.input(name,sex,bumen,sjnum,home,mima);
        out.print("<script language='javaScript'> alert('注册成功');</script>");
        response.setHeader("refresh", "0;url=shouye.jsp");
    }
%>
</body>
</html>

guanliyuan.jsp

<%--
  Created by IntelliJ IDEA.
  User: 榕宝
  Date: 2021/12/9
  Time: 9:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>管理员功能页面</title>
    <style type="text/css">
        .bg {
            background-size:cover;
        }
        *{font-style: "微软雅黑"}

        #table a{text-decoration: none;font-weight: bold;}
        #table a:hover {text-decoration: underline;}
    </style>
</head>
<body class="bg">
<h2 style="text-align: center;">你好!管理员,请选择以下操作</h2>
<br>
<div style="text-align: center;">

    <input type="button" value="新增会议室信息" onclick="location.href='addhuiyishi.jsp'" />
    <br><br>
    <input type="button" value="修改会议室信息" onclick="location.href='xiugaihuiyishi``.jsp'" />
    <br><br>
    <input type="button" value="删除会议室信息" onclick="location.href='shanchuhuiyishi.jsp'" />
    <br><br>
    <input type="button" value="职员审核" onclick="location.href='zhiyuanshenhe.jsp'" />
    <br><br>
    <input type="button" value="浏览会议室信息" onclick="location.href='liulanhuigl.jsp'" />
    <br><br>
    <input type="button" value="查询会议室信息" onclick="location.href='chaxunhuigl.jsp'" />
    <br><br>
    <input type="button" value="会议审核" onclick="location.href='huiyishenhe.jsp'" />
    <br><br>
    <input type="button" value="重置密码" onclick="location.href='chongzhimima.jsp'" />
    <br><br>


</div>
<br>
<%
    request.setCharacterEncoding("utf-8");
    response.setCharacterEncoding("utf-8");

%>

zhiyuan.jsp

<%--
  Created by IntelliJ IDEA.
  User: 榕宝
  Date: 2021/12/9
  Time: 9:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>职员功能页面</title>
    <style type="text/css">
        .bg {
            background-image:url(images/bg_2.jpg);
            background-size:cover;
        }
        *{font-style: "微软雅黑"}
        #table{ border-collapse: collapse; margin: auto;text-align: center;}
        #table th{background-color: #fff7d5;border: 1px solid black;}
        #table td{background-color:#cffcd5;border: 1px solid black;padding: 15px;color: #000;}
        #table a{text-decoration: none;font-weight: bold;}
        #table a:hover {text-decoration: underline;}
    </style>
</head>
<body class="bg">
<h2 style="text-align: center;">你好!职员,请选择以下操作</h2>
<br><%
    request.setCharacterEncoding("utf-8");
    response.setCharacterEncoding("utf-8");
    String name = (String) session.getAttribute("name");
%>
<div style="text-align: center;">

    <input type="button" value="查看个人信息" onclick="location.href='chakanzhiyuan.jsp?name=<%=session.getAttribute("name")%>'" />
    <br><br>
    <input type="button" value="浏览会议室信息" onclick="location.href='liulanhuizy.jsp'" />
    <br><br>
    <input type="button" value="查询会议室信息" onclick="location.href='chaxunhuizy.jsp'" />
    <br><br>
    <input type="button" value="会议预约" onclick="location.href='huiyiyuyue.jsp'" />
    <br><br>
    <input type="button" value="参会信息" onclick="location.href='canhuixinxi.jsp'" />
    <br><br>
    <input type="button" value="个人密码修改" onclick="location.href='gerenmimaxiugai.jsp?name=<%=session.getAttribute("name")%>'" />
    <br><br>


</div>
<br>


</body>
</html>

addhuiyishi.jsp

%--
  Created by IntelliJ IDEA.
  User: 榕宝
  Date: 2021/12/9
  Time: 9:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>添加房产</title>
</head>
<body>
<form action="addhuiyishi`.jsp" method="get">
    <table align="center" border="1" width="500">
        <tr>
            <td>会议室编号: </td>
            <td>
                <label>
                    <select name="jibie">
                        <option value="A">A</option>
                        <option value="B">B</option>
                        <option value="C" selected>C</option>
                    </select>
                </label>
                <label>
                    <input type="text" name="number" />
                </label>
            </td>
        </tr>
        <tr>
            <td>会议室名称: </td>
            <td>
                <label>
                    <input type="text" name="name" />
                </label>
            </td>
        </tr>
        <tr>
            <td>会议室地址: </td>
            <td>
                <label>
                    <input type="text" name="address" />
                </label>
            </td>
        </tr>
        <tr>
            <td>可用状态: </td>
            <td>
                <label>
                    <input type="radio" name="keyong" value="可用">可用<br>
                    <input type="radio" name="keyong" value="不可用" checked>不可用<br>
                </label>
            </td>
        </tr>
        <tr>
            <td>目前状态: </td>
            <td>
                <label>
                    <input type="radio" name="muqian" value="占用">占用<br>
                    <input type="radio" name="muqian" value="不占用" checked>不占用<br>
                </label>
            </td>
        </tr>
        <tr>
            <td>容纳人数: </td>
            <td>
                <label>
                    <input type="text" name="num" />
                </label>
            </td>
        </tr>


        <tr align="center">
            <td colspan="2">
                <input type="submit" value="提交" />
                <input type="reset" value="重置" />
            </td>
        </tr>
    </table>
</form>
</body>

</html>

addhuiyishi`.jsp

<%--
  Created by IntelliJ IDEA.
  User: 榕宝
  Date: 2021/12/9
  Time: 9:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<jsp:useBean id="util" class="Dao.dao"/>
<%
    String jibie =request.getParameter("jibie");
    String roomid= request.getParameter("jibie")+request.getParameter("number");
    String name= request.getParameter("name");
    String address= request.getParameter("address");
    String keyong= request.getParameter("keyong");
    String muqian= request.getParameter("muqian");
    String num= request.getParameter("num");
    if(util.chachonghuiyishi(roomid)){
        out.print("<script language ='javaScript'> alert('录入会议室重复');window.history.back(-1); </script>");
    }
    else if(util.judgehysnum(jibie,num)){
        out.print("<script language ='javaScript'> alert('容纳人数不符合要求');window.history.back(-1); </script>");
    }
    else
    {util.input2(roomid,name,address,keyong,muqian,num);
    out.print("<script language='javaScript'> alert('录入成功');</script>");
    response.setHeader("refresh", "0;url=guanliyuan.jsp");}

%>
</body>
</html>

chakanzhiyuan.jsp

<%--
  Created by IntelliJ IDEA.
  User: 榕宝
  Date: 2021/12/9
  Time: 11:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page import="Bean.users" %>
<%@ page import="java.util.List" %>
<%@ page import="Dao.dao" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!-- 需导入sql包,user实体包 -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <title>Title</title>
</head>
<body>


<jsp:useBean id="util" class="Dao.dao"/>

<br>
<%
    request.setCharacterEncoding("utf-8");
    response.setCharacterEncoding("utf-8");
    String name =request.getParameter("name");
    users u = dao.getuser2(name);
%>
<form action="zhiyuan.jsp" method="get" id="form" onsubmit="return check()" >
    <table >
        <tr>
            <th>职员编号</th>
            <th>姓名</th>
            <th>性别</th>
            <th>部门</th>
            <th>手机号码</th>
            <th>家庭住址</th>
            <th>密码</th>
        </tr>

        <tr>
            <td><%=u.getId()%></td>
            <td><%=u.getUserName()%></td>
            <td><%=u.getSex()%></td>
            <td><%=u.getDepartment()%></td>
            <td><%=u.getPhone()%></td>
            <td><%=u.getPosition()%></td>
            <td><%=u.getMima()%></td>
            <td><a href="zhiyuan.jsp?">返回上一界面</a>

        </tr>

    </table>
</form>
</body>
</html>

chakanhuigl.jsp

<%@ page import="Bean.room" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: 榕宝
  Date: 2021/12/9
  Time: 11:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>管理员浏览会议室</title>
</head>
<body>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!-- 需导入sql包,user实体包 -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <meta charset="utf-8">
    <title>浏览会议室页面</title>
    <style type="text/css">
        .bg {
            background-image:url(images/bg_2.jpg);
            background-size:cover;
        }
        *{font-style: "微软雅黑"}
        #table{ border-collapse: collapse; margin: auto;text-align: center;}
        #table th{background-color: #fff7d5;border: 1px solid black;}
        #table td{background-color:#cffcd5;border: 1px solid black;padding: 15px;color: #000;}
        #table a{text-decoration: none;font-weight: bold;}
        #table a:hover {text-decoration: underline;}
    </style>
</head>
<body class="bg">
<h2 style="text-align: center;">会议室信息</h2>


<jsp:useBean id="util" class="Dao.dao"/>

<br>
<%
    request.setCharacterEncoding("utf-8");
    response.setCharacterEncoding("utf-8");
    List<room> list = util.readRoom();
%>
<%if(list.isEmpty()) {%>
<br>
<br>
<br>
<p style="text-align: center;font-size: xx-large;font-weight: 500;">当前数据库无相关信息</p>
<%}else {%>
<table  id="table">
    <tr>
        <th>会议室编号</th>
        <th>会议室名称</th>
        <th>会议室地址</th>
        <th>可用状态</th>
        <th>目前状态</th>
        <th>容纳人数</th>
    </tr>
    <%for (room r : list) { %>
    <tr>
        <td><%=r.getMeetroomId()%></td>
        <td><%=r.getMeetroomName()%></td>
        <td><%=r.getAddress()%></td>
        <td><%=r.getReadyState()%></td>
        <td><%=r.getStatus()%></td>
        <td><%=r.getCapacity()%></td>

    </tr>
    <%}} %>
</table>

</body>
</html>

chakanhuizy.jsp

<%@ page import="Bean.room" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: 榕宝
  Date: 2021/12/9
  Time: 11:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>职员浏览会议室</title>
</head>
<body>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!-- 需导入sql包,user实体包 -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <meta charset="utf-8">
    <title>浏览会议室页面</title>
    <style type="text/css">
        .bg {
            background-image:url(images/bg_2.jpg);
            background-size:cover;
        }
        *{font-style: "微软雅黑"}
        #table{ border-collapse: collapse; margin: auto;text-align: center;}
        #table th{background-color: #fff7d5;border: 1px solid black;}
        #table td{background-color:#cffcd5;border: 1px solid black;padding: 15px;color: #000;}
        #table a{text-decoration: none;font-weight: bold;}
        #table a:hover {text-decoration: underline;}
    </style>
</head>
<body class="bg">
<h2 style="text-align: center;">会议室信息</h2>


<jsp:useBean id="util" class="Dao.dao"/>

<br>
<%
    request.setCharacterEncoding("utf-8");
    response.setCharacterEncoding("utf-8");

    List<room> list = util.readRoomk();
%>
<%if(list.isEmpty()) {%>
<br>
<br>
<br>
<p style="text-align: center;font-size: xx-large;font-weight: 500;">当前数据库无相关信息</p>
<%}else {%>
<table  id="table">
    <tr>
        <th>会议室编号</th>
        <th>会议室名称</th>
        <th>会议室地址</th>
        <th>可用状态</th>
        <th>目前状态</th>
        <th>容纳人数</th>
    </tr>
    <%for (room r : list) { %>
    <tr>
        <td><%=r.getMeetroomId()%></td>
        <td><%=r.getMeetroomName()%></td>
        <td><%=r.getAddress()%></td>
        <td><%=r.getReadyState()%></td>
        <td><%=r.getStatus()%></td>
        <td><%=r.getCapacity()%></td>

    </tr>
    <%}} %>
</table>

</body>
</html>

chongzhimima.jsp

<%@ page import="Bean.room" %>
<%@ page import="java.util.List" %>
<%@ page import="Bean.users" %><%--
  Created by IntelliJ IDEA.
  User: 榕宝
  Date: 2021/12/9
  Time: 9:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!-- 需导入sql包,user实体包 -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <meta charset="utf-8">
    <title>重置密码页面</title>
    <style type="text/css">
        .bg {
            background-image:url(images/bg_2.jpg);
            background-size:cover;
        }
        *{font-style: "微软雅黑"}
        #table{ border-collapse: collapse; margin: auto;text-align: center;}
        #table th{background-color: #fff7d5;border: 1px solid black;}
        #table td{background-color:#cffcd5;border: 1px solid black;padding: 15px;color: #000;}
        #table a{text-decoration: none;font-weight: bold;}
        #table a:hover {text-decoration: underline;}
    </style>
</head>
<body class="bg">
<h2 style="text-align: center;">密码信息</h2>


<jsp:useBean id="util" class="Dao.dao"/>

<br>
<%
    request.setCharacterEncoding("utf-8");
    response.setCharacterEncoding("utf-8");
    List<users> list = util.readUser();
%>
<%if(list.isEmpty()) {%>
<br>
<br>
<br>
<p style="text-align: center;font-size: xx-large;font-weight: 500;">当前数据库无相关信息</p>
<%}else {%>
<table  id="table">
    <tr>
        <th>姓名</th>

        <th>操作</th>
    </tr>
    <%for (users u : list) { %>
    <tr>
        <td><%=u.getUserName()%></td>
        <td><a href="chongzhimima`.jsp?name=<%=u.getUserName() %>">重置密码</a>

    </tr>
    <%}} %>
</table>

</body>
</html>

chongzhimima`.jsp

<%--
  Created by IntelliJ IDEA.
  User: 榕宝
  Date: 2021/12/9
  Time: 10:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>删除会议室</title>
</head>
<body>
<jsp:useBean id="util" class="Dao.dao"/>
<%
    request.setCharacterEncoding("utf-8");
    response.setCharacterEncoding("utf-8");
  String name =request.getParameter("name");
    if(util.chongzhimima(name))
    {
        out.print("<script language='javaScript'> alert('重置成功');window.history.back(-1);</script>");
    }
    else
    {
        out.print("<script language ='javaScript'> alert('重置失败');window.history.back(-1); </script>");
    };
%>

</body>
</html>

gerenmimaxiugai.jsp

<%--
  Created by IntelliJ IDEA.
  User: 榕宝
  Date: 2021/12/9
  Time: 11:11
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改密码界面</title>
</head>
<body>
<jsp:useBean id="util" class="Dao.dao"/>

<br>
<%
    request.setCharacterEncoding("utf-8");
    response.setCharacterEncoding("utf-8");
    String name =request.getParameter("name");
%>
<form action="gerenmimaxiugai`.jsp" method="get">
    <table align="center" border="1" width="500">
        <tr>
            <td>旧密码:</td>
            <td>
                <label>
                    <input type="text" name="jmima" />
                </label>
            </td>
        </tr>
        <tr>
            <td>新密码: </td>
            <td>
                <label>
                    <input type="text" name="xmima" />
                </label>
            </td>
        </tr>
        <tr>
            <td>确认新密码: </td>
            <td>
                <label>
                    <input type="text" name="xmima1`" />
                </label>
            </td>
        </tr>


        <tr align="center">
            <td colspan="2">
                <input type="submit" value="提交" />
                <input type="reset" value="重置" />
            </td>
        </tr>
    </table>
</form>

</body>
</html>

gerenmimaxiugai`.jsp

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<jsp:useBean id="util" class="Dao.dao"/>

<br>
<%
    request.setCharacterEncoding("utf-8");
    response.setCharacterEncoding("utf-8");
    String name =request.getParameter("name");
%>
<jsp:useBean id="uti" class="Dao.dao"/>
<%
    String jmima= request.getParameter("jmima");
    String xmima= request.getParameter("xmima");
    String xmima1= request.getParameter("xmima1");
    if(xmima.equals(xmima1)){
        out.print("<script language='javaScript'> alert('新旧密码不一致');</script>");
        response.setHeader("refresh", "0;url=gerenmimaxiugai.jsp");}
    else if (uti.judgemima(name,jmima)){
        uti.mimaxiugai(jmima);
        out.print("<script language='javaScript'> alert('修改成功');</script>");
        response.setHeader("refresh", "0;url=gerenmimaxiugai.jsp");
    }
    else
    {
        out.print("<script language='javaScript'> alert('修改失败');</script>");
        response.setHeader("refresh", "0;url=gerenmimaxiugai.jsp");
    }
%>
</body>
</html>

 

推荐阅读