'reports', 'SET' => 'zapped='.time().', zapped_by='.$forum_user['id'], 'WHERE' => 'id IN('.implode(',', $reports_to_mark).') AND zapped IS NULL' ); ($hook = get_hook('arp_mark_as_read_qr_mark_reports_as_read')) ? eval($hook) : null; $forum_db->query_build($query) or error(__FILE__, __LINE__); ($hook = get_hook('arp_mark_as_read_pre_redirect')) ? eval($hook) : null; redirect(forum_link($forum_url['admin_reports']), $lang_admin_reports['Reports marked read'].' '.$lang_admin_common['Redirect']); } $forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0; // Setup breadcrumbs $forum_page['crumbs'] = array( array($forum_config['o_board_title'], forum_link($forum_url['index'])), array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])) ); if ($forum_user['g_id'] == FORUM_ADMIN) $forum_page['crumbs'][] = array($lang_admin_common['Management'], forum_link($forum_url['admin_reports'])); $forum_page['crumbs'][] = array($lang_admin_common['Reports'], forum_link($forum_url['admin_reports'])); ($hook = get_hook('arp_pre_header_load')) ? eval($hook) : null; define('FORUM_PAGE_SECTION', 'management'); define('FORUM_PAGE', 'admin-reports'); require FORUM_ROOT.'header.php'; // START SUBST - ob_start(); ($hook = get_hook('arp_main_output_start')) ? eval($hook) : null; // Fetch any unread reports $query = array( 'SELECT' => 'r.id, r.topic_id, r.forum_id, r.reported_by, r.created, r.message, p.id AS pid, t.subject, f.forum_name, u.username AS reporter', 'FROM' => 'reports AS r', 'JOINS' => array( array( 'LEFT JOIN' => 'posts AS p', 'ON' => 'r.post_id=p.id' ), array( 'LEFT JOIN' => 'topics AS t', 'ON' => 'r.topic_id=t.id' ), array( 'LEFT JOIN' => 'forums AS f', 'ON' => 'r.forum_id=f.id' ), array( 'LEFT JOIN' => 'users AS u', 'ON' => 'r.reported_by=u.id' ) ), 'WHERE' => 'r.zapped IS NULL', 'ORDER BY' => 'r.created DESC' ); ($hook = get_hook('arp_qr_get_new_reports')) ? eval($hook) : null; $forum_page['new_reports'] = false; $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); if ($forum_db->num_rows($result)) { $forum_page['new_reports'] = true; ?>

fetch_assoc($result)) { $reporter = ($cur_report['reporter'] != '') ? ''.forum_htmlencode($cur_report['reporter']).'' : $lang_admin_reports['Deleted user']; $forum = ($cur_report['forum_name'] != '') ? ''.forum_htmlencode($cur_report['forum_name']).'' : $lang_admin_reports['Deleted forum']; $topic = ($cur_report['subject'] != '') ? ''.forum_htmlencode($cur_report['subject']).'' : $lang_admin_reports['Deleted topic']; $message = str_replace("\n", '
', forum_htmlencode($cur_report['message'])); $post_id = ($cur_report['pid'] != '') ? 'Post #'.$cur_report['pid'].'' : $lang_admin_reports['Deleted post']; ($hook = get_hook('arp_new_report_pre_display')) ? eval($hook) : null; ?>

: :

'r.id, r.topic_id, r.forum_id, r.reported_by, r.created, r.message, r.zapped, r.zapped_by AS zapped_by_id, p.id AS pid, t.subject, f.forum_name, u.username AS reporter, u2.username AS zapped_by', 'FROM' => 'reports AS r', 'JOINS' => array( array( 'LEFT JOIN' => 'posts AS p', 'ON' => 'r.post_id=p.id' ), array( 'LEFT JOIN' => 'topics AS t', 'ON' => 'r.topic_id=t.id' ), array( 'LEFT JOIN' => 'forums AS f', 'ON' => 'r.forum_id=f.id' ), array( 'LEFT JOIN' => 'users AS u', 'ON' => 'r.reported_by=u.id' ), array( 'LEFT JOIN' => 'users AS u2', 'ON' => 'r.zapped_by=u2.id' ) ), 'WHERE' => 'r.zapped IS NOT NULL', 'ORDER BY' => 'r.zapped DESC', 'LIMIT' => '10' ); ($hook = get_hook('arp_qr_get_last_zapped_reports')) ? eval($hook) : null; $forum_page['old_reports'] = false; $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); if ($forum_db->num_rows($result)) { $i = 1; $forum_page['group_count'] = $forum_page['item_count'] = $forum_page['item_num'] = 0; $forum_page['old_reports'] = true; ?>

num_rows($result)) ? '' : ' '.$lang_admin_reports['No new reports'] ?>

fetch_assoc($result)) { $reporter = ($cur_report['reporter'] != '') ? ''.forum_htmlencode($cur_report['reporter']).'' : $lang_admin_reports['Deleted user']; $forum = ($cur_report['forum_name'] != '') ? ''.forum_htmlencode($cur_report['forum_name']).'' : $lang_admin_reports['Deleted forum']; $topic = ($cur_report['subject'] != '') ? ''.forum_htmlencode($cur_report['subject']).'' : $lang_admin_reports['Deleted topic']; $message = str_replace("\n", '
', forum_htmlencode($cur_report['message'])); $post_id = ($cur_report['pid'] != '') ? 'Post #'.$cur_report['pid'].'' : $lang_admin_reports['Deleted post']; $zapped_by = ($cur_report['zapped_by'] != '') ? ''.forum_htmlencode($cur_report['zapped_by']).'' : $lang_admin_reports['Deleted user']; ($hook = get_hook('arp_report_pre_display')) ? eval($hook) : null; ?>

: :

', $tpl_temp, $tpl_main); ob_end_clean(); // END SUBST - require FORUM_ROOT.'footer.php';