query("SELECT InInbox, InSentbox FROM pm_conversations_users WHERE UserID='$UserID' AND ConvID='$ConvID'"); if ($DB->record_count() == 0) { error(403); } list($InInbox, $InSentbox) = $DB->next_record(); if (!$InInbox && !$InSentbox) { error(404); } // Get information on the conversation $DB->query(" SELECT c.Subject, cu.Sticky, cu.UnRead, cu.ForwardedTo FROM pm_conversations AS c JOIN pm_conversations_users AS cu ON c.ID=cu.ConvID WHERE c.ID='$ConvID' AND UserID='$UserID'"); list($Subject, $Sticky, $UnRead, $ForwardedID) = $DB->next_record(); $DB->query(" SELECT um.ID, Username FROM pm_messages AS pm JOIN users_main AS um ON um.ID=pm.SenderID WHERE pm.ConvID='$ConvID'"); while (list($PMUserID, $Username) = $DB->next_record()) { $PMUserID = (int)$PMUserID; $Users[$PMUserID]['UserStr'] = Users::format_username($PMUserID, true, true, true, true); $Users[$PMUserID]['Username'] = $Username; } $Users[0]['UserStr'] = 'System'; // in case it's a message from the system $Users[0]['Username'] = 'System'; if ($UnRead == '1') { $DB->query("UPDATE pm_conversations_users SET UnRead='0' WHERE ConvID='$ConvID' AND UserID='$UserID'"); // Clear the caches of the inbox and sentbox $Cache->decrement('inbox_new_'.$UserID); } View::show_header('View conversation '.$Subject, 'comments,inbox,bbcode'); // Get messages $DB->query("SELECT SentDate, SenderID, Body, ID FROM pm_messages AS m WHERE ConvID='$ConvID' ORDER BY ID"); ?>

0 ? ' (Forwarded to '.$ForwardedName.')' : '')?>

next_record()) { ?>
- Quote
full_format($Body)?>
query(" SELECT UserID FROM pm_conversations_users WHERE UserID!='$LoggedUser[ID]' AND ConvID='$ConvID' AND (ForwardedTo=0 OR ForwardedTo=UserID)"); $ReceiverIDs = $DB->collect('UserID'); if (!empty($ReceiverIDs) && (empty($LoggedUser['DisablePM']) || array_intersect($ReceiverIDs, array_keys($StaffIDs)))) { ?>

Reply


Manage conversation

/>
query("SELECT SupportFor FROM users_info WHERE UserID = ".$LoggedUser['ID']); list($FLS) = $DB->next_record(); if ((check_perms('users_mod') || $FLS != '') && (!$ForwardedID || $ForwardedID == $LoggedUser['ID'])) { ?>

Forward conversation