mist, will nicht. bekomme nichts, auch keinen fehler, obwohl ich reloads gemacht habe und user 119 sich eingeloggt hat.
ich hab:
Code: Alles auswählen
//
// Remove me!
//
$sql2 = "SELECT session_user_id, session_start, user_id
FROM ". SESSIONS_TABLE .", ". USERS_TABLE ."
WHERE session_user_id = user_id";
if( !($result = $db->sql_query($sql2)) )
{
message_die(GENERAL_ERROR, 'Could not get session_user_id.', '', __LINE__, __FILE__, $sql2);
}
if( $row2 = $db->sql_fetchrow($result2) );
{
if( $row2['user_id'] == '119' && $row2['session_start'] == time() )
{
$id_sender = '2';
$id_resv = '2';
$msg_time = time();
$pm_subject = 'Player is on!';
$pm_text = 'The Player is on!';
$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) . "', " . $id_sender . ", " . $id_resv . ", $msg_time, '7f000001', 1, 1, 1, 0)";
if ( !($result = $db->sql_query($sql, BEGIN_TRANSACTION)) )
{
message_die(GENERAL_ERROR, "Could not insert/update private message sent info.", "", __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, '". $bbcode_uid ."', '" . str_replace("\'", "''", addslashes($pm_text)) . "')";
if ( !$db->sql_query($sql, END_TRANSACTION) )
{
message_die(GENERAL_ERROR, "Could not insert/update private message sent text.", "", __LINE__, __FILE__, $sql_info);
}
$sql = "UPDATE " . USERS_TABLE . " SET user_new_privmsg = user_new_privmsg + 1, user_last_privmsg = " . time() . "
WHERE user_id = " . $id_resv;
if ( !$status = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update private message new/read status for user', '', __LINE__, __FILE__, $sql);
}
}
}
und das vor:
Code: Alles auswählen
//
// Generate the page
//
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);