Пример #1
0
function ach_render_tiebar($cult = "c_neutral", $civ = "c_neutral", &$cat)
{
    global $_USER;
    $html = "<style>\r\n\t\t\t.o {\r\n\t\t\t\tcolor:orange;\r\n\t\t\t}\r\n\t\t</style>\r\n\r\n\t\t<div style='display:block;text-align:center;'><form method='post' action='?cat=" . $cat->getID() . "&mode=player&pid=" . $_REQUEST['pid'] . "' id='cc_form'>\r\n\t\t\t<table>\r\n\t\t\t\t<tr>";
    if ($cat->isAllowedCult()) {
        $html .= "<td>\r\n\t\t\t\t\t\t<select name='cult' onchange='document.getElementById(\"cc_form\").submit();'>\r\n\t\t\t\t\t\t\t<option value='c_neutral'";
        if ($cult == "c_neutral") {
            $html .= " selected='selected'";
        }
        $html .= ">" . get_translation('ach_c_neutral', $_USER->getLang()) . "</option>\r\n\t\t\t\t\t\t\t<option value='c_kami'";
        if ($cult == "c_kami") {
            $html .= " selected='selected'";
        }
        $html .= ">Kami</option>\r\n\t\t\t\t\t\t\t<option value='c_karavan'";
        if ($cult == "c_karavan") {
            $html .= " selected='selected'";
        }
        $html .= ">Karavan</option>\r\n\t\t\t\t\t\t</select>\r\n\t\t\t\t\t</td>";
    }
    if ($cat->isAllowedCiv()) {
        $html .= "<td>\r\n\t\t\t\t\t\t<select name='civ' onchange='document.getElementById(\"cc_form\").submit();'>\r\n\t\t\t\t\t\t\t<option value='c_neutral'";
        if ($civ == "c_neutral") {
            $html .= " selected='selected'";
        }
        $html .= ">" . get_translation('ach_c_neutral', $_USER->getLang()) . "</option>\r\n\t\t\t\t\t\t\t<option value='c_fyros'";
        if ($civ == "c_fyros") {
            $html .= " selected='selected'";
        }
        $html .= ">Fyros</option>\r\n\t\t\t\t\t\t\t<option value='c_matis'";
        if ($civ == "c_matis") {
            $html .= " selected='selected'";
        }
        $html .= ">Matis</option>\r\n\t\t\t\t\t\t\t<option value='c_tryker'";
        if ($civ == "c_tryker") {
            $html .= " selected='selected'";
        }
        $html .= ">Tryker</option>\r\n\t\t\t\t\t\t\t<option value='c_zorai'";
        if ($civ == "c_zorai") {
            $html .= " selected='selected'";
        }
        $html .= ">Zorai</option>\r\n\t\t\t\t\t\t</select>\r\n\t\t\t\t\t</td>";
    }
    $html .= "</tr>\r\n\t\t\t</table>\r\n\t\t</form></div>\r\n\t\t\r\n\t\t<div style='display:block;font-weight:bold;font-size:20px;color:#FFFFFF;text-align:center;margin-bottom:5px;'>";
    /*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>"));
    		}
    		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>"));
    		}*/
    if (($cult == "c_neutral" || !$cat->isAllowedCult()) && ($civ == "c_neutral" || !$cat->isAllowedCiv())) {
        // 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>"));
    } else {
        //other
        #While being aligned with the
        $html .= get_translation('ach_allegiance_start', $_USER->getLang());
        if ($cat->isAllowedCult() && $cult != "c_neutral") {
            #CULT
            $html .= "<span class='o'>" . ach_translate_cc($cult) . "</span>";
            if ($cat->isAllowedCiv() && $civ != "c_neutral") {
                #and the CIV
                $html .= get_translation('ach_allegiance_and', $_USER->getLang()) . " <span class='o'>" . ach_translate_cc($civ) . "</span>";
            }
        } elseif ($cat->isAllowedCiv() && $civ != "c_neutral") {
            #CIV
            $html .= "<span class='o'>" . ach_translate_cc($civ) . "</span>";
        }
    }
    #, accomplish the following achievements:
    $html .= get_translation('ach_allegiance_end', $_USER->getLang()) . "</div>";
    return $html;
}
Пример #2
0
function ach_render_tiebar($cult = "c_neutral", $civ = "c_neutral", &$cat)
{
    global $_USER;
    $html = "<form method='post' action='?cat=" . $cat->getID() . "'>\r\n\t\t\t<table>\r\n\t\t\t\t<tr>";
    if ($cat->isAllowedCult()) {
        $html .= "<td>\r\n\t\t\t\t\t\t<select name='cult'>\r\n\t\t\t\t\t\t\t<option value='c_neutral'";
        if ($cult == "c_neutral") {
            $html .= " selected='selected'";
        }
        $html .= ">" . get_translation('ach_c_neutral', $_USER->getLang()) . "</option>\r\n\t\t\t\t\t\t\t<option value='c_kami'";
        if ($cult == "c_kami") {
            $html .= " selected='selected'";
        }
        $html .= ">Kami</option>\r\n\t\t\t\t\t\t\t<option value='c_karavan'";
        if ($cult == "c_karavan") {
            $html .= " selected='selected'";
        }
        $html .= ">Karavan</option>\r\n\t\t\t\t\t\t</select>\r\n\t\t\t\t\t</td>";
    }
    if ($cat->isAllowedCiv()) {
        $html .= "<td>\r\n\t\t\t\t\t\t<select name='civ'>\r\n\t\t\t\t\t\t\t<option value='c_neutral'";
        if ($civ == "c_neutral") {
            $html .= " selected='selected'";
        }
        $html .= ">" . get_translation('ach_c_neutral', $_USER->getLang()) . "</option>\r\n\t\t\t\t\t\t\t<option value='c_fyros'";
        if ($civ == "c_fyros") {
            $html .= " selected='selected'";
        }
        $html .= ">Fyros</option>\r\n\t\t\t\t\t\t\t<option value='c_matis'";
        if ($civ == "c_matis") {
            $html .= " selected='selected'";
        }
        $html .= ">Matis</option>\r\n\t\t\t\t\t\t\t<option value='c_tryker'";
        if ($civ == "c_tryker") {
            $html .= " selected='selected'";
        }
        $html .= ">Tryker</option>\r\n\t\t\t\t\t\t\t<option value='c_zorai'";
        if ($civ == "c_zorai") {
            $html .= " selected='selected'";
        }
        $html .= ">Zorai</option>\r\n\t\t\t\t\t\t</select>\r\n\t\t\t\t\t</td>";
    }
    $html .= "<td><input type='submit' value='show' /></td></tr><tr><td>&nbsp;</td></tr>\r\n\t\t\t</table>\r\n\t\t</form>\r\n\t\t\r\n\t\t<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("<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("<font color='orange'>".get_translation('ach_c_neutral',$_USER->getLang())."</font>"));
    		}*/
    if (($cult == "c_neutral" || !$cat->isAllowedCult()) && ($civ == "c_neutral" || !$cat->isAllowedCiv())) {
        // neutral / neutral
        #While being of neutral allegiance
        $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->isAllowedCult() && $cult != "c_neutral") {
            #CULT
            $html .= "<font color='orange'>" . ach_translate_cc($cult) . "</font>";
            if ($cat->isAllowedCiv() && $civ != "c_neutral") {
                #and the CIV
                $html .= get_translation('ach_allegiance_and', $_USER->getLang()) . " <font color='orange'>" . ach_translate_cc($civ) . "</font>";
            }
        } elseif ($cat->isAllowedCiv() && $civ != "c_neutral") {
            #CIV
            $html .= "<font color='orange'>" . ach_translate_cc($civ) . "</font>";
        }
    }
    #, accomplish the following achievements:
    $html .= get_translation('ach_allegiance_end', $_USER->getLang()) . "</font><br><br>";
    return $html;
}