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.
67 lines
3.1 KiB
67 lines
3.1 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" %>
|
||
|
|
<!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">
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<div class="container">
|
||
|
|
<nav class="navbar">
|
||
|
|
<div class="nav-brand">
|
||
|
|
<a href="${pageContext.request.contextPath}/">学生信息管理系统</a>
|
||
|
|
</div>
|
||
|
|
<div class="nav-links">
|
||
|
|
<a href="${pageContext.request.contextPath}/admin/user?action=list">用户管理</a>
|
||
|
|
<a href="${pageContext.request.contextPath}/student?action=list">学生管理</a>
|
||
|
|
<a href="${pageContext.request.contextPath}/profile">个人中心</a>
|
||
|
|
<a href="${pageContext.request.contextPath}/logout">退出登录</a>
|
||
|
|
</div>
|
||
|
|
</nav>
|
||
|
|
|
||
|
|
<div class="page-header">
|
||
|
|
<h2>导入用户(Excel)</h2>
|
||
|
|
<div class="header-actions">
|
||
|
|
<a href="${pageContext.request.contextPath}/admin/user?action=list" class="btn btn-secondary">返回列表</a>
|
||
|
|
<a href="${pageContext.request.contextPath}/admin/download" class="btn btn-primary">📥 下载模板</a>
|
||
|
|
</div>
|
||
|
|
</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">
|
||
|
|
<div style="margin-bottom:25px;">
|
||
|
|
<h4>上传说明</h4>
|
||
|
|
<ul style="margin-top:10px;padding-left:20px;color:#666;font-size:14px;line-height:2;">
|
||
|
|
<li>支持 .xlsx / .xls 格式的 Excel 文件</li>
|
||
|
|
<li>Excel 第一行为表头(用户名、密码、真实姓名、邮箱、电话)</li>
|
||
|
|
<li>从第二行开始为数据,已存在的用户名会自动跳过</li>
|
||
|
|
<li>未填写密码时默认密码为 <strong>123456</strong></li>
|
||
|
|
</ul>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<form action="${pageContext.request.contextPath}/admin/upload"
|
||
|
|
method="post" enctype="multipart/form-data" class="data-form">
|
||
|
|
<div class="form-group">
|
||
|
|
<label for="file">选择文件</label>
|
||
|
|
<input type="file" id="file" name="file" class="form-control"
|
||
|
|
accept=".xlsx,.xls" required style="padding:8px;">
|
||
|
|
</div>
|
||
|
|
<div class="form-actions">
|
||
|
|
<button type="submit" class="btn btn-primary">📤 上传并导入</button>
|
||
|
|
<a href="${pageContext.request.contextPath}/admin/user?action=list" class="btn btn-secondary">取消</a>
|
||
|
|
</div>
|
||
|
|
</form>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</body>
|
||
|
|
</html>
|