<?php defined('BASEPATH') OR exit('No direct script access allowed');
class Loan 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']='Loan';
		$this->data['active_class']='loan';
 	}
	
	public function index(){
		$this->data['page_name']='Business Credit, Loans, & Leasing';
		$this->data['active_class']='loan';
		$this->load->view('Frontend/includes/header',$this->data);
		$this->load->view('Frontend/loan/loan',$this->data);
		$this->load->view('Frontend/includes/footer',$this->data);
	}	
	
	public function logout(){
		$this->session->sess_destroy();
		redirect(base_url()."login");
	}
	
}