<?php

class Dashboard extends CIF_Controller {

    public $layout = 'full';
    public $module = 'dashboard';
    public $model = 'users';

    public function index() {
        $this->permission();
        $data['users'] = $this->db->get('users')->num_rows();
        $data['categories'] = $this->db->get('categories')->num_rows();
        $data['sessions'] = $this->db->get('sessions')->num_rows();
        $data['posts'] = $this->db->get('posts')->num_rows();
        $data['blog_categories'] = $this->db->get('blog_categories')->num_rows();
        $data['sliders'] = $this->db->get('sliders')->num_rows();
        $data['packages'] = $this->db->get('packages')->num_rows();
        $data['visitors'] = config('visitors');

        $this->load->view($this->module, $data);
    }

}
