diff options
author | neoraider <devnull@localhost> | 2006-01-14 03:14:01 +0100 |
---|---|---|
committer | neoraider <devnull@localhost> | 2006-01-14 03:14:01 +0100 |
commit | c630a2d50349c57660cfc98eb13ec71444b27610 (patch) | |
tree | 4fa7ad9b755a4d8ae9045062cb4fefab248187e4 /handlers | |
parent | 8b89c8c8a9001c5f5b38465ceb58306fc6f0659e (diff) | |
download | neon-c630a2d50349c57660cfc98eb13ec71444b27610.tar neon-c630a2d50349c57660cfc98eb13ec71444b27610.zip |
Login implementiert. Puh... Und dabei auch den Handler phpexec und die Nav-Pages eingebaut.
Diffstat (limited to 'handlers')
-rw-r--r-- | handlers/phpexec.inc.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/handlers/phpexec.inc.php b/handlers/phpexec.inc.php new file mode 100644 index 0000000..76ac18e --- /dev/null +++ b/handlers/phpexec.inc.php @@ -0,0 +1,29 @@ +<?PHP + include('code/message.inc.php'); + + class phpexec_handler { + function HandleContentData($data) { + $tr = array('<' => '<', '>' => '>', '&' => '&', '"' => '"', "\n" => '<br />', "\r" => ''); + + if($data['title']) + $title = strtr($data['title'], $tr); + else + $title = strtr($data['_page'], array(':' => ' - ')); + + ob_start(); + + eval('?>' . $data['code']); + + $content = ob_get_contents(); + ob_end_clean(); + + return array('title' => $title, 'content' => $content); + } + + function HandleErrorMessage($type, $data = array()) { + return array('content' => '<span class="error">' . Message($type, $data) . '</span>', 'title' => Message('error')); + } + } + + $handlers['phpexec'] = new phpexec_handler; +?> |