BioTorrents.de’s version of Gazelle
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

slaves.class.php 518B

1234567891011121314151617
  1. <?php
  2. #declare(strict_types=1);
  3. class Slaves
  4. {
  5. public static function get_level($SlaveID)
  6. {
  7. G::$DB->query("
  8. SELECT u.Uploaded, u.Downloaded, u.BonusPoints, COUNT(t.UserID)
  9. FROM users_main AS u
  10. LEFT JOIN torrents AS t ON u.ID=t.UserID
  11. WHERE u.ID = $SlaveID");
  12. list($Upload, $Download, $Points, $Uploads) = G::$DB->next_record();
  13. return intval(((($Uploads**0.35)*1.5)+1) * max(($Upload+($Points*1000000)-$Download)/(1024**3), 1));
  14. }
  15. };