ob_start("ob_gzhandler"); require_once("include/bittorrent.php"); $torrentid = (int) $_GET["id"]; // get agent function getagent($httpagent) { return ($httpagent != "" ? $httpagent : "---"); } function dltable($name, $arr, $torrent) { global $CURUSER; $s = "" . count($arr) . " $name\n"; if (!count($arr)) return $s; //$s .= "\n"; $s .= "
"._('User/IP')." | " . ""._('Connectable')." | ". ""._('Uploaded')." | ". ""._('Rate')." | ". ""._('Downloaded')." | " . ""._('Rate')." | " . ""._('Ratio')." | " . ""._('Complete')." | " . ""._('Connected')." | " . ""._('Idle')." | " . ""._('Client')." | |||||
$una[username] | \n"; else $s .= "" . ($mod ? $e["ip"] : preg_replace('/\.\d+$/', ".xxx", $e["ip"])) . " | \n"; } elseif ($una["anonymous"] == "yes") $s .= "Anonymous | \n"; $secs = max(1, ($now - $e["st"]) - ($now - $e["la"])); $revived = $e["revived"] == "yes"; $s .= "" . ($e[connectable] == "yes" ? "Yes" : "No") . " | \n"; $s .= "" . mksize($e["uploaded"]) . " | \n"; $s .= "" . mksize($e["downloaded"]) . " | \n"; if ($e["seeder"] == "no") $s .= "" . number_format($ratio, 3) . " | \n"; } else if ($e["uploaded"]) $s .= "Inf. | \n"; else $s .= "--- | \n"; $s .= "" . sprintf("%.2f%%", 100 * (1 - ($e["to_go"] / $torrent["size"]))) . " | \n"; $s .= "" . mkprettytime($now - $e["st"]) . " | \n"; $s .= "" . mkprettytime($now - $e["la"]) . " | \n"; $s .= "" . htmlspecialchars(getagent($e["agent"])) . " | \n"; $s .= "
"._('You can start seeding now. Note that the torrent won\'t be visible until you do that!')."
\n"); } elseif ($_GET["edited"]) { print("Go back to whence you came.
\n"); } elseif (isset($_GET["searched"])) { print(""._('Download')." | " . htmlspecialchars($row["filename"]) . " | |
Small Description | $descrs | |
"._('NFO')." | "._('View NFO')." (" . mksize($row["nfosz"]) . ") |
"; if (!isset($row["rating"])) { if ($minvotes > 3) { $s .= "none yet (needs at least $minvotes votes and has got "; if ($row["numratings"]) $s .= "only " . $row["numratings"]; else $s .= "none"; $s .= ")"; } else $s .= _("No votes yet"); } else { $rpic = ratingpic($row["rating"]); if (!isset($rpic)) $s .= "invalid?"; else $s .= "$rpic (" . $row["rating"] . " out of 5 with " . $row["numratings"] . " vote(s) total)"; } $s .= "\n"; $s .= " | $spacer | "; if (!isset($CURUSER)) $s .= "(Log in to rate it)"; else { $ratings = array( 5 => "Kewl!", 4 => "Pretty good", 3 => "Decent", 2 => "Pretty bad", 1 => "Sucks!", ); if (!$owned || $moderator) { $xres = do_mysql_query("SELECT rating, added FROM ratings WHERE torrent = $id AND user = " . $CURUSER["id"]); $xrow = mysql_fetch_assoc($xres); if ($xrow) $s .= "(you rated this torrent as \"" . $xrow["rating"] . " - " . $ratings[$xrow["rating"]] . "\")"; else { $s .= "\n"; } } } $s .= " |
Path | Size |
" . $subrow["filename"] . " | " . mksize($subrow["size"]) . " |
The users at the top finished the download most recently
"); echo $pagertop; print(""._('Username')." | "._('Uploaded')." | "._('Downloaded')." | "._('Ratio')." | "._('When Completed')." | "._('Last Action')." | "._('Seeding')." | "._('PM User')." | "._('Report User')." | "._('On/Off')." |
".$arr['username']." | ".$uploaded." Global ".$uploaded2." Torrent |
".$downloaded." Global ".$downloaded2." Torrent |
".$ratio." Global ".$ratio2." Torrent |
".$arr['completedat']." | ".$arr['last_action']." | " .($arr["seeder"] == "yes" ? "Yes" : "No") . " | " . get_user_icons($arr, true) . " |