$_c to $config in php file

This commit is contained in:
Ibnu Maksum 2024-02-29 09:25:26 +07:00
parent a0b9e85f38
commit 2437096473
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
3 changed files with 6 additions and 6 deletions

View File

@ -142,7 +142,7 @@ switch ($action) {
$ui->display('user-orderView.tpl');
break;
case 'pay':
if ($_c['enable_balance'] != 'yes') {
if ($config['enable_balance'] != 'yes') {
r2(U . "order/package", 'e', Lang::T("Balance not enabled"));
}
$plan = ORM::for_table('tbl_plans')->where('enabled', '1')->find_one($routes['3']);
@ -176,7 +176,7 @@ switch ($action) {
}
break;
case 'send':
if ($_c['enable_balance'] != 'yes') {
if ($config['enable_balance'] != 'yes') {
r2(U . "order/package", 'e', Lang::T("Balance not enabled"));
}
$ui->assign('_title', Lang::T('Buy for friend'));

View File

@ -36,9 +36,9 @@ switch ($action) {
$logo = $UPLOAD_PATH . DIRECTORY_SEPARATOR . 'logo.default.png';
}
$ui->assign('logo', $logo);
if ($_c['radius_enable'] && empty($_c['radius_client'])) {
if ($config['radius_enable'] && empty($config['radius_client'])) {
try {
$_c['radius_client'] = Radius::getClient();
$config['radius_client'] = Radius::getClient();
$ui->assign('_c', $_c);
} catch (Exception $e) {
//ignore

View File

@ -24,7 +24,7 @@ echo "Found " . count($d) . " user(s)\n";
run_hook('cronjob'); #HOOK
foreach ($d as $ds) {
if ($ds['type'] == 'Hotspot') {
if ($ds['type'] == 'Hotspot') { # HOTSPOT
$date_now = strtotime(date("Y-m-d H:i:s"));
$expiration = strtotime($ds['expiration'] . ' ' . $ds['time']);
echo $ds['expiration'] . " : " . (($isCli) ? $ds['username'] : Lang::maskText($ds['username']));
@ -82,7 +82,7 @@ foreach ($d as $ds) {
}
} else
echo " : ACTIVE \r\n";
} else {
} else { # PPPOE
$date_now = strtotime(date("Y-m-d H:i:s"));
$expiration = strtotime($ds['expiration'] . ' ' . $ds['time']);
echo $ds['expiration'] . " : " . (($isCli) ? $ds['username'] : Lang::maskText($ds['username']));