Rev | Line | |
---|
[553] | 1 | <?php
|
---|
| 2 |
|
---|
| 3 | if (!defined('BASEPATH'))
|
---|
| 4 | exit('No direct script access allowed');
|
---|
| 5 |
|
---|
[313] | 6 | /**
|
---|
| 7 | * Lecture Class
|
---|
| 8 | *
|
---|
| 9 | * @author dzungnv02
|
---|
| 10 | *
|
---|
| 11 | */
|
---|
[553] | 12 | class 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');
|
---|
| 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 | if ($user_info) {
|
---|
| 26 | $username = $user_info['username'];
|
---|
| 27 | $first_visit=0;
|
---|
| 28 | if (!$this->session->userdata('first_visit'))
|
---|
| 29 | {
|
---|
| 30 | $this->session->set_userdata('first_visit','1');
|
---|
| 31 | $first_visit=1;
|
---|
| 32 | }
|
---|
| 33 | $this->load->view('lecture_editor', array('username' => $username, 'licenseAvailable' => $licenseAvailable, 'first_visit' => $first_visit));
|
---|
| 34 | } else {
|
---|
| 35 | redirect('/frontend/home/');
|
---|
| 36 | }
|
---|
| 37 | }
|
---|
[326] | 38 |
|
---|
[313] | 39 | }
|
---|
| 40 |
|
---|
| 41 | /* End of file home.php */
|
---|
| 42 | /* Location: ./application/modules/frontend/controllers/Lecture.php */ |
---|
Note: See
TracBrowser
for help on using the repository browser.