| 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 |
+$current = $_GET['page']; |
|
| 24 |
+ |
|
| 25 |
+include ("header.php");
|
|
| 26 |
+ |
|
| 27 |
+//make a new TemplatePower object |
|
| 28 |
+ |
|
| 29 |
+if(file_exists("$skindir/default.tpl")) $tpl = new TemplatePower( "$skindir/default.tpl" );
|
|
| 30 |
+else $tpl = new TemplatePower("default_tpls/default.tpl");
|
|
| 31 |
+//let TemplatePower do its thing, parsing etc. |
|
| 32 |
+ |
|
| 33 |
+include("includes/pagesetup.php");
|
|
| 34 |
+ |
|
| 35 |
+$page = dbquery("SELECT message_title, message_text FROM ".TABLEPREFIX."fanfiction_messages WHERE ".($current ? "message_name = '".escapestring($current)."'" : "message_id = '".(isNumber($_GET['id']) ? $_GET[id] : "0")."'")." LIMIT 1");
|
|
| 36 |
+if(dbnumrows($page)) list($title, $text) = dbrow($page); |
|
| 37 |
+else $text = write_message(_ERROR); |
|
| 38 |
+if(strpos($text, "?>") === false) $tpl->assign("output", "<div id='pagetitle'>$title</div>\n\n$text");
|
|
| 39 |
+else {
|
|
| 40 |
+ eval("?>".$text."<?php ");
|
|
| 41 |
+ $tpl->assign("output", "<div id='pagetitle'>$title</div>\n\n$text");
|
|
| 42 |
+} |
|
| 43 |
+$tpl->printToScreen(); |
|
| 44 |
+dbclose( ); |
|
| 45 |
+?> |
|
| 0 | 46 |
\ No newline at end of file |