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,53 @@
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
+if(empty($favorites)) accessDenied( );
28
+
29
+if(!isset($uid)) {
30
+	$output .= "<div id=\"pagetitle\">"._MANAGEFAVORITES."</div>";
31
+	$uid = USERUID;
32
+}
33
+else {
34
+	$authquery = dbquery("SELECT "._PENNAMEFIELD." FROM "._AUTHORTABLE." WHERE "._UIDFIELD." = '$uid'");
35
+	list($penname) = dbrow($authquery);
36
+	 $output .= "<div class='sectionheader'>"._FAVORITESOF." $penname</div>";
37
+}
38
+	$output .= "<div class=\"tblborder\" style=\"padding: 5px; width: 200px; margin: 0 auto;\">";
39
+	$panelquery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_panels WHERE panel_type = 'F' AND panel_name != 'favlist' ORDER BY panel_title ASC");
40
+	if(!$panelquery) $output .= write_error(_ERROR);
41
+	while($panel = dbassoc($panelquery)) {
42
+		$panellink = "";
43
+		if(substr($panel['panel_name'], 0, 3) == "fav" && $type = substr($panel['panel_name'], 3)) {
44
+			if($panel['panel_name'] == "favlist") continue;
45
+			$itemcount = 0;
46
+			$countquery = dbquery("SELECT COUNT(item) FROM ".TABLEPREFIX."fanfiction_favorites WHERE uid = '$uid' AND type = '$type'");
47
+			list($itemcount) = dbrow($countquery);
48
+			if(empty($panel['panel_url'])) $output .=  "<a href=\"user.php?action=".$panel['panel_name']."\">".$panel['panel_title']." [$itemcount]</a><br />\n";
49
+			else $output .= "<a href=\"".$panel['panel_url']."\">".$panel['panel_title']." [$itemcount]</a><br />\n";
50
+		}
51
+	}
52
+	$output .= "</div>\n";
53
+?>
0 54
\ No newline at end of file