| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,65 @@ |
| 1 |
+<?php |
|
| 2 |
+// ---------------------------------------------------------------------- |
|
| 3 |
+// eFiction 3.2 |
|
| 4 |
+// Copyright (c) 2007 by Tammy Keefer |
|
| 5 |
+// Valid HTML 4.01 Transitional |
|
| 6 |
+// Based on eFiction 1.1 |
|
| 7 |
+// Copyright (C) 2003 by Rebecca Smallwood. |
|
| 8 |
+// http://efiction.sourceforge.net/ |
|
| 9 |
+// ---------------------------------------------------------------------- |
|
| 10 |
+// LICENSE |
|
| 11 |
+// |
|
| 12 |
+// This program is free software; you can redistribute it and/or |
|
| 13 |
+// modify it under the terms of the GNU General Public License (GPL) |
|
| 14 |
+// as published by the Free Software Foundation; either version 2 |
|
| 15 |
+// of the License, or (at your option) any later version. |
|
| 16 |
+// |
|
| 17 |
+// This program is distributed in the hope that it will be useful, |
|
| 18 |
+// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 19 |
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 20 |
+// GNU General Public License for more details. |
|
| 21 |
+// |
|
| 22 |
+// To read the license please visit http://www.gnu.org/copyleft/gpl.html |
|
| 23 |
+// ---------------------------------------------------------------------- |
|
| 24 |
+ |
|
| 25 |
+if(!defined("_CHARSET")) exit( );
|
|
| 26 |
+ |
|
| 27 |
+ $output .= "<div id=\"pagetitle\">"._MANAGEREVIEWS."</div>"; |
|
| 28 |
+ $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."'");
|
|
| 29 |
+ list($numrows)= dbrow($count); |
|
| 30 |
+ $count2 = dbquery("SELECT count(seriesid) FROM ".TABLEPREFIX."fanfiction_series WHERE uid = '".USERUID."'");
|
|
| 31 |
+ list($numrows2)= dbrow($count2); |
|
| 32 |
+ $output .= "<table class=\"tblborder\" cellspacing=\"0\" cellpadding=\"4\" style='width: 90%; margin: 0 auto;'><tr><th>"._SERIES."</th><th>"._REVIEWS."</th><th>"._UNRESPONDED."</th></tr>"; |
|
| 33 |
+ $x = 0; |
|
| 34 |
+ if($numrows2 > 0) {
|
|
| 35 |
+ $query = dbquery("SELECT series.seriesid, series.title, series.reviews, sum(reviews.respond) as respond FROM ".TABLEPREFIX."fanfiction_series as series, ".TABLEPREFIX."fanfiction_reviews as reviews WHERE series.uid = '".USERUID."' AND series.seriesid = reviews.item AND reviews.type = 'SE' GROUP BY reviews.item ORDER BY series.title");
|
|
| 36 |
+ while($story = dbassoc($query)) {
|
|
| 37 |
+ if($story['reviews'] > 0) {
|
|
| 38 |
+ $output .= "<tr><td class=\"tblborder\"><a href=\"reviews.php?type=SE&item=".$story['seriesid']."\">".$story['title']."</a></td><td class=\"tblborder\" align=\"center\">".$story['reviews']."</td><td class=\"tblborder\" align=\"center\">".($story['reviews'] - $story['respond'])."</td></tr>"; |
|
| 39 |
+ $x++; |
|
| 40 |
+ } |
|
| 41 |
+ } |
|
| 42 |
+ } |
|
| 43 |
+ if($x == 0) $output .= "<tr><td class=\"tblborder\" colspan=\"3\" align=\"center\">"._NORESULTS."</td></tr>"; |
|
| 44 |
+ $output .= "<tr><th>"._STORIES."</th><th>"._REVIEWS."</th><th>"._UNRESPONDED."</th></tr>"; |
|
| 45 |
+ $x = 0; |
|
| 46 |
+ if($numrows > 0) {
|
|
| 47 |
+ $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");
|
|
| 48 |
+ while($story = dbassoc($query)) {
|
|
| 49 |
+ if($story['reviews'] > 0) {
|
|
| 50 |
+ $output .= "<tr><td class=\"tblborder\">".$story['title']."</td><td class=\"tblborder\" align=\"center\"><a href=\"reviews.php?type=ST&item=" |
|
| 51 |
+ .$story['sid']."\">".$story['reviews']."</a></td><td class=\"tblborder\" align=\"center\"><a href=\"reviews.php?type=ST&item=" |
|
| 52 |
+ .$story['sid']."&unresponded=1\">".($story['reviews'] - $story['respond'])."</a></td></tr>"; |
|
| 53 |
+ |
|
| 54 |
+ $x++; |
|
| 55 |
+ } |
|
| 56 |
+ } |
|
| 57 |
+ } |
|
| 58 |
+ if($x == 0) $output .= "<tr><td class=\"tblborder\" colspan=\"3\" align=\"center\">"._NORESULTS."</td></tr>"; |
|
| 59 |
+ // For other items that might receive reviews such as fan art. |
|
| 60 |
+ $code = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_codeblocks WHERE code_type = 'revreceived'");
|
|
| 61 |
+ while($c = dbassoc($code)) {
|
|
| 62 |
+ eval($c['code_text']); |
|
| 63 |
+ } |
|
| 64 |
+ $output .= "</table>"; |
|
| 65 |
+?> |
|
| 0 | 66 |
\ No newline at end of file |