diff options
Diffstat (limited to 'templates/default.inc.php')
-rw-r--r-- | templates/default.inc.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/templates/default.inc.php b/templates/default.inc.php new file mode 100644 index 0000000..9669671 --- /dev/null +++ b/templates/default.inc.php @@ -0,0 +1,18 @@ +<?PHP + require_once('code/message.inc.php'); + + class default_template { + function Get($data) { + if($data['title']) + $title = strtr($data['title'], array('<' => '<', '>' => '>', '&' => '&', '"' => '"')); + else + $title = strtr($data['_page'], array(':' => ' - ')); + $content = '<h2>' . $title . '</h2>' . strtr($data['content'], array('<' => '<', '>' => '>', '&' => '&', + '"' => '"', "\n" => '<br />', "\r" => '')); + + return array('title' => $title, 'content' => $content); + } + } + + $GLOBALS['templates']['default'] = new default_template; +?> |