#1470 minor fix in rendering

This commit is contained in:
SirCotare 2012-07-09 12:49:58 +02:00
parent d0c17c0c65
commit 3aa6056c01
3 changed files with 7 additions and 7 deletions

View file

@ -28,7 +28,7 @@
$this->template = $data['aal_template'];
$this->dev = $data['aa_dev'];
$res = $DBc->sqlQuery("SELECT * FROM ach_perk LEFT JOIN (ach_perk_lang) ON (apl_lang='".$_USER->getLang()."' AND apl_perk=ap_id) LEFT JOIN (ach_player_perk) ON (app_perk=ap_id AND app_player='".$_USER->getID()."') WHERE ap_achievement='".$this->id."' AND ap_parent IS NULL");
$res = $DBc->sqlQuery("SELECT * FROM ach_perk LEFT JOIN (ach_perk_lang) ON (apl_lang='".$_USER->getLang()."' AND apl_perk=ap_id) LEFT JOIN (ach_player_perk) ON (app_perk=ap_id AND app_player='".$_USER->getID()."') WHERE ap_achievement='".$this->id."' ORDER by ap_porder ASC");
$sz = sizeof($res);
for($i=0;$i<$sz;$i++) {

View file

@ -112,7 +112,7 @@
$res = $DBc->sqlQuery("SELECT sum(ap_value) as anz FROM ach_perk,ach_player_perk WHERE ap_id=app_perk AND app_player='".$_USER->getID()."'");
$html = "<font size='32px'>".$_USER->getName()."&nbsp;<img src='".$_CONF['image_url']."pic/yubo_done.png'>&nbsp;".$res[0]['anz']."</font>";
$html = "<font size='32px'>".$_USER->getName()."&nbsp;<img src='".$_CONF['image_url']."pic/yubo_done.png'>&nbsp;".max(0,$res[0]['anz'])."</font>";
return $html;
}
@ -182,7 +182,7 @@
$iter = $cat->getDone();
while($iter->hasNext()) {
$curr = $cat->getChildByIdx($iter->getNext());
$curr = $iter->getNext();
#$sz = sizeof($tmp);
#for($i=0;$i<$sz;$i++) {
#echo "A";
@ -194,7 +194,7 @@
$iter = $cat->getOpen();
while($iter->hasNext()) {
$curr = $cat->getChildByIdx($iter->getNext());
$curr = $iter->getNext();
#$sz = sizeof($tmp);
#for($i=0;$i<$sz;$i++) {
#echo "B";
@ -259,7 +259,7 @@
$html = "";
$perk_list = $ach->getOpen();
$perk = $ach->getChildByIdx($perk_list->getNext());
$perk = $perk_list->getNext();
if($perk->inDev()) {
return $html;
@ -281,7 +281,7 @@
$perk_list = $ach->getDone();
while($perk_list->hasNext()) {
$perk = $ach->getChildByIdx($perk_list->getNext());
$perk = $perk_list->getNext();
#foreach($perk_list as $elem) {
#$perk = $ach->getChild($elem);

View file

@ -120,7 +120,7 @@
$res = $DBc->sqlQuery("SELECT sum(ap_value) as anz FROM ach_perk,ach_player_perk WHERE ap_id=app_perk AND app_player='".$_USER->getID()."'");
$html = "<div style='display:block;border-bottom:1px solid #000000;'><span style='font-size:32px;'>".$_USER->getName()."&nbsp;<img src='".$_CONF['image_url']."pic/yubo_done.png'>&nbsp;".$res[0]['anz']."</span></div>";
$html = "<div style='display:block;border-bottom:1px solid #000000;'><span style='font-size:32px;'>".$_USER->getName()."&nbsp;<img src='".$_CONF['image_url']."pic/yubo_done.png'>&nbsp;".max(0,$res[0]['anz'])."</span></div>";
return $html;
}