} /** START **/ // konvertiert Kartenattribute in die Flagform und schreibt das Flag in die DB ob_start(); error_reporting(E_ALL); session_start(); set_time_limit(0); require_once './../../constants.php'; // Konstanten require_once FUNC_PATH . 'autoload.php'; // Autoloader für Klassen require_once FUNC_PATH . 'buildSiteUrl.php'; // Autoloader für Klassen require_once WORLD . 'config.php'; // Konfiguration World_Base::$DB = new DatabaseInterface($config['mySql']['host'], $config['mySql']['user'], $config['mySql']['pass'], $config['mySql']['db']); // Maps auslesen $mapList = World_Map::getMapList(); foreach ($mapList as $mapData) { $map = new World_Map($mapData['id']); if ($map->getId() !== 0) { $mapId = $map->getId(); echo $map->getDisplayName() . ' '; $fields = array('attr_indoor', 'attr_storage_pc', 'attr_trade', 'attr_trainer_fight', 'attr_heal'); $where = 'map_id=' . $mapId; if (World_Base::$DB->selectByWhere(TABLE_CONST_MAP_ATTRIBUTE, $fields, $where)) { $row = World_Base::$DB->getRow(); $flags = 0; if ($row['attr_indoor'] == 1) { $flags = $flags | World_Map::FLAG_INDOOR; }
$user = $dataObject; } else { $user = new World_User($userId); } } else { $user = new World_User($userId); } // Prüfung ob Daten geladen if ($user->isLoaded() === false) { $user = null; } else { // Module registrieren $user->registerModule('pokemonTeam', 'World_PokemonTeam'); $user->registerModule('storeBox', 'World_StoreBoxContainer'); $user->registerModule('map', 'World_Map'); $user->registerModule('fight', 'World_Fight'); $user->registerModule('inventory', 'World_Inventory'); $user->registerModule('messages', 'World_Messages'); $user->registerModule('settings', 'World_Settings'); } } World_Base::$USER = $user; // Templateinstanz erzeugen $template = new PHPTAL(); $template->setTemplateRepository(array(TEMPLATE_PATH, ADMIN_TEMPLATE_PATH, SITE_TEMPLATE_PATH)); $template->setTemplate('index.html'); $template->viewMacro = 'world'; // Standard, ansonsten auch 'admin' für Adminoberflächen $template->WORLD = WORLD_DIRECTORY; $template->SESSION = World_Base::$SESSION; $javascriptContent = array();