Skip to content

Commit

Permalink
change copyright
Browse files Browse the repository at this point in the history
  • Loading branch information
callcenter-magnus committed Jan 2, 2024
1 parent c157285 commit c639230
Show file tree
Hide file tree
Showing 234 changed files with 2,299 additions and 2,300 deletions.
Binary file modified build/MagnusBilling-current.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion protected/commands/AlarmCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* @package MagnusBilling
* @author Adilson Leffa Magnus.
* @copyright Copyright (C) 2005 - 2021 MagnusSolution. All rights reserved.
* @copyright Copyright (C) 2005 - 2023 MagnusSolution. All rights reserved.
* ###################################
*
* This software is released under the terms of the GNU Lesser General Public License v2.1
Expand Down
46 changes: 23 additions & 23 deletions protected/commands/BDServiceCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* @package MagnusBilling
* @author Adilson Leffa Magnus.
* @copyright Copyright (C) 2005 - 2021 MagnusSolution. All rights reserved.
* @copyright Copyright (C) 2005 - 2023 MagnusSolution. All rights reserved.
* ###################################
*
* This software is released under the terms of the GNU Lesser General Public License v2.1
Expand All @@ -26,7 +26,7 @@ public function run($args)
define('LOGFILE', 'protected/runtime/BDServicePid.log');
define('DEBUG', 0);

if (!defined('PID')) {
if ( ! defined('PID')) {
define("PID", "/var/run/magnus/BDServicePid.php");
}

Expand Down Expand Up @@ -60,15 +60,15 @@ public function tanaSend()

foreach ($modelSendCreditSummary as $key => $sendCredit) {
$url = "http://takasend.org/ezzeapi/status?id=" . $sendCredit->id . "&user=" . $userBD . "&key=" . $keyBD . "";
if (!$result = @file_get_contents($url, false)) {
if ( ! $result = @file_get_contents($url, false)) {
$result = '';
}
echo $result . " $sendCredit->id \n";
$modelRefill = Refill::model()->find('invoice_number = :key AND id_user = :key1',
array(
[
':key' => $sendCredit->id,
':key1' => $sendCredit->id_user,
));
]);

if (preg_match("/ERROR|CANCELLED/", strtoupper($result))) {

Expand Down Expand Up @@ -99,10 +99,10 @@ public function tanaSend()
echo "is agent \n";
$id_agent = $modelUser->id_user;
$modelRefillAgent = Refill::model()->find('invoice_number = :key AND id_user = :key1',
array(
[
':key' => $sendCredit->id,
':key1' => $id_agent,
));
]);

if (isset($modelRefillAgent->id)) {
$modelRefillAgent->description = $modelRefillAgent->description . '. Status: ' . $result[0] . '. Ref:' . $result[1];
Expand Down Expand Up @@ -148,10 +148,10 @@ public function tanaSend()
echo "is agent \n";
$id_agent = $modelUser->id_user;
$modelRefillAgent = Refill::model()->find('invoice_number = :key AND id_user = :key1',
array(
[
':key' => $sendCredit->id,
':key1' => $id_agent,
));
]);

$modelRefillAgent->description = @$modelRefillAgent->description . '. Status: ' . $result[0] . '. Ref:' . $result[1];
$modelRefillAgent->payment = 1;
Expand Down Expand Up @@ -184,12 +184,12 @@ public function ezzeapi()
$BDService_url = $config['global']['BDService_url'];

$url = $BDService_url . "/ezzeapi/balance?user=$userBD&key=$keyBD";
if (!$result = @file_get_contents($url, false)) {
if ( ! $result = @file_get_contents($url, false)) {
$result = '';
}

Configuration::model()->updateAll(array('config_value' => $result), 'config_key = :key',
array(':key' => 'BDService_credit_provider'));
Configuration::model()->updateAll(['config_value' => $result], 'config_key = :key',
[':key' => 'BDService_credit_provider']);

$modelSendCreditSummary = SendCreditSummary::model()->findAll('confirmed = 0 AND service != :key AND date > :key1 ', [
':key' => 'international',
Expand All @@ -202,7 +202,7 @@ public function ezzeapi()

$url = $BDService_url . "/ezzeapi/status?id=" . $idApi . "&user=" . $userBD . "&key=" . $keyBD;

if (!$result = @file_get_contents($url, false)) {
if ( ! $result = @file_get_contents($url, false)) {
$result = '';
}

Expand All @@ -211,19 +211,19 @@ public function ezzeapi()
if (preg_match("/SUCCESS/", $result)) {

$modelRefill = Refill::model()->find('invoice_number = :key AND id_user = :key1',
array(
[
':key' => $sendCredit->id,
':key1' => $sendCredit->id_user,
));
]);

if (!count($modelRefill)) {
if ( ! count($modelRefill)) {
continue;
}
$message = explode("SUCCESS: ", $result);
User::model()->updateByPk($sendCredit->id_user,
array(
[
'credit' => new CDbExpression('credit + ' . $modelRefill->credit),
)
]
);

$modelRefill->payment = 1;
Expand All @@ -238,15 +238,15 @@ public function ezzeapi()
echo "\n\nIS A USER AGENT" . $sendCredit->idUser->id_user;

$modelRefill = Refill::model()->find('invoice_number = :key AND id_user = :key1',
array(
[
':key' => $sendCredit->id,
':key1' => $sendCredit->idUser->id_user,
));
]);

User::model()->updateByPk($sendCredit->idUser->id_user,
array(
[
'credit' => new CDbExpression('credit + ' . $modelRefill->credit),
)
]
);

$modelRefill->payment = 1;
Expand All @@ -259,7 +259,7 @@ public function ezzeapi()
$sendCredit->confirmed = 3;
$sendCredit->save();

$modelRefill = Refill::model()->find('invoice_number = :key', array(':key' => $sendCredit->id));
$modelRefill = Refill::model()->find('invoice_number = :key', [':key' => $sendCredit->id]);
if (count($modelRefill)) {
$modelRefill->description = $modelRefill->description . '. Ref: ' . $result;
$modelRefill->save();
Expand Down
2 changes: 1 addition & 1 deletion protected/commands/BackupCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* @package MagnusBilling
* @author Adilson Leffa Magnus.
* @copyright Copyright (C) 2005 - 2021 MagnusSolution. All rights reserved.
* @copyright Copyright (C) 2005 - 2023 MagnusSolution. All rights reserved.
* ###################################
*
* This software is released under the terms of the GNU Lesser General Public License v2.1
Expand Down
6 changes: 3 additions & 3 deletions protected/commands/CallArchiveCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* @package MagnusBilling
* @author Adilson Leffa Magnus.
* @copyright Copyright (C) 2005 - 2021 MagnusSolution. All rights reserved.
* @copyright Copyright (C) 2005 - 2023 MagnusSolution. All rights reserved.
* ###################################
*
* This software is released under the terms of the GNU Lesser General Public License v2.1
Expand All @@ -28,7 +28,7 @@ public function run($args)
CallFailed::model()->createDataBaseIfNotExist();

$c = 0;
$tables = array('pkg_cdr', 'pkg_cdr_failed');
$tables = ['pkg_cdr', 'pkg_cdr_failed'];
foreach ($tables as $key => $table) {

$sql = "SELECT count(*) AS count FROM $table WHERE $condition ";
Expand Down Expand Up @@ -72,7 +72,7 @@ public function deleteCalls()
$prior_cdr_failed_archive_month_delete = $this->config['global']['delete_cdr_failed_archived_prior_x_month'];

$c = 0;
$tables = array('pkg_cdr_archive', 'pkg_cdr_failed_archive');
$tables = ['pkg_cdr_archive', 'pkg_cdr_failed_archive'];
foreach ($tables as $key => $table) {

if ($table == 'pkg_cdr_archive') {
Expand Down
Loading

0 comments on commit c639230

Please sign in to comment.