<?php
defined('BASEPATH') or exit('No direct script access allowed');
error_reporting(0);

class Home extends CI_Controller
{
    public function index()
    {
        $data = [];

        $data['total_penyakit'] = $this->db->query('SELECT count(*) as total from penyakit')->row_array();
        $data['total_gejala'] = $this->db->query('SELECT count(*) as total from gejala')->row_array();
        $data['total_basis_pengetahuan'] = $this->db->query('SELECT count(*) as total from basis_pengetahuan')->row_array();
        $data['total_users'] = $this->db->query('SELECT count(*) as total from `admin`')->row_array();

        $this->load->view('v_header_guest', $data);
        $this->load->view('v_home', $data);
        $this->load->view('v_footer');
    }
}
