<?php
// $Id: common.php,v 1.4.8.13 2005/11/30 04:30:09 minahito Exp $
//  ------------------------------------------------------------------------ //
//              XOOPSCube - PHP Content Management System                    //
//                  Copyright (c) 2005 XOOPS Cube.org                        //
//                     <http://www.xoopscube.org/>                           //
//  ------------------------------------------------------------------------ //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  You may not change or alter any portion of this comment or credits       //
//  of supporting developers from this source code or any supporting         //
//  source code which is considered copyrighted (c) material of the          //
//  original comment or credit authors.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //

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

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();


?>