Manage Occupant

Manage approved occupant data, Managing active occupants!

Data Occupant

query("SELECT * FROM occupant WHERE status = 'approved' ORDER BY id_occupant ASC"); $occupants = $stmt->fetchAll(); ?> '; $fotoSrc = (!empty($row['foto']) && file_exists($row['foto'])) ? $row['foto'] : 'images/faces/user.jpg'; $hasFoto = (!empty($row['foto']) && file_exists($row['foto'])) ? '1' : '0'; $codeRaw = $row['code_register']; $codeDisplay = htmlspecialchars($codeRaw); if ($row['progress'] === 'used' && strlen($codeRaw) > 10) $codeDisplay = htmlspecialchars(substr($codeRaw, 0, 24)) . '...'; // Encrypt the fingerprint ID for display (Hash and slice 9 chars) $fingerId = (isset($row['finger_id']) && $row['finger_id'] !== '-') ? substr(hash('sha256', $row['finger_id']), 0, 9) : ''; $fingerOk = (isset($row['finger_id']) && trim($row['finger_id']) !== '' && $row['finger_id'] !== '0' && $row['finger_id'] !== '-' && strtolower(trim($row['finger_id'])) !== 'null'); $sc = ($no % 2 == 1) ? 'row-odd' : 'row-even'; ?>
No Name NIK / NIP Phone No. Status Action