@ -1,10 +1,10 @@
<?php
function ach_render() {
global $user ;
global $_USER ;
$c = "< table >
< tr >
< td > ".ach_render_yubopoints($user['id'] )."< / td >
< td > ".ach_render_yubopoints($_USER->getID() )."< / td >
< / tr >
< / table >
@ -44,18 +44,12 @@
function ach_render_tiebar($cult = "c_neutral", $civ = "c_neutral",& $cat) {
global $_USER;
$html = "< style >
.o {
color:orange;
}
< / style >
< div style = 'display:block;text-align:center;' > < form method = 'post' action = '?cat=".$cat->getID()."' id = 'cc_form' >
$html = "< form method = 'post' action = '?cat=".$cat->getID()."' >
< table >
< tr > ";
if($cat->isTiedCult()) {
$html.= "< td >
< select name = 'cult' onchange = 'document.getElementById(\"cc_form\").submit();' >
< select name = 'cult' >
< option value = 'c_neutral' " ; if ( $ cult = = " c_neutral " ) { $ html . = " selected = 'selected' " ; } $ html . = " > ".get_translation('ach_c_neutral',$_USER->getLang())."< / option >
< option value = 'c_kami' " ; if ( $ cult = = " c_kami " ) { $ html . = " selected = 'selected' " ; } $ html . = " > Kami< / option >
< option value = 'c_karavan' " ; if ( $ cult = = " c_karavan " ) { $ html . = " selected = 'selected' " ; } $ html . = " > Karavan< / option >
@ -64,7 +58,7 @@
}
if($cat->isTiedCiv()) {
$html.= "< td >
< select name = 'civ' onchange = 'document.getElementById(\"cc_form\").submit();' >
< select name = 'civ' >
< option value = 'c_neutral' " ; if ( $ civ = = " c_neutral " ) { $ html . = " selected = 'selected' " ; } $ html . = " > ".get_translation('ach_c_neutral',$_USER->getLang())."< / option >
< option value = 'c_fyros' " ; if ( $ civ = = " c_fyros " ) { $ html . = " selected = 'selected' " ; } $ html . = " > Fyros< / option >
< option value = 'c_matis' " ; if ( $ civ = = " c_matis " ) { $ html . = " selected = 'selected' " ; } $ html . = " > Matis< / option >
@ -73,52 +67,52 @@
< / select >
< / td > ";
}
$html.= "< / tr >
$html.= "< td > < input type = 'submit' value = 'show' / > < / td > < / tr > < tr > < td > < / td > < / tr >
< / table >
< / form > < / div >
< / form >
< div style = 'display:block;font-weight:bold;font-size:20px;color:#FFFFFF;text-align:center;margin-bottom:5px; '> ";
< font size = '12px' color = '#FFFFFF '> ";
if($cat->isTiedCult() & & !$cat->isTiedCiv() & & $cult == "c_neutral") { // neutral / xx
#While being of neutral allegiance with the higher powers
$html .= get_translation('ach_allegiance_neutral_cult',$_USER->getLang(),array("< span class = 'o '> ".get_translation('ach_c_neutral',$_USER->getLang())."< / span > "));
$html .= get_translation('ach_allegiance_neutral_cult',$_USER->getLang(),array("< font color = 'orange '> ".get_translation('ach_c_neutral',$_USER->getLang())."< / font > "));
}
elseif($cat->isTiedCiv() & & !$cat->isTiedCult() & & $civ == "c_neutral") { // xx / neutral
#While being of neutral allegiance with the homin civilizations
$html .= get_translation('ach_allegiance_neutral_civ',$_USER->getLang(),array("< span class = 'o '> ".get_translation('ach_c_neutral',$_USER->getLang())."< / span > "));
$html .= get_translation('ach_allegiance_neutral_civ',$_USER->getLang(),array("< font color = 'orange '> ".get_translation('ach_c_neutral',$_USER->getLang())."< / font > "));
}
elseif($cat->isTiedCiv() & & $cat->isTiedCult() & & $cult == "c_neutral" & & $civ == "c_neutral") { // neutral / neutral
#While being of neutral allegiance
$html .= get_translation('ach_allegiance_neutral',$_USER->getLang(),array("< span class = 'o '> ".get_translation('ach_c_neutral',$_USER->getLang())."< / span > "));
$html .= get_translation('ach_allegiance_neutral',$_USER->getLang(),array("< font color = 'orange '> ".get_translation('ach_c_neutral',$_USER->getLang())."< / font > "));
}
else { //other
#While being aligned with the
$html .= get_translation('ach_allegiance_start',$_USER->getLang());
if($cat->isTiedCult() & & $cult != "c_neutral") {
#CULT
$html .= "< span class = 'o' > ".ach_translate_cc($cult)."< / span > ";
$html .= "< font color = 'orange' > ".ach_translate_cc($cult)."< / font > ";
if($cat->isTiedCiv() & & $civ != "c_neutral") {
#and the CIV
$html .= get_translation('ach_allegiance_and',$_USER->getLang())." < span class = 'o' > ".ach_translate_cc($civ)."< / span > ";
$html .= get_translation('ach_allegiance_and',$_USER->getLang())." < font color = 'orange' > ".ach_translate_cc($civ)."< / font > ";
}
}
elseif($cat->isTiedCiv() & & $civ != "c_neutral") {
#CIV
$html .= "< span class = 'o' > ".ach_translate_cc($civ)."< / span > ";
$html .= "< font color = 'orange' > ".ach_translate_cc($civ)."< / font > ";
}
}
#, accomplish the following achievements:
$html .= get_translation('ach_allegiance_end',$_USER->getLang())."< / div > ";
$html .= get_translation('ach_allegiance_end',$_USER->getLang())."< / font> < br > < br > ";
return $html;
}
function ach_render_yubopoints() {
global $DBc,$_USER;
global $DBc,$_USER,$_CONF ;
$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()." < img src = ' http://www.3025-game.de/special/app_achievements/pic/yubo_done.png '> ".$res[0]['anz']."< / font > ";
$html = "< font size = '32px' > ".$_USER->getName()." < img src = ' ".$_CONF['image_url ' ] . " pic / yubo_done . png '> ".$res[0]['anz']."< / font > ";
return $html;
}
@ -132,6 +126,8 @@
}
function ach_render_menu(& $menu,$sub = 0) {
global $_CONF;
$html = "";
if($sub == 0) {
$html = "< table cellpadding = '2px' > ";
@ -145,10 +141,10 @@
$html .= "< tr > < td > < / td > < td bgcolor = '#000000' > < / td > < / tr >
< tr > < td > ";
if($sub == 0) {
$html .= "< img src = ' http://www.3025-game.de/special/app_achievements/pic/menu/ig_".$curr->getImage()."' / > ";
$html .= "< img src = ' ".$_CONF['image_url ' ] . " pic / menu / ig_ " . $ curr- > getImage()."' /> ";
}
else {
$html .= "< img src = ' http://www.3025-game.de/special/app_achievements/pic/menu_space.png ' / > ";
$html .= "< img src = ' ".$_CONF['image_url ' ] . " pic / menu_space . png ' / > ";
}
$html .= "< / td > < td > < a href = '?lang=en&cat=".$curr->getID()."' > < font size = '".(16-$sub)."px' " ;
if($curr->isOpen()) {
@ -201,17 +197,19 @@
}
function ach_render_achievement_done(& $ach) {
global $_CONF;
$html = "
< table >
< tr >
< td width = '450px' bgcolor = '#D2CBDC88' >
< table width = '450px' cellpadding = '3px' >
< tr >
< td width = '70px' > < img src = ' http://www.3025-game.de/special/app_achievements/pic/icon/".$ach->getImage()."'> < / td >
< td width = '70px' > < img src = ' ".$_CONF['image_url ' ] . " pic / icon / " . $ ach- > getImage()."'> < / td >
< td > < center > < font size = '22px' > < b > ".$ach->getName()."< / b > < / font > < / center >
< table > ".ach_render_perk_done($ach)."< / table >
< / td >
< td width = '35px' > < font size = '24px' color = '#000000' > ".$ach->getValueDone()."< / font > < br > < img src = ' http://www.3025-game.de/special/app_achievements/pic/yubo_done.png '> < / td >
< td width = '35px' > < font size = '24px' color = '#000000' > ".$ach->getValueDone()."< / font > < br > < img src = ' ".$_CONF['image_url ' ] . " pic / yubo_done . png '> < / td >
< / tr >
< / table >
< / td >
@ -219,40 +217,11 @@
< tr > < td > < / td > < / tr >
< / table > ";
/*$html .= '< div style = "display: block; margin-bottom: 5px;" > < table cellpadding = "0" cellspacing = "0" width = "100%" >
< tbody > < tr >
< td width = "3px" > < img src = "pic/bar_done_ul.png" > < / td >
< td style = "background-image: url(pic/bar_done_u.png);" > < / td >
< td width = "3px" > < img src = "pic/bar_done_ur.png" > < / td >
< / tr >
< tr >
< td style = "background-image: url(pic/bar_done_l.png);" > < / td >
< td style = "background-image: url(pic/bar_done_bg.png);" >
< center > < table width = "100%" cellspacing = "0" cellpadding = "0" >
< tbody > < tr >
< td rowspan = "2" valign = "top" > < img src = "pic/icon/'.$ach->getImage().'" > < / td >
< td width = "100%" > < center > < span style = "font-weight:bold;font-size:24px;color:#000000;" > '.$ach->getName().'< / span > < / center > < / td >
< td rowspan = "2" valign = "top" style = "font-weight: bold; text-align: center; font-size: 30px;color:#000000;padding-right:10px;" >
'.$ach->getValueDone().'< br > < img src = "pic/yubo_done.png" >
< / td >
< / tr > < tr > < td align = "center" valign = "top" > ';
$html .= ach_render_perk_done($ach);
$html .= '< / td > < / tr > < / tbody > < / table > < / center >
< / td >
< td style = "background-image: url(pic/bar_done_r.png);" > < / td >
< / tr >
< tr >
< td > < img src = "pic/bar_done_bl.png" > < / td >
< td style = "background-image: url(pic/bar_done_b.png);" > < / td >
< td > < img src = "pic/bar_done_br.png" > < / td >
< / tr >
< / tbody > < / table > < / div > ';*/
return $html;
}
function ach_render_achievement_open(& $ach) {
$html = "" ;
global $_CONF;
$html = "
< table >
@ -260,11 +229,11 @@
< td width = '450px' bgcolor = '#D2CBDC33' >
< table width = '450px' cellpadding = '3px' >
< tr >
< td width = '70px' > < img src = ' http://www.3025-game.de/special/app_achievements/pic/icon/".$ach->getImage()."'> < / td >
< td width = '70px' > < img src = ' ".$_CONF['image_url ' ] . " pic / icon / grey / " . $ ach- > getImage()."'> < / td >
< td > < center > < font size = '22px' > < b > ".$ach->getName()."< / b > < / font > < / center >
< table > ".ach_render_perk_open($ach)."< / table >
< / td >
< td width = '35px' > < font size = '22px' color = '#000000' > ".$ach->getValueOpen()."< / font > < br > < img src = ' http://www.3025-game.de/special/app_achievements/pic/yubo_pending.png '> < / td >
< td width = '35px' > < font size = '22px' color = '#000000' > ".$ach->getValueOpen()."< / font > < br > < img src = ' ".$_CONF['image_url ' ] . " pic / yubo_pending . png '> < / td >
< / tr >
< / table >
< / td >
@ -272,40 +241,10 @@
< tr > < td > < / td > < / tr >
< / table > ";
/*$html .= '< div style = "display: block; margin-bottom: 5px;" > < table cellpadding = "0" cellspacing = "0" width = "100%" >
< tbody > < tr >
< td width = "3px" > < img src = "pic/bar_pending_ul.png" > < / td >
< td style = "background-image: url(pic/bar_pending_u.png);" > < / td >
< td width = "3px" > < img src = "pic/bar_pending_ur.png" > < / td >
< / tr >
< tr >
< td style = "background-image: url(pic/bar_pending_l.png);" > < / td >
< td >
< center > < table width = "100%" cellspacing = "0" cellpadding = "0" >
< tbody > < tr >
< td rowspan = "2" valign = "top" > < img src = "pic/icon/'.$ach->getImage().'" > < / td >
< td width = "100%" > < center > < span style = "font-weight:bold;font-size:24px;color:#FFFFFF;" > '.$ach->getName().'< / span > < / center > < / td >
< td rowspan = "2" valign = "top" style = "font-weight: bold; text-align: center; font-size: 30px;color:#FFFFFF;padding-right:10px;" >
'.$ach->getValueOpen().'< br > < img src = "pic/yubo_pending.png" >
< / td >
< / tr > < tr > < td align = "center" valign = "top" > ';
$html .= ach_render_perk_open($ach);
$html .= '< / td > < / tr > < / tbody > < / table > < / center >
< / td >
< td style = "background-image: url(pic/bar_pending_r.png);" > < / td >
< / tr >
< tr >
< td > < img src = "pic/bar_pending_bl.png" > < / td >
< td style = "background-image: url(pic/bar_pending_b.png);" > < / td >
< td > < img src = "pic/bar_pending_br.png" > < / td >
< / tr >
< / tbody > < / table > < / div > ';*/
return $html;
}
function ach_render_perk_open(& $ach) {
#echo var_export($perk_list,true);
$html = "";
$perk_list = $ach->getOpen();
@ -327,6 +266,7 @@
}
function ach_render_perk_done(& $ach) {
global $_CONF;
$html = "";
$perk_list = $ach->getDone();
@ -336,7 +276,7 @@
if($perk->inDev()) {
continue;
}
$html .= "< tr > < td > < font color = '#66CC00' > < b > ".$perk->getName()."< / b > < / font > ( ".date('d.m.Y',$perk->getDone())." ) < img src = ' http://www.3025-game.de/special/app_achievements/pic/yubo_done_small.png ' / > ".$perk->getValue()."< / td > < / tr > ";
$html .= "< tr > < td > < font color = '#66CC00' > < b > ".$perk->getName()."< / b > < / font > ( ".date('d.m.Y',$perk->getDone())." ) < img src = ' ".$_CONF['image_url ' ] . " pic / yubo_done_small . png ' / > ".$perk->getValue()."< / td > < / tr > ";
}
return $html;
@ -395,12 +335,14 @@
}
function ach_render_obj_simple(& $obj) {
global $_CONF;
$html = "";
if($obj->isdone()) {
$html .= "< img src = ' http://www.3025-game.de/special/app_achievements/pic/check.png ' height = '10px' / > < font color = '#71BE02;' > ";
$html .= "< img src = ' ".$_CONF['image_url ' ] . " pic / check . png ' height = '10px' / > < font color = '#71BE02;' > ";
}
else {
$html .= "< img src = ' http://www.3025-game.de/special/app_achievements/pic/pending.png ' height = '10px' / > < font color = '#999999;' > ";
$html .= "< img src = ' ".$_CONF['image_url ' ] . " pic / pending . png ' height = '10px' / > < font color = '#999999;' > ";
}
$html .= $obj->getName()."< / font > ";
@ -409,6 +351,7 @@
}
function ach_render_obj_meta(& $obj) {
global $_CONF;
$html = "";
if($obj->isdone()) {
$col = "#71BE02";
@ -421,7 +364,7 @@
return "< table cellspacing = '0' cellpadding = '0' >
< tr >
< td > < img src = ' http://www.3025-game.de/special/app_achievements/pic/icon/".$grey."small/test.png' / > < / td >
< td > < img src = ' ".$_CONF['image_url ' ] . " pic / icon / " . $ grey . " small / " . $ obj- > getMetaImage()."' /> < / td >
< td > < font color = '".$col."' > ".$obj->getName()."< / font > < / td >
< / tr >
< / table > ";