<?php
/*
+-----------------------------------------------------------------------------+
| $Id: admin.php 2006-08-05 10:03:01Z Bleakwind $
| Admin control
| Copyright (c) 2003-2010 Bleakwind (www.weaverdream.com)
| http://www.weaverdream.com/
| Release under the GNU Lesser General Public License Version 3 (LGPLv3):
|   http://www.gnu.org/licenses/lgpl.html
+-----------------------------------------------------------------------------+
*/

// Safety confirm
define('ENTRY_INDEX', 1);

// Set envionment variables
@set_time_limit(30);
@error_reporting(E_ALL ^ E_NOTICE);
//@error_reporting(E_ERROR | E_WARNING | E_PARSE);
@set_magic_quotes_runtime(0);

// Runtime
include_once './lib/class/bwruntime.class.php';
$bwruntime = new bwruntime();

// Initialize
include_once './admin/source/initialize.php';

// Start the action
if(array_key_exists($sys->get['act'], $CONFIGURE['module'])){
    require_once "admin/source/".$CONFIGURE['module'][$sys->get['act']].".php";
}else{
    require_once "admin/source/".$CONFIGURE['module']['index'].".php";
}

// Parse path
require_once "source/parsepath.php";

// Conclude
if( $CONFIGURE['common']['if_output_template'] == "1") {
    if (file_exists($t->template_dir.$template_name)) {
        include_once './admin/source/conclude.php';
    } else {
        $sys->prompt("jump",$CONFIGURE['common']['control_admin']."?act=index");
    }
}
?>