
Das beste wird sein ich lass das Formular an mich senden und ich trags
von Hand dann selber ein.
Gruß
Dietmar
Code: Alles auswählen
// Insert into tables by AmShaegar
$forum_id = '1'; // Gewünschtes Forum auswählen!!!
//$post_id = ;
$poster_id = $userdata['user_id'];
$post_time = time();
$poster_ip = $user_ip;
$post_username = $userdata['session_logged_in'] ? $userdata['username'] : $from_name;
$enable_bbcode = '0';
$enable_html = '0';
$enable_smilies = '1';
$enable_sig = '0';
//$post_edit_time = ;
//$post_edit_count = ;
//$topic_id = ;
$topic_title = $enquiry;
$topic_poster = $poster_id;
$topic_time = $post_time;
//$topic_views = ;
///$topic_replies = ;
//$topic_status = '0';
//$topic_vote = '0';
//$topic_type = '0';
$SEL = "SELECT post_id FROM ".POSTS_TABLE." ORDER BY post_id DESC LIMIT 1";
$QUE = mysql_query($SEL);
$res = mysql_fetch_object($QUE);
$post_id = $res->post_id + 1;
$topic_first_post_id = $post_id;
$topic_last_post_id = $post_id;
//$topic_moved_id = '0';
$INS_topics = "INSERT INTO ".TOPICS_TABLE." (forum_id, topic_title, topic_poster, topic_time, topic_first_post_id, topic_last_post_id) VALUES ('$forum_id', '$topic_title', '$topic_poster', '$topic_time', '$topic_first_post_id', '$topic_last_post_id')";
mysql_query($INS_topics) or die("pech3");
$SEL_t = "SELECT topic_id FROM ".TOPICS_TABLE." WHERE topic_time LIKE '$topic_time'";
$QUE_t = mysql_query($SEL_t);
$res_t = mysql_fetch_object($QUE_t);
$topic_id = $res_t->topic_id;
$INS_posts = "INSERT INTO ".POSTS_TABLE." (topic_id, forum_id, poster_id, post_time, poster_ip, post_username, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ('$topic_id', '$forum_id', '$poster_id', '$post_time', '$poster_ip', '$post_username', '$enable_bbcode', '$enable_html', '$enable_smilies', '$enable_sig')";
mysql_query($INS_posts) or die("pech1");
$bbcode_uid = '1234567890';
$post_subject = $enquiry;
$post_text = addslashes($message);
$INS_posts_text = "INSERT INTO ".POSTS_TEXT_TABLE." (post_id, bbcode_uid, post_subject, post_text) VALUES ('$post_id', '$bbcode_uid', '$post_subject', '$post_text')";
mysql_query($INS_posts_text) or die("pech2");