/** * Shutdown function called by PHP at the end of a script. Handles MVC. * @return void */ static function Shutdown() { global $page; if (isset($page) && !empty($page['id'])) { echo Tpl::LoadTpl($page['id'], $page['name']); } }
/** * Shutdown function called by PHP at the end of a script. Handles MVC. * @return void */ static function Shutdown() { global $page; if (!isset($page['header'])) { $header = 'header'; } else { $header = $page['header']; } if (!isset($page['footer'])) { $footer = 'footer'; } else { $footer = $page['footer']; } if (isset($page) && !empty($page['id'])) { echo Tpl::LoadTpl($page['id'], $page['name'], $header . '.php', $footer . '.php'); } }