check if demo or not

This commit is contained in:
Ibnu Maksum
2024-06-12 15:39:43 +07:00
parent 987e21b3ce
commit 6a4ac274d1
13 changed files with 28 additions and 152 deletions

View File

@ -18,7 +18,7 @@ switch ($action) {
$bill = ORM::for_table('tbl_user_recharges')->where('id', $routes['2'])->where('username', $user['username'])->findOne();
if ($bill['type'] == 'Hotspot' && $bill['status'] == 'on') {
$dvc = Package::getDevice($d);
if (file_exists($dvc)) {
if (file_exists($dvc) && $_app_stage != 'demo') {
require_once $dvc;
if ((new $d['device'])->online_customer($user, $bill['routers'])) {
die('<a href="' . U . 'home&mikrotik=logout&id='.$bill['id'].'" onclick="return confirm(\''.Lang::T('Disconnect Internet?').'\')" class="btn btn-success btn-xs btn-block">'.Lang::T('You are Online, Logout?').'</a>');