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,64 @@
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
+
30
+global $language;
31
+$content = "";
32
+$blockquery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_blocks WHERE block_name = 'categories'");
33
+while($block = dbassoc($blockquery)) {
34
+	$blocks[$block['block_name']] = unserialize($block['block_variables']);
35
+	$blocks[$block['block_name']]['title'] = $block['block_title'];
36
+	 $blocks[$block['block_name']]['file'] = $block['block_file'];
37
+	$blocks[$block['block_name']]['status'] = $block['block_status'];
38
+}
39
+if(empty($blocks['categories']['tpl'])) {
40
+	include("blocks/".$blocks['categories']['file']);
41
+	$tpl->gotoBlock("_ROOT");
42
+}
43
+if(file_exists("blocks/categories/{$language}.php")) include("blocks/categories/{$language}.php");
44
+else include("blocks/categories/en.php");
45
+	if(isset($_POST['submit'])) {
46
+		$blocks['categories']['columns'] = $_POST['columns'];
47
+		$blocks['categories']['template'] = $_POST['template'];
48
+		$output .= "<center>"._ACTIONSUCCESSFUL."</center>";
49
+		save_blocks( $blocks );
50
+	}
51
+	else  {
52
+		$template = (!empty($blocks['categories']['template']) ? $blocks['categories']['template'] : "{image} {link} [{count}] {description}"); 
53
+		if(empty($blocks['categories']['tpl'])) $output .= "<div style='text-align: center;'><b>"._CURRENT.":</b><br /><div class=\"tblborder\" style=\"width: 80%; margin: 0 auto; text-align: left;\">$content</div><br /></div>";
54
+		$output .= "<div><form method=\"POST\" id=\"settingsform\" enctype=\"multipart/form-data\" action=\"admin.php?action=blocks&admin=categories\">
55
+			<textarea name=\"template\" id=\"template\" rows=\"5\" cols=\"40\">$template</textarea><br />";
56
+		if($tinyMCE) 
57
+			$output .= "<div class='tinytoggle'><input type='checkbox' name='toggle' onclick=\"toogleEditorMode('template');\"><label for='toggle'>"._TINYMCETOGGLE."</label></div>";	
58
+		$output .= "<select name=\"columns\" class=\"textbox\" style='margin: 3px;'><option value=\"0\"".(empty($blocks['categories']['columns']) ? " selected" : "").">"._ONECOLUMN."</option>
59
+					<option value=\"1\"".(!empty($blocks['categories']['columns']) ? " selected" : "").">"._MULTICOLUMN."</option></select> 
60
+			<select name=\"tpl\" class=\"textbox\" style='margin: 3px;'><option value=\"0\"".(empty($blocks['categories']['tpl']) ? " selected" : "").">"._DEFAULT."</option>
61
+					<option value=\"1\"".(!empty($blocks['categories']['tpl']) ? " selected" : "").">"._USETPL."</option></select><br />
62
+			<INPUT type=\"submit\" class=\"button\" name=\"submit\" value=\""._SUBMIT."\"></form><div style='clear: both;'>&nbsp;</div>".write_message(_CATBLOCKNOTE)."</div>";
63
+	}
64
+?>
0 65
\ No newline at end of file