source: pro-violet-viettel/sourcecode/application/modules/frontend/controllers/lecture.php @ 487

Last change on this file since 487 was 483, checked in by dungnv, 11 years ago
File size: 923 bytes
Line 
1<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2/**
3 * Lecture Class
4 *
5 * @author dzungnv02
6 *
7 */
8
9class Lecture extends MX_Controller
10{
11       
12        public function __construct()
13        {
14                parent::__construct();
15        }
16
17        public function index()
18        {       
19                $this->load->model('User_model');
20                $user_info = $this->session->userdata('userInfo');
21                $aryParams = array();
22                parse_str($user_info['user'], $aryParams);             
23                $licenseAvailable = $this->User_model->checkLicense($aryParams['id']);
24                $licenseAvailable = $licenseAvailable == TRUE ? 'OK': '!OK';
25               
26                if ($user_info){
27                        $username = $user_info['username'];
28                        $this->load->view ( 'lecture_editor', array('username'=>$username, 'licenseAvailable' => $licenseAvailable));
29
30                }else{
31                        redirect('/frontend/home/');
32                }
33               
34        }
35}
36
37/* End of file home.php */
38/* Location: ./application/modules/frontend/controllers/Lecture.php */
Note: See TracBrowser for help on using the repository browser.