function MemberApp() { parent::__construct(); $ms =& ms(); $this->_feed_enabled = $ms->feed->feed_enabled(); $this->assign('feed_enabled', $this->_feed_enabled); }
function MembershipApp() { parent::__construct(); $this->_user_id = $this->visitor->get('user_id'); $this->_store_mod =& m('store'); $this->_membership_card_info_mod =& m('membership_card_info'); $this->_membership_setting_mod =& m('membership_setting'); }
function Buyer_groupbuyApp() { parent::__construct(); $this->_goods_mod =& m('goods'); $this->_store_mod =& m('store'); $this->_groupbuy_mod =& m('groupbuy'); $this->_member_mod =& m('member'); }
function SearchApp() { parent::__construct(); $this->_order_mod =& m('order'); $this->_order_goods_mod =& m('ordergoods'); $this->_store_mod =& m('store'); $this->_goodsstatistics_mod =& m('goodsstatistics'); }
function MemberApp() { parent::__construct(); $this->ms =& ms(); //连接用户中心 //$this->_feed_enabled = $this->ms->feed->feed_enabled(); //$this->assign('feed_enabled', $this->_feed_enabled); $this->model_member =& m('member'); }
function _run_action() { /* 只有登录的用户才可访问 */ if (!$this->visitor->has_login && !in_array(ACT, array('login', 'register', 'check_user'))) { if (!IS_AJAX) { header('Location:index.php?app=member&act=login&ret_url=' . rawurlencode($_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'])); return; } else { $this->json_error('login_please'); return; } } /* 检查是否是店铺管理员 */ if (!$this->visitor->get('manage_store')) { /* 您不是店铺管理员 */ $this->show_warning('not_storeadmin', 'apply_now', 'index.php?app=apply', 'go_back'); return; } /* 检查是否被授权 */ $privileges = $this->_get_privileges(); if (!$this->visitor->i_can('do_action', $privileges)) { $this->show_warning('no_permission'); return; } /* 检查店铺开启状态 */ $state = $this->visitor->get('state'); if ($state == 0) { $this->show_warning('apply_not_agree'); return; } elseif ($state == 2) { $this->show_warning('store_is_closed'); return; } parent::_run_action(); }
function Order_expressApp() { parent::__construct(); $this->_order_mod =& m('order'); }
function My_commentApp() { parent::__construct(); $this->_ordergoods_mod =& m('ordergoods'); }
function My_questionApp() { parent::__construct(); $this->my_qa_mod =& m('goodsqa'); }
function MessageApp() { parent::__construct(); }
function My_favoriteApp() { parent::__construct(); }
function _run_action() { /* 只有登录的用户才可访问 */ if (!$this->visitor->has_login && !in_array(ACT, array('login', 'register', 'check_user'))) { if (!IS_AJAX) { header('Location:index.php?app=member&act=login&ret_url=' . rawurlencode($_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'])); return; } else { $this->json_error('login_please'); return; } } $referer = $_SERVER['HTTP_REFERER']; if (strpos($referer, 'act=login') === false) { $ret_url = $_SERVER['HTTP_REFERER']; $ret_text = 'go_back'; } else { $ret_url = SITE_URL . '/index.php'; $ret_text = 'back_index'; } /* 检查是否是店铺管理员 */ if (!$this->visitor->get('manage_store')) { /* 您不是店铺管理员 */ $this->show_warning('not_storeadmin', 'apply_now', 'index.php?app=apply', $ret_text, $ret_url); return; } /* 检查是否被授权 */ $privileges = $this->_get_privileges(); if (!$this->visitor->i_can('do_action', $privileges)) { $this->show_warning('no_permission', $ret_text, $ret_url); return; } /* 检查店铺开启状态 */ $state = $this->visitor->get('state'); if ($state == 0) { $this->show_warning('apply_not_agree', $ret_text, $ret_url); return; } elseif ($state == 2) { $this->show_warning('store_is_closed', $ret_text, $ret_url); return; } /* 检查附加功能 */ if (!$this->_check_add_functions()) { $this->show_warning('not_support_function', $ret_text, $ret_url); return; } parent::_run_action(); }