mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-27 11:00:54 +00:00
#1470 Parentum interface debugged...
This commit is contained in:
parent
12884dac30
commit
09a48363d3
7 changed files with 22 additions and 18 deletions
|
@ -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() {
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
class AchObjective implements Parentum {
|
class AchObjective {
|
||||||
private $id;
|
private $id;
|
||||||
private $perk;
|
private $perk;
|
||||||
private $condition;
|
private $condition;
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function makeChild(&$a) {
|
function makeChild(&$a) {
|
||||||
return new AchAchievement($a);
|
return new AchAchievement($a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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");
|
||||||
|
|
Loading…
Reference in a new issue