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