query( 'SELECT id, name, date, time_in, time_out FROM activities WHERE status = 1 AND date >= CURDATE() - INTERVAL 1 DAY ORDER BY date DESC, time_in DESC' )->fetchAll(); $hasActivities = !empty($activities); $todayAttendance = $pdo->query( 'SELECT att.*, s.full_name, s.student_id, act.name AS activity_name FROM attendance att INNER JOIN students s ON att.student_id = s.id INNER JOIN activities act ON att.activity_id = act.id WHERE DATE(att.time_in) = CURDATE() ORDER BY att.time_in DESC' )->fetchAll(); render_header('Scan Center', ['active' => 'attendance']); ?>

Admin Scan Center

Only signed-in administrators can scan QR codes. Use the camera or type the token below.

No active activities available. Create one first to start scanning.
required>

The scanner auto-selects the best camera mode and falls back to a built-in detector if needed.

Camera idle
Today’s Attendance
captured

No scans recorded today.

Student Activity Time In Time Out Status

[ 'https://unpkg.com/html5-qrcode@2.3.10/html5-qrcode.min.js', ], ]);