\n" . "

Snatched List for ".$aser1["username"]."

" . "\n" . "Type\n" . "Torrent\n" . "Se.\n" . "Le.\n" . "Upl.\n" . "Down.\n" . "Ratio\n" . "Last action\n" . "Seed\n". "\n"; while ($a = mysql_fetch_assoc($r)) { $res3 = mysql_query("SELECT userid, seeder FROM peers WHERE torrent=". $a["torrentid"] ." AND userid=".$id."") or sqlerr(__FILE__, __LINE__); $arr3 = mysql_fetch_assoc($res3); $r1 = mysql_query("SELECT * FROM torrents WHERE id = ". $a[torrentid] ."") or sqlerr(__FILE__, __LINE__); $a1 = mysql_fetch_assoc($r1); $r2 = mysql_query("SELECT name FROM categories WHERE id = ". $a1[category] ."") or sqlerr(__FILE__, __LINE__); $a2 = mysql_fetch_assoc($r2); if ($a["downloaded"] > 0) { $ratio = number_format($a["uploaded"] / $a["downloaded"], 3); $ratio = "$ratio"; } else if ($a["uploaded"] > 0) $ratio = "Inf."; else $ratio = "---"; $uploaded =mksize($a["uploaded"]); $downloaded = mksize($a["downloaded"]); $cat = "$a2[name]"; $endtime = $a['complete_date']; $last_action = $a['last_action']; $seedtime = mkprettytime($a[lt] - $a[ct]); $td = mysql_query("SELECT * FROM torrents WHERE id = ". $a[torrentid] .""); while ($tdl = mysql_fetch_assoc($td)) { $timesdownloaded = $a["downloaded"] / $tdl["size"]; } /// smallname completed torrents $smallname3 =substr(htmlspecialchars($a1["name"]) , 0, 26); if ($smallname3 != htmlspecialchars($a1["name"])) { $smallname3 .= '...'; } #$smallname3 = htmlspecialchars($a1["name"]); // smallname completed torrents end $completed .= "\n" . "$cat\n" . "$smallname3\n" . "". $a[seeders] ."\n" . "". $a[leechers] ."\n" . "$uploaded\n" . "$downloaded\n" . "$ratio\n" . "$last_action\n" . "" . ($arr3["seeder"] == "yes" ? "Yes" : "No") . "\n". "\n"; } $completed .= ""; //// end //// print("$completed\n"); stdfoot(); ?>