activate plan when its on

This commit is contained in:
Ibnu Maksum 2024-02-02 13:39:03 +07:00
parent 4ab32bc68d
commit 788e558171
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5

View File

@ -244,7 +244,9 @@ switch ($action) {
$d->routers = $p['routers']; $d->routers = $p['routers'];
} }
$d->save(); $d->save();
if($d['status'] == 'on'){
Package::changeTo($username, $id_plan, $id); Package::changeTo($username, $id_plan, $id);
}
_log('[' . $admin['username'] . ']: ' . 'Edit Plan for Customer ' . $d['username'] . ' to [' . $d['plan_name'] . '][' . Lang::moneyFormat($d['price']) . ']', 'Admin', $admin['id']); _log('[' . $admin['username'] . ']: ' . 'Edit Plan for Customer ' . $d['username'] . ' to [' . $d['plan_name'] . '][' . Lang::moneyFormat($d['price']) . ']', 'Admin', $admin['id']);
r2(U . 'prepaid/list', 's', $_L['Updated_Successfully']); r2(U . 'prepaid/list', 's', $_L['Updated_Successfully']);
} else { } else {