Initial import

This commit is contained in:
pongpon pitisuk
2026-06-25 16:49:13 +07:00
commit 72701ad58c
120 changed files with 17590 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
<?php
require_once __DIR__ . '/../includes/functions.php';
requireLogin();
if (isStudent()) {
header('Location: ' . BASE_URL . '/index.php');
exit;
}
$id = intval($_POST['id'] ?? 0);
$student_id = intval($_POST['student_id'] ?? 0);
$grade = trim($_POST['grade'] ?? '');
requireStudentAccess($student_id);
if ($id > 0) {
$stmt = getDB()->prepare("UPDATE student_courses SET grade = ? WHERE id = ?");
$stmt->execute([$grade, $id]);
}
header('Location: ' . BASE_URL . '/students/view.php?id=' . $student_id);
exit;