v0.6测试

This commit is contained in:
2026-04-14 19:18:11 +08:00
parent fd3535f884
commit a60ba8352f
23 changed files with 157 additions and 40 deletions

View File

@@ -20,7 +20,7 @@ if (!isset($_SESSION['user_id']) || $_SESSION['user_type'] !== 'admin') {
$page_title = '操行分管理';
$role = $_SESSION['role'] ?? '';
if (!in_array($role, ['班主任', '班长'])) {
if (!in_array($role, ['班主任', '班长', '劳动委员'])) {
header('Location: /admin/dashboard.php');
exit();
}
@@ -112,7 +112,11 @@ loadStudents();
<div class="form-group">
<label>分数变动</label>
<input type="number" id="pointsChange" required placeholder="正数为加分,负数为扣分">
<small><?php echo $role === '班长' ? '班长单次±5分以内' : '班主任无限制'; ?></small>
<small><?php
if ($role === '班长') echo '班长单次±5分以内';
elseif ($role === '劳动委员') echo '劳动委员仅限±1分';
else echo '班主任无限制';
?></small>
</div>
<div class="form-group">
<label>原因</label>