Changeset 553 for pro-violet-viettel/sourcecode/application/modules
- Timestamp:
- Nov 18, 2014 12:18:20 PM (11 years ago)
- Location:
- pro-violet-viettel/sourcecode/application/modules/frontend
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/frontend/controllers/lecture.php
r490 r553 1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 1 <?php 2 3 if (!defined('BASEPATH')) 4 exit('No direct script access allowed'); 5 2 6 /** 3 7 * Lecture Class … … 6 10 * 7 11 */ 12 class Lecture extends MX_Controller { 8 13 9 class Lecture extends MX_Controller 10 { 11 12 public function __construct() 13 { 14 parent::__construct(); 15 } 14 public function __construct() { 15 parent::__construct(); 16 } 16 17 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 if ($user_info){ 26 $username = $user_info['username']; 27 $this->load->view ( 'lecture_editor', array('username'=>$username, 'licenseAvailable' => $licenseAvailable)); 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 } 28 38 29 }else{30 redirect('/frontend/home/');31 }32 33 }34 39 } 35 40 -
pro-violet-viettel/sourcecode/application/modules/frontend/views/lecture_editor.php
r490 r553 40 40 var licenseAvailable = "<?php echo $licenseAvailable;?>"; 41 41 var url= "<?php echo base_url();?>"; 42 var first_visit= "<?php echo $first_visit;?>"; 42 43 </script> 43 44 <?php
Note: See TracChangeset
for help on using the changeset viewer.