You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
101 lines
4.9 KiB
101 lines
4.9 KiB
|
6 days ago
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||
|
|
<!DOCTYPE html>
|
||
|
|
<html lang="zh-CN">
|
||
|
|
<head>
|
||
|
|
<meta charset="UTF-8">
|
||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
|
<title>个人中心 - 学生信息管理系统</title>
|
||
|
|
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css">
|
||
|
|
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<div class="container">
|
||
|
|
<nav class="navbar">
|
||
|
|
<div class="nav-brand">
|
||
|
|
<a href="${pageContext.request.contextPath}/">学生信息管理系统</a>
|
||
|
|
</div>
|
||
|
|
<div class="nav-links">
|
||
|
|
<c:if test="${loginUser.isAdmin()}">
|
||
|
|
<a href="${pageContext.request.contextPath}/admin/user?action=list">用户管理</a>
|
||
|
|
</c:if>
|
||
|
|
<a href="${pageContext.request.contextPath}/student?action=list">学生管理</a>
|
||
|
|
<a href="${pageContext.request.contextPath}/profile" class="active">个人中心</a>
|
||
|
|
<a href="${pageContext.request.contextPath}/logout">退出登录</a>
|
||
|
|
</div>
|
||
|
|
</nav>
|
||
|
|
|
||
|
|
<div class="page-header">
|
||
|
|
<h2>个人中心</h2>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<c:if test="${not empty error}">
|
||
|
|
<div class="alert alert-error">${error}</div>
|
||
|
|
</c:if>
|
||
|
|
<c:if test="${not empty message}">
|
||
|
|
<div class="alert alert-success">${message}</div>
|
||
|
|
</c:if>
|
||
|
|
|
||
|
|
<div class="form-container">
|
||
|
|
<form action="${pageContext.request.contextPath}/profile" method="post" class="data-form">
|
||
|
|
<h3 style="margin-bottom:20px;color:#333;">基本信息</h3>
|
||
|
|
<div class="form-row">
|
||
|
|
<div class="form-group">
|
||
|
|
<label>用户名</label>
|
||
|
|
<input type="text" class="form-control" value="${profileUser.username}" readonly disabled>
|
||
|
|
</div>
|
||
|
|
<div class="form-group">
|
||
|
|
<label>角色</label>
|
||
|
|
<input type="text" class="form-control" value="${profileUser.isAdmin() ? '系统管理员' : '一般用户'}" readonly disabled>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="form-row">
|
||
|
|
<div class="form-group">
|
||
|
|
<label for="realName">真实姓名</label>
|
||
|
|
<input type="text" id="realName" name="realName" class="form-control" value="${profileUser.realName}" maxlength="50">
|
||
|
|
</div>
|
||
|
|
<div class="form-group">
|
||
|
|
<label>状态</label>
|
||
|
|
<input type="text" class="form-control" value="${profileUser.status}" readonly disabled>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="form-row">
|
||
|
|
<div class="form-group">
|
||
|
|
<label for="email">电子邮箱</label>
|
||
|
|
<input type="email" id="email" name="email" class="form-control" value="${profileUser.email}" maxlength="100">
|
||
|
|
</div>
|
||
|
|
<div class="form-group">
|
||
|
|
<label for="phone">联系电话</label>
|
||
|
|
<input type="text" id="phone" name="phone" class="form-control" value="${profileUser.phone}" maxlength="20">
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<h3 style="margin:30px 0 20px;color:#333;padding-top:20px;border-top:1px solid #f0f0f0;">修改密码</h3>
|
||
|
|
<div class="form-row">
|
||
|
|
<div class="form-group">
|
||
|
|
<label for="oldPassword">原密码</label>
|
||
|
|
<input type="password" id="oldPassword" name="oldPassword" class="form-control" placeholder="输入原密码">
|
||
|
|
</div>
|
||
|
|
<div class="form-group">
|
||
|
|
<label for="newPassword">新密码</label>
|
||
|
|
<input type="password" id="newPassword" name="newPassword" class="form-control" placeholder="至少6个字符">
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="form-row">
|
||
|
|
<div class="form-group">
|
||
|
|
<label for="confirmPassword">确认新密码</label>
|
||
|
|
<input type="password" id="confirmPassword" name="confirmPassword" class="form-control" placeholder="再次输入新密码">
|
||
|
|
</div>
|
||
|
|
<div class="form-group"></div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="form-actions">
|
||
|
|
<button type="submit" class="btn btn-primary">保存修改</button>
|
||
|
|
</div>
|
||
|
|
</form>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</body>
|
||
|
|
</html>
|