load->helper('language'); $this->lang->load('messages', 'message'); } public function index() { $this->load->model('User_model'); $user_info = $this->session->userdata('userInfo'); $aryParams = array(); parse_str($user_info['user'], $aryParams); $licenseAvailable = isset($aryParams['id']) ? $this->User_model->checkLicense($aryParams['id']) : FALSE; $licenseAvailable = $licenseAvailable == TRUE ? 'OK' : '!OK'; if ($user_info) { $username = $user_info['username']; $first_visit=0; $update_user_info=0; parse_str($user_info['user'], $info); $this->load->model('user_model'); $user = $user_info['user']; $us_id = $user_info['us_id']; $u = $this->user_model->get_user_by_id($us_id); $info['fullname'] = isset($info['fullname']) ? $info['fullname'] : ''; if ($info['fullname'] == '' && $u['p_id'] != '') { $update_user_info=1; } if ($u['province'] == '' && $u['p_id'] != ''){ $update_user_info=1; } if (!$this->session->userdata('first_visit')) { $this->session->set_userdata('first_visit','1'); $first_visit=1; } $isOverDate = strtotime($u['expire_date']) < strtotime(date('Y-m-d')) ? 0:1; $this->load->view('lecture_editor', array('username' => $username, 'licenseAvailable' => $licenseAvailable, 'first_visit' => $first_visit, 'licflashVars' => $aryParams,'update_user_info'=>$update_user_info,'us_id'=>$us_id,"p_period"=>$u['p_period'],"expire_date"=>date("d-m-Y", strtotime($u['expire_date'])), 'isOverDate' => $isOverDate , "fullname"=>$info['fullname'], "school"=>$info['school'], "province"=>$u['province'], "provinces"=>lang('_PROVINCES_'))); } else { redirect('/frontend/home/'); } } public function help(){ $this->load->view('help'); } } /* End of file home.php */ /* Location: ./application/modules/frontend/controllers/Lecture.php */