Public feed
#602735
if ($nfodescr == $nono){
if (!empty($row["descr"])){
tr("Description", str_replace(array("\n", " "), array("\n", " "), format_comment($row["descr"])), 1);
if (get_user_class() >= UC_POWER_USER && $row["nfosz"] > 0){
print("<tr><td class=rowhead>NFO</td><td align=left><a href=viewnfo.php?id=$row[id]><b>View NFO</b></a> (" .
}
else {
tr("Description", print("<pre style=\"font-size:10pt; font-family: 'MS LineDraw', 'Terminal', monospace;\">format_urls($nfo)</pre>\n");
}
}
}
mksize($row["nfosz"]) . ")</td></tr>\n");
if ($row["visible"] == "no")
tr("Visible", "<b>no</b> (dead)", 1);
if ($moderator)
tr("Banned", $row["banned"]);
if (isset($row["cat_name"]))
tr("Type", $row["cat_name"]);
else
tr("Type", "(none selected)");
tr("Last seeder", "Last activity " . mkprettytime($row["lastseed"]) . " ago");
tr("Size",mksize($row["size"]) . " (" . number_format($row["size"]) . " bytes)");
$s = "";
$s .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td valign=\"top\" class=embedded>";
if (!isset($row["rating"])) {
if ($minvotes > 1) {
$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 .= "</td><td class=embedded>$spacer</td><td valign=\"top\" class=embedded>";
if (!isset($CURUSER))
$s .= "(<a href=\"login.php?returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&nowarn=1\">Log in</a> to rate it)";
else {
$ratings = array(
5 => "Kewl!",
4 => "Pretty good",
3 => "Decent",
2 => "Pretty bad",
1 => "Sucks!",
);
if (!$owned || $moderator) {
$xres = sql_query("SELECT rating, added FROM ratings WHERE torrent = $id AND user = ".mysql_real_escape_string($CURUSER["id"])) or sqlerr(__FILE__, __LINE__);
$xrow = mysql_fetch_array($xres);
if ($xrow)
$s .= "(you rated this torrent as \"" . $xrow["rating"] . " - " . $ratings[$xrow["rating"]] . "\")";
else {
$s .= "<form method=\"post\" action=\"takerate.php\"><input type=\"hidden\" name=\"id\" value=\"$id\" />\n";
$s .= "<select name=\"rating\">\n";
$s .= "<option value=\"0\">(add rating)</option>\n";
foreach ($ratings as $k => $v) {
$s .= "<option value=\"$k\">$k - $v</option>\n";
}
$s .= "</select>\n";
$s .= "<input type=\"submit\" value=\"Vote!\" />";
$s .= "</form>\n";
}
}
}
$s .= "</td></tr></table>";
tr("Rating", $s, 1);
tr("Added", $row["added"]);
tr("Views", $row["views"]);
tr("Hits", $row["hits"]);
print("<tr><td class=rowhead>Snatched</td><td align=left><a href=viewsnatches.php?id=$id><b>".$row["times_completed"]." x</b> time(s)</a> <--- Click Here to all View Snatches </td></tr>\n");