<?php
defined('BASEPATH') or exit('No direct script access allowed');
class Dashboard extends CI_Controller
{
    public function __construct()
    {
        parent::__construct();
        // $this->mcommon->authentication_model();
        ($this->verify_min_level(1)) ? '' : redirect('login');
    }
    public function index()
    {

      
            
             $this->db->from('applications');
            $this->db->where('payment_status', 0);
            $drafted = $this->db->count_all_results();

            $this->db->from('applications');
            $this->db->where('payment_status', 1);
            $pending = $this->db->count_all_results();

            $this->db->from('applications');
            $this->db->where('payment_status', 2);
            $completed = $this->db->count_all_results();
            
             $view_data['drafted'] = $drafted;
             $view_data['pending'] = $pending;
             $view_data['completed'] = $completed;

            $data = array(
                'title' => 'Dashboard',
                'page' => 'Dashboard',
                'content' => $this->load->view('settings/financial_year', $view_data, true),
            );
            $this->load->view('base/main_template', $data);
          
     
}





}
