forked from kevinowino869/mitrobill
check if demo or not
This commit is contained in:
@ -214,7 +214,7 @@ switch ($action) {
|
||||
if ($p) {
|
||||
$p = ORM::for_table('tbl_plans')->where('id', $c['plan_id'])->find_one();
|
||||
$dvc = Package::getDevice($p);
|
||||
if (file_exists($dvc)) {
|
||||
if (file_exists($dvc) && $_app_stage != 'demo') {
|
||||
require_once $dvc;
|
||||
(new $p['device'])->change_customer($c, $p);
|
||||
} else {
|
||||
@ -242,7 +242,7 @@ switch ($action) {
|
||||
if ($p) {
|
||||
$routers[] = $b['routers'];
|
||||
$dvc = Package::getDevice($p);
|
||||
if (file_exists($dvc)) {
|
||||
if (file_exists($dvc) && $_app_stage != 'demo') {
|
||||
require_once $dvc;
|
||||
(new $p['device'])->add_customer($c, $p);
|
||||
} else {
|
||||
@ -330,7 +330,7 @@ switch ($action) {
|
||||
$p = ORM::for_table('tbl_plans')->find_one($c['plan_id']);
|
||||
if($p){
|
||||
$dvc = Package::getDevice($p);
|
||||
if (file_exists($dvc)) {
|
||||
if (file_exists($dvc) && $_app_stage != 'demo') {
|
||||
require_once $dvc;
|
||||
(new $p['device'])->remove_customer($d, $p);
|
||||
} else {
|
||||
@ -569,7 +569,7 @@ switch ($action) {
|
||||
$c->save();
|
||||
$p = ORM::for_table('tbl_plans')->find_one($c['plan_id']);
|
||||
$dvc = Package::getDevice($p);
|
||||
if (file_exists($dvc)) {
|
||||
if (file_exists($dvc) && $_app_stage != 'demo') {
|
||||
require_once $dvc;
|
||||
(new $p['device'])->remove_customer($d, $p);
|
||||
(new $p['device'])->add_customer($d, $p);
|
||||
|
Reference in New Issue
Block a user