diff -r e3d7322305bf -r 5e1f1e916419 punbb/admin_reports.php --- a/punbb/admin_reports.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,164 +0,0 @@ -query('SELECT zapped FROM '.$pun_db->prefix.'reports WHERE id='.$zap_id) or error('Unable to fetch report info', __FILE__, __LINE__, $pun_db->error()); - $zapped = $pun_db->result($result); - - if ($zapped == '') - $pun_db->query('UPDATE '.$pun_db->prefix.'reports SET zapped='.time().', zapped_by='.$pun_user['id'].' WHERE id='.$zap_id) or error('Unable to zap report', __FILE__, __LINE__, $pun_db->error()); - - pun_redirect('admin_reports.php', 'Report zapped. Redirecting …'); -} - - -$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Reports'; -require PUN_ROOT.'header.php'; - -generate_admin_menu('reports'); - -?> -
-

New reports

-
-
-query('SELECT r.id, r.post_id, r.topic_id, r.forum_id, r.reported_by, r.created, r.message, t.subject, f.forum_name, u.username AS reporter FROM '.$pun_db->prefix.'reports AS r LEFT JOIN '.$pun_db->prefix.'topics AS t ON r.topic_id=t.id LEFT JOIN '.$pun_db->prefix.'forums AS f ON r.forum_id=f.id LEFT JOIN '.table_prefix.'users AS u ON r.reported_by=u.user_id WHERE r.zapped IS NULL ORDER BY created DESC') or error('Unable to fetch report list', __FILE__, __LINE__, $pun_db->error()); - -if ($pun_db->num_rows($result)) -{ - while ($cur_report = $pun_db->fetch_assoc($result)) - { - $reporter = ($cur_report['reporter'] != '') ? ''.pun_htmlspecialchars($cur_report['reporter']).'' : 'Deleted user'; - $forum = ($cur_report['forum_name'] != '') ? ''.pun_htmlspecialchars($cur_report['forum_name']).'' : 'Deleted'; - $topic = ($cur_report['subject'] != '') ? ''.pun_htmlspecialchars($cur_report['subject']).'' : 'Deleted'; - $post = ($cur_report['post_id'] != '') ? str_replace("\n", '
', pun_htmlspecialchars($cur_report['message'])) : 'Deleted'; - $postid = ($cur_report['post_id'] != '') ? 'Post #'.$cur_report['post_id'].'' : 'Deleted'; - -?> -
-
- Reported -
- - - - - - - - - -
Forum » Topic » Post »  » 
Report by
-
-
-
-There are no new reports.

'."\n"; - -?> -
-
-
- -
-

10 last zapped reports

-
-
-query('SELECT r.id, r.post_id, r.topic_id, r.forum_id, r.reported_by, r.message, r.zapped, r.zapped_by AS zapped_by_id, t.subject, f.forum_name, u.username AS reporter, u2.username AS zapped_by FROM '.$pun_db->prefix.'reports AS r LEFT JOIN '.$pun_db->prefix.'topics AS t ON r.topic_id=t.id LEFT JOIN '.$pun_db->prefix.'forums AS f ON r.forum_id=f.id LEFT JOIN '.table_prefix.'users AS u ON r.reported_by=u.user_id LEFT JOIN '.table_prefix.'users AS u2 ON r.zapped_by=u2.user_id WHERE r.zapped IS NOT NULL ORDER BY zapped DESC LIMIT 10') or error('Unable to fetch report list', __FILE__, __LINE__, $pun_db->error()); - -if ($pun_db->num_rows($result)) -{ - while ($cur_report = $pun_db->fetch_assoc($result)) - { - $reporter = ($cur_report['reporter'] != '') ? ''.pun_htmlspecialchars($cur_report['reporter']).'' : 'Deleted user'; - $forum = ($cur_report['forum_name'] != '') ? ''.pun_htmlspecialchars($cur_report['forum_name']).'' : 'Deleted'; - $topic = ($cur_report['subject'] != '') ? ''.pun_htmlspecialchars($cur_report['subject']).'' : 'Deleted'; - $post = ($cur_report['post_id'] != '') ? str_replace("\n", '
', pun_htmlspecialchars($cur_report['message'])) : 'Post deleted'; - $post_id = ($cur_report['post_id'] != '') ? 'Post #'.$cur_report['post_id'].'' : 'Deleted'; - $zapped_by = ($cur_report['zapped_by'] != '') ? ''.pun_htmlspecialchars($cur_report['zapped_by']).'' : 'N/A'; - -?> -
-
- Zapped -
- - - - - - - - - -
Forum » Topic » Post »  » 
Reported by
Zapped by
-
-
-
-There are no zapped reports.

'."\n"; - -?> -
-
-
-
- -