'reports',
'SET' => 'zapped='.time().', zapped_by='.$pun_user['id'],
'WHERE' => 'id IN('.implode(',', $reports_to_mark).') AND zapped IS NULL'
);
($hook = get_hook('arp_qr_mark_reports_as_read')) ? eval($hook) : null;
$pun_db->query_build($query) or error(__FILE__, __LINE__);
redirect(pun_link($pun_url['admin_reports']), $lang_admin['Reports marked read'].' '.$lang_admin['Redirect']);
}
$pun_page['fld_count'] = $pun_page['set_count'] = 0;
// Setup breadcrumbs
$pun_page['crumbs'] = array(
array($pun_config['o_board_title'], pun_link($pun_url['index'])),
array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])),
$lang_admin['Reports']
);
($hook = get_hook('arp_pre_header_load')) ? eval($hook) : null;
define('PUN_PAGE_SECTION', 'management');
define('PUN_PAGE', 'admin-reports');
require PUN_ROOT.'header.php';
?>
{ }
'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;
$result = $pun_db->query_build($query) or error(__FILE__, __LINE__);
if ($pun_db->num_rows($result))
{
?>
'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;
$result = $pun_db->query_build($query) or error(__FILE__, __LINE__);
if ($pun_db->num_rows($result))
{
$i = 1;
$pun_page['num_items'] = 0;
while ($cur_report = $pun_db->fetch_assoc($result))
{
$reporter = ($cur_report['reporter'] != '') ? '
'.pun_htmlencode($cur_report['reporter']).'' : $lang_admin['Deleted user'];
$forum = ($cur_report['forum_name'] != '') ? '
'.pun_htmlencode($cur_report['forum_name']).'' : $lang_admin['Deleted forum'];
$topic = ($cur_report['subject'] != '') ? '
'.pun_htmlencode($cur_report['subject']).'' : $lang_admin['Deleted topic'];
$message = str_replace("\n", '
', pun_htmlencode($cur_report['message']));
$post_id = ($cur_report['pid'] != '') ? '
Post #'.$cur_report['pid'].'' : $lang_admin['Deleted post'];
$zapped_by = ($cur_report['zapped_by'] != '') ? '
'.pun_htmlencode($cur_report['zapped_by']).'' : $lang_admin['Deleted user'];
($hook = get_hook('arp_report_pre_display')) ? eval($hook) : null;
?>