aki os dejo una revision del codigo, pero no me va :S
Código PHP:
if ($_REQUEST['do'] == 'add_news_confirm')
{
$rs = $db->Execute("SELECT * FROM `sp_news` WHERE `id` = '-1'");
$record = array(
'title' => $_REQUEST['title'],
'author' => $_REQUEST['author'],
'section' => $_REQUEST['section'],
'intro' => $_REQUEST['intro'],
'text' => $_REQUEST['text'],
'date' => $_REQUEST['date'],
'newsimage' => $_REQUEST['newsimage']
);
$sql = $db->GetInsertSQL($rs, $record);
$db->Execute($sql);
$db->Execute("INSERT INTO phpbb_topics (forum_id,topic_title,topic_poster,topic_time,topic_views,topic_replies,topic_status,topic_type,topic_vote) VALUES ('1', '$_REQUEST[title]', '2', '$_REQUEST[date]',0,0,0,0,0)");
$result1 = $db->Execute("SELECT MAX(topic_id) as newID FROM phpbb_topics");
$rs = $db->Execute("SELECT * FROM `phpbb_topics` WHERE `topic_id` = '-1'");
$record = array();
$record['forum_id'] = '1';
$record['topic_title'] = $_REQUEST['title'];
$record['topic_poster'] = '2';
$record['topic_time'] = $_REQUEST['date'];
$record['topic_views'] = '0';
$record['topic_replies'] = '0';
$record['topic_status'] = '0';
$record['topic_type'] = '0';
$record['topic_vote'] = '0';
$sql = $db->GetInsertSQL($rs,$record);
$db->Execute("INSERT INTO phpbb_posts (topic_id, forum_id, poster_id, post_time) VALUES ('. $topicID .', '1', '2', '$_REQUEST[date]')");
$result2 = $db->Execute("SELECT MAX(post_id) as newID FROM phpbb_posts");
$rs = $db->Execute("SELECT * FROM `phpbb_posts` WHERE `topic_id` = '-1'");
$record = array();
$record['topic_id'] = '. $topicID .';
$record['forum_id'] = '1';
$record['poster_id'] = '2';
$record['post_time'] = $_REQUEST['date'];
$sql = $db->GetInsertSQL($rs,$record);
$db->Execute("INSERT INTO phpbb_posts_text (post_id, post_subject, post_text) VALUES ('. $postID .', '$_REQUEST[title]', '$_REQUEST[intro]')");
$rs = $db->Execute("SELECT * FROM `phpbb_posts_text` WHERE `topic_id` = '+1'");
$record = array();
$record['post_id'] = '. $postID .';
$record['post_subject'] = $_REQUEST['title'];
$record['post_text'] = $_REQUEST['intro'];
$sql = $db->GetInsertSQL($rs,$record);
SPMessage('Success | News has been successfully added.', 'news.php');
}