No torrent id recived"; die(); } global $usergroups,$___flood___; $___flood___->protect('last_comment','comment',$usergroups['antifloodtime']); if (!is_valid_id($torrentid)) die("
Invailed ID
"); $res = sql_query("SELECT name FROM torrents WHERE id = $torrentid") or sqlerr(__FILE__,__LINE__); $arr = mysql_fetch_array($res); if (!$arr) die("
No vailed torrentid.
"); // Strip from HTML Tags and check if it not empty $text = $_POST["text"]; if (!$text) die("
You need to enter text!
"); sql_query("INSERT INTO comments (user, torrent, added, text, ori_text) VALUES (" . $CURUSER["id"] . ",$torrentid, '" . get_date_time() . "', " . sqlesc($text) . "," . sqlesc($text) . ")"); sql_query("UPDATE torrents SET comments = comments + 1 WHERE id = $torrentid"); UserHandle::KPS("+","0.5",$CURUSER["id"]); // Update Last comment sent... $___flood___->update('last_comment'); ?>