2011-03-28 14:21:28 +00:00
< ?
2012-12-18 08:00:12 +00:00
if ( ! check_perms ( 'admin_reports' ) && ! check_perms ( 'site_moderate_forums' )){
2011-03-28 14:21:28 +00:00
error ( 403 );
}
2012-10-11 08:00:15 +00:00
View :: show_header ( 'Other reports stats' );
2011-03-28 14:21:28 +00:00
?>
2012-08-19 08:00:19 +00:00
< div class = " header " >
< h2 > Other reports stats !</ h2 >
< div class = " linkbox " >
< a href = " reports.php " > New </ a > |
< a href = " reports.php?view=old " > Old </ a > |
< a href = " reports.php?action=stats " > Stats </ a >
</ div >
2012-04-16 08:00:24 +00:00
</ div >
2011-03-28 14:21:28 +00:00
< div class = " box pad thin " style = " padding: 0px 0px 0px 20px; margin-left: auto; margin-right: auto " >
2012-12-18 08:00:12 +00:00
< table class = " layout " >
2011-03-28 14:21:28 +00:00
< ?
2012-12-18 08:00:12 +00:00
if ( check_perms ( 'admin_reports' )) {
2011-03-28 14:21:28 +00:00
$DB -> query ( " SELECT um.Username, COUNT(r.ID) AS Reports FROM reports AS r JOIN users_main AS um ON um.ID=r.ResolverID WHERE r.ReportedTime > '2009-08-21 22:39:41' AND r.ReportedTime > NOW() - INTERVAL 24 HOUR GROUP BY r.ResolverID ORDER BY Reports DESC " );
$Results = $DB -> to_array ();
?>
< tr >
2013-01-15 08:00:37 +00:00
< td class = " label " >< strong > Reports resolved in the last 24 hours </ strong ></ td >
2011-03-28 14:21:28 +00:00
< td >
< table style = " width: 50%; margin-left: auto; margin-right: auto; " class = " border " >
< tr >
< td class = " head colhead_dark " > Username </ td >
< td class = " head colhead_dark " > Reports </ td >
</ tr >
< ? foreach ( $Results as $Result ) {
list ( $Username , $Reports ) = $Result ;
?>
< tr >
< td >< ? = $Username ?> </td>
2013-01-15 08:00:37 +00:00
< td >< ? = number_format ( $Reports ) ?> </td>
2011-03-28 14:21:28 +00:00
</ tr >
< ? } ?>
</ table >
</ td >
</ tr >
< tr >
< ?
$DB -> query ( " SELECT um.Username, COUNT(r.ID) AS Reports FROM reports AS r JOIN users_main AS um ON um.ID=r.ResolverID WHERE r.ReportedTime > '2009-08-21 22:39:41' AND r.ReportedTime > NOW() - INTERVAL 1 WEEK GROUP BY r.ResolverID ORDER BY Reports DESC " );
$Results = $DB -> to_array ();
?>
< td class = " label " >< strong > Reports resolved in the last week </ strong ></ td >
< td >
< table style = " width: 50%; margin-left: auto; margin-right: auto; " class = " border " >
< tr >
< td class = " head colhead_dark " > Username </ td >
< td class = " head colhead_dark " > Reports </ td >
</ tr >
< ? foreach ( $Results as $Result ) {
list ( $Username , $Reports ) = $Result ;
?>
< tr >
< td >< ? = $Username ?> </td>
2013-01-15 08:00:37 +00:00
< td >< ? = number_format ( $Reports ) ?> </td>
2011-03-28 14:21:28 +00:00
</ tr >
< ? } ?>
</ table >
</ td >
2012-09-15 08:00:25 +00:00
</ tr >
2011-03-28 14:21:28 +00:00
< tr >
< ?
$DB -> query ( " SELECT um.Username, COUNT(r.ID) AS Reports FROM reports AS r JOIN users_main AS um ON um.ID=r.ResolverID WHERE r.ReportedTime > '2009-08-21 22:39:41' AND r.ReportedTime > NOW() - INTERVAL 1 MONTH GROUP BY r.ResolverID ORDER BY Reports DESC " );
$Results = $DB -> to_array ();
?>
< td class = " label " >< strong > Reports resolved in the last month </ strong ></ td >
< td >
< table style = " width: 50%; margin-left: auto; margin-right: auto; " class = " border " >
< tr >
< td class = " head colhead_dark " > Username </ td >
< td class = " head colhead_dark " > Reports </ td >
</ tr >
< ? foreach ( $Results as $Result ) {
list ( $Username , $Reports ) = $Result ;
?>
< tr >
< td >< ? = $Username ?> </td>
2013-01-15 08:00:37 +00:00
< td >< ? = number_format ( $Reports ) ?> </td>
2011-03-28 14:21:28 +00:00
</ tr >
< ? } ?>
</ table >
</ td >
</ tr >
< tr >
< ?
$DB -> query ( " SELECT um.Username, COUNT(r.ID) AS Reports FROM reports AS r JOIN users_main AS um ON um.ID=r.ResolverID GROUP BY r.ResolverID ORDER BY Reports DESC " );
$Results = $DB -> to_array ();
?>
< td class = " label " >< strong > Reports resolved since 'other' reports ( 2009 - 08 - 21 ) </ strong ></ td >
< td >
< table style = " width: 50%; margin-left: auto; margin-right: auto; " class = " border " >
< tr >
< td class = " head colhead_dark " > Username </ td >
< td class = " head colhead_dark " > Reports </ td >
</ tr >
< ? foreach ( $Results as $Result ) {
list ( $Username , $Reports ) = $Result ;
?>
< tr >
< td >< ? = $Username ?> </td>
2013-01-15 08:00:37 +00:00
< td >< ? = number_format ( $Reports ) ?> </td>
2011-03-28 14:21:28 +00:00
</ tr >
< ? } ?>
</ table >
</ td >
</ tr >
2012-12-18 08:00:12 +00:00
< ? } ?>
< tr >
< ?
$DB -> query ( " select u.Username, count(LastPostAuthorID) as Trashed from forums_topics as f left join users_main as u on u.id = LastPostAuthorID where ForumID = 12 group by LastPostAuthorID order by Trashed desc limit 30; " );
$Results = $DB -> to_array ();
?>
< td class = " label " >< strong > Threads trashed since the beginning of time </ strong ></ td >
< td >
< table style = " width: 50%; margin-left: auto; margin-right: auto; " class = " border " >
< tr >
< td class = " head colhead_dark " > Place </ td >
< td class = " head colhead_dark " > Username </ td >
< td class = " head colhead_dark " > Trashed </ td >
</ tr >
< ?
$i = 1 ;
foreach ( $Results as $Result ) {
list ( $Username , $Trashed ) = $Result ;
?>
< tr >
< td >< ? = $i ?> </td>
< td >< ? = $Username ?> </td>
2013-01-15 08:00:37 +00:00
< td >< ? = number_format ( $Trashed ) ?> </td>
2012-12-18 08:00:12 +00:00
</ tr >
< ? $i ++ ; } ?>
</ table >
</ td >
</ tr >
2011-03-28 14:21:28 +00:00
</ table >
</ div >
< ?
2012-10-11 08:00:15 +00:00
View :: show_footer ();
2011-03-28 14:21:28 +00:00
?>