<?php defined('BASEPATH') OR exit('No direct script access allowed');
class Covid 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);
		$this->data['title']='Covid';
		$this->data['active_class']='covid';
 	}
	
	public function index(){
		$this->data['page_name']='COVID-19 Business Customer Assistance';
		$this->load->view('Frontend/includes/header',$this->data);
		$this->load->view('Frontend/covid/covid',$this->data);
		$this->load->view('Frontend/includes/footer',$this->data);
	}	
	
	public function update(){
 		$this->User_mdl->update_user_information($this->data['user_details']->user_encrypt_id);
		redirect(base_url()."profile");
	}
		
	public function change_password(){		
		$this->data['title']='Change Your Password';
		$this->data['active_class']=''; 
		$this->data['page_name']='my_account';
		$this->load->view('Frontend/includes/header',$this->data);
		$this->load->view('Frontend/my_account/change_your_password',$this->data);
		$this->load->view('Frontend/includes/footer',$this->data);
	}
	
	public function change_your_password(){
		$this->load->model('User_mdl');
		echo $this->User_mdl->change_your_password($this->session->userdata($this->config->item('sess_prefix').'sess_user_id'));
	}
	
	public function logout(){
		$this->session->sess_destroy();
		redirect(base_url()."login");
	}
	
}