require "include/bittorrent.php"; dbconn(false); loggedinorreturn(); ob_start("ob_gzhandler"); $requestid = (int) $_GET['requestid']; $res2 = do_mysql_query("select count(addedrequests.id) from addedrequests inner join users on addedrequests.userid = users.id inner join requests on addedrequests.requestid = requests.id WHERE addedrequests.requestid =$requestid") or die(mysql_error()); $row = mysql_fetch_array($res2); $count = $row[0]; $perpage = 50; list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, $_SERVER["PHP_SELF"] ."?" ); $res = do_mysql_query("SELECT users.id as userid, users.username, users.downloaded, users.uploaded, requests.id as requestid, requests.request, UNIX_TIMESTAMP(users.added) as utadded FROM addedrequests INNER JOIN users on addedrequests.userid = users.id INNER JOIN requests on addedrequests.requestid = requests.id WHERE addedrequests.requestid =$requestid $limit") or sqlerr(); stdhead("Voters"); $res2 = do_mysql_query("select request from requests where id=$requestid"); $arr2 = mysql_fetch_assoc($res2); print("
Vote for this request
"); echo $pagertop; if (mysql_num_rows($res) == 0) print("Nothing found
\n"); else { print("Username | Uploaded | Downloaded | ". "Share Ratio | \n"); while ($arr = mysql_fetch_assoc($res)) { if ($arr["downloaded"] > 0) { $ratio = number_format($arr["uploaded"] / $arr["downloaded"], 3); $ratio = "$ratio"; } else if ($arr["uploaded"] > 0) $ratio = "Inf."; else $ratio = "---"; $uploaded =mksize($arr["uploaded"]); $joindate = "$arr[added] (" . get_elapsed_time($arr["utadded"]) . " ago)"; $downloaded = mksize($arr["downloaded"]); if ($arr["enabled"] == 'no') $enabled = "No"; else $enabled = "Yes"; print("
$arr[username] | $uploaded | $downloaded | $ratio |