<?php
/**
 * @package Legacy
 * @version $Id: common.php,v 1.4.8.15 2006/08/09 09:33:46 minahito Exp $
 */

//
// Prohibition of a direct kick
//
if (!defined("XOOPS_MAINFILE_INCLUDED")) {
	die();
}

/**
 * This constant is the sign which this system is XOOPS Cube, for module
 * developers.
 */
define('XOOPS_CUBE_LEGACY', true);

require_once XOOPS_ROOT_PATH . "/kernel/XCube_Root.class.php";
require_once XOOPS_ROOT_PATH . "/kernel/XCube_Controller.class.php";

//
// TODO We have to move the following lines to an appropriate place.
//      (We may not need the following constants)
//
define("XCUBE_SITE_SETTING_FILE", XOOPS_ROOT_PATH . "/settings/site_default.ini.php");
define("XCUBE_SITE_CUSTOM_FILE", XOOPS_ROOT_PATH . "/settings/site_custom.ini.php");

//
//@todo How does the system decide the main controller?
//
$root=&XCube_Root::getSingleton();
$root->loadSiteConfig(XCUBE_SITE_SETTING_FILE, XCUBE_SITE_CUSTOM_FILE);
$root->setupController();

$xoopsController=&$root->getController();
$xoopsController->executeCommon();


?>