.ach_menu { display:block; padding:2px; border:1px solid #000000; margin-bottom:2px; color:#FFFFFF; } .ach_menu:hover { color:orange; } .ach_mspan a { text-decoration:none; } "; return $html.adm_render_mnode($menu,$sub); } function adm_render_mnode(&$menu,$sub) { global $_CONF; $html = ""; $iter = $menu->getIterator(); while($iter->hasNext()) { $curr = $iter->getNext(); $html .= ""; if($sub == 0) { $html .= ""; } $html .= "
getImage()."' />".$curr->getName()."
"; if($curr->hasOpenCat() != 0) { $html .= "
".adm_render_mnode($curr,($sub+4))."
"; } } return $html; } function adm_render_category(&$cat) { global $menu,$metalist,$DBc,$_USER; $html = ""; $m = $menu->getIterator(); while($m->hasNext()) { $n = $m->getNext(); $html .= ""; $m2 = $n->getIterator(); while($m2->hasNext()) { $n2 = $m2->getNext(); $html .= ""; //db $res = $DBc->sqlQuery("SELECT aa_id,aal_name FROM ach_achievement LEFT JOIN (ach_achievement_lang) ON (aal_lang='".$_USER->getLang()."' AND aal_achievement=aa_id) WHERE aa_category='".$n2->getID()."' ORDER by aa_sticky DESC, aal_name ASC"); $sz = sizeof($res); for($i=0;$i<$sz;$i++) { $html .= ""; } } //db $res = $DBc->sqlQuery("SELECT aa_id,aal_name FROM ach_achievement LEFT JOIN (ach_achievement_lang) ON (aal_lang='".$_USER->getLang()."' AND aal_achievement=aa_id) WHERE aa_category='".$n->getID()."' ORDER by aa_sticky DESC, aal_name ASC"); $sz = sizeof($res); for($i=0;$i<$sz;$i++) { $html .= ""; } } $metalist = $html; $html = ""; if($_REQUEST['confirm'] == "delete") { $tmp = $cat->getElementByPath($_REQUEST['id']); if($tmp != null) { $html .= "
Delete Are you sure you want to delete ".$tmp->getName()."

Any nested Tasks/Objective/Atoms will be removed, as well as any player progress connected!

delete

"; } } $html .= "
"; if($cat->isTiedCultDev() || $cat->isTiedCivDev()) { $html .= ach_render_tiebar($cat->getCurrentCult(),$cat->getCurrentCiv(),$cat); } $iter = $cat->getOpen(); while($iter->hasNext()) { $curr = $iter->getNext(); $html .= ach_render_achievement_open($curr); } return $html; } function ach_render_achievement_open(&$ach) { global $_CONF,$menu; $html = '
'; $html .= "
[ach:]'.$ach->getName().''; if($ach->getParentID() != null && $ach->getParentID() != "null") { #echo $ach->getParentID(); $c = $ach->getParent(); $p = $c->getChildDataByID($ach->getParentID()); $html .= "
child of ".$p->getName().""; } $html .= '
getDev()."&id=".$ach->getPathID()."#ach_".$ach->getID()."'> "; $html .= " "; $html .= " "; $html .= "   getPathID()."'>
"; $html .= '
'; $html .= ""; $html .= ""; $html .= ""; $html .= ach_render_task_open($ach); $html .= '
'; return $html; } function ach_render_task_open(&$ach) { global $metalist; $html = ""; $task_list = $ach->getOpen(); while($task_list->hasNext()) { $task = $task_list->getNext(); $html .= ""; $html .= "
[task:]".$task->getDisplayName()." (".$task->getValue().")getDev()."&id=".$task->getPathID()."#task_".$task->getID()."'> "; $html .= " "; $html .= "   getPathID()."'>
"; $html .= ""; $html .= ""; $html .= ach_render_obj_list($task->getIterator()); } return $html; } function ach_render_obj_list($obj) { #return null; global $metalist; $html = "
"; #$i = 0; #$skip = false; while($obj->hasNext()) { #foreach($obj as $elem) { $elem = $obj->getNext(); #if(($i%2) == 0) { $html .= ""; #} #if(!$skip) { # $i++; #} #$skip = false; } #if(($i%2) == 1) { # $html .= ""; #} $html .= "
"; #} switch($elem->getDisplay()) { case "meta": $html .= ""; #} $html .= ""; #$i++; break; case "simple": $html .= ""; break; case "hidden": default: //do nothing #$skip = true; #if(($i%2) == 1) { # $html .= ""; #} $html .= ""; #$i++; break; } $html .= "
".ach_render_obj_meta($elem).""; break; case "value": #if(($i%2) == 1) { # $html .= "
".ach_render_obj_value($elem)."".ach_render_obj_simple($elem)."
".ach_render_obj_hidden($elem).""; #$html .= " "; $html .= "   getPathID()."'>
"; $html .= ""; #if(($i%2) == 1) { $html .= "
"; return $html; } function ach_render_obj_simple(&$obj) { global $_CONF; $html = ""; if($obj->isdone()) { $html .= " "; } else { $html .= " "; } $html .= "[obj:]".$obj->getDisplayName().""; return $html; } function ach_render_obj_meta(&$obj) { global $_CONF; if($obj->isdone()) { $col = "#71BE02"; $grey = ""; } else { $col = "#999999"; $grey = "grey/"; } return "
getMetaImage()."' width='20px' />  [obj:]".$obj->getDisplayName()."
"; } function ach_render_obj_value(&$obj) { $html = ""; #if($obj->getName() != null) { if($obj->isdone()) { $col = "#71BE02"; } else { $col = "#999999"; } $html .= "
[obj:]".$obj->getDisplayName()."
"; #} $html .= ach_render_progressbar($obj->getProgress(),$obj->getValue(),350); return $html; } function ach_render_obj_hidden(&$obj) { $html = ""; #if($obj->getName() != null) { if($obj->isdone()) { $col = "#71BE02"; } else { $col = "#999999"; } $html .= "
[obj: hidden]
"; #} #$html .= ach_render_progressbar($obj->getProgress(),$obj->getValue(),350); return $html; } function ach_render_progressbar($prog,$val,$width) { $val = max(1,$val); $left = floor($width*(100*($prog/$val))/100); $html = "
"; if(($prog/$val) > 0.85) { $html .= " ".nf($prog)." / ".nf($val)." "; } $html .= " "; if(($prog/$val) <= 0.85) { $html .= " ".nf($prog)." / ".nf($val)." "; } $html .= "
"; return $html; } function ach_render_tiebar($cult = "c_neutral", $civ = "c_neutral",&$cat) { global $_USER; $html = "
"; if($cat->isTiedCultDev()) { $html.= "