<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Main extends CI_Controller {
	
	function index(){
		if($this->session->userdata('is_logged_in')==FALSE){
			redirect('login');
		}else{
			$this->load->model('default/validated', 'val');
			if($this->nativesession->isStatusPihak()!=TRUE){
				$this->load->model('default/validated', 'val');
				$this->val->setup();
				$this->val->setup_language();
			}
			if($this->nativesession->isLangguage()!=TRUE){
				$this->load->model('default/validated', 'val');
				$this->val->setup();
				$this->val->setup_language();
			}
			redirect('dashboard');
		}
	}
}
 
?>