<?php
session_start( );
error_reporting( 0);
define( "STRESSWEB", TRUE );
define( "ROOT_DIR", dirname( __FILE__ ) );
define( "INC_DIR", ROOT_DIR."/inc" );
define( "MOD", "index" );
require_once( INC_DIR."/cache.php" );
require_once( INC_DIR."/data/config.php" );
require_once( INC_DIR."/data/config_db.php" );
require_once( INC_DIR."/cfg.default.php" );
require_once( INC_DIR."/lang/".$l2cfg['lang'].".php" );
require_once( INC_DIR."/classes/class.mysql.php" );
require_once( INC_DIR."/classes/class.template.php" );
$host=getenv("HTTP_HOST");
$tpl = new template_parse_class( );
$tpl->dir = ROOT_DIR.( "/templates/".$l2cfg['template'] );
$http_home_url = explode( "index.php", strtolower( $_SERVER['PHP_SELF'] ) );
$http_home_url = reset( &$http_home_url );
define( "TPL_DIR", $http_home_url.( "templates/".$l2cfg['template'] ) );
require_once( INC_DIR."/classes/class.la2.php" );
require_once( INC_DIR."/classes/class.functions.php" );
require_once( INC_DIR."/classes/class.user.php" );
user::offline( );
$debug = $l2cfg['mysql']['debug'];
require_once( INC_DIR."/l2init.php" );
$user = new user( );
$user->auth( );
$_TIME = time( ) + $l2cfg['timezone'] * 60;
require_once( INC_DIR."/module.php" );
include_once( INC_DIR."/module/login.php" );
include_once( INC_DIR."/module/server.php" );
include_once( INC_DIR."/module/info.php" );
include_once( INC_DIR."/module/poll.php" );
include_once( INC_DIR."/module/forum.php" );
$tpl->GetTemplate( "index.tpl" );
$tpl->SetVar( "{TITLE}", $l2cfg['title'] );
$tpl->SetVar( "{THEME}", TPL_DIR );
$tpl->SetVar( "{LOGIN}", $tpl->result['login'] );
$tpl->SetVar( "{SERVER}", $tpl->result['server'] );
$tpl->SetVar( "{FORUM_LINKS}", $tpl->result['forum'] );
$tpl->SetVar( "{INFO}", $user->errorMsg( ) );
$tpl->SetVar( "{CONTENT}", $tpl->result['content'] );
$tpl->SetVar( "{POLL}", $tpl->result['poll'] );
$tpl->SetVar( "{COPYRIGHT}", $tpl->result['copy'] );
$tpl->parse( "index" );
echo $tpl->result['index'];
$tpl->clear_global( );
$db->Close( );
foreach ( $ldb as $ldb_close )
{
$ldb_close->Close( );
}
foreach ( $gdb as $gdb_close )
{
$gdb_close->Close( );
}
?>