Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   BT.Manager (phpMyBitTorrent) (http://www.bvlist.com/forumdisplay.php?f=23)
-   -   cazino_player.php error (http://www.bvlist.com/showthread.php?t=8254)

Giorgatzelos 3rd September 2012 16:04

cazino_player.php error
 
i found this part of code in cazino_player.php

Code:

if ($arr["downloaded"] > 0)
{
    $ratio = number_format($arr["uploaded"] / $arr["downloaded"], 3);
        if ($downloaded == 0)
                $ratio = "∞";
        elseif ($ratio < 0.1)
                $ratio = "" . number_format($ratio, 2) . "";
        elseif ($ratio < 0.2)
                $ratio = "" . number_format($ratio, 2) . "";
        elseif ($ratio < 0.3)
                $ratio = "" . number_format($ratio, 2) . "";
        elseif ($ratio < 0.4)
                $ratio = "" . number_format($ratio, 2) . "";
        elseif ($ratio < 0.5)
                $ratio = "" . number_format($ratio, 2) . "";
        elseif ($ratio < 0.6)
                $ratio = "" . number_format($ratio, 2) . "";
        elseif ($ratio < 0.7)
                $ratio = "" . number_format($ratio, 2) . "";
        elseif ($ratio < 0.8)
                $ratio = "" . number_format($ratio, 2) . "";
        elseif ($ratio < 0.9)
                $ratio = "" . number_format($ratio, 2) . "";
        elseif ($ratio < 1)
                $ratio = "" . number_format($ratio, 2) . "";
        else
                $ratio = "".  number_format($ratio, 2) . "";
  }
  else
    if ($arr["uploaded"] > 0)
      $ratio = "∞";
else
$ratio = "---";

and it alway shows ratio infinity i know there is something wrong with the code...any help?

joeroberts 3rd September 2012 16:35

erplace
PHP Code:

     $ratio number_format($arr["uploaded"] / $arr["downloaded"], 3);
        if (
$downloaded == 0

with
PHP Code:

     $ratio number_format($arr["uploaded"] / $arr["downloaded"], 3);
        if (
$arr["downloaded"] == 0


Giorgatzelos 3rd September 2012 16:40

Thanx mate it worked!...


All times are GMT +2. The time now is 13:24.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.