mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-04 02:04:53 +02:00
check if demo or not
This commit is contained in:
parent
987e21b3ce
commit
6a4ac274d1
13 changed files with 28 additions and 152 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue