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("
format_urls($nfo)\n"); } } } mksize($row["nfosz"]) . ")
| "; 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 .= " |