#1470 Parentum interface debugged...

This commit is contained in:
SirCotare 2012-06-21 22:45:27 +02:00
parent 339b42fe81
commit 6b3d10307b
7 changed files with 22 additions and 18 deletions

View file

@ -32,7 +32,8 @@
$sz = sizeof($res); $sz = sizeof($res);
for($i=0;$i<$sz;$i++) { for($i=0;$i<$sz;$i++) {
#echo "Z"; #echo "Z";
$tmp = $this->makeChild($res[$i],$this); $res[$i]['this'] = $this;
$tmp = $this->makeChild($res[$i]);
#echo var_export($tmp,true); #echo var_export($tmp,true);
@ -52,8 +53,8 @@
#echo "X-".$this->hasOpen(); #echo "X-".$this->hasOpen();
} }
private function makeChild(&$a,$b) { function makeChild(&$a) {
return new AchPerk($a,$b); return new AchPerk($a);
} }
function getID() { function getID() {

View file

@ -54,7 +54,7 @@
$this->ties_civ_dev = $res[0]['anz']; $this->ties_civ_dev = $res[0]['anz'];
} }
private function makeChild(&$a) { function makeChild(&$a) {
return new AchAchievement($a); return new AchAchievement($a);
} }

View file

@ -19,7 +19,8 @@
$sz = sizeof($res); $sz = sizeof($res);
for($i=0;$i<$sz;$i++) { for($i=0;$i<$sz;$i++) {
$this->nodes[] = $this->makeChild($res[$i],$open); $res[$i]['open'] = $open;
$this->nodes[] = $this->makeChild($res[$i]);
} }
} }
@ -37,8 +38,8 @@
return 0; return 0;
} }
private function makeChild(&$a,$b) { function makeChild(&$a) {
return new AchMenuNode($a,$b); return new AchMenuNode($a);
} }
} }
@ -50,7 +51,7 @@
private $image; private $image;
private $order; private $order;
function AchMenuNode(&$data,$open) { function AchMenuNode(&$data) {
global $DBc,$_USER; global $DBc,$_USER;
$this->id = $data['ac_id']; $this->id = $data['ac_id'];
@ -58,19 +59,20 @@
$this->name = $data['acl_name']; $this->name = $data['acl_name'];
$this->image = $data['ac_image']; $this->image = $data['ac_image'];
$this->order = $data['ac_order']; $this->order = $data['ac_order'];
$this->open = ($this->id == $open); $this->open = ($this->id == $data['open']);
$this->dev = $data['ac_dev']; $this->dev = $data['ac_dev'];
$res = $DBc->sqlQuery("SELECT * FROM ach_category LEFT JOIN (ach_category_lang) ON (acl_lang='".$_USER->getLang()."' AND acl_category=ac_id) WHERE ac_parent='".$this->id."' ORDER by ac_order ASC, acl_name ASC"); $res = $DBc->sqlQuery("SELECT * FROM ach_category LEFT JOIN (ach_category_lang) ON (acl_lang='".$_USER->getLang()."' AND acl_category=ac_id) WHERE ac_parent='".$this->id."' ORDER by ac_order ASC, acl_name ASC");
$sz = sizeof($res); $sz = sizeof($res);
for($i=0;$i<$sz;$i++) { for($i=0;$i<$sz;$i++) {
$this->nodes[] = $this->makeChild($res[$i],$open); $res[$i]['open'] = $open;
$this->nodes[] = $this->makeChild($res[$i]);
} }
} }
private function makeChild(&$a,$b) { function makeChild(&$a) {
return new AchMenuNode($a,$b); return new AchMenuNode($a);
} }
function getID() { function getID() {

View file

@ -1,5 +1,5 @@
<?php <?php
class AchObjective implements Parentum { class AchObjective {
private $id; private $id;
private $perk; private $perk;
private $condition; private $condition;

View file

@ -8,11 +8,11 @@
private $done; private $done;
private $dev; private $dev;
function AchPerk(&$data,&$parent) { function AchPerk(&$data) {
global $DBc,$_USER; global $DBc,$_USER;
$this->id = $data['ap_id']; $this->id = $data['ap_id'];
$this->parent = $parent; $this->parent = $data['this'];
$this->achievement = $data['ap_achievement']; $this->achievement = $data['ap_achievement'];
$this->value = $data['ap_value']; $this->value = $data['ap_value'];
$this->name = $data['apl_name']; $this->name = $data['apl_name'];
@ -26,7 +26,7 @@
} }
} }
private function makeChild(&$a) { function makeChild(&$a) {
return new AchObjective($a); return new AchObjective($a);
} }

View file

@ -22,7 +22,7 @@
} }
} }
private function makeChild(&$a) { function makeChild(&$a) {
return new AchAchievement($a); return new AchAchievement($a);
} }

View file

@ -33,10 +33,11 @@ else {
} }
require_once("include/ach_render_common.php"); require_once("include/ach_render_common.php");
require_once("class/Parentum_inter.php");
require_once("class/RenderNodeIteraor_abstract.php"); require_once("class/RenderNodeIteraor_abstract.php");
require_once("class/AchList_abstract.php"); require_once("class/AchList_abstract.php");
require_once("class/Tieable_inter.php"); require_once("class/Tieable_inter.php");
require_once("class/Parentum_inter.php");
require_once("class/AchMenu_class.php"); require_once("class/AchMenu_class.php");
require_once("class/AchSummary_class.php"); require_once("class/AchSummary_class.php");