Beispiel #1
0
 public function __construct() {
     parent::__construct();
     if (!$_SESSION['member_id']){
         redirect('index.php?act=login&ref_url='.urlencode(request_uri()));
     }
     //验证该会员是否禁止购买
     if(!$_SESSION['is_buy']){
         showMessage(Language::get('cart_buy_noallow'),'','html','error');
     }
     Tpl::output('hidden_rtoolbar_cart', 1);
 }
Beispiel #2
0
 public function __construct()
 {
     parent::__construct();
     Language::read('home_cart_index');
     $op = isset($_GET['op']) ? $_GET['op'] : $_POST['op'];
     //允许不登录就可以访问的op
     $op_arr = array('ajax_load', 'add', 'del');
     if (!in_array($op, $op_arr) && !$_SESSION['member_id']) {
         $current_url = request_uri();
         redirect('index.php?act=login&ref_url=' . urlencode($current_url));
     }
 }