static function PlanStatus($planid) { $plan = new SubscriptionPlan(); $plan->load($planid); return $plan->active && $plan->checkInventory(); }