Browse code

3.5.6 efiction version

Jimako authored on 2024/03/09 16:09:42
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,63 @@
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 = "";
26
+
27
+if(isset($_GET['type_id']) && isNumber($_GET['type_id'])) $type_id = $_GET['type_id'];
28
+if(isset($_GET['classid']) && isNumber($_GET['classid'])) $classid = $_GET['classid'];
29
+
30
+if(!empty($classid)) { 
31
+	$output .= "<div id='pagetitle'>".$classtypelist[$type_id]['title'].": ".$classlist[$classid]['name']."</div>";
32
+	$disablesorts = array($classtypelist[$type_id]['name']);
33
+	$storyquery .= " AND FIND_IN_SET('$classid', stories.classes) > 0".$storyquery._ORDERBY;
34
+	$countquery .= " AND FIND_IN_SET('$classid', stories.classes) > 0";
35
+	$seriesquery = " FIND_IN_SET('$classid', series.classes) > 0".(empty($seriesquery) ? "" : " AND ".$seriesquery);
36
+	$numrows = search(_STORYQUERY.$storyquery, _STORYCOUNT.$countquery, "browse.php?");
37
+	$classin[] = $classid;
38
+	$searchVars['classin'] = array($classid);
39
+}
40
+else if(isset($type_id)) {
41
+	$output .= "<div id='pagetitle'>".$classtypelist[$type_id]['title']."</div>";
42
+	foreach($classlist as $c => $i) {
43
+		if($i['type'] == $type_id) $clist[] = "<a href='browse.php?type=class&amp;type_id=$type_id&amp;classid=$c'>".$i['name']."</a><br />";
44
+	}
45
+	$total = count($clist);
46
+	$count = 0;
47
+	$column = 1;
48
+	$list = floor($total / $displaycolumns);
49
+	if($total % $displaycolumns != 0) $list++;
50
+	$output .= "<div id=\"columncontainer\"><div id=\"browseblock\">".($displaycolumns ? "<div class=\"column\">" : "");
51
+	foreach($clist as $c) {
52
+		$count++;
53
+		$output .= $c;
54
+		if( $count >= $list && $column != $displaycolumns) {
55
+			$output .= "</div><div class=\"column\">";
56
+			if($total % $displaycolumns == $column) $list--;
57
+			$column++;
58
+			$count = 0;
59
+		}
60
+	}
61
+	$output .= "</div>".($displaycolumns ? "</div>" : "")."<div class='cleaner'>&nbsp;</div></div>";
62
+}
63
+else $output .= _ERROR;
0 64
\ No newline at end of file