mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-29 20:30:54 +00:00
#1470 added dev flags
This commit is contained in:
parent
7f192c3ed7
commit
d007fbab24
8 changed files with 74 additions and 7 deletions
|
@ -9,6 +9,7 @@
|
|||
private $image;
|
||||
private $name;
|
||||
private $template;
|
||||
private $dev;
|
||||
|
||||
function AchAchievement(&$data) {
|
||||
global $DBc,$_USER;
|
||||
|
@ -22,6 +23,7 @@
|
|||
$this->image = $data['aa_image'];
|
||||
$this->name = $data['aal_name'];
|
||||
$this->template = $data['aal_template'];
|
||||
$this->dev = $data['aa_dev'];
|
||||
|
||||
#echo $this->id;
|
||||
|
||||
|
@ -104,5 +106,9 @@
|
|||
return $tmp;
|
||||
}
|
||||
}
|
||||
|
||||
function inDev() {
|
||||
return ($this->dev == 1);
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -3,6 +3,8 @@
|
|||
private $id = false;
|
||||
private $ties_cult;
|
||||
private $ties_civ;
|
||||
private $ties_cult_dev;
|
||||
private $ties_civ_dev;
|
||||
private $cult;
|
||||
private $civ;
|
||||
|
||||
|
@ -39,11 +41,17 @@
|
|||
$this->nodes[] = $tmp;
|
||||
}
|
||||
|
||||
$res = $DBc->sqlQuery("SELECT count(*) as anz FROM ach_achievement WHERE aa_tie_cult IS NOT NULL AND aa_category='".$this->id."'");
|
||||
$res = $DBc->sqlQuery("SELECT count(*) as anz FROM ach_achievement WHERE aa_tie_cult IS NOT NULL AND aa_category='".$this->id."' AND aa_dev='0'");
|
||||
$this->ties_cult = $res[0]['anz'];
|
||||
|
||||
$res = $DBc->sqlQuery("SELECT count(*) as anz FROM ach_achievement WHERE aa_tie_civ IS NOT NULL AND aa_category='".$this->id."'");
|
||||
$res = $DBc->sqlQuery("SELECT count(*) as anz FROM ach_achievement WHERE aa_tie_civ IS NOT NULL AND aa_category='".$this->id."' AND aa_dev='0'");
|
||||
$this->ties_civ = $res[0]['anz'];
|
||||
|
||||
$res = $DBc->sqlQuery("SELECT count(*) as anz FROM ach_achievement WHERE aa_tie_cult IS NOT NULL AND aa_category='".$this->id."'");
|
||||
$this->ties_cult_dev = $res[0]['anz'];
|
||||
|
||||
$res = $DBc->sqlQuery("SELECT count(*) as anz FROM ach_achievement WHERE aa_tie_civ IS NOT NULL AND aa_category='".$this->id."'");
|
||||
$this->ties_civ_dev = $res[0]['anz'];
|
||||
}
|
||||
|
||||
function getID() {
|
||||
|
@ -58,6 +66,14 @@
|
|||
return ($this->ties_civ > 0);
|
||||
}
|
||||
|
||||
function isTiedCultDev() {
|
||||
return ($this->ties_cult_dev > 0);
|
||||
}
|
||||
|
||||
function isTiedCivDev() {
|
||||
return ($this->ties_civ_dev > 0);
|
||||
}
|
||||
|
||||
function getCurrentCiv() {
|
||||
return $this->civ;
|
||||
}
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
$this->image = $data['ac_image'];
|
||||
$this->order = $data['ac_order'];
|
||||
$this->open = ($this->id == $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");
|
||||
|
||||
|
@ -101,5 +102,9 @@
|
|||
function getOrder() {
|
||||
return $this->order;
|
||||
}
|
||||
|
||||
function inDev() {
|
||||
return ($this->dev == 1);
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -6,6 +6,7 @@
|
|||
private $value;
|
||||
private $name;
|
||||
private $done;
|
||||
private $dev;
|
||||
|
||||
function AchPerk(&$data,&$parent) {
|
||||
global $DBc,$_USER;
|
||||
|
@ -16,6 +17,7 @@
|
|||
$this->value = $data['ap_value'];
|
||||
$this->name = $data['apl_name'];
|
||||
$this->done = $data['app_date'];
|
||||
$this->dev = $data['ap_dev'];
|
||||
|
||||
$res = $DBc->sqlQuery("SELECT * FROM ach_objective LEFT JOIN (ach_objective_lang) ON (aol_lang='".$_USER->getLang()."' AND aol_objective=ao_id) LEFT JOIN (ach_player_objective) ON (apo_objective=ao_id AND apo_player='".$_USER->getID()."') WHERE ao_perk='".$this->id."'");
|
||||
$sz = sizeof($res);
|
||||
|
@ -60,5 +62,9 @@
|
|||
function getDone() {
|
||||
return $this->done;
|
||||
}
|
||||
|
||||
function inDev() {
|
||||
return ($this->dev == 1);
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
$tmp = $this->menu->getChildren();
|
||||
foreach($tmp as $elem) {
|
||||
if($elem->getID() == 0) {
|
||||
if($elem->getID() == 0 || $elem->inDev()) {
|
||||
continue; // skip summary page
|
||||
}
|
||||
$res = $this->sumStats($elem);
|
||||
|
@ -52,7 +52,7 @@
|
|||
$res = $DBc->sqlQuery("SELECT count(ap_id) as anz FROM ach_perk,ach_achievement,ach_player_perk WHERE aa_category='".$node->getID()."' AND ap_achievement=aa_id AND app_player='".$_USER->getID()."' AND app_perk=ap_id");
|
||||
$done += $res[0]["anz"];
|
||||
|
||||
$res = $DBc->sqlQuery("SELECT count(ap_id) as anz FROM ach_perk,ach_achievement WHERE aa_category='".$node->getID()."' AND ap_achievement=aa_id");
|
||||
$res = $DBc->sqlQuery("SELECT count(ap_id) as anz FROM ach_perk,ach_achievement WHERE aa_category='".$node->getID()."' AND ap_achievement=aa_id AND aa_dev='0' AND ap_dev='0'");
|
||||
$total += $res[0]["anz"];
|
||||
|
||||
$tmp = $node->getChildren();
|
||||
|
|
|
@ -112,6 +112,9 @@
|
|||
$sz = $menu->getSize();
|
||||
for($i=0;$i<$sz;$i++) {
|
||||
$curr = $menu->getChild($i);
|
||||
if($curr->inDev()) {
|
||||
continue;
|
||||
}
|
||||
$html .= "<span class='ach_mspan'><a href='?lang=en&cat=".$curr->getID()."'><table class='ach_menu'>
|
||||
<tr>";
|
||||
if($sub == 0) {
|
||||
|
@ -143,6 +146,9 @@
|
|||
$sz = sizeof($tmp);
|
||||
for($i=0;$i<$sz;$i++) {
|
||||
#echo "A";
|
||||
if($cat->getChild($tmp[$i])->inDev()) {
|
||||
continue;
|
||||
}
|
||||
$html .= ach_render_achievement_done($cat->getChild($tmp[$i]));
|
||||
}
|
||||
|
||||
|
@ -150,6 +156,9 @@
|
|||
$sz = sizeof($tmp);
|
||||
for($i=0;$i<$sz;$i++) {
|
||||
#echo "B";
|
||||
if($cat->getChild($tmp[$i])->inDev()) {
|
||||
continue;
|
||||
}
|
||||
$html .= ach_render_achievement_open($cat->getChild($tmp[$i]));
|
||||
}
|
||||
|
||||
|
@ -234,9 +243,15 @@
|
|||
|
||||
$perk = $ach->getChild($perk_list[0]);
|
||||
|
||||
$html .= "<span style='color:#999999;font-weight:bold;'>".$perk->getName()."</span>";
|
||||
if($perk->inDev()) {
|
||||
return $html;
|
||||
}
|
||||
|
||||
if($perk->getName() != null) {
|
||||
$html .= "<span style='color:#999999;font-weight:bold;display:block;'>".$perk->getName()."</span>";
|
||||
}
|
||||
if($perk->objDrawable()) {
|
||||
$html .= "<br>".ach_render_obj_list($perk->getChildren());
|
||||
$html .= ach_render_obj_list($perk->getChildren());
|
||||
}
|
||||
|
||||
return $html;
|
||||
|
@ -249,6 +264,9 @@
|
|||
|
||||
foreach($perk_list as $elem) {
|
||||
$perk = $ach->getChild($elem);
|
||||
if($perk->inDev()) {
|
||||
continue;
|
||||
}
|
||||
$html .= "<div style='display:block;'><span style='color:#66CC00;font-weight:bold;'>".$perk->getName()."</span> ( ".date('d.m.Y',$perk->getDone())." ) <img src='pic/yubo_done.png' width='15px' /> ".$perk->getValue()."</div>";
|
||||
}
|
||||
|
||||
|
|
|
@ -112,6 +112,9 @@
|
|||
$sz = $menu->getSize();
|
||||
for($i=0;$i<$sz;$i++) {
|
||||
$curr = $menu->getChild($i);
|
||||
if($curr->inDev()) {
|
||||
continue;
|
||||
}
|
||||
$html .= "<span class='ach_mspan'><a href='?lang=en&cat=".$curr->getID()."'><table class='ach_menu'>
|
||||
<tr>";
|
||||
if($sub == 0) {
|
||||
|
@ -143,6 +146,9 @@
|
|||
$sz = sizeof($tmp);
|
||||
for($i=0;$i<$sz;$i++) {
|
||||
#echo "A";
|
||||
if($cat->getChild($tmp[$i])->inDev()) {
|
||||
continue;
|
||||
}
|
||||
$html .= ach_render_achievement_done($cat->getChild($tmp[$i]));
|
||||
}
|
||||
|
||||
|
@ -150,6 +156,9 @@
|
|||
$sz = sizeof($tmp);
|
||||
for($i=0;$i<$sz;$i++) {
|
||||
#echo "B";
|
||||
if($cat->getChild($tmp[$i])->inDev()) {
|
||||
continue;
|
||||
}
|
||||
$html .= ach_render_achievement_open($cat->getChild($tmp[$i]));
|
||||
}
|
||||
|
||||
|
@ -234,6 +243,10 @@
|
|||
|
||||
$perk = $ach->getChild($perk_list[0]);
|
||||
|
||||
if($perk->inDev()) {
|
||||
return $html;
|
||||
}
|
||||
|
||||
if($perk->getName() != null) {
|
||||
$html .= "<span style='color:#999999;font-weight:bold;display:block;'>".$perk->getName()."</span>";
|
||||
}
|
||||
|
@ -251,6 +264,9 @@
|
|||
|
||||
foreach($perk_list as $elem) {
|
||||
$perk = $ach->getChild($elem);
|
||||
if($perk->inDev()) {
|
||||
continue;
|
||||
}
|
||||
$html .= "<div style='display:block;'><span style='color:#66CC00;font-weight:bold;'>".$perk->getName()."</span> ( ".date('d.m.Y',$perk->getDone())." ) <img src='pic/yubo_done.png' width='15px' /> ".$perk->getValue()."</div>";
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ $c = _t('access', $num_access['num_access']).'<br/>';*/
|
|||
|
||||
$c = "<center><table>
|
||||
<tr>
|
||||
<td colspan='2'>".ach_render_yubopoints(1)."</td>
|
||||
<td colspan='2' align='left'>".ach_render_yubopoints(1)."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign='top'><div style='width:230px;font-weight:bold;font-size:14px;'>";
|
||||
|
|
Loading…
Reference in a new issue