title = $title; } public function html_main() { echo ' ', $this->title, '', !empty($this->canonical_url) ? ' ' : '', ' ', !empty($this->css) ? ' ' : '', $this->header_html, ' classes) ? ' class="' . implode(' ', $this->classes) . '"' : '', '>

#pics

'; foreach ($this->_subtemplates as $template) $template->html_main(); echo '
'; if (Registry::has('user') && Registry::get('user')->isAdmin()) { if (class_exists('Cache')) echo ' Cache info: ', Cache::$hits, ' hits, ', Cache::$misses, ' misses, ', Cache::$puts, ' puts, ', Cache::$removals, ' removals'; if (Registry::has('start')) echo '
Page creation time: ', sprintf('%1.4f', microtime(true) - Registry::get('start')), ' seconds'; if (Registry::has('db')) echo '
Database interaction: ', Registry::get('db')->getQueryCount(), ' queries'; } else echo ' Powered by Kabuki CMS | Admin'; echo '
'; if (Registry::has('db') && defined("DB_LOG_QUERIES") && DB_LOG_QUERIES) foreach (Registry::get('db')->getLoggedQueries() as $query) echo '
', strtr($query, "\t", " "), '
'; echo ' '; } public function appendCss($css) { $this->css .= $css; } public function appendHeaderHtml($html) { $this->header_html .= "\n\t\t" . $html; } public function appendStylesheet($uri) { $this->appendHeaderHtml(''); } public function setCanonicalUrl($url) { $this->canonical_url = $url; } public function addClass($class) { if (!in_array($class, $this->classes)) $this->classes[] = $class; } public function removeClass($class) { if ($key = array_search($class, $this->classes) !== false) unset($this->classes[$key]); } }