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