Versuch´s ma damit..
++FINDE (nur ein Auszug)++
++DAVOR EINFÜGEN++
Code: Alles auswählen
// Donate PN
$pm_from_user = $userdata['user_id'];
$pm_to_user = $user_id;
$pm_time = time();
$pm_subject = 'Hier den Titel der PM eintragen'; // <--
$pm_text = 'Hier den Text eintragen.'; // <---
$pm_bbcode_uid = '';
$sql = "INSERT INTO ". PRIVMSGS_TABLE ." (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip, privmsgs_enable_html, privmsgs_enable_bbcode, privmsgs_enable_smilies, privmsgs_attach_sig)
VALUES (". PRIVMSGS_NEW_MAIL .", '". str_replace("\'", "''", $pm_subject) ."', '". $pm_from_user ."', '". $pm_to_user ."', $pm_time, '$user_ip', $html_on, $bbcode_on, $smilies_on, $attach_sig)";
if( !($result = $db->sql_query($sql, BEGIN_TRANSACTION)) )
{
message_die(GENERAL_ERROR, "Could not send auto-reply.", "", __LINE__, __FILE__, $sql_info);
}
$privmsg_sent_id = $db->sql_nextid();
$sql = "INSERT INTO ". PRIVMSGS_TEXT_TABLE ." (privmsgs_text_id, privmsgs_bbcode_uid, privmsgs_text)
VALUES ($privmsg_sent_id, '". $pm_bbcode_uid ."', '". str_replace("\'", "''", addslashes($pm_text)) ."')";
if( !$db->sql_query($sql, END_TRANSACTION) )
{
message_die(GENERAL_ERROR, "Could not insert/update auto reply text.", "", __LINE__, __FILE__, $sql_info);
}
$sql = "UPDATE ". USERS_TABLE ." SET user_new_privmsg = user_new_privmsg + 1, user_last_privmsg = ". time() ."
WHERE user_id = '". $pm_to_user ."'";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update private message new/read status (auto reply) for user.', '', __LINE__, __FILE__, $sql);
}
// Donate PN
..und berichte dann, wie´s funktioniert (ob der Absender/Adressat stimmt oder nicht).