output = $output; $um =& $sm->get_url_manager(); $dm =& $sm->get_dump_manager(); if (defined('VIVVO_ROOT_CATEGORY')){ $cat =& $sm->get_categories(); define('VIVVO_FORCE_CATEGORY_RESTRICTION', implode(',', $cat->root_category->get_descendent_ids())); } $cat =& $sm->get_categories(); $template =& $sm->get_template(); $template->set_template_file(VIVVO_FS_TEMPLATE_ROOT . VIVVO_TEMPLATE_DIR . 'homepage/' . VIVVO_HOMEPAGE_LAYOUT); check_close_site($sm); $action = $sm->execute_action(); if ($um->isset_param('action') && $um->get_param('action') == 'login' && !$action){ $in_user = $um->get_param_regexp('/^USER_/'); $user = new Users($sm, $in_user); $template->assign('user', $user); } if ($um->isset_param('cmd') && $um->get_param('cmd') == 'logout' && $action){ header('Location: ' . VIVVO_URL); exit; } $template->assign('DUMP_MESSAGES', $dm->_dump_pool); if ($sm->user){ $template->assign('CURRENT_USER', $sm->user); } $sm->set_content(); //$template->assign('CURRENT_USER', $sm->user); //Test /* $url_arr = array(); foreach ($um->list as $k=> $v){ $url_arr[] = array($k, $v); } $template->assign('URL_STACK', $url_arr); $template->assign('DEBUG_STACK', $sm->_debug_stack); $content_arr = array(); foreach ($sm->article_list_params as $k=> $v){ if ($k == 'search_options'){ $content_arr[] = array($k, ''); if (is_array($v)){ foreach ($v as $k1=> $v1){ $content_arr[] = array('_' . $k1, $v1); } } }else{ $content_arr[] = array($k, $v); } } $template->assign('CONTENT_PARAMS', $content_arr); //Test */ full_page_cache_replace_boxes(&$sm, $uncached_boxes); default_header($sm); if ($um->isset_param('template_output')){ get_template_output($sm); } $output = $sm->get_output(); // echo $output; echo '' . "\n"; echo str_replace('$generation_time$', time() - $_generation_time . 's', $output); full_page_cache_save($sm, $output); ob_end_flush(); ?>