<?php
include_once(dirname(__FILE__)."/config.inc");
include_once(dirname(__FILE__)."/constant.inc");
include_once(dirname(__FILE__)."/ipcookie.inc");
include_once(dirname(__FILE__)."/debug.inc");
/* include_once(dirname(__FILE__)."/cache.inc"); */
include_once(dirname(__FILE__)."/database_small.inc");
$container = new Database(HOST_NAME, DATABASE_NAME, DATABASE_USER, DATABASE_PASSWORD);
$container_session = new Database(SESSION_HOST_NAME, SESSION_DATABASE_NAME, SESSION_DATABASE_USER, SESSION_DATABASE_PASSWORD);
$container_fight = new Database(FIGHT_HOST_NAME, FIGHT_DATABASE_NAME, FIGHT_DATABASE_USER, FIGHT_DATABASE_PASSWORD);
include_once(dirname(__FILE__)."/cgi.inc");
include_once(dirname(__FILE__)."/theme.inc");
include_once(dirname(__FILE__)."/module_small.inc");
include_module(array('session', 'personage', 'area', 'file'));
function include_module($arr) {
if (is_array($arr))
foreach ($arr as $item) module_include($item);
}
function print_r1($data) {
print "<pre>"; print_r($data); print "</pre>";
}
function make_seed() {
list($usec,$sec) = explode(" ", microtime());
return ((float)$sec+(float)$usec) * 100000;
}
function print_r2($data) {
global $DOCUMENT_ROOT;
ob_start();
print_r($data);
$s = ob_get_contents();
ob_end_clean();
$f = fopen($DOCUMENT_ROOT."/dbg.log", "a+");
fwrite($f, $s);
fclose($f);
}
function throw($exception) {
global $DOCUMENT_ROOT;
if (EXCEPTION_STREAM == 1) {
ob_start();
trigger_error($exception, E_USER_WARNING);