Files
SharedClassManager/frontend/admin/rankings.php
canglan d6dec878bd feat: 多班级版 v2.0 - Go后端重写 + 43轮代码审查
- 后端从 Python FastAPI 重写为 Go Gin(端口 56789)
- 多班级完全隔离
- 超级管理员独立登录
- 课代表作业管理、排行榜分项排行
- 角色加减分上下限可配置
- 家长改密功能(可开关)
- 周度/月度重置功能
- MySQL 5.7 兼容
- 43轮代码审查+全部修复
- Apache 2.0 许可证
2026-06-22 10:06:10 +08:00

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'; ?>