/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

	//Home controller
	class Home extends CI_Controller {	
		/*
		 *	Constructor
		 */
		function __construct() {
			parent::__construct();
			$this->load->model('user', '', TRUE);
		}
	
	
		/*
		 *	This function runs when the user navigates directly to the home controller
		 */
		function index() {
			//If the user is logged in
			if($this->user->isLoggedIn())
			{
				redirect(base_url().'cms', 'refresh');
			} else {
				//Redirect user to login page
				redirect(base_url().'start', 'refresh');
			}
		}
	}
?>