files as $k => $v) { $data[$v] = $parser->parseFile($v); } // Write all parse data to mod db foreach ($data as $k => $v) { $db->createTables($k, $v); $db->fillsTables($k, $v); } processCubeMain('cubemain.txt'); processCubeMainLinux('cubemain.txt'); // put in html redirect as backup, because // for some odd reason windows gives // an error on header() but linux does not. /* Process tbl files * * */ $tbl = $_SESSION['tbl']; $string = D2Tbl::getStrings($tbl."string.tbl"); $stringExpansion = D2Tbl::getStrings($tbl."expansionstring.tbl"); $stringPatch = D2Tbl::getStrings($tbl."patchstring.tbl"); $strings = array_merge($stringPatch, $stringExpansion, $string); $db->writeTbl($strings); } else { // if config db does not exist, go to configure page header("Location: /src/D2Config.php"); } ?>