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,36 @@
1
+<?php
2
+if(!defined("_CHARSET")) exit( );
3
+$blockquery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_blocks WHERE block_name = 'featured'");
4
+while($block = dbassoc($blockquery)) {
5
+	if ($block['block_variables'])
6
+	{
7
+		$blocks[$block['block_name']] = unserialize($block['block_variables']);
8
+	}
9
+	$blocks[$block['block_name']]['title'] = $block['block_title'];
10
+	 $blocks[$block['block_name']]['file'] = $block['block_file'];
11
+	$blocks[$block['block_name']]['status'] = $block['block_status'];
12
+}
13
+include("blocks/".$blocks['featured']['file']);
14
+if($use_tpl) $tpl->gotoBlock("_ROOT");
15
+	if(isset($_POST['submit'])) {
16
+		if($_POST['tpl']) $blocks['featured']['tpl'] = 1;
17
+		else unset($blocks['featured']['tpl']);
18
+		if($_POST['allowtags']) $blocks['featured']['allowtags'] = 1;
19
+		else unset($blocks['featured']['allowtags']);
20
+		if($_POST['sumlength'] && isNumber($_POST['sumlength'])) $blocks['featured']['sumlength'] = $_POST['sumlength'];
21
+		else unset($blocks['featured']['sumlength']);
22
+		$output .= "<div style='text-align: center;'>"._ACTIONSUCCESSFUL."</div>";
23
+		save_blocks( $blocks );
24
+		unset($admin);
25
+	}
26
+	else  {
27
+		$output .= "<div style='text-align: center;'><span class='label'>"._CURRENT.":</span><br /><div class=\"tblborder\" style=\"width: 80%; text-align: left; margin: 1ex auto;\">".($use_tpl ? _NATPL : $content)."</div><br /></div>";
28
+		$output .= "<div id='settingsform'><form method=\"POST\" enctype=\"multipart/form-data\" action=\"admin.php?action=blocks&admin=featured\">
29
+			<label for=\"tpl\">"._FORMAT.":</label><select name=\"tpl\" class=\"textbox\" id=\"tpl\"><option value=\"0\"".(!isset($blocks['featured']['tpl']) || !$blocks['featured']['tpl'] ? " selected" : "").">"._DEFAULT."</option>
30
+					<option value=\"1\"".(isset($blocks['featured']['tpl']) && $blocks['featured']['tpl'] ? " selected" : "").">"._USETPL."</option></select><br />
31
+			<label for=\"allowtags\">"._TAGS.":</label><select class=\"textbox\" name=\"allowtags\" id=\"allowtags\"><option value=\"0\"".(!isset($blocks['featured']['allowtags']) || !$blocks['featured']['allowtags'] ? " selected" : "").">"._STRIPTAGS."</option>
32
+					<option value=\"1\"".(isset($blocks['featured']['allowtags']) && $blocks['featured']['allowtags'] ? " selected" : "").">"._ALLOWTAGS."</option></select><br />
33
+			<label for=\"sumlength\">"._SUMLENGTH.":</label><input type=\"text\" class=\"textbox\" name=\"sumlength\" id=\"sumlength\" size=\"4\" value=\"".(isset($blocks['featured']['sumlength']) ? $blocks['featured']['sumlength'] : "")."\"><br />
34
+			<INPUT type=\"submit\" class=\"button\" name=\"submit\" id=\"submit\" value=\""._SUBMIT."\"></form></div><div style='text-align: center;'>"._SUMNOTE."</div>";
35
+	}
36
+?>
0 37
\ No newline at end of file