Exemplo n.º 1
0
 public function _initialize()
 {
     parent::_initialize();
     import('Think.ORG.Cart');
     // 导入分页类
     $cart = new Cart();
 }
Exemplo n.º 2
0
 public function _initialize() {
     parent::_initialize();
     //访问者控制
     if (!$this->visitor->is_login && in_array(ACTION_NAME, array('share_item', 'fetch_item', 'publish_item', 'like', 'unlike', 'delete', 'comment'))) {
         IS_AJAX && $this->ajaxReturn(0, L('login_please'));
         $this->redirect('User/login');
     }
 }
Exemplo n.º 3
0
 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);
 }
Exemplo n.º 4
0
 public function _initialize()
 {
     parent::_initialize();
     $this->assign('nav_curr', 'book');
     $m = new Model();
     $item_like_arr = $m->query('select item_id, count(1) cnt from tp_item_like group by item_id;');
     foreach ($item_like_arr as $one_like) {
         $item_like[$one_like['item_id']] = $one_like['cnt'];
     }
     //var_dump($item_like);exit;
     $this->assign('item_like', $item_like);
 }
Exemplo n.º 5
0
 public function _initialize()
 {
     parent::_initialize();
     $this->_mod = D('user');
     $this->_userid = user_login();
     if ($this->_userid) {
         $userinfo = $this->_mod->find($this->_userid);
         $this->assign('userid', $this->_userid);
         $this->assign('userinfo', $userinfo);
     }
     $this->assign('current', 'user');
     $seo['title'] = '会员中心';
     $this->_seo($seo);
 }
Exemplo n.º 6
0
 public function _initialize()
 {
     parent::_initialize();
 }
Exemplo n.º 7
0
 public function _initialize()
 {
     parent::_initialize();
     $this->assign('nav_curr', 'book');
 }
 public function _initialize()
 {
     parent::_initialize();
     $this->application_mod = M('application');
 }
Exemplo n.º 9
0
 public function _initialize()
 {
     parent::_initialize();
     $this->_mod = D('content');
     $this->cate_mod = D('category');
 }
Exemplo n.º 10
0
 public function _initialize()
 {
     parent::_initialize();
     $this->assign('href', trim($_SERVER['REDIRECT_URL'], '/'));
 }
Exemplo n.º 11
0
 public function _initialize()
 {
     parent::_initialize();
     $this->liuyan_mod = M('liuyan');
 }
Exemplo n.º 12
0
 public function _initialize()
 {
     parent::_initialize();
     $this->_mod = D('lang');
 }
Exemplo n.º 13
0
 public function _initialize()
 {
     parent::_initialize();
     $this->assign('current', 'user');
     $this->user_model = D('user');
 }