= UC_MODERATOR) { $query = "SELECT id, username, added, uploaded, downloaded, donor, warned, UNIX_TIMESTAMP(added) as utadded FROM users WHERE class = ".UC_UPLOADER; $result = mysql_query($query); $num = mysql_num_rows($result); // how many uploaders echo "

Uploaders Info Panel

"; echo "

We have " . $num . " uploaders

"; $zerofix = $num - 1; // remove one row because mysql starts at zero if ($num > 0) { echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; while($inf = mysql_fetch_assoc($result) ) { $id = $inf["id"]; $username = $inf["username"]; $added = $inf["added"]; $uploaded = $inf["uploaded"]; $downloaded = $inf["downloaded"]; $donor = $inf["donor"); $warned = $inf["warned"]; // get uploader torrents activity $upperquery = "SELECT added FROM torrents WHERE owner = ".$id; $upperresult = mysql_query($upperquery); $torrentinfo = mysql_fetch_array($upperresult); $numtorrents = mysql_num_rows($upperresult); if ($downloaded > 0) { $ratio = $uploaded / $downloaded; $ratio = number_format($ratio, 3); $color = get_ratio_color($ratio); if ($color) $ratio = "$ratio"; } else if ($uploaded > 0) $ratio = "Inf."; else $ratio = "---"; // get donor if ($donor == "yes") $star = ""; else $star = ""; // get warned if ($warned == "yes") $klicaj = ""; else $klicaj = ""; $counter = $i + 1; echo ""; echo ""; echo ""; echo ""; echo ""; if ($numtorrents == 0) echo ""; else echo ""; if ($numtorrents > 0) { $lastadded = mysql_result($upperresult, $numtorrents - 1, "added"); echo ""; } else echo ""; echo ""; echo ""; } echo "
NumUsernameUpped / DownedRatioNum torrentsLast uploadSend PM
$counter.$username $star $klicaj" . mksize($uploaded). " / " . mksize($downloaded) . "$ratio$numtorrents torrents$numtorrents torrents" . get_elapsed_time(sql_timestamp_to_unix_timestamp($lastadded)) . " ago (" . gmdate("d. M Y",strtotime($lastadded)) . ")---


"; } } else stderr( _('Error'), _('Permission denied') ); stdfoot(); ?>