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("NFOView NFO (" . } else { tr("Description", print("
format_urls($nfo)
\n"); } } } mksize($row["nfosz"]) . ")\n"); if ($row["visible"] == "no") tr("Visible", "no (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 .= "
"; 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 .= "$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 = 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 .= "
\n"; $s .= "\n"; $s .= ""; $s .= "
\n"; } } } $s .= "
"; tr("Rating", $s, 1); tr("Added", $row["added"]); tr("Views", $row["views"]); tr("Hits", $row["hits"]); print("Snatched".$row["times_completed"]." x time(s) <--- Click Here to all View Snatches \n");