| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,41 @@ |
| 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 |
+ if ($block['block_variables']) |
|
| 8 |
+ {
|
|
| 9 |
+ $blocks[$block['block_name']] = unserialize($block['block_variables']); |
|
| 10 |
+ } |
|
| 11 |
+ $blocks[$block['block_name']]['title'] = $block['block_title']; |
|
| 12 |
+ $blocks[$block['block_name']]['file'] = $block['block_file']; |
|
| 13 |
+ $blocks[$block['block_name']]['status'] = $block['block_status']; |
|
| 14 |
+} |
|
| 15 |
+if(empty($blocks['recent']['tpl'])) include("blocks/".$blocks['recent']['file']);
|
|
| 16 |
+if(file_exists("blocks/recent/".$language.".php")) include("blocks/recent/".$language.".php");
|
|
| 17 |
+else include("blocks/recent/en.php");
|
|
| 18 |
+ if(isset($_POST['submit'])) {
|
|
| 19 |
+ if(!empty($_POST['tpl'])) $blocks['recent']['tpl'] = 1; |
|
| 20 |
+ else unset($blocks['recent']['tpl']); |
|
| 21 |
+ if(!empty($_POST['allowtags'])) $blocks['recent']['allowtags'] = 1; |
|
| 22 |
+ else unset($blocks['recent']['allowtags']); |
|
| 23 |
+ if(!empty($_POST['sumlength']) && isNumber($_POST['sumlength'])) $blocks['recent']['sumlength'] = $_POST['sumlength']; |
|
| 24 |
+ else unset($blocks['recent']['sumlength']); |
|
| 25 |
+ if(!empty($_POST['num']) && isNumber($_POST['num'])) $blocks['recent']['num'] = $_POST['num']; |
|
| 26 |
+ else $blocks['recent']['num'] = 1; |
|
| 27 |
+ $output .= "<div style='text-align: center;'>"._ACTIONSUCCESSFUL."</div>"; |
|
| 28 |
+ save_blocks( $blocks ); |
|
| 29 |
+ } |
|
| 30 |
+ else {
|
|
| 31 |
+ $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>"; |
|
| 32 |
+ $output .= "<div id='settingsform'><form method=\"POST\" enctype=\"multipart/form-data\" action=\"admin.php?action=blocks&admin=recent\"> |
|
| 33 |
+ <div><label for=\"tpl\">"._BLOCKTYPE.":</label><select name=\"tpl\" class=\"textbox\" id=\"tpl\"><option value=\"0\"".(empty($blocks['recent']['tpl']) ? " selected" : "").">"._DEFAULT."</option> |
|
| 34 |
+ <option value=\"1\"".(!empty($blocks['recent']['tpl']) ? " selected" : "").">"._USETPL."</option></select></div> |
|
| 35 |
+ <div><label for=\"allowtags\">"._TAGS.":</label><select name=\"allowtags\" class=\"textbox\" id=\"allowtags\"><option value=\"0\"".(empty($blocks['recent']['allowtags']) ? " selected" : "").">"._STRIPTAGS."</option> |
|
| 36 |
+ <option value=\"1\"".(!empty($blocks['recent']['allowtags']) ? " selected" : "").">"._ALLOWTAGS."</option></select></div> |
|
| 37 |
+ <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> |
|
| 38 |
+ <div><label for=\"num\">"._NUMUPDATED.":</label><input type=\"text\" class=\"textbox\" name=\"num\" id=\"num\" size=\"4\" value=\"".$blocks['recent']['num']."\"></div> |
|
| 39 |
+ <INPUT type=\"submit\" name=\"submit\" class=\"button\" id=\"submit\" value=\""._SUBMIT."\"></form></div><div style='text-align: center;'>"._SUMNOTE."</div>"; |
|
| 40 |
+ } |
|
| 41 |
+?> |
|
| 0 | 42 |
\ No newline at end of file |