$ratio"; } else $ratio = "Inf."; print("$num" . $a["username"] . "" . "" . $ratio . "" . gmdate("Y-m-d",strtotime($a["added"])) . " (" . get_elapsed_time($a["utadded"]) . " ago)"); } end_table(); end_frame(); } stdhead( _("Top Worst Share Ratio's") ); begin_main_frame(); $type = (int) $_GET["type"]; if (!in_array($type,array(1,2,3,4))) $type = 1; $limit = (int) $_GET["lim"]; $subtype = $_GET["subtype"]; $pu = get_user_class() >= UC_POWER_USER; if (!$pu) $limit = 10; if ($type == 1) { $mainquery = "SELECT id as userid, username, added, uploaded, downloaded, uploaded / (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(added)) AS upspeed, downloaded / (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(added)) AS downspeed, UNIX_TIMESTAMP(added) as utadded FROM users WHERE enabled = 'yes'"; if (!$limit || $limit > 250) $limit = 10; { $order = "uploaded / downloaded ASC, downloaded DESC"; $extrawhere = " AND downloaded > 103741824"; $r = do_mysql_query($mainquery . $extrawhere . " ORDER BY $order " . " LIMIT $limit") or sqlerr(); usertable($r, sprintf( _("Top %u Worst Share Ratio's (with minimum 100 MB downloaded)"), $limit) . ($limit == 10 && $pu ? " - [". _('Top')." 100] - [". _('Top')." 250]" : "")); } } end_main_frame(); print("

Top 10"); // print("

Started recording account xfer stats on 2004-06-22

"); stdfoot(); ?>