From 73d5e907a797e976e59f328d4f2fd0b8bfcebde6 Mon Sep 17 00:00:00 2001 From: neoraider Date: Mon, 9 Jan 2006 19:49:02 +0000 Subject: Allgemein ist jetzt alles etwas weiter. Vieles ist jetzt durch Klassen gel?st, und einige andere Teile von Neon sind jetzt besser strukturiert. --- code/content.inc.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'code/content.inc.php') diff --git a/code/content.inc.php b/code/content.inc.php index 5fc2d76..c92f1b2 100644 --- a/code/content.inc.php +++ b/code/content.inc.php @@ -3,15 +3,19 @@ define('CONTENT_INC', 1); include('code/db.inc.php'); + include('code/user.inc.php'); + include('code/handlers.inc.php'); function GetPage($name) { $res = DBQuery('SELECT access, handler, data FROM pages WHERE name = ?', $name); - parse_str($res->fields[2], $data); + if(($res->fields[0] & (1 << $GLOBALS['user']->GetGid())) == 0) + return $GLOBALS['handlers'][$res->fields[1]]->HandleErrorMessage('Forbidden', array('page' => $name)); - include('handlers/' . $res->fields[1]); + parse_str($res->fields[2], $data); + $data['_page'] = $name; - return $handlers[$res->fields[1]]($data); + return $GLOBALS['handlers'][$res->fields[1]]->HandleContentData($data); } } ?> -- cgit v1.2.3