#1470 Parentum interface debugged...

--HG--
branch : gsoc2012-achievements
hg/feature/gsoc2013-dfighter
SirCotare 13 years ago
parent 8886ed94b7
commit 7d140cb037

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

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

@ -19,7 +19,8 @@
$sz = sizeof($res);
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;
}
private function makeChild(&$a,$b) {
return new AchMenuNode($a,$b);
function makeChild(&$a) {
return new AchMenuNode($a);
}
}
@ -50,7 +51,7 @@
private $image;
private $order;
function AchMenuNode(&$data,$open) {
function AchMenuNode(&$data) {
global $DBc,$_USER;
$this->id = $data['ac_id'];
@ -58,19 +59,20 @@
$this->name = $data['acl_name'];
$this->image = $data['ac_image'];
$this->order = $data['ac_order'];
$this->open = ($this->id == $open);
$this->open = ($this->id == $data['open']);
$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");
$sz = sizeof($res);
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) {
return new AchMenuNode($a,$b);
function makeChild(&$a) {
return new AchMenuNode($a);
}
function getID() {

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

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

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

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

Loading…
Cancel
Save