// skipfile
if (!check_perms('users_mod') && !check_perms("site_mark_suggestions")) {
error(403);
}
View::show_header('Suggestions');
$Categories = array(
"Dupe Suggestion",
"Already Implemented",
"Already Rejected Suggestion/Against The Rules",
"Awful Suggestion",
"Suggestion",
"Approved Suggestion"
)?>
Suggestions
Marked
Username |
Count |
$DB->query("SELECT
s.UserID, count(s.ThreadID) AS C
FROM marked_suggestions AS s
GROUP BY s.UserID ORDER BY c DESC LIMIT 15");
$Row = 'b';
while ( list ($UserID, $Count) = $DB->next_record() ) {
$Row = ($Row == 'a') ? 'b' : 'a';
?>
=Users::format_username($UserID)?> |
=number_format($Count)?> |
}?>
Implemented
Username |
Count |
$DB->query("SELECT
LastPostAuthorID, count(LastPostAuthorID) AS C
FROM forums_topics AS f
WHERE ForumID = 63 AND f.Title LIKE '[implemented]%'
GROUP BY LastPostAuthorID ORDER BY c DESC LIMIT 15");
$Row = 'b';
while ( list ($UserID, $Count) = $DB->next_record() ) {
$Row = ($Row == 'a') ? 'b' : 'a';
?>
=Users::format_username($UserID)?> |
=number_format($Count)?> |
}?>
Rejected
Username |
Count |
$DB->query("SELECT
LastPostAuthorID, count(LastPostAuthorID) AS C
FROM forums_topics AS f
WHERE ForumID = 63 AND f.Title LIKE '[rejected]%'
GROUP BY LastPostAuthorID ORDER BY c DESC LIMIT 15");
$Row = 'b';
while ( list ($UserID, $Count) = $DB->next_record() ) {
$Row = ($Row == 'a') ? 'b' : 'a';
?>
=Users::format_username($UserID)?> |
=number_format($Count)?> |
}?>
}
elseif ($_GET['view'] == "marked") {
if(((int) $_GET['all']) == 1) {
$Forums = "9, 63, 13";
} elseif(((int) $_GET['closed']) == 1) {
$Forums = "63, 13";
}
else {
$Forums = 9;
}
foreach ($Categories as $Key => $Value) {
$DB->query("SELECT
f.Title, s.ThreadID, s.URL, s.UserID, s.Notes
FROM marked_suggestions AS s
LEFT JOIN forums_topics AS f ON s.ThreadID = f.ID
WHERE f.ForumID IN ($Forums) AND s.Category = $Key
ORDER BY f.Title ASC");
?>
=$Value?> (=$DB->record_count()?>)
Thread title |
Username |
Links |
Notes |
$Row = 'b';
while ( list ($Title, $ThreadID, $URL, $UserID, $Notes) = $DB->next_record() ) {
$Row = ($Row == 'a') ? 'b' : 'a';
?>
=$Title?> |
=Users::format_username($UserID)?> |
=$URL?> |
=$Notes?> |
}?>
}
}
?>
View::show_footer();
?>