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,48 @@
1
+<?php
2
+// ----------------------------------------------------------------------
3
+// Copyright (c) 2007 by Tammy Keefer
4
+// Valid HTML 4.01 Transitional
5
+// Based on eFiction 1.1
6
+// Copyright (C) 2003 by Rebecca Smallwood.
7
+// http://efiction.sourceforge.net/
8
+// ----------------------------------------------------------------------
9
+// LICENSE
10
+//
11
+// This program is free software; you can redistribute it and/or
12
+// modify it under the terms of the GNU General Public License (GPL)
13
+// as published by the Free Software Foundation; either version 2
14
+// of the License, or (at your option) any later version.
15
+//
16
+// This program is distributed in the hope that it will be useful,
17
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
+// GNU General Public License for more details.
20
+//
21
+// To read the license please visit http://www.gnu.org/copyleft/gpl.html
22
+// ----------------------------------------------------------------------
23
+if(!defined("_CHARSET")) exit( );
24
+
25
+$current = "toplists";
26
+
27
+	$output = "<div id='pagetitle'>"._10LISTS."</div>";
28
+	$lists = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_panels WHERE panel_type = 'L' AND panel_hidden != '1' AND panel_level = '0' ORDER BY panel_order");
29
+	while($l = dbassoc($lists)) {
30
+		$clist[] = "<a href='toplists.php?list=".$l['panel_name']."'>".$l['panel_title']."</a><br />";
31
+	}
32
+	$total = count($clist);
33
+	$count = 0;
34
+	$column = 1;
35
+	$list = floor($total / $displaycolumns);
36
+	if($total % $displaycolumns != 0) $list++;
37
+	$output .= "<div id=\"columncontainer\"><div id=\"browseblock\">".($displaycolumns ? "<div class=\"column\">" : "");
38
+	foreach($clist as $c) {
39
+		$count++;
40
+		$output .= $c;
41
+		if( $count >= $list && $column != $displaycolumns) {
42
+			$output .= "</div><div class=\"column\">";
43
+			if($total % $displaycolumns == $column) $list--;
44
+			$column++;
45
+			$count = 0;
46
+		}
47
+	}
48
+	$output .= "</div>".($displaycolumns ? "</div>" : "")."<div class='cleaner'>&nbsp;</div></div>";