Commit 30d8be25 authored by Orbmancer's avatar Orbmancer
Browse files

isolated some bugs (importXML and or toString)

whereIsLocated is okay
parent 53ce6c2f
......@@ -6,7 +6,7 @@ ini_set('display_errors', 1);
require_once 'model/Data.class.php';
require_once 'model/Tabs.class.php';
$td = $_POST['td'];
$td = $_GET['td'];
$levels = Data::loadXML($td);
......@@ -20,10 +20,12 @@ $final->fillBlank();
foreach($levels as $level){
$myContent = new Tabs();
$myContent->importXML($level['data']);
$final->setTab($myContent->getTab(), $level['x'], $level['y']);
echo '<br/>'.$myContent->toString();
//$final->setTab($myContent->getTab(), $level['x'], $level['y']);
unset($myContent);
break;
}
//echo '<br/>'.$final->toString();
// Create the XML file
/*
......
......@@ -29,16 +29,15 @@ class Tabs
$tabs = explode(',', $this->tabsRaw);
$line = array();
$prev_y = 1;
for($i=0; $i<count($tabs)-1; ++$i){
$tab_x = $this->getTabX($i);
$tab_y = $this->getTabY($i);
echo 'TAB INDEX: '.$i.' : '.$tab_x.'|'.$tab_y.'<br/>';
$line[] = (int) $tabs[$i];
$line[] = (int) $tabs[$i];
if($prev_y != $tab_y){
if(count($line) == 40){
$this->tabs[$tab_x][$tab_y][] = $line;
$line = array();
}
......@@ -107,7 +106,9 @@ class Tabs
for($i=1; $i<=5; ++$i){
for($j=1; $j<=5; ++$j) {
//echo 'TOSTRING, i='.$i.' j='.$j.' LINE COUNT='.count($this->tabs[$i][$j]).'<br/>';
foreach($this->tabs[$i][$j] as $l => $line) {
//echo 'BLOCK COUNT = '.count($line).'<br/>';
foreach($line as $b => $block){
$txt.= $block.',';
}
......
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