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"> > -
+
+   

-
+
+ @@ -458,6 +459,41 @@ class="form-control text-center"> >
+
+
+
+
+
+
+
+
+ -1 && $row['max_size'] == 5) { $checked5 = 'checked'; } else { $checked5 = ''; } + ?> + + + + + + +

diff --git a/pages/add/pokemon.php b/pages/add/pokemon.php index 3fad1ef..1fd3aa4 100644 --- a/pages/add/pokemon.php +++ b/pages/add/pokemon.php @@ -322,14 +322,24 @@ class="form-control text-center">
- + + +
+ +
+
+ +
+
-
+
+ + + + +
+
+
+ +
+
+
+
+
+
+
+
+ + +
+
+
diff --git a/pages/display/pokemon.php b/pages/display/pokemon.php index b6b7aab..7cf44e3 100644 --- a/pages/display/pokemon.php +++ b/pages/display/pokemon.php @@ -486,11 +486,13 @@ class="list-group-item d-flex justify-content-between align-items-center"> $row['size'] ) + { + $max_size_name=get_size_name($row['max_size']); + echo "-".$max_size_name; + } ?> @@ -600,4 +602,3 @@ class="badge badge-pill badge-info w-100"> -