/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk

« back to all changes in this revision

Viewing changes to codeigniter/application/controllers/home.php

  • Committer: Gustav Hatvigsson
  • Date: 2013-05-30 12:02:31 UTC
  • mfrom: (85.1.28 lenasys)
  • Revision ID: gustav.hartvigsson@gmail.com-20130530120231-ttqgqjqw2w8enn7g
Merged Ohlsons changes:
added function to get ssn and name for the registrationspages in the user model.
added the registrationpage for students.
edited the registration page for instructors
edited the css for both the registrationpages
minor fix to registration css

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 
2
 
 
3
        //Home controller
 
4
        class Home extends CI_Controller {      
 
5
                /*
 
6
                 *      Constructor
 
7
                 */
 
8
                function __construct() {
 
9
                        parent::__construct();
 
10
                        $this->load->model('user', '', TRUE);
 
11
                }
 
12
        
 
13
        
 
14
                /*
 
15
                 *      This function runs when the user navigates directly to the home controller
 
16
                 */
 
17
                function index() {
 
18
                        //If the user is logged in
 
19
                        if($this->user->isLoggedIn())
 
20
                        {
 
21
                                redirect(base_url().'cms', 'refresh');
 
22
                        } else {
 
23
                                //Redirect user to login page
 
24
                                redirect(base_url().'start', 'refresh');
 
25
                        }
 
26
                }
 
27
        }
 
28
?>
 
 
b'\\ No newline at end of file'