BothType, 'total_amount' => $total_amount, 'discount' => 0.04, 'package_type' => 'year']; } else { return []; } } function isVip($member_id) { if($member_id <=0 ) return false; $user_cards = new user_mcards($member_id); return $user_cards->hasCards(); } function canUseVip($goods_id) { global $config; $exclue_gids = $config['exclude_preferential_goods_ids']; if(empty($exclue_gids)) { return true; } else { return in_array(intval($goods_id),$exclue_gids) === false; } }