=1 && $ratio<=7) $ratio = ''; echo '
'; begin_table(); echo 'Important'; echo 'Although the word cheat is used here, it should be kept in mind that this
'; echo 'is statistical analysis - "There are lies, damm lies, and statistics!"
'; echo 'The value for cheating can and will change quite drastically depending on what
'; echo 'is happening, so you should always take into account other factors before
'; echo 'issueing a warning.
'; echo 'Somebody might get quite a high cheat value, but never cheat in their life - simply
'; echo 'from bad luck in when the client updates the tracker - but that will drop again in
'; echo 'the future. A true cheater will stay consistantly high...'; echo ''; echo 'Class:'; echo ''; echo 'Ratio:'; echo ''; echo ''; end_table(); echo '
'; $query = 'WHERE enabled = 1 AND downloaded > 0 AND uploaded > 0'; //' AND cheat >= '.$min if ($class>2) $query .= ' AND class < '.($class - 1); if ($ratio>1) $query .= ' AND (uploaded / downloaded) > '.($ratio - 1); $res = sql_query("SELECT COUNT(*),MIN(cheat),MAX(cheat) FROM users $query") or sqlerr(); $arr = mysql_fetch_row($res); $top = MIN($top, $arr[0]); $min = $arr[1]; $max = $arr[2]; $pages = ceil($top / 20); if ($page < 1) $page = 1; elseif ($page > $pages) $page = $pages; list($pagertop, $pagerbottom, $limit) = pager(20, $top, "cheaters.php?"); echo $pagertop; begin_table(); print("User nameRegisteredUploadedDownloadedRatioCheat ValueCheat Spread\n"); $res = sql_query("SELECT * FROM users $query ORDER BY cheat DESC $limit") or sqlerr(); while ($arr = mysql_fetch_assoc($res)) { if ($arr['added'] == "0000-00-00 00:00:00") $joindate = 'N/A'; else $joindate = get_elapsed_time(strtotime($arr['added'])).' ago'; $age = date('U') - date('U',strtotime($arr['added'])); if ($arr["downloaded"] > 0) { $ratio = number_format($arr["uploaded"] / $arr["downloaded"], 3); $ratio = "$ratio"; } else { if ($arr["uploaded"] > 0) $ratio = "Inf."; else $ratio = "---"; } if ($arr['added'] == '0000-00-00 00:00:00') $arr['added'] = '-'; echo ''.$arr['username'].''; echo ''.$joindate.''; echo ''.mksize($arr['uploaded']).' @ '.mksize($arr['uploaded'] / $age).'ps'; echo ''.mksize($arr['downloaded']).' @ '.mksize($arr['downloaded'] / $age).'ps'; echo ''.$ratio.''; echo ''.$arr['cheat'].''; echo ''.ceil(($arr['cheat'] - $min) / max(1, ($max - $min)) * 100).'%'."\n"; } end_table(); echo $pagerbottom; end_frame(); stdfoot(); ?>