get_url_manager(); $dm =& $sm->get_dump_manager(); $template =& $sm->get_template(); $template->set_template_file(VIVVO_FS_TEMPLATE_ROOT . VIVVO_TEMPLATE_DIR . 'homepage/' . VIVVO_HOMEPAGE_LAYOUT); if (VIVVO_CLOSE_SITE == 1 && !($sm->user && $sm->user->is_admin())){ $template->set_template_file(VIVVO_FS_TEMPLATE_ROOT . VIVVO_TEMPLATE_DIR . 'system/close_site.tpl'); echo $template->get_output(); exit; } $action = $sm->execute_action(); if ($um->isset_param('action') && $um->get_param('action') == 'login' && !$action){ $dm->store_dump(md5(VIVVO_URL . 'login.php')); HTTP_Session::pause(); header ('Location: ' . VIVVO_URL . 'login.php'); exit(); } $template->assign('DUMP_MESSAGES', $dm->_dump_pool); if ($sm->user){ $template->assign('CURRENT_USER', $sm->user); } define('CURRENT_URL', htmlspecialchars('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'])); $sm->get_categories(); $header =& $sm->get_header_manager(); $header->add_script(VIVVO_URL . 'js/framework/prototype.js'); $header->add_script(VIVVO_URL . 'js/control_tabs.js'); $header->add_script(VIVVO_URL . 'js/functions.js'); if (VIVVO_MODULES_FEED == 1){ $header->add_rss(switch_format('rss', VIVVO_URL), VIVVO_WEBSITE_TITLE); } $sm->set_content(); $sm->set_theme(); if (file_exists(VIVVO_FS_ROOT . str_replace(VIVVO_URL, '', VIVVO_THEME) . '/css/compress.php')){ define ('VIVVO_CSS_COMPRESOR', VIVVO_THEME . 'css/compress.php?css,'); } if ($um->isset_param('template_output')){ $template_file = $um->get_param('template_output'); $template_file = preg_replace('/[^a-zA-Z0-9\_\-\/]/', '', $template_file); if (file_exists(VIVVO_FS_ROOT . VIVVO_TEMPLATE_DIR . $template_file . '.tpl')){ $box_template =& new template($sm, $template); if (!empty($_GET)){ foreach ($_GET as $k => $v){ if ($k != 'template_output'){ $box_template->assign($k, htmlspecialchars($v, ENT_QUOTES, 'UTF-8')); } } } $box_template->assign('ajax_output', intval(1)); $box_template->assign('action', intval($action)); $box_template->set_template_file(VIVVO_TEMPLATE_DIR . $template_file . '.tpl'); echo $box_template->get_output(); } exit(); } //$template->assign('_generation_time', ); $output = $sm->get_output(); echo '' . "\n"; echo str_replace('$generation_time$', time() - $_generation_time . 's', $output); ob_end_flush(); ?>