Browse code

Initial uplad w/ php7 fixes

Rainer Volkrodt authored on 2016/03/12 15:54:02
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,50 @@
1
+<?php
2
+
3
+// ----------------------------------------------------------------------
4
+// eFiction 3.2
5
+// Copyright (c) 2007 by Tammy Keefer
6
+// Valid HTML 4.01 Transitional
7
+// Based on eFiction 1.1
8
+// Copyright (C) 2003 by Rebecca Smallwood.
9
+// http://efiction.sourceforge.net/
10
+// ----------------------------------------------------------------------
11
+// LICENSE
12
+//
13
+// This program is free software; you can redistribute it and/or
14
+// modify it under the terms of the GNU General Public License (GPL)
15
+// as published by the Free Software Foundation; either version 2
16
+// of the License, or (at your option) any later version.
17
+//
18
+// This program is distributed in the hope that it will be useful,
19
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
+// GNU General Public License for more details.
22
+//
23
+// To read the license please visit http://www.gnu.org/copyleft/gpl.html
24
+// ----------------------------------------------------------------------
25
+
26
+if(!defined("_CHARSET")) exit( );
27
+
28
+
29
+$output .= "<div id=\"pagetitle\">"._SUBMITTED."</div>";
30
+$view = isset($_GET['view']) ? $_GET['view'] : false;
31
+$output .= 	"<p style=\"text-align: right; margin: 1em;\"><a href=\"admin.php?action=submitted&amp;view=".($view == "all" ? "cats\">"._VIEWMYCATS : "all\">"._VIEWALL)."</a></p>";
32
+$result = dbquery("SELECT story.title as storytitle, chapter.uid, chapter.sid, story.catid, chapter.chapid, chapter.inorder, chapter.title, "._PENNAMEFIELD." as penname FROM (".TABLEPREFIX."fanfiction_chapters as chapter, "._AUTHORTABLE.") LEFT JOIN ".TABLEPREFIX."fanfiction_stories as story ON story.sid = chapter.sid WHERE chapter.validated = '0' AND chapter.uid = "._UIDFIELD." ORDER BY story.title");
33
+
34
+if(dbnumrows($result)) {
35
+	$output .= "<table class=\"tblborder\" cellspacing=\"0\" cellpadding=\"0\" style=\"margin: 0 auto; width: 90%;\"><tr class=\"tblborder\"><th>"._TITLE."</th><th>"._AUTHOR."</th><th>"._CATEGORY."</th><th>"._OPTIONS."</th></tr>";
36
+	$array = explode(",", $admincats);
37
+	while ($story = dbassoc($result)) {
38
+		if(!$admincats || $_GET['view'] == "all" || sizeof(array_intersect(explode(",", $story['catid']), explode(",", $admincats)))) {
39
+			$output .= "<tr class=\"tblborder\">";
40
+			$output .= "<td class=\"tblborder\"><a href=\"viewstory.php?sid=$story[sid]\">".stripslashes($story['storytitle'])."</a>";
41
+			if(isset($story['title'])) $output .= " <b>:</b> <a href=\"viewstory.php?sid=$story[sid]&amp;chapter=$story[inorder]\">".stripslashes($story['title'])."</a>";
42
+			$output .= "<td class=\"tblborder\"><a href=\"viewuser.php?uid=$story[uid]\">$story[penname]</a></td>";
43
+			$output .= "<td class=\"tblborder\">".catlist($story['catid'])."</td>";
44
+			$output .= "<td class=\"tblborder\"><a href=\"admin.php?action=validate&amp;chapid=$story[chapid]\">"._VALIDATE."</a><br />"._DELETE.": <a href=\"stories.php?action=delete&amp;chapid=$story[chapid]&amp;sid=$story[sid]&amp;admin=1&amp;uid=$story[uid]\">"._CHAPTER."</a> "._OR." <a href=\"stories.php?action=delete&amp;sid=$story[sid]&amp;admin=1\">"._STORY."</a><br /><a href=\"javascript:pop('admin.php?action=yesletter&uid=$story[uid]&chapid=$story[chapid]', 500, 400, 'yes')\">"._YESLETTER."</a> | <a href=\"javascript:pop('admin.php?action=noletter&uid=$story[uid]&chapid=$story[chapid]', 500, 400, 'yes')\">"._NOLETTER."</a></td></tr>";
45
+		}
46
+	}
47
+	$output .= "</table>";
48
+}
49
+else $output .= write_message(_NORESULTS);
50
+?>
0 51
\ No newline at end of file