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']) || ($AssignedToUser == $LoggedUser['ID']) || (($Level > 0 && $Level <= $LoggedUser['EffectiveClass']) || ($Level == 0 && $IsFLS)) )) { // User is trying to view someone else's conversation error(403); } // 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']); } View::show_header('Staff PM', 'staffpm,bbcode'); $UserInfo = Users::user_info($UserID); $UserStr = Users::format_username($UserID, true, true, true, true); $OwnerID = $UserID; $OwnerName = $UserInfo['Username']; ?>

Staff PM -



query(" SELECT UserID, SentDate, Message, ID FROM staff_pm_messages WHERE ConvID = $ConvID"); while (list($UserID, $SentDate, $Message, $MessageID) = $DB->next_record()) { // Set user string if ($UserID == $OwnerID) { // User, use prepared string $UserString = $UserStr; $Username = $OwnerName; } else { // Staff/FLS $UserInfo = Users::user_info($UserID); $UserString = Users::format_username($UserID, true, true, true, true); $Username = $UserInfo['Username']; } ?>
tag is an ugly hack. get rid of it. ?> # - Quote
full_format($Message)?>
set_query_id($StaffPMs); } // Common responses if ($IsFLS && $Status != 'Resolved') { ?>

Reply