| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,38 @@ |
| 1 |
+<?php |
|
| 2 |
+if(!defined("_CHARSET")) exit( );
|
|
| 3 |
+ |
|
| 4 |
+global $language; |
|
| 5 |
+$blockquery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_blocks WHERE block_name = 'info'");
|
|
| 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 |
+include("blocks/info/info.php");
|
|
| 16 |
+if(file_exists("blocks/info/{$language}.php")) include_once("blocks/info/{$language}.php");
|
|
| 17 |
+else include_once("blocks/info/en.php");
|
|
| 18 |
+ if(isset($_POST['submit'])) {
|
|
| 19 |
+ $blocks['info']['style'] = !empty($_POST['style']) && isNumber($_POST['style']) ? $_POST['style'] : 0; |
|
| 20 |
+ if($_POST['template'] != _NARTEXT) $blocks['info']['template'] = $_POST['template']; |
|
| 21 |
+ $output .= "<center>"._ACTIONSUCCESSFUL."</center>"; |
|
| 22 |
+ save_blocks( $blocks ); |
|
| 23 |
+ } |
|
| 24 |
+ else {
|
|
| 25 |
+ $style = isset($blocks['info']['style']) ? $blocks['info']['style'] : 0; |
|
| 26 |
+ if(empty($blocks['info']['template']) && $style == 1) $template = _NARTEXT; |
|
| 27 |
+ else if($style == 1) $template = $blocks['info']['template']; |
|
| 28 |
+ else $template = ""; |
|
| 29 |
+ $output .= "<div style='margin: 1em auto; width: 80%;'><b>"._CURRENT.":</b><br /><div class=\"tblborder\" style=\"text-align: left; padding: 4px; margin: 0 auto;\">$content</div><br />"; |
|
| 30 |
+ $output .= "<form method='POST' enctype='multipart/form-data' name='blockadmin' action='admin.php?action=blocks&admin=info'> |
|
| 31 |
+ <label for='template'>"._TEMPLATE.":</label><br /><textarea name='template' rows='5' cols='50' style='width: 100%;'>$template</textarea>"; |
|
| 32 |
+ if($tinyMCE) $output .= "<div style='display: block; margin: 0; padding: 0;'><input type='checkbox' name='toggle' onclick=\"toogleEditorMode('template');\" checked><label for='toggle'>"._TINYMCETOGGLE."</label></div>";
|
|
| 33 |
+ $output .= "<label for='style'>"._DISPLAY.": </label><select name='style'class='textbox' ><option value='0'".(!$style ? " selected" : "").">"._CHART."</option> |
|
| 34 |
+ <option value='1'".($style == 1 ? " selected" : "").">"._NARRATIVE."</option> |
|
| 35 |
+ <option value='2'".($style == 2 ? " selected" : "").">"._VARIABLES."</option></select><br /> |
|
| 36 |
+ <INPUT type='submit' class='button' name='submit' value='"._SUBMIT."'></form></div>"; |
|
| 37 |
+ } |
|
| 38 |
+?> |
|
| 0 | 39 |
\ No newline at end of file |