Oppaitime'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 447B

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