|
1
|
1
|
new file mode 100644
|
|
...
|
...
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+ $blocks[$block['block_name']] = unserialize($block['block_variables']);
|
|
|
6
|
+ $blocks[$block['block_name']]['title'] = $block['block_title'];
|
|
|
7
|
+ $blocks[$block['block_name']]['file'] = $block['block_file'];
|
|
|
8
|
+ $blocks[$block['block_name']]['status'] = $block['block_status'];
|
|
|
9
|
+}
|
|
|
10
|
+include("blocks/".$blocks['featured']['file']);
|
|
|
11
|
+if($use_tpl) $tpl->gotoBlock("_ROOT");
|
|
|
12
|
+ if(isset($_POST['submit'])) {
|
|
|
13
|
+ if($_POST['tpl']) $blocks['featured']['tpl'] = 1;
|
|
|
14
|
+ else unset($blocks['featured']['tpl']);
|
|
|
15
|
+ if($_POST['allowtags']) $blocks['featured']['allowtags'] = 1;
|
|
|
16
|
+ else unset($blocks['featured']['allowtags']);
|
|
|
17
|
+ if($_POST['sumlength'] && isNumber($_POST['sumlength'])) $blocks['featured']['sumlength'] = $_POST['sumlength'];
|
|
|
18
|
+ else unset($blocks['featured']['sumlength']);
|
|
|
19
|
+ $output .= "<div style='text-align: center;'>"._ACTIONSUCCESSFUL."</div>";
|
|
|
20
|
+ save_blocks( $blocks );
|
|
|
21
|
+ unset($admin);
|
|
|
22
|
+ }
|
|
|
23
|
+ else {
|
|
|
24
|
+ $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>";
|
|
|
25
|
+ $output .= "<div id='settingsform'><form method=\"POST\" enctype=\"multipart/form-data\" action=\"admin.php?action=blocks&admin=featured\">
|
|
|
26
|
+ <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>
|
|
|
27
|
+ <option value=\"1\"".(isset($blocks['featured']['tpl']) && $blocks['featured']['tpl'] ? " selected" : "").">"._USETPL."</option></select><br />
|
|
|
28
|
+ <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>
|
|
|
29
|
+ <option value=\"1\"".(isset($blocks['featured']['allowtags']) && $blocks['featured']['allowtags'] ? " selected" : "").">"._ALLOWTAGS."</option></select><br />
|
|
|
30
|
+ <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 />
|
|
|
31
|
+ <INPUT type=\"submit\" class=\"button\" name=\"submit\" id=\"submit\" value=\""._SUBMIT."\"></form></div><div style='text-align: center;'>"._SUMNOTE."</div>";
|
|
|
32
|
+ }
|
|
|
33
|
+?>
|
|
0
|
34
|
\ No newline at end of file
|