dodałem zobacz sam
//--- no double comment---//
$res66 = mysql_query("SELECT user FROM comments WHERE torrent = $torrentid ORDER BY id DESC") or sqlerr(__FILE__, __LINE__);
$arr66 = mysql_fetch_array($res66);
$lastpostid = $arr66["user"];
if ($lastpostid == $CURUSER["id"] && get_user_class() < UC_MODERATOR)
stderr("B?±d", "Nie pisz dwóch komentarzy pod rz±d. Uzyj opcji edytuj.");
//---end---//
if ($_POST['system'] == 'yes')
$userid = 0;
mysql_query("INSERT INTO comments (user, torrent, added, text, ori_text) VALUES (" .
$CURUSER["id"] . ",$torrentid, '" . get_date_time() . "', " . sqlesc($text) .
"," . sqlesc($text) . ")");
$newid = mysql_insert_id();
mysql_query("UPDATE torrents SET comments = comments + 1 WHERE id = $torrentid");
$added = sqlesc(get_date_time());
$notifs = sqlesc("Masz mowy komentarz w swoim torrencie. [url=details.php?id=$torrentid] " . $arr['name'] . "[/url]");
mysql_query("INSERT INTO messages (sender, receiver, msg, added) VALUES(0, " . $arr['owner'] . ", $notifs, $added)") or sqlerr(__FILE__, __LINE__);
header("Refresh: 0; url=details.php?id=$torrentid&viewcomm=$newid#comm$newid");
die;
}