<?php /** * guestbook.php * * guestbook page, which list entries and let user write new entry * @author Anders Ytterström <*****@*****.**> * @since 2007-08-13 */ require 'init.php'; // object declarations $registry =& registry::getInstance(); $view = new view(ROOT . '/view/guestbook.phtml'); $model = new model_guestbook(); $modelC = new model_content(); $sidebar = $modelC->getPage('sidebar'); $registry['sidebar'] = $sidebar['body']; // add to registry $registry['title'] = $model->getTitle(); $registry['description'] = $model->getDescription(); $registry['entries'] = $model->getEntries(); $registry['bodyid'] = 'guestbook'; // compile view echo $view->compile();
<?php /** * start.php * * Start page, with * @author Anders Ytterström <*****@*****.**> * @since 2007-08-13 */ require 'init.php'; $registry =& registry::getInstance(); $view = new view(ROOT . '/view/contact.phtml'); $model = new model_content(); $p = $model->getPage('contact'); $s = $model->getPage('sidebar'); $registry['title'] = $p['title']; $registry['description'] = $p['description']; $registry['modified'] = $p['updated']; $registry['bodyid'] = 'contact'; $registry['content'] = $p['body']; $registry['sidebar'] = $s['body']; echo $view->compile();
<?php /** * start.php * * Start page, with * @author Anders Ytterström <*****@*****.**> * @since 2007-08-13 */ require 'init.php'; $registry =& registry::getInstance(); $view = new view(VIEW . '/members.phtml'); $model = new model_content(); $start = $model->getPage('members'); $sidebar = $model->getPage('sidebar'); $registry['title'] = $start['title']; $registry['description'] = $start['description']; $registry['bodyid'] = 'members'; $registry['updated'] = $start['updated']; $registry['content'] = $start['body']; $registry['sidebar'] = $sidebar['body']; echo $view->compile();
<?php /** * login.php * * login page * @author Anders Ytterström <*****@*****.**> * @since 2007-08-13 */ require '../init.php'; $registry =& registry::getInstance(); $user =& user::getInstance(); $view = new view(ROOT . '/view/admin/content.phtml'); $model = new model_content(); if (!$user->isOnline()) { http_response::redir('/login.php'); } $pageid = http_request::getInt('pageid'); if ($pageid !== false) { $registry['pagedata'] = $model->getPage($pageid); } $registry['sidebar'] = false; $registry['pages'] = $model->getAll(); $registry['title'] = 'Innehållshantering'; $registry['description'] = 'Kontrollpanel för Innehållshantering'; $registry['bodyid'] = 'admin'; echo $view->compile();
<?php /** * start.php * * Start page, with * @author Anders Ytterström <*****@*****.**> * @since 2007-08-13 */ require 'init.php'; $registry =& registry::getInstance(); $user =& user::getInstance(); $view = new view(ROOT . '/view/index.phtml'); $model = new model_content(); $primary = $model->getPage('start'); $sidebar = $model->getPage('sidebar'); $registry['title'] = $primary['title']; $registry['description'] = $primary['description']; $registry['bodyid'] = 'start'; $registry['content'] = $primary['body']; $registry['sidebar'] = $sidebar['body']; echo $view->compile();
<?php /** * start.php * * Start page, with * @author Anders Ytterström <*****@*****.**> * @since 2007-08-13 */ require 'init.php'; $registry =& registry::getInstance(); $view = new view(VIEW . '/news.phtml'); $model = new model_content(); $start = $model->getPage('news'); $sidebar = $model->getPage('sidebar'); $registry['title'] = $start['title']; $registry['description'] = $start['description']; $registry['bodyid'] = 'news'; $registry['updated'] = $start['updated']; $registry['content'] = $start['body']; $registry['sidebar'] = $sidebar['body']; echo $view->compile();