| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706 |
- <?php
- /**
- * HTML helper file.
- *
- * Provides a helper to perform HTML operations.
- *
- * @category Helper.
- */
- /**
- * Require dependent files if not present.
- */
- require_once(PATH::HELPER . "Helper.php");
- require_once(PATH::ENTITY . "Unit.php");
- require_once(PATH::ENTITY . "K_Unit.php");
- require_once(PATH::ENTITY . "Building.php");
- require_once(PATH::ENTITY . "K_Building.php");
- require_once(PATH::ENTITY . "Decoration.php");
- require_once(PATH::ENTITY . "K_Decoration.php");
- require_once(PATH::ENTITY . "Rune.php");
- require_once(PATH::ENTITY . "Artifact.php");
- require_once(PATH::ENTITY . "Enchantment.php");
- require_once(PATH::ENTITY . "Inventory.php");
- /**
- * HTML helper.
- *
- * Contains utilities to parse and format HTML and to build elements.
- *
- * @category Helper.
- */
- final class HTML extends Helper{
- /**
- * Escapes HTML characters
- *
- * Alias for htmlspecialchars([input], ENT_QUOTES)
- *
- * @param string $input Text to escape.
- * @return string Escaped text.
- */
- public static function e($input){
- return htmlspecialchars($input, ENT_QUOTES);
- }
- /**
- * Generates a unit panel.
- *
- * @param Unit|K_Unit Entity to get the info from.
- * @return string HTML content for a monster panel. Empty on error.
- */
- public static function unit_panel($unit) {
- if ($unit instanceof Unit){
- $k = $unit->unit;
- $stars = $unit->stars;
- $level = true;
- $teams = (sizeof($unit->teams) > 0);
- $lock = $unit->lock;
- $storage = $unit->in_storage;
- $maxed = ($unit->level == 40 && $unit->are_skills_maxed());
- }
- elseif ($unit instanceof K_Unit){
- $k = $unit;
- $stars = $unit->base_stars;
- $level = false;
- $teams = 0;
- $lock = false;
- $storage = false;
- $maxed = false;
- }
- else{
- return "";
- }
- $html = "";
- if ($k->awakens_from == "" && $k->awakens_to == ""){
- // No to, no from
- if ($k->base_stars >= 4){
- // SFV Collab event units, always awakened.
- $star_class = "star_purple";
- }
- elseif($k->archetype == ARCHETYPE_ID::MATERIAL && $k->element == ELEMENT_ID::LIGHT){
- // Rainbowmon, always awakened
- $star_class = "star_purple";
- }
- elseif($k->archetype == ARCHETYPE_ID::MATERIAL && $k->element == ELEMENT_ID::DARK){
- // Devilmon, always unawakened
- $star_class = "star_silver";
- }
- else{
- // Unawakeable monster
- $star_class = "star_silver";
- }
- }
- elseif ($k->awakens_from != ""){
- // Already awakened
- if ($k->base_stars - $k->natural_stars == 1){
- // Normal awaken.
- $star_class ="star_purple";
- }
- else{
- // Second awaken.
- $star_class ="star_red";
- }
- }
- elseif ($k->awakens_to != ""){
- // Awakeable.
- $star_class ="star_gold";
- }
- $html .= "<span class='stars'>\n";
- for ($i = 0; $i < $stars; $i ++){
- $html .= "<img class='star $star_class' src='" . URL::IMG["ICON"] . "star.png'/>\n";
- }
- $html .= "</span>\n";
- $html .= "<img title='" . $unit->title . "' class='monster border_" . $k->element_name . "' src='" . $k->get_image() . "'/>\n";
- if ($level){
- $html .= "<span class='level'>\n";
- $html .= $unit->level . "\n";
- $html .= "</span>\n";
- }
- $html .= "<span class='badges'>\n";
- if ($maxed){
- $html .= "<img title='Maxed unit' src='" . URL::IMG["ICON"] . "maxed.png'>";
- }
- if ($teams > 0){
- $title = $teams . " teams";
- if ($teams == 1){
- $title = "1 team: " . $unit->teams[0]->name;
- }
- $html .= "<img title='$title' src='" . URL::IMG["ICON"] . "team.png'>";
- }
- if ($lock == 1){
- $html .= "<img title='Locked' src='" . URL::IMG["ICON"] . "lock.png'>";
- }
- if ($storage){
- $html .= "<img title='In storage' src='" . URL::IMG["ICON"] . "storage.png'>";
- }
- $html .= "</span>\n";
- return $html;
- }
- /**
- * Generates a transformed monster panel.
- *
- * @param Unit|K_Unit Entity to get the info from.
- * @return string HTML content for a monster panel. Empty on error.
- */
- public static function unit_transformation_panel($unit) {
- $html = "";
- if ($unit instanceof Unit){
- $k = $unit->unit;
- }
- elseif ($unit instanceof K_Unit){
- $k = $unit;
- }
- else{
- return "";
- }
- if ($k->transformation == null){
- return "";
- }
- $html .= "<div class='monster_transformation_panel'>\n";
- $html .= "<img title='" . $unit->title . " (transformed)' class='monster_transformation border_" . $k->element_name . "' src='" . $k->transformation->get_image() . "'/>\n";
- $html .= "</div>\n";
- return $html;
- }
- /**
- * Generates a rune panel.
- *
- * @param Rune rune Entity to get the info from.
- * @param Unit unit Optional. The unit the rune is assigned to.
- * @return string HTML content for a rune panel. Empty on error.
- */
- public static function rune_panel($rune, $unit = null) {
- if (!($rune instanceof Rune)){
- return "";
- }
- $html = "";
- $html .= "<div class='rune_panel rune_slot_" . $rune->slot . " rune_level_" . $rune->level . " rune_quality_" . strtolower($rune->quality_name) . " rune_original_quality_" . strtolower($rune->original_quality_name) . " rune_ancient_" . $rune->ancient . "'>\n";
- $html .= "<img class='rune_base' src='" . URL::IMG["RUNE"] . "base.png'/>\n";
- $html .= "<img class='rune_icon' src='" . $rune->type->get_image() . "'/>\n";
- $html .= "<span class='rune_stars'>\n";
- $star_color = "gold";
- if ($rune->level == 15){
- $star_color = "purple";
- }
- for ($i = 0; $i < $rune->stars; $i ++){
- $html .= "<img class='star star_$star_color' src='" . URL::IMG["ICON"] . "star.png'/>\n";
- }
- $html .= "</span>\n";
- $html .= "<span class='rune_level'>\n";
- $html .= $rune->level . "\n";
- $html .= "</span>\n";
- $html .= "</div>\n";
- if ($unit instanceof Unit){
- $html .= "<div class='assigned'>\n";
- $html .= "<a target='blank' href='/monsters/" . $unit->id . "'>\n";
- $html .= "<img title='" . $unit->title . "' class='monster_image border_" . $unit->unit->element_name . "' src='" . $unit->unit->get_image() . "'/>\n";
- $html .= "</a>\n";
- $html .= "</div>\n";
- }
- return $html;
- }
- /**
- * Generates a rune table.
- *
- * @param Rune rune Entity to get the info from.
- * @param Unit unit Optional. The unit the rune is assigned to.
- * @return string HTML content for a rune table. Empty on error.
- */
- public static function rune_table($rune, $unit = null) {
- if (!($rune instanceof Rune)){
- return "";
- }
- $html = "";
- $html .= "<table class='rune' id='rune-" . $rune->id . "'>\n";
- $html .= "<tr>\n";
- $html .= "<td class='icon'>\n";
- $html .= HTML::rune_panel($rune, $unit) . "\n";
- $html .= "</td>\n";
- $html .= "<td class='stats'>\n";
- $html .= "<table>\n";
- // Main stat
- $html .= "<tr class='main_stat'>\n";
- $html .= "<td class='stat'>\n";
- if (in_array($rune->main_stat->stat_name, array("CRR", "CRD", "RES", "ACC", "HP%", "ATK%", "DEF%"))){
- $stat_name = str_replace("%", "", $rune->main_stat->stat_name);
- $stat_value = "+" . $rune->main_stat->value . "%";
- }
- else{
- $stat_name = $rune->main_stat->stat_name;
- $stat_value = "+" . $rune->main_stat->value. " ";
- }
- $html .= $stat_name . "\n";
- $html .= "</td>\n";
- $html .= "<td class='value'>\n";
- $html .= $stat_value . "\n";
- $html .= "</td>\n";
- $html .= "<td class='grind'>\n";
- $html .= "</td>\n";
- $html .= "<td class='enchant'>\n";
- $html .= "</td>\n";
- $html .= "</tr>\n";
- // Innate stat
- $html .= "<tr class='innate_stat'>\n";
- $html .= "<td class='stat'>\n";
- if ($rune->innate_stat == null){
- $stat_name = " ";
- $stat_value = "";
- }
- elseif (in_array($rune->innate_stat->stat_name, array("CRR", "CRD", "RES", "ACC", "HP%", "ATK%", "DEF%"))){
- $stat_name = str_replace("%", "", $rune->innate_stat->stat_name);
- $stat_value = "+" . $rune->innate_stat->value . "%";
- }
- else{
- $stat_name = $rune->innate_stat->stat_name;
- $stat_value = "+" . $rune->innate_stat->value. " ";
- }
- $html .= $stat_name . "\n";
- $html .= "</td>\n";
- $html .= "<td class='value'>\n";
- $html .= $stat_value . "\n";
- $html .= "</td>\n";
- $html .= "<td class='grind'>\n";
- $html .= "</td>\n";
- $html .= "</tr>\n";
- for ($i = 0; $i < 4; $i ++){
- if ($rune->substats[$i] == null){
- $stat_name = " ";
- $stat_value = "";
- }
- elseif (in_array($rune->substats[$i]->stat_name, array("CRR", "CRD", "RES", "ACC", "HP%", "ATK%", "DEF%"))){
- $stat_name = str_replace("%", "", $rune->substats[$i]->stat_name);
- $stat_value = "+" . $rune->substats[$i]->value . "%";
- }
- else{
- $stat_name = $rune->substats[$i]->stat_name;
- $stat_value = "+" . $rune->substats[$i]->value. " ";
- }
- $grind = "";
- if ($rune->substats[$i] != null && $rune->substats[$i]->grind > 0){
- $grind = "+" . $rune->substats[$i]->grind;
- if (in_array($rune->substats[$i]->stat_name, array("CRR", "CRD", "RES", "ACC", "HP%", "ATK%", "DEF%"))){
- $grind = $grind . "%";
- }
- }
- $html .= "<tr class=substat>\n";
- $html .= "<td class='stat'>\n";
- $html .= $stat_name . "\n";
- $html .= "</td>\n";
- $html .= "<td class='value'>\n";
- $html .= $stat_value . "\n";
- $html .= "<td class='grind grind_$grind'>\n";
- $html .= $grind . "\n";
- if ($rune->substats[$i] != null && $rune->substats[$i]->enchant == 1){
- $html .= "<img title='Enchanted' src='" . URL::IMG["RUNE"] . "enchanted.png'/>\n";
- }
- $html .= "</td>\n";
- $html .= "</tr>\n";
- }
- $html .= "</table>\n";
- $html .= "</td>\n";
- // Details
- $html .= "<td class='details'>\n";
- $html .= "<table class='table_details'>\n";
- $html .= "<tr>\n";
- $html .= "<td class='title'>\n";
- $html .= "QY.:\n";
- $html .= "</td>\n";
- $html .= "<td class='value'>\n";
- $html .= "<span class='quality quality_" . strtolower($rune->quality_name) . "'>\n";
- $html .= $rune->quality_name . "\n";
- $html .= "</span>\n";
- $html .= "</td>\n";
- $html .= "</tr>\n";
- $html .= "<tr>\n";
- $html .= "<td class='title'>\n";
- $html .= "O.QY.:\n";
- $html .= "</td>\n";
- $html .= "<td class='value'>\n";
- $html .= "<span class='quality quality_" . strtolower($rune->original_quality_name) . "'>\n";
- $html .= $rune->original_quality_name . "\n";
- $html .= "</span>\n";
- $html .= "</td>\n";
- $html .= "</tr>\n";
- $html .= "<tr>\n";
- $html .= "<td class='title'>\n";
- $html .= "Value:\n";
- $html .= "</td>\n";
- $html .= "<td class='value'>\n";
- $html .= number_format($rune->value, 0, ".", ",") . "\n";
- $html .= "</td>\n";
- $html .= "</tr>\n";
- $html .= "<tr>\n";
- $html .= "<td class='title'>\n";
- $html .= "EFF.:\n";
- $html .= "</td>\n";
- $html .= "<td class='value'>\n";
- $html .= number_format($rune->efficiency, 2, ".", ",") . "%\n";
- $html .= "</td>\n";
- $html .= "</tr>\n";
- $html .= "<tr>\n";
- $html .= "<td class='title'>\n";
- $html .= "MX.E.:\n";
- $html .= "</td>\n";
- $html .= "<td class='value'>\n";
- $html .= number_format($rune->max_efficiency, 2, ".", ",") . "%\n";
- $html .= "</td>\n";
- $html .= "</tr>\n";
- $html .= "</table>\n";
- $html .= "</td>\n";
- $html .= "</tr>\n";
- $html .= "</table>\n";
- return $html;
- }
- // TODO: Icon and background selection must go in the entity code.
- /**
- * Generates an artifact panel.
- *
- * @param Artifact artifact Entity to get the info from.
- * @param Unit unit Optional. The unit the artifact is assigned to.
- * @return string HTML content for an artifact panel. Empty on error.
- */
- public static function artifact_panel($artifact, $unit = null) {
- if (!($artifact instanceof Artifact)){
- return "";
- }
- $html = "";
- $html .= "<div class='artifact_panel artifact_level_" . $artifact->level . " artifact_quality_" . strtolower($artifact->quality_name) . " artifact_original_quality_" . strtolower($artifact->original_quality_name) . " '>\n";
- $background = "";
- $icon = "";
- if ($artifact->type == ARTIFACT_TYPE::ARCHETYPE){
- $background = URL::IMG["ARTIFACT"] . "type_" . strtolower($artifact->quality_name) . ".png";
- $icon = URL::IMG["ARTIFACT"] . "type_";
- switch ($artifact->type){
- case ARCHETYPE_ID::ATTACK:
- $icon .= "attack";
- break;
- case ARCHETYPE_ID::DEFENSE:
- $icon .= "defense";
- break;
- case ARCHETYPE_ID::HP:
- $icon .= "hp";
- break;
- case ARCHETYPE_ID::SUPPORT:
- $icon .= "support";
- break;
- }
- $icon .= ".png";
- }
- else{
- $background = URL::IMG["ARTIFACT"] . "element_" . strtolower($artifact->quality_name) . ".png";
- $icon = URL::IMG["ARTIFACT"] . "element_";
- switch ($artifact->element){
- case ELEMENT_ID::WATER:
- $icon .= "water";
- break;
- case ELEMENT_ID::WIND:
- $icon .= "wind";
- break;
- case ELEMENT_ID::FIRE:
- $icon .= "fire";
- break;
- case ELEMENT_ID::LIGHT:
- $icon .= "light";
- break;
- case ELEMENT_ID::DARK:
- $icon .= "dark";
- break;
- }
- $icon .= ".png";
- }
- $html .= "<img class='artifact_base' src='" . $background . "'/>\n";
- $html .= "<img class='artifact_icon' src='" . $icon . "'/>\n";
- $html .= "<span class='artifact_stars'>\n";
- $html .= "</span>\n";
- $html .= "<span class='artifact_level'>\n";
- $html .= $artifact->level . "\n";
- $html .= "</span>\n";
- $html .= "</div>\n";
- if ($unit instanceof Unit){
- $html .= "<div class='assigned'>\n";
- $html .= "<a target='blank' href='/monsters/" . $unit->id . "'>\n";
- $html .= "<img title='" . $unit->title . "' class='monster_image border_" . $unit->unit->element_name . "' src='" . $unit->unit->get_image() . "'/>\n";
- $html .= "</a>\n";
- $html .= "</div>\n";
- }
- return $html;
- }
- /**
- * Generates a artifact table.
- *
- * @param Artifact artifact Entity to get the info from.
- * @param Unit unit Optional. The unit the artifact is assigned to.
- * @return string HTML content for a artifact table. Empty on error.
- */
- public static function artifact_table($artifact, $unit = null) {
- if (!($artifact instanceof Artifact)){
- return "";
- }
- $html = "";
- $html .= "<table class='artifact' id='artifact-" . $artifact->id . "'>\n";
- $html .= "<tr>\n";
- $html .= "<td class='icon'>\n";
- $html .= HTML::artifact_panel($artifact, $unit) . "\n";
- $html .= "</td>\n";
- $html .= "<td class='effects'>\n";
- $html .= "<table>\n";
- // Main stat
- $html .= "<tr class='effect main_stat'>\n";
- $html .= "<td class='effect'>\n";
- $stat_name = $artifact->stat->name;
- $stat_value = "+" . $artifact->stat->value;
- $html .= $stat_name . "\n";
- $html .= $stat_value . "\n";
- $html .= "</td>\n";
- $html .= "</tr>\n";
- //$effects = array($artifact->effect_1_description, $artifact->effect_2_description, $artifact->effect_3_description, $artifact->effect_4_description);
- for ($i = 0; $i < 4; $i ++){
- $html .= "<tr class='effect'>\n";
- $html .= "<td class='effect'>\n";
- if (count($artifact->effects) <= $i){
- $name = " ";
- }
- else{
- $name = $artifact->effects[$i]->name;
- $name = str_replace("Increasing", "Inc.", $name);
- $name = str_replace("Decrease", "Dec.", $name);
- $name = str_replace("Critical", "Crit.", $name);
- $name = str_replace("Received ", "", $name);
- $name = str_replace("Damage", "Dmg.", $name);
- $name = str_replace("Additional", "Addl.", $name);
- $name = str_replace("Proportional", "Rel.", $name);
- $name = str_replace("Counterattack", "Counter", $name);
- $name = str_replace("Dealt by Attacking Together", "Attacking Together", $name);
- $name = str_replace("HP condition is bad", "bad HP", $name);
- $name = str_replace("HP condition is good", "good HP", $name);
- }
- $html .= $name;
- $html .= "</td>\n";
- $html .= "</tr>\n";
- }
- $html .= "</table>\n";
- $html .= "</td>\n";
- $html .= "</tr>\n";
- $html .= "</table>\n";
- return $html;
- }
- /**
- * Generates a grindstone or gem panel.
- *
- * @param Enchantment Entity to get the info from.
- * @return string HTML content for a rune panel. Empty on error.
- */
- public static function enchantment_panel($enchantment) {
- if (!($enchantment instanceof Enchantment)){
- return "";
- }
- $html = "";
- if ($enchantment->gem == 1){
- if ($enchantment->inmemorial == 1){
- $base = URL::IMG["GRIND"] . "gem_inmemorial.png";
- }
- else{
- $base = URL::IMG["GRIND"] . "gem.png";
- }
- }
- else{
- if ($enchantment->inmemorial == 1){
- $base = URL::IMG["GRIND"] . "grind_inmemorial.png";
- }
- else{
- $base = URL::IMG["GRIND"] . "grind.png";
- }
- }
- if ($enchantment->inmemorial == 0 && isset($enchantment->rune)){
- $icon = "<img class='enchantment_icon' src='" . $enchantment->rune->get_image() . "'/>\n";
- }
- else{
- $icon = "";
- }
- if (in_array($enchantment->stat_name, array("CRR", "CRD", "RES", "ACC", "HP%", "ATK%", "DEF%"))){
- $stat_name = str_replace("%", "", $enchantment->stat_name);
- $stat_value = "+" . $enchantment->min . "~" . $enchantment->max . "%";
- }
- else{
- $stat_name = $enchantment->stat_name;
- $stat_value = "+" . $enchantment->min . "~" . $enchantment->max;
- }
- $html .= "<div class='enchantment_panel enchantment_quality_" . strtolower($enchantment->quality_name) . " enchantment_ancient_" . $enchantment->ancient . "'>\n";
- $html .= "<img class='enchantment_base' src='" . $base . "'/>\n";
- $html .= $icon;
- $html .= "<span class='enchantment_stat'>\n";
- $html .= "<span class='enchantment_stat->stat_name'>" . $stat_name . "</span>\n";
- $html .= "<span class='enchantment_stat->value'>" . $stat_value . "</span>\n";
- $html .= "</span>\n";
- if ($enchantment->amount > 0){
- $html .= "<span class='enchantment_amount'>\n";
- $html .= "x" . $enchantment->amount . "\n";
- $html .= "</span>\n";
- }
- $html .= "</div>\n";
- return $html;
- }
- /**
- * Generates a building panel.
- *
- * @param Building|Decoration|K_Building|K_Decoration $building Entity to get the info from.
- * @return string HTML content for a building panel. Empty on error.
- */
- public static function building_panel($building) {
- if ($building instanceof Building){
- $level = false;
- $title = $building->building->name;
- $description = $building->building->description;
- $img = $building->building->get_image();
- }
- elseif ($building instanceof K_Building){
- $level = false;
- $title = $building->name;
- $description = $building->building->description;
- $img = $building->get_image();
- }
- elseif ($building instanceof Decoration){
- $level = $building->level;
- $title = $building->decoration->name;
- $description = $building->decoration->description;
- $img = $building->decoration->get_image();
- }
- elseif ($building instanceof K_Decoration){
- $level = false;
- $title = $building->name;
- $description = $building->building->description;
- $img = $building->get_image();
- }
- else{
- return "";
- }
- if (strlen($description) > 0){
- $title .= ": " . $description;
- }
- $html = "<div class='building_panel'>\n";
- $html .= "<img title='" . $title . "' class='building' src='" . $img . "'/>\n";
- if ($level){
- $html .= "<span class='level'>\n";
- $html .= $level . "\n";
- $html .= "</span>\n";
- }
- $html .= "</div>\n";
- return $html;
- }
- /**
- * Generates a item panel.
- *
- * @param Inventory $item Entity to get the info from.
- * @return string HTML content for an item panel. Empty on error.
- */
- public static function item_panel($item) {
- if (!($item instanceof Inventory)){
- return "";
- }
- $html = "<div class='item_panel'>\n";
- $html .= "<img title='" . $item->name . "' class='item' src='" . $item->get_image() . "'/>\n";
- $html .= "<span class='amount'>\n";
- $html .= $item->amount . "\n";
- $html .= "</span>\n";
- $html .= "</div>\n";
- return $html;
- }
- /**
- * Generates a source panel.
- *
- * @param Inventory $source Entity to get the info from.
- * @return string HTML content for a source panel. Empty on error.
- */
- public static function source_panel($source) {
- //if (!($item instanceof K_Source)){
- // return "";
- //}
- $html = "<div class='source_panel'>\n";
- $html .= "<img title='" . $source->name . "' class='item' src='" . $source->get_image() . "'/>\n";
- $html .= "</div>\n";
- return $html;
- }
- /**
- * Generates an arena rank icon image.
- *
- * @param int $d Arena rank id.
- * @return string HTML content for the image.
- */
- public static function arena_rank_icon($id) {
- switch ($id){
- case ARENA_RANK_ID::BEGINER:
- $src = URL::IMG["RANK"] . "0901.png";
- $tit = "Beginer";
- break;
- case ARENA_RANK_ID::CHALLENGER_1:
- $src = URL::IMG["RANK"] . "1001.png";
- $tit = "Challenger 1";
- break;
- case ARENA_RANK_ID::CHALLENGER_2:
- $src = URL::IMG["RANK"] . "1002.png";
- $tit = "Challenger 2";
- break;
- case ARENA_RANK_ID::CHALLENGER_3:
- $src = URL::IMG["RANK"] . "1003.png";
- $tit = "Challenger 3";
- break;
- case ARENA_RANK_ID::FIGHTER_1:
- $src = URL::IMG["RANK"] . "2001.png";
- $tit = "Fighter 1";
- break;
- case ARENA_RANK_ID::FIGHTER_2:
- $src = URL::IMG["RANK"] . "2002.png";
- $tit = "Fighter 2";
- break;
- case ARENA_RANK_ID::FIGHTER_3:
- $src = URL::IMG["RANK"] . "2003.png";
- $tit = "Fighter 3";
- break;
- case ARENA_RANK_ID::CONQUEROR_1:
- $src = URL::IMG["RANK"] . "3001.png";
- $tit = "Conqueror 1";
- break;
- case ARENA_RANK_ID::CONQUEROR_2:
- $src = URL::IMG["RANK"] . "3002.png";
- $tit = "Conqueror 2";
- break;
- case ARENA_RANK_ID::CONQUEROR_3:
- $src = URL::IMG["RANK"] . "3003.png";
- $tit = "Conqueror 3";
- break;
- case ARENA_RANK_ID::GUARDIAN_1:
- $src = URL::IMG["RANK"] . "4001.png";
- $tit = "Guardian 1";
- break;
- case ARENA_RANK_ID::GUARDIAN_2:
- $src = URL::IMG["RANK"] . "4002.png";
- $tit = "Guardian 2";
- break;
- case ARENA_RANK_ID::GUARDIAN_3:
- $src = URL::IMG["RANK"] . "4003.png";
- $tit = "Guardian 3";
- break;
- case ARENA_RANK_ID::LEGEND:
- $src = URL::IMG["RANK"] . "5001.png";
- $tit = "Legend";
- default:
- $src = URL::IMG["RANK"] . $id . ".png";
- }
- $html = "<img alt='$tit' title='$tit' src='$src'/>";
- return $html;
- }
- }
- ?>
|