@@ -3,8 +3,8 @@ discard block |
||
| 3 | 3 | // This file only include other files to have only 1 entry in your crontabs. |
| 4 | 4 | // ------------------------------------------------------------------------ |
| 5 | 5 | |
| 6 | -$filePath = dirname(__FILE__); |
|
| 7 | -$config_file = $filePath.'/../../config.php'; |
|
| 6 | +$filePath = dirname(__FILE__); |
|
| 7 | +$config_file = $filePath.'/../../config.php'; |
|
| 8 | 8 | |
| 9 | 9 | include_once($config_file); |
| 10 | 10 | |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | |
| 16 | 16 | |
| 17 | 17 | # MySQL |
| 18 | -$mysqli = new mysqli(SYS_DB_HOST, SYS_DB_USER, SYS_DB_PSWD, SYS_DB_NAME, SYS_DB_PORT); |
|
| 18 | +$mysqli = new mysqli(SYS_DB_HOST, SYS_DB_USER, SYS_DB_PSWD, SYS_DB_NAME, SYS_DB_PORT); |
|
| 19 | 19 | |
| 20 | 20 | if ($mysqli->connect_error != '') { |
| 21 | 21 | die('MySQL connect error'); |
@@ -23,9 +23,9 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | |
| 25 | 25 | |
| 26 | -$gym_file = SYS_PATH.'/core/json/gym.stats.json'; |
|
| 27 | -$pokestop_file = SYS_PATH.'/core/json/pokestop.stats.json'; |
|
| 28 | -$pokemonstats_file = SYS_PATH.'/core/json/pokemon.stats.json'; |
|
| 26 | +$gym_file = SYS_PATH.'/core/json/gym.stats.json'; |
|
| 27 | +$pokestop_file = SYS_PATH.'/core/json/pokestop.stats.json'; |
|
| 28 | +$pokemonstats_file = SYS_PATH.'/core/json/pokemon.stats.json'; |
|
| 29 | 29 | |
| 30 | 30 | |
| 31 | 31 | if (is_file($gym_file)) { |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | $pokedatas = json_decode(file_get_contents($pokemonstats_file), true); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | -$timestamp = time(); |
|
| 41 | +$timestamp = time(); |
|
| 42 | 42 | |
| 43 | 43 | include_once(SYS_PATH.'/core/cron/gym.cron.php'); |
| 44 | 44 | include_once(SYS_PATH.'/core/cron/pokemon.cron.php'); |
@@ -22,11 +22,11 @@ discard block |
||
| 22 | 22 | { |
| 23 | 23 | $lock_msg = ''; |
| 24 | 24 | |
| 25 | - $mysqli = new mysqli(SYS_DB_HOST, SYS_DB_USER, SYS_DB_PSWD, SYS_DB_NAME, SYS_DB_PORT); |
|
| 25 | + $mysqli = new mysqli(SYS_DB_HOST, SYS_DB_USER, SYS_DB_PSWD, SYS_DB_NAME, SYS_DB_PORT); |
|
| 26 | 26 | |
| 27 | 27 | // Pokemon Test |
| 28 | - $req = "SELECT COUNT(*) as total FROM pokemon"; |
|
| 29 | - $result = $mysqli->query($req); |
|
| 28 | + $req = "SELECT COUNT(*) as total FROM pokemon"; |
|
| 29 | + $result = $mysqli->query($req); |
|
| 30 | 30 | |
| 31 | 31 | if (!is_object($result)) { |
| 32 | 32 | $lock_msg .= "Error: No Pokémon database found<br>"; |
@@ -40,8 +40,8 @@ discard block |
||
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | // Gym Test |
| 43 | - $req = "SELECT COUNT(*) as total FROM gym"; |
|
| 44 | - $result = $mysqli->query($req); |
|
| 43 | + $req = "SELECT COUNT(*) as total FROM gym"; |
|
| 44 | + $result = $mysqli->query($req); |
|
| 45 | 45 | |
| 46 | 46 | if (!is_object($result)) { |
| 47 | 47 | $lock_msg .= "Error: No Gym database found<br>"; |
@@ -56,8 +56,8 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | |
| 58 | 58 | // Pokéstop Test |
| 59 | - $req = "SELECT COUNT(*) as total FROM pokestop"; |
|
| 60 | - $result = $mysqli->query($req); |
|
| 59 | + $req = "SELECT COUNT(*) as total FROM pokestop"; |
|
| 60 | + $result = $mysqli->query($req); |
|
| 61 | 61 | |
| 62 | 62 | if (!is_object($result)) { |
| 63 | 63 | $lock_msg .= "Error: No Pokestop database found<br>"; |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | <script type="text/javascript"> |
| 101 | 101 | <?= |
| 102 | 102 | $trainerName = ""; |
| 103 | -if (isset($_GET['name']) && $_GET['name']!="") { |
|
| 103 | +if (isset($_GET['name']) && $_GET['name'] != "") { |
|
| 104 | 104 | $trainerName = htmlentities($_GET['name']); |
| 105 | 105 | } |
| 106 | 106 | |
@@ -10,8 +10,8 @@ discard block |
||
| 10 | 10 | // Include & load the variables |
| 11 | 11 | // ############################ |
| 12 | 12 | |
| 13 | -$variables = SYS_PATH.'/core/json/variables.json'; |
|
| 14 | -$config = json_decode(file_get_contents($variables)); |
|
| 13 | +$variables = SYS_PATH.'/core/json/variables.json'; |
|
| 14 | +$config = json_decode(file_get_contents($variables)); |
|
| 15 | 15 | |
| 16 | 16 | |
| 17 | 17 | // Include & load locales (because it's REALLY REALLY REALLY IMPORTANT TO HAVE A FULLY TRANSLATE DASHBOARD ) |
@@ -24,15 +24,15 @@ discard block |
||
| 24 | 24 | // Check if there's a pokemon stat file |
| 25 | 25 | // #################################### |
| 26 | 26 | |
| 27 | -$stats_file = SYS_PATH.'/core/json/pokemon.stats.json'; |
|
| 28 | -$stats = json_decode(file_get_contents($stats_file)); |
|
| 27 | +$stats_file = SYS_PATH.'/core/json/pokemon.stats.json'; |
|
| 28 | +$stats = json_decode(file_get_contents($stats_file)); |
|
| 29 | 29 | |
| 30 | 30 | |
| 31 | -$now = time(); |
|
| 32 | -$yesterday = $now-86400; |
|
| 33 | -$lastweek = $now-604800; |
|
| 31 | +$now = time(); |
|
| 32 | +$yesterday = $now - 86400; |
|
| 33 | +$lastweek = $now - 604800; |
|
| 34 | 34 | |
| 35 | -$i=0; |
|
| 35 | +$i = 0; |
|
| 36 | 36 | $labels_global = array(); |
| 37 | 37 | $total = array(); |
| 38 | 38 | $labels = array(); |
@@ -59,12 +59,12 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | foreach ($stats as $data) { |
| 61 | 61 | if ($data->timestamp > $lastweek) { |
| 62 | - $labels_global[] = '"'.date('D H:i', $data->timestamp).'"'; |
|
| 63 | - $total[] = $data->pokemon_now; |
|
| 62 | + $labels_global[] = '"'.date('D H:i', $data->timestamp).'"'; |
|
| 63 | + $total[] = $data->pokemon_now; |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | if ($data->timestamp > $yesterday) { |
| 67 | - $labels[] = '"'.date('H:i', $data->timestamp ).'"'; |
|
| 67 | + $labels[] = '"'.date('H:i', $data->timestamp).'"'; |
|
| 68 | 68 | |
| 69 | 69 | if (isset($data->rarity_spawn->{'Very common'})) { |
| 70 | 70 | $veco[] = $data->rarity_spawn->{'Very common'}; |
@@ -93,47 +93,47 @@ discard block |
||
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | |
| 96 | -$stats_file = SYS_PATH.'/core/json/gym.stats.json'; |
|
| 97 | -$stats = json_decode(file_get_contents($stats_file)); |
|
| 96 | +$stats_file = SYS_PATH.'/core/json/gym.stats.json'; |
|
| 97 | +$stats = json_decode(file_get_contents($stats_file)); |
|
| 98 | 98 | |
| 99 | 99 | |
| 100 | 100 | foreach ($stats as $data) { |
| 101 | 101 | if ($data->timestamp > $lastweek) { |
| 102 | - $labels_gym[] = '"'.date('D H:i', $data->timestamp).'"'; |
|
| 102 | + $labels_gym[] = '"'.date('D H:i', $data->timestamp).'"'; |
|
| 103 | 103 | |
| 104 | - $mystic_average[] = $data->team->mystic->average; |
|
| 104 | + $mystic_average[] = $data->team->mystic->average; |
|
| 105 | 105 | $mystic_owned[] = $data->team->mystic->gym_owned; |
| 106 | 106 | |
| 107 | 107 | $valor_average[] = $data->team->valor->average; |
| 108 | - $valor_owned[] = $data->team->valor->gym_owned; |
|
| 108 | + $valor_owned[] = $data->team->valor->gym_owned; |
|
| 109 | 109 | |
| 110 | - $instinct_average[] = $data->team->instinct->average; |
|
| 111 | - $instinct_owned[] = $data->team->instinct->gym_owned; |
|
| 110 | + $instinct_average[] = $data->team->instinct->average; |
|
| 111 | + $instinct_owned[] = $data->team->instinct->gym_owned; |
|
| 112 | 112 | } |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | |
| 116 | -$stats_file = SYS_PATH.'/core/json/pokestop.stats.json'; |
|
| 117 | -$stats = json_decode(file_get_contents($stats_file)); |
|
| 116 | +$stats_file = SYS_PATH.'/core/json/pokestop.stats.json'; |
|
| 117 | +$stats = json_decode(file_get_contents($stats_file)); |
|
| 118 | 118 | |
| 119 | 119 | |
| 120 | 120 | foreach ($stats as $data) { |
| 121 | 121 | if ($data->timestamp > $lastweek) { |
| 122 | - $labels_stops[] = '"'.date('D H:i', $data->timestamp).'"'; |
|
| 123 | - $lure[] = $data->lured; |
|
| 122 | + $labels_stops[] = '"'.date('D H:i', $data->timestamp).'"'; |
|
| 123 | + $lure[] = $data->lured; |
|
| 124 | 124 | } |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | |
| 128 | 128 | if ($config->system->captcha_support) { |
| 129 | - $stats_file = SYS_PATH.'/core/json/captcha.stats.json'; |
|
| 130 | - $stats = json_decode(file_get_contents($stats_file)); |
|
| 129 | + $stats_file = SYS_PATH.'/core/json/captcha.stats.json'; |
|
| 130 | + $stats = json_decode(file_get_contents($stats_file)); |
|
| 131 | 131 | |
| 132 | 132 | |
| 133 | 133 | foreach ($stats as $data) { |
| 134 | 134 | if ($data->timestamp > $lastweek) { |
| 135 | - $labels_captcha[] = '"'.date('D H:i', $data->timestamp).'"'; |
|
| 136 | - $captcha_accs[] = $data->captcha_accs; |
|
| 135 | + $labels_captcha[] = '"'.date('D H:i', $data->timestamp).'"'; |
|
| 136 | + $captcha_accs[] = $data->captcha_accs; |
|
| 137 | 137 | } |
| 138 | 138 | } |
| 139 | 139 | } |
@@ -43,14 +43,14 @@ discard block |
||
| 43 | 43 | $moves_file = json_decode(file_get_contents(SYS_PATH.'/core/json/locales/EN/moves.json')); |
| 44 | 44 | } |
| 45 | 45 | } else { |
| 46 | - $pokemon_file = file_get_contents(SYS_PATH.'/core/json/locales/EN/pokes.json'); |
|
| 47 | - $translation_file = file_get_contents(SYS_PATH.'/core/json/locales/EN/translations.json'); |
|
| 46 | + $pokemon_file = file_get_contents(SYS_PATH.'/core/json/locales/EN/pokes.json'); |
|
| 47 | + $translation_file = file_get_contents(SYS_PATH.'/core/json/locales/EN/translations.json'); |
|
| 48 | 48 | $moves_file = json_decode(file_get_contents(SYS_PATH.'/core/json/locales/EN/moves.json')); |
| 49 | 49 | } |
| 50 | 50 | } else { |
| 51 | 51 | $pokemon_file = file_get_contents(SYS_PATH.'/core/json/locales/EN/pokes.json'); |
| 52 | - $translation_file = file_get_contents(SYS_PATH.'/core/json/locales/EN/translations.json'); |
|
| 53 | - $moves_file = json_decode(file_get_contents(SYS_PATH.'/core/json/locales/EN/moves.json')); |
|
| 52 | + $translation_file = file_get_contents(SYS_PATH.'/core/json/locales/EN/translations.json'); |
|
| 53 | + $moves_file = json_decode(file_get_contents(SYS_PATH.'/core/json/locales/EN/moves.json')); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | |
@@ -60,23 +60,23 @@ discard block |
||
| 60 | 60 | // always overwrite english if available |
| 61 | 61 | ######################################## |
| 62 | 62 | |
| 63 | -$locales = (object) array_replace(json_decode(file_get_contents(SYS_PATH.'/core/json/locales/EN/translations.json'), true), json_decode($translation_file, true)); |
|
| 63 | +$locales = (object) array_replace(json_decode(file_get_contents(SYS_PATH.'/core/json/locales/EN/translations.json'), true), json_decode($translation_file, true)); |
|
| 64 | 64 | |
| 65 | 65 | // Recursive replace because of multi level array |
| 66 | -$pokemon_trans_array = array_replace_recursive(json_decode(file_get_contents(SYS_PATH.'/core/json/locales/EN/pokes.json'), true), json_decode($pokemon_file, true)); |
|
| 66 | +$pokemon_trans_array = array_replace_recursive(json_decode(file_get_contents(SYS_PATH.'/core/json/locales/EN/pokes.json'), true), json_decode($pokemon_file, true)); |
|
| 67 | 67 | |
| 68 | 68 | // convert associative array back to object array (recursive) |
| 69 | -$pokemon_trans = json_decode(json_encode($pokemon_trans_array), false); |
|
| 69 | +$pokemon_trans = json_decode(json_encode($pokemon_trans_array), false); |
|
| 70 | 70 | unset($pokemon_trans_array); |
| 71 | 71 | |
| 72 | 72 | |
| 73 | 73 | // Merge the pokedex, pokemon translation and rarity file into a new array |
| 74 | 74 | ########################################################################## |
| 75 | 75 | |
| 76 | -$pokedex_file = file_get_contents(SYS_PATH.'/core/json/pokedex.json'); |
|
| 77 | -$pokemons = json_decode($pokedex_file); |
|
| 76 | +$pokedex_file = file_get_contents(SYS_PATH.'/core/json/pokedex.json'); |
|
| 77 | +$pokemons = json_decode($pokedex_file); |
|
| 78 | 78 | |
| 79 | -$pokedex_rarity_file = SYS_PATH.'/core/json/pokedex.rarity.json'; |
|
| 79 | +$pokedex_rarity_file = SYS_PATH.'/core/json/pokedex.rarity.json'; |
|
| 80 | 80 | // initial create of pokedex.rarity.json if it doesn't exist |
| 81 | 81 | if (!is_file($pokedex_rarity_file)) { |
| 82 | 82 | include_once(SYS_PATH.'/core/cron/pokedex.rarity.php'); |
@@ -86,14 +86,14 @@ discard block |
||
| 86 | 86 | |
| 87 | 87 | foreach ($pokemons->pokemon as $pokeid => $pokemon) { |
| 88 | 88 | // Merge name and description from translation files |
| 89 | - $pokemon->name = $pokemon_trans->pokemon->$pokeid->name; |
|
| 90 | - $pokemon->description = $pokemon_trans->pokemon->$pokeid->description; |
|
| 89 | + $pokemon->name = $pokemon_trans->pokemon->$pokeid->name; |
|
| 90 | + $pokemon->description = $pokemon_trans->pokemon->$pokeid->description; |
|
| 91 | 91 | |
| 92 | 92 | // Replace quick and charge move with translation |
| 93 | - $quick_move = $pokemon->quick_move; |
|
| 94 | - $pokemon->quick_move = $pokemon_trans->quick_moves->$quick_move; |
|
| 95 | - $charge_move = $pokemon->charge_move; |
|
| 96 | - $pokemon->charge_move = $pokemon_trans->charge_moves->$charge_move; |
|
| 93 | + $quick_move = $pokemon->quick_move; |
|
| 94 | + $pokemon->quick_move = $pokemon_trans->quick_moves->$quick_move; |
|
| 95 | + $charge_move = $pokemon->charge_move; |
|
| 96 | + $pokemon->charge_move = $pokemon_trans->charge_moves->$charge_move; |
|
| 97 | 97 | |
| 98 | 98 | // Replace types with translation |
| 99 | 99 | foreach ($pokemon->types as &$type) { |
@@ -103,8 +103,8 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | // Resolve candy_id to candy_name |
| 105 | 105 | if (isset($pokemon->candy_id)) { |
| 106 | - $candy_id = $pokemon->candy_id; |
|
| 107 | - $pokemon->candy_name = $pokemon_trans->pokemon->$candy_id->name; |
|
| 106 | + $candy_id = $pokemon->candy_id; |
|
| 107 | + $pokemon->candy_name = $pokemon_trans->pokemon->$candy_id->name; |
|
| 108 | 108 | unset($pokemon->candy_id); |
| 109 | 109 | } |
| 110 | 110 | // Convert move numbers to names |
@@ -26,8 +26,8 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | # Polar Graph datas |
| 28 | 28 | |
| 29 | -$pokemon_file = file_get_contents(SYS_PATH.'/core/json/pokedex.json'); |
|
| 30 | -$pokemons = json_decode($pokemon_file); |
|
| 29 | +$pokemon_file = file_get_contents(SYS_PATH.'/core/json/pokedex.json'); |
|
| 30 | +$pokemons = json_decode($pokemon_file); |
|
| 31 | 31 | |
| 32 | 32 | $atk = $pokemons->pokemon->$pokemon_id->atk; |
| 33 | 33 | $def = $pokemons->pokemon->$pokemon_id->def; |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | ?> |
| 38 | 38 | |
| 39 | -var pokemon_id = '<?= (int)$pokemon_id ?>'; |
|
| 39 | +var pokemon_id = '<?= (int) $pokemon_id ?>'; |
|
| 40 | 40 | |
| 41 | 41 | Chart.defaults.global.legend.display = false; |
| 42 | 42 | |
@@ -76,26 +76,26 @@ discard block |
||
| 76 | 76 | if ($pokemon->iv->available) { |
| 77 | 77 | if ($config->system->iv_numbers) { ?> |
| 78 | 78 | <div class="progress" style="height: 15px; margin-bottom: 0"> |
| 79 | - <div title="Attack IV: <?= $pokemon->iv->attack ?>" class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="<?= $pokemon->iv->attack ?>" aria-valuemin="0" aria-valuemax="45" style="width: <?= (100/3) ?>%; line-height: 16px";> |
|
| 79 | + <div title="Attack IV: <?= $pokemon->iv->attack ?>" class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="<?= $pokemon->iv->attack ?>" aria-valuemin="0" aria-valuemax="45" style="width: <?= (100 / 3) ?>%; line-height: 16px";> |
|
| 80 | 80 | <span class="sr-only"><?= $locales->ATTACK ?> IV: <?= $pokemon->iv->attack ?></span><?= $pokemon->iv->attack ?> |
| 81 | 81 | </div> |
| 82 | - <div title="Defense IV: <?= $pokemon->iv->defense ?>" class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="<?= $pokemon->iv->defense ?>" aria-valuemin="0" aria-valuemax="45" style="width: <?= (100/3) ?>%; line-height: 16px";> |
|
| 82 | + <div title="Defense IV: <?= $pokemon->iv->defense ?>" class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="<?= $pokemon->iv->defense ?>" aria-valuemin="0" aria-valuemax="45" style="width: <?= (100 / 3) ?>%; line-height: 16px";> |
|
| 83 | 83 | <span class="sr-only"><?= $locales->DEFENSE ?> IV: <?= $pokemon->iv->defense ?></span><?= $pokemon->iv->defense ?> |
| 84 | 84 | </div> |
| 85 | - <div title="Stamina IV: <?= $pokemon->iv->stamina ?>" class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<?= $pokemon->iv->stamina ?>" aria-valuemin="0" aria-valuemax="45" style="width: <?= (100/3) ?>%; line-height: 16px";> |
|
| 85 | + <div title="Stamina IV: <?= $pokemon->iv->stamina ?>" class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<?= $pokemon->iv->stamina ?>" aria-valuemin="0" aria-valuemax="45" style="width: <?= (100 / 3) ?>%; line-height: 16px";> |
|
| 86 | 86 | <span class="sr-only"><?= $locales->STAMINA ?> IV: <?= $pokemon->iv->stamina ?></span><?= $pokemon->iv->stamina ?> |
| 87 | 87 | </div> |
| 88 | 88 | </div> |
| 89 | 89 | <?php |
| 90 | 90 | } else { ?> |
| 91 | 91 | <div class="progress" style="height: 6px; width: 80%; margin: 5px auto 15px auto;"> |
| 92 | - <div title="Attack IV: <?= $pokemon->iv->attack ?>" class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="<?= $pokemon->iv->attack ?>" aria-valuemin="0" aria-valuemax="45" style="width: <?= ((100/15)*$pokemon->iv->attack)/3 ?>%"> |
|
| 92 | + <div title="Attack IV: <?= $pokemon->iv->attack ?>" class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="<?= $pokemon->iv->attack ?>" aria-valuemin="0" aria-valuemax="45" style="width: <?= ((100 / 15) * $pokemon->iv->attack) / 3 ?>%"> |
|
| 93 | 93 | <span class="sr-only"><?= $locales->ATTACK ?> IV: <?= $pokemon->iv->attack ?></span> |
| 94 | 94 | </div> |
| 95 | - <div title="Defense IV: <?= $pokemon->iv->defense ?>" class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="<?= $pokemon->iv->defense ?>" aria-valuemin="0" aria-valuemax="45" style="width: <?= ((100/15)*$pokemon->iv->defense)/3 ?>%"> |
|
| 95 | + <div title="Defense IV: <?= $pokemon->iv->defense ?>" class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="<?= $pokemon->iv->defense ?>" aria-valuemin="0" aria-valuemax="45" style="width: <?= ((100 / 15) * $pokemon->iv->defense) / 3 ?>%"> |
|
| 96 | 96 | <span class="sr-only"><?= $locales->DEFENSE ?> IV: <?= $pokemon->iv->defense ?></span> |
| 97 | 97 | </div> |
| 98 | - <div title="Stamina IV: <?= $pokemon->iv->stamina ?>" class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<?= $pokemon->iv->stamina ?>" aria-valuemin="0" aria-valuemax="45" style="width: <?= ((100/15)*$pokemon->iv->stamina)/3 ?>%"> |
|
| 98 | + <div title="Stamina IV: <?= $pokemon->iv->stamina ?>" class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<?= $pokemon->iv->stamina ?>" aria-valuemin="0" aria-valuemax="45" style="width: <?= ((100 / 15) * $pokemon->iv->stamina) / 3 ?>%"> |
|
| 99 | 99 | <span class="sr-only"><?= $locales->STAMINA ?> IV: <?= $pokemon->iv->stamina ?></span> |
| 100 | 100 | </div> |
| 101 | 101 | </div> |
@@ -104,13 +104,13 @@ discard block |
||
| 104 | 104 | } else { |
| 105 | 105 | if ($config->system->iv_numbers) { ?> |
| 106 | 106 | <div class="progress" style="height: 15px; margin-bottom: 0"> |
| 107 | - <div title="Attack IV: not available" class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="<?= $pokemon->iv->attack ?>" aria-valuemin="0" aria-valuemax="45" style="width: <?= (100/3) ?>%; line-height: 16px";> |
|
| 107 | + <div title="Attack IV: not available" class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="<?= $pokemon->iv->attack ?>" aria-valuemin="0" aria-valuemax="45" style="width: <?= (100 / 3) ?>%; line-height: 16px";> |
|
| 108 | 108 | <span class="sr-only"><?= $locales->ATTACK ?> IV: <?= $locales->NOT_AVAILABLE ?></span>? |
| 109 | 109 | </div> |
| 110 | - <div title="Defense IV: not available" class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="<?= $pokemon->iv->defense ?>" aria-valuemin="0" aria-valuemax="45" style="width: <?= (100/3) ?>%; line-height: 16px";> |
|
| 110 | + <div title="Defense IV: not available" class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="<?= $pokemon->iv->defense ?>" aria-valuemin="0" aria-valuemax="45" style="width: <?= (100 / 3) ?>%; line-height: 16px";> |
|
| 111 | 111 | <span class="sr-only"><?= $locales->DEFENSE ?> IV: <?= $locales->NOT_AVAILABLE ?></span>? |
| 112 | 112 | </div> |
| 113 | - <div title="Stamina IV: not available" class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<?= $pokemon->iv->stamina ?>" aria-valuemin="0" aria-valuemax="45" style="width: <?= (100/3) ?>%; line-height: 16px";> |
|
| 113 | + <div title="Stamina IV: not available" class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<?= $pokemon->iv->stamina ?>" aria-valuemin="0" aria-valuemax="45" style="width: <?= (100 / 3) ?>%; line-height: 16px";> |
|
| 114 | 114 | <span class="sr-only"><?= $locales->STAMINA ?> IV: <?= $locales->NOT_AVAILABLE ?></span>? |
| 115 | 115 | </div> |
| 116 | 116 | </div> |
@@ -17,9 +17,9 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | <div class="col-sm-1 hidden-xs"> |
| 19 | 19 | |
| 20 | - <?php if ($pokemon->id-1 > 0) { ?> |
|
| 20 | + <?php if ($pokemon->id - 1 > 0) { ?> |
|
| 21 | 21 | |
| 22 | - <p class="nav-links"><a href="pokemon/<?= $pokemon->id-1 ?>"><i class="fa fa-chevron-left"></i></a></p> |
|
| 22 | + <p class="nav-links"><a href="pokemon/<?= $pokemon->id - 1 ?>"><i class="fa fa-chevron-left"></i></a></p> |
|
| 23 | 23 | |
| 24 | 24 | <?php }?> |
| 25 | 25 | |
@@ -41,9 +41,9 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | <div class="col-sm-1 hidden-xs"> |
| 43 | 43 | |
| 44 | - <?php if ($pokemon->id+1 < $config->system->max_pokemon) { ?> |
|
| 44 | + <?php if ($pokemon->id + 1 < $config->system->max_pokemon) { ?> |
|
| 45 | 45 | |
| 46 | - <p class="nav-links"><a href="pokemon/<?= $pokemon->id+1 ?>"><i class="fa fa-chevron-right"></i></a></p> |
|
| 46 | + <p class="nav-links"><a href="pokemon/<?= $pokemon->id + 1 ?>"><i class="fa fa-chevron-right"></i></a></p> |
|
| 47 | 47 | |
| 48 | 48 | <?php } ?> |
| 49 | 49 | </div> |
@@ -116,10 +116,10 @@ discard block |
||
| 116 | 116 | </tr> |
| 117 | 117 | <tr> |
| 118 | 118 | <td class="col-md-8 col-xs-8"><?php if (isset($pokemon->protected_gyms)) { |
| 119 | - echo "<strong>" . $locales->POKEMON_GYM . $pokemon->name . "</strong> :"; |
|
| 119 | + echo "<strong>".$locales->POKEMON_GYM.$pokemon->name."</strong> :"; |
|
| 120 | 120 | } ?></td> |
| 121 | 121 | <td class="col-md-4 col-xs-4"><?php if (isset($pokemon->protected_gyms)) { |
| 122 | - echo $pokemon->protected_gyms ; |
|
| 122 | + echo $pokemon->protected_gyms; |
|
| 123 | 123 | }?></td> |
| 124 | 124 | </tr> |
| 125 | 125 | </table> |
@@ -10,8 +10,8 @@ discard block |
||
| 10 | 10 | // Include & load the variables |
| 11 | 11 | // ############################ |
| 12 | 12 | |
| 13 | -$variables = SYS_PATH.'/core/json/variables.json'; |
|
| 14 | -$config = json_decode(file_get_contents($variables)); |
|
| 13 | +$variables = SYS_PATH.'/core/json/variables.json'; |
|
| 14 | +$config = json_decode(file_get_contents($variables)); |
|
| 15 | 15 | |
| 16 | 16 | // Load the locale elements |
| 17 | 17 | ############################ |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | $trainer_lvl = []; |
| 30 | 30 | # For all 3 teams |
| 31 | 31 | for ($teamid = 1; $teamid <= 3; $teamid++) { |
| 32 | - $req = "SELECT level, count(level) AS count FROM trainer WHERE team = '".$teamid."' GROUP BY level"; |
|
| 32 | + $req = "SELECT level, count(level) AS count FROM trainer WHERE team = '".$teamid."' GROUP BY level"; |
|
| 33 | 33 | if ($result = $mysqli->query($req)) { |
| 34 | 34 | # build level=>count array |
| 35 | 35 | $data = []; |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | # fill empty levels counts with 0 |
| 43 | 43 | for ($i = 5; $i <= 40; $i++) { |
| 44 | 44 | if (!isset($data[$i])) { |
| 45 | - $data[$i]=0; |
|
| 45 | + $data[$i] = 0; |
|
| 46 | 46 | } |
| 47 | 47 | } |
| 48 | 48 | # sort array again |