Skip to content

Commit

Permalink
Update pokemon.php
Browse files Browse the repository at this point in the history
  • Loading branch information
kamieniarz authored Oct 28, 2023
1 parent fd69ae4 commit 99959e2
Showing 1 changed file with 8 additions and 38 deletions.
46 changes: 8 additions & 38 deletions pages/display/pokemon.php
Original file line number Diff line number Diff line change
Expand Up @@ -479,52 +479,23 @@ class="list-group-item d-flex justify-content-between align-items-center">
</span>
</li>
<?php }
if ($row['size'] == $row['max_size']) {
if ($row['size'] <> '-1') {
?>
<li
class="list-group-item d-flex justify-content-between align-items-center">
<?php echo i8ln("SIZE"); ?>
<span class="badge badge-primary badge-pill">
<?php
if ($row['size'] == '1') { echo i8ln("XXS"); }
if ($row['size'] == '2') { echo i8ln("XS"); }
if ($row['size'] == '3') { echo i8ln("M"); }
if ($row['size'] == '4') { echo i8ln("XL"); }
if ($row['size'] == '5') { echo i8ln("XXL"); }
$size_name=get_size_name($row['size']);
echo $size_name;
if ( $row['max_size'] <> $row['size'] )
{
$max_size_name=get_size_name($row['max_size']);
echo "-".$max_size_name;
}
?>
</span>
</li>
<?php } else
if ($row['max_size'] > $row['size'] && $row['size'] != -1) {
?>
<li
class="list-group-item d-flex justify-content-between align-items-center">
<?php echo i8ln("SIZE"); ?>
<span class="badge badge-primary badge-pill">
<?php
$size_mapping = [
'1' => i8ln("XXS"),
'2' => i8ln("XS"),
'3' => i8ln("M"),
'4' => i8ln("XL"),
'5' => i8ln("XXL")
];
$display_size = isset($size_mapping[$row['size']]) ? $size_mapping[$row['size']] : $row['size'];
$display_max_size = isset($size_mapping[$row['max_size']]) ? $size_mapping[$row['max_size']] : $row['max_size'];
echo $display_size . '-' . $display_max_size;
?>
</span>
</li>
<?php } else
if ($row['max_size'] < $row['size']) {
?>
<li
class="list-group-item d-flex justify-content-between align-items-center">
<?php echo i8ln("SIZE"); ?>
<span class="badge badge-primary badge-pill">
<?php echo i8ln("ERROR"); ?>
</span>
</li>
<?php }

if ($row['ping'] <> '') {
Expand Down Expand Up @@ -631,4 +602,3 @@ class="badge badge-pill badge-info w-100"><?php echo i8ln("Cleaning Activated");
<?php
} // End of Mons Disable
?>

0 comments on commit 99959e2

Please sign in to comment.