} require_once QA_INCLUDE_DIR . 'app/admin.php'; require_once QA_INCLUDE_DIR . 'db/admin.php'; require_once QA_INCLUDE_DIR . 'db/selects.php'; require_once QA_INCLUDE_DIR . 'app/format.php'; // Find recently hidden questions, answers, comments $userid = qa_get_logged_in_userid(); list($hiddenquestions, $hiddenanswers, $hiddencomments) = qa_db_select_with_pending(qa_db_qs_selectspec($userid, 'created', 0, null, null, 'Q_HIDDEN', true), qa_db_recent_a_qs_selectspec($userid, 0, null, null, 'A_HIDDEN', true), qa_db_recent_c_qs_selectspec($userid, 0, null, null, 'C_HIDDEN', true)); // Check admin privileges (do late to allow one DB query) if (qa_user_maximum_permit_error('permit_hide_show') && qa_user_maximum_permit_error('permit_delete_hidden')) { $qa_content = qa_content_prepare(); $qa_content['error'] = qa_lang_html('users/no_permission'); return $qa_content; } // Check to see if any have been reshown or deleted $pageerror = qa_admin_check_clicks(); // Combine sets of questions and remove those this user has no permissions for $questions = qa_any_sort_by_date(array_merge($hiddenquestions, $hiddenanswers, $hiddencomments)); if (qa_user_permit_error('permit_hide_show') && qa_user_permit_error('permit_delete_hidden')) { // not allowed to see all hidden posts foreach ($questions as $index => $question) { if (qa_user_post_permit_error('permit_hide_show', $question) && qa_user_post_permit_error('permit_delete_hidden', $question)) { unset($questions[$index]); } } } // Get information for users $usershtml = qa_userids_handles_html(qa_any_get_userids_handles($questions)); // Create list of actual hidden postids and see which ones have dependents $qhiddenpostid = array(); foreach ($questions as $key => $question) {
exit; } require_once QA_INCLUDE_DIR . 'qa-app-admin.php'; require_once QA_INCLUDE_DIR . 'qa-db-selects.php'; require_once QA_INCLUDE_DIR . 'qa-app-format.php'; // Find most flagged questions, answers, comments $userid = qa_get_logged_in_userid(); $questions = qa_db_select_with_pending(qa_db_flagged_post_qs_selectspec($userid, 0, true)); // Check admin privileges (do late to allow one DB query) if (qa_user_permit_error('permit_hide_show')) { $qa_content = qa_content_prepare(); $qa_content['error'] = qa_lang_html('users/no_permission'); return $qa_content; } // Check to see if any were cleared or hidden here qa_admin_check_clicks(); // Get information for users $usershtml = qa_userids_handles_html(qa_any_get_userids_handles($questions)); // Prepare content for theme $qa_content = qa_content_prepare(); $qa_content['title'] = qa_lang_html('admin/most_flagged_title'); $qa_content['error'] = qa_admin_page_error(); $qa_content['q_list'] = array('form' => array('tags' => 'METHOD="POST" ACTION="' . qa_self_html() . '"'), 'qs' => array()); if (count($questions)) { foreach ($questions as $question) { $postid = qa_html(isset($question['opostid']) ? $question['opostid'] : $question['postid']); $elementid = 'p' . $postid; $htmloptions = qa_post_html_defaults('Q'); $htmloptions['voteview'] = false; $htmloptions['tagsview'] = $question['obasetype'] == 'Q'; $htmloptions['answersview'] = false;