Beispiel #1
0
 public function _initialize()
 {
     parent::_initialize();
     $this->_mod = D('items');
     $api_config = M('items_site')->where(array('code' => 'ftxia'))->getField('config');
     $this->_tbconfig = unserialize($api_config);
 }
 public function _initialize()
 {
     parent::_initialize();
     $this->_mod = D('items');
     $this->_cate_mod = D('zc_cate');
     $this->assign('nav_curr', 'index');
 }
Beispiel #3
0
 public function _initialize()
 {
     parent::_initialize();
     $this->_mod = D('items');
     $this->_cate_mod = D('items_cate');
     C('DATA_CACHE_TIME', C('ftx_site_cachetime'));
 }
Beispiel #4
0
 public function _initialize()
 {
     parent::_initialize();
     $this->cats_mod = D('article_cate');
     $this->article_mod = M('article');
     $this->cats_list = $this->cats_mod->get_cats();
     $this->assign('acats', $this->cats_list);
 }
 public function _initialize()
 {
     parent::_initialize();
     //访问者控制
     if (!$this->visitor->is_login && !in_array(ACTION_NAME, array('login', 'register', 'binding', 'ajax_check'))) {
         IS_AJAX && $this->ajaxReturn(0, L('login_please'));
         $this->redirect('user/login');
     }
     $this->_curr_menu(ACTION_NAME);
 }
Beispiel #6
0
 public function _initialize()
 {
     parent::_initialize();
     $this->_mod = D('items');
     //访问者控制
     if (!$this->visitor->is_login) {
         IS_AJAX && $this->ajaxReturn(0, L('login_please'));
         $this->redirect('user/login');
     }
 }
Beispiel #7
0
 public function _initialize()
 {
     parent::_initialize();
     if (!$this->visitor->is_login && !in_array(ACTION_NAME, array('login', 'register', 'binding', 'ajax_check'))) {
         $id = I('id', '', 'intval');
         $iid = I('iid', '', 'trim');
         $url = U('jump/index', array('id' => $id, 'iid' => $iid));
         $this->redirect('user/login', array('ret_url' => $url));
     }
 }
Beispiel #8
0
 public function _initialize()
 {
     parent::_initialize();
     $this->_mod = D("items");
     $this->_cate_mod = D('items_cate');
     if (false === ($cate_list = F('cate_list'))) {
         $cate_list = $this->_cate_mod->cate_cache();
     }
     $this->assign('cate_list', $cate_list);
     //ио└Я
 }
Beispiel #9
0
 public function _initialize()
 {
     parent::_initialize();
     $info = $this->visitor->get();
     $this->assign('info', $info);
     $this->assign('nav_curr', 'gift');
     if (false === ($cate_list = F('score_item_cate_list'))) {
         $cate_list = D('score_item_cate')->cate_cache();
     }
     $this->assign('cate_list', $cate_list);
 }
 public function _initialize()
 {
     parent::_initialize();
     if (!$this->visitor->is_login) {
         IS_AJAX && $this->ajaxReturn(0, L('login_please'));
         $this->redirect('user/login');
     }
     $this->_mod = D('items');
     $this->cid = $_SERVER['HTTP_HOST'];
     $this->_cate_mod = D('items_cate');
     $this->assign('nav_curr', 'index');
 }
Beispiel #11
0
 public function _initialize()
 {
     parent::_initialize();
     $this->_mod = D('items');
     $this->_cate_mod = D('items_cate');
     $this->assign('nav_curr', 'index');
     //访问者控制
     if (!$this->visitor->is_login && in_array(ACTION_NAME, array('delete', 'comment', 'delcol', 'mycol'))) {
         IS_AJAX && $this->ajaxReturn(0, L('login_please'));
         $this->redirect('user/login');
     }
 }
Beispiel #12
0
 protected function _initialize()
 {
     parent::_initialize();
     $this->_name = $this->getActionName();
     import("@.ORG.emchat.Easemob");
     $options['client_id'] = 'YXA6LmIQkGABEeSKuZvpqLd4sw';
     $options['client_secret'] = 'YXA6tfRdlpkrAfO5FlPnzIRRZTQNR-Q';
     $options['org_name'] = 'bingley';
     $options['app_name'] = 'canyoutong';
     $this->_emchat_mod = new Easemob($options);
     $this->_groupid = '153727539213239348';
 }
 public function _initialize()
 {
     parent::_initialize();
     $this->_name = $this->getActionName();
     $uid = I('uid', '0', 'intval');
     if ($uid) {
         $user_log = M('user_log');
         $data['uid'] = $uid;
         $data['module'] = MODULE_NAME;
         $data['action'] = ACTION_NAME;
         $data['add_time'] = time();
         $user_log->add($data);
     }
 }
 public function _initialize()
 {
     parent::_initialize();
     if (!$this->visitor->is_login) {
         IS_AJAX && $this->ajaxReturn(0, L('login_please'));
         $this->redirect('user/login');
     }
     $this->_mod = D('items');
     $this->cid = $_SERVER['HTTP_HOST'];
     $this->_cate_mod = D('items_cate');
     $this->assign('nav_curr', 'index');
     $api_config = M('items_site')->where(array('code' => 'ftxia'))->getField('config');
     $this->_ftxconfig = unserialize($api_config);
 }
Beispiel #15
0
 public function _initialize()
 {
     parent::_initialize();
     $this->_mod = D('items');
     if (C('ftx_site_cache')) {
         $file = 'items_site';
         if (false === ($this->_ftxconfig = S($file))) {
             $api_config = M('items_site')->where(array('code' => 'ftxia'))->getField('config');
             $this->_ftxconfig = unserialize($api_config);
             S($file, $this->_ftxconfig);
         }
     } else {
         $api_config = M('items_site')->where(array('code' => 'ftxia'))->getField('config');
         $this->_ftxconfig = unserialize($api_config);
     }
 }
 public function _initialize()
 {
     parent::_initialize();
     $this->_mod = D('items');
     $this->_cate_mod = D('items_cate');
     $this->assign('nav_curr', 'index');
     //访问者控制
     if (!$this->visitor->is_login && in_array(ACTION_NAME, array('delete', 'comment', 'delcol', 'mycol'))) {
         IS_AJAX && $this->ajaxReturn(0, L('login_please'));
         $this->redirect('user/login');
     }
     if (C('ftx_site_cache')) {
         $file = 'items_site';
         if (false === ($this->_ftxconfig = S($file))) {
             $api_config = M('items_site')->where(array('code' => 'ftxia'))->getField('config');
             $this->_ftxconfig = unserialize($api_config);
             S($file, $this->_ftxconfig);
         }
     } else {
         $api_config = M('items_site')->where(array('code' => 'ftxia'))->getField('config');
         $this->_ftxconfig = unserialize($api_config);
     }
 }
Beispiel #17
0
 public function _initialize()
 {
     parent::_initialize();
     $this->_mod = D('items_comment');
 }
Beispiel #18
0
 public function _initialize()
 {
     parent::_initialize();
     $this->item_mod = D('items');
     $this->report_mod = D('report');
 }
Beispiel #19
0
 public function _initialize()
 {
     parent::_initialize();
     $this->_mod = D('items');
     $this->_cate_mod = D('items_cate');
 }
Beispiel #20
0
 public function _initialize()
 {
     parent::_initialize();
 }
Beispiel #21
0
 public function _initialize()
 {
     parent::_initialize();
     $this->assign('nav_curr', 'gift');
 }