首页 > 作文

基于javaweb+jsp实现学生宿舍管理系统

更新时间:2023-04-04 03:46:05 阅读: 评论:0

运行环境

java≥6、tomcat≥7.0、mysql≥5.5

开发工具

idea/eclip/myeclip

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

登录、注册、退出、用户模块、公告模块、宿管员模块、宿舍模块、学生模块的增删改查管理

技术框架

javaweb javabean jsp mvc mysql tomcat javascript idea eclip myeclip rvlet ssm maven …

部分代码实现jsp

            return fal;        }        if (document.getelementbyid("add-administratorbuilding").value.trim().length == 0) {            alert("楼栋不能为空");            return fal;        }        return true;    }    //编辑表单提交之前进行检查,如果return fal,则不允许提交    function editcheck() {        //根据id获取值        if (document.getelementbyid("edit-administratorname").value.trim().length == 0) {            alert("姓名不能为空");            return fal;        }        if (document.getelementbyid("edit-administratorphone").value.trim().length == 0) {            alert("电话不能为空");            return fal;        }
    <div class="row">        <div class="col-sm-3 col-md-2 sidebar">            <!-- 侧边栏 -->            <jsp:include page="menu.jsp">                <jsp:param value="active" name="administrator_active"/>            </jsp:include>        </div>        <br>        <div class="col-sm-9 col-sm-offt-3 col-md-10 col-md-offt-2 main">            <div class="row">                <div class="col-sm-7">                    <div class="input-group">                        <input class="form-control" type="hidden" id="archcolumn" name="archcolumn" value="administrator_name"/>                        <input class="form-control" type="text" id="arch_keyword" name="arch_keyword" 摩天轮的传说placeholder="姓名"/> <span class="input-group-btn"><button class="btn btn-line btn-danger" type="button" onclick="archlist()">搜索</button></span>                    </div>                </div>                <div class="col-sm-5">                    <button type="button" <c:if test="${loginur.urtype != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if> class="btn btn-line btn-primary" data-toggle="modal" data-target="#modal-add">添加宿管员                     </button>                </div>            </div>
            <br>            <div class="table-responsive">                <table class="table table-striped table-hover">                    <thead>                    <tr>                            <th>姓名</th>                            <th>性别</th>                            <th>电话</th>                            <th>楼栋</th>                        <th style="text-align: center;">操作</th>                    </tr>                    </thead>                    <tbody>                    <c:foreach items="${list}" var="vo">                        <tr>                <td>${vo.administratorname}</td>                <td>${vo.administratorx}</td>                <td>${vo.administratorphone}</td>                <td>${vo.administratorbuilding}</td>
<nav class="navbar navbar-inver navbar-fixed-top">    <div class="container-fluid">        <div class="navbar-header">            <button type="button" class="navbar-toggle collapd" data-toggle="collap" data-target="#navbar" aria-expanded="fal" aria-controls="navbar">                <span class="sr-only">学生宿舍管理系统</span> <span class="icon-bar"></span>                <span class="icon-bar"></span> <span class="icon-bar"></span>            </button>            <a class="navbar-brand" href="#" rel="external nofollow"  rel="external nofollow" >学生宿舍管理系统</a>        </div>        <div id="navbar" class="navbar-collap collap">            <ul class="nav navbar-nav navbar-right">                <li><a href="#" rel="external nofollow"  rel="external nofollow" >欢迎:<span style="color: yellow">${loginur.urname}</span></a></li>                <li><a href="authlogout" rel="external nofollow" >退出</a></li>            </ul>        </div>    </div></nav>
<%@ page contenttype="text/html; chart=utf-8" pageencoding="utf-8" %><%@ taglib uri="/d/file/titlepic/" prefix="c" %><%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %><%@ taglib prefix="fmt" uri="/d/file/titlepic/" %><!doctype html><html><head>    <meta chart="utf-8">    <title>宿管员 管理</title>    <link rel="stylesheet" href="css/bootstrap.css" rel="external nofollow" >    <link rel="stylesheet" href="css/main.css" rel="external nofollow" >    <script src="js/jquery-3.5.1.js"></script>    <script src="js/bootstrap.js"></script></head>
        let id = button.data('id');        let modal = $(this);        modal.find('#delete-id').val(id);    })    $('#modal-edit').on('show.bs.modal', function (event) {        let button = $(event.relatedtarget);        let id = button.data('id');        let modal = $(this);        $.ajax({            url: 'administratorget?id=' + id,            type: "get",            success: function (vostring) {                let vo = eval('(' + vostring + ')');                        modal.find('#edit-id').val(vo.id);                        modal.find('#edit-administratorname').val(vo.administratorname);                        for (let val of "男/女".split('/')) {                            if (val == vo.administratorx) {                                modal.find('#edit-administratorx_' + vo.administratorx).prop("checked", true);                            } el {                                modal.find('#edit-administratorx_' + vo.administratorx).removeattr("checked");
                        <span aria-hidden="true">&times;</span>                    </button>                    <h4 class="modal-title">宿管员 </h4>                </div>                <div class="modal-body">                    <table class="table table-striped table-hover" style="font-size: 15px;">                        <tr>                            <td style="width: 15%;">姓名:</td>                            <td><b id="info-administratorname"></b></td>                        </tr>                        <tr>                            <td style="width: 15%;">性别:</td>                            <td><b id="info-administratorx"></b></td>                        </tr>                        <tr>                            <td style="width: 15%;">电话:</td>
                        <label for="add-administratortext" class="control-label">备注:</label>                        <textarea style="height: 100px;" class="form-control" name="administratortext" id="add-administratortext"></textarea>                    </div>                </div>                <div class="modal-footer">                    <button type="button" class="btn btn-line btn-warning" data-dismiss="modal">取消</button>                    <button type="submit" class="btn btn-line btn-primary">提交</button>                </div>            </form>        </div>    </div></div><!-- info --><div class="modal fade" id="modal-info" tabindex="-1" role="dialog"     aria-labelledby="mymodallabel">    <div class="modal-dialog" role="document">        <div class="modal-content">            <form>                <div class="modal-header">
                modal.find('#info-administratorbuilding').text(vo.administratorbuilding);                modal.find('#info-administratortext').text(vo.administratortext);            }        })    })    function archlist() {        window.location.href = "administratorlist?archcolumn="+document.getelementbyid("archcolumn").value+"&keyword=" + document.getelementbyid("arch_keyword").value;    }    //增加表单提交之前进行检查,如果return fal,则不允许提交    function addcheck() {        //根据id获取值        if (document.getelementbyid("add-administratorname").value.trim().length == 0) {            alert("姓名不能为空");            return fal;        }        if (document.getelementbyid("add-administratorphone").value.trim().length == 0) {
                </div>                <div c心理健康讲座lass="modal-footer">                    <button type="button" class="btn btn-line btn-warning" data-dismiss="modal">取消</button>                    <button type="submit" class="btn btn-line btn-default">删除</button>                </div>            </form>        </div>    </div></div></body><script>    $('#modal-delete').on('show.bs.modal', function (event) {
                        </tr>                        <tr>                            <td style="width: 15%;">楼栋:</td>                            <td><b id="info-administratorbuilding"></b></td>                        </tr>                        <tr>                            <td style="width: 15%;">备注:</td>                            <td><b id="info-administratortext"></b></td>                        </tr>                    </table>                    <br>                </div>                <div class="modal-footer">                    <button type="button" class="btn btn-line btn-warning" data-dismiss="modal">关闭</button>                </div>            </form>        </div>    </div></div><!-- edit -->
                                <button class="btn btn-line btn-info btn-sm" data-id="${vo.id}"                                        data-toggle="modal" data-target="#modal-info">详情                                </button>                                <button class="btn btn-line btn-warning btn-sm"                                                <c:if test="${loginur.urtype != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if>                                        data-id="${vo.id}"                                        data-toggle="modal" data-target="#modal-edit">编辑                                </button>                                <button class="btn btn-line btn-default btn-sm" <c:if test="${loginur.urtype != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if> data-id="${vo.id}"                                        data-toggle="modal" data-target="#modal-delete">删除                                </button>                            </th>                        </tr>                    </c:foreach>                    </tbody>                </table>            </div>            <div style="float: right;padding-right: 10px;color: #515151;"><jsp:include page="split.jsp"/></div>
                        <label for="edit-administratortext" class="control-label">备注:</label>                        <textarea style="height: 100px;" class="form-control" name="administratortext" id="edit-administratortext"></textarea>                    </div>                    <div class="form-group hidden">                        <label for="edit-createtime" class="control-label">创建时间:</label>                        <input type="text" class="form-control" name="createtime" id="edit-createtime">                    </div>                </div>                <div class="modal-footer">                    <button type="button" class="btn btn-line btn-warning" data-dismiss="modal">取消</button>                    <button type="submit" class="btn btn-line btn-primary">提交</button>                </div>            </form>        </div>
    </div></div><!-- add --><div class="modal fade" id="modal-add" tabindex="-1" role="dialog"     aria-labelledby="mymodallabel">    <div class="modal-dialog" role="document">        <div class="modal-content">            <form actio曲靖旅游n="administratoradd" onsubmit="return addcheck()">                <div class="modal-header">                    <button type="button" class="clo" data-dismiss="modal"                            aria-label="clo">                        <span aria-hidden="true">&times;</span>                    </button>                    <h4 class="modal-title" id="mymodallabel">增加宿管员 </h4>                </div>                <div class="modal-body">                    <div class="form-group hidden">                        <label class="control-label">(hidden)</label>
</div><!-- delete --><div class="modal fade" id="modal-delete" tabindex="-1" role="dialog" aria-labelledby="mymodallabel">    <div class="modal-dialog" role="document">        <div class="modal-content">            <form action="administratordelete">                <div class="modal-header">                    <button type="button" class="clo" data-dismiss="modal" aria-label="clo">                        <span aria-hidden="true">&times;</span>                    </button>                    <h4 class="modal-title">删除宿管员 </h4>                </div>                <div class="modal-body">                    确认要删除该宿管员 记录吗?                    <div class="form-group hidden">                        <label class="control-label">(hidden)</label>                        <input type="hidden" class="form-control" name="action" value="delete">                        <input type="text" class="form-control" name="id" id="delete-id">
                    <div class="form-group">                        <label class="control-label">性别:</label>                               <input name="administratorx" id="edit-administratorx_男" type="radio" value="男"/>男                               <input name="administratorx" id="edit-administratorx_女" type="radio" value="女"/>女                    </div>                    <div class="form-group">                        <label for="edit-administratorphone" class="control-label">电话:</label>                        <input type="text" class="form-control" name="administratorphone" id="edit-administratorpho圣诞节的礼物ne">                    </div>                    <div class="form-group">                        <label for="edit-administratorbuilding" class="control-label">楼栋:</label>                        <input type="text" class="form-control" name="administratorbuilding" id="edit-administratorbuilding">                    </div>
                    </div>                    <div class="form-group">                        <label for="add-administratorname" class="control-label">姓名:</label>                        <input type="text" class="form-control" name="administratorname" id="add-administratorname">                    </div>                    <div class="form-group">                        <label class="control-label">性别:</label>                        <input name="administratorx" id="add-administratorx_男" type="radio" value="男" checked="checked"/>男                        <input name="administratorx" id="add-administratorx_女" type="radio" value="女"/>女                    </div>                    <div class="form-group">                        <label for="add-administratorphone" class="control-label">电话:</label>                        <input type="text" class="form-control" name="administratorphone" id="add-administratorphone">                    </div>                    <div class="form-group">                        <label for="add-administratorbuilding" class="control-label">楼栋:</label>                        <input type="text" class="form-control" name="administratorbuilding" id="add-administratorbuilding">                    </div>
            alert("楼栋不能为空");            return fal;        }        retu郑成河吉他谱rn true;    }</script>
                        };                        modal.find('#edit-administratorphone').val(vo.administratorphone);                        modal.find('#edit-administratorbuilding').val(vo.administratorbuilding);                        modal.find('#edit-administratortext').val(vo.administratortext);            }        })    })    $('#modal-info').on('show.bs.modal', function (event) {        let button = $(event.relatedtarget);        let id = button.data('id');        let modal = $(this);        $.ajax({            url: 'administratorget?id=' + id,            type: "get",            success: function (vostring) {                let vo = eval('(' + vostring + ')');                modal.find('#info-administratorname').text(vo.administratorname);                modal.find('#info-administratorx').text(vo.administratorx);
     aria-labelledby="mymodallabel">    <div class="modal-dialog" role="document">        <div class="modal-content">            <form action="administratoredit" onsubmit="return editcheck()">                <div class="modal-header">                    <button type="button" class="clo" data-dismiss="modal" aria-label="clo">                        <span aria-hidden="true">&times;</span>                    </button>                    <h4 class="modal-title">更新宿管员 </h4>                </div>                <div class="modal-body">                    <div class="form-group hidden">                        <label class="control-label">(hidden)</label>                        <input type="text" class="form-control" name="action" value="edit">                        <input type="text" readonly class="form-control" name="id" id="edit-id">                    </div>                    <div class="form-group">                        <label for="edit-administratorname" class="control-label">姓名:</label>                        <input type="text" class="form-control" name="administratorname" id="edit-administratorname">

效果图

以上就是基于javaweb+jsp实现学生宿舍管理系统的详细内容,更多关于jsp学生宿舍管理系统的资料请关注www.887551.com其它相关文章!

本文发布于:2023-04-04 03:45:53,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/zuowen/b964f2a1fc8c6f460cdaa9ddb0e036e8.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

本文word下载地址:基于javaweb+jsp实现学生宿舍管理系统.doc

本文 PDF 下载地址:基于javaweb+jsp实现学生宿舍管理系统.pdf

标签:姓名   管理系统   为空   模块
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图