new $p['device'] to (new $p['device'])
This commit is contained in:
parent
0c8f590f85
commit
c661976eae
@ -224,7 +224,7 @@ class Package
|
||||
$dvc = Package::getDevice($p);
|
||||
if (file_exists($dvc)) {
|
||||
require_once $dvc;
|
||||
new $p['device']->add_customer($c, $p);
|
||||
(new $p['device'])->add_customer($c, $p);
|
||||
} else {
|
||||
new Exception(Lang::T("Devices Not Found"));
|
||||
}
|
||||
@ -307,7 +307,7 @@ class Package
|
||||
$dvc = Package::getDevice($p);
|
||||
if (file_exists($dvc)) {
|
||||
require_once $dvc;
|
||||
new $p['device']->add_customer($c, $p);
|
||||
(new $p['device'])->add_customer($c, $p);
|
||||
} else {
|
||||
new Exception(Lang::T("Devices Not Found"));
|
||||
}
|
||||
@ -415,7 +415,7 @@ class Package
|
||||
$dvc = Package::getDevice($p);
|
||||
if (file_exists($dvc)) {
|
||||
require_once $dvc;
|
||||
new $p['device']->change_customer($b, $c, $p);
|
||||
(new $p['device'])->change_customer($b, $c, $p);
|
||||
} else {
|
||||
new Exception(Lang::T("Devices Not Found"));
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ switch ($action) {
|
||||
$dvc = Package::getDevice($p);
|
||||
if (file_exists($dvc)) {
|
||||
require_once $dvc;
|
||||
new $p['device']->remove_customer($c, $p);
|
||||
(new $p['device'])->remove_customer($c, $p);
|
||||
} else {
|
||||
new Exception(Lang::T("Devices Not Found"));
|
||||
}
|
||||
|
@ -216,7 +216,7 @@ switch ($action) {
|
||||
$dvc = Package::getDevice($p);
|
||||
if (file_exists($dvc)) {
|
||||
require_once $dvc;
|
||||
new $p['device']->change_customer($c, $p);
|
||||
(new $p['device'])->change_customer($c, $p);
|
||||
} else {
|
||||
new Exception(Lang::T("Devices Not Found"));
|
||||
}
|
||||
@ -244,7 +244,7 @@ switch ($action) {
|
||||
$dvc = Package::getDevice($p);
|
||||
if (file_exists($dvc)) {
|
||||
require_once $dvc;
|
||||
new $p['device']->add_customer($c, $p);
|
||||
(new $p['device'])->add_customer($c, $p);
|
||||
} else {
|
||||
new Exception(Lang::T("Devices Not Found"));
|
||||
}
|
||||
@ -332,7 +332,7 @@ switch ($action) {
|
||||
$dvc = Package::getDevice($p);
|
||||
if (file_exists($dvc)) {
|
||||
require_once $dvc;
|
||||
new $p['device']->remove_customer($d, $p);
|
||||
(new $p['device'])->remove_customer($d, $p);
|
||||
} else {
|
||||
new Exception(Lang::T("Devices Not Found"));
|
||||
}
|
||||
@ -571,8 +571,8 @@ switch ($action) {
|
||||
$dvc = Package::getDevice($p);
|
||||
if (file_exists($dvc)) {
|
||||
require_once $dvc;
|
||||
new $p['device']->remove_customer($d, $p);
|
||||
new $p['device']->add_customer($d, $p);
|
||||
(new $p['device'])->remove_customer($d, $p);
|
||||
(new $p['device'])->add_customer($d, $p);
|
||||
} else {
|
||||
new Exception(Lang::T("Devices Not Found"));
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ if (isset($_GET['recharge']) && !empty($_GET['recharge'])) {
|
||||
$dvc = Package::getDevice($p);
|
||||
if (file_exists($dvc)) {
|
||||
require_once $dvc;
|
||||
new $p['device']->add_customer($user, $p);
|
||||
(new $p['device'])->add_customer($user, $p);
|
||||
} else {
|
||||
new Exception(Lang::T("Devices Not Found"));
|
||||
}
|
||||
@ -190,7 +190,7 @@ if (isset($_GET['recharge']) && !empty($_GET['recharge'])) {
|
||||
$dvc = Package::getDevice($p);
|
||||
if (file_exists($dvc)) {
|
||||
require_once $dvc;
|
||||
new $p['device']->remove_customer($user, $p);
|
||||
(new $p['device'])->remove_customer($user, $p);
|
||||
} else {
|
||||
new Exception(Lang::T("Devices Not Found"));
|
||||
}
|
||||
@ -215,10 +215,10 @@ if (!empty($_SESSION['nux-mac']) && !empty($_SESSION['nux-ip'])) {
|
||||
if (file_exists($dvc)) {
|
||||
require_once $dvc;
|
||||
if ($_GET['mikrotik'] == 'login') {
|
||||
new $p['device']->connect_customer($user, $_SESSION['nux-ip'], $_SESSION['nux-mac'], $bill['routers']);
|
||||
(new $p['device'])->connect_customer($user, $_SESSION['nux-ip'], $_SESSION['nux-mac'], $bill['routers']);
|
||||
r2(U . 'home', 's', Lang::T('Login Request successfully'));
|
||||
} else if ($_GET['mikrotik'] == 'logout') {
|
||||
new $p['device']->disconnect_customer($user, $bill['routers']);
|
||||
(new $p['device'])->disconnect_customer($user, $bill['routers']);
|
||||
r2(U . 'home', 's', Lang::T('Logout Request successfully'));
|
||||
}
|
||||
} else {
|
||||
|
@ -46,7 +46,7 @@ switch ($action) {
|
||||
$dvc = Package::getDevice($plan);
|
||||
if (file_exists($dvc)) {
|
||||
require_once $dvc;
|
||||
new $p['device']->add_customer($c, $p);
|
||||
(new $p['device'])->add_customer($c, $p);
|
||||
} else {
|
||||
new Exception(Lang::T("Devices Not Found"));
|
||||
}
|
||||
@ -260,7 +260,7 @@ switch ($action) {
|
||||
$p = ORM::for_table('tbl_plans')->find_one($d['plan_id']);
|
||||
if (file_exists($dvc)) {
|
||||
require_once $dvc;
|
||||
new $p['device']->remove_customer($c, $p);
|
||||
(new $p['device'])->remove_customer($c, $p);
|
||||
} else {
|
||||
new Exception(Lang::T("Devices Not Found"));
|
||||
}
|
||||
@ -776,7 +776,7 @@ switch ($action) {
|
||||
$dvc = Package::getDevice($p);
|
||||
if (file_exists($dvc)) {
|
||||
require_once $dvc;
|
||||
new $p['device']->add_customer($c, $p);
|
||||
(new $p['device'])->add_customer($c, $p);
|
||||
} else {
|
||||
new Exception(Lang::T("Devices Not Found"));
|
||||
}
|
||||
|
@ -30,14 +30,14 @@ switch ($action) {
|
||||
$dvc = Package::getDevice($plan);
|
||||
if (file_exists($dvc)) {
|
||||
require_once $dvc;
|
||||
new $p['device']->add_plan($plan);
|
||||
(new $p['device'])->add_plan($plan);
|
||||
if (!empty($plan['pool_expired'])) {
|
||||
$plan->name_plan = 'EXPIRED NUXBILL ' . $pool_expired;
|
||||
$plan->rate_down_unit = "Kbps";
|
||||
$plan->rate_up_unit == 'Kbps';
|
||||
$plan->rate_up = '512';
|
||||
$plan->rate_down = '512';
|
||||
new $p['device']->add_plan($plan);
|
||||
(new $p['device'])->add_plan($plan);
|
||||
}
|
||||
} else {
|
||||
new Exception(Lang::T("Devices Not Found"));
|
||||
@ -52,14 +52,14 @@ switch ($action) {
|
||||
$dvc = Package::getDevice($plan);
|
||||
if (file_exists($dvc)) {
|
||||
require_once $dvc;
|
||||
new $p['device']->add_plan($plan);
|
||||
(new $p['device'])->add_plan($plan);
|
||||
if (!empty($plan['pool_expired'])) {
|
||||
$plan->name_plan = 'EXPIRED NUXBILL ' . $pool_expired;
|
||||
$plan->rate_down_unit = "Kbps";
|
||||
$plan->rate_up_unit == 'Kbps';
|
||||
$plan->rate_up = '512';
|
||||
$plan->rate_down = '512';
|
||||
new $p['device']->add_plan($plan);
|
||||
(new $p['device'])->add_plan($plan);
|
||||
}
|
||||
} else {
|
||||
new Exception(Lang::T("Devices Not Found"));
|
||||
@ -119,7 +119,7 @@ switch ($action) {
|
||||
$dvc = Package::getDevice($d);
|
||||
if (file_exists($dvc)) {
|
||||
require_once $dvc;
|
||||
new $p['device']->remove_plan($d);
|
||||
(new $p['device'])->remove_plan($d);
|
||||
} else {
|
||||
new Exception(Lang::T("Devices Not Found"));
|
||||
}
|
||||
@ -223,14 +223,14 @@ switch ($action) {
|
||||
$dvc = Package::getDevice($d);
|
||||
if (file_exists($dvc)) {
|
||||
require_once $dvc;
|
||||
new $p['device']->add_plan($d);
|
||||
(new $p['device'])->add_plan($d);
|
||||
if (!empty($pool_expired)) {
|
||||
$d->name_plan = 'EXPIRED NUXBILL ' . $pool_expired;
|
||||
$d->rate_down_unit = "Kbps";
|
||||
$d->rate_up_unit == 'Kbps';
|
||||
$d->rate_up = '512';
|
||||
$d->rate_down = '512';
|
||||
new $p['device']->add_plan($d);
|
||||
(new $p['device'])->add_plan($d);
|
||||
}
|
||||
} else {
|
||||
new Exception(Lang::T("Devices Not Found"));
|
||||
@ -323,7 +323,7 @@ switch ($action) {
|
||||
$dvc = Package::getDevice($d);
|
||||
if (file_exists($dvc)) {
|
||||
require_once $dvc;
|
||||
new $d['device']->update_plan($old, $d);
|
||||
(new $d['device'])->update_plan($old, $d);
|
||||
if (!empty($pool_expired)) {
|
||||
$old->name_plan = 'EXPIRED NUXBILL ' . $old['pool_expired'];
|
||||
$d->name_plan = 'EXPIRED NUXBILL ' . $pool_expired;
|
||||
@ -331,7 +331,7 @@ switch ($action) {
|
||||
$d->rate_up_unit == 'Kbps';
|
||||
$d->rate_up = '512';
|
||||
$d->rate_down = '512';
|
||||
new $d['device']->update_plan($old, $d);
|
||||
(new $d['device'])->update_plan($old, $d);
|
||||
}
|
||||
} else {
|
||||
new Exception(Lang::T("Devices Not Found"));
|
||||
@ -403,7 +403,7 @@ switch ($action) {
|
||||
$dvc = Package::getDevice($d);
|
||||
if (file_exists($dvc)) {
|
||||
require_once $dvc;
|
||||
new $p['device']->remove_plan($d);
|
||||
(new $p['device'])->remove_plan($d);
|
||||
} else {
|
||||
new Exception(Lang::T("Devices Not Found"));
|
||||
}
|
||||
@ -494,14 +494,14 @@ switch ($action) {
|
||||
$dvc = Package::getDevice($d);
|
||||
if (file_exists($dvc)) {
|
||||
require_once $dvc;
|
||||
new $p['device']->add_plan($d);
|
||||
(new $p['device'])->add_plan($d);
|
||||
if (!empty($pool_expired)) {
|
||||
$d->name_plan = 'EXPIRED NUXBILL ' . $pool_expired;
|
||||
$d->rate_down_unit = "Kbps";
|
||||
$d->rate_up_unit == 'Kbps';
|
||||
$d->rate_up = '512';
|
||||
$d->rate_down = '512';
|
||||
new $p['device']->add_plan($d);
|
||||
(new $p['device'])->add_plan($d);
|
||||
}
|
||||
} else {
|
||||
new Exception(Lang::T("Devices Not Found"));
|
||||
@ -583,7 +583,7 @@ switch ($action) {
|
||||
$dvc = Package::getDevice($d);
|
||||
if (file_exists($dvc)) {
|
||||
require_once $dvc;
|
||||
new $d['device']->update_plan($old, $d);
|
||||
(new $d['device'])->update_plan($old, $d);
|
||||
if (!empty($pool_expired)) {
|
||||
$old->name_plan = 'EXPIRED NUXBILL ' . $old['pool_expired'];
|
||||
$d->name_plan = 'EXPIRED NUXBILL ' . $pool_expired;
|
||||
@ -591,7 +591,7 @@ switch ($action) {
|
||||
$d->rate_up_unit == 'Kbps';
|
||||
$d->rate_up = '512';
|
||||
$d->rate_down = '512';
|
||||
new $d['device']->update_plan($old, $d);
|
||||
(new $d['device'])->update_plan($old, $d);
|
||||
}
|
||||
} else {
|
||||
new Exception(Lang::T("Devices Not Found"));
|
||||
|
@ -35,7 +35,7 @@ foreach ($d as $ds) {
|
||||
$dvc = Package::getDevice($p);
|
||||
if (file_exists($dvc)) {
|
||||
require_once $dvc;
|
||||
new $p['device']->remove_customer($ds['routers'], $c, $p);
|
||||
(new $p['device'])->remove_customer($ds['routers'], $c, $p);
|
||||
} else {
|
||||
echo "Cron error Devices $p[device] not found, cannot disconnect $c[username]";
|
||||
Message::sendTelegram("Cron error Devices $p[device] not found, cannot disconnect $c[username]");
|
||||
|
Loading…
x
Reference in New Issue
Block a user