| ... | ... |
@@ -35,11 +35,11 @@ else {
|
| 35 | 35 |
$text = $message['message_text']; |
| 36 | 36 |
if(!$message) dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_messages` (`message_name` , `message_title` , `message_text` ) VALUES ('".$_GET['message']."', '', '')");
|
| 37 | 37 |
$output .= "<div class='sectionheader'>".preg_replace("@\{sitename\}@", $sitename, $message['message_title'])."</div>
|
| 38 |
- <div style='width: 100%;'><div id=\"settingsform\"><form method=\"POST\" enctype=\"multipart/form-data\" action=\"admin.php?action=messages&message=".$_GET['message']."\"> |
|
| 38 |
+ <div style='width: 100%;'><div style='width: 35%; margin: 0 auto;'><form method=\"POST\" enctype=\"multipart/form-data\" action=\"admin.php?action=messages&message=".$_GET['message']."\"> |
|
| 39 | 39 |
<textarea rows=\"10\" cols=\"60\" style=\"width: 100%;\" ".($_GET['message'] == "tinyMCE" ? "class='mceNoEditor'" :"")." name=\"text\">$text</textarea>"; |
| 40 | 40 |
if($tinyMCE && $_GET['message'] != "tinyMCE") |
| 41 | 41 |
$output .= "<div class='tinytoggle'><input type='checkbox' name='toggle' onclick=\"toogleEditorMode('text');\" checked><label for='toggle'>"._TINYMCETOGGLE."</label></div>";
|
| 42 |
- $output .= "<div style='clear: both;'> </div><INPUT type='submit' class='button' id='submit' value='"._SUBMIT."' name='submit'> |
|
| 42 |
+ $output .= "<div style='clear: both;'> </div><INPUT type='submit' class='button' id='submit' value='"._SUBMIT."' name='submit'> |
|
| 43 | 43 |
</form></div><div style='clear: both;'> </div></div>"; |
| 44 | 44 |
} |
| 45 |
-?> |
|
| 46 | 45 |
\ No newline at end of file |
| 46 |
+?> |
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,45 @@ |
| 1 |
+<?php |
|
| 2 |
+// ---------------------------------------------------------------------- |
|
| 3 |
+// Copyright (c) 2007 by Tammy Keefer |
|
| 4 |
+// Based on eFiction 1.1 |
|
| 5 |
+// Copyright (C) 2003 by Rebecca Smallwood. |
|
| 6 |
+// http://efiction.sourceforge.net/ |
|
| 7 |
+// ---------------------------------------------------------------------- |
|
| 8 |
+// LICENSE |
|
| 9 |
+// |
|
| 10 |
+// This program is free software; you can redistribute it and/or |
|
| 11 |
+// modify it under the terms of the GNU General Public License (GPL) |
|
| 12 |
+// as published by the Free Software Foundation; either version 2 |
|
| 13 |
+// of the License, or (at your option) any later version. |
|
| 14 |
+// |
|
| 15 |
+// This program is distributed in the hope that it will be useful, |
|
| 16 |
+// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 17 |
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 18 |
+// GNU General Public License for more details. |
|
| 19 |
+// |
|
| 20 |
+// To read the license please visit http://www.gnu.org/copyleft/gpl.html |
|
| 21 |
+// ---------------------------------------------------------------------- |
|
| 22 |
+ |
|
| 23 |
+if(!defined("_CHARSET")) exit( );
|
|
| 24 |
+ |
|
| 25 |
+ $output .= "<div id=\"pagetitle\">"._MESSAGESETTINGS."</div>"; |
|
| 26 |
+ |
|
| 27 |
+if(isset($_POST['submit'])) {
|
|
| 28 |
+ $result = dbquery("UPDATE ".TABLEPREFIX."fanfiction_messages SET message_text = '".escapestring(descript($_POST['text']))."' WHERE message_name = '".$_GET['message']."' LIMIT 1");
|
|
| 29 |
+ if($result) $output .= write_message(_ACTIONSUCCESSFUL); |
|
| 30 |
+ else $output .= write_error(_ERROR); |
|
| 31 |
+} |
|
| 32 |
+else {
|
|
| 33 |
+ $pagequery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_messages WHERE message_name = '".$_GET['message']."' LIMIT 1");
|
|
| 34 |
+ $message = dbassoc($pagequery); |
|
| 35 |
+ $text = $message['message_text']; |
|
| 36 |
+ if(!$message) dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_messages` (`message_name` , `message_title` , `message_text` ) VALUES ('".$_GET['message']."', '', '')");
|
|
| 37 |
+ $output .= "<div class='sectionheader'>".preg_replace("@\{sitename\}@", $sitename, $message['message_title'])."</div>
|
|
| 38 |
+ <div style='width: 100%;'><div id=\"settingsform\"><form method=\"POST\" enctype=\"multipart/form-data\" action=\"admin.php?action=messages&message=".$_GET['message']."\"> |
|
| 39 |
+ <textarea rows=\"10\" cols=\"60\" style=\"width: 100%;\" ".($_GET['message'] == "tinyMCE" ? "class='mceNoEditor'" :"")." name=\"text\">$text</textarea>"; |
|
| 40 |
+ if($tinyMCE && $_GET['message'] != "tinyMCE") |
|
| 41 |
+ $output .= "<div class='tinytoggle'><input type='checkbox' name='toggle' onclick=\"toogleEditorMode('text');\" checked><label for='toggle'>"._TINYMCETOGGLE."</label></div>";
|
|
| 42 |
+ $output .= "<div style='clear: both;'> </div><INPUT type='submit' class='button' id='submit' value='"._SUBMIT."' name='submit'> |
|
| 43 |
+ </form></div><div style='clear: both;'> </div></div>"; |
|
| 44 |
+} |
|
| 45 |
+?> |
|
| 0 | 46 |
\ No newline at end of file |