diff options
Diffstat (limited to 'code/content.inc.php')
-rw-r--r-- | code/content.inc.php | 10 |
1 files changed, 7 insertions, 3 deletions
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); } } ?> |