コード例 #1
0
 function __construct()
 {
     parent::__construct();
     if (!$this->session->userdata('logged_in')) {
         redirect('user/login', 301);
     }
 }
コード例 #2
0
ファイル: node.php プロジェクト: stoneStyle/startbbs
 function __construct()
 {
     parent::__construct();
     $this->load->model('topic_m');
     $this->load->model('cate_m');
     $this->load->library('myclass');
 }
コード例 #3
0
ファイル: comment.php プロジェクト: jenny-z/startbbs
 function __construct()
 {
     parent::__construct();
     $this->load->library('myclass');
     $this->load->library('session');
     $this->uid = $this->session->userdata('uid');
     $this->config->load('topicset');
     $this->load->library('form_validation');
 }
コード例 #4
0
ファイル: favorites.php プロジェクト: stoneStyle/startbbs
 function __construct()
 {
     parent::__construct();
     $this->load->library('myclass');
     $uid = $this->session->userdata('uid');
     if (!$this->auth->is_user($uid)) {
         show_message('请登录后再查看', site_url('user/login'));
     }
 }
コード例 #5
0
ファイル: home.php プロジェクト: stoneStyle/startbbs
 function __construct()
 {
     parent::__construct();
     $this->load->model('topic_m');
     $this->load->model('cate_m');
     $this->load->library('myclass');
     $this->load->model('link_m');
     $this->home_page_num = $this->config->item('home_page_num') ? $this->config->item('home_page_num') : 20;
 }
コード例 #6
0
ファイル: follow.php プロジェクト: stoneStyle/startbbs
 function __construct()
 {
     parent::__construct();
     $this->load->library('myclass');
     $this->load->model('follow_m');
     $uid = $this->session->userdata('uid');
     if (!$this->auth->is_user($uid)) {
         show_message('非法用户uid');
     }
 }
コード例 #7
0
ファイル: config.php プロジェクト: HRVConsultores/elearning
 public function __construct()
 {
     parent::__construct();
     $this->data = array('pageTitle' => 'Site Config', 'pageNote' => 'Manage Setting COnfiguration');
     if (!$this->session->userdata('logged_in')) {
         redirect('user/login', 301);
     }
     if ($this->session->userdata('gid') != 1) {
         redirect('dashboard', 301);
     }
 }
コード例 #8
0
ファイル: upload.php プロジェクト: stoneStyle/startbbs
 function __construct()
 {
     parent::__construct();
     $this->upload_path_temp = FCPATH . 'uploads/file/tmp';
     $this->upload_path = FCPATH . 'uploads/file/';
     $this->upload_path_url = base_url() . 'uploads/file/' . date('Ym') . '/';
     $this->path = $this->upload_path . '/' . date('Ym') . '/';
     //这里使用“年-月”格式,可根据需要改为“年-月-日”格式
     if (!file_exists($this->path)) {
         mkdir($this->path, 0777, true);
     }
 }
コード例 #9
0
 function __construct()
 {
     parent::__construct();
     $this->load->model('availablemodel');
     $this->model = $this->availablemodel;
     $this->info = $this->model->makeInfo($this->module);
     $this->access = $this->model->validAccess($this->info['id']);
     $this->data = array_merge($this->data, array('pageTitle' => $this->info['title'], 'pageNote' => $this->info['note'], 'pageModule' => 'available'));
     if (!$this->session->userdata('logged_in')) {
         redirect('user/login', 301);
     }
 }
コード例 #10
0
ファイル: settings.php プロジェクト: stoneStyle/startbbs
 function __construct()
 {
     parent::__construct();
     $this->load->model('user_m');
     $this->load->model('upload_m');
     $this->load->library('myclass');
     $this->load->library('form_validation');
     $this->load->helper('form');
     if (!$this->auth->is_login()) {
         redirect('user/login');
     }
 }
コード例 #11
0
ファイル: module.php プロジェクト: HRVConsultores/elearning
 public function __construct()
 {
     parent::__construct();
     $this->load->model('sximo/modulemodel');
     $this->model = $this->modulemodel;
     $this->data = array('pageTitle' => 'Module Management', 'pageNote' => 'Manage Setting COnfiguration');
     if (!$this->session->userdata('logged_in')) {
         redirect('user/login', 301);
     }
     if ($this->session->userdata('gid') != 1) {
         redirect('dashboard', 301);
     }
 }
コード例 #12
0
ファイル: menu.php プロジェクト: HRVConsultores/elearning
 public function __construct()
 {
     parent::__construct();
     $this->load->model('sximo/menumodel');
     $this->model = $this->menumodel;
     $this->info = $this->model->makeInfo($this->module);
     $this->access = $this->model->validAccess($this->info['id']);
     if (!$this->session->userdata('logged_in')) {
         redirect('user/login', 301);
     }
     if ($this->session->userdata('gid') != 1) {
         redirect('dashboard', 301);
     }
 }
コード例 #13
0
ファイル: pages.php プロジェクト: HRVConsultores/elearning
 public function __construct()
 {
     parent::__construct();
     $this->load->model('sximo/pagesmodel');
     $this->model = $this->pagesmodel;
     $this->info = $this->model->makeInfo($this->module);
     $this->access = $this->model->validAccess($this->info['id']);
     $this->data = array_merge($this->data, array('pageTitle' => $this->info['title'], 'pageNote' => $this->info['note'], 'pageModule' => 'pages'));
     if (!$this->session->userdata('logged_in')) {
         redirect('user/login', 301);
     }
     if ($this->session->userdata('gid') != 1) {
         redirect('dashboard', 301);
     }
 }
コード例 #14
0
ファイル: page.php プロジェクト: stoneStyle/startbbs
 function __construct()
 {
     parent::__construct();
     $this->load->model('page_m');
 }
コード例 #15
0
ファイル: user.php プロジェクト: stoneStyle/startbbs
 function __construct()
 {
     parent::__construct();
     $this->load->model('user_m');
     $this->load->library('form_validation');
 }