教务管理系统之manger层
browseCourse.html
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>浏览课程</title>
<script src="http://code.jquery.com/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="/js/browseCourse.js"></script>
<link type="text/css" rel="stylesheet" href="/css/add.css">
<link type="text/css" rel="stylesheet" href="/css/browse.css">
</head>
<body>
<label id="addlab">
<span class="plus" id="addCourse">添加课程+</span>
</label>
<div id="overlay" class="overlay"></div>
<div id="popup" class="popup">
<button id="closebtn">×</button>
<form action="/manger/addCourse" id="myForm" method="post">
<label>
课程名称
<input type="text" name="coursename" required="required">
</label>
<label>
课程限制人数
<input type="number" name="courselimit" required="required">
</label>
<label>
课程日期
<select name="courseday">
<option value="无">请选择</option>
<option value="星期一">星期一</option>
<option value="星期二">星期二</option>
<option value="星期三">星期三</option>
<option value="星期四">星期四</option>
<option value="星期五">星期五</option>
</select>
</label>
<label>
课程时间段
<select name="coursetime">
<option value="无">请选择</option>
<option value="8:00~9:35">8:00~9:35</option>
<option value="9:50~12:15">9:50~12:15</option>
<option value="14:00~15:35">14:00~15:35</option>
<option value="15:50~17:25">15:50~17:25</option>
<option value="19:00~21:25">19:00~21:25</option>
</select>
</label>
<label>
课程教室
<input type="text" name="courseroom" required="required">
</label>
<label>
课程种类
<select name="coursekind">
<option value="无">请选择</option>
<option value="实验">实验</option>
<option value="理论">理论</option>
</select>
</label>
<input type="submit" value="添加">
</form>
</div>
<label id="lab">
<span>课程关键字搜索</span><input type="text" name="condition" id="condition">
<span>老师关键字搜索</span><input type="text" name="teaCondition" id="teaCondition">
<button id="find">搜索</button>
</label>
<table>
<tr>
<th>课程编号</th>
<th>课程名称</th>
<th>已选课人数</th>
<th>课程限选人数</th>
<th>课程时间</th>
<th>课程教室</th>
<th>课程种类</th>
<th>授课教师姓名</th>
<th>操作</th>
</tr>
<tr th:each="i : ${courseList}">
<td th:text="${i.getCourseid()}"></td>
<td th:text="${i.getCoursename()}"></td>
<td th:text="${i.getCoursenumber()}"></td>
<td th:text="${i.getCourselimit()}"></td>
<td th:text="${i.getCourseday()+' '+i.getCoursetime()}"></td>
<td th:text="${i.getCourseroom()}"></td>
<td th:text="${i.getCoursekind()}"></td>
<td th:if="${i.getTeacher()}!=null" th:text="${i.getTeacher().getTeaname()}"></td>
<td th:unless="${i.getTeacher()}!=null">
<form th:action="@{/manger/addTeacherCourse(courseid=${i.getCourseid()})}" method="post">
<select name="teaid" class="Tea">
<option value="无">暂无老师</option>
<option th:each="j : ${teachers}" th:value="${j.getTeaid()}" >
<a class="addTea" th:text="${j.getTeaname()}"></a>
</option>
</select>
<button class="addTea" id="addTea" type="submit">点击添加</button>
</form>
</td>
<td>
<a th:href="@{/manger/deleteCourse(courseid=${i.getCourseid()})}" class="button delete">删除</a>
</td>
</tr>
</table>
</body>
</html>
browseStudent.html
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>浏览学生</title>
<script src="http://code.jquery.com/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="/js/browseStudent.js"></script>
<link type="text/css" rel="stylesheet" href="/css/browse.css">
</head>
<body>
<label id="lab">
<span>关键字搜索</span><input type="text" name="condition" id="condition"><button id="find">搜索</button>
</label>
<table>
<tr>
<th>用户名</th>
<th>头像</th>
<th>姓名</th>
<th>性别</th>
<th>账号是否激活</th>
<th>操作</th>
</tr>
<tr th:each="i: ${stuList}">
<td><a th:text="${i.getStuid()}" th:href="@{/manger/studentDetail(stuid=${i.getStuid()})}" target="_blank" class="Id"></a></td>
<td th:if="${stuImg.get(i.getStuid())}==null"><img src="/img/default.png"></td>
<td th:unless="${stuImg.get(i.getStuid())}==null"><img th:src="@{${stuImg.get(i.getStuid())}}"></td>
<td th:text="${i.getStuname()}"></td>
<td th:text="${i.getStusex()}"></td>
<td th:if="${i.getStustate()}">
<label class="switch">
<a th:href="@{/manger/inauditStudent(stuid=${i.getStuid()})}">
<input type="checkbox" checked="checked">
<span class="slider"></span>
</a>
</label>
</td>
<td th:unless="${i.getStustate()}">
<label class="switch">
<a th:href="@{/manger/auditStudent(stuid=${i.getStuid()})}">
<input type="checkbox">
<span class="slider"></span>
</a>
</label>
</td>
<td>
<a th:href="@{/manger/deleteStudent(stuid=${i.getStuid()})}" class="button delete">删除</a>
<a th:href="@{/manger/resetStudent(stuid=${i.getStuid()},stupwd=${i.getStupwd()})}" class="button reset">重置密码</a>
</td>
</tr>
</table>
</body>
</html>
browseTeacher.html
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>浏览老师</title>
<script src="http://code.jquery.com/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="/js/browseTeacher.js"></script>
<link type="text/css" rel="stylesheet" href="/css/browse.css">
</head>
<body>
<label id="lab">
<span>关键字搜索</span><input type="text" name="condition" id="condition"><button id="find">搜索</button>
</label>
<table>
<tr>
<th>用户名</th>
<th>头像</th>
<th>姓名</th>
<th>性别</th>
<th>账号是否激活</th>
<th>操作</th>
</tr>
<tr th:each="i : ${teaList}">
<td><a th:text="${i.getTeaid()}" th:href="@{/manger/teacherDetail(teaid=${i.getTeaid()})}" target="_blank" class="Id"></a></td>
<td th:if="${teaImg.get(i.getTeaid())}==null"><img src="/img/default.png"></td>
<td th:unless="${teaImg.get(i.getTeaid())}==null"><img th:src="@{${teaImg.get(i.getTeaid())}}"></td>
<td th:text="${i.getTeaname()}"></td>
<td th:text="${i.getTeasex()}"></td>
<td th:if="${i.getTeastate()}">
<label class="switch">
<a th:href="@{/manger/inauditTeacher(teaid=${i.getTeaid()})}">
<input type="checkbox" checked="checked">
<span class="slider"></span>
</a>
</label>
</td>
<td th:unless="${i.getTeastate()}">
<label class="switch">
<a th:href="@{/manger/auditTeacher(teaid=${i.getTeaid()})}">
<input type="checkbox">
<span class="slider"></span>
</a>
</label>
</td>
<td>
<a th:href="@{/manger/deleteTeacher(teaid=${i.getTeaid()})}" class="button delete">删除</a>
<a th:href="@{/manger/resetTeacher(teaid=${i.getTeaid()},teapwd=${i.getTeapwd()})}" class="button reset">重置密码</a>
</td>
</tr>
</table>
</body>
</html>
changePwd.html
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>修改密码</title>
<script src="http://code.jquery.com/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="/js/changeMangerPwd.js"></script>
<link type="text/css" rel="stylesheet" href="/css/changePwd.css">
</head>
<body>
<form action="/student/changePwd" id="myForm" method="post">
<label>
旧密码
<input type="password" name="oldpwd" id="oldpwd">
</label>
<label>
新密码
<input type="password" name="newpwd1" id="newpwd1">
确认新密码
<input type="password" name="newpwd2" id="newpwd2">
</label>
<input type="submit" value="修改">
</form>
</body>
</html>
mangerFunction.html
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>管理员功能</title>
<script src="http://code.jquery.com/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="/js/mangerFunction.js"></script>
<link type="text/css" rel="stylesheet" href="/css/function.css">
</head>
<body>
<div class="user-info">
<img src="/img/manger.png" alt="头像">
<span class="user-name" th:text="${session.mangerid}">管理员</span>
</div>
<header style="text-align: center">
<h1>管理员功能页面</h1>
</header>
<aside>
<span style="font-size:30px; cursor:pointer" id="openbtn">☰ 主菜单</span>
<div id="mySidenav" class="sidenav">
<a href="javascript:void(0)" id="closebtn">×</a>
<a href="#" id="a1">修改密码</a>
<a href="#" id="a2">学生管理</a>
<a href="#" id="a3">教师管理</a>
<a href="#" id="a4">课程管理</a>
<a href="#" id="a5">退出系统</a>
</div>
</aside>
<section style="text-align: center">
<iframe id="content" src="/weclome"></iframe>
</section>
</body>
</html>
studentDetail.html
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>学生个人信息</title>
<link type="text/css" rel="stylesheet" href="/css/detail.css">
</head>
<body>
<header>
<h1>学生信息</h1>
</header>
<table>
<tr>
<th>用户名</th>
<td th:text="${stu.getStuid()}">张三</td>
</tr>
<tr>
<th>头像</th>
<td th:if="${Img}!=null"><img th:src="@{${Img}}" alt="头像" width="100" height="100"></td>
<td th:unless="${Img}!=null"><img src="/img/default.png" alt="头像" width="100" height="100"></td>
</tr>
<tr>
<th>姓名</th>
<td th:text="${stu.getStuname()}">张三</td>
</tr>
<tr>
<th>性别</th>
<td th:text="${stu.getStusex()}">男</td>
</tr>
<tr>
<th>民族</th>
<td th:text="${stu.getSturace()}">汉族</td>
</tr>
<tr>
<th>籍贯</th>
<td th:text="${stu.getStuorigin()}">北京市</td>
</tr>
<tr>
<th>入学年份</th>
<td th:text="${stu.getStuenrollment()}">2020</td>
</tr>
<tr>
<th>学院</th>
<td th:text="${stu.getStucollege()}">信息科学与技术学院</td>
</tr>
<tr>
<th>专业</th>
<td th:text="${stu.getStumajor()}">计算机科学与技术</td>
</tr>
<tr>
<th>班级</th>
<td th:text="${stu.getStuclass()}">软件工程1班</td>
</tr>
<tr>
<th>电话号码</th>
<td th:text="${stu.getStuphone()}">1234567890</td>
</tr>
<tr>
<th>账号是否被激活</th>
<td class="active" th:if="${stu.getStustate()}">是</td>
<td class="inactive" th:unless="${stu.getStustate()}">否</td>
</tr>
</table>
</body>
</html>
teacherDetail.html
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>老师个人信息</title>
<link type="text/css" rel="stylesheet" href="/css/detail.css">
</head>
<body>
<header>
<h1>老师信息</h1>
</header>
<table>
<tr>
<th>用户名</th>
<td th:text="${tea.getTeaid()}">张三</td>
</tr>
<tr>
<th>头像</th>
<td th:if="${Img}!=null"><img th:src="@{${Img}}" alt="头像" width="100" height="100"></td>
<td th:unless="${Img}!=null"><img src="/img/default.png" alt="头像" width="100" height="100"></td>
</tr>
<tr>
<th>姓名</th>
<td th:text="${tea.getTeaname()}">张三</td>
</tr>
<tr>
<th>性别</th>
<td th:text="${tea.getTeasex()}">男</td>
</tr>
<tr>
<th>民族</th>
<td th:text="${tea.getTearace()}">汉族</td>
</tr>
<tr>
<th>籍贯</th>
<td th:text="${tea.getTeaorigin()}">北京市</td>
</tr>
<tr>
<th>学院</th>
<td th:text="${tea.getTeacollege()}">信息科学与技术学院</td>
</tr>
<tr>
<th>职位</th>
<td th:text="${tea.getTeapost()}">教授</td>
</tr>
<tr>
<th>毕业学校</th>
<td th:text="${tea.getTeagraduation()}">清华大学</td>
</tr>
<tr>
<th>学历</th>
<td th:text="${tea.getTeadegree()}">博士</td>
</tr>
<tr>
<th>电话号码</th>
<td th:text="${tea.getTeaphone()}">1234567890</td>
</tr>
<tr>
<th>账号是否被激活</th>
<td class="active" th:if="${tea.getTeastate()}">是</td>
<td class="inactive" th:unless="${tea.getTeastate()}">否</td>
</tr>
</table>
</body>
</html>