Qrcode scanner

This commit is contained in:
Ibnu Maksum
2024-06-20 11:33:15 +07:00
parent 605a8f522f
commit f3349b50c8
12 changed files with 327 additions and 33 deletions

View File

@ -17,10 +17,11 @@ switch ($action) {
case 'isLogin':
$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);
$p = ORM::for_table('tbl_plans')->find_one($bill['plan_id']);
$dvc = Package::getDevice($p);
if (file_exists($dvc) && $_app_stage != 'demo') {
require_once $dvc;
if ((new $d['device'])->online_customer($user, $bill['routers'])) {
if ((new $p['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>');
} else {
if (!empty($_SESSION['nux-mac']) && !empty($_SESSION['nux-ip'])) {

View File

@ -24,7 +24,7 @@ $reset_day = $config['reset_day'];
if(empty($reset_day)){
$reset_day = 1;
}
$reset_day = 20;
//first day of month
if($reset_day >= date("d")){
$first_day_month = date('Y-m-'.$reset_day);

View File

@ -230,5 +230,6 @@ $ui->assign('unpaid', ORM::for_table('tbl_payment_gateway')
->where('username', $user['username'])
->where('status', 1)
->find_one());
$ui->assign('code', alphanumeric(_get('code')));
run_hook('view_customer_dashboard'); #HOOK
$ui->display('user-dashboard.tpl');

View File

@ -182,6 +182,7 @@ switch ($do) {
default:
run_hook('customer_view_login'); #HOOK
if ($config['disable_registration'] == 'yes') {
$ui->assign('code', alphanumeric(_get('code')));
$ui->display('user-login-noreg.tpl');
} else {
$ui->display('user-login.tpl');

View File

@ -17,6 +17,7 @@ switch ($action) {
case 'activation':
run_hook('view_activate_voucher'); #HOOK
$ui->assign('code', alphanumeric(_get('code')));
$ui->display('user-activation.tpl');
break;

View File

@ -642,5 +642,7 @@
"Time": "Time",
"Data": "Data",
"Category": "Category",
"later": "later"
"later": "later",
"Package_Details": "Package Details",
"Summary": "Summary"
}