extract($system->cache->c_get("XML", "xml-stats", array('xml_time' => $xml_time, '_CONFIG' => $_CONFIG)), EXTR_OVERWRITE);
$system->xmlfix();
if (count($system->tpl) < 1) {
    die("Error, tpl not found");
}
$tpl = new Template($system->_root . $_CONFIG['tpl'] . $system->tpl[$_SESSION['tplsl']]['name'] . "/");
if ($tpl->setFile('page', "main.tpl")) {
    $tpl->parseFile('page');
} else {
    if ($_SESSION['tplsl'] == $system->d_tpl) {
        die("Error, " . $system->_root . $_CONFIG['tpl'] . $system->tpl[$_SESSION['tplsl']]['name'] . "/main.tpl" . " not found");
    } else {
        $_SESSION['tplsl'] = $system->d_tpl;
        $tpl = new Template($system->_root . $_CONFIG['tpl'] . $system->tpl[$_SESSION['tplsl']]['name'] . "/");
        if ($tpl->setFile('page', "main.tpl")) {
            $tpl->parseFile('page');
        } else {
            die("Error, " . $system->_root . $_CONFIG['tpl'] . $system->tpl[$_SESSION['tplsl']]['name'] . "/main.tpl" . " not found");
        }
    }
}
$system->mods->load();
//-------------------
$system->mods->getactive(&$tpl);
if (!$_CONFIG['logo']) {
    $tpl->setParam('PAGE_logo', "");
} else {
    $tpl->setParam('PAGE_logo', "<img width=770 src=\"{$_CONFIG['logo']}\" alt=\"Logo\"/>");
}
$fcss = new File($system->_root . $_CONFIG['tpl'] . $system->tpl[$_SESSION['tplsl']]['name'] . "/server_stats.css", 'r');
if ($fcss->open()) {