diff --git a/actions/monsters.php b/actions/monsters.php index 801d78c..ee7e27c 100644 --- a/actions/monsters.php +++ b/actions/monsters.php @@ -52,7 +52,10 @@ } if (substr($value, 0,5) === "size_") { $size = ltrim($value, 'size_'); - if ( $size == -1 ) { $max_size = 5; } else { $max_size = $size;} + if ( $size == -1 ) { $max_size = 5; } + } + if (substr($value, 0,9) === "max_size_") { + $max_size = ltrim($value, 'max_size'); } if (substr($value, 0, 4) == "cap_") { $cap = ltrim($value, 'cap_'); @@ -174,7 +177,10 @@ } if (substr($value, 0,5) === "size_") { $size = ltrim($value, 'size_'); - if ( $size == -1 ) { $max_size = 5; } else { $max_size = $size;} + if ( $size == -1 ) { $max_size = 5; } + } + if (substr($value, 0,9) === "max_size_") { + $max_size = ltrim($value, 'max_size'); } if (substr($value, 0, 4) === "cap_") { $cap = ltrim($value, 'cap_'); diff --git a/include/functions.php b/include/functions.php index 58a4226..f44d99c 100644 --- a/include/functions.php +++ b/include/functions.php @@ -319,6 +319,18 @@ function get_lure_name($id) { } +function get_size_name($id) { + + if ($id == '1') { $size_name = "XXS"; } + else if ($id == '2') { $size_name = "XS"; } + else if ($id == '3') { $size_name = "M"; } + else if ($id == '4') { $size_name = "XL"; } + else if ($id == '5') { $size_name = "XXL"; } + + return $size_name; + +} + function get_gym_name($id) { if ( $id == "0") { @@ -560,4 +572,3 @@ function default_distance($table) { return $default_distance; } - diff --git a/modal/edit_pokemons_modal.php b/modal/edit_pokemons_modal.php index a43d4e5..5b5c194 100644 --- a/modal/edit_pokemons_modal.php +++ b/modal/edit_pokemons_modal.php @@ -424,20 +424,21 @@ class="form-control text-center"> > -