query("SELECT COUNT(*) FROM employees")->fetchColumn(); $present_today = $pdo->query("SELECT COUNT(DISTINCT employee_id) FROM attendance_logs WHERE date = CURDATE() AND status IN ('Present', 'Late')")->fetchColumn(); $on_leave_today = $pdo->query("SELECT COUNT(*) FROM leave_requests WHERE CURDATE() BETWEEN start_date AND end_date AND status = 'Approved'")->fetchColumn(); $pending_leaves = $pdo->query("SELECT COUNT(*) FROM leave_requests WHERE status = 'Pending'")->fetchColumn(); // Recent Attendance $recent_attendance = $pdo->query(" SELECT a.*, e.name_en, e.name_ar FROM attendance_logs a JOIN employees e ON a.employee_id = e.id ORDER BY a.created_at DESC LIMIT 5 ")->fetchAll(PDO::FETCH_ASSOC); ?>

HR Dashboard

Employees Attendance Leave Requests
Total Employees
Present Today
On Leave Today
Pending Requests
Recent Attendance Logs
Employee Status Time Source
In:
Out:
No logs today
Simulate Biometric Device Push

Use this form to test biometric integration. In a real scenario, the device POSTs to /api/biometric_push.php.