where('id', $routes['2'])->where('username', $user['username'])->findOne(); if ($bill['type'] == 'Hotspot' && $bill['status'] == 'on') { $m = Mikrotik::info($bill['routers']); $client = Mikrotik::getClient($m['ip_address'], $m['username'], $m['password']); if (Mikrotik::isUserLogin($client, $user['username'])) { die(''.Lang::T('You are Online, Logout?').''); } else { if (!empty($_SESSION['nux-mac']) && !empty($_SESSION['nux-ip'])) { die(''.Lang::T('Not Online, Login now?').''); }else{ die(Lang::T('Your account not connected to internet')); } } } else { die('--'); } break; default: $ui->display('404.tpl'); }