if (!check_perms("users_mod")) { error(404); } include(SERVER_ROOT.'/classes/text.class.php'); $Text = new TEXT(true); $DB->query(" SELECT uq.ID, uq.Question, uq.UserID, uq.Date, ( SELECT COUNT(1) FROM staff_answers WHERE QuestionID = uq.ID ) AS Responses FROM user_questions AS uq WHERE uq.ID NOT IN ( SELECT siq.QuestionID FROM staff_ignored_questions AS siq WHERE siq.UserID = '$LoggedUser[ID]' ) AND uq.ID NOT IN ( SELECT sq.QuestionID FROM staff_answers AS sq WHERE sq.UserID = '$LoggedUser[ID]' ) ORDER BY uq.Date DESC"); $Questions = $DB->to_array(); $DB->query(" SELECT COUNT(1) FROM user_questions"); list($TotalQuestions) = $DB->next_record(); View::show_header("Ask the Staff", "questions"); ?>