merge.php 663 Bytes
Newer Older
1
<?php
Orbmancer's avatar
Orbmancer committed
2
3
4
5

error_reporting(E_ALL);
ini_set('display_errors', 1);

Orbmancer's avatar
Orbmancer committed
6
require_once 'Data.class.php';
Erwan Normand's avatar
Rename  
Erwan Normand committed
7
require_once 'model/Tabs.class.php';
Orbmancer's avatar
Orbmancer committed
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

$name = $_POST['name'];
$data = $_POST['data'];
$x = $_POST['x'];
$y = $_POST['y'];
$td = $_POST['td'];

var_dump($name);
var_dump($data);
var_dump($x);
var_dump($y);
var_dump($td);

Data::saveXML($data, $name, $x, $y, $td);
echo '<br/>';
Orbmancer's avatar
Orbmancer committed
23

Orbmancer's avatar
Orbmancer committed
24
$levels = Data::loadXML($td);
Erwan Normand's avatar
Rename  
Erwan Normand committed
25
$tabs[] = array();
Orbmancer's avatar
Orbmancer committed
26
27
28
var_dump($levels);

foreach($levels as $level){
Erwan Normand's avatar
Rename  
Erwan Normand committed
29
    $myContent = new tabs();
Orbmancer's avatar
Orbmancer committed
30
    $myContent->importXML($level['content']);
Erwan Normand's avatar
Rename  
Erwan Normand committed
31
    $tabs[] = $myContent;
Orbmancer's avatar
Orbmancer committed
32
33
34
35
36
37
38
39
40
}

echo '<br/>';
echo '<br/>';
echo '<br/>';
echo '<br/>';
var_dump($levels);

//Merge $levels