<?php defined('BASEPATH') OR exit('No direct script access allowed');
class Dashboard extends CI_Controller{ 	 

	function __construct(){ 
		parent::__construct();
		$this->load->helper('userlogin');
		checkIfUserLoggedIn($this->session->userdata($this->config->item('sess_prefix').'sess_user_id'));
		$this->data['user_details']=$this->User_mdl->user_details($this->session->userdata($this->config->item('sess_prefix').'sess_user_id'));
		$this->data['user_accounts_listing']=$this->User_mdl->user_accounts_listing($this->data['user_details']->user_id);
		//include(APPPATH.'views/Frontend/includes/ccc_file.php');
		$this->data['title']='Dashboard';
		$this->data['active_class']='dashboard';
 	}
	
	public function index(){		
 		//$this->data['user_id']=$this->session->userdata($this->config->item('sess_prefix').'sess_user_id');
		$this->data['page_name']='Dashboard';
		$this->data['transfer_history_listing']=$this->User_mdl->transfer_history_listing($this->session->userdata($this->config->item('sess_prefix').'sess_user_id'));
		$this->data['vectra_history_listing']=$this->User_mdl->vectra_history_listing($this->session->userdata($this->config->item('sess_prefix').'sess_user_id'));
		$this->load->view('Frontend/includes/header',$this->data);
		$this->load->view('Frontend/dashboard/view',$this->data);
		$this->load->view('Frontend/includes/footer',$this->data);
	}
	
}