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

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