set_time_limit(0); $tariffPrices = zb_TariffGetPricesAll(); $users = new nya_users(); $users->where('Passive', '=', 0); $all = $users->getAll(); $i = 0; if (!empty($all)) { foreach ($all as $io => $each) { $userTariff = $each['Tariff']; if (isset($tariffPrices[$userTariff])) { $userFee = $tariffPrices[$userTariff]; if ($userFee > 0) { $feeCharge = '-' . $userFee; // use following method to avoid payments log recording // $billing->addcash($each['login'], $feeCharge); // charging some cash as payment correction zb_CashAdd($each['login'], $feeCharge, 'correct', 1, 'FEE'); log_register('CHANGE FixStargazerFee (' . $each['login'] . ') ON ' . $feeCharge); } } else { show_warning(__('Skipping') . ' ' . $each['login']); } $i++; } show_info(__('users processed') . ': ' . $i); } else { show_error(__('No') . ' ' . __('Users')); }