= 700) { $ViewString = 'My unanswered'; $WhereCondition = "WHERE ((Level >= ".max($Classes[MOD]['Level'],700)." AND Level <= $UserLevel) OR AssignedToUser='".$LoggedUser['ID']."') AND Status='Unanswered'"; } elseif ($UserLevel == 650) { // Forum Mods $ViewString = 'My unanswered'; $WhereCondition = "WHERE (Level = $UserLevel OR AssignedToUser='".$LoggedUser['ID']."') AND Status='Unanswered'"; } else { // FLS $ViewString = 'Unanswered'; $WhereCondition = "WHERE (Level <= $UserLevel OR AssignedToUser='".$LoggedUser['ID']."') AND Status='Unanswered'"; } break; } list($Page, $Limit) = Format::page_limit(MESSAGES_PER_PAGE); // Get messages $StaffPMs = $DB->query(" SELECT SQL_CALC_FOUND_ROWS ID, Subject, UserID, Status, Level, AssignedToUser, Date, Unread, ResolverID FROM staff_pm_conversations $WhereCondition ORDER BY $SortStr Level DESC, Date DESC LIMIT $Limit "); $DB->query('SELECT FOUND_ROWS()'); list($NumResults) = $DB->next_record(); $DB->set_query_id($StaffPMs); $CurURL = Format::get_url(); if (empty($CurURL)) { $CurURL = 'staffpm.php?'; } else { $CurURL = 'staffpm.php?'.$CurURL.'&'; } $Pages = Format::get_pages($Page, $NumResults, MESSAGES_PER_PAGE, 9); $Row = 'a'; // Start page ?>