<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Attendance extends CI_Controller {

    public function __construct() {
        parent::__construct();
        // Attendance logs are sensitive (biometric/timestamps): require login
        if (!isset($_SESSION['qurbani_user_id'])) {
            redirect('/admin', 'refresh');
        }
        $this->load->model('Attendance_model');
    }

    public function index() {
$data['attendance'] = $this->Attendance_model->get_all(100); // logs
    	$data['users'] = $this->Attendance_model->get_users();
$data['user_count'] = $this->Attendance_model->count_users();


        $this->load->view('admin/attendance/index', $data);
    }
}
