技术栈:Go (Gin + GORM) + PHP + MySQL 5.7 + Redis 主要功能: - 多班级完全隔离(class_id 贯穿全系统) - 后端从 Python FastAPI 重写为 Go Gin(端口 56789) - 超级管理员独立登录(env 配置路径,默认账密 admin/Admin123) - 科任老师/课代表新角色 - 课代表作业管理页面 - 排行榜分项排行(操行分/考勤/作业) - 角色加减分上下限由班主任配置 - 家长改密功能(可开关) - 班级角色按需开关 - 宿舍号格式:南0-000 - 周度/月度重置功能 - MySQL 5.7 兼容 - Nginx 反向代理部署 开发者: Canglan 版权归属: Sea Network Technology Studio 许可证: Apache License 2.0
92 lines
2.3 KiB
PHP
92 lines
2.3 KiB
PHP
<?php
|
|
/**
|
|
* 多班级版班级管理系统 - 排行榜页
|
|
*
|
|
* 开发者: Canglan
|
|
* 联系方式: admin@sea-studio.top
|
|
* 版权归属: Sea Network Technology Studio
|
|
* 许可证: Apache License 2.0
|
|
*
|
|
* 版权所有 © Sea Network Technology Studio
|
|
*/
|
|
|
|
$page_title = '排行榜';
|
|
require_once __DIR__ . '/../config.php';
|
|
|
|
if (!isset($_SESSION['user_id']) || !in_array($_SESSION['user_type'], ['admin', 'super_admin'])) {
|
|
header('Location: /index.php');
|
|
exit();
|
|
}
|
|
|
|
$role = $_SESSION['role'] ?? '';
|
|
if (!in_array($role, ['班主任', '系统管理员'])) {
|
|
header('Location: /admin/dashboard.php');
|
|
exit();
|
|
}
|
|
|
|
require_once __DIR__ . '/../includes/header.php';
|
|
require_once __DIR__ . '/../includes/nav.php';
|
|
?>
|
|
|
|
<div class="container">
|
|
<div class="page-header">
|
|
<h2>排行榜</h2>
|
|
</div>
|
|
|
|
<div class="tab-bar">
|
|
<button class="tab-btn active" onclick="switchTab('conduct', this)">操行分排行</button>
|
|
<button class="tab-btn" onclick="switchTab('attendance', this)">考勤排行</button>
|
|
<button class="tab-btn" onclick="switchTab('homework', this)">作业排行</button>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="table-wrapper">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>排名</th>
|
|
<th>学号</th>
|
|
<th>姓名</th>
|
|
<th>分值</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="rankingList">
|
|
<tr><td colspan="4" style="text-align:center;">加载中...</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
.tab-bar {
|
|
display: flex;
|
|
gap: 0;
|
|
margin-bottom: 20px;
|
|
border-bottom: 2px solid #e0e0e0;
|
|
}
|
|
.tab-btn {
|
|
padding: 10px 24px;
|
|
border: none;
|
|
background: none;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
color: #666;
|
|
border-bottom: 2px solid transparent;
|
|
margin-bottom: -2px;
|
|
transition: all 0.2s;
|
|
}
|
|
.tab-btn:hover {
|
|
color: #333;
|
|
}
|
|
.tab-btn.active {
|
|
color: #4a6cf7;
|
|
border-bottom-color: #4a6cf7;
|
|
font-weight: 600;
|
|
}
|
|
</style>
|
|
|
|
<script src="/assets/js/rankings.js"></script>
|
|
|
|
<?php require_once __DIR__ . '/../includes/footer.php'; ?>
|