Commit a6be940b authored by Erwan Normand's avatar Erwan Normand
Browse files

Doc

parent 037959d6
......@@ -8,8 +8,9 @@ require_once 'model/Tabs.class.php';
$td = $_POST['td'];
//$levels = Data::loadXML($td);
$levels = Data::loadXML($td);
// Create the merged level
$finalTabs = new Tabs();
$finalTabs->fillBlank();
......@@ -19,9 +20,11 @@ foreach($levels as $level) {
$finalTabs->setTab($currentTab->getTab(), $level['x'], $level['y']);
}
// Create the XML file
$finalFile = simplexml_load_file('data/level_layout.vvvvvv');
$finalFile->Data->contents = $finalTabs->toString();
// Download the XML file
header('Content-type: text/xml');
header('Content-Disposition: attachment; filename=VVVVVV_level_merged.vvvvvvv');
header('Expires: 0');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment