include(SERVER_ROOT.'/classes/class_text.php'); $Text = new TEXT; if ($ConvID = (int)$_GET['id']) { // Get conversation info $DB->query("SELECT Subject, UserID, Level, AssignedToUser, Unread, Status FROM staff_pm_conversations WHERE ID=$ConvID"); list($Subject, $UserID, $Level, $AssignedToUser, $Unread, $Status) = $DB->next_record(); if ($UserID == $LoggedUser['ID'] || $IsStaff || ($Level == 0 && $IsFLS) || $LoggedUser['ID'] == $AssignedToUser) { // User is trying to view their own unread conversation, set it to read if ($UserID == $LoggedUser['ID'] && $Unread) { $DB->query("UPDATE staff_pm_conversations SET Unread=false WHERE ID=$ConvID"); // Clear cache for user $Cache->delete_value('staff_pm_new_'.$LoggedUser['ID']); } show_header('Staff PM', 'staffpm,bbcode'); $UserInfo = user_info($UserID); $UserStr = format_username($UserID, $UserInfo['Username'], $UserInfo['Donor'], $UserInfo['Warned'], $UserInfo['Enabled'], $UserInfo['PermissionID']); $OwnerID = $UserID; ?>