--- revreceived.php 2026-04-17 11:09:37.000000000 -0400
+++ revreceived_total_v3.php 2026-11-05 08:11:40.919669200 -0500
@@ -23,6 +23,7 @@
// ----------------------------------------------------------------------
if(!defined("_CHARSET")) exit( );
+define ("_TOTAL", "Total");
$output .= "
"._MANAGEREVIEWS."
";
$count = dbquery("SELECT count(s.sid) FROM ".TABLEPREFIX."fanfiction_stories AS s LEFT JOIN ".TABLEPREFIX."fanfiction_coauthors AS c ON s.sid = c.sid WHERE s.uid = '".USERUID."' OR c.uid = '".USERUID."'");
@@ -43,10 +44,14 @@
if($x == 0) $output .= "| "._NORESULTS." |
";
$output .= "| "._STORIES." | "._REVIEWS." | "._UNRESPONDED." |
";
$x = 0;
+ $totalReviews = 0;
+ $totalUnresponded = 0;
if($numrows > 0) {
$query = dbquery("SELECT story.sid, story.title, story.reviews, sum(reviews.respond) as respond FROM ".TABLEPREFIX."fanfiction_stories as story JOIN ".TABLEPREFIX."fanfiction_reviews as reviews ON story.sid = reviews.item AND reviews.type = 'ST' LEFT JOIN ".TABLEPREFIX."fanfiction_coauthors AS c ON c.sid = story.sid WHERE (story.uid = '".USERUID."' OR c.uid = '".USERUID."') GROUP BY reviews.item ORDER BY story.title");
while($story = dbassoc($query)) {
if($story['reviews'] > 0) {
+ $totalReviews += $story['reviews'];
+ $totalUnresponded += $story['reviews'] - $story['respond'];
$output .= "| ".$story['title']." | ".$story['reviews']." | ".($story['reviews'] - $story['respond'])." |
";
@@ -55,11 +60,20 @@
}
}
}
- if($x == 0) $output .= "| "._NORESULTS." |
";
+ if($x == 0) {
+ $output .= "| "._NORESULTS." |
";
+ } else {
+ $output .= "| "._TOTAL." | "
+ . ""._REVIEWS." | "
+ . ""._UNRESPONDED." |
"
+ . "| "._TOTAL." | "
+ . "".$totalReviews." | "
+ . "".$totalUnresponded." |
";
+ }
// For other items that might receive reviews such as fan art.
$code = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_codeblocks WHERE code_type = 'revreceived'");
while($c = dbassoc($code)) {
eval($c['code_text']);
}
$output .= "";
-?>
\ No newline at end of file
+?>