mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-31 07:09:30 +02:00
check if router has plan
This commit is contained in:
parent
c5b96df43f
commit
c9eeefcf3d
2 changed files with 119 additions and 98 deletions
|
@ -299,4 +299,23 @@ class Validator
|
|||
return (bool)in_array($format, $formats);
|
||||
}
|
||||
|
||||
public static function countRouterPlan($plans, $router){
|
||||
$n = 0;
|
||||
foreach ($plans as $plan){
|
||||
if($plan['routers'] == $router){
|
||||
$n++;
|
||||
}
|
||||
}
|
||||
return $n;
|
||||
}
|
||||
|
||||
public static function isRouterHasPlan($plans, $router){
|
||||
foreach ($plans as $plan){
|
||||
if($plan['routers'] == $router){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue