mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-22 10:57:27 +08:00
fix trafic upload error when downloaded = 0
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.7.33');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-12-08');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-12-14');
|
||||
defined('IN_TRACKER') || define('IN_TRACKER', false);
|
||||
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
||||
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
||||
|
||||
+10
-3
@@ -523,9 +523,16 @@ if ($action == "exchange") {
|
||||
}
|
||||
//=== trade for upload
|
||||
if($art == "traffic") {
|
||||
if ($CURUSER['uploaded'] > $dlamountlimit_bonus * 1073741824)//uploaded amount reach limit
|
||||
$ratio = $CURUSER['uploaded']/$CURUSER['downloaded'];
|
||||
else $ratio = 0;
|
||||
if ($CURUSER['uploaded'] > $dlamountlimit_bonus * 1073741824) {
|
||||
//uploaded amount reach limit
|
||||
if ($CURUSER['downloaded'] > 0) {
|
||||
$ratio = $CURUSER['uploaded']/$CURUSER['downloaded'];
|
||||
} else {
|
||||
$ratio = PHP_INT_MAX;
|
||||
}
|
||||
} else {
|
||||
$ratio = 0;
|
||||
}
|
||||
if ($ratiolimit_bonus > 0 && $ratio > $ratiolimit_bonus)
|
||||
die($lang_mybonus['text_cheat_alert']);
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user