/* ============================================================================= * $Revision: 2536 $ * $Date: 2008-02-08 11:42:01 +0100 (Fri, 08 Feb 2008) $ * * Vivvo CMS 4.0 * Copyright 2005-07 SpoonLabs d.o.o. * http://www.spoonlabs.com, All Rights Reserved * * Warning: This program is protected by copyright law. Unauthorized * reproduction or distribution of this program, or any portion of it, may * result in severe civil and criminal penalties, and will be prosecuted to the * maximum extent possible under the law. For more information about this * script or other scripts see http://www.spoonlabs.com * ============================================================================ */ $_generation_time = time(); require_once ('conf.php'); if (!defined('VIVVO_FS_INSTALL_ROOT')){ return false; } require_once (VIVVO_FS_INSTALL_ROOT . 'lib/vivvo/vivvo_lite_site.php'); require_once (VIVVO_FS_INSTALL_ROOT . 'lib/vivvo/box/vivvo_box.php'); if (ini_get('zlib.output_compression')){ ob_start(); }elseif (function_exists('ob_gzhandler')){ ob_start('ob_gzhandler'); }else{ ob_start(); } define ('VIVVO_JS_COMPRESOR', VIVVO_URL . 'compress.php?js,'); $sm =& new vivvo_lite_site(); $um =& $sm->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(); ?>